Hacker Newsnew | past | comments | ask | show | jobs | submit | pyjarrett's commentslogin

I played an incredibly amount of SimCity 2000 and SimCity 3000, and Metropolis 1998 looks *amazing.*


FASTBuild[0] is super fast for large projects and comes with distributed builds and caching out of the box. It requires a bit of effort to set up, but it supports globbing sources, there's no separate generate build step, and it can also make Visual Studio solutions.

[0]: https://www.fastbuild.org/docs/home.html


Another great resource for vets getting started in software development (and other fields) is American Corporate Partners[1]. I had a great mentor through that group.

[1]: https://www.acp-usa.org/


Thanks for this. I've been dabbling with code for ~20 years, have the diploma and the t-shirt, but I lack the mentorship. I feel like it would be even more helpful in this time as I attempt to pivot from my general-IT career with dev as one tool into solely development. So, anyways, thanks for sharing additional resources.


> However, existing programming languages have little or no subtyping

Every "type" you use in Ada is actually a subtype.

In Ada, "A subtype of a given type is a combination of the type, a constraint on values of the type, and certain attributes specific to the subtype".

You don't ever refer to actual types in Ada, since creating a type with "type" actually creates an anonymous type and the name refers to the first subtype.[1]

    type Token_Kind is (
       Identifier,
       String_Literal,
       --  many more ...
    
       -- These are character symbols and will be part of Token_Character_Symbol.
       Ampersand,
       --  ...
       Vertical_Bar,
    );
    
    --  A subtype with a compile-time checked predicate.
    subtype Subprogram_Kind is Token_Kind
    with Static_Predicate => Subprogram_Kind in RW_Function | RW_Procedure;
    
    subtype Token_Character_Symbol is Token_Kind range Ampersand .. Vertical_Bar;
> If you have a pointer with more permissions, it should still be usable in a place that only requires a pointer with fewer permissions

This is exactly how "accessibility" of access types works in Ada[2]. If you have a pointer ("access type") to something on the heap, you can use it wherever an anonymous access type can be used. You can also create subtypes of access types which have the constraint of a "null exclusion".

[1]: https://ada-lang.io/docs/arm/AA-3/AA-3.2#p1_3.2.1

[2]: https://ada-lang.io/docs/arm/AA-3/AA-3.10


> no one cared back then if he was real,

This was directly addressed in 2 John 7

"I say this because many deceivers, who do not acknowledge Jesus Christ as coming in the flesh, have gone out into the world."


> Plenty of ways to trigger undefined behavior

I'm curious about this list, because it definitely doesn't seem that way these days. It'd be interesting to see how many of these are still possible now.


I didn't make a list, but let me give an example. Page 22 where variable declarations are introduced:

If a variable is declared and not given an initial value then great care must be taken not to use the undefined value of the variable until one has been properly given to it. If a program does use the undefined value in an uninitialised variable, its behaviour will be unpredictable; the program is said to be erronous.


Search engines seem to no longer produce an estimate of the hit count, but here are some of the ways: https://duckduckgo.com/?t=h_&q=site%3Aada-auth.org+%22errone...


Ada

The open source tooling has significantly improved since I started using it in the last five years.


About two years ago, I was able to dive into the Ada reference manual formatter which has initial commit of March 2000 and is about 45k lines of code, and add MDX output pretty easily.

Other languages focus on terseness and expressiveness. Ada expresses a bunch of constraints directly and forces you to do things in organized ways (e.g. use namespaces appropriately).


The big reason for `out` only is "I want to write here, but I don't care about the initial value." It's a more explicit version of the C++ `Foo& outFoo` output parameter paradigm.

> When "out" and "in out" parameters are distinguished, there is no need for the existence of constructors as a separate concept.

I don't agree with this. You can get I need to do things "post-init" with controlled types, or use a `return X : Thing do ... end return` block. Constructors help ensure invariants. You can make a type `is private` to prevent instantiation, only allowing creation via functions (sort of like Rust `new` associated functions), or initialization via an `out` param. It's OK but not perfect, but you can also tag on a `Type_Invariant` aspect if there are conditions which have to be met by a type. My big problem with Controlled types is that forces a type to be `tagged` (i.e. it has a vtable) which means it affects storage layout of values of that type, which isn't a problem in C++.

You can forbid copies by making something a `limited` type, but you'd have to write your own "Move" equivalent, and some of the containers have `Move` subprograms implemented to transfer contents. Limited types might elide the copy when returned from a function, but it's been a while since I looked at those rules.


I recently started writing Ada again, a couple of years after I did a bunch of projects with it. The amazing things is how easy it is to go back and update old code due to how much semantic information gets embedded in it and how few symbols it uses.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: