The Bag of Holding

Profile
Bellevue, WA
A bipolar guy in a pressure-cooker industry
1,455 comments
44 followers
628 entries
Advertisement
ApochPiQ
December 11, 2013
Self-hosting the Epoch Compiler: Day One
As I've written about here previously, I have a personal goal of self-hosting the Epoch language compiler by the end of 2013. The other night I actually ran the first attempt at passing the compiler source code through itself; the results were underwhelming, to say the least.

My main enemy out of th…
1,489 views
ApochPiQ
December 10, 2013
Two steps forward, one step sideways
Over the weekend, I finished the last of the Epoch compiler support for templates. This means that, in theory, the Epoch-implemented compiler is capable of passing every test in the compiler test suite that I use for the C++ version of the compiler.

Unfortunately, I introduced two regressions along …
1,416 views
ApochPiQ
December 02, 2013
Breaking down the Epoch parser
I've had several requests for a detailed look at how the Epoch compiler parser works, so I figured I'd write up a summary of how everything fits together.

All Epoch programs begin their life in the entrypoint function. The compiler's entrypoint is fairly simple, but it contains a lot of extra stuff …
1,463 views
ApochPiQ
December 01, 2013
Zeroing in on self-hosting
After a short break, I'm back to hacking on Epoch again.

Today was pretty productive; made several additions to the parser, added support for a few lingering language features that have been neglected up until now, and fixed a couple minor bugs. The compiler is getting richer, the test suite is expa…
1,357 views
ApochPiQ
October 17, 2013
Speculation on semantically-aware version control
Working on a massive code base comes with some interesting challenges.

Consider this scenario, loosely based on a real-world problem we recently encountered at work:

  • Create a multi-million line code base
  • Divide this into over two dozen branches for various independent development efforts
  • On some given …
1,861 views
ApochPiQ
October 01, 2013
Advice to a Young Programmer
One of the awesome things about ArenaNet is that we run a programming internship program that actually does a phenomenal job of preparing people to work in the games industry. This is accomplished by focusing on three primary principles:

  • Everything you do will matter. There is no pointless busy-work…
14,289 views
ApochPiQ
September 29, 2013
So close, and yet so far
After implementing a bit of value-based pattern matching support, the Epoch compiler is now down to 7 tests remaining before it's ready for self-hosting.

Of those 7, four are related to templates, which will be the last major endeavor required to get self-hosting viable. Templates are scary and will…
1,687 views
ApochPiQ
September 19, 2013
Still rambling about self-hosting
Down to 9 tests in the compiler suite that still need some love before they will pass.

For those not keeping score at home, this means that 58 out of 67 compiler tests are passing in the Epoch implementation of the Epoch compiler. In other words, Epoch is getting very, very close to being able to co…
1,595 views
ApochPiQ
September 10, 2013
Speculation and such
Just fooling around.


//// Define an Epoch task that does some work//task Worker :{ // // This specifies a "message signature" which can be // used by and instance of this task to receive data // and commands from other code. // Work : integer a, integer b { // Do some com…
1,568 views
ApochPiQ
August 25, 2013
Epoch self-hosting progress
So the Epoch compiler is now written end-to-end in Epoch. There is no C++ left in the bootstrapping process aside from the runtime environment which does garbage collection and such.

Sadly this doesn't mean that we're quite to self-hosting just yet. Only about a third of the compiler test suite is p…
1,217 views
ApochPiQ
August 10, 2013
Epoch Optimizations and Garbage Collection
Following the Great Garbage Collection Debug Spree of the past few weeks, I've noticed a general trend towards bad performance in the realtime raytracer benchmark. At one point it was down to ~6.5FPS peak performance, which is just unacceptably bad.

Profiling revealed two main causes of this slowdow…
2,026 views
ApochPiQ
August 02, 2013
VINDICATION
Turns out my garbage collection woes are over.


I was strongly suspicious of the inliner in my last post, and it turns out that this hunch was (albeit indirectly) completely correct.

The obvious thing to do when facing a bug like this is to compare the code generated; dump out a listing of the version…
1,019 views
ApochPiQ
August 02, 2013
The ongoing mission
Nailed down some more quirks in the GC over the past day; unfortunately the last one is a real bugger.

It appears that LLVM's function inlining optimizations cause the GC to go slightly insane. I have yet to ascertain the exact interaction between the inliner and the GC, but disabling all inline fun…
927 views
ApochPiQ
August 01, 2013
More adventures in garbage collection
One of my least favorite types of bug to unravel is the Ball of Yarn.

A Ball of Yarn is not just one bug. It's a large number of bugs, all in close proximity, which influence and interact with each other. If you pull on one of the threads, one of two things will happen: either you will slowly gain i…
1,286 views
ApochPiQ
July 25, 2013
Hard lessons
I've learned three nasty lessons this week.


First, exception handling in C++ is a knotted mess of undefined behavior, especially when you start blending JIT compiled native code with C++ code that can throw exceptions.

Second, as a result of this, when testing code you should always run it under a de…
2,597 views
ApochPiQ
July 21, 2013
IDE hackery
As I continue to mess with self-hosting the Epoch compiler, I'm spending a lot more time actually editing Epoch code than C++ code. This is a wonderful thing overall, since I basically created the language precisely so I could quit writing apps in C++.

Writing a lot of Epoch code in Notepad is prett…
1,282 views
ApochPiQ
July 17, 2013
I'll just leave this here...


Here's the kicker: the compiler that produced this working program is written entirely in Epoch.



Yes, the test program is extremely minimalistic, but it passed.

Self-hosting completion is now just a matter of getting the parser to unde…
1,320 views
ApochPiQ
July 15, 2013
Self-hosting: major milestone on the path has been reached!
I exulted over this rather vocally on Twitter, but in case you don't follow me (@ApochPiQ), I'll repeat it here:

At 12:15AM this morning, Epoch's compiler successfully generated itself, when provided with a decorated AST from the C++ compiler front-end.


What this means is that I have a fully working …
1,565 views
ApochPiQ
July 07, 2013
Epoch Self-Hosting Progress
I've been working off and on for a few months now on creating a self-hosting compiler for the Epoch programming language.

In brief, this means that the language itself is robust enough to implement a complete compiler, which in turn is an implementation of the Epoch language. (Presently, Epoch is im…
1,330 views
ApochPiQ
June 13, 2013
ArenaNet Internships
Wanting to break into the game industry but lacking vital work experience? Come check out ArenaNet's 2013 internship program.

Highlights:
  • Paid internship program[/*]
  • Do real jobs that are vital to company success, not busy-work[/*]
  • On-site in Bellevue, WA[/*]
  • One year duration[/*]

    Hit the link to find ou…
2,185 views
ApochPiQ
May 06, 2013
Full speed ahead!
My big project at the moment involves rewriting the Epoch language compiler for what feels like the millionth time.

The good news is, instead of yet another C++ incarnation of the compiler, this time around I'm moving towards a self-hosted model, where the compiler for Epoch is itself an Epoch progr…
1,177 views
ApochPiQ
April 22, 2013
More self-hosting goodness
Bytecode generation is done... more or less. I have a feeling there's a few instructions that are still missing but the compiler test suite passes so obviously there's plenty of stuff that does work...

Instead of spamming my journal here with noise about this every couple of days, I'm going to keep …
1,185 views
ApochPiQ
April 21, 2013
Self-Hosting Progress
As I've discussed previously, my goal for Epoch Release 15 is to get the compiler self-hosting. In a nutshell, that means that an Epoch program will be used to compile all other Epoch programs, including itself.

To do this, I'm working backwards from the compiler back-end first to the lexer/parser l…
1,264 views
ApochPiQ
April 17, 2013
Epoch Plans for the Future
Release 14 of the Epoch programming language is now live!

That brings us to the pertinent and slightly bothersome question: what will be worked on for Release 15?


There are a number of features I'm interested in improving and/or implementing, ranging from object lifetime semantics to parallelism func…
1,987 views
ApochPiQ
April 15, 2013
Release 14 imminent...
So I've been looking over my past notes and decided that I'm pretty happy with the state of affairs over in Epoch land. The garbage collector is running, tuned for reasonable performance, and successfully keeps the native-code realtime raytracer clamped at a decently small degree of RAM usage.

The o…
1,270 views
ApochPiQ
April 14, 2013
Victory is mine!
It was an epic fight, but I finally managed to subdue the last few LLVM garbage collection bugs and get a full test suite pass.

I'm kind of tired (it's 5:30AM and I've been running all night) so I'll try to reword that a little more clearly:


Epoch is, as of right now, passing all compilation and runt…
1,413 views
ApochPiQ
April 11, 2013
Real-world garbage collection with LLVM
The last major task for release 14 of the Epoch programming language is integrating garbage collection with the LLVM-supported JIT native code generation layer.

Ostensibly, LLVM supports hooks for making garbage collection possible. It doesn't take much digging to find out that this is a complete li…
10,222 views
ApochPiQ
April 08, 2013
Epoch Release 14 Finalization Plan
Last night at some unholy hour I finished a first pass at marshaling Epoch data back and forth across C-ABI boundaries. In less annoying terminology, this means that Epoch programs can do things like call Windows API functions, C-compatible APIs in other DLLs, and so on. More interestingly, those A…
1,648 views
ApochPiQ
April 08, 2013
Almost there...
Today I wrapped up the last Epoch compiler test suite failure besides C-API marshaling. That means 53 of 54 compiler tests are passing as pure native code - no VM to get in the way and slow things down.

Once C marshaling is in place, I'll need to rework the garbage collection implementation a bit, a…
1,182 views
Advertisement

Popular Blogs

shawnhar
Generalist
101 Entries
9 Followers
15 Entries
10 Followers
johnhattan
Programmer
1,277 Entries
47 Followers
ApochPiQ
Generalist
628 Entries
44 Followers
dgreen02
Generalist
338 Entries
56 Followers
Advertisement