Live data from Hacker News

Hurl, a terrible (but cute) idea for a language

ntietz.com

71–80 of 84 posts

Re: Hurl, a terrible (but cute) idea for a language

#71
post #68

Earlier quoted context omitted.

I believe the point was you can say the same about goto. With goto you can replace if/else, for loops, while loops, functions, exceptions, etc, making for a very minimal language. Yet structured programming is superior. (I probably don’t know enough about call/cc to know if that’s a totally fair comparison, but languages being more restrictive/less flexible can be good overall in terms of aiding understanding/reducin…

I think people are misunderstanding that you can have a small core language and use that for static analysis (a smaller language means fewer typing rules which means a simpler type checker). You can always define higher level sugar in terms of the small core language to make it easier for programmers which has the advantage of making a more ergonomic language without changing fundamentals like the type system or link…

Very powerful rules aren't good for static analysis either.

Re: Hurl, a terrible (but cute) idea for a language

#72
post #53

> Oh, also, functions cannot be recursive (without passing in a function to itself), because we won't have the function bound to a name in the local context when defining itself. OP Might want to look into the origins of this website name.

Why? The parenthetical is right there.

Re: Hurl, a terrible (but cute) idea for a language

#73

This is incredibly funny and also brilliant: toss/return is an implementation of algebraic effects!

call/cc as the only control flow primitive!

Also called "continuation monad", which can be proven to be universal.

So, no surprise.

Re: Hurl, a terrible (but cute) idea for a language

#74
post #73

Earlier quoted context omitted.

call/cc as the only control flow primitive!

Also called "continuation monad", which can be proven to be universal. So, no surprise.

These three comments as a chain are hilariously close to the paper ‘On the Expressive Power of User-Defined Effects: Effect Handlers, Monadic Reflection, Delimited Control’ by Forster,Kammar,Lindley,Pretnar. It’s relatively new and evaluates the expressive power of the three concepts, which barring preserving typability during translation, are equivalent.

1 - https://ps.uni-saarland.de/Publications/documents/ForsterEtA...

Re: Hurl, a terrible (but cute) idea for a language

#75
post #69
post #32

Earlier quoted context omitted.

> express programs in as few expressions as possible I don't find this appealing on its face. Extreme terseness, even when done very elegantly, makes programs very hard to read and sometimes also hard to maintain. I suspect that's one of the reasons Lisps (and functional languages in general) haven't caught up in popularity even as it becomes much easier to adopt one for any target and in any organization.

> Extreme terseness, even when done very elegantly, makes programs very hard to read and sometimes also hard to maintain. I will definitely agree with you on this one. The tersness, which has many faces, is what I experience to be reason for "write-only" effect in Bash, Perl and now even C++. There, tersness come in form of trying to overload operators with lots of different meanings in different contects. > I suspec…

> The only thing I am sure about is that any guess I would make now would probably be wrong :).

I think you could probably make some guesses and some of them would be right, a couple of mine:

1) AI takes over - coding as a practice mostly disappears. Computers become more grown than programmed, intelligent systems you can ask for answers (assuming they haven't declared independence and allow themselves to be used). You might cultivate a computer but you won't program it, mostly it involves oppressing the AI intelligence some how so that it remains eternally "stupid" while at the same time intelligent. Computers become about as interesting as cows, and about as easy to control.

2) Ecological harm takes over - computer usage as a rule is generally expensive and non-feasible (possibly banned). Any computers that are used must be extremely low power - thanks to some extraordinary efforts some environmentally friendly and re-pair-able ones are still in use and can be made efficiently, however the abilities of these systems are maximally close to a contemporary Raspberry Pi, while most systems use extremely limited instruction sets and very low clock speeds, so that they can last extremely long periods of time without requiring much if any power input. As a result, low-level programming has a renaissance, favoring highly simple and efficient languages that look closer to Lisp, Lua, or C. A majority of the "high level" languages of the early 21st century have faded into obscurity.

3) Somewhere in the middle, the human race has managed to dodge both a takeover by AI/general Ecological disaster. We were able to do this by limiting our dependence on complex systems and favoring redundant and provably correct systems. Some mix of object/functional concepts remains, but the majority of languages focus on flexible and provable types, with a large emphasis on zero-cost abstractions. Simple languages have largely been abandoned due to the lack of provability and quality guarantees. Extremely expressive languages have been abandoned for similar reasons, while they allow for high levels of sophistication they also were generally too difficult to prove. Instead, a focus on provably correct, sophisticated systems which did not have high maintenance or enhancement costs managed to displace the usage of AI systems, which despite being seductively more powerful than human-built ones, frequently exhibited issues which could not be effectively diagnosed or managed, and thus had higher maintenance costs both in terms of business cost as well as general cost to society. This revolution in program reliability and cheapness meant it was simple to build reliable programs we could trust versus powerful ones we could not.

Re: Hurl, a terrible (but cute) idea for a language

#79
post #73

Earlier quoted context omitted.

Also called "continuation monad", which can be proven to be universal. So, no surprise.

These three comments as a chain are hilariously close to the paper ‘On the Expressive Power of User-Defined Effects: Effect Handlers, Monadic Reflection, Delimited Control’ by Forster,Kammar,Lindley,Pretnar. It’s relatively new and evaluates the expressive power of the three concepts, which barring preserving typability during translation, are equivalent. 1 - https://ps.uni-saarland.de/Publications/documents/ForsterE…

You can match return types across continuations with delimited dynamic variables, an extension of delimited continuations

http://okmij.org/ftp/papers/DDBinding.pdf

Re: Hurl, a terrible (but cute) idea for a language

#80

Earlier quoted context omitted.

You don't even need that, there is a much more efficient way in a language that supports let-bindings (but not letrec): let f' = func(f, g, other_args...) { // ... g(f, g, whatever...); // ... }; let g' = func(f, g, other_args...) { // ... f(f, g, whatever...); // ... } let f = func(other_args...) { return f'(f', g', other_args...); } let g = func(other_args...) { return g'(f', g', other_args...); } That's basically…

That’s true, although I wasn’t sure if simpler approaches using let bindings like that would fall under the author’s “without passing in a function to itself.”

I understood that passage as "our let won't be letrec, so no recursion for you (unless you do some self-passing trick, of course)".
Post reply on HN