TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Switching from Common Lisp to Julia (2017)

118 pointsby mindBalmost 6 years ago

15 comments

ddragonalmost 6 years ago
Considering how close Julia is to Lisp, it could be interesting to have an actual Lisp targeting the Julia compiler, for people who don&#x27;t want to compromise on s-expr but would still want to have a performance oriented Lisp with access to a lot of scientific computation and ML libraries (and probably better interop compared to Clojure and Java for example). The only work I know for this is:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;swadey&#x2F;LispSyntax.jl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;swadey&#x2F;LispSyntax.jl</a>
评论 #20615774 未加载
评论 #20615020 未加载
评论 #20616559 未加载
评论 #20614992 未加载
StefanKarpinskialmost 6 years ago
Tamas is a very active participant in the Julia ecosystem, so it seems that the switch went pretty well!<p>Julia 1.0 was released a little over a year ago at JuliaCon 2018. At this year&#x27;s JuliaCon, there was, imo, an even more positive &quot;vibe&quot; than past years, which were already full of excitement. My guess is that it may be because everyone has been really happy to have a year of not breaking things and building cool new stuff on top of the solid foundation of Julia the Julia 1.x series.
markhalonenalmost 6 years ago
I&#x27;m using Julia instead of Python&#x2F;Pandas for a machine learning project and I&#x27;m happy with how things are going. Multiple dispatch is very cool. The project was previously written in R, but the performance and lack of programming clarity inspired a re-write in Julia.<p>There is something satisfying about writing code in a high-performance language, you just know you won&#x27;t be kicking yourself because it would run 10x faster in another language.
adamnemecekalmost 6 years ago
Julia is one of my fav languages. For numerical computing, neither python + numpy, nor matlab come even close. The interop is nuts.<p>To call, say numpy fft, you just do<p>using PyCall<p>np = pyimport(&quot;numpy&quot;)<p>res = np.fft.fft(rand(ComplexF64, 10))<p>No casting back and forth. This is a toy example, julia ofc has fftw bindings.
评论 #20614786 未加载
评论 #20617630 未加载
pcr910303almost 6 years ago
Common Lisp folks should really start designing a more modern version of CL.<p>I&#x27;m pretty sure some old Lispers would come and say, &#x27;Common Lisp&#x27;s stability is a great feature&#x27;, &#x27;There are lots of new dialects&#x27;, and while they are right in some aspects, Common Lisp isn&#x27;t appealing to anyone these days. (I mean, even C and C++ is improving. Why shouldn&#x27;t CL?)<p>Even for people who &#x27;get&#x27; the ideas of s-exps and macros, there are too many quirks in CL to appeal to people, and most go to Clojure (where the interactive experience is at best moderate, debbuging support&#x2F;error handling is a mess, e.g.).<p>I believe the hypothetical CL++ should at least:<p>* Straight out incompatibilites between implementations, especially the numerous opinions to make an image or binary, and the FFI parts.<p>* Design a better CLOS system. CLOS feels like an object system thought after (well, after all it is a system thought after) and bolted on CL with duct tape. I would appreciate a CLOS-based type system (based on macros much like CLOS) that integrates well with CL.<p>* Remove unused functions, and fixing some inconsisties in the standard library<p>* Bigger, much much bigger standard library. Crucial, community-standard libraries like asdf &amp; uiop, syntax-sugar like the arrow&#x2F;diamond macros, and reader macros that allow infix syntax (this currently exists in the standard but nobody uses it partly because most Lisp users don&#x27;t really care about infix, partly because it&#x27;s extensiblity is bad) should be in the std.<p>* A compatibility layer. Providing a &#x27;cl&#x27; and &#x27;cl-user&#x27; package with the usual CL symbols will be sufficient.<p>to appeal to the users.<p>This really isn&#x27;t sufficient for the hypothetical CL++ itself; there really should be beginner materials that isn&#x27;t PCL; Lispers shouldn&#x27;t hate infix reader macros or syntax-sugar like LOOP(IMHO these show the real power of macros, after all, macros are another tool to write readable code with great abstractions) and beginner materials should use, or at least introduce them(infix reader macros and other syntax sugar).<p>Just a rant about the language after reading the post and becoming sad.
评论 #20615733 未加载
评论 #20616477 未加载
评论 #20615269 未加载
评论 #20614986 未加载
评论 #20614939 未加载
cat199almost 6 years ago
Seems like this:<p><pre><code> You can of course branch on the array element types and maybe even paper over the whole mess with sufficient macrology (which is what LLA ended up doing), but this approach is not very extensible, as eventually you end up hardcoding a few special types for which your functions will be &quot;fast&quot;, otherwise they have to fall back to a generic, boxed type. </code></pre> is exactly what numpy&#x2F;scipy is doing (s&#x2F;macrology&#x2F;c-functions&#x2F;), but they are successful.. granted julia has more ground-up support for these things, but it doesn&#x27;t seem like an impediment to scientific computing per-se, provided sufficient userbase
coldteaalmost 6 years ago
&gt;<i>The standard does not guarantee that this gives you an array of double-float: it may (if the implementation provides them), otherwise you get an array of element type T. This turned out to be a major difficulty for implementing portable scientific code in Common Lisp.</i><p>Well, so? Just use a single CL implementation that does give you the guarantee.<p>After all you are now switching to use a single Julia implementation (there&#x27;s no other anyway).<p>If portability is a concern, at least with CL you can always port 95% of your code to several implementations, and then write special code those kind of incompatibilities. With Julia one platform is all you get.<p>So how&#x27;s that better, from the point of this complaint?
conjecturesalmost 6 years ago
This is now a little out of date given 1.0+ has been released. Still a decent article though.
leanthonyrnalmost 6 years ago
<p><pre><code> I was thinking about this the other day. How can I expose my Common Lisp code to Julia. </code></pre> 1. You could take the Clasp path by exposing CL to C++. <a href="https:&#x2F;&#x2F;youtu.be&#x2F;8X69_42Mj-g" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;8X69_42Mj-g</a><p><pre><code> This means taking &#x2F; writing a CL in Julia. </code></pre> 2. Julia has an AST representation written in femtolisp. So it would be in interesting target for CL or some glue middle language like Shen. <a href="http:&#x2F;&#x2F;www.shenlanguage.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.shenlanguage.org&#x2F;</a> <a href="https:&#x2F;&#x2F;youtu.be&#x2F;lMcRBdSdO_U" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;lMcRBdSdO_U</a>
vindarelalmost 6 years ago
For numeric work in CL, one might like Numcl, a clone of Numpy: <a href="https:&#x2F;&#x2F;github.com&#x2F;numcl&#x2F;numcl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;numcl&#x2F;numcl</a>
nudpiedoalmost 6 years ago
I don&#x27;t know why no one seems to think about symbolic programming which was the original killer feature of lisp, and one of the main reasons for doing macros.<p>In math oriented programming this should be one of the most powerful features and skills in order to simplify and modify calculations. Sure you can implement that with macros and AST but that is not at the level of S-Expressions.<p>Everything else is not more important as any other competition of DSLs.
评论 #20615121 未加载
评论 #20615169 未加载
评论 #20615027 未加载
评论 #20618240 未加载
评论 #20615032 未加载
sischoelalmost 6 years ago
As far as I know, parts of the Julia parser is still written in a Lisp variant called Femtolisp.<p>Also one can run Femtolisp by executing:<p>julia --lisp
dangalmost 6 years ago
Discussed at the time: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15478131" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15478131</a>
higherkindedalmost 6 years ago
Off the topic but,<p>Why keep reinventing the wheel when there&#x27;s an ML language family already? Why do people keep giving up these juicy Hindley—Milner-ish type systems and these brief and concise equations for anything? It just doesn&#x27;t make sense for me.
评论 #20614965 未加载
评论 #20616000 未加载
评论 #20616241 未加载
评论 #20614975 未加载
评论 #20617006 未加载
fmakunboundalmost 6 years ago
I think Edi uses Julia too, now
评论 #20616122 未加载