Live data from Hacker News

A Friendly Introduction to Racket

geometridae.bearblog.dev

171–180 of 195 posts

Re: A Friendly Introduction to Racket

#171
post #37
post #2

any time the topic of racket comes up, i wonder if there are any interesting apps i could explore. but all i find is libraries and dev tools: https://awesome-racket.com/

You can ask Claude to write you some.

Are you suggesting, possibly, that a team of 10x Lisp hackers with 10x agent force multipliers could catch up with the depth and bread of Python's CheeseShop and proceed to right the world?

Re: A Friendly Introduction to Racket

#172

Earlier quoted context omitted.

But I can use custom DSLs using macros in Rust or template Haskell. In Lean 4 you can even add grammar to the Lean parser. I feel like the good parts of lisps have been adopted by typed languages...

Absolutely. You can thank Lisp for paving the way. And in a way, those languages are part of the extended family.

[deleted]

Re: A Friendly Introduction to Racket

#173

> no special syntax for anything. (list '(1. . #\#) -5/6+7.s-8i `(1 ,@2) 1@1 ;hmmm, no unquote splicing comma ;-) 10# ;surprised? (list #i+1 +1i 1+i) ;complicated or complex? #e-1e10i ;Old MacDonald? "(* 9 10)" #())

Isn't at least one of them undefined? `(1 ,@2) It's always surprising to me how many things Scheme leaves undefined. Other examples are evaluation order (in some rather surprising places) or the value of: (make-bytevector 4)

Racket defines an evaluation order for function arguments (left to right).

Re: A Friendly Introduction to Racket

#174

Earlier quoted context omitted.

Why are they then even setting up vanilla Emacs in particular? Not impossible, of course, but it seems like a strange choice to make when not wanting to engage with its configuration. Or maybe another question would be who set them up with vanilla, unconfigured Emacs, if they are not so technical users? Even discovering tramp is not trivial or automatic and for working on a remote machine, isn't Vim much more common?

Emacs is just there in their environment. They didn't set anything up. > Even discovering tramp is not trivial or automatic and for working on a remote machine, isn't Vim much more common? Full confession: I, as a power Emacs user don't use tramp. It's ok not to. I know people disagree with me, but for the most basic editing Emacs has virtually no learning curve compared to Vim. You just open the file and start typin…

What kind of environments are these? I can't say I have ever encountered emacs in the wild. The only people I have ever met who run emacs did it as an explicit decision because they wanted the malleability.

Even having emacs just there in their environment, most people would avoid it because they don't know what it is, and will open Notepad or TextEdit or whatever familiar program is at hand.

Re: A Friendly Introduction to Racket

#175

Earlier quoted context omitted.

But I can use custom DSLs using macros in Rust or template Haskell. In Lean 4 you can even add grammar to the Lean parser. I feel like the good parts of lisps have been adopted by typed languages...

Absolutely. You can thank Lisp for paving the way. And in a way, those languages are part of the extended family.

The difference is in complexity.

McCarthy has said Lisp was not initially patterned on the lambda calculus, but he borrowed its syntax. Much later at MIT, after teaching a predecessor to 6.001 on LC, GJS and his student GLS distilled Lisp to a language that had the semantics of LC plus extensions for mutation and IO to make it practical, creating the elegant minimalist language Scheme. Macros were used to make tighter, neater, more expressive code.

https://wiki.c2.com/?LambdaCalculus

https://research.scheme.org/lambda-papers/

Someone please correct this bold statement: Every advancement in programming languages since then can be implemented in Scheme. (See the explosion of experiments using Racket -- typed variants as example.)

It was politics, inertia/"tech debt", established tastes, and ego/NIH that lead to the farrago of languages (partially derived from Lisp) that we have nowadays, but none are as simple, flexible, and versatile as Scheme/Racket.

Re: A Friendly Introduction to Racket

#176

Earlier quoted context omitted.

Isn't at least one of them undefined? `(1 ,@2) It's always surprising to me how many things Scheme leaves undefined. Other examples are evaluation order (in some rather surprising places) or the value of: (make-bytevector 4)

Racket defines an evaluation order for function arguments (left to right).

Specifically section 4.3.1

https://docs.racket-lang.org/guide/application.html#(part._....

Re: A Friendly Introduction to Racket

#177

Earlier quoted context omitted.

I've helped such people with their configs. They just know it as "commands" they put in the init file - they don't think of it as a programming language. It's rare for simple init.el files to have things like functions, loops, etc. And, to be frank, most of them don't customize the init.el file. They just want a text editor - not an IDE. The defaults are ugly , but they're perfectly functional. None of these people c…

Why are they then even setting up vanilla Emacs in particular? Not impossible, of course, but it seems like a strange choice to make when not wanting to engage with its configuration. Or maybe another question would be who set them up with vanilla, unconfigured Emacs, if they are not so technical users? Even discovering tramp is not trivial or automatic and for working on a remote machine, isn't Vim much more common?

Vim (and Vi in general) make vanilla emacs seem sensible and approachable.

Re: A Friendly Introduction to Racket

#178
post #33

Earlier quoted context omitted.

> Wtf kind of intro to a programming language doesn’t include syntax rules? PP could have been more clear and say syntax-rules (note the dash), which means macros. Macros are usually considered an advanced topic.

Thanks for the clarification! It makes much more sense seeing the term "macro".

[flagged]

Re: A Friendly Introduction to Racket

#179
post #113
post #109

Earlier quoted context omitted.

I quite intentionally said "within the language" to preempt nonsense like "Of course, you can. C is perfectly capable of writing C interpreters and compilers."

What does 'within the language' mean? Is the standard library part of the language? Would a variant of C that came with an interpreter in the standard library (but no other changes) count as homoiconic?

[deleted]

Re: A Friendly Introduction to Racket

#180

Earlier quoted context omitted.

Emacs is just there in their environment. They didn't set anything up. > Even discovering tramp is not trivial or automatic and for working on a remote machine, isn't Vim much more common? Full confession: I, as a power Emacs user don't use tramp. It's ok not to. I know people disagree with me, but for the most basic editing Emacs has virtually no learning curve compared to Vim. You just open the file and start typin…

What kind of environments are these? I can't say I have ever encountered emacs in the wild. The only people I have ever met who run emacs did it as an explicit decision because they wanted the malleability. Even having emacs just there in their environment, most people would avoid it because they don't know what it is, and will open Notepad or TextEdit or whatever familiar program is at hand.

A lot of engineering companies have Linux accounts you log in to. The employees' laptops are Windows but a good amount of engineering work is in Linux. Hence they SSH in and do their work. These accounts are managed by IT. They pre install all these tools.
Post reply on HN