News for hackers. Stuff that matters.
Re:The Spiral Language by blt on Thursday July 12, 2018 @07:18PM (#17519413)
show a code sample before your whole manifesto
Re:The Spiral Language by PeCaN on Thursday July 12, 2018 @07:40PM (#17519517)
Frankly, to me the specifics of the syntax are not nearly as important as what the language does.

This:

> Abstraction by heap allocation is a dead end. It works moderately well on the current generation of computers where CPU is still the dominant driver of computation.

> It cannot work for devices like GPUs and the rest coming down the line.

tells me way more about the language (and gets me much more interested) than a "hello world" would.

I think syntax is by far the easiest part of a new language to learn, so it's ultimately not that important.

EDIT: Regardless, it turns out it actually gives code samples like a page or two down.

Re:The Spiral Language by ghayes on Thursday July 12, 2018 @08:27PM (#17519695)
I just want to mention that code samples are about more than syntax. E.g. a code sample of Elixir might spawn concurrent processes, or a code sample of Idris might show type-safe vector concatenation.
Re:The Spiral Language by DEADBEEFC0FFEE on Thursday July 12, 2018 @09:16PM (#17519864)
I am not a developer beyond hobby scripts and such, and I find these threads and comments like this extremely interesting. Other people's domains are frequently fascinating.
Re:The Spiral Language by garmaine on Thursday July 12, 2018 @08:20PM (#17519670)
I don't trust that it actually achieves those goals without seeing code. Show an illustrative example of what you are trying to do and how it is accomplished, then wax philosophic.
Re:The Spiral Language by coldtea on Friday July 13, 2018 @05:50AM (#17521653)
What he's trying to do is not conveyed in example code.

That said, he gives plenty of examples.

Re:The Spiral Language by DennisP on Thursday July 12, 2018 @10:05PM (#17520031)
It does even better, it has a table of contents right at the top, so you can skip directly to whatever you want. "Intro" and "Design Philosophy" sound like manifestos, so pass over those and click on "Tutorials."
Re:The Spiral Language by winter_blue on Thursday July 12, 2018 @07:25PM (#17519442)
I actually prefer to read the philosophy of a language, before diving deeper into the language itself. It gives you an idea of the author's motivations for creating the language. I feel like a code sample would make it too easy to judge its syntax, and not tell you enough/much about its semantics.
Re:The Spiral Language by agumonkey on Thursday July 12, 2018 @07:51PM (#17519558)
The 'sample' thing is a result of the era, where people wanted to streamline language diffusion. I think it became a bit too much of a reflex for people to expect the same first piece of information about a language.

I too need more than a sample and prefer a larger explanation.

Re:The Spiral Language by zwkrt on Thursday July 12, 2018 @08:06PM (#17519618)
Especially considering the syntax of this language is kind of strange. Seeing a hello world without context would put me off I think.
Re:The Spiral Language by s-shellfish on Thursday July 12, 2018 @09:53PM (#17519987)
I don't think it aligns with the philosophy of the language either, to essential chunk ideas into large discrete blocks of particular categorical intents. It seems like the intent is to distribute programming concepts on a finer granularity than most languages tend to retain flexibility for, as structure builds.
Re:The Spiral Language by blt on Thursday July 12, 2018 @09:34PM (#17519926)
Yes I agree that the language semantics and the philosophical motivation are more important. But there is a reason academic papers have abstracts. The core ideas should be summarized crisply at the beginning of a technical document. A few sentences and a code sample are the equivalent of an abstract for programming languages.
Re:The Spiral Language by abecedarius on Thursday July 12, 2018 @10:33PM (#17520114)
A related-work section would really help, too.
Re:The Spiral Language by abstractcontrol on Friday July 13, 2018 @07:31AM (#17521998)
I do not think there is a language with capabilities similar to Spiral. If it existed it would have saved me a lot of time. The closest you could get would would be [Scala LMS](https://scala-lms.github.io/) and the work done on staging such as in [context of Ocaml](http://ocamllabs.io/iocamljs/staging2018.html).

Personally I think macro-style staging in statically typed languages is an atrocity and want nothing to do with it. I kind of like the type driven version as is done in LMS, but compared to Spiral the LMS is less expressive.

A lot of work is being done on macros/partial evaluation/staging in Scala and I assume it will continue to be done as the authors are aware of the need for this in a language - without it a functional language would be dog slow, but my impression is that they are having significant difficulties making it fit with Scala's much more complex type system. One consequence of that is that they seemingly rewrite their macro system every few years. This time they will surely get it right despite being at it for decade(s).

The reason why what Spiral has works so well is because its type system is so simple, so staging can be completely intervowen with how it does type inference.

My view based on seeing the last 50 years of language design is that staging is really difficult to bolt onto an already established design. It tends to degenerate into having two languages - the core language and a scripting language on top of it. C++'s template system is the worst example of this. Another example which actually embraces this dichotomy would be [Terra](http://terralang.org/) which could be described as bolting Lua on top of C. I rather dislike this sort of design.

A language needs to be designed around staging from the ground up and it needs to be accepted that in the absence of magic, the programmer will have to mold his style to fit with the new paradigm.

If a language is to have staging it should be everywhere and at all times much like regular type inference is in F# and other ML styled languages.

Re:The Spiral Language by srean on Friday July 13, 2018 @11:36AM (#17523811)
I have a suspicion that you might like digging into a language called Felix. Sadly it has sort of disappeared from the internet because felix-lang.org is no longer up. The documentation now exists in a poorer form on readthedocs. The development is alive and kicking on GitHub though.
Re:The Spiral Language by abstractcontrol on Friday July 13, 2018 @11:55AM (#17524004)
Never stumbled upon it in my research. Thanks for the reference.
Re:The Spiral Language by srean on Friday July 13, 2018 @12:01PM (#17524071)
You can think of it as a codegen for C++ in the lines of what Scala is to Java. The author was involved in Barry Jay's language called Fish, which would also be of interest to you.
Re:The Spiral Language by plaguuuuuu on Thursday July 12, 2018 @07:50PM (#17519554)
there are heaps of samples on that page.
Re:The Spiral Language by garmaine on Thursday July 12, 2018 @08:22PM (#17519680)
Which you have to scroll past pages of manifesto to find, and all the examples seem to be basic illustrations of syntax. Where are the examples showing how this approach to a language actually results in superior code bases or more efficient programs or whatever?
Re:The Spiral Language by azeirah on Friday July 13, 2018 @01:44AM (#17520757)
This is a one person project. This clearly took a lot of time and effort. You can afford it to look at the TOC and get scrolled directly to various examples.
Re:The Spiral Language by garmaine on Friday July 13, 2018 @03:27AM (#17521105)
I didn’t find a single example that demonstrates what I was looking for. I gave up.
Re:The Spiral Language by zaphar on Friday July 13, 2018 @08:46AM (#17522439)
You are clearly not the target audience then.
Re:The Spiral Language by coldtea on Friday July 13, 2018 @05:51AM (#17521658)
>Which you have to scroll past pages of manifesto to find

Well, you are also free to skip the language altogether.