by psxuaw on 10/13/23, 11:36 AM with 123 comments
by xwowsersx on 10/14/23, 12:18 AM
by booleandilemma on 10/13/23, 2:54 PM
While that's a great thing for everybody, it does mean if you're going to be pushing a new language, you need to be clear about what sets your language apart from the dozens of others clamoring for attention.
by donpdonp on 10/13/23, 4:42 PM
by zoogeny on 10/13/23, 3:29 PM
I have been thinking recently that all of the new powerful features showing up in language (Typescrpt, Go, Rust, Elixir, Kotlin, etc.) have been exposing programmers to combinations of programming language features that were not widely available before. I mean, I grew up with Pascal, Basic, C/C++ and Lisp but kids these days are growing up with Python, Typescript, Rust, Go, Haskel, Kotlin, Dart, Swift, C#.
Specifically I was thinking about how I avoid classes now for almost all of my code. I used to be a OOP first guy. Now I want value semantics and abstract data types. I have always hated exceptions (or any non-local control flow in general) and I love guards and defer-like semantics. I love the idea of CSP and Erlang but I also want full low-level control of bits. I want custom allocators and no GC, except maybe when I want a GC for some reason.
I love that people are just experimenting by taking the bits and pieces they like from the multitude of available high-quality languages and they are mixing them up into strange new soups.
by johngossman on 10/14/23, 12:30 AM
Personally, I find nothing wrong with designing for the sake of designing.
by munro on 10/13/23, 2:53 PM
I couldn't find anything novel the programmer wanted to try out in this language-- seems like they just want to capture the zeitgeist, and condense it into a simpler form.
It does make me wonder, how many other interesting languages are programmers toiling on out there? Wish there was a way to sort by newest repo, but this does start revealing some interesting underground langs:
https://github.com/topics/programming-language?o=desc&s=upda...
by lifeisstillgood on 10/13/23, 11:44 PM
by dindobre on 10/13/23, 4:08 PM
by twism on 10/13/23, 4:58 PM
11 var t = test {
---------------------------------------------
Should the variable `t` be `foo` here? ---------------------------------------------
12 list = [1, 2, 3, 4, 5]
13 }
14
15 var (l, err) = foo.list[8]
by gsuuon on 10/13/23, 3:39 PM
It doesn't look like Nature has ADT's, is that true or just missing from the docs?
by Willamin on 10/13/23, 3:46 PM
The description of the Fibonacci example seems incorrect, but I might be misunderstanding something about the language.
> A fib evaluation function was defined using recursion.
> The result of the function call was assigned to a variable named "result" and format the output using fmt.printf
import fmt
fn fib(int n):int {
if n <= 1 {
return n
}
return fib(n - 1) + fib(n - 2)
}
fmt.printf('fib result is %d', fib(30))
No variable named "result" is ever defined, right? Maybe the description is outdated from a time when an intermediate variable was present.by agentultra on 10/13/23, 2:56 PM
Update: Ok, non-glib serious comment: the "joy" of programming is highly subjective and the author might want to consider a different byline to avoid confusion. A "creative" or "hobby" programming lanugage for "experimentation," might make the point better.
Personally I don't find much joy in C-like languages as they're all approximately the same to me... and the "joy of programming," is less about syntax than semantics and form.
by billfruit on 10/13/23, 2:57 PM
by ejstembler on 10/13/23, 10:03 PM
by teo_zero on 10/15/23, 2:11 AM
What I don't like is that there are more ways to declare what a name means. Variables:
var x = ...
int x = ...
And even functions: fn f()...
var f = fn()...
It makes reading someone else's code difficult. When I want to know what an identifier is, I scan the code until I find its declaration. I might do it manually or via some macros of my editor, but the fact that such declaration can appear in different forms makes things difficult.Besides, looking for the first time at a piece of code it's not immediately clear if an identifier is a type or a variable. Especially in constructs where a variable and a type appear separated by a =, which suggests they are of the same kind:
var box = rectangle {...
My personal preference to solve the two issues in one go would be to use : to mark the type (which could be omitted in case of auto inference) and make 'var' mandatory: var x : u8 = 27
var y : = 'hello'
var f : fn(int)->int = {
With : repurposed, it can't be used for the return type; I used -> as in other languages.Now a macro or reader looking for the declaration of x, y or f knows exactly what to look for. Now types can only appear after a : or the keywords 'type' and 'as' (unless the syntax of the latter elements is changed to 'type:' and 'as:').
And talking about 'as', its priority must be clarified:
z = a * -b as int
Does 'as int' apply to b, to -b, to the whole product, or to z?I like how easy it is to declare union or sum types with '|', but the need to use 'as' and 'let' after an 'if ... is' makes it clumsy. Lazy programmers, the ones that wouldn't check for NULL in C, will simply add a 'let' here and there and perpetrate Tony hoare's billion-dollar mistake.
Finally, I'd like to understand exactly how the parser handles new lines. It looks like they end a statement, but are ignored in other contexts.
by TeaDude on 10/13/23, 3:15 PM
Will definately give this a peruse.
by twism on 10/13/23, 5:05 PM
by dvektor on 10/14/23, 1:09 AM
I like the syntax.
by joshbuckler on 10/13/23, 4:17 PM
by spinal on 10/14/23, 10:01 AM
Was this inspired by another language? I don't recall seeing a language with the same (or very similar) syntax.
by endorphine on 10/14/23, 5:11 AM
by FrustratedMonky on 10/13/23, 2:58 PM
How is this more joyful than Rust Or Java or anything?
What is the key difference here that is about adding 'joy'?
Just not picking up on the sales case.
by hamdouni on 10/14/23, 10:35 AM
by raytopia on 10/14/23, 1:50 AM
by klausnrooster on 10/14/23, 2:21 AM
by sjm on 10/13/23, 4:15 PM
- what the hell is fmt? - what the hell is fn? - int? - n? - printf? what is f? - what is %d?
I know this probably isn't the crowd for this, but if my non-programmer friends curious about learning to code saw this they'd run for the hills. Sure this isn't a "learn to code" language, but a little verbosity is IMO not a bad thing: it is more humanist and can be self-documenting.
by fyzix on 10/14/23, 12:58 AM
by mock-possum on 10/13/23, 5:12 PM
by pif on 10/13/23, 2:50 PM
by riidom on 10/13/23, 7:49 PM
by Vaslo on 10/13/23, 5:36 PM
Let’s keep reinventing the wheel!