6 ms·
Cakelisp: A performance-oriented Lisp-like language
- deleted 3y ago[deleted]
- zitterbewegung 3y agoHas any lisp like language become popular ? I think the most popular was Dylan and o know the racket team is doing something similar.
- flowcont 3y agoClojure?
- mepian 3y agoDylan was never really popular. As far as I know, Common Lisp had the largest number of users, maybe Clojure eclipsed it by now.
- gpderetta 3y agoelisp :D
- bjoli 3y ago"many users" and "popular" don't always overlap.
- notacoward 3y agoEtymologically, they sure do. For all of its warts, elisp has not only many users but many programmers who have created some pretty complicated stuff. It's definitely a contender.
- bjoli 3y agoPopular has many meanings. If one takes popular to mean done/used by many then sure. You are right. Filing tax returns is popular by the same definition. If you mean popular as in the antonym of unpopular I don't think elisp can be called popular. I have written several thousand lines of elisp outside of my Emacs config, and it is probably my least favourite lisp - and I believe most people who know more lisps than elisp think like I do.
- klibertp 3y agoWell, historically and technically, Lisps already became popular half a century ago, then they fell from grace. Also, depends on your definition of popularity: anything outside of Top 10 on TIOBE looks like a rounding error compared to the big guys. Dylan was a great language - I played with OpenDylan a bit. Scheme with CLOS and gradual typing, and a formal specification, and a stdlib, and tools for modularizing and AOT compiling and linking multi-module projects, hygienic (syntax-case-style) macros, and so on, all in ca. '95! It was a bit too late and Java took over the world before Dylan had its chance... Imagine the world, full of sunshine and rainbows, if Dylan prevailed - instead of the dreary, stifling, primitive language we all know and love (to hate). Racket is doing nothing similar to Dylan. Dylan was a well defined language for programming in the large and targeted at enterprises. Racket is a laboratory and a workbench for creating languages. It accomplishes this by implementing incredibly powerful macro and module systems. Other notable features of Racket are delimited continuations, contracts, and the Typed Racket dialect. It is targeted at researchers and beginners and has nothing to do with the enterprise. :)
- andsoitis 3y ago> depends on your definition of popularity I'm a Common Lisp fan, but nobody would claim that it is popular. I don't know that "popularity" is as subjective as you describe.
- klibertp 3y agoKotlin is widely popular, official language for one of the two dominant mobile platforms. It accounts for 0.37% of all search results gathered by TIOBE. Meanwhile, languages on the first 4 positions account for more than 50% of hits. Languages like PHP or Go, which you can still call pretty popular are on the order of 1-2 %. It's completely subjective. The objective metrics (if web search are them, which is kind of dubious) tell us that whatever-language-you-like is probably orders of magnitude less popular than Fortran. The "real" popularity that you experience - how big the community is, how many packages are published, how many success stories are there - heavily depend on where you are, who you know, and what you want. The index: https://www.tiobe.com/tiobe-index/ https://www.tiobe.com/tiobe-index/
- ofrzeta 3y agoMaybe AutoLISP :) (the built-in LISP dialect in AutoCAD)
- JonChesterfield 3y agoThere's a weird one called javascript that seems to have picked up some fans
- enbugger 3y agoI think it might play well together with Raylib. Consider creating bindings [0] for this library. [0] https://github.com/raysan5/raylib/blob/master/BINDINGS.md https://github.com/raysan5/raylib/blob/master/BINDINGS.md
- Zak 3y agoA quick look at the readme and test/Tutorial_Basics.cake suggests that bindings are not necessary; one would just use the C library directly.
- makuto 3y agoThere is a module in gamelib [0] which will automatically clone, build, and link raylib to your program. There are several other third party libs there as well, including SDL2 and Curl. [0] https://macoy.me/code/macoy/gamelib https://macoy.me/code/macoy/gamelib
- VitoVan 3y agoFor anyone who didn't know yet, from the file ReadMe.org: > Note that while Cakelisp has "Lisp" in the name, Cakelisp takes some inspiration from Lisp, but is not compatible and does not aspire to become "a Lisp". I was inspired by Naughty Dog's use of GOAL, GOOL, and Racket/Scheme (on their modern titles). I've also taken several ideas from Jonathan Blow's talks on Jai.
- xigoi 3y ago> Types are identical to C types, e.g. int is 32 bits int in C can be anything with at least 16 bits.
- makuto 3y agoThat's true. I was mainly trying to indicate there is no boxing or anything like some languages seem to have with their types.
- Warwolt 3y ago> int is 32 bits with no sign bit or anything like other Lisp implementations do This seems potentially confusing, since usually "int" just refers to a signed integer of some platform specific size. Maybe it would be better to say something like, "int is like uint32_t, 32 bits and no sign bit without any additional data"?
- revskill 3y agoInt is not 15 char ?
- notacoward 3y agoIt mentions no garbage collection, but there's surprisingly little explanation of what it does instead. There is mention of a "new" expression, but no matching "free". Did the author just punt on this?
- makuto 3y agoMemory allocation matches C, i.e. malloc and free are used. If interoperating with C++, you can use new and delete.
- mepian 3y agoIs it much faster than SBCL?
- JonChesterfield 3y agoProbably no. Is there a faster lisp implementation than sbcl?
- deleted 3y ago[deleted]
- andsoitis 3y agoUnder list of (end-user) language features, the author says: > I also think garbage collectors add more complexity than manual management That's quite the controversial statement and flies in the face of what GC has enabled in software development generally over the last few decades. I would be excited to understand some examples where this is the case and they outweigh the benefits that GC brings to developing software (incl. games). In the author's list of similar languages (https://macoy.me/code/macoy/cakelisp/src/branch/master/doc/VsOtherLanguages.org https://macoy.me/code/macoy/cakelisp/src/branch/master/doc/V...) they mention two other lisp-like languages without GC: Liz (transpiles to Zig) and GameLisp (seamless Rust API).
- jarodwr 3y agoI think one could make the argument that when you're producing high performance real time applications, diagnosing why your GC pauses and trying to find workarounds/fixes can take a lot longer than just managing the memory yourself. There's a lot of techniques like object pooling that people use in unity because .NETs GC isn't really built to handle how dynamic some of these applications end up being.
- andsoitis 3y agoObject Pooling is pretty straightforward and is also effective for non-GC environments.
- mattnewport 3y agoIt's not a particularly controversial statement in the context of games. Many commercial games are still developed entirely or primarily in non garbage collected languages like C++. Even Unity which uses garbage collected C# for game code is still a C++ engine under the hood for much of the performance critical engine code. Having worked in games and VR development for many years I can say that memory management was not a major problem in C++ and for tricky areas of memory and resource management like GPU memory garbage collection doesn't generally help you. When it comes time to optimize memory usage and performance it's often easier when memory management is explicit, deterministic and visible as well as highly customizable than when you have to work with a garbage collector which is a bit of a black box and has a lot of non deterministic and unpredictable behaviour. Even after working for several years primarily in Unity with C# I still tend to prefer non garbage collected languages for games.
- medo-bear 3y agoThis looks cool (although i dont buy the popular claim that GC is a no no for game dev) i wonder how does this compare to past projects to create Common Lisp without GC. For example, ThinLisp - https://www.thinlisp.org/ https://www.thinlisp.org/ - and if this project could learn something from past projects in order to not reinvent the wheel
- justinhj 3y agoGC is a no no for game development when the game is trying to extract every last cpu cycle and byte of ram, which is most leading edge games. If you’re not in that category GC is fine, but if you are it’s a massive tax.
- notacoward 3y agoI don't disagree with you, but it might help to be clear here. When people (including me) say "GC" they usually mean tracing GC. Technically, reference counting and other techniques are also GC. Except for short-running scripts (where memory consumption literally can't grow enough to matter) or the very hardest of hard real-time (where any kind of dynamic allocation is verboten), every program needs some way to find and recycle garbage. Games are not in either of those excepted categories. I'm not just saying this to be pedantic. It's important to note that every GC method involves some overhead and has a potential to make execution time less deterministic. This is certainly true of reference counting, generally true of object pooling, etc. There are even cases where tracing GC improves locality of reference vs. other methods, and thus improves performance and predictability, though those are rare AFAIK. So when you say "extract every last CPU cycle" it's important that such a goal does not necessarily favor some other approach. Many would also say that an aversion to tracing GC does not justify having nothing beyond plain malloc/free. No borrow checker, no reference counting (which can be done with very low overhead), no arena or custom-allocator support? Not in 2023. Leaving programmers entirely on their own for memory correctness is an eminently questionable choice, especially when other language features make gratuitous or hidden allocations easy. As a C programmer for 30 years I'm not going to say it's an illegal choice, but it certainly needs more than "but games" to justify it.
- netbioserror 3y agoSeems to be vying for the same compile-to-C niche as Nim, though Lisp homoiconicity is welcome. I must say though, from the summary, I'm not a fan of using C type keywords. I much prefer the adoption of something unambiguous e.g. Rust or D. Nim prefers 64-bit numeric types but has compatible subtypes with bit widths in them (int32, float32).
- koito17 3y agoHow does this compare to Carp? Is there any good support for SIMD? where "good" means "we have more than a thin wrapper over immintrin.h"
- Conscat 3y agoGiven the interoperability with C++ headers and templates, I'd expect that EVE or Highway should just work. I wonder if Cake macros could even express SPMD.
- dang 3y agoRelated: Cakelisp: A Programming Language for Games - https://news.ycombinator.com/item?id=25491568 https://news.ycombinator.com/item?id=25491568 - Dec 2020 (64 comments)
- JonChesterfield 3y agoViewed as a lisp this is disappointing. Manual memory management means lexical closures will be a pain. Native integers mean you have to remember about overflow. Stuff that lisp doesn't care about. Viewed as a replacement for the C preprocessor, or perhaps for C++ templates, this is very compelling. When you know the C you'd like to write, but it's annoyingly verbose and updating it by hand means changing a dozen places at once, systems like this amount to a more structured code generator. It might be worth copying the sometimes-garbage-collected approach. In particular, you could have real garbage collection at compile time and raise an error if any of the residual code wants to call into it.