Author Topic: cppLisp: Lisp Interpreter Written in Modern C++  (Read 2666 times)

0 Members and 1 Guest are viewing this topic.

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
cppLisp: Lisp Interpreter Written in Modern C++
« on: October 11, 2019, 12:02:26 pm »
Interesting multi-page post on "Too many programming languages", especially interesting discussions on the XMOS, and the reference to ulisp. It just so happens that I am writing a Lisp interpreter in modern C++ and it has now been uploaded to github with the MIT license. No garbage collection yet - I will be adding one probably using shared_ptr. It uses boost variant and some lambda functions. At around 800 lines with comments and empty lines, it's not the smallest lisp, but it does support full Lisp semantics, e.g. a few tiny Lisp use vectors to store the cells, which would preclude them from supporting garbage collection.

Check it out if you like! https://github.com/richardman/cppLisp. Maybe you will find it interesting or even useful.
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #1 on: October 11, 2019, 12:35:31 pm »
I would prefer "neat C" rather than "C++" implementation so I can try to integrate it into kernel space for the very specific purpose of doing some kind of wild debugging.

uFort is currently on the way for this.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 4669
  • Country: pl
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #2 on: October 11, 2019, 05:35:25 pm »
Now write a modern C++ implementation, well, in anything you want, I will not even care :-DD
 

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #3 on: October 11, 2019, 06:22:47 pm »
C is easy for me. I was looking for a challenge.
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1199
  • Country: fi
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #4 on: October 11, 2019, 06:46:35 pm »
Can you make it fully constexpr, so I can run my Lisp programs while compiling?
 
The following users thanked this post: SiliconWizard

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #5 on: October 11, 2019, 07:01:02 pm »
Can you make it fully constexpr, so I can run my Lisp programs while compiling?

More challenge! Let me think about it.
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #6 on: October 11, 2019, 07:05:10 pm »
C is easy for me. I was looking for a challenge.

The challenge is to write neat stuff in C, which must not be"norm life" by judging the amount of crap published on the internet  :D


 

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #7 on: October 11, 2019, 07:46:01 pm »
I don't comment on other people's code  ;) I will be getting more stuff on github and open sourcing them. Anyone can see my coding skills.
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 9545
  • Country: fr
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #8 on: October 11, 2019, 11:13:49 pm »
I would prefer "neat C" rather than "C++" implementation so I can try to integrate it into kernel space for the very specific purpose of doing some kind of wild debugging.

uFort is currently on the way for this.

How about distributed Lisp in Erlang?
https://github.com/tekknolagi/distlisp

 :-DD
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #9 on: October 12, 2019, 01:27:11 am »
How about distributed Lisp in Erlang?

LOL

Sooooo freak, soooo cool, but, even weirder it's that when I tried, it didn't crash on my router, either on the 405GP node (where other stuff does usually crash).

That's awesome, really  :D
 

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #10 on: October 12, 2019, 05:30:00 am »
How about distributed Lisp in Erlang?
https://github.com/tekknolagi/distlisp

 :-DD

 :-+ They are from our alma mater!
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 9545
  • Country: fr
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #11 on: October 12, 2019, 02:38:22 pm »
How about distributed Lisp in Erlang?

Sooooo freak, soooo cool, but, even weirder it's that when I tried, it didn't crash on my router, either on the 405GP node (where other stuff does usually crash).

Good to know. ;D
 

Offline chickenHeadKnob

  • Frequent Contributor
  • **
  • Posts: 997
  • Country: ca
Re: cppLisp: Lisp Interpreter Written in Modern C++
« Reply #12 on: October 13, 2019, 08:57:51 am »
If someone who was party to the Ericson history and knows the full details first hand of Joe Armstrong getting hired and attempting initially to sell the Ericson engineers on common Lisp, then inventing Erlang, they could tell us an interesting saga.

Robert Virding then completes the Wagnerian ring cycle full circle with Lisp flavoured Erlang http://lfe.io/  and https://en.wikipedia.org/wiki/LFE_(programming_language)

not sure whether to laugh or cry.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf