Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
feeley
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
feeley
3mo ago
I'm really excited about this work, although I haven't read the code or paper yet. It seems to me Fractal would be ideal for running benchmarks for compilers so that the OS-induced noise is kept to a minimum. Author: do you see is
2.
▲
by
feeley
1y ago
Related: The Gambit Scheme REPL that comes with a tutorial, supports threads in the browser and has a JS FFI: https://try.gambitscheme.org Gambit in emacs in the browser: https://feeley.github.io/gambit-in-emacs-
3.
▲
by
feeley
1y ago
An alternative to Scrappy is the free CodeBoot web app ( https://codeboot.org ), which allows you to create web apps in Python that are fully encapsulated in a URL. No installation is required—neither for the developer nor the use
4.
▲
Pnut: A C to POSIX shell compiler you can trust
(pnut.sh)
193 points
by
feeley
2y ago
|
118 comments
5.
▲
by
feeley
3y ago
I have designed 2 web based code playgrounds that you may find interesting. https://try.gambitscheme.org is a playground for the Scheme language (specifically Gambit Scheme). It has a REPL and a code editor that saves files in t
6.
▲
by
feeley
3y ago
I just posted the same link to HN 3 days after you, purely by coincidence. Does it mean we are stuck in an endless tail-call loop on this topic?
7.
▲
Why Object-Oriented Languages Need Tail Calls
(eighty-twenty.org)
1 points
by
feeley
3y ago
|
0 comments
8.
▲
by
feeley
3y ago
The try.gambitscheme.org web app has most of these features and more: - REPL history with up/down arrows (explained on the landing page's README) - You can use the "help" procedure to browse the full documentation - TAB
9.
▲
by
feeley
3y ago
How does it compare to https://try.gambitscheme.org ?
10.
▲
by
feeley
4y ago
I'm not sure what you mean by "minimal set of instructions". What is more important for bootstrapping is to restrict the programming style used to write the compiler. So if that was the goal I would implement pointers and may
11.
▲
by
feeley
4y ago
tinyc.c was designed to illustrate three things at once in a second year course on concepts of programming languages. The course had 4 parts: imperative programming (using C), functional programming (using Scheme), and logic programming (us
12.
▲
by
feeley
4y ago
Haven't looked at what it would take to support C89 (or other) fully. Certainly it is possible to extend the compiler in small increments to implement more stuff: all the operators, local variables, arrays, pointers, functions, etc. Th
13.
▲
by
feeley
4y ago
To be clear, I'm not claiming to be the first to have used the name Tiny-C, just that the confusion with TCC is not intentional. Your links to DDJ are great an bring back memories of the good old days when there was much to learn from
14.
▲
by
feeley
4y ago
That's not on my TODO! But Gambit does have support for TCC. For example you can use TCC to compile a file to a dynamically loadable object file (aka shared library). The compilation is faster than gcc and the code size is typically sm
15.
▲
by
feeley
4y ago
Author here. Just for context tinyc.c was created in 2000 (I found the file in my archives and the last modification date is January 12, 2001). I was not aware at the time of Fabrice Bellard's work which after all won the IOCCC in 2001
16.
▲
by
feeley
4y ago
If you want full Scheme running on top of JS in the browser: https://try.gambitscheme.org It has tail calls, continuations and even green threads (SRFI 18 compliant), and a decentralized module system that can load libraries dir
17.
▲
by
feeley
4y ago
Gambit supports the R7RS module system and has a decentralized module system that can automatically download libraries from git repositories. Take a look at the "Libraries" section of the online REPL's tutorial for a few exa
18.
▲
by
feeley
4y ago
The FFI with JavaScript is nice. Have a look at this paper, in particular the examples that can be copy-pasted to https://try.gambitscheme.org : https://www-labs.iro.umontreal.ca/~feeley/papers/Belanger
19.
▲
by
feeley
4y ago
I'm not sure what part of your project is web-based and what you mean by "web-based". Do you mean executing Lisp/Scheme code on the browser side or the server side? In any case you should consider Gambit Scheme that ha
20.
▲
by
feeley
4y ago
An important design goal for the POSIX shell version of the RVM is to depend on the fewest external tools possible. Each dependency brings with it a portability risk because unix tools can be subtly different between environments (for examp
21.
▲
by
feeley
4y ago
Ribbit achieves a 4K footprint, but that just means the size of the Ribbit VM plus the size of the compacted compiled code. The uncompacted code is stored in RAM in the form of linked "ribs" (3 cell objects, or 6/12/24
22.
▲
by
feeley
4y ago
The go implementation of the RVM is not yet finished. I would say the reference implementations are the JavaScript, Python and Scheme ones. They were written in that order and build up on various ways of expressing things compactly. Orig
23.
▲
by
feeley
4y ago
I wrote TCO in the title because with "proper tail calls" the title exceeded the allowed limit on hacker news! Moreover most people will know the term TCO and less the more precise term proper tail calls. You are of course corre
24.
▲
by
feeley
4y ago
You need a Scheme interpreter (Gambit, Chicken or Guile have been tested) to run the Ribbit AOT compiler. The Ribbit AOT compiler will compile a Scheme program to one of the supported target languages: C, JavaScript, Python, Scheme or POSI
25.
▲
Ribbit Scheme bootstraps with Posix shell while supporting TCO, call/cc and GC
(github.com)
73 points
by
feeley
4y ago
|
16 comments
26.
▲
by
feeley
5y ago
It is almost instantaneous: % /usr/bin/time gsi rsc.scm -t c -l min repl-min.scm 0.06 real 0.05 user 0.00 sys % gcc -O3 repl-min.scm.c % echo "(define f (lambda (n) (if (< n 2
27.
▲
by
feeley
5y ago
The Ribbit compiler was developed using Gambit but most of the code is portable. I rewrote a few parts with cond-expand to port rsc.scm to older versions of Gambit and also Guile and Chicken. If you pull the latest commit the Ribbit syste
28.
▲
by
feeley
5y ago
You need to install Gambit HEAD, then you can: % cd src % gsi rsc.scm -m -t py -l max repl-max.scm % python3 repl-max.scm.py > (+ 1 (* 2 3)) 7 or for the C version: % gsi rsc.scm -m -t c -l max repl-max.scm
29.
▲
by
feeley
5y ago
Ribbit's max library contains most of the R4RS predefined procedures (even call/cc). The main things missing are variadic procedures (unfortunately this includes the "list" procedure so you need to replace (list 1 2 3)
30.
▲
by
feeley
5y ago
In your list you say "small and portable Scheme implementation with AOT compilation and 4K footprint". However the presence of an AOT compiler is not the most interesting part. The distinguishing feature is that in 4K there is a
More ›