🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
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…
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…
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…
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…
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…
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:
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…
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…
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…
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…
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…
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…
I've also experimented with…
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…
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:
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…
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 …
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 …
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…
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…
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!
Check it.
Templates! Type system enhancements! Bug fixes! It's got it all!
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…
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…
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…
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…
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…
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…
[source]//
// LISTOFINTEGERS.EPOCH
//
// Simple implementat…
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…
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…
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…
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…
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 o…
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 o…
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-loo…
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-loo…
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…
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…
It's an interesting quandary, in a way. I work with a phenomena…
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…
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…
One of the big concerns I have for the next steps of Epoch's deve…
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…
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
…
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…
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…
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…
Advertisement
Popular Blogs
Advertisement