Jay Taylor's notes

back to listing index

Show HN: My "weekend" project, an ML dialect and compiler | Hacker News

[web search]
Original source (news.ycombinator.com)
Tags: news.ycombinator.com
Clipped on: 2013-02-13

Image (Asset 1/3) alt=
Image (Asset 2/3) alt= Beautiful language, congratulations.

- Pattern matching is a sexy feature that is way needed in compile to JS languages

- Using an actual lambda character is way badass.

- Same goes for the inbuilt PhantomJS & Closure support

- I like these cute type definitions: (Num | String) -> String.

- Tail recursion f-yeah

- I agree with other poster about "hard to google". Not to be a "backseat brander", but something like forml has the ML in there as a shoutout as well as being easier to find.

- I like that even though you are compile-to-JS, you are not "of" JS. Pragmatic, yet forward-thinking.

Do you see take any hints/inspiration from other coffescript compilers (livescript, icedcoffeescript, contracts, etc.)? I do like how livescript has a standard prelude and you might want to consider that [edit: on closer read, just saw you do have a prelude. F-yeah again].

Also, does implementing lazy/infinite lists/functions seem possible to you or is that a giant undertaking? [edit: again on read another doc, just saw you do have infinite sequences, so congrats on the completeness of your language.]

-----

Image (Asset 3/3) alt= Thanks for the feedback!

Forml is an awesome name! Mind if I potentially steal this idea?

-----

ludicast 79 days ago | link

Feel free. Look forward to seeing how this language progresses. Seems to have elements of all my faves.

-----

huhtenberg 79 days ago | link

Can you darken the text color to something like #444? Light weight of Lato in #777 is rather unreadable on Windows.

-----

lucian1900 79 days ago | link

The language looks nice, but this page is so extremely hard to read. Very light grey text on white background doesn't work.

-----

ajb 79 days ago | link

Yeah. (What happened to "page style" ->none in firefox?)

-----

rustc 79 days ago | link

Did you really write this in "one" weekend?

Excellent work!

Would you mind posting about how someone would go about getting from a "medium beginner" Haskell knowledge to implementing something like this?

-----

texodus 79 days ago | link

Not even close to one weekend - I meant "weekend" in the tongue-in-cheek sense that all good weekend hacks spill over into multiple years.

[Write yourself a scheme in 48 hours](http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_H...) was very helpful for seeing a compile interpreter at a high level, [Typing Haskell in Haskell](http://web.cecs.pdx.edu/~mpj/thih/) was a fantastic resource for implementing DHM - the NYC Haskell community was fantasically helpful as well. Best way to learn anything in Haskell, or any language IMO, is to just start writing it :)

-----

andrewcooke 79 days ago | link

cool. it looks like you've cleaned up the verbose syntax? what are you planning on adding that's new? do you support the whole module/interface hoohaa from sml? are you going to explore (given js target) prototype-based oo in some way? are you thinking of pulling in ideas from ocaml? or some cool new type hackery from haskell?

-----

texodus 79 days ago | link

I think the parameterized modules would be nice, and a natural extension since modules as implemented are technically "first class" - but I'm intentionally shying away from Haskell-level type checking. Ultimately, I'd like the type system to be more of a tool for preventing bugs, rather than a requirement to "prove" that your code is correct.

No current plans for any compiler level prototyping, but some of this could be accomplished via the existing type system - it would be nice to have some sort of record field unification/discrimination at the type level, to allow you to do something like `{ fields_1 } -> {fields_2 } -> { fields_1 && fields_2 }`, but I haven't thought this through entirely yet. Thanks for the feedback!

-----

radarsat1 79 days ago | link

This looks nice, I look forward to more discussion on it. Another hard-to-google progamming language name though :(

-----

z3phyr 79 days ago | link

Great Work!!!

-----

Oenotria 79 days ago | link

Looks nice!

-----




Lists | RSS | Bookmarklet | Guidelines | FAQ | DMCA | News News | Feature Requests | Y Combinator | Apply | Library

Search: