The Bag of Holding

Profile
Bellevue, WA
A bipolar guy in a pressure-cooker industry
1,455 comments
44 followers
628 entries
Advertisement
ApochPiQ
April 07, 2013
Implementing Higher Order Functions on Top of LLVM
One of my favorite features of the Epoch programming language is the inclusion of first-class higher order functions:apply : (thefunction : ){ thefunction()}apply : string param, (thefunction : string -> string) -> string ret = thefunction(param)mutate : string param -> string ret = par…
2,764 views
ApochPiQ
April 05, 2013
Quoth the VM: I'm not dead yet!
As I've written about previously, I'm working on destroying the Epoch virtual machine for once and for all.

Tonight I hit a major milestone in that effort: 43 of 54 compiler tests are now passing. This is the result of dozens of bugfixes and a truly hideous amount of surgery on the JIT code.

Of the t…
1,244 views
ApochPiQ
March 14, 2013
Death to the VM
After a brief time away, I've come back to Epoch ready to hack on the thing again.

I've remarked several times in the past that I'd like to get rid of the VM implementation that currently runs most Epoch code. This is motivated by a few factors, but primarily performance and a desire to eliminate du…
1,504 views
ApochPiQ
February 05, 2013
Concurrent programming bug - the solution
In my last post I outlined a bug that recently bit me in a reference-counting mechanism in a concurrent system.

If you haven't solved the mystery yet, here's some hints from common guesses I've seen from various people:

  • The reference count is implemented using atomic intrinsics.
  • Atomicity and alignmen…
1,706 views
ApochPiQ
February 02, 2013
Concurrent programming is hard, mmmkay?
Here's a fun bug that I've had in one of my projects for quite some time, which I finally figured out and fixed today.

As with most bugs of this nature, it took dozens of readings through the code to spot it, and by the time I finally realized what I'd done, I felt incredibly stupid. In hindsight it…
1,873 views
ApochPiQ
January 24, 2013
Dude, Just Chill Out.
Hi, my name is Apoch, and I'm a workaholic.


I lived for many years in denial of this fact. It has only been very recently that I've begun to really understand the nature of my condition. There's any number of fancy ways to dress it up, but the bottom line is, I'm addicted to getting things done.

I st…
1,589 views
ApochPiQ
January 04, 2013
Epoch - still getting faster!
With little bits and pieces of free time over the holiday break, I've been working on adding some more oomph to the Epoch native machine code JIT system. In a nutshell, this means a lot of operations which used to be slow and costly are getting cheaper and more efficient.

I've also experimented with…
1,730 views
ApochPiQ
December 03, 2012
Epoch Realtime Raytracing Demo
As I've written about in the past couple of weeks, I've been investing a heavy amount of time into the Epoch programming language, particularly in the realm of runtime performance. Most of the work has gone into implementing native code generation via LLVM so that Epoch programs aren't bottlenecked…
2,140 views
ApochPiQ
December 01, 2012
Oh. Yeah.
Yeah, this just happened:

1,363 views
ApochPiQ
November 30, 2012
Abusing speed for fun and profit (not that kind of speed)
It's a slow Friday afternoon so I figured I'd brain dump some things I've been playing with for Release 14 of Epoch.

As I've mentioned in the past, one of my proof-of-concept programs for R14 is a raytracer. This is for a few reasons:

  • Raytracing is just cool (and I have a nostalgic soft spot for it f…
1,389 views
ApochPiQ
November 25, 2012
FASTAR
300x300 pixels in 480ms.


Just for fun, here's the source of the raytracer as it currently stands:

[source]//
// Some working thought-space for the raytracer project for R14
//


type listnode : list | nothing

structure list :
T value,
listnode next



structure Point :
real x,
real y,
real z

// TODO - fix type …
1,701 views
ApochPiQ
November 24, 2012
Tasty, tasty raytracing!
As threatened, I've been working on a raytracer implemented entirely in Epoch. The results so far are promising:



Render times are hovering around 1.8 seconds for a 300x300 pixel image. Considering that the image itself should be drawa…
1,704 views
ApochPiQ
November 20, 2012
Eat Your Dogfood. It's Tasty.
So a few days ago I shipped Release 13 of the Epoch programming language.

Turns out, that was a bad idea.



R13 has some seriously aggressive features in it. There's support for native algebraic sum types, type aliases (both "weak" in the sense of C/C++ typedefs and "strong" in the not-weak sense), and…
1,695 views
ApochPiQ
November 17, 2012
Holy #&%* Release 13!
So, yeah. I decided I didn't have any patience and went ahead and shipped R13.

Check it.



Templates! Type system enhancements! Bug fixes! It's got it all!
1,456 views
ApochPiQ
November 15, 2012
Release 13 preparations
So now that templates are basically working, it's time to seriously start plotting the 13th release of the Epoch programming language.

I've hammered out a few basic cleanup and documentation tasks, but there's still a lot of room for improvement. My hunch is that at this point I'll probably set abou…
1,231 views
ApochPiQ
November 13, 2012
I'm still not entirely sure I believe that it works
The following Epoch program now compiles and executes:

//
// GENERICLIST.EPOCH
//
// Simple implementation of a singly linked list holding arbitrary data
//


type listnode : list | nothing

structure list :
T value,
listnode next


prepend : list ref thelist, T value
{
list newlist = value, thelist
thelist = ne…
1,275 views
ApochPiQ
November 10, 2012
Refactoring makes my brain hurt.
So as threatened, I implemented generic types last weekend. Took about a solid afternoon to make it happen, so not bad at all.

In the process, I realized that there's just a ton of code in the Epoch compiler in particular that's... gross. So I took a few days and cleaned it up substantially. As a bo…
1,310 views
ApochPiQ
November 04, 2012
Back in the saddle
So once again I've dug out and dusted off the code for Epoch. The last several days have been pretty productive; I finished off the implementation and testing of algebraic sum types, and now the following program compiles and passes all tests:

[source]//
// LISTOFINTEGERS.EPOCH
//
// Simple implementat…
1,598 views
ApochPiQ
September 02, 2012
A Small Tale.
One of the Master's pupils was a notorious hypochondriac.

Every day, the pupil would complain to the Master of some new ailment. At first, it was innocuous; a rash from harvesting herbs, or a scratch from chopping firewood, or maybe a bruise.

But as time wore on, the pupil's complaints became more se…
2,244 views
ApochPiQ
August 24, 2012
Launching Guild Wars 2
This is, without question, one of the most surreal mornings I've ever had.


It's a very rare moment of quiet and calm here at the office, and I wanted to take a moment to reflect on the past year of my life.


I've shipped a few games in my time in the industry. I'm no stranger to the late nights, the f…
6,971 views
ApochPiQ
July 23, 2012
Which [X] Should I Use?
What {programming language | API | toolkit | operating system | etc. } should I use?
A fairly frequent source of discussion in the General Programming forum is the infamous "X vs. Y" thread. Put simply, this type of thread is basically asking which option the poster should choose out of a list of op…
10,285 views
ApochPiQ
July 23, 2012
Oh Noes, My Code Is Teh Crash!
My Code is Crashing. Help!
A common request for assistance in the General Programming forum involves code which is crashing, often for mysterious reasons. When posting a thread discussing a crash, there are a few important things you should do.

1. Understand what the crash really means
That scary-look…
7,485 views
ApochPiQ
July 13, 2012
Random mind dump
Just offloading some interesting tidbits; I might get around to formatting this into a more interesting post later.

  • Floating point determinism is bloody hard, but not impossible, to achieve
  • Syncing between x86 and x64 code is a nightmare
  • SSE2 is pretty much everywhere, so configure your compiler to us…
2,151 views
ApochPiQ
July 02, 2012
Behind the Scenes
I've known since I was very young that someday I wanted to be a video game developer. It didn't take too long to narrow that down to video game programmer. And now, many years down the road, I've wound up precisely where I wanted to be.

It's an interesting quandary, in a way. I work with a phenomena…
2,107 views
ApochPiQ
May 16, 2012
Rapid-fire debugging thoughts
Just a collection of assorted things that have been running through my mind during the past week and a half of marathon debugging...

  • Unless you have a really darn good reason, don't use different coordinate systems for different parts of your game, and especially not if you're using floating-point r…
19,159 views
ApochPiQ
May 08, 2012
Epoch - Generics vs. Templates
This is mostly just some rambling to try and organize my own thoughts regarding the Epoch type system, but it may also be interesting for general consumption, so I decided to post it here instead of just leaving it in my scratch book.


One of the big concerns I have for the next steps of Epoch's deve…
2,140 views
ApochPiQ
May 06, 2012
Sum types are now more powerful
I worked on the sum type implementation for a while, and finally got it up to the point where you can dynamically alter the type of data stored in a sum-typed variable. This is subtly different from dynamic typing; the possible types of the variable are bounded at compile time, and the compiler gua…
1,391 views
ApochPiQ
April 29, 2012
More steroids for Epoch's type system!
This program now compiles and runs under the Epoch trunk:

//
// SUMTYPEFUNCTION.EPOCH
//
// Basic test of functions operating on sum types
//

type test : integer | string



sumfunc : integer param
{
assert(param == 42)
}

sumfunc : string param
{
assert(param == "bletch")
}


entrypoint :
{
test foo = 42
1,699 views
ApochPiQ
April 27, 2012
Epoch Type System += Steroids
Another productive week in Epoch-land!

The first phase of my recent set of changes was to introduce the internal concept of type families. These are groups of type ID tags that represent different categories of semantics. For example, I used to reserve everything above the ID number 20 as "structure…
1,577 views
ApochPiQ
April 24, 2012
Musings on Epoch features
I'll just leave this here...


//
// Define a recursive structure for a singly linked list
//
// A list must contain at least one element. If empty lists
// are desired in a given context, use the algebraic sum
// type (list | nothing) to indicate that the list may
// be empty.
//
// Note that the "next" memb…
1,885 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