HackerTrans
TopNewTrendsCommentsPastAskShowJobs

AnimaLibera

no profile record

comments

AnimaLibera
·4 lata temu·discuss
Allowing to compress code this much is the goal of golfing languages (such as 05AB1E (or osabie) or Pyth (not Python)). The code golf stack exchange forum contains a lot of programming challenges where the goal is to write the shorest program (in bytes) that does what the challenge asks, and some answers are truly impressive, with somewhat non-trivial algorithms being implemented in as few as 4 bytes (in extreme cases). Granted, these are programming challenges and not production code to be deployed, and some golfing languages are designed for a specific kind of task or algorithm that may let us think that the algorithm was actually pre-implemented in the language (and sometimes it is kinda true), but still, worth taking a look at it.
AnimaLibera
·4 lata temu·discuss
"No idea" is a bit strong, we actually have some amount of knowledge on the workings of the human brain, see https://www.researchgate.net/publication/51920832_Cognitive_...
AnimaLibera
·5 lat temu·discuss
Actually when I said that in comparison Rust is boring, I was only half joking. C++ is way more fun in the sense that it feels like a patchwork with surprising interactions that can get even C++ masters. C++ dev sounds like a fun job ^^
AnimaLibera
·5 lat temu·discuss
Don't get me wrong, C++ is interesting to work with ^^, but what I said is true (just go ahead and test it, `#include <cstdint>`, then initialize a variable of type `int8_t` and `std::cout` it, I just tried it on godbolt.org with the `x86-64 gcc 11.2` compiler and it printed the value as a character rather than as a number (unlike an `int32_t`)). I never miss an opportunity to mock C++ and its many layers of features that don't always interact well with each others. Maybe take it as a fun fact and not as an attack..
AnimaLibera
·5 lat temu·discuss
By "glibc" i meant the GNU C++ standard library implementation, not glibc
AnimaLibera
·5 lat temu·discuss
C++ is sooo much better than any other compiled language! For example, using std::cout to print the value 97 will produce different results depending on whether this value is of the type int8_t or int32_t (but in Rust, printing 97 always outputs "97" without depending on the type of 97 that can be i8, i32, whatever). This is because C++ uses C headers to typedef int into int32_t (or whatever is 32 bits on the implementation that is being used) and to typedef char into int8_t (so the value 97 of type int8_t is printed as "a"), at least that is the case with glibc. What a good language, in comparison Rust is so boring and uninteresting.
AnimaLibera
·5 lat temu·discuss
Ah a LangJam entry ^^ There are plenty more original ideas for one to check out at https://github.com/langjam/jam0001 Teams had 48h to design and implement a programming language based on the theme "first-class comments".