This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:13 MasterDuke left
Mediocre finally finished this raku.guide/ 00:23
i understood a lot and nothing at the same time XD
Anton Antonov It is fine -- you know more that before reading it. 00:55
01:01 Heptite joined
Mediocre true 02:08
btw does raku have jobs or is it still too early for that?
and if not can it at least build applications ? like small to medium size tools for companies or webstes
also does it have a gui built in or modules for gui or something to build apps? 02:11
02:19 tea3po joined 02:22 teatwo left 03:57 Heptite left 04:05 Heptite joined 04:37 Heptite left 07:20 deoac left 07:43 kjp left, human-blip left, nicole left, nicole joined, kjp joined 07:47 human-blip joined 07:58 kjp left 08:09 dakkar joined
Anton Antonov Yes. There are examples here : cro.services . There are other efforts, like "Humming-Bird". 08:28
I am not sure what kind of jobs you are referring to. Do people get hired for working with Raku? Or, can Raku have, say, cron jobs? 08:32
Nemokosch I would assume the former 08:33
In which case: I don't really know about Raku developer title - there is even a Problem solving issue for the lack of this concept in LinkedIn
what one can do is to mix the use of Raku into daily tasks 08:34
this is what I also do
Anton Antonov I do not know, but check out these modules: raku.land/tags/gui .
09:49 kjp joined
snufkin How does this work for you? This is something I'd love to do, however working in primarily a .NET & Windows environment, with a team who rarely leave the ecosystem. Perhaps I could use it for personal scripts/applications. Ideally I'll move away from .NET jobs in the future. 11:14
Nemokosch Well I'm mostly working in a Unix environment and whatever script I can make useful is a net win 11:15
I mess around a lot with git CLI and text processing, gluing stuff together 11:16
snufkin That sounds interesting, what % of $day-job code would you say is in Raku? 11:18
Nemokosch It's hard to say because you don't press "save" for something that was meant to select a couple of commits for you 11:21
raku -ne 'my $commit-message = qqx[git show --name-only $_ | iconv -c]; say $commit-message if $commit-message.contains("ighlight.c")' 11:22
snufkin Gotcha, so literally using it for oneliners
Nemokosch this is not something for the future generations but if it saves me time collecting commits that affected certain files, it's a net win
I have like 3 or 4 scripts, usually still in the 50 to 100 lines territory, that I did upload to our internal git 11:23
tbh mostly so that I can say "see, this is what I made and what I use" 11:24
and also one tool that is actually being developed, for gathering data from Jira (Zephyr, to be accurate) and making it into test report HTML files 11:25
to be honest, this is the practical reason I started with Raku in the first place, and this part never failed me 11:26
snufkin Very cool, I'd not really considered Raku for something like that, however due to it's history I guess it makes total sense. 11:30
Feel like Python would be the more common choice these days
Nemokosch The thing is with Python, for 2 lines of what I actually want, you'd need like 5 lines of boilerplate. Something from sys, something else from os, re, subprocess... 11:32
more imports than lines, with their rigid APIs. It's a waste.
snufkin Yeah that makes sense actually. When I've used Python I've noticed a lot of that. Does Raku rarely require any imports (use)? 11:34
Nemokosch Python was meant to be kind of a standalone purist language I guess, Raku carries some of the oldschool Perl pragmatism when it comes to gluing stuff together
and Raku has a huge core; "secretly" even a JSON parser and emitter is included 11:35
it would be a joke to need to include something for regular expressions, that's like the foundation of the language... 11:36
(having said that, sheer regex performance could be better... or could it) 11:37
snufkin Hahah, surely it's on par with Perl though? 11:39
Nemokosch Pretty sure it isn't... 11:40
I wonder if that's technological overhead or just bad algorithms 11:41
The thing is, you don't just randomly bump into somebody who can design an efficient regex engine
snufkin Hahah unfortunately not, I imagine it's probably very complicated 11:44
Nemokosch Anyway, since I rarely do things were mere throughput would matter a lot, it's not really my problem 11:45
The people who need performance might outsource the bottleneck part to some efficient native code and call into that with NativeCall 11:46
that's always an "easy way out" 11:47
snufkin Yeah, I guess regex isn't always gonna' be super performant. My boss from previous job would seriously discourage us from writing regex at all because he was so overly conscious about performance, he went too far with it. 11:55
Maybe regex in C# is extremely slow, I think he was just paranoid though 11:56
Nemokosch yeah I would be surprised if the .NET platform was that bad in this regard, with 20 years of mainstream enterprise use and all that Microsoft wisdom 11:57
snufkin He never really updated his programming knowledge since around 2000 so maybe things were different then 11:58
Nemokosch I guess around 2000 it was much more Perl eccentricity (apart from the useless dumb regexes) 11:59
12:04 ab5tract joined
snufkin Yeah that's about right. 12:08
I might see if I can use Raku at current job for similar purposes, unfortunately it feels a bit more like a second class citizen in Windows and I might have to get permission to install it.
12:21 ab5tract left
Anton Antonov Maybe GPT-5 or -8 can help with that. 12:24
Nemokosch I'm sure you already have a chatgptforprediction site 12:25
Anton Antonov 🙂 No, I "against" ChatGPT-like models. 12:26
But because I follow my "informed hate" principle, I tend to know or have experience dealing with them. 12:27
BTW, this what happened with some of the earlier AI programs -- they simplified VLSI designs. (Earlier, meaning, 35-40 years ago, and LISP.) 12:28
Mediocre nice principal XD 12:30
Nemokosch and what happened to Python is that you made a wordpress for it
🧠
Anton Antonov Damn! I forgot about that... 12:31
Hmmm... I need to post something there soon...
On the Raku jobs : 1) I do get occasionally hired to do Raku projects because of my DSLs work. 2) But I mostly use my Raku DSL packages to speed up my "typical" data scientist work. 12:33
In some sense, I have two secret weapons (when compared to other data scientists) : 1) Mathematica / WL, and 2) Raku. 12:36
snufkin What edge does Raku give you over Python? I figure that's also the dominant language for data science. 12:37
Anton Antonov Python is a "stupid language" -- both a selling point, and a limitation. It is only "good" for established Machine Learning (ML) workflows. 12:39
In my experience, most ML engineers or data scientists are Python users, not Python programmers. 12:40
I have been proclaiming or explaining my Python views in this forum before. I do not want bother everyone with those again... 🙂 12:42
( @Nemokosch That is why pythonforprediction is needed! )
snufkin Stupid language in what sense?
Anton Antonov 🙂 Do you mind if I respond with a reference? 12:43
snufkin Go for it
Anton Antonov pythonforprediction.wordpress.com/...-projects/ 12:45
Mediocre where do i find it?
Anton Antonov You can search the raku-beginner and/or raku and/or language channels. Or see the link I posted above. 12:46
Mediocre Scaled Agile Framework (SAFe) — also known as Shitty Agile For Enterprises, 12:53
Anton Antonov 🙂 Yeah, I heard it -- I think -- in a panel Q&A session with the creators of the Agile methodology. 12:54
Mediocre well saying there is only one way to solve a problem is interesting 12:55
i do not agree with that from a physical world standpoint
i like how you pointed out that they are easily replaceable due to that concept 12:57
13:00 Heptite joined 14:11 teatwo joined 14:14 tea3po left
i have a question but its quite general 14:17
in oop if i have like 100 classes file ( do i really need to make 1 file per class also) how do the files communicate with each other? does it implicitely export and export each file to each other ? 14:18
lizmat if you need exporting of these classes to each other, then you're probably better off having it in a single file 14:19
Nemokosch they could live in the same package, couldn't they?
Mediocre package as in module in other languages right? 14:22
or is it close to library ? sorry the terms are currently confusing me 14:23
Nemokosch not only you, chill 14:29
package as in, well, namespace
Mediocre more words XD 14:31
i know how namespaces work in c basically it adds std:: to everything
joke i know its more than that but its my personal trama from c and c++ XD 14:32
anw how do those relate ?
lizmat a package is a namespace
a class is a special case of a package, as are role, grammar, module 14:33
Mediocre wow lizmat thank you 14:45
btw is this a general case lizmat or specific to c ? 14:46
Nemokosch dammit, I still don't know how this actually works
lizmat that's the way it works in Raku :-) 14:47
Mediocre well it kinda makes it more annoying when multiple languages treat this differently XD
Nemokosch it was about Raku
C itself didn't have namespaces
lizmat it could be more general
Mediocre oh thank you lizmat
lizmat Perl appears to be adopting some of these idioms
Mediocre so chatgpt disagrees but probably it is basing the answer on other languages
cdn.discordapp.com/attachments/768.../image.png
lizmat that answer is contradicting itself 14:48
or maybe not
in general, you won't see many bare "package" statements in Raku 14:49
you will see a lot of class / role / module ones, and a few grammar ones
Mediocre cdn.discordapp.com/attachments/768.../image.png
Nemokosch from what I heard, they are adding packages to C++ but yeah, that won't be the same as a namespace 14:50
or do they call it module? 🤪
Mediocre cdn.discordapp.com/attachments/768.../image.png
lizmat re scopes: just about everything in Raku is lexically scoped
Mediocre so it seems they are the same but it might be politically incorrect to say it XD
lizmat one exception: dynamically scoped variables
which have the * twigil, like $*IN 14:51
Nemokosch but like, even lexical scopes can be inspected from distance, lol
Mediocre so what i noticed is 14:52
Nemokosch good old CALLER::
Mediocre it seems that marketing played a very large role in naming
for example java methods vs function vs subrootine
all 3 are the same
just they want to name them differently for a specific language XD 14:53
lizmat well, in Raku in the end, it's all just blocks of code being executed
Mediocre ❤️
lizmat but they can be wrapped in a sub, or a method, or a private method, or a submethod, or a whatevercode
or just a (pointy) block
Nemokosch not sure how much this is a beginner question but it's a fundamental question at least... 14:54
14:54 Aozen joined 14:55 Aozen left
Mediocre as a beginner i have no idea what a beginner question is XD 14:55
i just ask and see if i get an answer and if none answer not much i can do about it
Nemokosch if there is a META6 file, can modules still be found using the logic of the filesystem compunit repository?
if the META6 file doesn't clarify what it provides or something 14:56
lizmat yeah, use -Ilib rather than -I.
then it won't see the META6.json file
Nemokosch hm... eventually where I'm getting at is, is it okay to do some "use lib" stuff for internal use within the source code itself? 14:58
there is a sufficiently big size where one probably wouldn't want a monolithic file 14:59
for things that aren't necessarily to be "provided"
lizmat the test-suite is partly dependent on that, so I guess that's a yes... but you can't have precompilation then 15:00
'use lib' cannot be pre-compiled and thus cannot be used in a module'
Nemokosch ouch 15:01
no precompilation to the rescue but this is kinda pricey 15:02
16:15 Heptite left 16:36 dakkar left 16:53 jgaz joined 17:49 jgaz left 17:50 habere-et-disper joined
habere-et-disper Can an identifier look like $a₀ ? I get bogus postfix for: 17:52
m: my $a₀ = 0;
camelia ===SORRY!=== Error while compiling <tmp>
Bogus postfix
at <tmp>:1
------> my $a⏏₀ = 0;
expecting any of:
constraint
infix
infix stopper
postfix
statement end
stat…
habere-et-disper I'm looking for unicode subscript zero.
lizmat habere-et-disper: you cannot in standard raku, but there's a slang: raku.land/zef:lizmat/Slang::Subscripts 17:57
habere-et-disper Thanks ! 18:11
m: use Slang::Subscripts; subset ℕ₀ of Int where 0 .. *; my ℕ₀ $foo = 12;
camelia ===SORRY!=== Error while compiling <tmp>
Could not find Slang::Subscripts in:
/home/camelia/.raku
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/rakudo-m-in…
18:20 jgaz joined 18:22 habere-et-disper left 19:13 deoac joined 19:15 deoac left 20:07 deoac joined 20:35 habere-et-disper joined 20:41 deoac left 21:07 jgaz left
habere-et-disper What is a "Bus error: 10" ? 21:52
Nemokosch Memory over-addressing 22:04
23:45 Heptite joined