TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Racket: Lisp for the modern day

268 点作者 Decabytes将近 2 年前

17 条评论

NickNaraghi将近 2 年前
The fundamentals of CS courses in my undergrad program were taught in Racket (with HTDP). At the time this seemed very impractical, because I already knew Java and just wanted to write useful apps.<p>But as I&#x27;ve progressed in my career, I&#x27;ve come to appreciate how it helped me develop a strong foundation for reasoning about programs and their underlying logic (in any language) that continues to serve me to this day.<p>If I was approaching this outside of a structured curriculum, it would be hard for me to justify this long-term intangible benefit relative to being able to move quickly to write something interesting and useful. And I think writing interesting and useful programs is the best way to motivate oneself to keep programming. So I can&#x27;t strongly advocate for this approach. But I do think there are some worthwhile benefits.
评论 #36521807 未加载
评论 #36523705 未加载
评论 #36522360 未加载
tgbugs将近 2 年前
I&#x27;ve been using Racket for about 8 years now, and it is now my goto language for anything that needs a gui. It took writing 3 or 4 not-so-little guis to feel comfortable working with Racket&#x27;s object system, but now it basically goes at the speed of thought.<p>Lately I&#x27;ve been using Racket to prototype the interaction design for a game, and I had written some placeholder text. I had put fake interpolation in for {player-name} and things like that, and then I realized that #lang at-exp would let me just ... do that, as described in the original article.<p>I had to laugh, because I maintain a bunch of Python code, and if Python has batteries included, Racket comes with a retrofittable fusion battery pack.<p>One other little anecdote, is that I&#x27;ve been porting an old plt-scheme codebase to Racket CS. In the second phase I have started replacing an ancient C++ rendering layer with the racket gui canvas functionality. During the process I moved hundreds of runtime type checks in the C&#x2F;C++ layer to the Racket contract system. It was as if the Racket team had somehow secretly obtained access to the codebase I was working on and had designed the perfect abstractions to solve the problem.
评论 #36536313 未加载
评论 #36530046 未加载
maroonblazer将近 2 年前
I&#x27;ve started working through &quot;How To Design Programs&quot; and it calls for using DrRacket. It didn&#x27;t occur to me to see if there was support for Racket in VSCode. Per this article, there is, via extensions.<p>For anyone who has worked through HTDP: is there any benefit to sticking with DrRacket vs using VSCode? The friction involved in moving around in DrRacket really dampens my enjoyment of the material in HTDP.
评论 #36520535 未加载
评论 #36526026 未加载
iNerdier将近 2 年前
I’m slightly confused by the aim of this article. It goes out if it’s way to state in the first few paragraphs how approachable it is to newcomers, then dives into talking about how good it is at making, other programming languages.<p>How big a desire of the average neophyte is to make themselves another language?
评论 #36520031 未加载
评论 #36523566 未加载
评论 #36521028 未加载
评论 #36519928 未加载
评论 #36520514 未加载
评论 #36522757 未加载
评论 #36519990 未加载
评论 #36527959 未加载
评论 #36523921 未加载
评论 #36520150 未加载
markstos将近 2 年前
Looks great, but didn’t answer the question for me of why to learn this over TypeScript or Rust.<p>The answer seems to be in the title: this of particular interest for those already interested in Lisp or Scheme.
评论 #36521342 未加载
评论 #36521312 未加载
评论 #36521093 未加载
uneekname将近 2 年前
I love Racket, re-wrote my website in it and a few other projects. I&#x27;d call myself an advanced beginner, I guess.<p>&gt; Racket excels as a programming language for young learners and beginners.<p>I honestly think Racket could do more to be beginner-friendly. The documentation is excellent, but difficult to understand as a newcomer. There are some great little tutorials that are easy to work through, but the ramp from there to writing your own Racket programs is steep imo.<p>I don&#x27;t know of any other language with so many batteries included. Racket deserves to see community growth, and hopefully with that will come more resources for folks to get started
评论 #36523699 未加载
dizhn将近 2 年前
I am getting a weird rectangular box on this website that is not allowing me to read the article in peace. My assumption was they did want me to read it, but it doesn&#x27;t seem to be the case. It says &quot;Discover more from Deus In Machina&quot; on this box. I would maybe want to discover more except for 2 things, #1 it won&#x27;t let me read the current thing, #2 i don&#x27;t know that other things will let me read it either.<p>I think they should fix this quite obvious bug before writing more articles.
评论 #36520348 未加载
评论 #36520317 未加载
评论 #36521362 未加载
评论 #36520464 未加载
评论 #36520342 未加载
theanonymousone将近 2 年前
Isn&#x27;t Clojure the literal &quot;Lisp for the modern day(a.k.a JVM)&quot;?<p>I hope I don&#x27;t get kicked out of HN altogether for this comment :)
评论 #36519993 未加载
评论 #36520178 未加载
评论 #36519937 未加载
评论 #36520105 未加载
phtrivier将近 2 年前
&quot;It can generate an executable&quot; ; but how slow will this executable be ? Compared to something compiled with SBCL or a non-LISP ?
评论 #36519773 未加载
评论 #36519769 未加载
评论 #36519729 未加载
评论 #36519738 未加载
评论 #36519697 未加载
bmitc将近 2 年前
I really wanted to dive into Racket a few years ago and still really like Racket. But this is when they switched focus to the Rhombus project, which killed a lot of interest and personal momentum I had going for Racket. It has also become clear that Racket&#x27;s maintenance core is too academic. I don&#x27;t think Racket is too academic, but by the very nature of Racket&#x27;s primary community being professors and graduate students, it means there is a very small core team with a lot of the interest and use outside of that core being shortlived as students go through PhD programs. There are a few nonacademic core members, but there are few.
评论 #36522659 未加载
patrec将近 2 年前
&gt; Racket is probably the finest example of a modern day lisp bar none<p>It&#x27;s not. There are several nice and unique things about Racket, but it&#x27;s a pretty poor example of a lisp, to the extent that if you want to understand what&#x27;s good about lisp you&#x27;d probably be better off learning emacs lisp than racket.
评论 #36527834 未加载
singularity2001将近 2 年前
They call #hash[(a . b)] modern? Maps should be a first class citizen with first class syntax and not ... that.
zsh_89将近 2 年前
As a pretty experienced programmer, who make a living by writing code for almost 10 year(with a CS master degree), I would like to say something to new learners of CS who need making money by CS skill in the future:<p>+ almost everything related with LISP is fun<p>+ but they have VERY limited use in industry, for very good reason;<p>+ you should try spend at least same amount time (as on LISP topic) to learn something like leetcode(or even higher level of competitive programming, which improve your skill of converting your idea to code fast and basic math thinking; useful in interview), job-oriented CS book. You&#x27;ll be a better problem-solver and more ready in job market.<p>+ If you&#x27;re very sure you will be financially OK, just learn anything you like and ignore this message.
评论 #36526943 未加载
评论 #36521741 未加载
评论 #36525672 未加载
评论 #36524925 未加载
jes将近 2 年前
I&#x27;d like to play around a bit with Racket. I have been using Slime with Common Lisp for years. From what I&#x27;m reading, it sounds like Geiser[1] might be a Slime-alike package for Emacs.<p>Thoughts or advice?<p>[1] <a href="https:&#x2F;&#x2F;www.nongnu.org&#x2F;geiser&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.nongnu.org&#x2F;geiser&#x2F;</a>
评论 #36525579 未加载
nsm将近 2 年前
IMO a couple of cool aspects of Racket that aren&#x27;t called out in beginner guides, but I think are really useful in real programs:<p>1. The use of custodians on a per-(green-)thread basis that brings &quot;oh yes, if the thread crashes or is shutdown, racket guarantees that all open files&#x2F;sockets&#x2F;resources will be shut down&quot;. For example you can use this to ensure that a timed out client doesn&#x27;t cause unnecessary resource usage. <a href="https:&#x2F;&#x2F;docs.racket-lang.org&#x2F;more&#x2F;index.html#%28part._.Terminating_.Connections%29" rel="nofollow noreferrer">https:&#x2F;&#x2F;docs.racket-lang.org&#x2F;more&#x2F;index.html#%28part._.Termi...</a><p>2. Events and composable concurrency from Concurrent ML - Unlike Go&#x27;s channels, concurrent ML events are composable up the stack, and have some nice things built in like &quot;NACK events&quot; (allowing cancellation down the stack). Unfortunately there aren&#x27;t great primers about using this that I know of apart from the Kill Safe Synchronization Abstractions paper. <a href="https:&#x2F;&#x2F;users.cs.utah.edu&#x2F;plt&#x2F;kill-safe&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;users.cs.utah.edu&#x2F;plt&#x2F;kill-safe&#x2F;</a><p>3. Sandboxing - <a href="https:&#x2F;&#x2F;docs.racket-lang.org&#x2F;reference&#x2F;Sandboxed_Evaluation.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;docs.racket-lang.org&#x2F;reference&#x2F;Sandboxed_Evaluation....</a><p>Some of these were added to make it easier for the IDE to manage errant programs that could be written by beginners, but it is also a very &quot;applicable to production&quot; set of tools. Racket internalizes Extra-linguistic mechanisms <a href="https:&#x2F;&#x2F;felleisen.org&#x2F;matthias&#x2F;manifesto&#x2F;sec_intern.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;felleisen.org&#x2F;matthias&#x2F;manifesto&#x2F;sec_intern.html</a><p>Also the fact that various DSLs can inter-op with each other directly, so that you can use something like a binary parser description, as if it was just another Racket library. For example this description of the format <a href="https:&#x2F;&#x2F;github.com&#x2F;Bogdanp&#x2F;racket-binfmt&#x2F;blob&#x2F;master&#x2F;binfmt-test&#x2F;binfmt&#x2F;basic.b">https:&#x2F;&#x2F;github.com&#x2F;Bogdanp&#x2F;racket-binfmt&#x2F;blob&#x2F;master&#x2F;binfmt-...</a>, is directly included in another file as a regular library <a href="https:&#x2F;&#x2F;github.com&#x2F;Bogdanp&#x2F;racket-binfmt&#x2F;blob&#x2F;master&#x2F;binfmt-test&#x2F;binfmt&#x2F;basic-test.rkt">https:&#x2F;&#x2F;github.com&#x2F;Bogdanp&#x2F;racket-binfmt&#x2F;blob&#x2F;master&#x2F;binfmt-...</a><p>I agree that startup time is not a winning aspect of Racket. My naive understanding is because Racket is not a direct bytecode interpreter like CPython, but actually has to run a compile step to native code, and doing that for programs + their required libraries necessarily takes at least a couple of hundred milliseconds even before anything can start running, while CPython can pretty much start executing from the get go.
manicennui将近 2 年前
The comments section of this submission are the perfect example of how far this site has fallen. Bunch of blub programmers worried about whether Racket is the most popular or can be used for their crappy day job.
truth_seeker将近 2 年前
Is the webassembly story ripe yet ?