Live data from Hacker News

Why learn Racket? A student's perspective

micahcantor.com

51–55 of 55 posts

Re: Why learn Racket? A student's perspective

#51

Earlier quoted context omitted.

>it's not true that using an explicit stack takes "a lot more code" (it's like, three extra lines) I don't know if you mean that literally or just as a rhetorical exaggeration, but it's absolutely false. The first example that came to mind is Quick Sort, search for the iterative version of the algorithm and compare it with the traditional recursive version, easily a 10x factor. The increase in complexity isn't linear…

Do you have a source for the embedded systems safety regulations bit? I was under the impression that governments had neither insight nor competence to decide such matters.

The regulation I was thinking of is MISRA[1], a very popular piece of convention that is used and referenced in, among other things, the JSF program (F-35 fighter airplane), the Jet Propulsion Laboratory (NASA), and AutoSar (another standard for embedded system in automotives).

From [2] (2012 version) (warning : annoying ads and misleading download button takes you to registration, but it's the only free source I could find with detailed rationale in each rule) :

Rule 15.5 : A function shall have a single point of exit at the end

Rule 21.3 : Memory allocation and deallocation functions of shall not be used.

From [3] (2004 version) (pdf) :

Rule 14.7 : [Same as Rule 15.5 of [2]]

Rule 20.4 : Dynamic heap allocations shall not be used

[3] is a pdf containing the 2004 version of the conventions, but no rationale is given for each rule.

>governments had neither insight nor competence to decide such matters.

On the contrary, things like banks, medical devices, aerospace and defense are heavily regulated by the government, source code is just another component in the whole system, why shouldn't it be regulated like hardware ?

As for competence, the government is not all bureaucrats and officials, they can hire specialists to do their inspections.

[1] https://en.m.wikipedia.org/wiki/MISRA_C

[2] https://www.academia.edu/40301277/MISRA_C_2_012_Guidelines_f...

[3]https://www.google.com/url?sa=t&source=web&rct=j&url=https:/...

Re: Why learn Racket? A student's perspective

#52
post #41

So... unless Grinnell does things very differently, the author did not learn Racket, they learned (Beginning/Intermediate/Advanced) Student Language, and that's the point. Racket is a complicated language, designed primarily in order to support the easy creation of other languages: it would be as bad a choice (perhaps worse) for a first language as any other. All of the simplicity, focusing on learning to program, pr…

Fair point although I feel like Racket deserves credit for the way it builds upon itself. By design it allows you to have the Student Languages that are each iterations upon the previous, and all are valid Racket programs. As a counter-example you can't do much of anything in Java without introducing class and public-static-void-main-string-args.

I think this still, somewhat, misses the point.

Sure, Racket has facilities to make implementing languages easier (that's the whole point), but that simply makes it _easier_ to implement BSL, etc. I could certainly, with more effort, implement BSL in Java or in any other language: the language that students are using really has nothing to do with the _host_ language. Things are somewhat confused by DrRacket (or, made simpler, depending on your perspective); the IDE is somewhat mixed up with everything else, but again, this functionality can and does exist in other editors: I could implement a mode for my BSL implemented in Java in, say, VS Code, with comparable features to DrRacket.

Or, to take a completely different tack, implement the IDE via the web a la WeScheme or, if you want an actual concrete example of something that isn't Racket hosted, Pyret.

Re: Why learn Racket? A student's perspective

#53
post #41

Earlier quoted context omitted.

Fair point although I feel like Racket deserves credit for the way it builds upon itself. By design it allows you to have the Student Languages that are each iterations upon the previous, and all are valid Racket programs. As a counter-example you can't do much of anything in Java without introducing class and public-static-void-main-string-args.

I think this still, somewhat, misses the point. Sure, Racket has facilities to make implementing languages easier (that's the whole point), but that simply makes it _easier_ to implement BSL, etc. I could certainly, with more effort, implement BSL in Java or in any other language: the language that students are using really has nothing to do with the _host_ language. Things are somewhat confused by DrRacket (or, made…

What would be the point of implementing BSL in Java? You'd still have to teach the basics of object oriented programming and all the details of Java's implementation... unless you abstract all that away to the point were you aren't teaching Java anymore. BSL being easy to implement isn't as important as BSL being a useful subset of Racket that's easy for students to understand.

Re: Why learn Racket? A student's perspective

#54
Comment unrelated to the article: I knew I know that blog theme from somewhere, turns out it is my own https://github.com/oltdaniel/dose theme. Thanks for using it. Hope you like it.

Comment related to the article: I always wanted to dive deeper into functional programming languages. Especially, because I more and more run into stuff, that is just simpler to model in a recursive pattern. Maybe I'll give it the a new try within the next weeks and see how far I come.

Re: Why learn Racket? A student's perspective

#55

Comment unrelated to the article: I knew I know that blog theme from somewhere, turns out it is my own https://github.com/oltdaniel/dose theme. Thanks for using it. Hope you like it. Comment related to the article: I always wanted to dive deeper into functional programming languages. Especially, because I more and more run into stuff, that is just simpler to model in a recursive pattern. Maybe I'll give it the a new…

Thanks! I do like that theme and I only made a few tweaks to it with some of the code styling and the header.

And I'd definitely recommend it, programming in FP languages has been a bit of an addiction for me.

Post reply on HN