You're close to inventing monads! I did this once too for async reasons also, and it's how I wandered into the world of Monads and functional programming. I would definitely take a look at Scala's futures and what it means to be a monad. This is probably the best way to internalize them. :)
Re:Esoteric programming paradigms
by paulddraper on Monday May 01, 2017 @12:49PM
(#14239167)
Hm the terminators are much like shell, e.g.
# synchronous
sleep 1 ;
sleep 2 ;
# parallel
sleep 1 &
sleep 2 &
wait
wait
The results have to be files... in shell you think of the file system as your "variables", so everything is somewhat global.
Re:Esoteric programming paradigms
by randomguy1254 on Monday May 01, 2017 @05:31PM
(#14241864)
Interesting concept. The article mentioned that other languages determine blocking automatically based on usage of the variables. So in your example, it could be determined that x and y must be calculated first before pyth_distance is called with x and y. Would you incorporate this kind of automatic detection into your language? Why or why not, and to what level? Would it perhaps be safer for the language to determine blocks for you?
This reminds me of writing assembly for VLIW DSP chips,where each 'instruction' is actually several that run concurrently.
HDLs generally fit this paradigm. You might want to have a look at VHDL or Verilog.
Urbiscript is another spin on this idea, dedicated to robotics in this case. The development seems to have stalled but the ideas are really interesting.
Re:Esoteric programming paradigms
by aaron-lebo on Monday May 01, 2017 @12:43PM
(#14239110)
That's really cool.
Would you build something like this from scratch or base it on another tech stack like the jvm?
That's exactly what || (concurrent statements) and ; (sequential statements) do in Esterel.
Re:Esoteric programming paradigms
by aaron-lebo on Monday May 01, 2017 @12:53PM
(#14239201)
Thanks, was totally unaware of that. For the lazy and ignorant like me:
https://en.wikipedia.org/wiki/Esterel
(if you'd like to throw a link in your comment, would be happy to delete this one)
No need :) But I'll happily add this one, which is a nice short intro if you know nothing about it: http://www.embedded.com/design/prototyping-and-development/4...
I came in contact with the language during my studies (one of my profs worked on it), found it interesting, but haven't really had a chance to apply it to anything I've done professionally since. It's a very neat language though, and if I got to do anything in the embedded field.
I notice that there is now an open source compiler, which is great. The only implementation I was aware of so far was closed source.
Might try making a toy language out of it eventually.