News for hackers. Stuff that matters.
Re:AMA: Explaining my 750 line compiler+runtime designed to ... by gwu78 on Sunday March 05, 2017 @05:01PM (#13799019)
From reading your blog, I detect that you like working in MS Windows.

Can your compiler be ported to BSD?

Here is the rationale for why this can be useful: BSD can in turn be ported to new hardware with reduced amount of effort, sometimes a project that is manageable by one person.

(Compare this to what is required for porting Windows, Linux, etc. to new hardware).

Imagine an APL computer with an open source kernel that is easily ported to new hardware.

Re:AMA: Explaining my 750 line compiler+runtime designed to ... by arcfide on Sunday March 05, 2017 @05:12PM (#13799093)
Actually, I'm an old school OpenBSD user who still programs with ed(1). Check misc@ out back a number of years. I've had to move away because OpenBSD isn't the greatest platform for doing high performance GPU research. :-(

The compiler is already portable to BSD. However, the underlying library I use to do GPU programming (ArrayFire) is not ported to BSD, though it Is for Linux. The Dyalog interpreter is available for AIX as well as Linux, and that's what you need to host the compiler right now. If Dyalog received the interest, it would be pretty straightforward to port Dyalog APL to BSD.

If one wanted to provide a self-hosting Co-dfns compiler, you could implement a minimal dfns interpreter and then run the Co-dfns compiler over that. To my knowledge no such interpreter exists yet. However, porting either ArrayFire or the Co-dfns runtime would go a long way to doing this, because you could then share the runtime library between the interpreter and the compiler.

So, yes, this is quite possible, and probably not even that much work. I'd welcome such a contribution. :-)

Re:AMA: Explaining my 750 line compiler+runtime designed to ... by kovek on Sunday March 05, 2017 @06:26PM (#13799525)
How do you manage to still work with ed? Where can we read about that? I'm curious to see how useful it can be
Re:AMA: Explaining my 750 line compiler+runtime designed to ... by arcfide on Sunday March 05, 2017 @07:45PM (#13799907)
I don't have it anymore, but I did a live coding session in ed(1) where I edited thousands of lines of XML code as a demonstration of using ed. It's a very powerful editor, almost too powerful for my "simple tools" aesthetic.

Just a few things you can do with Ed:

Structured/Outlining Refactoring Rapid code catenation and splitting

It's one of my favorite editors. I don't think I have a video of it, but prior versions of the code were optimized for ed(1) hacking, allowing me to do structured/outline editing easily with ed(1).

Re:AMA: Explaining my 750 line compiler+runtime designed to ... by arcfide on Sunday March 05, 2017 @05:14PM (#13799105)
Oh, another thing I thought about, the BSD people probably won't like that it's AGPL dual-licensed (commercial licenses available). Unfortunately, that's the only reasonable license for this right now. One day, if the project is successful enough I'd like to see an ISC licensed version, but that requires a good business model around the ISC license for compilers.