Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Hey /prog/

Name: Anonymous 2012-03-07 3:41

improve my virtual machine

git clone https://code.google.com/p/gpvm/

Forgive my lack of documentation. This will be remidied shortly. Also, some instructions remain unimplemented, as I haven't found a use for them yet.

Also, note the absolute lack of references (int &a = b). Haskell has created the idea in my head they are not needed, but I can see them being useful and I will almost undoubtedly implement them at some point.

I look forward to sorting through your abuse to see if anyone says anything constructive.

Name: Anonymous 2012-03-17 22:38

>>79
You'd need a compiler. Right now, the instruction set and VM itself arr going through puberty in a massive way. If you're interested I'd recommended helping with the development over using it right now. Many features don't exist yet and many are changing, so a compiler could easily and quickly become obsolete.

Name: Anonymous 2012-03-17 22:40

>>81
I'll write a scheme compiler for your virtual machine in scheme.

Name: Anonymous 2012-03-17 23:04

>>82
Great! I'll need to spend a while on making comprehensive docs

Name: Anonymous 2012-03-17 23:14

>>82
scheme compiler
It can't even do tail calls or longjmp.

Name: Anonymous 2012-03-17 23:25

It is now possible to call object file functions with the lof (Load object file), cof (Call objectfile function) and cofr (call object file function that returns).

Currently only possibly on x86 as it requeres some asm.

Name: Anonymous 2012-03-17 23:26

>>83
take your time and don't worry. I don't mind reading undocumented code.

Name: Anonymous 2012-03-17 23:29

http://llvm.org/
Why would anyone choose this over LLVM?

Name: Anonymous 2012-03-17 23:33

>>87
Because llvm is a Compiler Infrastructure

Name: Anonymous 2012-03-17 23:46

>>40
It can now calculate the first 30 numbers in the fibonacci sequence in 48 seconds.
It's all an elaborate troll.

Name: Anonymous 2012-03-17 23:52

>>89
That kinda impressed my at first, considering how it would take about 2 minuites beforehand. Also, I was using the recursive method. Using the iterative algorithm is takes about 0.021s.

Name: Anonymous 2012-03-18 6:33

I included a tiny, Haskell written compiler for a typeless, functionless RPN language in the repo. it can be extended to be an interpreter by adding the line system $ "gpvm " ++ outFile to the end (before return () of course)

Name: Anonymous 2012-03-18 12:29

>>87
It's easier to study this because it has a much smaller scope. LLVM is certainly excellent for what it does but it's otherwise a massive beast of a codebase to learn from.

Name: Anonymous 2012-03-18 23:55

>>40
How the fuck did you manage for it take that long? Even Ruby isn't that fucking slow.

Name: Anonymous 2012-03-25 0:26

New assembler
I apologize for being a novice at Haskell

>>93
no experience with MREs
Python was slower than this when it was new.

Name: Anonymous 2012-03-25 1:30

>>93
Because he's (I hope) a troll. No way could someone code that badly that it runs out of memory after 28 Fibonacci numbers unless they malloc(100000000) for each integer, even with ``memory leaks''. No way could someone take 48 seconds to calculate the first 30 numbers in the Fibonacci sequence unless they added sleep(1) for each level of recursion. These are 32-bit integers, not bignums.
>>40
Yesterday, it would run for 1:3x then be killed due to excessive memory usage (It leaked, which is now fixed), and would usually make it to about the 28th number in the sequence.
For reference: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811
What machine are you running this interpreter on? Hopefully it's something like a Commodore 64, but even an interpreter written in C64 BASIC would be faster than this VM.
Also, IHBT.

Name: Anonymous 2012-03-25 1:36

>>95
go flip another patty you uneducated bitch.

Name: Anonymous 2012-03-25 1:38

>>96
Your VM is a slow piece of shit. My grandma can calculate Fibs faster than this with pen and paper.

Name: Anonymous 2012-03-25 2:09

>>97
To be honest that's not fair, your grandmother has a very advanced instruction set and implicit memoization so she doesn't recalculate the numbers.

Name: Anonymous 2012-03-25 3:22

C>>99

Name: Anonymous 2012-03-25 8:30

>>99
nice dubs bro

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List