4 ms·
I strongly encourage anyone interested in programming languages to watch his series about Jai, the language he is creating for his next game. Starts here: http
by erikpukinskis 11y ago
I strongly encourage anyone interested in programming languages to watch his series about Jai, the language he is creating for his next game. Starts here:
https://www.youtube.com/watch?v=TH9VCN6UkyQ&list=PLmV5I2fxaiCKfxMBrNsU1kgKJXD3PkyxO https://www.youtube.com/watch?v=TH9VCN6UkyQ&list=PLmV5I2fxai...
It's not released yet, but watching the videos has massively changed the way I think about programming. The notion of "data-driven programming," which I would describe as "only move around the data you have to", has been a real revelation to me. I sort of came out of the Ruby world (and Java before that) where the attitude is more "Abstract all the things!"
I have been trying to apply many of Blow's principles in my JavaScript programming and it has been awesome. I find myself staying closer to the "metal" (which in JavaScript world is pure Node and low-level browser APIs) and it has been incredibly rewarding.
I've also really enjoyed his policy of pragmatism over idealism. I think the React world for example has taken a good idea (immutability can clarify data flows) and turned it into a religion (Everything Must Be Immutable!) Watching Blow work has given me the confidence to steer away from that.
Much in the same way that learning Rails made me a better programmer (even though I don't use it anymore, and I've rejected a lot of its premises) I have found learning Jai has really leveled me up as a programmer and a computer science thinker.
- hellofunk 11y agoYou might really enjoy Clojure, which is a data driven language, even the code itself is data. It also challenges how you think about programming, as any lisp would.
- jp_sc 11y agoOr Elixir, which is nicer if you prefer Ruby syntax over -Java- (updated:) Lisp
- dragonwriter 11y agoThat's an odd comparison to Clojure, because while Elixir has vaguely Ruby-esque syntax, Clojure, despite excellent Java interop, has Lisp syntax, not Java syntax, even down to having method calls on Java objects look like Lisp function calls -- (.methodName object) rather than object.methodName
- cableshaft 11y agoWhich premises of Rails have you rejected? I'm just now starting to learn it. It seems very inflexible so far, and a lot of things seem too magical (I'm used to being able to follow where things are being set on a step by step process), but it does seem like if it finally clicks I should be able to crank out my website concepts a lot faster.
- erikpukinskis 11y agoThe big one is "Convention Over Configuration", which means there are magical things you can do that have lots of wonderful side effects. If you put a file in the right directory, the Rails engine will react by doing lots of things in lots of different parts of the request lifecycle. You don't have to connect your routes, views, and controllers, you just have to structure them correctly on the filesystem and you let Rails glue everything up. This tradition has been carried on by Ember. It is great when it works... after spending a year or so in Rails, you are able to make lots of things happen with just a few lines of code. But it makes debugging a nightmare. Even after several years of Rails programming I would often find myself in a situation where I needed to debug down into Rails internals just to understand what was happening so that I could figure out where my code was wrong. A good contrast would be raw (no framework) PHP. If you want to know why your PHP script isn't working, it's easy to figure out what's going on: Just look at the URL, get the name of the file, start from the top of that file and trace through your code until you find the problem. Ember (although I love it) is very similar to Rails in this regard. It took me about a year to get to the point with Ember where I knew what magical buttons to push to make things happen. But I also found myself continually needing to debug into the framework to understand why my code didn't work. To their credit the Ember folks are doing well to mitigate this problem by having good error messages and documentation. You also see the same complaint come up a lot in regards to the ActiveRecord pattern. It has you set up a bunch of declarative facts about your data model, and then then your giant ActiveRecord library does a lot of super smart things in response to a simple command like "update". It's cool when it works, but when it's not doing what you expect it's miserable to debug into the query builder. These days I'd much prefer just to have a good, imperative (do this, then that) interface on top of SQL.
- 11y ago
- hacker_9 11y agoSee here for a write up up Jai's language features: https://sites.google.com/site/jailanguageprimer/ https://sites.google.com/site/jailanguageprimer/ John is clearly coming in from a C++ mindset and is essentially fixing problems with the language that should have been really been fixed long ago. I think it looks interesting, but I'm not sure it really solves any big problems? Just seems to be a bit better syntax.
- greggman 11y agoIt's not just a better syntax for C++. If nothing else being able to use the entire language at compile time is a huge step in the right direction IMO. C++ meta programming IMO was never meant for meta programming. It was intended do to a few simple template things, then someone discovered if you made an array of size [-1] you could basically turn it into a turing complete language. But, the contortions you have to go through are ridiculous. It's like writing photoshop in bash script. I'm surprised someone hasn't written an LLVM pick your language to C++ meta programming compiler just to not have to deal with that crap. Sure that feature has been around in other languages for decades (lisp) but it's sorely missing from C++. People usually work around it by writing code generators, almost always in other languages. There were other interesting ideas like using the closure specifiers to enforce function purity including all functions they call. I haven't followed whether that has worked out or not. On top of that syntax matters. As JBlow pointed out, every time he has to waste time refactoring 50 lines of code for something that should be a 1 character change or spelling things out the compiler should be able to figure out is a huge drag on productivity and motivation. That was my #1 take away from the videos I watched. How about designing a language for programmer joy. Most languages pick something else (multi-processing, memory safety, ...) but whether or not it will actually be pleasant and fun to program in is rarely considered. Sure some people get off on solving the puzzles of contorting their language of choice to do something difficult. Especially C++ meta programming gurus. Others of us just want to get shit done. It's not writing the code that's fun for us. It's the result. The faster we can get there the more we can work on polishing and iterating.
- hyperion2010 11y agoI watched all his videos and my main take away was that there is actually no high level language besides C (and restricted subsets of C++ that don't use templates) that can be used to tell the computer what to do. Almost every high level language we have already abstracts away the idea that you are trying to control a piece of hardware. Game programmers are in an ideal position to have learned what is actually needed to make talking to a computer more efficient. The fact that J also has the vision to build the language to account for real world development processes is almost like an added bonus.
- nulltype 11y agoFor anyone interested in just programming, he has a great talk here: https://www.youtube.com/watch?v=JjDsP5n2kSM https://www.youtube.com/watch?v=JjDsP5n2kSM about "how to program independent games". Much of the advice seems to apply to other programming projects too.
- jaimebuelta 11y agoOne has to love someone that writes their own computer language (plus compiler) for making a game...
- erikpukinskis 11y agoHe actually avoided it for a long time. He had suspicions it would be worthwhile for an industry-wide effort to make a games/high performance-specific language, but thought it would be too much work for an individual developer. While building a research prototype though, he decided it was easier than he thought it would be. While he has been finishing The Witness (the subject of the original posting) he has been prototyping the language and it has been going well enough he decided he won't build another game in C++.
- yoklov 11y agoSmall nit: Data oriented != data driven (Jon Blow was talking about the former). There are some nice posts about using Data Oriented Design in Lua on the bitsquid blog, and I have used it once or twice in JS using Typed Arrays (It's awkward though). Still valuable, and one of the few ways of getting reliable performance out of VMs. Also, if you haven't seen it, look up Mike Acton's CPPcon talk on it. I'd link to it (and the bitsquid posts) but I'm on mobile right now.