One language to look at for reference that most people haven't heard of is Clay. It isn't kept up any more, but it's aim was to be a modern generic C. It made use of very clean generic programming with move semantics and no garbage collection. The person who wrote it was using it as a substitution for C at his work already.
Maybe because it hasn't been updated in 3-4 years?
Jai Language Primer
51–60 of 102 posts
Re: Jai Language Primer
#52Earlier quoted context omitted.
This shows a bias that high-level languages do not have native code compilers that can generate faster code than what someone writes in C/C++. This is not true. Some of these compilers can produce better native code because the language lets you write better code in the first place.
I wasn't talking about all high level languages, just LISP. My experience is that people who like a particular language try to rationalize and convince others that there is no downside. I would love to see and example of LISP being as fast as C++ with multi-threading and cache coherency taken into account, using the same amount of memory, with no pauses from the gc that would affect interactivity. If it hasn't happen…
There are always trade-offs. GC is a win because manual memory management is terrible and error prone, but a lose because you have to learn how to tune it to behave the way you need. But no matter the language some things stay the same: learn to anticipate what code your compiler is going to generate, check what the optimizer is doing, check the disassembly, use the profiler. Good GCs and compilers play all the same games with cache locality and such, and some are better than others. I think you are underestimating the advances in compiler design. Maybe you think C/C++ are fine languages, and that's OK, but personally they are the absolute last resort for when I reach limitations of my language's compiler and runtime.
Re: Jai Language Primer
#53Earlier quoted context omitted.
>When we look at Lisp we see archaic user interfaces, legacy keywords such as car, cdr and cons which bear no meaning to us mere mortals. Also no clear consensus on what extensions to use. Car, cdr, and cons take very little time to understand, but yes their meaning is steeped in history. "car" returns the first element of a pair, "cdr" (pronounced like "could-er") returns the second element of a pair, and "cons" cre…
> S-expressions [...] allow for syntactic abstraction I never bought this argument, based on my intuition, but now Julia has proved this argument to be invalid. Insisting only S-expressions allow macros is simply intelectually dishonest. Go check how Julia does metaprogramming; all the power of Lisp with none of the wierdness.
Re: Jai Language Primer
#54Earlier quoted context omitted.
That is a far cry from a REPL.
It's better than a REPL, that allows you to write a game completely live. I'm not sure what you think is lost since you didn't back up what you are saying with anything.
Re: Jai Language Primer
#55> Abstractions like RAII, constructors and destructors, polymorphism, and exceptions were invented with the intention of solving problems that game programmers don’t have This is the only part of the Jai philosophy I struggle to understand. How is an explicit delete keyword better than deterministic destruction? From my perspective, the former method reintroduces the problem the latter method solves. Also, polymorphi…
Games (I am talking about AAA here, have no idea about all possible games) are not written in the style that leaves place for constructors/desturctors. The data is better in tables (i.e. arrays) than spread all over the memory and accessible through a pointer network. The reasons being: a) walking an array is orders of magnitude faster than walking a pointer chain and b) heap allocation wastes more memory This, in tu…
This is how vector works.
Re: Jai Language Primer
#56> Abstractions like RAII, constructors and destructors, polymorphism, and exceptions were invented with the intention of solving problems that game programmers don’t have This is the only part of the Jai philosophy I struggle to understand. How is an explicit delete keyword better than deterministic destruction? From my perspective, the former method reintroduces the problem the latter method solves. Also, polymorphi…
Would you mind explaining or linking to a good document on "C++98 style runtime polymorphism"?
Re: Jai Language Primer
#57Earlier quoted context omitted.
I look at all these new languages with horrificly complicated syntax and wish for s-expressions. Lisp is perfectly well suited for game development, too, and not just for scripting. There are many implementations around with fast optimizing compilers, JIT compilers, and other modern features that make things run fast. When I see languages like what Jonathan Blow made, I think that most of the features can be implemen…
When we look at Lisp we see archaic user interfaces, legacy keywords such as car, cdr and cons which bear no meaning to us mere mortals. Also no clear consensus on what extensions to use. Why are there so many dialects? Can you not agree on something that works? Where is your IDE with error underlining and autocomplete list that comes up with each keystroke? And finally s-expressions, which make you twist your mind i…
By being able to bend a Lisp to your will, you trade your ability to standardize the language and build a community of libraries and tools around it. That being said, there's nothing like having a language which eventually becomes the best tool for solving the problem you're facing for at hand (as your Lisp will tend to evolve appropriately).
Re: Jai Language Primer
#58Earlier quoted context omitted.
I wasn't talking about all high level languages, just LISP. My experience is that people who like a particular language try to rationalize and convince others that there is no downside. I would love to see and example of LISP being as fast as C++ with multi-threading and cache coherency taken into account, using the same amount of memory, with no pauses from the gc that would affect interactivity. If it hasn't happen…
> My experience is that people who like a particular language try to rationalize and convince others that there is no downside. There are always trade-offs. GC is a win because manual memory management is terrible and error prone, but a lose because you have to learn how to tune it to behave the way you need. But no matter the language some things stay the same: learn to anticipate what code your compiler is going to…
C and C++ are two separate things.
> manual memory management is terrible and error prone,
The choice isn't between C style malloc and GC, it is a matter of how a language handles ownership. Look at move semantics or Rust's ownership. These are deterministic and controllable methods of memory allocation that aren't terrible or error prone.
> I think you are underestimating the advances in compiler design.
I would love to see an example like I said before, but you aren't giving any hard information to back up what you are saying.
Re: Jai Language Primer
#59Earlier quoted context omitted.
It's better than a REPL, that allows you to write a game completely live. I'm not sure what you think is lost since you didn't back up what you are saying with anything.
It is strictly less powerful than a REPL. Claiming that you can't live code a game at a REPL is false, because I do it on a regular basis. When I write games in Scheme, I use a REPL to write the game live, doing all of my editing within Emacs. I do not have to save files for the code to be evaluated, I just press a keystroke to evaluate the specific form I'm interested in. I can evaluate more fine-grained sections of…
Also if you are selectively executing parts of files, how is it that you are editing the live running source code?
Re: Jai Language Primer
#60I stopped caring at no garbage collection.
I'm with you on this. I'm an old school gamedev. Shipped games on Atari 800, C64, NES, and most system since then. I hated garbage collection for the longest time. But, I have to acknowledge plenty of games are shipping with garbage collection. Unreal has garbage collection. Unity games have garbage collection. They seem to all be running just fine and there's plenty of large AAA games or close to AAA games made with…