🦋 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 inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:02 reportable6 left 00:09 Manifest0 left 00:27 melezhik joined 00:28 melezhik left 00:46 patrickb left 01:05 reportable6 joined 02:05 evalable6 left, linkable6 left 02:07 linkable6 joined 02:32 frost joined 03:01 jrjsmrtn left 03:05 jrjsmrtn joined
tonyo tbrowder: you still need someone on a mac to tell you if there's a tls problem? 03:06
04:05 linkable6 left 04:06 linkable6 joined 04:08 evalable6 joined 04:25 sftp left 04:47 ajr joined, ajr left 04:52 MoC_ joined, MoC left 05:12 ajr joined 06:02 reportable6 left 06:04 reportable6 joined 06:41 ajr left 07:22 seednode left 07:23 seednode joined 07:38 sftp joined 07:43 abraxxa joined 07:47 tejr joined, abraxxa left 07:48 abraxxa joined 07:56 Sgeo left 08:03 dogbert17 left 08:04 dogbert17 joined, frost left 08:07 frost joined 08:12 djerius left, djerius joined 09:12 linkable6 left, evalable6 left 09:34 Manifest0 joined 10:03 MasterDuke left 10:06 MasterDuke joined 10:14 linkable6 joined 10:15 evalable6 joined
lizmat clickbaits rakudoweekly.blog/2021/11/15/2021-...nce-again/ 10:34
10:38 sftp left 11:17 xinming__ left 11:18 xinming__ joined
tbrowder tonyo: thnx, i'm ok for now, but maybe down the road a ways 11:43
12:02 reportable6 left 12:05 reportable6 joined 12:07 gugod left, gugod joined 12:10 sftp joined 12:18 sm2 left 12:22 stanrifkin joined
stanrifkin how can i flush or read EOF after prompt call? i've got a loop with "next unless $line"; after a prompt which works. But when i input a EOF the input buffer seems not to be flushed and i've got an infinite loop. 12:23
to be clear: loop { my $line = prompt "input"; next unless $line; ... } 12:26
when i enter ctrl-d -> endless loop 12:27
lizmat and what about "next without $line" ? 12:34
12:34 squashable6 left
stanrifkin same behavior 12:37
MasterDuke or something like `next unless $line or $*IN.eof`? 12:40
stanrifkin same with "uninitialized value" message now 12:43
i tried it with normal perl
there it works
i mean i want a simple input loop which can handle EOF 12:45
lizmat last without $line ?
stanrifkin lizmat: yes tried that. does also endless prompt loop 12:46
lizmat loop { last without prompt }
stops with ctrl-d for me
are you on windows by any chance ?
stanrifkin lizmat: moment...
lizmat loop { with prompt() { .say } else { last } } 12:47
evalable6 ♥🦋 ꒛㎲₊⼦🂴⧿⌟ⓜ≹℻ …
stanrifkin lizmat: last without $line works
evalable6 lizmat, Full output: gist.github.com/cb3c7241d9446d9192...f982f30d14
lizmat *phew* :-) 12:48
stanrifkin lizmat: somewhat i need both now. last without and next unless line 12:49
lizmat: in the right order also :) 12:50
lizmat well, check in if you need more eyes :-)
12:50 Kaiepi left
stanrifkin lizmat: bpa.st/SM3A 12:53
lizmat so what if someone enters "foo" ? 12:54
stanrifkin lizmat: that's ok. i get an runtime type error 12:55
lizmat that's not very user friendly :-)
stanrifkin lizmat: i am playing around
lizmat loop { with prompt -> $guess { if $guess ~~ Int { ... } else { say "a number please" } } else { last } 12:56
12:59 Kaiepi joined, Kaiepi left 13:00 Kaiepi joined, Kaiepi left, Kaiepi joined
stanrifkin with "if $guess ~~ Int" i can check if the input is type conform? 13:00
13:02 Kaiepi left, Kaiepi joined 13:03 Kaiepi left, Kaiepi joined
lizmat yes... prompt will returns an alllomorph IntStr if the string can be evaluated as an Int 13:04
and that type matches with Int
13:05 Kaiepi left 13:26 Kaiepi joined 13:50 A26F64 joined 14:08 linkable6 left 14:10 linkable6 joined 14:15 linkable6 left 14:17 linkable6 joined 14:18 stanrifkin left 14:22 linkable6 left 14:24 frost left 14:25 linkable6 joined 15:08 gordonfish- joined 15:09 monkey_ joined 15:10 avar left, gordonfish left 15:15 avar joined 15:17 dogbert17 left 15:26 dogbert17 joined 15:29 ajdplaysalto joined 15:30 ajdplaysalto is now known as Guest9850 15:34 Guest9850 left 15:36 squashable6 joined 15:41 Guest18 joined, gordonfish- left 15:43 Guest18 left 15:46 Kaiepi left 15:47 Kaiepi joined 16:00 patrickb joined 16:03 gordonfish joined 16:05 monkey_ left 16:25 rypervenche left 16:32 rypervenche joined 16:59 xinming__ left 17:01 xinming__ joined
MasterDuke codesections: re stackoverflow.com/questions/699190...ngle-list, wouldn't making print_lists's signature `**@input` also be a solution? 17:02
[Coke] I thought the "fix" there was that OP wasn't passing in a list of lists anyway. 17:12
17:13 gordonfish left, gordonfish joined
[Coke] docs.raku.org/language.html - some of the Raku's on this list have TMs, others don't. 17:14
lizmat/codesections ^^
lizmat [Coke]: could you make a doc issue for that ? 17:15
MasterDuke yeah, solution was the wrong word/idea. more like something to point out as relevant
codesections I don't think we need a ™ everywhere, though 17:16
[Coke] github.com/Raku/doc/issues/3982 17:17
codesections: I'm complaining it's inconsistent, not missing. :)
if there's a method to the usage there, I dont see it.
codesections from a legal perspective, I think we're fine (not legal advice, etc.) – but yeah, visually it's odd/worth fixing :)
[Coke] 58 instances of Raku, 5 instances of the TM 17:18
(2 of those in the menus, so skip those) 17:19
lizmat dinner& 17:24
17:58 abraxxa left 18:02 reportable6 left 18:59 tejr left 19:00 tejr joined 19:03 reportable6 joined
Geth ecosystem: e7141a1e97 | thundergnat++ (committed using GitHub Web editor) | META.list
Add Math::Root

Add github.com/thundergnat/Math-Root to the ecosystem
19:43 ajr joined
[Coke] log viewer, how do I search for Tux? if I go to raku-dev, click gear, enter [Tux] in nick(s) and hit submit, I get 2 entries from May & July, nothing from today. 19:50
19:51 notna joined
lizmat logs.liz.nl/search.html?query=csv-...2021-11-16 19:54
that looks like it went fro 1.41 to 1.14 , and from 14.99 to 6.24 ?? for ip5xs ?? 19:55
m: say 6.24 / 14.99 19:56
camelia 0.416278
lizmat m: say 14.99 / 6.24
camelia 2.402244
MasterDuke i think that's about what nine was expecting
lizmat 2.4x as fast nine !!!
[Coke] lizmat: that URL is searching for text - looks like I can search for the nick 'lizmat' but not '[Tux]' 19:59
[Coke] is also empty, Geth has results. Guessing the []'s are being treated specially somehow.
MasterDuke i think it treats the string as a regex, what if you \ the []? 20:00
[Coke] \[Tux\] also empty 20:02
his nick is [Tux], but the hits include "Tux is now known as |Tux|"" 20:03
will open a ticket.
20:05 ajr left
[Coke] github.com/lizmat/App-Raku-Log/issues/28 20:07
lizmat logs.liz.nl/search.html?query=&...l=raku-dev 20:10
[Coke] ^^ 20:11
[Coke] lizmat: .. ok. What is a "nick alias" ? 20:14
I was searching for exactly the nick I wanted, so didn't think to check that.
lizmat lizmat_ for lizmat for instance
[Coke] ok, but [Coke] is my nick. 20:15
not Coke
20:17 ajr joined
[Coke] Thanks for helping me get the search working - added a note to the ticket, but if you close it, no worries. Thanks. 20:22
20:22 ajr left
lizmat yeah, there's something amiss somehow 20:22
will look at it in depth when my current refactor is done :-)
20:33 Xliff joined
Xliff m: my $a; without $a { say 'Unset' } else { 'Set' 20:34
camelia 5===SORRY!5=== Error while compiling <tmp>
"without" does not take "else", please rewrite using "with"
at <tmp>:1
------> 3my $a; without $a { say 'Unset' } else7⏏5 { 'Set'
codesections m: say "\t$?TABSTOP" 20:41
camelia 8
codesections since $?TABSTOP is marked as compile-time, does that mean that expressions like ^^^ might print with a different number of spaces? 20:42
or is it "compile time" in some sort of nested way that means it still has the correct value?
lizmat good question 20:43
the current implementation is pretty straightforward in the setting:
my constant $?TABSTOP = 8;
m: my constant $?TABSTOP = 4; 20:44
camelia 5===SORRY!5=== Error while compiling <tmp>
Constants with a '?' twigil not yet implemented. Sorry.
at <tmp>:1
------> 3my constant $?TABSTOP = 47⏏5;
lizmat and there's no way to override that at
codesections interesting, thanks.
[Coke] m: $?TABSTOP=4; #BOOM 20:45
camelia Cannot assign to an immutable value
in block <unit> at <tmp> line 1
[Coke] (showing the other end)
lizmat I'm not sure what the speculation says about that
[Coke] also: who picked 8, you monster. 20:46
codesections :) agreed 20:47
[Coke] www.emser.com/products/raku?varian...1898458225
20:49 ajr joined
lizmat Looks like it was moritz_ in github.com/rakudo/rakudo/commit/fa2d53c30c 20:49
almost 10 years ago now :-)
20:53 ajr left
Xliff So... why not $*TABSTOP? 21:03
So it can be modified, accordingly.
I mean... the wrong value could start a centuries long flame-war. 21:04
lizmat m: my $*TABSTOP = 4; # there you go 21:05
camelia ( no output )
21:05 notna left
Xliff LOL... 21:06
That doesn't affect $?TABSTOP though, which I am assuming is the default expansion for '\t'?
lizmat I don't think we have tab expansion other than with .indent ? 21:07
Xliff Ah!
21:11 ajr joined
moon-child should be @*TABSTOPS 21:12
[Coke] lizmat: "\t" ? 21:18
moritz_ 9.5 years ago, aw man 21:41
22:09 A26F64 left 22:11 sm2 joined 22:35 ajr left 22:43 gcd joined 22:47 ajr joined 22:58 vrurg_ joined 23:01 vrurg left
Nemokosch yesterday I posted something in the <#538420565980086273> channel on discord, long story short, there is something weird when using junctions to construct paths 23:24
I did a check essentially like $object-path.extension('cpp'|'c'|'pcc') ~~ :f 23:25
and sometimes, under pretty random conditions (e.g this code has run for many files, I ran `git commit` from the script), it threw a warning that during the DESTROY phase, an unhandled exception happened for a .f method call 23:26
MasterDuke Nemokosch: there's currently some debate about whether to disallow junctions on the left-hand side of a smartmatch. i'd suggest trying to rework it so the junction is on the right if possible and see if that's better
ah, though the unhandled exception business is probably a bug 23:27
Nemokosch and it would tell me about paths that actually don't exist but could have been tested
but yeah I didn't even call .f so I couldn't even catch it 😄 23:28
23:28 vrurg_ left, vrurg joined
MasterDuke well, `~~ :f` is actually calling .f under the hood 23:29
Nemokosch so are left-hand side junctions known to be troublesome already?
MasterDuke how much do you want to read? github.com/Raku/problem-solving/issues/297 23:30
Nemokosch uh-oh
I mean the syntax itself looks neat but today I surely suspected the problem was related to it...
because I had to extend the code in a way that uses nested loops anyway
and bang, no more suspicious warnings
MasterDuke i would guess that the problem you're running into is not necessarily because a junction is on the left, but probably just junction-related in general, but that's just a guess 23:31
do you have a golf so i can try to repro it? 23:32
23:37 sm2 left
Nemokosch what is a golf when not that Tiger Woods sport? 23:40
23:41 Sgeo joined
MasterDuke short(est) code that demonstrates the problem 23:41
from code golf, solving a problem in the fewest characters 23:42
but no worries, i have something that does get those unhandled failures
Nemokosch oh nice 😄 23:43
MasterDuke so yeah, the fact that you're using a junction is what's causing them, though not necessarily because it's on the left (i think) 23:48
.f creates a Failure if the file doesn't exist 23:49
Nemokosch I was just wondering whether this is known/expected behavior as I got more suspicious about the fundamental cause
MasterDuke which is normally handled by something like `if $file.f`, i.e., the if puts it in boolean "context" and the Failure evaluates to False 23:50
Nemokosch I can very much sympathise with vrurg's takes under that issue fwiw
MasterDuke but the junction means you get multiple Failures, (at least some of) which aren't being handled 23:52
Nemokosch especially with the point that if one wants faster `switch`, maybe it shouldn't be based on a flexible but slow operation - rather than making that operation less flexible and faster universally...
MasterDuke i go back and forth with each new comment
Nemokosch oh okay, it makes some sense
the funny thing about this junction smartmatching is that it doesn't seem very deterministic 23:53
so for example when I made the git commit call in the meantime, it always threw failures
but sometimes it also threw without