🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 8 June 2022.
Nemokosch an online friend says "Raku is a write-only language" and I ask myself: what did I do wrong? 😅 08:15
I guess a lot of people really don't like this "APL style" as Voldenet called it
but I'm not gonna write 20 liners for 5 liners when all I'm doing is like string processing automation 08:17
Voldenet it's not even about number of lines btw 08:18
I used to laugh at having methods named equals() or add(), but how do I google `that unnamed symbol` 08:19
Nemokosch For me, it is about the number of lines, though 08:24
I don't optimize for "that unnamed symbol" but mistake possibilities and time wasted 08:25
SmokeMachine Sorry for resending the same message again, but I really want some feedback about that: 09:15
I've been rethinking on how the syntax to grammar for event patterns should be. (I have no idea on how to do that yet, but...). Could someone see if any of this (github.com/FCO/EventExpressionLang...mindstorm) make sense? And if someone have any suggestion
stevied Unless your brain is a compiler, you don’t “read” a programming language. 12:57
You review it and then you get the gist of what it does based on major clues in the structure of the code. 12:59
Voldenet I read more code than I write 13:00
stevied Yeah but I’m saying the analogy is wrong. “Read” is a very bad metaphor. 13:01
Voldenet I read it like I'd read the book 13:04
it's not a metaphor 13:05
stevied If I have to read someone’s code like a book to figure out how to modify and change it, then it’s poorly written code. 13:09
Nemokosch to be frank, I do write more Raku than read; this is just the nature of disposable scripts dedicated for one automational task 13:27
but regardless I don't see why someone would conclude from the particular pieces I've shown to them that it's "write only" 13:28
in fact I think it's pretty easy to read and it's just _not for modification_
it solves one particular task and that's that 13:29
if you cannot do it by passing the right parameters, it's just not meant for the task
Xliff \o 14:53
stevied anyone got an idea on this? stackoverflow.com/questions/728187...r-a-reboot 16:04
Voldenet "If I have to read someone’s code like a book to figure out how to modify and change it, then it’s poorly written code." 16:06
Actually, I read code because I want to know details on how it works usually
stevied but that's not reading. that's like looking things up in a dictionary 16:07
Voldenet dictionary is still a book though
stevied that's vocabulary building
sure, but it's not the same act as reading a magazine article. totally different objectives. 16:08
Nemokosch in very broad terms, yes
it looks like a book, let's put it this way
stevied it would be like studying a magazine article and thinking about which word choices were used and which tropes were used and why
that's not reading, that's deconstructing
now, is Raku a harder language to deconstruct? yes. it has a big vocabulary. 16:15
But it is much easier to grok what the code is doing because there's much less of it.
the implementation details are concise and compact and you don't have to worry about them (as long as they are properly tested).
if the implementation is bad, you can easily isolate the problem if the code is well-written 16:17
Nemokosch regarding vocab, I must say I'd like Raku even for the sole fact that it's not plain anglo-centric 16:19
stevied we don't say math symbols are "write once" 16:25
they are the most concise way of conveying ideas ever invented.
Nemokosch well, _we_ don't 🙂
stevied well, I do, I'm not a math guy 🙂 16:26
Nemokosch now do you or do you not? don't trip me up! 😛 16:27
stevied do I call math "write once?" no, because I know if I knew the symbols, I could read them.
Nemokosch fair enough
also, "write only" 16:29
stevied each little squiggle has a meaning. just got to practice with those meaning until they become ingrained in your brain
Nemokosch writing once is optimal, means you got it right for the first time
stevied each little squiggle has a meaning. just got to practice with those meanings until they become ingrained in your brain
then it become second nature
then it becomes second nature
Nemokosch anyway, I have the feeling that I could have shown boring pieces of code and then the same guy wouldn't have said "write only" but probably would have said "genuinely uninteresting" 16:30
like what, you have objects, you have if and for, arrays, hashes... it's easy to do this 16:31
but I couldn't show some OO monstrosity for example, since that's just not what I use Raku for
stevied any language is basically "write once" until you learn it 16:32
Nemokosch ^tbh 16:33
although some languages might stay "write once" even afterwards 😄
stevied If I looked at c++ code, I'd be totally lost. but it would be stupid for me to say "this is garbage!"
Nemokosch I cannot accept /bin/sh as a legit programming language though
Really, in an ideal world, all people would have agreed to just use Perl by 1992 16:34
stevied well, it's a scripting language with some programming constructs slowly built into it over time.
these tools evolve over time and the lines get blurrier 16:35
Nemokosch or Tcl if not Perl
I guess Tcl would still make a whole lot of sense compared to the POSIX shell
stevied like php was an html generation script
that was it
Nemokosch it took like 20 years to fix PHP 16:36
stevied but people understood it and then it took off and had a life of it's own
Nemokosch it would took an eternity to fix the POSIX shell, it's just done for
it's too late to fix it
stevied i was doing a little php programming a few months ago. painful. 16:37
Nemokosch I don't think it's all that bad these days
in fact it has grown into a quite powerful language
stevied no, but it is tedious to write
Nemokosch ... perhaps I wouldn't use it for string processing
stevied hey, anyone got any ideas on this issue: github.com/Raku/ecosystem/issues/606 16:38
oops, wrong link.. hold on 16:38
hey, anyone got any ideas on this issue: github.com/Raku/ecosystem/issues/606
Nemokosch yeah
stevied stackoverflow.com/questions/728187...r-a-reboot 16:38
Nemokosch some environmental variable mess? 16:39
stevied has to be, but I have no idea how to fix in comma
Nemokosch I'm in a situation where I would always bet on the environmental variables...
trying to get Oracle 19c working with Debian 9 🥴
stevied don't see any obvious setting
Nemokosch did something change about your $PATH? 16:42
if it's after reboot
a "reboot" is often what I miss
stevied no didn't touch it. everything works fine from a regular terminal window in comma
it's only when running tests
hmm, guess I'll have to echo some shell output to the screen. see if I can figure out what shell it's using 16:46
Nemokosch ez win
[Coke] (tcl) having some experience with tcl, I'm not sure it "makes sense" compared to any other language. :) 16:49
nine Well if your script really just consists of a long list of binaries to run with various arguments, shell is still the better language. It's when you start to do calculations or manipulating data in your script that it becomes the wrong tool for the job very quickly. 17:34
Voldenet Actually, tcl is amazing tool for configs 17:43
[Coke] oh, I love tcl, it's just kind of unlike anything else. :) 17:45
moritz TCL is an "everything is a" language, where it joins Lisp ("everything is a list") and C ("everything is undefined behavior") :D 21:09
japhb moritz: "everything is in" also applies -- Forth: "Everything is on the stack or in the dictionary" 21:22
lizmat whereas in Raku, everything is Any, except Junctions :-) 21:28
moritz everything is Mu :-) 21:31
japhb: "or" is not allowed
.oO( Rust: everything is a type error)
21:32
japhb Haskell: Everything is a pure function. Even if that means it has to close over the observable universe. 21:45