I spent too much time trying to remember "how to do atoi() in Perl" when you don't need to do that in Perl, it makes no distinction between numbers and strings, you can just do
my $N = shift @ARGV;
$N > 0 || die("Arg must be > 0");
@vaporeon_ man I remember really enjoying Perl when I took my "programming languages paradigms" in college, maybe I should learn it again
also what is die in Perl?
@vaporeon_ oh does it kill program execution and log the given message to console?
@wallhackio "log the given message to console" is a very JavaScript-brained way of saying "print the given message to stderr"...
@vaporeon_ javascript is the only real language, everything else is an imitation
@wallhackio This is slander of the C programming language ![]()
@vaporeon_ I mean, its syntax was inspired by javascript so it's still a great language :]
@wallhackio
It is JavaScript that was inspired by C, there was no JavaScript in the 1970s, but there was C
@vaporeon_ if c had dynamic typing it would be perfect :]
@wallhackio You should try the programming language B, it's the ancestor of C and it doesn't have datatypes ![]()
@vaporeon_ oh shit really? 👀
also I was joking I don't have problems with C's typing
@wallhackio Here's a web page about it: https://www.nokia.com/bell-labs/about/dennis-m-ritchie/bintro.html
B only has the machine word, there no distinctions between char, int, or pointers, and as far as I know, it doesn't have structs either
That's why it was superceded by C
@vaporeon_ structs are one of the best things in c