Humanitarian crisis in Bangladesh Show more
A student group affiliated with the government of #Bangladesh has responded to a (mostly? some vehicles were vandalized apparently) peaceful student protest for traffic safety with violence (attacks on protestors, rape, and attacks on journalists). The government has blocked Internet access. The situation is developing, so some claims put out may be incorrect.
TIL of K-normalization. How is this different from A-normalization (to ANF)? https://godoc.org/github.com/rhysd/gocaml/mir http://esumii.github.io/min-caml/tutorial-mincaml-9.eng.htm
Gah! Does #Menhir no longer insert annotations in the generated code that map locations to grammar file source locations? I'm migrating to the new syntax and have a type error that points to some location in the generated code...
Apparently, #Menhir got a new syntax... I wonder if the old syntax still works; I'll update the package later and see.
I have to read a Java textbook for school, and in today's reading, I read:
"It is usually not good practice to use more than one return statement in a method. In general, the return statement should be the last line of the method body."
This claim is utter crap. Early returns can make the logic much clearer than that of, say, a gratuitous "ret" variable.
Hmm, I want my programming language implemantation to run on the web via js_of_ocaml. Should I write my own interpreter, emit JS and use eval (if eval is unsafe here, then the compiler is unsafe, right?), or pull in the Wasm package, emit Wasm, and either use the built-in VM or the browser implementation?
Will the Wasm package work on the web or will treating ints as JS numbers break things...?
Anime Show more
This is a line from that new "bunny girl" anime... 🤔
https://github.com/xavierleroy Xavier Leroy isn't an Inria researcher anymore?
(His GitHub profile states that he isn't now.)
In A-Normal Form, can the let binding RHS be a let expression? I've seen some definitions that allow it and some that don't... In particular, http://matt.might.net/articles/cesk-machines/ allows it but still makes the exp/cexp distinction, even though the exp and cexp definitions can be combined if the RHS can be an exp.
Compare that definition with this one that doesn't allow the RHS to be a let expression: http://matt.might.net/articles/a-normalization/
evaluation order and laziness or strictness. Therefore, I think that pure functional programming might have a niche in educational programming languages. However, apparently people who learned Haskell as a first language had difficulties with imperative languages, and all mainstream languages are imperative. Should an educational programming language teach about mutation? (SICP covers mutation, after all!) Would having something like ST be enough? IMO a problem with mainstream teaching (cont.)
programming complements Bret Victor's recommendations in an interesting way. State passing is explicit as one does not change some hidden global state, as Bret Victor criticizes in Processing's graphics API, but rather passes fresh values reflecting the new information. In pure functional programming, the control flow that Bret Victor recommends be explicit is instead completely abstracted away; code is merely a mathematical description and aside from _|_, output is independent from (cont.)
in the back of my mind. A while later, I submitted the Scratch-influenced GP language to r/programminglanguages, and another person lamented that it was "yet another language that visualizes the wrong thing," linking to http://worrydream.com/#!/LearnableProgramming, how I first found about Bret Victor. In Learnable Programming, Bret Victor recommends making time, state, and control flow explicit and visual. I'm at the point where I need to think about IO for my language. I think that pure functional (cont.)
Over the past few months, I've been working on an ML dialect. My original idea was to make an educational programming language, like Scratch but better informed by PLT, as I believe that Scratch gets "wrong" the fundamental ideas of programming that it should be teaching. On r/programminglanguages, another person advised me not to belittle the user, but to make a PL that I would use myself. So, now I've been treating my language as a general-purpose one, keeping the purpose of education (cont.)
FP is good | OCaml is best lang | Modern C++ is good | Static typing > Dynamic typing | Weeb trash | Former ATer
functional.cafe is an instance for people interested in functional programming and languages.