6 ms·
F Natural – Putting the fn back in functional
- weberc2 8y agoI've wanted something like this for quite a long time. I've spent quite a bit of time trying to grok OCaml, Haskell, and Lisp syntaxes, and I've never gotten to the point where I "see past the syntax". Even if you like these languages and their syntaxes, you should be excited about projects like these which help to bridge the cognitive gap between mainstream imperative languages and functional languages--more people getting exposure to functional ideas is a good thing for you--learning syntax and functional concepts in tandem is more difficult than the sum of the constituent parts. EDIT: Sadly, this project hasn't been touched in 2 months.
- totalperspectiv 8y agoIf you like his stuff, I've been working through a book he wrote about implementing scheme, which has been very helpful in understanding the why's of lisp. http://billhails.net/Book/front.html http://billhails.net/Book/front.html
- specializeded 8y agoOooooooh, have you heard of Reason[1]? It’s an algol-ish interface for OCaml, supported and used by FB as well! Also interops with JS (and has superb bindings for React) so immediate results/learning are very easy to get. [1] - https://reasonml.github.io https://reasonml.github.io
- sattoshi 8y agoIt doesn't have bindings for redux. I really wanted to like it but without redux, it's not practical enough with so few bindings. The messenger people don't know what to do about that either, really. I really like the language though so it's a shame.
- lilactown 8y agoWhat is it about Redux that you need?
- sattoshi 8y agoI need a store layer which scales. Mobx could work too, but reason would work more naturally with redux.
- phillipcarter 8y agoHave you taken a look at Fable? There's a React-Redux sample here: http://fable.io/samples-browser/ http://fable.io/samples-browser/ But the real zen of Fable is using fable-elmish, which is a UI library that (like Elm) focuses on message passing. It's super elegant. Good sample app doing nontrivial stuff: https://github.com/SAFE-Stack/SAFE-Chat https://github.com/SAFE-Stack/SAFE-Chat (Bonus is that it's full-stack F# :))
- weberc2 8y agoI have! Sadly it’s native compilation story was pretty poor last I checked. Mostly it seemed like the primary target was bucklescript. There were other issues as well.
- disqard 8y agoAh, until I read your"EDIT", I was about to ask the creator why the following binding ends in a semicolon: define y = 12; but the following one does not: define fn(x) = { ... }
- afranchuk 8y agoOf particular interest in this language is the "then" and "back" syntax [0]. It looks like a somewhat different take on iterators, which I can see being more "readable" in certain situations. I haven't had a chance to try it out, but it seems like it may allow for some interesting behaviors. [0]: https://github.com/billhails/PyScheme/wiki/Then-and-Back https://github.com/billhails/PyScheme/wiki/Then-and-Back
- piinbinary 8y agoIt feels something like a generator that has been hoisted up into the language so that it acts like a single value (which defaults to the first element in the generator).
- sitkack 8y agoIt was first written in Perl so that makes sense.
- FPGAhacker 8y agoCan someone explain https://github.com/billhails/PyScheme/wiki/Here https://github.com/billhails/PyScheme/wiki/Here ? The example warped my brain a little.
- bjoli 8y agoIt is just call/cc from scheme. Here calls a function with the current continuation which means you can either do an early return, like the example where they "replace" the current continuation with the value 3. In scheme you can save that continuation and return to it as many times as you want, which people from other languages have a hard time to wrap their head around. I'm rather sad that they chose to implement undelimited continuations, since that is almost never what you want. First class continuations are a fantastic tool in your language. They can be used to implement coroutines, fibers, nondeterminism and so on. Really no surprise that they are a part of scheme, which usually pick a few well thought out primitives that combine into nice high level abstractions.
- atrilumen 8y agoI never get it when I see things like this (Reason, etc). I love the ML flavored syntaxes. Elm really seems the nicest to me.
- daveyy2222 8y agoFirst written in Perl?
- ChristianGeek 8y agoF natural is a cute name, but F# will always be a half step above.