@jakob Very cool, thanks! I think the Janet parts need correction though, the Fennel link goes to a Racket website.
@wasamasa Good catch! Should be fixed now.
@jakob Actually, there's one more such Fennel link in the preceding Hy section.
@wasamasa I think I need to give my links a quick look over. Seems I was a bit haphazard with org-insert-link.
Thanks for pointing that out, too. I've fixed it.
@wasamasa I think that's the rest of it, aside from the Kalibera et al. citation lacking a link. Do you mind if I thank you for your corrections at the end of the article?
@jakob Sure, go ahead. I'm kind of sad figuring out the linked bug report for CHICKEN is beyond my current expertise level. All I've found so far is that the bug goes away if you replace the reduce call with foldl from (chicken base), but that just sweeps the bug under the carpet.
@wasamasa Ah, that's right, I almost forgot that you contribute to CHICKEN.
Admittedly, I should have been using CHICKEN's fold in the first place since it's in SRFI-1 and I already had that imported. But, better to not let a compiler bug go under the radar.
@technomancy Haha, I knew someone would mention that. I wasn't technically apt enough at that age to have learned the typical CUA-style keyboard shortcuts, so learning it didn't feel foreign or unnatural in the way that it might for an experienced programmer being introduced to Emacs. I was mostly writing HTML by hand at the time, and I remember being able to use the menu bar to insert tags. It was a nice experience.
I should find my old laptop and see if I can pull the config off of it.
@technomancy I think you're doing the right thing by sticking to conventional editors for right now. My situation probably made more sense for the time -- I'm not sure of any other accessible options that existed when I was nine years old.
> I suspect the reason luajit is running so slowly for you is that the JIT hasn't had time to warm up and perform optimization traces. does the performance improve if you run (say) thousands of passes instead of just one?
I actually thought the luajit performance was quite good. I wanted to avoid rigor here because I'm a bit of a statistics noob, but I'll do a run where I try to get to i.i.d iterations. I should probably do something similar for Racket, which is also JITed.
@technomancy As for the other comments, I'll get working on putting those into the errata. Thanks a bunch!
@technomancy For sure. I've done a bit of reading on statistically-sound benchmarking, since we do some comparisons of sequence alignment algorithms in my lab, but I still defer to my statistician friends for help with the design and interpretation. I thought the most appropriate thing to do was to just wave hands and give the disclaimer that it is complete hand-waving.
Benchmark is still running at the moment. Ten iterations since I've started.
@technomancy One difference between that success story and mine is that I haven't done much to optimize my raytracer. In all implementations, it's a rather naïve translation of the underlying equations.
@jakob @technomancy I thought so as well, but nope. There are glaring deficiencies in cl-lib/eieio that make this surprisingly hard:
- with-slots is incompatible with cl-defstruct and expects cl-defclass.
- cl-defclass can be made to create functions like cl-defstruct, but fails when using cl-defmethod because it for some reason creates predicates and clashes with what cl-defclass generated.
- with-slots can be made to work with cl-defstruct, but my macrology is more of a sham than shim and fails with even wilder errors than with the previous approach.
I'm pondering to instead rewrite this in a more idiomatic way without option types, but that would require actually understanding the code. Maybe another time.
@technomancy I've incorporated your corrections to the article. My erratum is becoming more of a "change log" at this point, since I worry people would take my word for it and ignore the erratum. I'd feel bad misleading people about Fennel.
Pending results on benchmark, which I'll incorporate to the article when I get them. I've moved it to a different machine that doesn't have a faulty RAM stick.
@technomancy Running it on the machine with `time' had a real duration of 0m57.982. Using lua_benchmarking,
Mean: 86.477030 +/ 9.725198, min 59.790374, max 108.472983
So... I suspect there are some confounding factors, but there isn't a massive, noticeable difference coming from the JIT warmup.
I tried with --nogc, but it panicked rather quickly. Again, I suspect this is more of an issue with my code than LuaJIT or Fennel. I seem to be consing quite a bit.
@technomancy thanks for the patch! I'll merge this in.
Since you're actually looking at the code and bound to notice it at some point, I'm going note that `degrees->radians' is a really embarrassing mistake I made while going through my university notebook, seeing π/360 in a formula, and thinking "oh yeah it's converting to radians". It works fine because I'm not using it to convert any values outside of that formula, but it's probably very confusing if you were to come across the function.
@technomancy Pushed the fix that makes it correct
@jakob lisp is more than just a programming language. It's literally math, (polish notation).
@rage Certainly. I was more interested in Lisp as a programming language for this article, but there's no doubt more I could have spoken about w.r.t the influence McCarthy's paper had on PLT research more generally.
> i think i am going to suggest reading it to people that wans to grasp this group of languages.
I feel honored :) I'm glad you feel it would be useful for that
@cage no worries, I updated it very recently, so it's possible you were looking at the version before I incorporated the fix.
In either case, I appreciate that you took the time to point it out to me :)
@jakob what about the clojure license???
@efi My grievance with the EPL is that it is not GPL-compatible.
@jakob buuuuuuuut, I'm no lawyer, but, when you publish a Clojure application, you're not distributing a copy of Clojure
you're either referencing it in the source code of the application (this is a separate module) or you're compiling it into a java class (this is no longer te source code of Clojure) so, as long as you didn't patch the clojure version, I don't think a Clojure application is derivative work, and thus, is not subject to the Eclipse license???
@efi if it's referencing the Clojure standard library, it would require an exception.
@jakob aaaah, ok, that's on the gpl side
I was thinking of software released as public domain, which wouldn't have any problem *shrug*
@efi yeah, public domain and more generally permissive licenses such as MIT/BSD/zlib won't have any issues linking to the Clojure stdlib.
I'm a staunch advocate of the copyleft ideology, however, so I prefer to license the software I develop myself under protective licenses.
@jakob then don't be like "code free or die" lmao <3
@jakob at risk of enraging the lispers... what about typed lisps? (like Carp, or Typed Racket)
@grainloom I've looked at Karp very briefly in the past. Since performance is a concern for me, it may be worth looking into again, but the documentation still warns to "[not] use it for anything important just yet!"
Typed Racket is a bit more mature, and the type declarations don't feel too intrusive to me. (They seem close to CL's `declare'). I'll try it out when I give Racket a proper look.
@jakob What about the Clojure license do you dislike?
@Hyolobrika GPL-incompatibility. https://www.eclipse.org/legal/eplfaq.php#GPLCOMPATIBLE
"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko