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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Racket Is an Acceptable Python

280 点作者 paroneayea将近 6 年前

22 条评论

kazinator将近 6 年前
I&#x27;ve been making a language called TXR for ... oh, ten years this coming August now. It combines a Lisp dialect (&quot;TXR Lisp&quot;) with a whole-document pattern-based extraction language (&quot;TXR Pattern Language&quot;). It takes the form of a simple executable with a few satellite files in your &#x2F;usr&#x2F;share.<p>Lots of &quot;batteries&quot; are included in TXR Lisp: object system with static and instance slots, single inheritance, GC finalization and a form of RAII, exception handling, delimited continuations, byte code compiler for virtual machine, file compilation, macros (of course), regexes, built-in lazy lists, a fantastic set of macros for partial application, a comprehensive declarative FFI, good amount of POSIX wrapage built-in, a decent REPL with history, completion, multi-line editing, visual copy-paste, ...<p>TXR Lisp has a concept similar to CL&#x27;s &quot;generalized places&quot; implemented differently. It supports Lisp-1-style evaluation (higher order functions used without a <i>funcall</i> operator), in the middle of a Lisp-2 substrate. Traditional list operations are generalized so they work on other sequences; you can <i>mapcar</i> over a string and such.<p>Link: <a href="https:&#x2F;&#x2F;nongnu.org&#x2F;txr" rel="nofollow">https:&#x2F;&#x2F;nongnu.org&#x2F;txr</a>
评论 #20416811 未加载
评论 #20419509 未加载
评论 #20416414 未加载
epr将近 6 年前
Racket is great if you are looking for a high quality general purpose language, but if you want to use important python libraries for pythons&#x27;s popular use cases: numerical&#x2F;scientific computing, data science&#x2F;ai, etc., then Hylang is a drop-in replacement with the added benefit of Metaprogramming facilities (Lisp-2 macros) and Clojure-like semantics.<p>Python and Hy have 100% interoperability. Python can call Hy out of the box, and Hy can call Python out of the box.<p>Any Python programmer can pick up Hy basics in minutes, and will be productive in a matter of hours. If you are an intermediate level Python programmer and have experience with Lisp macros, you will be writing macros in no time as well. Writing macro wrappers for numerical&#x2F;scientific applications can increase your code&#x27;s signal to noise ratio by quite a lot.<p>docs: <a href="http:&#x2F;&#x2F;docs.hylang.org&#x2F;en&#x2F;stable&#x2F;" rel="nofollow">http:&#x2F;&#x2F;docs.hylang.org&#x2F;en&#x2F;stable&#x2F;</a><p>github: <a href="https:&#x2F;&#x2F;github.com&#x2F;hylang&#x2F;hy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;hylang&#x2F;hy</a><p>get it:<p><pre><code> pip install hy</code></pre>
评论 #20417575 未加载
评论 #20418832 未加载
评论 #20417537 未加载
lkirk将近 6 年前
A big use case for python is glue for high performance c&#x2F;c++ code. How is racket at this? Also, is there a cython alternative for racket? I would also argue that, though racket may have more batteries included, there are definitely not as many externally developed libraries. Especially important are numpy&#x2F;scipy&#x2F;pandas&#x2F;pysam, the list could go on... That&#x27;s not to say that I&#x27;m against racket, I really like the language and its level of design and documentation.
评论 #20415518 未加载
评论 #20417668 未加载
评论 #20415155 未加载
lunchladydoris将近 6 年前
Since we&#x27;re talking about Racket, don&#x27;t forget that it&#x27;s RacketCon this weekend: <a href="https:&#x2F;&#x2F;con.racket-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;con.racket-lang.org&#x2F;</a>
评论 #20415119 未加载
regularfry将近 6 年前
While I&#x27;m impressed with racket on the whole, I can&#x27;t quite agree to be impressed by the GUI bits. They&#x27;re extremely limited, and once I got away from &quot;how do I put a button on the screen&quot; I didn&#x27;t find the underlying implementation lent itself to being extended. In particular the drag and drop system only goes as far as file drops, and I quite quickly hit a brick wall trying to add anything more interesting.
评论 #20414940 未加载
评论 #20415936 未加载
评论 #20415182 未加载
inputcoffee将近 6 年前
I am always confused when people talk about the language itself.<p>In my experience, python is used for Tensorflow, or Pandas, or Django, or Flask, or pytorch or something else that runs on top of it. Sometimes it is even more specialized and I need a wrapper for an API to let me talk to some web data. Maybe I need a crawler&#x2F;scraper and a parser. There is a specialized language on top of the language.<p>So when someone says, oh this language is better with objects, or has some syntax thing or the other, or I can reason about it I am left confused.<p>Its like if I were talking to a professional shoe designer and I ask for hiking boots and they tell me that they&#x27;re really into having at least two tones to offset the lace and the heels or something.<p>What am I missing? I want to reason about the language too, but doesn&#x27;t that pale in comparison to being able to run a specialized library?
评论 #20416162 未加载
评论 #20416489 未加载
评论 #20416177 未加载
评论 #20416149 未加载
评论 #20417240 未加载
评论 #20416310 未加载
trurl将近 6 年前
While I prefer my languages statically typed, if you&#x27;re going to use a dynamically typed language, Racket is far superior to Python.
评论 #20415529 未加载
评论 #20414622 未加载
评论 #20414617 未加载
F-0X将近 6 年前
An _acceptable_ python!? More like Python is an unacceptable Racket.<p>Racket is an absolute joy to use.
sriharis将近 6 年前
&gt; &quot;Lisp is too hard to learn&quot; is a lie; if middle schoolers can learn it, so can more seasoned programmers.<p>Please, some famous, authoritative figure, say this out loud. I&#x27;m running out of ideas to convince people of this.
评论 #20425222 未加载
评论 #20418862 未加载
评论 #20418599 未加载
leanthonyrn将近 6 年前
What are the best library&#x27;s for data science in Racket? -Finding it hard to step away from Julia when operate on a amazing large data file and not kill the CPU.<p>How about packages to convert Racket to WASM?
评论 #20415220 未加载
thothamon将近 6 年前
For my money, to be an acceptable Python, you have to be able to use the Python numeric, scientific and machine learning libraries -- or have other libraries that are just as good or better. That is the number one reason I would use Python in the first place.
zmmmmm将近 6 年前
&gt; But I missed parentheses. I longed for parentheses. I dreamed in parentheses<p>I&#x27;m honestly kind of scared to ever learn a Lisp because it seems it permanently alters your brain to the point where it damages your ability to program in other languages (aka ones that you can responsibly use in an organisation can&#x27;t rely on niche skill sets).
评论 #20416648 未加载
Y_Y将近 6 年前
It would be remiss not to mention that it&#x27;s (somewhat) possible to write python in racket as a &quot;hashlang&quot;<p><a href="https:&#x2F;&#x2F;pkgs.racket-lang.org&#x2F;package&#x2F;python" rel="nofollow">https:&#x2F;&#x2F;pkgs.racket-lang.org&#x2F;package&#x2F;python</a>
nixpulvis将近 6 年前
I&#x27;m quite glad my freshman material was in Racket and not Python. I&#x27;m sad to hear some educational programs like MITs are moving the wrong direction here.
评论 #20416671 未加载
pera将近 6 年前
Pyret is an even more acceptable Python: <a href="https:&#x2F;&#x2F;www.pyret.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.pyret.org&#x2F;</a>
评论 #20415361 未加载
mx06v将近 6 年前
It might be off-topic. I see there&#x27;s racket in techempower framework benchmarks [1] but I can&#x27;t find racket from round 18 results [2], is it too slow?<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;TechEmpower&#x2F;FrameworkBenchmarks&#x2F;tree&#x2F;master&#x2F;frameworks&#x2F;Racket" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TechEmpower&#x2F;FrameworkBenchmarks&#x2F;tree&#x2F;mast...</a> [2] <a href="https:&#x2F;&#x2F;www.techempower.com&#x2F;benchmarks&#x2F;#section=data-r18" rel="nofollow">https:&#x2F;&#x2F;www.techempower.com&#x2F;benchmarks&#x2F;#section=data-r18</a>
mac_was将近 6 年前
What is the purpose of Racket? Is there any use for web development?
评论 #20414614 未加载
评论 #20414536 未加载
评论 #20414231 未加载
评论 #20414186 未加载
评论 #20414429 未加载
评论 #20414320 未加载
评论 #20415225 未加载
评论 #20414306 未加载
评论 #20414260 未加载
评论 #20414363 未加载
taloft将近 6 年前
If racket is an acceptable python and python is an acceptable lisp, then racket must be an acceptable lisp?
评论 #20415939 未加载
评论 #20417691 未加载
评论 #20415912 未加载
nimmer将近 6 年前
I find Nim to be much closer to a statically typed Python - with the speed of C.
评论 #20416620 未加载
charlieflowers将近 6 年前
Say your task was to read metadata about rest api endpoints and generate an sdk in c#.<p>Would racket’s LOP features make it compelling? Or would you be more inclined to build it in c# since that is the target language?
nafizh将近 6 年前
How is the scientific computing&#x2F;machine learning ecosystem for Racket? Looking for suggestion from people who are experienced.
nickmain将近 6 年前
Python runs on iOS, Racket does not. The need for a JIT to make Racket performant also makes it unlikely that it ever will.
评论 #20415582 未加载
评论 #20417568 未加载
评论 #20417376 未加载