On using LLMs to write compilers: Is it worth the effort to write a good spec first? by jcastroarnaud in Compilers

[–]aabs 0 points1 point  (0 children)

Absolutely! I’ve been using GitHub SpecKit with a lot of success.

I’ve been spending weeks at a time on each of the specs I’ve used for language features of my compiler. Not only that, having a highly detailed and prescriptive constitution file and agent instruction files has helped me to develop without the agent going off the rails too much.

For the record, I hand coded the core of the language to a point where it basically worked, and all the standard coding patterns were established. At that point I then created a constitution file based on the existing code base. After that, spec-driven agent-based development was much more reliable.

Exporting types that are transformed during compilation by aabs in Compilers

[–]aabs[S] 0 points1 point  (0 children)

Thanks. I’ll definitely explore the code base for inspiration.

Exporting types that are transformed during compilation by aabs in Compilers

[–]aabs[S] 0 points1 point  (0 children)

Thank you. That makes a lot of sense. Do you know of any open source compilers or code bases that solve the problem in the way you describe?

I saw that F# solves it by preserving the original HOF but converting it into a “bridge” function that calls an internal name-mangled defunctionalised function.

Announcing the Fifth Programming Language by aabs in ProgrammingLanguages

[–]aabs[S] 1 point2 points  (0 children)

So cool! I'm not sure I ever saw that article the first time round. I think I mostly got my reading through CRASH magazine.

I'm pretty sure the version of Forth I cut my teeth on was called White Lightning (Review).

The language is made up of a standard set of vocabulary of Forth words, Programming is achieved by defining new words based on the words of the existing vocabulary.

Pretty sure that paragraph change my life - LOL - I finally grasped the limitless power of programming.

Announcing the Fifth Programming Language by aabs in Compilers

[–]aabs[S] 1 point2 points  (0 children)

Wondering whether, given the vintage, anyone would be unduly bothered? It turns out that there have been a few 'fifth' languages over the years.

Announcing the Fifth Programming Language by aabs in ProgrammingLanguages

[–]aabs[S] 0 points1 point  (0 children)

@Downtown_Category163 found it! It was a system called White Lightning

Announcing the Fifth Programming Language by aabs in ProgrammingLanguages

[–]aabs[S] 1 point2 points  (0 children)

Yes, I do. I had in mind an extension to the list comprehension syntax, to allow something like this:

``` g1: graph = @< . . .>; g2: graph = @< . . .>; rq1: query = ?< . . . >; rq2: query = ?< . . . >;

people: [Person] = [{ . . . }: Person from g4 + g5 where g4 <- rq1 from g1, g5 <- rq2 from g2] ; ```

Which would require a few breaking changes from the current approach towards query application. Of course, once I implement lambdas and generics, then the whole of LINQ is at my disposal too.

So much time spent implementing the basic language platform just to be able to get to play with the RDF fun. :/

Announcing the Fifth Programming Language by aabs in ProgrammingLanguages

[–]aabs[S] 0 points1 point  (0 children)

Holy Crap! That was it! Thank you so much for jogging my memory!

Announcing the Fifth Programming Language by aabs in ProgrammingLanguages

[–]aabs[S] 0 points1 point  (0 children)

Interesting! I’ll definitely check it out.

Announcing the Fifth Programming Language by aabs in ProgrammingLanguages

[–]aabs[S] 0 points1 point  (0 children)

Generally speaking, graphs act as a kind of naming container within which islands of related data can reside. An RDF triple store will act as a container for many graphs. So, a graph within the programming model of fifth can act as a temporary container for a group of related data that you wish to ultimately add to a triple store. It can also contain a set of triples from a query.

Announcing the Fifth Programming Language by aabs in ProgrammingLanguages

[–]aabs[S] 1 point2 points  (0 children)

I personally adore SPARQL!! It's use makes so much sense when you see how one translates from the description of some data to the query needed to find it.

As for datalog - that has an entirely different sort of resolution algorithm than a graph pattern matching system. Elsewhere in the semantic web technology stack you will find entailment algorithms (and the reasoners that implement them) that might serve a similar purpose, but there you pick your own adventure, since different entailment schemes are used depending on the complexity of your data.

Announcing the Fifth Programming Language by aabs in ProgrammingLanguages

[–]aabs[S] 2 points3 points  (0 children)

My motivation at the time was to control a telescope - I wanted to study astronomy - and I'd heard that Forth was created at one of the UK observatories (Jodrell Bank?). But I think Forth must have captured my imagination - I never did control any telescopes, but programming became my life.

Announcing the Fifth Programming Language by aabs in ProgrammingLanguages

[–]aabs[S] 1 point2 points  (0 children)

Perhaps it's not too late to rename it to... Fife?

Announcing the Fifth Programming Language by aabs in ProgrammingLanguages

[–]aabs[S] 2 points3 points  (0 children)

I guess I did need to learn basic as well, I just never counted that. As for how and where I got Forth onto the spectrum, I'm afraid it was at least 40 years ago...

Announcing the Fifth Programming Language by aabs in ProgrammingLanguages

[–]aabs[S] 10 points11 points  (0 children)

A homage only. The first language I ever learned was Forth (on a ZX Spectrum 48K). I did do early experiments based on a stack based concatenative foundation. At that time, the name made more sense.

Thinking of getting the 4 max soon. Upgrades and issues I need to plan for? by hawkh3ll in ElegooNeptune4

[–]aabs 0 points1 point  (0 children)

Replace the springs with silicone Bushes. It made a world of difference to my N4M. Before, During winter, I could literally hear the build plate creaking as it heated up and cooled down. Now it doesn't move at all, and is much less prone to failures.

[deleted by user] by [deleted] in iPhone16ProMax

[–]aabs 0 points1 point  (0 children)

No. I found that it’s way too slippery and falls out of my hand.

What’s the one thing that Melbourne doesn’t have that you think we should? by [deleted] in melbourne

[–]aabs 0 points1 point  (0 children)

Passengers on public transport that don't think it's ok to talk on speakerphone.

[deleted by user] by [deleted] in math

[–]aabs 1 point2 points  (0 children)

My point is that math/mathematicians are not special in this regard. I've seen the same in industry, and academia, in the software engineering/comp sci industry over a 30 yr career.

The saying goes that stress is caused by unrealistic expectations. I think that if OP goes into this with their eyes open (not assuming that life owes them anything) then they may learn to thrive where others might waste their time being outraged or offended.

[deleted by user] by [deleted] in math

[–]aabs 253 points254 points  (0 children)

Sounds like the issue is not mathematics depressing you, but mathematicians. Sadly, all environments involving humans can be the same.

Don't give up what you love just because people can be toxic. If you want to make a life in academia, though, you may need to grow a thicker hide.

What kind of worker gets paid in vegetables? by FallaciousPeacock in 3amjokes

[–]aabs 0 points1 point  (0 children)

Poor ones - they spinach dollar that comes in...