Live data from Hacker News

LispY C

github.com

11–20 of 45 posts

Re: LispY C

#11
post #2

So crazy it might just work.

Large part of low-level runtime of Gauche (Scheme dialect) is written in "C in S-expression", the same idea with this.

I found it so pleasant writing C in S-expr that I gradually rewriting my C code with it.

Re: LispY C

#13

Why replace "struct" with "class"? These are completely different things. >.>

I don't see where you get that. There is a struct function.

That said, the only difference between a struct and a class is that struct member defaults to public, and class members default to private.

Re: LispY C

#16
post #7

> Because LISP is expressive and C is fast and I wanted the best of both worlds is the short answer. I'm not sure how well known it is, but some Lisps can be statically compiled to machine code. But one thing I've wondered about is how good can it get? Are there any benchmarks for Lisp vs. C?

Some Lisps? Almost all Common Lisps compile to native machine code. Which is why CL programs tend to run orders of magnitude faster than e.g. Python programs. (But they're still typically slower than C because of runtime memory allocation and typetag checking.)

Re: LispY C

#17
post #7

> Because LISP is expressive and C is fast and I wanted the best of both worlds is the short answer. I'm not sure how well known it is, but some Lisps can be statically compiled to machine code. But one thing I've wondered about is how good can it get? Are there any benchmarks for Lisp vs. C?

Some Lisps? Almost all Common Lisps compile to native machine code. Which is why CL programs tend to run orders of magnitude faster than e.g. Python programs. (But they're still typically slower than C because of runtime memory allocation and typetag checking.)

Talking about speed, someone put this online http://www.nexoid.at/tmp/scheme-benchmark-r7rs.html

Re: LispY C

#19

Earlier quoted context omitted.

Some Lisps? Almost all Common Lisps compile to native machine code. Which is why CL programs tend to run orders of magnitude faster than e.g. Python programs. (But they're still typically slower than C because of runtime memory allocation and typetag checking.)

Talking about speed, someone put this online http://www.nexoid.at/tmp/scheme-benchmark-r7rs.html

Chez Scheme (the compiled version vs. Petite Chez) figures high on those lists, and it was just opensourced by Cisco. I used to use Gambit-C, and I still like it, but Chez is fast.

Re: LispY C

#20
Clasp is not quite the same, but it can work seamlessly, and compiles to machine code using an LLVM backend [1].

It was created to facilitate using all of the scientific libs in C++ by a chemistry professor for the creation of molecules [2]. It's a big codebase. I'll have to look at LispY C, since on first impression it seems smaller, and I like C!

[1] https://github.com/drmeister/clasp [2] https://github.com/drmeister/clasp

Post reply on HN