šŸ¦‹ Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:04 leont left 00:05 leont joined 00:14 cfa left 00:17 pecastro left 00:22 leont left 00:25 sena_kun joined 00:27 Altai-man_ left 00:32 hungrydonkey left 00:36 wildtrees left 00:39 NODE left 00:41 NODE joined 00:54 NODE left 00:57 NODE joined 01:04 Kaiepi left 01:05 MasterDuke left, Kaiepi joined 01:18 lucasb left 01:19 lichtkind left 01:28 squashable6 left 01:31 squashable6 joined 01:34 Altai-man_ joined 01:36 sena_kun left 01:41 _jrjsmrtn joined, __jrjsmrtn__ left 01:43 ToddAndMargo joined
ToddAndMargo Anyone on newbie duty? 01:43
Windows 7; What am I doing wrong. I am trying to call `dir "test 1"` 01:44
C:\NtUtil>perl6 -e "my $proc=run( 'dir', 'test 1', :out ); my @RtnStr = $$proc.out.slurp-rest.lines; for @RtnStr -> $Line { say $Line;}" 01:45
Nothing comes back
rypervenche ToddAndMargo: Have you tried running it in a script? 01:49
I have problems running it from the command line because of the quoting and variables. 01:50
01:51 ToddAndMargo left
poga hi! Is there a way to get AST from raku code? I found this docs.raku.org/type/AST but it doesn't show much 01:52
rypervenche poga: I think you want .made, which is used with make and grammars: docs.raku.org/routine/make 01:53
poga rypervenche: thanks! I will look into it 01:57
rypervenche poga: This might be more useful for you: docs.raku.org/language/grammar_tutorial
02:19 molaf left 02:31 molaf joined
tbrowder todd: i see two $$: 02:44
which looks wrong
02:48 ToddAndMargo joined
ToddAndMargo I somehow got kicked off. Thi sis the specific command I am trying to run: 02:49
C:\NtUtil>fsutil usn readdata "C:/NtUtil/test 1"Major Version : 0x2Minor Version : 0x0FileRef# : 0x0019000000021a81Parent FileRef# : 0x001e000000005b8bUsn : 0x00000000460f7dd8Time Stamp : 0x0000000000000000 00:00:00 1/1/1601Reason : 0x0Source Info : 0x0Security Id : 0x0File Attributes :
0x20File Name Length : 0xcFile Name Offset : 0x3cFileName : test 1
02:58 leont joined 03:14 ToddAndMargo left 03:18 aborazmeh joined, aborazmeh left, aborazmeh joined 03:35 sena_kun joined 03:37 Altai-man_ left 03:52 leont left 03:58 ToddAndMargo joined
ToddAndMargo I keep getting kicked off. :'( 03:59
04:23 cpan-raku left 04:24 cpan-raku joined, cpan-raku left, cpan-raku joined 04:41 aborazmeh left 04:42 NODE left 04:43 NODE joined 04:59 PavelB joined 05:00 Celelibi left 05:11 Celelibi joined 05:27 molaf left 05:34 Altai-man_ joined 05:36 sena_kun left 05:39 a3r0 joined
elcaro does MVM_DISABLE_JIT disable JIT when I run raku, or do I have to compile rakudo with that flag set 05:42
05:50 guifa_ joined 05:51 guifa left, guifa_ is now known as guifa 06:04 aborazmeh joined, aborazmeh left, aborazmeh joined 06:12 xelxebar left 06:14 sauvin joined
Voldenet elcaro: my manpage says that MVM_JIT_DISABLE is an environment variable 06:38
elcaro: github.com/MoarVM/MoarVM/blob/mast...s/moar.pod relevant docs 06:40
06:45 aborazmeh left 06:59 wamba joined 07:02 cognominal joined 07:05 cognomin_ left 07:09 PavelB left 07:35 sena_kun joined 07:36 Altai-man_ left 07:37 abraxxa joined 07:42 abraxxa left, abraxxa joined 07:58 NODE left 07:59 NODE joined 08:01 ToddAndMargo left 08:03 NODE left 08:04 NODE joined 08:05 NODE left 08:07 NODE joined, domidumont joined 08:18 stoned75 left 08:23 sno left 08:42 domidumont left 08:45 dakkar joined, xelxebar joined 08:46 wamba left 08:51 Black_Ribbon left, wamba joined 09:03 wamba left 09:07 sno joined, wamba joined 09:11 rindolf joined 09:20 a3r0 left 09:34 Altai-man_ joined 09:36 Grrrr left 09:37 Grrrr joined, sena_kun left 09:44 pecastro joined 10:13 domidumont joined 10:15 mowcat joined
rba Practical Raku and Perl Meetup in Zurich, 23. March 2020 www.meetup.com/Swiss-Raku-Perl-Com...269029945/ retweet: twitter.com/baumerits/status/12329...1010495488 10:18
Altreus rypervenche: ah, is it because EXPORT was part of the class and not at the top level of the file? 10:22
10:25 reach_satori left 10:32 lichtkind joined 10:47 wamba left 11:04 titsuki joined 11:09 sftp left 11:11 reach_satori joined
Altai-man_ bisectable6, &slurp.candidates.map(*.signature).sort.say 11:27
bisectable6 Altai-man_, Bisecting by output (old=2015.12 new=cbd75f7) because on both starting points the exit code is 0
Altai-man_, bisect log: gist.github.com/29bf7f0aaac96dcdc4...505e254cd4 11:28
Altai-man_, (2016-03-04) github.com/rakudo/rakudo/commit/ea...341e986a91
11:28 titsuki left
Altai-man_ bisectable6, &slurp.candidates.map(*.signature).sort.say 11:28
bisectable6 Altai-man_, Bisecting by output (old=2015.12 new=cbd75f7) because on both starting points the exit code is 0
Altai-man_, bisect log: gist.github.com/79eac7d2f70c84fc6b...b0165520a3
Altai-man_, (2016-03-04) github.com/rakudo/rakudo/commit/ea...341e986a91
11:34 leont joined 11:35 sena_kun joined 11:37 Altai-man_ left
lizmat wow, that's a blast from the past 11:41
tadzik I expected to see something pre-nom :P 11:42
but that was wayy earlier
leont m: sub foo($foo, *@bar) { }; dd $_ for &foo.signature.params.map(*.positional) 11:45
evalable6 Bool::True
leont That false is rather unexpected, is that intentional? 11:46
Also because *%baz is .named (and .slurpy)
lizmat because that's a slurpy ? 11:56
I think it's intentional, because it can slurp many positional arguments ? 11:57
leont I would expect it to be .slurpy and .positional 12:07
Just as a slurpy named argument is .slurpy and .named 12:08
I don't have a strong opinion either way, but this feels inconsistent
lizmat well, I think this boils down to the difference between the number of positionals in a signature, and the arity 12:09
12:10 tejr left
lizmat m: dd :($a,*@b).arity 12:11
evalable6 1
12:18 tejr joined 12:23 titsuki joined
Geth rakudo.org: 616bbb43c9 | (Roman Baumer)++ (committed using GitHub Web editor) | post/announce-rakudo-star-release-2020.01.md
Fix date in text of the 2020.01 announcement
12:31 lichtkind left
leont lizmat: then why it *%foo .named? 12:33
I mean .named_names is empty 12:34
lizmat suspects you've found a case where jnthn has cut corner, wrt *@a not being positional
or it is just an oversight 12:35
jnthn Either way, things that process/introspect signatures may well rely on the current inconsistency, so we'd need to be rather careful if we want to change it 12:37
I agree its inconsistent.
leont is filing the issue 12:40
sena_kun El_Che, ping? 12:57
13:15 hankache joined 13:18 mowcat left
rypervenche Altreus: I was using "unit module" and didn't realize it reads the entire file as a block. So I changed it to a module block and put the sub EXPORT outside of that. Fixed the issue. :) 13:21
Altreus mildly pesky because I like the structure that 'unit' gives you 13:22
I'm sure there's a way of declaring EXPORT so that it works, even if you have unit
13:28 abraxxa left, abraxxa1 joined
lizmat Altreus: not atm, afaik 13:28
but if you can get by with just adding "is export" traits, you don't have to worry about that anyway 13:29
13:29 hankache left
Altreus ah yes, true, most of the time it's not a concern 13:31
What namespace does EXPORT have, then, when it's in a file but not a module or some other namespace? 13:32
lizmat GLOBAL::EXPORT I think ?
Altreus presumably it's got special behaviour associated with it so they don't collide
13:35 Altai-man_ joined, sftp joined
jnthn It has to be in UNIT 13:36
And it should be a lexical there
It's not in any package (or not looked for there0
13:36 sena_kun left 13:38 pecastro left
Altreus Raku seems accidentally quite aggressive at failing to report problems 13:40
eh 13:41
Let me try that again without shifting blame
I seem to find it very easy to write Raku code that doesn't report errors
I have to put CATCH { .say } more often than I'd expect
It's probably to do with concurrency, but still... things go missing
jnthn If you're catching an exception, it's getting reported?
Altreus But if I don't catch it, it goes unreported 13:42
For example, I just learned I was getting "Type check failed in assignment to $!timestamp; expected DateTime but got Str ("2020-02-27T13:39:41....)
jnthn Promises that you don't await anywhere, perhaps?
Altreus I don't know... that's part of the issue I think
13:43 aborazmeh joined, aborazmeh left, aborazmeh joined
Altreus I mean, I wouldn't expect it to work at all if I weren't awaiting them 13:43
lizmat Altreus: hoping to see a MRE :-)
jnthn If you put the `start` in sink context, it'll attach a handler that will bring the program down if you don't handle it :)
Altreus But it's entirely possible the error is contained in some other promise that I'm not awaiting
Yeah ... I think my issue is somewhere in not caring whether a promise completes or not 13:44
I'm still a bit shaky so my whole system is dubious :D
jnthn If you don't care, just don't store the Promise anywhere
Maybe we should put a DESTROY in Promise so that if it is broken and never awaited, we warn
Altreus indeed
jnthn A bit like unhandled failures
Altreus I am unclear what's happening 13:45
jnthn That'd maybe at least identify some such issues
Altreus I'm also mid-refactor, so I'm finding these problems on the fly
I'll pause my refactor and try hunting this down
See if I can figure out where the error is going, then see how much of a user error it is to do whatever I'm doing :)
Ultimately it would be nice for the language to complain irrespective of how much of a user error it was though 13:46
so let's see
lizmat jnthn: re "a DESTROY in Promise", wouldn't that be noisy with some of the timeout structures if there was a timeout ?
Altreus If I use await in sink context, what happens to a fail? 13:47
jnthn lizmat: Those don't get broken, though?
lizmat they might get broken without you noticing after the timeout, no ?
jnthn Altreus: Propagtes to the uncaught handler on the scheduler, which by default reports the exception and exits the program with non-zero 13:48
Altreus right well
hol up, I'mma try something
jnthn lizmat: Yeah but...if you used it in an anyof then it *did* get awaited as part of the `anyof` implementation, so it'd not trigger this :)
Altreus I'm pretty sure there's no promise here 13:49
I'll commit my code and show it
github.com/shuppet/p6-api-discord/...d.pm6#L177 13:53
This CATCH is necessary, or I never learn that Message.new failed
None of this appears to be a promise, but it /is/ in a tap 13:54
jnthn $!conn.messages.tap( -> $message 13:55
start react whenever $!conn.messages -> $message
Altreus correct 13:57
but why :)
jnthn Because structured programming :P 13:58
Altreus furthermore, who wants .tap to swallow errors silently? :x
I feel like that's a trap
jnthn I don't think it does in general
They're eventaully meant to cause a sheduler thread to die, and bring the thing down
Altreus But I'm a noob doing stuff from the docs and I got to .tap instead of start react whenever 13:59
Especially this idea of putting it in a promise in sink context ... that seems archaic 14:00
jnthn The docs probably should guide people away from .tap and more towards react/supply/whenever 14:01
Altreus What would I lose if I didn't have a promise there? 14:04
jnthn Sorry, I'm confused; what promise? 14:05
Altreus the start in `start react whenever` 14:06
jnthn Ah...sorry, I get confused when pepole call start "a promise" :)
react is blocking
start runs it on the pool 14:07
I note your method name even has the word start in it...so this fits quite well :)
Altreus oh of course 14:08
yes, definitely don't want a blocking react
Chrome has not yet realised that docs.raku.org is a search engine 14:23
jnthn: is start not a promise? :x
jnthn Altreus: start will 1) schedule some work on the thread pool, 2) return a Promise that will be kept/broken based on the outcome of that work 14:24
Altreus: So really `start` is a Promise factory, and the thing that it returns is a Promise
Altreus My instinct is to say that a straight-up Promise doesn't do the work until you ask for it 14:25
14:26 aborazmeh left
jnthn That isn't really how it is; a Promise is a synchronization mechanism, and the work is arranged by whatever gave you the Promise 14:27
So Promise.in(1) is scheduling a timer and then returning the Promise, and keeping it when the time elapses.
Altreus ... right, it's almost identical to Future in that regard 14:28
The concepts are really orthogonal
jnthn Yeah, in Raku we don't really have a distinct word for "a Promise that is backed by some running code" 14:30
Altreus once you realise the separation it's obvious 14:31
Today's internet is stressing me out 14:33
Try to type and it's cut me off again
I was going to ask, on a separate tangent, the best way of accepting a Str in a constructor to populate a DateTime property
I feel like I don't want to override BUILD, but TWEAK is too late
I could monkey type DateTime 14:35
is that allowed?
jnthn Well, with the usual constraint that if two modules do it, your precomp ends here.
But...feels like overkill 14:36
Why is TWEAK too late?
Altreus cos the object is constructed already, no?
Did I misunderstand?
lizmat you can still modify the object, can't you? 14:37
to make it right?
jnthn Well, TWEAK is the last step in the construction
Altreus But it won't accept a Str in the attribute
so I figure it will already have failed 14:38
lizmat ah, yes, if it is like that, yes
leont Is there a cute trick to invert an array of arrays?
moritz leont: invert? like, transpose?
m: my @a = ['a', 'b', 'c'], [1, 2, 3], ['x', 'y', 'z']; say [Z] @a 14:39
evalable6 ((a 1 x) (b 2 y) (c 3 z))
leont Yeah, that was the word I was looking for, and I figured it had to be easy :-)
Altreus can I override BUILD, edit %args, and then call ... samewith?
leont Is there a way to make that work with lists that aren't all equally long? Or should I just push Any's in there? 14:41
jnthn Altreus: I'd just override `new` and tweak the arg there and then call .bless 14:42
lizmat Altreus: make your own "new" method, then call self.bless
leont (actually, pushing Any is a terrible idea in my case)
lizmat wow, jnthn beat me :-)
Altreus OK - This is stuff I would like to be easier, though :) 14:43
coercion in general bth 14:44
jnthn Well, ultimately `has Date() $.foo`
Altreus I can use DateTime() in a ... oh
leont Ah, roundrobin is what I want
jnthn Though it's NYI
Altreus NYI?
jnthn Not Yet Implemented
Altreus oh!
jnthn At one point it was also really hard to implement
Though my last big refactor of assignment makes it easier to do without totally hosing performance of assignment generally :) 14:45
Altreus So I suppose Str has no method DateTime 14:46
can it?
jnthn Better would be for DateTime to implement CALL-ME accepting Str 14:47
Though...really the way this is meant to work is it should call DateTime.new($str)
Altreus seems good too, although that is not documented in the bit about coercion
lizmat jnthn: what would DateTime.CALL-ME(Str:D $) give ? 14:48
DateTime($str) support ?
Altreus Is there a design reason why we have to specify that coercion should happen, by adding postfix ()? 14:49
as opposed to presumably technical reasons
lizmat postfix () is just short for (Any)
as in, specifying the types you will accept
Altreus I guess I'm asking if there's a language-design reason why that's not the default assumption 14:50
as in, omitting () also means (Any)
lizmat omitting will not coerce
Altreus I know - I'm asking why
lizmat because we don't want it to be like Perl where all sorts of coercions happen without you noticing it ? 14:51
and thereby losing the benefits of gradual typing ?
Altreus Ah, deeper reasons :)
is this the NYI error? :) "Coercion DateTime(Any) is insufficiently type-like to qualify a variable" 14:54
moritz yes, I think so
Altreus cool, I'll code around it 14:55
15:00 wamba joined 15:03 lucasb joined 15:11 lizmat left 15:19 molaf joined 15:30 pecastro joined 15:35 sena_kun joined 15:36 Altai-man_ left
leont Given a list of values and a list of subs, is there a way to zip-call them? 15:39
15:42 molaf left
sena_kun u: E[{" 15:48
unicodable6 sena_kun, U+0045 LATIN CAPITAL LETTER E [Lu] (E)
sena_kun, U+005B LEFT SQUARE BRACKET [Ps] ([)
sena_kun, 7 characters in total (E[{"): gist.github.com/ece2fc4c42aeea94f1...3afa1123e4
sena_kun u: E[ 15:49
unicodable6 sena_kun, U+0045 LATIN CAPITAL LETTER E [Lu] (E)
sena_kun, U+001B <control-001B> [Cc] (control character)
sena_kun, 6 characters in total: gist.github.com/a20b2bc9196546560e...be1d4c3a12
15:53 lizmat joined
leont Ā«Invocant of method 'CALL-ME' must be a type object of type 'List', not an object instance of type 'Array[Code:D]'. Did you forget a 'multi'?Ā» is a very confusing error message 15:57
16:02 Actualeyes joined 16:05 cfa joined 16:07 aborazmeh joined, aborazmeh left, aborazmeh joined 16:09 dansolo42 joined
leont Best solution I currently have is (@converter Z @list).map: -> [ $converter, $item ] { $converter($item) } 16:11
It's ok, but I usually there's a cuter way to do this in raku
16:17 mowcat joined 16:19 abraxxa1 left 16:20 abraxxa joined, wamba left 16:25 hankache joined 16:27 abraxxa left 16:29 hankache left 16:38 aborazmeh left, veesh_ joined, veesh left 16:39 veesh_ is now known as veesh, molaf joined 16:46 lizmat left 16:47 lizmat joined 16:49 hankache joined, lizmat left 16:55 titsuki left 17:02 wamba joined 17:09 Itaipu left 17:10 Itaipu joined 17:17 aborazmeh joined, aborazmeh left, aborazmeh joined 17:30 sno left 17:33 pecastro left 17:34 ctilmes1 left, Altai-man_ joined
Altreus Object::Delayed has actually simplified this architecture a lot 17:36
I don't need any promises any more
17:36 domidumont left
Altreus mostly because it lets me sack off the actual communication until later, when it can be synced 17:36
17:37 sena_kun left
vrurg Altreus: you could also have a look a my AttrX::Mooish. It does lazy attributes. 17:37
tellable6 2020-02-27T16:27:38Z #raku-dev <lizmat> vrurg how is the precomp going for you ?
Altreus eh, probably works out the same at this point 17:38
Same effect on the architecture anyway
17:38 chloekek joined 17:45 MasterDuke joined 17:47 aborazmeh left 18:07 domidumont joined 18:11 molaf left
Geth Ā¦ problem-solving: vrurg assigned to jnthn Issue RAKUDOLIB destiny? github.com/Raku/problem-solving/issues/167 18:15
18:24 dakkar left 18:25 sarna left 18:27 ccamel joined 18:30 camelCaser left 18:34 hankache left 18:42 silug left 18:53 wamba left 19:22 wildtrees joined 19:23 Black_Ribbon joined 19:24 sauvin left 19:32 domidumont left 19:35 sena_kun joined 19:37 Altai-man_ left, lizmat joined 19:52 Black_Ribbon left 20:02 Guest25353 joined 20:05 pecastro joined 20:06 tejr left 20:13 Guest25353 left 20:14 Black_Ribbon joined 20:16 hankache joined 20:17 Doc_Holliwood joined
mst raku.org/archive/doc/design/apo/A01.html 20:24
the =encoding seems to've got intended accidentally
no idae who I'm supposed to harass
20:25 lizmat left
MasterDuke mst: no real idea, but i think hankache and rba have been working on raku.org recently 20:27
20:30 aborazmeh joined, aborazmeh left, aborazmeh joined 21:03 Doc_Holliwould joined 21:07 Doc_Holliwood left 21:16 sno joined 21:26 Itaipu left 21:34 Altai-man_ joined 21:37 sena_kun left 21:43 reach_satori left, reach_satori joined 21:54 reach_satori_ joined, reach_satori left 22:07 Itaipu joined
rba mst: Looks like this is "broken" already a while age web.archive.org/web/20120712010808...o/A01.html 22:17
s/age/ago/ 22:18
22:33 lizmat joined 22:46 aborazmeh left 22:51 hankache left, cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined 23:00 Doc_Holliwould left 23:02 chloekek left 23:06 rindolf left 23:11 tphilipp joined, tphilipp left 23:16 lucasb left 23:18 tphilipp joined 23:19 tphilipp left 23:35 sena_kun joined 23:37 Altai-man_ left 23:43 sarna joined 23:46 aborazmeh joined, aborazmeh left, aborazmeh joined 23:58 pecastro left