Has anyone looked into Jai?
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Has anyone looked into Jai?
Jonathan Blow (renowned game developer and critic) is developing a programming language called Jai that seems to be doing some pretty neat stuff. There's a meta language, lots of features that would typically be only in multi-pass compilers, but I think Jon has managed to keep that kind of thing at a minimum so far.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: Has anyone looked into Jai?
50 hours of Jail the game programming language
https://www.youtube.com/playlist?list=P ... KJXD3PkyxO
The idea is old and other peoples done it 10-15 years before.
One exiting example are Temple OS
it's a 64 bit OS and what you would name a console
is the direct mode of holy a C like programming language.
for example if you type the C-function
Dir();
it will be execute directly
if you enter new arguments it compiles the "new" function on the fly and execute it.
Dir(*.txt);
The idea behind it are the good 30 years old C-64
if you powered it on you can type BASIC (without line numbers) and execute it directly.
Terry Davis wrote the OS the last decade and died August 2018.
He was schizophrenic and at the near of genial also :-)
I installed Temple OS two moth ago on a PC running in a sandbox via QEMU.
He asked god is 640 x 480 in 16 colors enough and good anthers "Yes of course" so it looks old school :-)
bla bla bla :-)
There are ton's of Temple OS videos on Youtube
Joshy
https://www.youtube.com/playlist?list=P ... KJXD3PkyxO
The idea is old and other peoples done it 10-15 years before.
One exiting example are Temple OS
it's a 64 bit OS and what you would name a console
is the direct mode of holy a C like programming language.
for example if you type the C-function
Dir();
it will be execute directly
if you enter new arguments it compiles the "new" function on the fly and execute it.
Dir(*.txt);
The idea behind it are the good 30 years old C-64
if you powered it on you can type BASIC (without line numbers) and execute it directly.
Terry Davis wrote the OS the last decade and died August 2018.
He was schizophrenic and at the near of genial also :-)
I installed Temple OS two moth ago on a PC running in a sandbox via QEMU.
He asked god is 640 x 480 in 16 colors enough and good anthers "Yes of course" so it looks old school :-)
bla bla bla :-)
There are ton's of Temple OS videos on Youtube
Joshy
Re: Has anyone looked into Jai?
I have been watching his videos on that for quite a while. It is an interesting idea for sure. I would like to see where it goes.anonymous1337 wrote:Jonathan Blow (renowned game developer and critic) is developing a programming language called Jai that seems to be doing some pretty neat stuff. There's a meta language, lots of features that would typically be only in multi-pass compilers, but I think Jon has managed to keep that kind of thing at a minimum so far.
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Re: Has anyone looked into Jai?
Of particular interest, I'm thinking of times where the FBC devs have said certain features would require multi-pass or updating the compilation process. JAI seems to accomplish a lot while breaking traditional assumptions about what a compiler would require to support those features.Imortis wrote:I have been watching his videos on that for quite a while. It is an interesting idea for sure. I would like to see where it goes.anonymous1337 wrote:Jonathan Blow (renowned game developer and critic) is developing a programming language called Jai that seems to be doing some pretty neat stuff. There's a meta language, lots of features that would typically be only in multi-pass compilers, but I think Jon has managed to keep that kind of thing at a minimum so far.
I wish there was a public source repo but he doesn't seem interested in that at this time.
Re: Has anyone looked into Jai?
Agreed. I thought something very similar. Isn't it already self-hosting at this point?anonymous1337 wrote: Of particular interest, I'm thinking of times where the FBC devs have said certain features would require multi-pass or updating the compilation process. JAI seems to accomplish a lot while breaking traditional assumptions about what a compiler would require to support those features.
I wish there was a public source repo but he doesn't seem interested in that at this time.
-
- Posts: 52
- Joined: Jan 13, 2018 8:47
- Location: Germany
- Contact:
Re: Has anyone looked into Jai?
This looks promising, but ...
return x + y + z;
... why do we need semicolons in 2019? I never got why a programming language would need a semicolon as its line delimiter. Either use 0x0A or simply don't use a line delimiter at all. It's not harder to parse this
than this
Semicolons are the main reason why I switched from C to FreeBasic as my hobby language.
return x + y + z;
... why do we need semicolons in 2019? I never got why a programming language would need a semicolon as its line delimiter. Either use 0x0A or simply don't use a line delimiter at all. It's not harder to parse this
Code: Select all
x=1+2 y=3+4
Code: Select all
x=1+2; y=3+4;
Re: Has anyone looked into Jai?
IchMagBier: correct code is often easy to parse. The real test is Incorrect code like
x=1+2+ y=3+4
or
x=1+2+
y=3+4
is harder. And what about breaking a call with expressions in the arguments over multiple lines?
x=1+2+ y=3+4
or
x=1+2+
y=3+4
is harder. And what about breaking a call with expressions in the arguments over multiple lines?
-
- Posts: 52
- Joined: Jan 13, 2018 8:47
- Location: Germany
- Contact:
Re: Has anyone looked into Jai?
A compiler usually tokenizes the code instead of directly parsing it.marcov wrote:what about breaking a call with expressions in the arguments over multiple lines?
Let's tokenize by hand:
Code: Select all
testfunc(1,2,3)
- SYMBOL "testfunc"
- OPEN PARANTHESIS
- CONSTANT "1"
- COMMA
- CONSTANT "2"
- COMMA
- CONSTANT "3"
- CLOSE PARANTHESIS
Code: Select all
testfunc(1
,2,
3)
Re: Has anyone looked into Jai?
True. But the semicolon is a token so that linefeed (0x0a) can be ignored. IOW if you ditch the semicolon you need something to replace it.IchMagBier wrote:A compiler usually tokenizes the code instead of directly parsing it.marcov wrote:what about breaking a call with expressions in the arguments over multiple lines?
Your example is not multi line, is compilable, and does not have subexpression. As such it is trivial and not interesting for parsing purposes at all. Also parenthesis are not interesting till they nest.The tokenizer would simply ignore the newline character (0x0A) and produce the same tokens as above.
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Re: Has anyone looked into Jai?
To be clear, semicolons are command delimiters. Statements might span multiple lines.IchMagBier wrote:This looks promising, but ...
return x + y + z;
... why do we need semicolons in 2019? I never got why a programming language would need a semicolon as its line delimiter. Either use 0x0A or simply don't use a line delimiter at all. It's not harder to parse thisthan thisCode: Select all
x=1+2 y=3+4
Semicolons are the main reason why I switched from C to FreeBasic as my hobby language.Code: Select all
x=1+2; y=3+4;
Jonathan Blow has mentioned favoring semantics over syntax for the time being. Syntax can be changed, and this isn't necessarily that hard to do.
Everyone's finnicky about their preferred syntax but this is not the hardest or most important part of a programming language.
If semi-colons are your main reason for switching languages, I honestly just don't know what to say. That's really a silly thing IMO and if it's so important to people, you can take the JavaScript route where semi-colons are mostly optional.
For a compiler actively in development, having semi-colons probably makes working on the important things easier, rather than having to spend time going back working on tedious but ultimately trivial issues to resolve parsing and error message ambiguities just because you didn't want a statement delimiter.
But like, in what way do semi-colons bug you, really, other than your own hyper-personal annoyance?
Re: Has anyone looked into Jai?
For curiosity anonymous1337.
Another Jon(athon) got Blown out of the forum a few years ago for promoting another language (Gambas I believe)
Then he came back as scriptbasic and got blown out of the forum again for promoting Cbasic.
You yourself were one of the main assassins for unfortunate scriptbasic, assisted by marcov and angros.
Now here you are enthusiastically promoting javascript(a few weeks back) and now Jai?
I am not bothered in the least of course, but I am confused.
Another Jon(athon) got Blown out of the forum a few years ago for promoting another language (Gambas I believe)
Then he came back as scriptbasic and got blown out of the forum again for promoting Cbasic.
You yourself were one of the main assassins for unfortunate scriptbasic, assisted by marcov and angros.
Now here you are enthusiastically promoting javascript(a few weeks back) and now Jai?
I am not bothered in the least of course, but I am confused.
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Re: Has anyone looked into Jai?
I can tell. I'm not trying to promote anything. I thought it was interesting is because of implications to compiler architecture that could carry over to FBC.dodicat wrote: I am not bothered in the least of course, but I am confused.
JAI is accomplishing a lot while keeping things like multi-pass minimal or non-existent. That's a big deal.
I think we should continue to be aware of what's going on in the rest of the programming world.
Re: Has anyone looked into Jai?
Near as I can tell Jai accomplishes very little in actual fact. It doesn't seem to really exist outside of Mr Blow's own personal computer. There's no public release of any kind as near as I can tell. If there is it isn't showing up as the first link on a google search. Unlike Go, Rust, etc. So whatever advantages it has are completely theoretical as far as I'm concerned. I think I found the beginnings of a third-party implementation of jai on github. Basically if Blow isn't willing to release his language, and especially if he's unwilling to release the source code for his reference compiler (and the source of the runtime library), then it's a nonstarter. period. Especially compared to the other choices out there right now.
That said, new languages are always interesting and worth some study. If you can find a jai compiler somewhere, try to build something in it. See how it goes. Could be fun. I myself recently wrote my first actual Android app (apk and everything). It consisted of less than 100 lines of mostly javascript. I can't see much to love about Javascript, but it did work fairly well and I was able to build my tiny app very quickly. Figuring out the GUI layout took far longer than the coding did.
That said, new languages are always interesting and worth some study. If you can find a jai compiler somewhere, try to build something in it. See how it goes. Could be fun. I myself recently wrote my first actual Android app (apk and everything). It consisted of less than 100 lines of mostly javascript. I can't see much to love about Javascript, but it did work fairly well and I was able to build my tiny app very quickly. Figuring out the GUI layout took far longer than the coding did.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: Has anyone looked into Jai?
If source code creates source code the compile process it self can be a running program.
Nice idea for some tasks like creating jump tables and so one
but that does not realy match the workflow in my stupid brain. :-)
Joshy
Nice idea for some tasks like creating jump tables and so one
but that does not realy match the workflow in my stupid brain. :-)
Joshy
Re: Has anyone looked into Jai?
Yeah lookup tables are used a lot in game programming. Not just for jump tables. But for a lot of other things like colors, openGL triangle buffers, etc. If those are large tables they are often generated by other programs and placed in source code used in compilation. This is actually a fairly common idiom. Of course one could dynamically allocate memory and fill it with the table values at run time, but maybe that is too costly. I dunno. An interesting concept to be sure. I am not sure there are enough use cases to justify its existence in a general-purpose language like FB, though.