I got bit by the insomnia bug again, so I downloaded the Visual Studio SDK and started playing around with it. So far it's fairly huge and daunting, and, like most of the Visual Studio Extensibility stuff, pretty poorly documented.
After spending much of the night screwing around, I finally managed …
After spending much of the night screwing around, I finally managed …
There's still a handful of TODOs left sprinkled around the code, but higher-order functions are now in place. This makes it possible to pass a function to another function, and... ahh, screw it, here's an example:
entrypoint : () -> ()
{
operate(41, increment)
operate(43, decrement)
}
increment : (i…
As I mentioned a while back, my big goal for R5 of Epoch is first-class function support - specifically, the ability to work with higher-order functions.
So this afternoon I started hacking away on that. The parser recognizes the syntax and sends off alerts to the parse analyzer, which currently ign…
So this afternoon I started hacking away on that. The parser recognizes the syntax and sends off alerts to the parse analyzer, which currently ign…
With nothing better to do over the weekend, I hacked out reference parameters for Epoch. This means that it is now possible to pass structures to external APIs and get results back. For example, the following Epoch program retrieves the number of processor cores in the host system:
//
// STRUCTUREAPI…
So I finally got around to implementing the code to marshal structures back from the Win32 API into Epoch format.
This would be cause for major celebration, except for one minor problem: all variables in Epoch are currently pass-by-value. This means that a temporary copy of a structure is passed to …
This would be cause for major celebration, except for one minor problem: all variables in Epoch are currently pass-by-value. This means that a temporary copy of a structure is passed to …
Release 4 of the Epoch language prototype is now available.
Lots of new goodies in this release, which you should be familiar with if you've been following my journal lately. I'm too lazy to be keeping a work log at this early stage of the project, so a comprehensive list of changes isn't available,…
Lots of new goodies in this release, which you should be familiar with if you've been following my journal lately. I'm too lazy to be keeping a work log at this early stage of the project, so a comprehensive list of changes isn't available,…
Structures are basically finished, aside from one critical piece: it is not yet possible to pass a structure to an external API. Since this is one of the main goals of structures in the first place (for Win32 support) I obviously have a ways to go before R4 is ready.
My first approach to passing str…
My first approach to passing str…
Unicode
Had a good discussion over the last couple of days regarding Unicode handling in Epoch. As of now my plan for supporting Unicode is to add yet another pass to the lexer/parser system (woohoo for multipass compilation... C++, eat your blackened little heart out).
Essentially, the first pass wi…
Had a good discussion over the last couple of days regarding Unicode handling in Epoch. As of now my plan for supporting Unicode is to add yet another pass to the lexer/parser system (woohoo for multipass compilation... C++, eat your blackened little heart out).
Essentially, the first pass wi…
Took a few minutes this evening and hacked in while loops to the Epoch language. This is the second loop type, following up do/while loops which have been in for quite some time.
Part of implementing a while loop correctly involves elegantly skipping the loop body's instructions when the condition e…
Part of implementing a while loop correctly involves elegantly skipping the loop body's instructions when the condition e…
Much to my chagrin, I realized earlier this evening that tuple members are being stored backwards in memory.
This is because of some laziness on my part in the grammar. Function parameters are passed in reverse order (i.e. the first parameter gets pushed onto the stack first, and the last parameter …
This is because of some laziness on my part in the grammar. Function parameters are passed in reverse order (i.e. the first parameter gets pushed onto the stack first, and the last parameter …
Tuples are most of the way implemented in Epoch now. I'm continually (and pleasantly) surprised by how much easier it is to do things than I would have guessed. Thus far most of the language features have taken far less time to implement than I would have predicted.
So either I'm making a monumental…
So either I'm making a monumental…
I had a quick ponder earlier today about what all would be necessary in order to write a full Win32 app in Epoch.
Structures are obviously very widely used, so I've been planning on doing them for one of the next releases for quite a while. However, something I overlooked was function callbacks. I'l…
Structures are obviously very widely used, so I've been planning on doing them for one of the next releases for quite a while. However, something I overlooked was function callbacks. I'l…
Had a few spare minutes today, so I hacked up serialization and got it finished. Turns out it was a lot quicker of a job than I expected.
I also decided not to serialize directly to a binary format. Instead, the serialization process outputs an assembly language file that targets the Fugue virtual m…
I also decided not to serialize directly to a binary format. Instead, the serialization process outputs an assembly language file that targets the Fugue virtual m…
Alright, ladies and gents, it's time to clip the big red ribbon and unveil Epoch Release 3.
Included in today's festivities are a fully stack-based virtual machine, numerous tweaks and improvements to built-in functions, and a couple of back-stage odds and ends that you probably won't notice unless …
Included in today's festivities are a fully stack-based virtual machine, numerous tweaks and improvements to built-in functions, and a couple of back-stage odds and ends that you probably won't notice unless …
Had a quick hack on Fugue again this afternoon, and finally got everything working the way it should be with regards to the stack. One case I had missed was recursion; because of the way the bytecode is stored, it was possible for a recursive function to obliterate its parent call's stack informati…
I think I'll be posting Epoch Release 3 soon; I'd like to do some documentation work, and a bit of assorted cleanup, but once that's done, R3 will be ready to go. The big changes are of course related to making the VM stack-based rather than the old mutant thing it used to be [grin]
I mentioned earl…
I mentioned earl…
We're back on the air, baby!
As of some unholy hour this morning, I've gotten all the relevant stack-based changes made, so that the guessing game works once again. The pi computation program should be mere hours behind, but there's been a complication.
A lot of core-level guts have changed in the Fu…
As of some unholy hour this morning, I've gotten all the relevant stack-based changes made, so that the guessing game works once again. The pi computation program should be mere hours behind, but there's been a complication.
A lot of core-level guts have changed in the Fu…
I decided to take a few spare minutes and get back into working on Epoch, particularly on making things purely stack-based.
So far, so good; almost all of the arithmetic operations and other built-ins have been removed, awaiting reimplementation in stack-aware forms; but other than that, everything …
So far, so good; almost all of the arithmetic operations and other built-ins have been removed, awaiting reimplementation in stack-aware forms; but other than that, everything …
English is such a weird language. We can burn something up, burn something down, burn it in, or even burn it out. The semantics of the burning are modified entirely by the preposition. Some prepositions invoke literal flame, others give us a more metaphorical image.
I'm interested in one of those pr…
I'm interested in one of those pr…
9:01 PM
I bit the bullet this evening and started hacking on getting stack-based Epoch implemented. So far, progress has been good; local variables are pushed onto the stack when a scope is entered, and popped off the stack when the scope exits. I estimate that about 75% of the requisite work is fin…
I bit the bullet this evening and started hacking on getting stack-based Epoch implemented. So far, progress has been good; local variables are pushed onto the stack when a scope is entered, and popped off the stack when the scope exits. I estimate that about 75% of the requisite work is fin…
Well, I finally ran into something major that will have to change in Epoch.
It's kind of a dumb oversight, really, and hopefully it won't be too big of a fix to make; but it's still the first significant thing I'll have to go back and redo in the VM.
At the moment, lexical scopes exist on the heap. T…
It's kind of a dumb oversight, really, and hopefully it won't be too big of a fix to make; but it's still the first significant thing I'll have to go back and redo in the VM.
At the moment, lexical scopes exist on the heap. T…
12:50 AM
I wasn't even planning on working on Epoch tonight. In fact, I was planning to go to bed and get some much-needed sleep. But after a few minutes of lying around in the dark, thinking up things I could be implementing in the Fugue VM, I decided what the hell, what's a couple of minutes? I'll…
I wasn't even planning on working on Epoch tonight. In fact, I was planning to go to bed and get some much-needed sleep. But after a few minutes of lying around in the dark, thinking up things I could be implementing in the Fugue VM, I decided what the hell, what's a couple of minutes? I'll…
Another productive couple of hours on Epoch today. I've added the real type to the language, so now floating point math is possible. Just for the hell of it I implemented Telastyn's benchmark algorithm in Epoch, with the following results:
entrypoint : () -> ()
{
debugwritestring(lexicalcast(strin…
The Epoch VM is finally in decent shape again after some fairly major additions. As such, I think it's time for another release.
Major points of interest:
Major points of interest:
- This release now includes binaries if you don't want to build from sources
- External DLLs can be called now using the external keyword
- Functions can …
More progress today; the conversion from a standalone EXE to a DLL has been completed, and the menu has been moved to a small client program that launches the VM DLL in order to execute code. This makes it a trivial step to extend that to embedding VM binary code in a stub EXE, as I've detailed ear…
Today's little slice of work on Epoch consisted of something rather different: serialization to a binary format on disk.
Currently, the parser loads raw text code and converts it to lists of "operations" within memory; each operation is an atomic action (from the language's point of view) and includ…
Currently, the parser loads raw text code and converts it to lists of "operations" within memory; each operation is an atomic action (from the language's point of view) and includ…
I know I've been posting a lot lately, but, well, there's a lot going on.
Over a quick lunch break I've made some additions to the VM, mainly in two areas: external DLL calls, and lexical scoping. Lexical scoping and function parameter passing are now solidly in place; it is possible to pass a varia…
Over a quick lunch break I've made some additions to the VM, mainly in two areas: external DLL calls, and lexical scoping. Lexical scoping and function parameter passing are now solidly in place; it is possible to pass a varia…
I set aside a few minutes this evening and worked up further integration between Epoch programs and external DLLs. The result is that a new class of program is possible:
external "user32.dll" MessageBoxW : (integer windowhandle, string message, string caption, integer typeflags) -> (integer)
entry…
Advertisement
Popular Blogs
Advertisement