comp.lang.ada
 help / color / mirror / Atom feed
* can ada do this?
@ 2019-05-10 15:05 Rabican
  2019-05-10 16:45 ` Shark8
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Rabican @ 2019-05-10 15:05 UTC (permalink / raw)


https://www.scylladb.com/2019/05/06/introducing-scylla-enterprise-2019-1/


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-10 15:05 can ada do this? Rabican
@ 2019-05-10 16:45 ` Shark8
  2019-05-10 17:53   ` Optikos
                     ` (2 more replies)
  2019-05-10 18:00 ` Per Sandberg
  2019-05-10 23:56 ` Stephen Leake
  2 siblings, 3 replies; 16+ messages in thread
From: Shark8 @ 2019-05-10 16:45 UTC (permalink / raw)


On Friday, May 10, 2019 at 9:05:18 AM UTC-6, Rabican wrote:
> https://www.scylladb.com/2019/05/06/introducing-scylla-enterprise-2019-1/

Do what?
Implement it? Yes.
Interface/bind to it? Probably.

What, exactly, are you trying to ask?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-10 16:45 ` Shark8
@ 2019-05-10 17:53   ` Optikos
  2019-05-13  6:02   ` Maciej Sobczak
  2019-05-17  1:58   ` Rabican
  2 siblings, 0 replies; 16+ messages in thread
From: Optikos @ 2019-05-10 17:53 UTC (permalink / raw)


On Friday, May 10, 2019 at 11:45:19 AM UTC-5, Shark8 wrote:
> On Friday, May 10, 2019 at 9:05:18 AM UTC-6, Rabican wrote:
> > https://www.scylladb.com/2019/05/06/introducing-scylla-enterprise-2019-1/
> 
> Do what?
> Implement it? Yes.
> Interface/bind to it? Probably.
> 
> What, exactly, are you trying to ask?

I suspect that Rabican is asking in effect, either
1) Does Ada currently have a language binding to CQL like C++, Python, Go, Java, and Node.JS do?
and/or
2) Given enough labor & diligence, can such an Ada language binding to CQL be developed by analyzing/reverse-engineering/mimicking the C++, Python, Go, and/or Java language bindings?

https://en.wikipedia.org/wiki/Apache_Cassandra#Cassandra_Query_Language

#1's answer is no.
#2's answer is clearly yes, given the ecumenical language bindings already extant.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-10 15:05 can ada do this? Rabican
  2019-05-10 16:45 ` Shark8
@ 2019-05-10 18:00 ` Per Sandberg
  2019-05-10 23:56 ` Stephen Leake
  2 siblings, 0 replies; 16+ messages in thread
From: Per Sandberg @ 2019-05-10 18:00 UTC (permalink / raw)


Do what please elaborate.

Of course you can do it in Ada if yo want to do it, I think there is a 
big confusion when it comes to keep  Languages, Libraries, Ideas in 
separate contexts.

By the way i got a CI server (debian buster) trying to build Scylla from 
github and its still fails since the build instructions don't specify 
exact versions of all libraries required and it does not specify version 
of gcc ether, so I'm waiting for a blue dot.

/P


On 5/10/19 5:05 PM, Rabican wrote:
> https://www.scylladb.com/2019/05/06/introducing-scylla-enterprise-2019-1/
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-10 15:05 can ada do this? Rabican
  2019-05-10 16:45 ` Shark8
  2019-05-10 18:00 ` Per Sandberg
@ 2019-05-10 23:56 ` Stephen Leake
  2 siblings, 0 replies; 16+ messages in thread
From: Stephen Leake @ 2019-05-10 23:56 UTC (permalink / raw)


On Friday, May 10, 2019 at 8:05:18 AM UTC-7, Rabican wrote:
> https://www.scylladb.com/2019/05/06/introducing-scylla-enterprise-2019-1/

If you are looking for a way to bind Ada code to a database, the GnatColl database packages have a high level way to do that, to several db backends.

There's an intro to it at https://www.adacore.com/gems/gem-129-type-safe-database-api-part-1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-10 16:45 ` Shark8
  2019-05-10 17:53   ` Optikos
@ 2019-05-13  6:02   ` Maciej Sobczak
  2019-05-13  8:21     ` Niklas Holsti
  2019-05-17  1:57     ` Rabican
  2019-05-17  1:58   ` Rabican
  2 siblings, 2 replies; 16+ messages in thread
From: Maciej Sobczak @ 2019-05-13  6:02 UTC (permalink / raw)


> > https://www.scylladb.com/2019/05/06/introducing-scylla-enterprise-2019-1/
> 
> Do what?
> Implement it? Yes.
> Interface/bind to it? Probably.
> 
> What, exactly, are you trying to ask?

Sigh... :-)

Considering the subject line (and some minor details like starting it with a small letter, no narrative in the actual post, etc.) I'm 99% sure this question is a more or less intended trolling about performance. ScyllaDB supposedly offers a jaw-dropping performance and is an impressive engineering achievement in other ways, too. And was implemented in C++. Please see the first paragraph of the linked page.

Thus, my bet is that the full expanded question is: "is it possible to implement a comparable product in Ada"?

The answer is: we don't know until someone does it.

-- 
Maciej Sobczak * http://www.inspirel.com


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-13  6:02   ` Maciej Sobczak
@ 2019-05-13  8:21     ` Niklas Holsti
  2019-05-17  1:57     ` Rabican
  1 sibling, 0 replies; 16+ messages in thread
From: Niklas Holsti @ 2019-05-13  8:21 UTC (permalink / raw)


On 19-05-13 09:02 , Maciej Sobczak wrote:
>>> https://www.scylladb.com/2019/05/06/introducing-scylla-enterprise-2019-1/
>>
>>
>>>
Do what?
>> Implement it? Yes. Interface/bind to it? Probably.
>>
>> What, exactly, are you trying to ask?
>
> Sigh... :-)
>
> Considering the subject line (and some minor details like starting it
> with a small letter, no narrative in the actual post, etc.) I'm 99%
> sure this question is a more or less intended trolling about
> performance. ScyllaDB supposedly offers a jaw-dropping performance
> and is an impressive engineering achievement in other ways, too. And
> was implemented in C++. Please see the first paragraph of the linked
> page.
>
> Thus, my bet is that the full expanded question is: "is it possible
> to implement a comparable product in Ada"?

I agree that this is probably the OP's "question".

> The answer is: we don't know until someone does it.

However, as C++ and Ada have quite similar programming and computation 
models, it is highly likely that an Ada implementation of the ScyllaDB 
design can be made to have similar performance (within small constant 
factors) as the C++ implementation.

It is less certain that the ScyllaDB design can be expressed as nicely 
(where nicely = directly, readably, compactly, maintainably, etc.) in 
Ada source code as in C++ source code.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-13  6:02   ` Maciej Sobczak
  2019-05-13  8:21     ` Niklas Holsti
@ 2019-05-17  1:57     ` Rabican
  2019-05-17 22:59       ` Shark8
  1 sibling, 1 reply; 16+ messages in thread
From: Rabican @ 2019-05-17  1:57 UTC (permalink / raw)


On Monday, May 13, 2019 at 2:02:13 AM UTC-4, Maciej Sobczak wrote:
> > > https://www.scylladb.com/2019/05/06/introducing-scylla-enterprise-2019-1/
> > 
> > Do what?
> > Implement it? Yes.
> > Interface/bind to it? Probably.
> > 
> > What, exactly, are you trying to ask?
> 
> Sigh... :-)
> 
> Considering the subject line (and some minor details like starting it with a small letter, no narrative in the actual post, etc.) I'm 99% sure this question is a more or less intended trolling about performance. ScyllaDB supposedly offers a jaw-dropping performance and is an impressive engineering achievement in other ways, too. And was implemented in C++. Please see the first paragraph of the linked page.
> 
> Thus, my bet is that the full expanded question is: "is it possible to implement a comparable product in Ada"?
> 
> The answer is: we don't know until someone does it.
> 
> -- 
> Maciej Sobczak * http://www.inspirel.com

no troll

I am wondering can you build a database to run everything using ada?
something better than postgresql or scylladb?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-10 16:45 ` Shark8
  2019-05-10 17:53   ` Optikos
  2019-05-13  6:02   ` Maciej Sobczak
@ 2019-05-17  1:58   ` Rabican
  2019-05-17  5:39     ` Maciej Sobczak
  2 siblings, 1 reply; 16+ messages in thread
From: Rabican @ 2019-05-17  1:58 UTC (permalink / raw)


On Friday, May 10, 2019 at 12:45:19 PM UTC-4, Shark8 wrote:
> On Friday, May 10, 2019 at 9:05:18 AM UTC-6, Rabican wrote:
> > https://www.scylladb.com/2019/05/06/introducing-scylla-enterprise-2019-1/
> 
> Do what?
> Implement it? Yes.
> Interface/bind to it? Probably.
> 
> What, exactly, are you trying to ask?

actually yes
1 can you talk to scylla from ada?
2 could u replace scyla with somethign better coded in ada?


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-17  1:58   ` Rabican
@ 2019-05-17  5:39     ` Maciej Sobczak
  2019-05-17 13:52       ` Optikos
  2019-05-29 18:22       ` Rabican
  0 siblings, 2 replies; 16+ messages in thread
From: Maciej Sobczak @ 2019-05-17  5:39 UTC (permalink / raw)


> 1 can you talk to scylla from ada?

Most likely the easiest path is to bind to the C client API, if the pure-Ada API does not exist.

> 2 could u replace scyla with somethign better coded in ada?

What do you mean by "better coded"? Is this product badly coded, currently? Or, if you think that the product would benefit from better coding (presumably in the context of some bug, which is a local problem), would it be possible to code it better in the existing language (presumably by fixing the local bug)?

And, lastly, why would anybody replace an existing (and apparently very good) product with another one? It's much better to spend your effort creating something new instead.

-- 
Maciej Sobczak * http://www.inspirel.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-17  5:39     ` Maciej Sobczak
@ 2019-05-17 13:52       ` Optikos
  2019-05-17 14:42         ` gautier_niouzes
  2019-05-29 18:22       ` Rabican
  1 sibling, 1 reply; 16+ messages in thread
From: Optikos @ 2019-05-17 13:52 UTC (permalink / raw)


On Friday, May 17, 2019 at 12:40:00 AM UTC-5, Maciej Sobczak wrote:
> > 1 can you talk to scylla from ada?
> 
> Most likely the easiest path is to bind to the C client API, if the pure-Ada API does not exist.

Rabican, this is the recurring wise advice to you, if you are interested in coding something in Ada up regarding Scyla.  As I mentioned above, the other (nonC++) languages' bindings to Scyla provide a rich amount of tutorials that can be borrowed for Ada too.

> > 2 could u replace scyla with somethign better coded in ada?
> 
> What do you mean by "better coded"?

e.g.,
A) Coded in, e.g., SPARK/Ada to be (mathematically-)provably correct.
B) Coded with resource-pools for embedded systems in mind (à la Multics segmented partitioning) instead of One Big Enormous Heap for general-purpose computing (à la Unix monolith).

> Is this product badly coded, currently? Or, if you think that the product would benefit from better coding
> (presumably in the context of some bug, which is a local problem), would it be possible to code it better
> in the existing language (presumably by fixing the local bug)?

Presumably •not• in the context of local bug as you surmise, but in the context of a systemic widespread architectural flaw or lack that C++ (mis)leads designers into, such as A or B above.

> And, lastly, why would anybody replace an existing (and apparently very good) product with another
> one? It's much better to spend your effort creating something new instead.

Answer:  To achieve quite different architectural or design goals than the Scyla team had in mind.

That all being said, even Ada2020 will lack enough breakthrough differences from C++ at the language level for the language alone to steer an Ada-based Scyla-esque different-thingy to be revolutionarily different.  Mainstream Ada culture does differ markedly from mainstream C++ culture, so the different architectural or design goals would more likely arise from cultural differences at the human-idiom level than at what the piecemeal language feature-set minutia actually permits or prohibits.

Some Adaphiles yearn for a more-pandering-to-popularity AdaNG (Ada next generation) that, say, has braces instead of BEGIN END, and numerous other shallow “features”.  Other Adaphiles like me yearn for a quite different AdaNG that, while remaining true to Ada2020, resurrects the propensity toward begetting something analogous to the breakthroughs of PL/1 and Algol68 in the 1960s and of Ada in the 1970s by setting the bar far far higher regarding what software (and software-engineering and systems engineering) designs, principles, and practices can be achieved easily via expanded expressivity in more (and/or more-flexible) language constructs (instead of contortedly jammed through the backdoor in C++ if even possible at all in C++'s syntax or culture).

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-17 13:52       ` Optikos
@ 2019-05-17 14:42         ` gautier_niouzes
  2019-05-17 20:36           ` Optikos
  2019-05-18  0:42           ` Dennis Lee Bieber
  0 siblings, 2 replies; 16+ messages in thread
From: gautier_niouzes @ 2019-05-17 14:42 UTC (permalink / raw)


> Some Adaphiles yearn for a more-pandering-to-popularity AdaNG (Ada next generation) that, say, has braces instead of BEGIN END, and numerous other shallow “features”.

The braces replace exactly the BEGIN END pair in *Pascal* (they are needed for framing more than one instruction). In Ada the BEGIN END pair is only for subprograms, or blocks (with or without DECLARE) but the IFs, LOOPs and CASEs don't need it. Basically groups of instructions don't need to be framed in Ada, so where would you put your braces ?... In the end you would have a mess with some braces and some "end loop" etc.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-17 14:42         ` gautier_niouzes
@ 2019-05-17 20:36           ` Optikos
  2019-05-18  0:42           ` Dennis Lee Bieber
  1 sibling, 0 replies; 16+ messages in thread
From: Optikos @ 2019-05-17 20:36 UTC (permalink / raw)


On Friday, May 17, 2019 at 9:42:02 AM UTC-5, gautier...@hotmail.com wrote:
> > Some Adaphiles yearn for a more-pandering-to-popularity AdaNG (Ada next generation) that, say, has
> > braces instead of BEGIN END, and numerous other shallow “features”.
> 
> The braces replace exactly the BEGIN END pair in *Pascal* (they are needed for framing more than one
> instruction). In Ada the BEGIN END pair is only for subprograms, or blocks (with or without DECLARE)
> but the IFs, LOOPs and CASEs don't need it. Basically groups of instructions don't need to be framed in
> Ada, so where would you put your braces ?... In the end you would have a mess with some braces and
> some "end loop" etc.

Answer:  exactly where C-family languages put them, as explained below.

Many of the Adaphiles who yearn for an AdaNG-with-braces to increase Ada's popularity as a more syntactically-C-family language would say that Ada's current syntax of branching constructs would be jettisoned when the {}s from C-family languages are adopted, so that AdaNG's branching constructs would be more C-esque.  They would say that now that C-family languages are commonplace for more than a generation, any attempt at readability that deviates from the C-family norm is itself less readable to these modern C-indoctrinated people.

(I've got news for those folk:  people are not rejecting Ada due to minor differences in the syntax of the Algol60-esque branching constructs.)


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-17  1:57     ` Rabican
@ 2019-05-17 22:59       ` Shark8
  0 siblings, 0 replies; 16+ messages in thread
From: Shark8 @ 2019-05-17 22:59 UTC (permalink / raw)


On Thursday, May 16, 2019 at 7:57:53 PM UTC-6, Rabican wrote:
> I am wondering can you build a database to run everything using ada?
Yes; there was even a Graph-based DB called Mneson (or similar) that was all-Ada some years ago, I think I have a copy archived.

> something better than postgresql or scylladb?
Well, you see "better" is hard to answer here, precisely because there's a LOT of different properties to consider: ease of interface, ease of use, various speed quantifications, recovery, journalling, and so on.

> 1 can you talk to scylla from ada?
Probably. Ada is *VERY* good at interfacing, but a lot depends on Scylla and its architecture -- if, for example, they provide no API nor external interfacing then it would be very, very hard (if at all possible)... regardless of the language.

> 2 could u replace scyla with somethign better coded in ada? 
Probably; but, again, you need to define what "better" *IS*.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-17 14:42         ` gautier_niouzes
  2019-05-17 20:36           ` Optikos
@ 2019-05-18  0:42           ` Dennis Lee Bieber
  1 sibling, 0 replies; 16+ messages in thread
From: Dennis Lee Bieber @ 2019-05-18  0:42 UTC (permalink / raw)


On Fri, 17 May 2019 07:42:00 -0700 (PDT), gautier_niouzes@hotmail.com
declaimed the following:

>> Some Adaphiles yearn for a more-pandering-to-popularity AdaNG (Ada next generation) that, say, has braces instead of BEGIN END, and numerous other shallow “features”.
>
>The braces replace exactly the BEGIN END pair in *Pascal* (they are needed for framing more than one instruction). In Ada the BEGIN END pair is only for subprograms, or blocks (with or without DECLARE) but the IFs, LOOPs and CASEs don't need it. Basically groups of instructions don't need to be framed in Ada, so where would you
put your braces ?... In the end you would have a mess with some braces and some "end loop" etc.


	Since {} are used in those languages to /group statements/ where the
syntax says "a statement", making an Ada-esque language means making a
syntax were control blocks are NOT delimited... dropping "loop/end loop",
"then/end if", et al, requiring conditionals to be wrapped in (), and
allowing
	if (conditional)
		a statement;
	else
		another statement;

Ada's 
	if condition then
		a statement;
	else
		another statement;
	end if;

is an improvement over the error prone use of {} to group statements within
syntactically "single statement" parts of the language.

	And I thought people complaining about Python's use of indentation to
block statements was ridiculous -- since most programmers I know already
indent code to reflect the semantics, having the language /use/ that
indentation for syntax meant one didn't have to provide {} or begin/end
(loop/end loop, etc.).

	Avoiding {} as grouping also minimizes the infernal fight over
placement. Is it...

	if (cond) {
		statements;
	}
(UGH -- if that were a required form I'd likely define macros for THEN and
ENDIF [and the rest of the gang])

	if (cond)
		{
			statements;
		}

(small ugh -- too many indentation levels eaten for nothing)

	if (cond)
	{
		statements;
	}

(which is my preference in those languages, as it puts the {} directly in
line with the keyword for which they are grouping the statements)


-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed@ix.netcom.com 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: can ada do this?
  2019-05-17  5:39     ` Maciej Sobczak
  2019-05-17 13:52       ` Optikos
@ 2019-05-29 18:22       ` Rabican
  1 sibling, 0 replies; 16+ messages in thread
From: Rabican @ 2019-05-29 18:22 UTC (permalink / raw)


On Friday, May 17, 2019 at 1:40:00 AM UTC-4, Maciej Sobczak wrote:
> > 1 can you talk to scylla from ada?
> 
> Most likely the easiest path is to bind to the C client API, if the pure-Ada API does not exist.
> 
> > 2 could u replace scyla with somethign better coded in ada?
> 
> What do you mean by "better coded"? Is this product badly coded, currently? Or, if you think that the product would benefit from better coding (presumably in the context of some bug, which is a local problem), would it be possible to code it better in the existing language (presumably by fixing the local bug)?
> 
> And, lastly, why would anybody replace an existing (and apparently very good) product with another one? It's much better to spend your effort creating something new instead.
> 
> -- 
> Maciej Sobczak * http://www.inspirel.com

Thank you and others for nice thoughtful answers.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-05-29 18:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-10 15:05 can ada do this? Rabican
2019-05-10 16:45 ` Shark8
2019-05-10 17:53   ` Optikos
2019-05-13  6:02   ` Maciej Sobczak
2019-05-13  8:21     ` Niklas Holsti
2019-05-17  1:57     ` Rabican
2019-05-17 22:59       ` Shark8
2019-05-17  1:58   ` Rabican
2019-05-17  5:39     ` Maciej Sobczak
2019-05-17 13:52       ` Optikos
2019-05-17 14:42         ` gautier_niouzes
2019-05-17 20:36           ` Optikos
2019-05-18  0:42           ` Dennis Lee Bieber
2019-05-29 18:22       ` Rabican
2019-05-10 18:00 ` Per Sandberg
2019-05-10 23:56 ` Stephen Leake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox