send a tag suggestion

which tags should be associated with each other?


why should these tags be associated?

Use the form below to provide more context.

#programming language


mehbark
@mehbark

about ten months ago, i wrote a ultraminimalist term-rewriting programming language in rust called slimp. it's about 850 lines of rust that you can see here. it lives its life powering one of the most esoteric discord bots i know of (also called slimp). i learned a lot and had a lot of fun! but... rust wasn't really the greatest fit.

a couple days ago, i decided to rewrite in common lisp. it was so much more fun! still tricky, but i was able to cheat (always a good thing in computer land) by using trivia a fantastic pattern-matching compiler. what i did was construct a program that would do what i want and then just... evaluate it. in my benchmarking, common slimp (yes, i am very proud of the name) consistently outperformed the rust implementation in all but the simplest benchmarks, only doing worse due to a higher constant overhead. in a benchmark that involved multiplying ten times ten times ten, common slimp was 62 times faster. nice!

i would be remiss to not mention that common slimp is not a conforming slimp implementation, because it uses the common lisp reader, it is case-insensitive, and it doesn't implement the (sometimes redundant) special forms that the original implementation does. still, i find the fundamental technique extremely satisfying, and i'd like to try it again sometime. also, the reason i haven't linked the common lisp implementation is because it's 50 lines,1 so i just put it in the post. sweet.


fullmoon
@fullmoon

There was a great /r/haskell comment from András Kovács a few years ago which explains how difficult it is to get good performance out of Rust when implementing an interpreter. That comment was comparing Rust to Haskell, but I believe a lot of the observations apply here (e.g. when comparing Rust to Common Lisp)



about ten months ago, i wrote a ultraminimalist term-rewriting programming language in rust called slimp. it's about 850 lines of rust that you can see here. it lives its life powering one of the most esoteric discord bots i know of (also called slimp). i learned a lot and had a lot of fun! but... rust wasn't really the greatest fit.

a couple days ago, i decided to rewrite in common lisp. it was so much more fun! still tricky, but i was able to cheat (always a good thing in computer land) by using trivia a fantastic pattern-matching compiler. what i did was construct a program that would do what i want and then just... evaluate it. in my benchmarking, common slimp (yes, i am very proud of the name) consistently outperformed the rust implementation in all but the simplest benchmarks, only doing worse due to a higher constant overhead. in a benchmark that involved multiplying ten times ten times ten, common slimp was 62 times faster. nice!

i would be remiss to not mention that common slimp is not a conforming slimp implementation, because it uses the common lisp reader, it is case-insensitive, and it doesn't implement the (sometimes redundant) special forms that the original implementation does. still, i find the fundamental technique extremely satisfying, and i'd like to try it again sometime. also, the reason i haven't linked the common lisp implementation is because it's 50 lines,1 so i just put it in the post. sweet.