Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Rark: A Racket language inspired by Arc (github.com/kogir)
43 points by zeeshanm on Aug 12, 2015 | hide | past | favorite | 12 comments


I wrote this when I started work on HN as a way to learn more about Racket and Arc, and in an attempt to get more useful results from Racket's sampling profiler.

I think I got about 80% of things working, but even then I had to make some undesirable compromises. It became clear it was a dead end and would never make sense to use for HN in production.


That's interesting. Why was it a dead end?

Was it due to the (too dynamic) semantics of Arc?

Or perhaps you have too much code written in standard Arc to make infeasible to port?


I am also interested in your issues. I really have grown in my appreciation of Racket myself and looking to use it for some production work.


Is there more information available on this one? I am not getting the concept of it...


Judging from the code, the main idea is to implement the Arc (or Arc-like) language using the standard techniques used to implement new languages in Racket. This approach will make it easy to use the tools/infrastructure of Racket without any changes (correct highlighting, arrows between a variable and its binding, scope aware renaming of variables, profiler, etc.). The new language compiles via macro expansion to Racket which is then compiled and jitted as normal.

If I recall correct the original implementation of Arc was written as an interpreter - and thus the Racket set of tools are not available.

The main benefit is that the new language will run faster than standard Arc.

As a bonus it will be possible to use module written in Rark from Racket code - and use modules written in Racket in Rark modules.


A more developed variant with these goals, that got discussed a fair bit in the arc forum, is https://github.com/arclanguage/arc-nu. It hasn't received much kicking on wheels by anyone other than its author(s), though, so be prepared for some rough edges if you decide to try it out. In the long term I think it might be much nicer than the original prototype.

(Disclosure: I'm one of the owners of the https://github.com/arclanguage community. Also check out https://arclanguage.github.io, which is a more up-to-date statement of the Arc state of the world.)


If it's helpful, the original implementation of Arc was actually quite similar to this - a bunch of macros that compiled down to MzScheme (which eventually became PLT scheme, which eventually became Racket!).


I found Arc version 3.1 on arclanguage.org. It does compile to (Mz)Scheme - but it does not use the MzScheme macro expander. It reads Arc program as an s-expression. Compiles the program and produces an mzscheme program also represented as an s-expression. The "problem" is that s-expressions doesn't track source location of identifiers. That made it impossible for the old Arc implementation to reuse the MzScheme tools.

Some the libraries were written using Arc-macros that expanded into simpler Arc constructs, but MzScheme macros weren't uses in that process.

Note: PLT Scheme was the names used when MzScheme, DrScheme and a few other tools was distributed together.


That's pretty nifty.


The Arc programming language [1] was created by Paul Graham (and Robert T. Morris). Arc was used to create the original "Startup News" site which eventually became "Hacker News". Kogir is one of the developers at Y Combinator that currently works on the HN code.

[1] http://arclanguage.org/


I wrote this when I started working on HN, though I've since left YC and no longer work on HN.


AFAIK, Arc is built on Racket already.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: