ok
ok copied to clipboard
Question: Have you planned to add REPL?
@elliotchance @gitter-badger Have you planned to add REPL?
I hadn't planned to. I can see the value in a REPL to play with the language, - especially early on - but as ok moves to a compiled language that might be difficult or disappear entirely.
I'll keep this in mind and see if I can get something out soon.
@elliotchance Also I have a question about Ok compiler. Does the Ok translates to golang and then compiles?
ok is not a transpiler, it compiles to an instruction set for the ok VM. This is just for simplicity early on (since writing a VM is much easier than a ASM compiler) as the language evolves quickly. If the language turns out to be useful I would like to remove the VM so it creates native binaries.
As a stepping stone (and for portability) ok build
creates a binary that includes the VM and compiled bytecode so it can behave as a stand alone binary.
@t0md3an - I've had some time to think about it. I don't think a REPL makes sense for a compiled language. Not to say it's not possible or isn't valuable, but that I don't belive it should be a core language or tooling. I'd welcome someone else to create a REPL for ok as a separate project.
That being said, a playground feels like a much better choice. Here is an alpha: https://play.getok.dev
Shhhhhh it's top secret, so don't tell anyone... 😄
Hello Elioth. I think adding the test to play.getok.dev would be a good idea. For example creating a dedicated test button that sends the test code to test_code.okt file.
For design, it is best to have the editor in the form of a column rather than a row. To occupy the left side of the screen. The right side remains for the buttons and the output. We will be able to see as many lines of code as possible. This is not necessary, but it is beautiful. Thanks .