🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). 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 6 September 2022.
00:00 Guest11 joined, Guest11 left 00:18 derpydoo left 00:51 Aedil joined 01:31 hulk joined 01:32 kylese left
perryprog I just found out about Draig! That's so frickin' awesome!! 01:49
(For the unaware dev.to/finanalyst/creating-a-new-p...raig-503p)
02:15 hulk left, kylese joined 03:36 stanrifkin_ joined 03:39 stanrifkin left 03:45 kylese left 03:48 kylese joined 04:20 oodani left 04:21 oodani joined 04:47 crnlskn joined 06:02 kylese left 06:08 kylese joined 07:31 wayland76 joined 07:32 wayland left 08:25 lichtkind joined 08:30 andinus left 08:32 andinus joined 10:34 phogg left 10:47 skyenet_ joined, pierrot_ joined, Geth left, Geth joined 10:52 wayland76 left, oodani left, ACfromTX left, RakuIRCLogger left, sorenson left, skyenet left, japhb_ left, pierrot left, lizmat left, jdv left, sorenson_ is now known as sorenson, skyenet_ is now known as skyenet 10:53 japhb joined, jdv joined 10:54 phogg joined 10:57 lizmat_ left, lizmat joined 10:59 ACfromTX joined 11:15 Sgeo left 11:30 eseyman left 11:40 manu_ joined 11:41 manu_ is now known as eseyman
Voldenet variants of translated raku are ok for reading, but it's going to be confusing to write real world code with this – even if I wanted to use TLs for any given code I'd never know whether this particular part should be translated or not 13:14
like "is `say/print/await`" translated or not, and when using modules it could even cause collisions in sub names in the worst case 13:21
disbot <librasteve> Voldenet: i agree … nevertheless I think there is fantastic educational value in getting kids to learn to code in their mother tongue … especially with non Latin char sets 13:39
<antononcube> @librasteve I am not sure. 🙂 There some experiments with that in Bulgaria and Russia during the socialistic times. For the children interested in programming that didn't matter. 13:53
<antononcube> Again, this was 40+ years ago. The current cohort of children (in those countries) might have different inclinations. 13:54
<antononcube> I meet similar feedback with my DSLs -- I thought using your native language to specify machine learning or data wrangling workflows would be preferable. Turned out the target DSL users would prefer English and are much more interested in cross-programming-language translations. (E.g. from Python to R or Raku.) These are "grown up" data scientists, though, not children. 13:58
tbrowder hi, please tell me again how to use test "dies-ok" from a realistic sub inside a module. the docs example works with the "real" sub inside the test code. how do i "throw" the exception from a sub in a distri so it does the right thing? i still say that part of the docs is very misleading for us regular users. it needs to at least add a more realistic example. 14:07
if it's not possible, at least show the caveats. 14:09
Voldenet the language used in programming is very synthetic anyway, perhaps translation is not that helpful 14:15
lizmat Voldenet: please note that any code in localization X can be machine translated to localization Y using the RakuAST tree 14:17
tbrowder and what's really mind-bogling is changing to lives-ok for the real test with a die statement. the whole try/catch thing is too complex for me to grok
*statement passes... 14:19
Voldenet tbrowder: for real life use case i'd suggest using throws-like 14:20
m: class E is Exception { }; sub parse($str) { die E.new if $str ~~ "invalid" }; use Test; throws-like({ parse("invalid") }, E) # otherwise any exception will be "OK" 14:21
camelia # Subtest: did we throws-like E?
1..2
ok 1 - code dies
ok 2 - right exception type (E)
ok 1 - did we throws-like E?
Voldenet m: class E is Exception { }; sub parse(Str $str) { die E.new if $str ~~ "invalid" }; use Test; throws-like({ my $n = 42; parse($n) }, E) # this doesn't throw right exception - dies-ok would not even call tested method 14:23
camelia # Subtest: did we throws-like E?
1..2
ok 1 - code dies
not ok 2 - right exception type (E)
# Failed test 'right exception type (E)'
# at SETTING::src/core.c/Exception.rakumod line 65
# Expected: E
# Got: …
tbrowder erg, that's part of the problem with the docs, the various tests seem to be listed in a random order without the *likes* in a logical sequence...
it's burned in my memory the 2: lives-ok, dies-ok 14:25
sorry: use-ok, dies-ok, lives-ok 14:27
in both and dies and lives it says does and does not throw an exception and uses "die" as the example of the example of the exception. am i wrong as a naieve user to expect my code's use of "die" to work in all cases? 14:33
*both cases... 14:34
[Coke] 40+ years ago, most kids didn't have easy access to computers. 14:36
Hell, I was 13, was probably on my second computer at that time, and very few kids even when I was in HS had a computer. (me and some of my nerd friends) 14:37
tbrowder i realize we probably can't change things now, but surely we could add two new standard tests to handle the simple die or no die case. maybe add an option to the existing ones or 2 new tests. something like "lives-always" (no "die" used anywhere) and "dies-always" (one "die" used during execution). 14:45
lizmat antononcube Raku localizations are not really intended for dyed in the wool people :-) 14:50
tbrowder i just filed a new problem-solving issue 15:08
disbot <antononcube> @Coke Correct, that is why I mentioned “40+ years.” We programmed on “big machines” using perfo-cards. We also had personal computers access in school. 15:15
<antononcube> Again, at the time being interested in programming was very self-selecting.
<antononcube> Hence, the actual keywords of the programming language did not matter much. 15:16
crnlskn personally, without perl (around 2005 maybe?) i would have glanced off of programming; the "it's like a natural language" aspect did a lot for me, and while in my case it wasn't about the words but about the depth of grammar i can see newer generations having an easier time even earlier if the language is a native language 15:18
of course this might lead to some problems with some people who then struggle to learn the "canonical" languages, but as lizmat said, everything in the AST can be machine translated
disbot <antononcube> Well, Perl & Raku are made by a linguist. 15:20
<antononcube> Let me invert the (paraphrased) statement of Larry Wall: “So what of a programming language is complicated. You learn it and then you use it.” 15:22
<antononcube> If you smart enough to program the keywords of the programming language do not matter. 15:23
<antononcube> And agree, that last statement is more valid for earlier generations / cohorts. 15:24
<antononcube> And with LLMs it really doesn’t matter what is the natural language of the programming language. You can always get comments, explanations, or translations of whatever code fragments in whatever natural language. 15:26
<librasteve> Interesting fb on educational native language programming. From a naive pov, I would say this is a non existent "marketplace" right now. For most educators they don't offer it and for most students they dont want it. With any market you can Create, Disclocate, Participate, Adbicate. The only viable one for raku is to dislocate, since the others cost real $$$. - ie engage a new emerging sector such as native langugae coding as a 16:08
new segment of english language coding.
<librasteve> Since raku has some unique strengths in this area, I would say it is a long shot, but if we can identify some interest would be a good place to differentiate from Python. 16:09
<librasteve> Draig is probably a good bet since there is a lot of pride in Welsh and there is a government mandated minimum of Welsh language teaching. ANyway just a thought in the hunt for emerging market niches that raku could enter and defend. 16:12
<antononcube> Just saw that on LinkedIn: 🙂 🤖 16:21
<antononcube> cdn.discordapp.com/attachments/633...c12f1&
16:31 crnlskn left
disbot <jubilatious1_98524> s/of/if/ 16:44
16:45 stanrifkin_ left, stanrifkin_ joined
disbot <librasteve> lol - here it is in raku 16:46
<librasteve> cdn.discordapp.com/attachments/633...d82f3&
Geth ¦ raku.org: librasteve self-assigned Minor style nits on new site github.com/Raku/raku.org/issues/232 16:52
16:54 crnlskn joined
disbot <librasteve> the crag version is (of course) in a repl and applies physical units checking / coercion ... I can make a small improvemnet to crag [github.com/librasteve/raku-App-Crag/issues/17] 17:02
<librasteve> oddly I moved from inline code to the repl ... but maybe the zeitgeist is to do it inline 17:03
17:06 human-blip left 17:08 human-blip joined 17:16 pierrot_ left, pierrot joined
coleman librasteve: new raku.org is live 17:39
perryprog oh dang
time to go post on HN
coleman please no
perryprog :P
coleman wait for the newsletter lol 17:40
perryprog but my imaginary internet points!
also that butterfly background rules
also the whole thing rules
rare instance of background image that doesn't massively ruin text contrast
coleman auto-deploy should work; 17:41
if something screws up, review container images correlated to builds in GH quay.io/repository/chroot.club/pro...5?tab=tags 17:43
container has a funny name right now. we can rename it later. Keep pushing to that repo.
18:24 melezhik joined
melezhik . 18:24
Geth raku.org/dev: 520f9c7e21 | (Coleman McFarland)++ | scripts/cibuild.sh
Start pushing to quay.io/chroot.club/raku-org-website container repo
18:31
disbot <librasteve> coleman: you rock! 18:43
<librasteve> perryprog: appreciate the feedback - no doubt some wrinkles - please post any issue at github.com/Raku/raku.org 18:47
perryprog ah, was going to ask (then I forgot to). I do have a few thoughts. I assume you'd prefer separate issues for each? 18:48
Geth raku.org/dev: 107f55bab9 | (Coleman McFarland)++ | 2 files
Update CI to only push on commits to main
raku.org: dontlaugh++ created pull request #233:
Promote new site to main branch
18:49
disbot <librasteve> yes please 18:56
perryprog Sounds good! 19:04
19:06 Sgeo joined
perryprog librasteve, done, hope you don't mind the nitpicks! :) 19:12
Geth raku.org/main: 22 commits pushed by librasteve++, (Coleman McFarland)++
review: github.com/Raku/raku.org/compare/c...eb89739e34
perryprog Also I did a quick check with a screenreader and the code blocks felt a /little/ weird but not horribly so. Other than that it was very navigable. (I was using VoiceOver.) Props for that! 19:13
(I also have no idea how the code blocks could be improved) 19:14
19:14 apac joined 19:16 apac left, apac joined
disbot <librasteve> no problem - will get to them shortly 19:18
19:36 marcprux joined
disbot <.landyacht.> Does anyone know if Buf is threadsafe? Specifically I'm looking to provide my own buf8 object to IO::Socket::Async.Supply() and wondering if shifting elements off the beginning while the socket is writing to that Buf will cause any weirdness 19:55
lizmat yes, it would 19:56
pushing to a buf / array may need to allocate more space for it, and thus move it in memory 19:57
perhaps you need a Channel? docs.raku.org/type/Channel 19:58
or raku.land/zef:raku-community-modul...ent::Queue 19:59
or raku.land/zef:lizmat/Concurrent::PriorityQueue
disbot <.landyacht.> Hm, yeah, Channel would probably work - tap the Supply and have the reactor just shove everything onto the Channel
Geth ¦ raku.org: coke self-unassigned Perl 6 at a glance github.com/Raku/raku.org/issues/119 20:02
20:05 jmcgnh left
Geth ¦ raku.org: coke assigned to librasteve Issue bad urls github.com/Raku/raku.org/issues/240 20:08
raku.org/coke/readme: 8bb0004ed4 | (Will Coleda)++ | README.md
Add git fsck warning to readme.

Closes #50
20:16
raku.org: coke++ created pull request #241:
Add git fsck warning to readme.
raku.org/coke/maths: a5b27f1e43 | (Will Coleda)++ | lib/Org/Home.rakumod
Fix math typo

Part of # 232
jubilatious1++
20:19
raku.org: coke++ created pull request #242:
Fix math typo
20:20
¦ raku.org: coke assigned to librasteve Issue README has sections leftover from dev github.com/Raku/raku.org/issues/243 20:23
¦ raku.org: librasteve self-assigned Dashboard articles have weird header styling github.com/Raku/raku.org/issues/236 20:31
20:34 melezhik left 20:48 marcprux left 21:24 DavidSch__ joined 21:48 apac left 22:48 crnlskn left 23:00 DavidSch__ left 23:02 wayland76 joined, wayland left
tbrowder .tell lizmat see my new repo with the "bad" dies-ok test at <githun 23:18
tellable6 tbrowder, I'll pass your message to lizmat
tbrowder at <github.com/tbrowder/PB-Lottery/bad/> 23:19