-
-
Notifications
You must be signed in to change notification settings - Fork 125
Generate and execute Haskell code when compiling iogii #2037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Probably need this to make all holes solvable. I solved brainfuck in iogii, but while my solution completes correctly in about 1.5 seconds with -O and 2.2 seconds without -O with Haskell locally, with the Ruby interpreter it solves 10 cases in 45 seconds and then overflows the stack even with a huge setting. The solution is a straightforward (in design...) functional approach representing the brainfuck machine state as a 2D tensor (pointer, disabled loop depth, tape, loop stack, output) and then using iterate with the brainfuck step execution function to compute a 4D tensor with the added dimensions of input number and time and then printing the output where the machine first executes past the end of the input code. It may be possible to optimize it (I tried to , but it looks like Haskell is at least 30x faster on complex examples. Compilation with GHC is also 1.5-2.5 seconds but the code golf machine should be at least 2x faster than the one I'm using, so it shouldn't be an issue. |
|
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. |
Additionally, you will notice a number of changes that improve the formatting consistency of the many files in the `langs` folder.
1.0
7ef2c94 to
29b4182
Compare
GHC 9.14.1
1.1.1
What the hell happened there?
The upgrade to 1.1.2 has significantly improved this whole concept, and we've been working on it for a while. All credit goes to Mr. Darren @darrenks Smith, copyright holder of the golfscript domain and all its content. I'm finally trying to get it onto the website. Demand for it is high and has never really gone away. Fortunately, after many changes and all sorts of experiments, which were actually quite solid, a new tool has emerged in the form of an engine for lightning-fast generation and interpretation of Haskell code when starting the compilation of iogii source files. Co-authored-by: darrenks <darrenks@users.noreply.github.com>
|
The upgrade to 1.1.2 has significantly improved this whole concept, and we've been working on it for a while. All credit goes to Mr. Darren @darrenks Smith, copyright holder of the golfscript domain and all its content. I'm finally trying to get it onto the website. Demand for it is high and has never really gone away. Fortunately, after many changes and all sorts of experiments, which were actually quite solid, a new tool has emerged in the form of an engine for lightning-fast generation and interpretation of Haskell code when starting the compilation of iogii source files. |
Thanks Yewzir for working to get this engine operation. Just to clarify, the engine is a regular haskell program, it interprets some intermediate code that ruby iogii generates, no compilation during running of iogii programs is needed anymore. I created the engine specifically to for this site since it doesn't require GHC (except for build of engine), and is very fast (virtually no startup time and 25 times faster than the ruby interpreter). Perhaps most importantly it also avoids the stack overflow problem that plagues the ruby interpreter here. |
darrenks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Updates #1770