3 ms·
Racket executables are not to be compared with those of a compiled language that aims for speed. The primary goal is not speed here and the documentation explic
by p4bl0 3y ago
Racket executables are not to be compared with those of a compiled language that aims for speed. The primary goal is not speed here and the documentation explicitly says so. You should see them as interpreted code that is bundled with its interpreter for easier distribution and execution, without anything else to install for end users.
You can write a Racket application even with a GUI and whatever lib you need and then cross build it as a native executable (that is, an executable that embeds the interpreter, the necessary libs, and your application's code) for yours and other platform for easy distributions.
See https://docs.racket-lang.org/raco-cross/index.html https://docs.racket-lang.org/raco-cross/index.html and https://docs.racket-lang.org/raco/exe.html https://docs.racket-lang.org/raco/exe.html for more information.
- tmtvl 3y ago> The primary goal is not speed. But the authors states that Racket is "the finest example of a modern day lisp bar none". In the modern day energy efficiency and climate change are major issues, the German government, for example, has set up the Blue Angel Ecolabel program: <https://www.blauer-engel.de/en https://www.blauer-engel.de/en>. Using modern day to mean VSCode and Discord is a worthless use of the phrase.
- p4bl0 3y agoI don't know the numbers but I can probably agree that "modern day" can be replaced by "batteries included" and it would be a better description, from the (valid) point of view that you take. However, Racket is also a modern language in that it has many new and fancy programming language research-grade features since it is also a programming language theory research platform. From that point of view, "modern day" is a valid description :).
- andsoitis 3y agoAccording to https://stratoflow.com/efficient-and-environment-friendly-programming-languages/ https://stratoflow.com/efficient-and-environment-friendly-pr... Racket ranks far ahead of languages like TypeScript, Python, and Erlang in terms of energy usage, but trails languages like C, Rust, Ada, Java and Common Lisp. I think, however, there are probably other factors in your computing solution that has a bigger energy impact, like what processors you run on, the architecture of your program, etc.
- BackBlast 3y agoHow can you trust a list that places JavaScript an order of magnitude lower than TypeScript? Seems fundamentally broken.
- andsoitis 3y ago> How can you trust a list that places JavaScript an order of magnitude lower than TypeScript? Seems fundamentally broken. The list places JavaScript at a score of 4.45 and TypeScript worse at 21.5. For reference, C, the most energy efficient it 1.0
- BackBlast 3y ago> The list places JavaScript at a score of 4.45 and TypeScript worse at 21.5. For reference, C, the most energy efficient it 1.0 The point is that TypeScript is JavaScript with typing syntax added on top. There is a transpile step into JS. That's how TypeScript works. The runtimes are exactly the same. Unless we're also measuring the build step? Which seems silly. The difference should be near zero. And it's not. They clearly do not understand exactly what they are measuring.
- andsoitis 3y agoOne explanation is that the typical JS output by the TS compiler is more verbose (so more code to load, parse, and run). On the other hand, one can imagine that the TS compiler’s catching classes of errors at compile time means fewer runtime exceptions. I think the takeaway, however is the theme of a spectrum of energy efficiency, with compiled languages being more efficient than those that are not. But I still maintain that the overall efficiency of a system is more a function of other factors.
- BackBlast 3y agoMy take away is that this list is very unreliable.
- 3y ago
- mcpackieh 3y agoGenerally, don't take puffery literally. And whenever the author of this random blog seems to contradict the documentation, you can safely assume the Racket documentation is more authoritative.
- deleted 3y ago[deleted]
- lispm 3y ago> Racket executables are not to be compared with those of a compiled language that aims for speed. https://docs.racket-lang.org/reference/implementations.html https://docs.racket-lang.org/reference/implementations.html "The CS implementation is the default implementation as of Racket version 8.0. This variant is called “CS” because it uses Chez Scheme as its core compiler and runtime system. The CS implementation typically provides the best performance for Racket programs. Compiled Racket CS code in a ".zo" file normally contains machine code that is specific to an operating system and architecture."