Live data from Hacker News

Beautiful Racket

beautifulracket.com

31–40 of 55 posts

Re: Beautiful Racket

#31
post #4

This looks like a very well-written, easy introduction to making simple, dynamic programming languages (not surprising given the author's writing background). But everyone writes about how to build these kinds of basic Forths, or Lisps, or reverse polish notation calculators. To be honest, once you've learned the basic technique, writing a toy dynamic language interpreter is pretty easy. Even adding a toy JIT isn't v…

Do you find "Types and Programming Languages" to be a slog?

Re: Beautiful Racket

#32
post #26

One of my favorite classes in college was designed around building a C-like language interpreter (not compiler, I know, but the syntax was C-like) in Racket. It was a fantastic, eye-opening experience. However, DrRacket the IDE was a huge pain for me. I often felt that what the language offered in power and sophistication, its development environment lacked.

I haven't used DrRacket for anything of any reasonable size, but I actually think it does pretty well. I was just asking some people on #racket about if DrRacket suites their needs for a development environment. I think it's interesting that a good number of Racket developers use DrRacket instead of emacs or vim, whereas other Lisps tend to favor (especially) emacs and vim. So my question is: What about DrRacket didn…

I'm not who you're asking the question to, but I dislike DrRacket because (when I used it last year) it took too long to load (iirc, intellij started up faster and they have to support a lot more features)

Re: Beautiful Racket

#33

Earlier quoted context omitted.

You can run racket as a console application and it can be run through emacs or standalone with any editor.

For sure -- but the class was taught using the IDE and it's what everybody ended up using. I felt kinda stuck with it.

The problem I faced was scrolling lags. I've heard it got much better with 6.3/6.4 release. Otherwise, it was pretty cool that you can see how data flows through your functions by just hovering mouse over identifiers, or see the coverage.

Re: Beautiful Racket

#34
post #32
post #26

Earlier quoted context omitted.

I haven't used DrRacket for anything of any reasonable size, but I actually think it does pretty well. I was just asking some people on #racket about if DrRacket suites their needs for a development environment. I think it's interesting that a good number of Racket developers use DrRacket instead of emacs or vim, whereas other Lisps tend to favor (especially) emacs and vim. So my question is: What about DrRacket didn…

I'm not who you're asking the question to, but I dislike DrRacket because (when I used it last year) it took too long to load (iirc, intellij started up faster and they have to support a lot more features)

The IDE i use (phpstorm) - i load it once, and it just sits in the background until i restart or logout. I can't see how load time is really a big deal? unless you're talking 5+ min?

Re: Beautiful Racket

#35
post #30

Earlier quoted context omitted.

This is the only time I've heard "datum" used outside the context of GIS.

Datum is the singular of data.

The singular of data would be a 1, to be pedantic.

Edit: Information is uncountable, so maybe data should as well be. Is that plural or singular? Yes, you can have sand and a grain of sand, but the grain is hardly sandy. A lone 1 is hardly, excuse the pun, dative.

Re: Beautiful Racket

#36
post #32

Earlier quoted context omitted.

I'm not who you're asking the question to, but I dislike DrRacket because (when I used it last year) it took too long to load (iirc, intellij started up faster and they have to support a lot more features)

The IDE i use (phpstorm) - i load it once, and it just sits in the background until i restart or logout. I can't see how load time is really a big deal? unless you're talking 5+ min?

It takes ~5 seconds on my macbook pro with just the standard set of tools installed.

Re: Beautiful Racket

#37
post #4

This looks like a very well-written, easy introduction to making simple, dynamic programming languages (not surprising given the author's writing background). But everyone writes about how to build these kinds of basic Forths, or Lisps, or reverse polish notation calculators. To be honest, once you've learned the basic technique, writing a toy dynamic language interpreter is pretty easy. Even adding a toy JIT isn't v…

> What I want more than anything is a guide written on the same level on how to build a toy statically-typed language, with algebraic data types.

The answers here might be useful: http://stackoverflow.com/questions/12532552/what-part-of-mil...

> Is there no very simple introduction on writing a simple ML, with type checking? Any recommended resources?

I'd recommend reading A. Field, P. Harrison, "Functional Programming". Despite the title, the book is about implementation techniques.

P.S. I keep suggesting to everyone interested in implementing type systems to use a very simple technique: find an embeddable Prolog compiler for your language of choice (e.g., MiniKanren for Racket), and then simply emit a flat list of Prolog equations out of your source language AST (do the lexical scoping pass first). Easy. And easily extendable to dependent typing and all that fancy stuff.

Re: Beautiful Racket

#38
post #35
post #30

Earlier quoted context omitted.

Datum is the singular of data.

The singular of data would be a 1 , to be pedantic. Edit: Information is uncountable, so maybe data should as well be. Is that plural or singular? Yes, you can have sand and a grain of sand, but the grain is hardly sandy. A lone 1 is hardly, excuse the pun, dative.

'data' comes from latin, and 'data' is plura.

the singular is 'datum'.

In Italian (the direct descendent of latin) there is both singular and plural for datum (singular: 'dato', plural: 'dati')

Re: Beautiful Racket

#39
post #10
post #6

Earlier quoted context omitted.

Are you looking for general references on implementing type checkers and ML-like languages? Or how to implement those as languages in Racket specifically?

Either or any would be great, particularly if they're online and not books (although I'd buy a good book that covered those topics in depth). Particularly an approachable intro to Hindley-Milner and building a toy/mini-ML, and type checking in general. All the better if it's in Racket, or some ML. Actually, do you know of any examples of ML-type languages, or any statically-typed languages, that are written in Racket…

Not in Racket, but still a Lisp: https://github.com/combinatorylogic/mbase/tree/master/src/l/...

Re: Beautiful Racket

#40
post #17
post #4

This looks like a very well-written, easy introduction to making simple, dynamic programming languages (not surprising given the author's writing background). But everyone writes about how to build these kinds of basic Forths, or Lisps, or reverse polish notation calculators. To be honest, once you've learned the basic technique, writing a toy dynamic language interpreter is pretty easy. Even adding a toy JIT isn't v…

Pierce's Types and Programming Languages ( https://www.cis.upenn.edu/~bcpierce/tapl/ ) is great - I'm working throught it now. Its goes through both untyped and statically typed languages. It also goes into how to implement these things in OCaml.

Yeah, I think I'm going to have a break down and shell out the dough for Types and Programming Languages. It's exactly what I need now.
Post reply on HN