Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
OneWingedShark
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
OneWingedShark
5y ago
> Having separate module interface and module body files, as in Ada or Modula-2/3, is a great idea that sadly a lot of people are burnt out on because C and C++ do this in a very unprincipled way. > Having a terse little file whe
32.
▲
by
OneWingedShark
5y ago
IIRC a circular graph would typically be done via pool-specific access types. -- Forward declaration. Type Element(<>); -- Assuming there's a Graph.Pool implementation of the base Storage_Pool object. Type Point
33.
▲
by
OneWingedShark
5y ago
>I guess another way to put this is, "Can a non-trivial project be developed in modern Ada without using Unchecked_Dealloation?" Because I don't see how I can consider a library safe if it is allowed to call Unchecked_Deal
34.
▲
by
OneWingedShark
5y ago
>My comment for too many years is that C/C++ fails to deal with three issues: "How big is it", "Who owns it", and "Who locks it". Ada has is pretty good at dealing with all three of these, TBH. "Ho
35.
▲
by
OneWingedShark
5y ago
> Who is wrong, the programmer trying to speak the language or the language itself? This is more complicated a question than you think. If the language is such that you always have to look up some particular feature, then it's lik
36.
▲
by
OneWingedShark
6y ago
> Is there any reason why it isn't more popular? There are a few; if you head over to comp.lang.ada you can find threads on the issue by people who were involved at the time. As I understand it though there are four or five points:
37.
▲
by
OneWingedShark
6y ago
> Specifically, do the language semantics allow a mode where these checks can be turned off? Leaving them on all the time can be a huge performance burden, both directly and in the barriers they add to optimization (while there are poten
38.
▲
by
OneWingedShark
6y ago
IIRC, the one-liner here [assuming you disabled the default " " operator] would be: Return Area( Distance'Base'(Left * Right) ); The apostrophe at the inner portion is 'qualification', a method for dir
39.
▲
by
OneWingedShark
6y ago
IIRC you can disable/forbid the default like so: Function "*"(Left, Right: Distance) return Distance is abstract; then use: Function "*"(Left, Right : Distance) return Area;
40.
▲
by
OneWingedShark
6y ago
> A rewrite would introduce new bugs, even if they aren't memory issues. OTOH, a rewrite could be useful in splitting up the problem-space as well as reducing errors. This is where Ada excels, and one nice way of splitting the probl
41.
▲
by
OneWingedShark
6y ago
> This has, however, recently come up for Nx (numerical elixir) which had to implement and standardize ways to shim these IEEE concepts back into the VM for interop purposes. This would have been an excellent place to use Ada. The packag
42.
▲
by
OneWingedShark
6y ago
> The C++ "app" layer was a different story. The worst part it was a 3000 line switch/case block with about 100 different cases, chock full of copy-and-pasted code. It went on... and on... and on... I still have nightmares
43.
▲
by
OneWingedShark
6y ago
> Ada doesn't have the numerical or data frame or stats libraries Ada has a pretty nice set of numerics (Ada.Numerics.*), but the "lack of libraries" is almost a non-issue when the foreign-function interface is as simple a
44.
▲
by
OneWingedShark
6y ago
laughs in Ada -- IEEE754/64-bits: Interfaces.IEEE_Float_64 -- And here we strip out non-numeric values. Use Interfaces; Subtype Numeric_Real is IEEE_Float_64 range IEEE_Float_64'Range; Done.
45.
▲
by
OneWingedShark
6y ago
Pretty much all of my career has been in maintenance, so I tend to see the mess that gets made and while bad-design is always a killer, I notice there are languages that encourage/discourage it to varying degrees. In the case of C, and
46.
▲
by
OneWingedShark
6y ago
>Both those links are the same, btw. Yes, two different locations for freely getting the spec. > I can see why it's no longer used, with all those modes! But another language with ranges. Also has module inheritance. IIRC, "
47.
▲
by
OneWingedShark
6y ago
I have heard of it, and was tempted to grab a copy of the spec. -- The context in which I heard it, language design, Ada was put forth as the only language designed for both maintainability and correctness, someone responded that CHILL was
48.
▲
by
OneWingedShark
6y ago
> As for concurrency - gluing systems together sometimes needs concurrency to cut the latency down. And in data science parallelism also means performance, and often it is needed. I'm not that convinced Python is a clear winner here
49.
▲
by
OneWingedShark
6y ago
>> "As of Rust 2018, this still can cause undefined behavior." > > This is referring to the fact that you have to be careful when accessing the fields of a packed struct that everything is aligned correctly. Normally
50.
▲
by
OneWingedShark
6y ago
> How can you say C has no real value in a professional setting? Fairly easily. My professional career has been mainly in maintenance and, as such, I get to see the gritty back-end of things, the end-result of all the technical-debt...
51.
▲
by
OneWingedShark
6y ago
Americans with Disabled Australians?
52.
▲
by
OneWingedShark
6y ago
GNAT debuted in 1995, 25 years ago. Some 12 years after the 1983 standard.
53.
▲
by
OneWingedShark
6y ago
> I use PL/SQL a fair bit, which was inspired by Ada. I have a bit of a project-idea here: PL/SQL+Ada+VHDL all together in an IDE. > Unfortunately, the designers did not bring over > ShortName is New ReallyLongAndAwkardN
54.
▲
by
OneWingedShark
6y ago
Awesome, you wouldn't still have a copy of your Ada compiler's source do you?
55.
▲
by
OneWingedShark
6y ago
There's a LOT of things that it's not necessary for; watch this video: https://archive.fosdem.org/2016/schedule/event/ada_memory/
56.
▲
by
OneWingedShark
6y ago
>I get what you're saying, but learning C teaches you about the C memory model instead of "real machines". No. C doesn't do that, not at all; see: https://queue.acm.org/detail.cfm?id=3212479 If you wa
57.
▲
by
OneWingedShark
6y ago
What a lot of people don't understand is the reason that Ada has so many string-types, and the answer is pretty simple: usage. Fixed: The simple string-as-an-array approach. Bounded: The maximum, but variable-size approach; analogous t
58.
▲
by
OneWingedShark
6y ago
> So I wish that instead of using TOML files, the dependencies would be specified in the gprbuild project files themselves. The syntax/options of GPR files would probably have to be extended, but it would be nice to have only one la
59.
▲
by
OneWingedShark
6y ago
> Ada seems pretty nice, but it does not have a borrow checker, does it? IIUC, there is a SPARK implementation that does: https://blog.adacore.com/using-pointers-in-spark / https://www.adacore.com/up
60.
▲
by
OneWingedShark
6y ago
They are typically pretty good; the design helps the compiler to not have to re-compile everything any time something is changed, so most of your variance is going to boil down to "how much did you change." That said, Delphi is bl
More ›