Intel sponsors gamedev.net search:   
The Bag of HoldingBy ApochPiQ      
Apoch's Avatar

Apoch
XP: 64,738
Inventory
Special Items: Shpongle | XBox Live
My brain is built of paths and slides and ladders and lasers and I have invited all of you to enter its pavilion. My brain, as you enter, will smell of tangerines and brand-new running shoes.

Friday, May 29, 2009
I can officially cross off unary operators, parenthetical expressions, and the buffer datatype.

I decided to make buffer purely heap-allocated, and use a garbage collector to reclaim unused buffers, similar to how I plan to handle strings. Buffers are mainly useful for interacting with external APIs that expect space to stuff data into.

In addition to the big feature items, I've caught and squished a horde of minor parser bugs, including some issues with infix operators, response maps, and reference parameters. Nothing really worth describing, but if you've noticed odd/potentially buggy behaviour in the parser in R6, chances are it's cleaned up in R7.


At the moment I'm working on the message allocator which should hopefully replace hits to the freestore from new and delete. The goal is to make message passing as fast as possible. Right now on my E6600 development box the message throughput is northwards of 55,000 messages per second, and I'm still finding ways to improve on that. It still isn't clear whether or not the lock-free allocator really adds any speed, but I should know soon when I get some more tests done.


After that... there's relatively few things left to do for R7, aside from the code review which I expect to chew up a significant amount of time. So conceivably I might actually publish R7 before the extinction of the human race.

Comments: 0 - Leave a Comment

Link



Wednesday, May 27, 2009
Had a good run this evening working on Epoch Release 7; the main bits I've added are as follows:

  • map() function for applying a unary function to a series (list) of elements

  • reduce() function for applying a binary function to a series (list) of elements, tracking the result

  • The new future() function, which constructs a future that can be used to asynchronously initialize variables

  • The new var() function constructs a variable and infers its type from the second parameter to the function

  • And of course the usual horde of minor fixes and enhancements, especially to the way certain operations are implemented



This prunes down the TODO list a bit:

  • Unary operators

  • Parenthetical expressions (for overriding precedences)

  • Custom message allocator to avoid locking on the heap when sending task messages

  • Fix some bugs in nested response map support

  • Improve syntax for nested structure initialization

  • Buffer entity (both stack and heap types)

  • Type aliases (aka. typedefs)

  • Change task IDs to string variables for easier metaprogramming

  • Perform complete code review for exception safety, documentation, code cleanliness, error handling robustness, and elimination of hardcoded strings/magic numbers



Still can't make any predictions on when any of this will be ready to ship, but I'm still plugging away, so it'll be fairly soon™


I'm also strongly considering moving the codebase over to Google Code so I can get some proper version control and a nice off-site backup.

Comments: 0 - Leave a Comment

Link



Sunday, May 24, 2009
Put in some more time on Epoch R7 this weekend; so far the results are slow but promising. Lots of tiny little niceties are working correctly now, mostly to do with infix operators.

I've been pretty lax with keeping track of the changes and updates in R7, but there's a general list a couple posts ago which covers the major additions.

As of this point I have the remaining major items, plus a couple of random TODOs scattered through the code:

  • Unary operators

  • Parenthetical expressions (for overriding precedences)

  • Custom message allocator to avoid locking on the heap when sending task messages

  • Fix some bugs in nested response map support

  • Improve syntax for nested structure initialization

  • Buffer entity (both stack and heap types)

  • Type aliases (aka. typedefs)

  • Map and reduce functions

  • Futures

  • Change task IDs to string variables for easier metaprogramming

  • Perform complete code review for exception safety, documentation, code cleanliness, error handling robustness, and elimination of hardcoded strings/magic numbers


Still quite a load of work ahead, but the list shrinks steadily


R7 is mostly a maintenance release with a couple of nice new features; however, I'm already looking ahead to R8 and thinking about what role it needs to take on in order to best advance the Epoch project. At this point my plan is to introduce GPGPU support in R8, making it the first "killer" version of the language with actual support for the areas in which I want to make Epoch shine.

Comments: 0 - Leave a Comment

Link



Thursday, May 21, 2009
I've spent the few rare free moments I have working on Epoch lately; there's a healthy set of things getting checked off the R7 work list (see previous entry) and progress is definitely being made.

There's still a few kinks to work out, but infix operators are now working more or less perfectly. Along with a few other tweaks, this changes the code from something nasty and littered with function calls, to this:

//
// TASKS.EPOCH
//
// Demonstration of the multiprocessing capabilities of Epoch
//


entrypoint : () -> ()
{
	task(asyncjob1)
	{
		pi_task()
	}

	task(asyncjob2)
	{
		pi_task()
	}

	task(complexjob)
	{
		acceptmsg
		(
			compute(integer(a), integer(b), integer(c), string(d)) =>
			{
				message(sender(), completed(a * b + c, d))
			}
		)
	}

	message(asyncjob1, calculate("ignored"))
	message(asyncjob1, ignoredmessage("foo", "bar", 42))

	message(asyncjob1, calculate(10000.0))
	message(asyncjob2, calculate(50000.0))

	message(complexjob, compute(5, 4, 2, "Filler"))

	debugwritestring("Please wait, async tasks running...")


	integer(baz, 42)
	debugwritestring("Main task: " . cast(string, baz))

	responsemap(resulthandler)
	{
		result(real(foo)) => { debugwritestring("Pi result: " . cast(string, foo)) }
		completed(integer(a), string(b)) => { debugwritestring(b . cast(string, a)) }
	}

	acceptmsg(resulthandler)
	acceptmsg(resulthandler)
	acceptmsg(resulthandler)
}


pi_task : () -> ()
{
	acceptmsg(calculate(real(limit)) => { message(sender(), result(pi(limit))) } )
}


pi : (real(denominator_limit)) -> (real(retval, 0.0))
{
	real(denominator, 1.0)
	boolean(isplus, true)

	do
	{
		real(div, 4.0 / denominator)

		if(isplus == true)
		{
			retval = retval + div
		}
		else
		{
			retval = retval - div
		}

		isplus = not(isplus)
		denominator = denominator + 2.0

	} while(denominator < denominator_limit)
}



Since the lack of good infix operators was pretty much the number one complaint about the language, I trust that this will boost your enthusiasm accordingly

Comments: 0 - Leave a Comment

Link


All times are ET (US)

In locus hic, omnes res dementes sunt.
 
S
M
T
W
T
F
S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
22
23
25
27
28
30

OPTIONS
Track this Journal

 RSS 

ARCHIVES
July, 2009
June, 2009
May, 2009
April, 2009
March, 2009
February, 2009
January, 2009
October, 2008
September, 2008
August, 2008
July, 2008
June, 2008
May, 2008
April, 2008
March, 2008
February, 2008
January, 2008
December, 2007
November, 2007
October, 2007
September, 2007
August, 2007
July, 2007
June, 2007
May, 2007
April, 2007
March, 2007
February, 2007
January, 2007
December, 2006
November, 2006
October, 2006
September, 2006
August, 2006
July, 2006
June, 2006
May, 2006
April, 2006
March, 2006
February, 2006
January, 2006
December, 2005
November, 2005
October, 2005