1. Anouncing: Mike's Turbo Euphoria!
- Posted by Jack Cat <catjackus at YAHOO.COM> Jan 06, 2001
- 553 views
That's right... I have a little surprise for all yall.. Imaging this... Euphoria programs running at 2x the speed of compiled C... Euphoria routines that can be stored to Disk and then ran at the speed of light at run-time... All this is possible, thanks to Mike's Turbo Euphoria! It's a special Add-On library, wich is pretty small, and that comes packed with an in-line Euphoria To Machine Code compiler. Use it as a tool to create programming languages... Use it to implement time-criticall routines completely in Machine Code, by writing them in Euphoria! Use it as a DLL mechanism to allow people to extend your bound or compiled programs by writing cool new DLLs for ALL platforms! It works like this. Write a Euphoria function in a Euphoria program, but place it in quotes, like this; "function myfunc(int a,int b) return a+b" Then, pass it to the compiler! Like this; atom myfunc myfunc = new_func("function myfunc(int a,int b) return a+b") And last but not least, call this function, wich has been COMPILED TO MACHINE CODE!; ret = turbo_call(myfunc,{5,6})! Wha? What's that??? Oh, you're asking what the catch is? Well, there's only one catch... You can't use atoms nor sequences in the code you compiled to Machine Code. Why is this? Because in the beginning, Turboria was an in-line C compiler for Euphoria. And C does not have sequences or atoms. But this don't mean you can't pass arrays to Turboria compiled functions! You can poke() them into memory and peek() them from your Turboria code! And as a bonus, peek() and poke() are completely compiled to just just TWO Machine Codes! This means you can now implement that lightning-fast Polygon Filler, that 3D Engine you've been dreaming about, or that lightning-fast Sprite Engine wich runs faster than eany compiler could ever produce! Turboria uses a crapload of code production optimisations to make the most out of your code! branch-straightening, peephole otimisations, pre-evaluation, loop unwinding, etc! I'm just cleaning up the main routine, new_func(), and I'll release this library once I'm done cleaning it up. Oh, one more thing, the library is Shrouded. Yes that's right. You didn't think I was going to give all yall a free Euphoria Compiler did you? Ah hell, actually I am. You can always implement Sequences and Atoms by pre-proccessing code before you pass it to new_func(). Ah crap! I almost forgot! I have to write a few example programs too. Maybe a benchmark showing that Turboria is 300 times faster than regular Euphoria?? Hmm... Mike The Spike __________________________________________________ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/
2. Re: Anouncing: Mike's Turbo Euphoria!
- Posted by Jack Cat <catjackus at YAHOO.COM> Jan 06, 2001
- 554 views
- Last edited Jan 07, 2001
> Heh, figures. Why do you do this? Do you really > think we believe all this > crap about your fancy IDE's and now this "Turbo > Euphoria" thing? You must > have some imagination, because you'll need a lot > more to figure out how > to actually WRITE these things... > > - Matt Heh? WTF are you talking about man? I was just rewriting the main translation loop. Here is the source I was working on: -- TURBORIA.E -- The Euphoria In-Line Compiler -- By Mike The Spike without warning -- Standard Include Files include file.e include get.e -- ASM Include Files include asm.e sequence name, addr name = {} addr = {} function parse_string(sequence str) -- Parse Euphoria Code String Into Tokens ... object ret, word ret = {} word = "" for i = 1 to length(str) do if str[i] = ',' or str[i] = ' ' or str[i] = '\t' or str[i] = '(' or str[i] = ')' or str[i] = '+' or str[i] = '-' or str[i] = '*' or str[i] = '/' then ret = append(ret,word) ret = append(ret,str[i]) word = "" else word = word & str[i] end if end for ret = append(ret,word) return ret end function global function new_func(sequence code) -- Compile Euphoria Code Into Machine Code object address, toks, asm toks = parse_string(code) asm = "" -- Translate to ASM for i = 1 to length(toks) do if sequence(toks[i]) then if equal(toks[i],"integer") then for ix = i to length(toks) do if atom(toks[ix]) then if toks[ix] = '\n' then exit end if end if end for end function global procedure add_routine(sequence name) end procedure if sequence(new_func("procedure math(integer a,integer b)\n integer cp \n return a+b")) then end if Hehe, you can always try to beat me into writing this lib. Try to finish it before I do. This sounds like the kind of work Pete Eberlein would be great at. There's always the possibility I back out, like I ussualy do. Mike The Spike __________________________________________________ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/
3. Re: Anouncing: Mike's Turbo Euphoria!
- Posted by Liona Kerslake <paulk at UNISERVE.COM> Jan 07, 2001
- 524 views
----- Original Message ----- From: Darth Maul, aka Matt <uglyfish87 at HOTMAIL.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Saturday, January 06, 2001 7:29 PM Subject: Re: Anouncing: Mike's Turbo Euphoria! > Heh, figures. Why do you do this? Do what? Do you really think we believe all this crap about your fancy IDE's and now this "Turbo Euphoria" thing? What's an IDE? You must have some imagination, because you'll need a lot more to figure out how to actually WRITE these things... What things?
4. Re: Anouncing: Mike's Turbo Euphoria!
- Posted by Euman <euman at BELLSOUTH.NET> Jan 07, 2001
- 509 views
Try /* parser.c The big freakin' parsing machine... Pete Eberlein <xseal at harborside.com> */ Pete already has the code layed out. The only significant enhancement your code will bring is preprocessed information which anyone can write The amount of math to be done will shorten but, the pointers to sequences will not. On the fly math procedures will not. We already know that Euphoria's main stay are sequences. So tell me, what difference will this make? euman ----- Original Message ----- From: "Jack Cat" <catjackus at YAHOO.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Saturday, January 06, 2001 23:10 Euman Subject: Re: Anouncing: Mike's Turbo Euphoria! > > Heh, figures. Why do you do this? Do you really > > think we believe all this > > crap about your fancy IDE's and now this "Turbo > > Euphoria" thing? You must > > have some imagination, because you'll need a lot > > more to figure out how > > to actually WRITE these things... > > > > - Matt > > Heh? > WTF are you talking about man? > I was just rewriting the main translation loop. > Here is the source I was working on: > -- TURBORIA.E > -- The Euphoria In-Line Compiler > > > -- By Mike The Spike > > without warning > > -- Standard Include Files > include file.e > include get.e > > -- ASM Include Files > include asm.e > > > sequence name, addr > name = {} > addr = {} > > function parse_string(sequence str) > -- Parse Euphoria Code String Into Tokens ... > object ret, word > ret = {} > word = "" > for i = 1 to length(str) do > if str[i] = ',' or str[i] = ' ' or str[i] = '\t' or > str[i] = '(' or str[i] = ')' > or str[i] = '+' or str[i] = '-' or str[i] = '*' or > str[i] = '/' then > ret = append(ret,word) > ret = append(ret,str[i]) > word = "" > else > word = word & str[i] > end if > end for > ret = append(ret,word) > return ret > end function > > > global function new_func(sequence code) > -- Compile Euphoria Code Into Machine Code > object address, toks, asm > toks = parse_string(code) > asm = "" > > -- Translate to ASM > for i = 1 to length(toks) do > if sequence(toks[i]) then > if equal(toks[i],"integer") then > for ix = i to length(toks) do > if atom(toks[ix]) then > if toks[ix] = '\n' then > exit > end if > end if > > end for > > end function > > global procedure add_routine(sequence name) > end procedure > > > if sequence(new_func("procedure math(integer a,integer > b)\n integer cp \n return a+b")) then end if > > > Hehe, you can always try to beat me into writing this > lib. Try to finish it before I do. This sounds like > the kind of work Pete Eberlein would be great at. > There's always the possibility I back out, like I > ussualy do. > > > Mike The Spike > > __________________________________________________ > Do You Yahoo!? > Yahoo! Photos - Share your holiday photos online! > http://photos.yahoo.com/ >
5. Re: Anouncing: Mike's Turbo Euphoria!
- Posted by Jack Cat <catjackus at YAHOO.COM> Jan 07, 2001
- 512 views
--- Euman <euman at BELLSOUTH.NET> wrote: > Try > /* parser.c > The big freakin' parsing machine... > Pete Eberlein <xseal at harborside.com> > */ > Pete already has the code layed out. Heh? Wha? What's parser.c? Isn't that the parser used by PEU? I any case, I can't create a Euphoria library using .c files... > The only significant enhancement your code will > bring > is preprocessed information which anyone can write Wha? And what about the Euphoria To Machine Code translation then? Can anyone write *that*? > The amount of math to be done will shorten > but, the pointers to sequences will not. On the fly > math procedures will not. Not what? It'll be 200-300 times faster than Euphoria with math on integers. And there is no way to get a pointer to a sequence in Euphoria. And even if there was, it wouldn't do you any good. > We already know that Euphoria's main stay are > sequences. Yeah, but a slow-ass interpreted graphics blitter using sequences is worse than a Machine Code Euphoria graphics blitter using pokes. > So tell me, what difference will this make? It'll let you code ASM routines in Euphoria, that's the diff. It translates Euphoria into Machine Code. That means you can implement speed-critical code in Machine Code without having to know how to code in it. That means you write a Euphoria routine that runs faster than compiled C (in some cases), and call it from interpreted Euphoria. But in any case, this lib is becomming a drag to debug. A single error in the ASM code produced and I get a GPF or a Causeway crash. I dunno why I got myself into this one, it's coding someone like Pete can do faster than me. Mike The Spike __________________________________________________ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/
6. Re: Anouncing: Mike's Turbo Euphoria!
- Posted by "Darth Maul, aka Matt" <uglyfish87 at hotmail.com> Jan 06, 2001
- 542 views
- Last edited Jan 07, 2001
Heh, figures. Why do you do this? Do you really think we believe all this crap about your fancy IDE's and now this "Turbo Euphoria" thing? You must have some imagination, because you'll need a lot more to figure out how to actually WRITE these things... - Matt
7. Re: Anouncing: Mike's Turbo Euphoria!
- Posted by "Darth Maul, aka Matt" <uglyfish87 at hotmail.com> Jan 06, 2001
- 534 views
- Last edited Jan 07, 2001
On Sat, 6 Jan 2001 20:10:21 -0800, Jack Cat <catjackus at YAHOO.COM> wrote: >WTF are you talking about man? >I was just rewriting the main translation loop. >Here is the source I was working on: Oh, my apologies then(sorry). - Matt