🎉 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!
![Implementing Higher Order Functions on Top of LLVM](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Quoth the VM: I'm not dead yet!](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Death to the VM](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Concurrent programming bug - the solution](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Concurrent programming is hard, mmmkay?](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Dude, Just Chill Out.](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Epoch - still getting faster!](https://uploads.gamedev.net/blogs/monthly_01_2013/blogentry-33873-0-81237300-1357334783.png)
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…
![Epoch Realtime Raytracing Demo](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Abusing speed for fun and profit (not that kind of speed)](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![FASTAR](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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 …
![Eat Your Dogfood. It's Tasty.](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Holy #&%* Release 13!](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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!
![Release 13 preparations](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![I'm still not entirely sure I believe that it works](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Refactoring makes my brain hurt.](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Back in the saddle](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![A Small Tale.](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Launching Guild Wars 2](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Which [X] Should I Use?](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Oh Noes, My Code Is Teh Crash!](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Random mind dump](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Behind the Scenes](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Rapid-fire debugging thoughts](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Epoch - Generics vs. Templates](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Sum types are now more powerful](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![More steroids for Epoch's type system!](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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
…
![Epoch Type System += Steroids](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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…
![Musings on Epoch features](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
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