7 ms·
Beautiful Racket
- jbeja 11y agoThis is the only sane way to reduce complexity in your programs.
- giacomone 11y ago> If a datum sounds like a syntax object, that’s no coincidence — a syntax object is just a datum with some extra information attached. The #' prefix notation we used for a syntax object now connects logically: we can think of the # as representing the extra info that gets attached to the datum This is not clear, can someone explain please?
- samth 11y agoNot sure which part isn't clear. First, syntax objects are data, but with extra information, such as binding information, source location, etc. Second, the #' form (written out it's called `syntax`) is similar to the ' form (written out as `quote`). But the first one includes the extra information to make a syntax object. Also, it has an extra character, which the chapter points out can be seen as going along with the extra information.
- giacomone 11y agoGot it, thanks!
- analognoise 11y agoThis is why I wish I could ask comments about books without going to Stack Overflow. Is there a publishing system that allows you to put up a work as it is being produced and solicit input from people on what they find unclear?
- Nadya 11y agoGitbook. I've used it for two small (unpublished) books. https://www.gitbook.com/ https://www.gitbook.com/ E: I may have misparsed your question, upon re-reading it and had an overly liberal understanding of "solicit feedback". Apologies in advance if my answer isn't quite up the alley you were looking for.
- omaranto 11y agoThe book Real World Haskell was written using such a system. I don't know what system they used, though. It let you attach comments to a specific paragraph.
- justinhj 11y agoI've bought a couple of books on the manning early access program and been very satisfied https://www.manning.com/meap-program https://www.manning.com/meap-program
- elviejo 11y agoLeanpub.con It integrates with git and is pretty simple to use.
- peatmoss 11y agoThis is the only time I've heard "datum" used outside the context of GIS.
- eru 11y agoDatum is the singular of data.
- conceit 11y agoThe 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.
- znpy 11y ago'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')
- conceit 11y agothat's totally ignoring what I said. I hope you feel smug about it. Edit: Interestingly, wiktionary says informations is just uncommon, and that information is not data, it's the meaning of data, in the computing context. ... with source. It links to a paper about an ISO standard, no less, that tries to define vocabulary and happens to use data as singular. Document Reader [is a] Character reader whose input data is the text from specific areas on a given type of form [1]. (This makes me so happy right now.) Overall, if it's a technical term they invented, the authors are free to name their language construct whatever they want. But if it's so fudged that the author even writes datums ... I rest my case. [1] https://www.iso.org/obp/ui/#iso:std:iso-iec:2382:ed-1:v1:en https://www.iso.org/obp/ui/#iso:std:iso-iec:2382:ed-1:v1:en
- dTal 11y agoIn Latin. In English "data" is a mass noun. Nobody really says "data are" unless they're writing an academic paper.
- jnbiche 11y agoThis 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 very hard, and there are multiple guides online on how to do this using Luajit, or Libjit, PyPy, or LLVM, etc. 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. And even better, some basic discussion on how to learn about implementing advanced techniques like refinement, or linear, or dependent types (I realize these are extremely complex topics). Every discussion I find on these topics is in dense academic papers. I'm slowly making headway, but it's a slog. The only good resource I've found so far (and it's an excellent one) is Andrej Bauer's Programming Languages Zoo. But as far as I know, it's all (very helpful and instructive) source code, with no accompanying tutorials. Is there no very simple introduction on writing a simple ML, with type checking? Any recommended resources? It's possible that Butterick intends to cover these topics in later chapters, in which case I can't wait to read the book.
- samth 11y agoAre you looking for general references on implementing type checkers and ML-like languages? Or how to implement those as languages in Racket specifically?
- jnbiche 11y agoEither 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, aside from Typed Racket itself? Is looking at the Typed Racket code instructive? (I should just take a look)
- 11y ago
- ivraatiems 11y agoOne 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.
- zitterbewegung 11y agoYou can run racket as a console application and it can be run through emacs or standalone with any editor.
- ivraatiems 11y agoFor sure -- but the class was taught using the IDE and it's what everybody ended up using. I felt kinda stuck with it.
- truncate 11y agoThe 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.
- harrisi 11y agoI 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't seem like enough for your project?
- zodiac 11y agoI'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)