🦋 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:00 Garbanzo_ left 00:02 Garbanzo_ joined 00:08 aindilis left 00:09 oneeggeach left 00:17 ribasushi left 00:20 Garbanzo_ left 00:21 Garbanzo_ joined 00:24 Garbanzo_ left, Garbanzo_ joined 00:52 pecastro left 00:57 ribasushi joined 01:11 Black_Ribbon joined 01:36 monkey__ joined 02:06 mowcat left 02:07 xinming_ left 02:08 xinming_ joined 02:23 eax joined 02:28 kvw_5_ joined 02:32 kvw_5 left 02:34 monkey__ left 02:57 eax left 03:54 aindilis joined 03:59 xinming_ left, xinming_ joined 04:59 linkable6 left, releasable6 left, quotable6 left, coverable6 left, squashable6 left, shareable6 left, notable6 left, benchable6 left, statisfiable6 left, evalable6 left, nativecallable6 left, sourceable6 left, committable6 left, greppable6 left, bloatable6 left, tellable6 left, bisectable6 left, unicodable6 left, wamba joined, coverable6 joined, sourceable6 joined, unicodable6 joined 05:00 squashable6 joined, quotable6 joined, shareable6 joined, greppable6 joined, bisectable6 joined, linkable6 joined 05:01 notable6 joined, committable6 joined, nativecallable6 joined, releasable6 joined, benchable6 joined, tellable6 joined, evalable6 joined, statisfiable6 joined 05:02 bloatable6 joined 05:16 kaiwulf left 05:24 berber44 left 05:31 Doc_Holliwood joined 06:31 sourceable6 left, bisectable6 left, evalable6 left, quotable6 left, coverable6 left, nativecallable6 left, shareable6 left, unicodable6 left, linkable6 left, greppable6 left, bloatable6 left, squashable6 left, notable6 left, benchable6 left, releasable6 left, statisfiable6 left, committable6 left, tellable6 left 06:32 squashable6 joined, releasable6 joined 06:33 sourceable6 joined, unicodable6 joined, tellable6 joined, nativecallable6 joined, shareable6 joined, greppable6 joined, bisectable6 joined, committable6 joined, coverable6 joined 06:34 benchable6 joined, linkable6 joined, bloatable6 joined, evalable6 joined 06:35 notable6 joined, quotable6 joined, statisfiable6 joined 06:55 Sgeo left 07:13 Doc_Holliwood left 07:25 orinthe left 07:26 orinthe joined 07:29 xinming_ left 07:34 xinming_ joined 07:37 domidumont joined 07:46 irced joined 07:48 xinming_ left, xinming_ joined
irced so uh yeah raku 07:55
07:56 clarjon1 left 07:58 xinming_ left 07:59 xinming_ joined, parabolize left
tyil yes 08:05
irced any new compilers in the makings? 08:06
tyil not from me, but it's certainly possible someone else is making one 08:08
irced how come the java virtual machine became the most focused on? 08:10
08:10 brtastic joined
moon-child ? as fas as I can tell, moarvm has seen the most attention 08:10
irced oh, back to the raku history books 08:11
08:11 vegetable-lover joined
irced what's the difference? 08:11
vegetable-lover hey, is there any way to package a raku program for distribution (besides docker)? I'd like to make something my teammates could use 08:12
moon-child irced: moarvm was written for raku, and maps well to its semantics. Jvm and js are also targets, but they're largely fringe; jvm is incredibly slow, the only reason to use it is interop with java libs
and afaik the js target is somewhat immature
irced moon-child: i see. 08:13
tyil vegetable-lover: this might be relevant for you wakelift.de/can-you-appimageine-that/ 08:15
08:15 wamba left
vegetable-lover tyil: thanks for the link! looks like a fair bit of work though 08:16
tyil I'm sure a lot is automatable, which would be a nice project for someone I'm sure :> 08:17
08:18 aluaces left
vegetable-lover possibly maybe! 08:20
08:22 xinming_ left 08:24 xinming_ joined 08:26 brtastic1 joined 08:30 brtastic left, brtastic1 is now known as brtastic 08:33 vegetable-lover left, dakkar joined 08:36 abraxxa joined 08:42 epony left, aindilis left 08:43 abraxxa left, abraxxa joined 08:56 sena_kun left 09:01 sena_kun joined 09:07 pecastro joined
MasterDuke irced: the jvm was focused on early because it was more mature than moarvm, especially in the concurrency support. aiui, jnthn used the jvm to prove out the plan for raku's concurrency, and once he was satisfied that the higher-level plan/design was good, pretty much switched over to moarvm completely and it became the primary target 09:13
but the jvm backend can still be faster for some long running programs (and the not-yet-completed truffle backend can be even faster still) 09:14
irced takes notes. 09:16
MasterDuke np 09:18
09:20 plvicente joined 09:23 mowcat joined 09:26 wamba joined 09:28 jio920 joined, jmerelo joined 09:30 jio920 left 09:40 aluaces joined 10:00 Doc_Holliwood joined 10:16 irced left 10:17 xinming_ left 10:18 xinming_ joined 10:20 Black_Ribbon left 10:21 epony joined 10:29 mowcat left, mowotter joined 10:36 plvicente left 10:38 rindolf joined 10:42 xinming_ left 10:43 xinming_ joined 11:00 plvicente joined 11:04 xinming_ left 11:05 xinming_ joined 11:09 xinming_ left 11:11 xinming_ joined 11:14 tealecloud joined 11:17 brtastic1 joined 11:21 plvicente left 11:29 brtastic1 left, xinming_ left, Altai-man_ joined 11:30 sena_kun left 11:32 xinming_ joined 11:40 plvicente joined 11:53 xinming_ left 11:54 xinming_ joined 11:55 MasterDuke left 11:56 MasterDuke joined 12:12 plvicente left 12:22 plvicente joined 12:28 xinming_ left 12:29 xinming_ joined 12:47 Doc_Holliwood left 12:57 xinming_ left, Doc_Holliwood joined 13:02 xinming_ joined 13:09 PimDaniel joined
PimDaniel \o 13:09
In Perl5 it was possible to capture groups directly into variable like this : my ($x,$y1,$y2)) = $ind =~ /^(\d+):(\d+)_(\d+)$/; for example. How can we do it in Raku? 13:11
i tried my ($x ,$y1,$y2) = $ind ~~ /^ (\d+):(\d+)_(\d+) $/; without success. 13:12
13:13 brtastic left
PimDaniel The subject is : "regexes". 13:13
lizmat I would do it like this: 13:14
m: my ($a,$b) = "foo".match(/ (.) (.) /)>>.Str; say $a; say $b
camelia f
lizmat the >>.Str is just a trick to: 1. force .list on the Match object, and 2. stringify on the fly (otherwise you'd get Match objects in $a and $b 13:15
13:15 jmerelo left
PimDaniel lizmat: And where are my : and _ chars controls gone? 13:19
lizmat you mean m:i/ foo bar/ ? 13:20
PimDaniel No. 13:21
lizmat then please clarify :-)
13:21 xinming_ left
tusooa PimDaniel: you can just put them in quotes 13:23
PimDaniel lizmat: my ($x ,$y1,$y2) = $ind ~~ /^ (d+):(d+)_(d+) $/; : what i'm trying to capture is inserted into a string.
lizmat aaah... ok
what tusooa said: quote them
PimDaniel lizmat did you well observ my regexp? 13:24
lizmat *anything* non-alphanumeric must be quoted in Raku regexes
PimDaniel lizmat ok
lizmat PimDaniel: sorry, was focussing on the assignment part :-)
tusooa (\d+)":"
lizmat and for readability, add spacing
13:24 xinming_ joined
lizmat /^ (\d+) ':' (\d+) '_' (\d+) $/ 13:25
13:26 plvicente left
PimDaniel lizmat hum okay. i'v forgotted to quote 13:26
PimDaniel thank's tusooa
PimDaniel thank's lizmat. 13:27
tusooa np
PimDaniel what is that error: Directive d not applicable for value of type Match (「77:22_46」 13:29
should work!
13:29 xinming_ left 13:30 xinming_ joined
lizmat could it be that you're trying on a command line, and shell quoting is messing you up ? 13:30
PimDaniel lizmat : no i run my program. 13:31
I think it's just a simple mistake.
lucs PimDaniel: Time to paste the code somewhere for us to view :) 13:32
lizmat $ r 'say "77:22_46" ~~ /^ (\d+) ":" (\d+) "_" (\d+) $/'
0 => 「77」
1 => 「22」
2 => 「46」
PimDaniel i use to use pastebin but is there a way to paste linked to this topic or with an irc command? 13:34
pastebin.com/HhhNJXxP 13:35
PimDaniel lizmat not the same code as mine. 13:36
I got 3 left values in my original code.
Mmmm well no sure it is the problem anyway. 13:37
lizmat the problem is in the printf
it gets a Match object, and printf is not smart enough to convert that for you 13:38
which could be considered a bug, I'd need to think about that
13:39 berber44 joined
lizmat my ($x ,$y1,$y2) = ($ind ~~ /^ (\d+) ':' (\d+) '_' (\d+) $/)>>.Int # note the >>.Int to get ints into the variable 13:39
PimDaniel lizmat i knew that using printf, i could face type object, but the error message is really stupid and tells me noting. 13:41
13:41 plvicente joined
lizmat "Directive d not applicable for value of type Match (「77:22_46」" seems pretty descriptive to me? 13:42
13:42 brtastic joined
lizmat if the error points to the printf 13:42
lucs PimDaniel: There was probably a line number for that error message, pointing to the printf, no?
MasterDuke nope 13:45
m: printf("%d sdf\n", Mu.new)
camelia Directive d not applicable for value of type Mu (Mu.new)
in block <unit> at <tmp> line 1
lucs :(
Oh, wait, line 1
13:46 xinming_ left
PimDaniel Okay, i admit! 13:46
lucs PimDaniel: If you keep using Raku, you'll eventually become impressed at the general high quality of the error messages. 13:47
MasterDuke i think you only get the pointers to the place for compile time errors (which hopefully a lot of printf errors might become after rakuast lands)
lucs Making so many mistakes, I know I am!
13:47 xinming_ joined
PimDaniel But now why don't $x.Int work? 13:47
13:48 monkey__ joined
MasterDuke i wonder if it'd be better to say 'Directive %d ...'? 13:48
PimDaniel printf("x: %d,y1: %d,y2: %d\n",$x.Int,$y1.Int,$y2.Int) should work, no?
MasterDuke or 'Directive "%d" ...'
lucs MasterDuke: That looks like an improvement, indeed.
MA 13:49
(More Awesome)
lizmat MasterDuke lucs I'm about to commit that :-) 13:50
lucs lizmat++ Thanks :)
PimDaniel I don't mind to use say or print instead of printf. 13:51
lucs PimDaniel: Depends on the circumstances I suppose. 13:52
lucs doesn't suppose, he knows ;)
Part of the answer to many questions: "It depends." 13:53
lizmat otoh, I think printf should just take Match objects, as they're Cool 13:54
lizmat makes mental note to check the RakuAST implementation for that
PimDaniel Hum i think it'll works with printf if declare my variable types at first into my first my and then use lizmat >>.Int
13:57 plvicente left 14:01 monkey__ left
lucs PimDaniel: The 「printf(…, $x.Int, …)」 fails if you did only 「… ~~ /^ … $/ …」 (without the 「>>.Int」), because in that case, it's $x that receives the whole match ($y1 and $y2 get nothing). 14:02
PimDaniel lucs : no, because because i had not the parenthesis. 14:03
lucs PimDaniel: Uh, so you fixed it, okay :)
lucs finds it really hard to debug code that is described, not read.
PimDaniel but then i received a list of matches instead of a list of Ints
14:15 plvicente joined 14:26 Xliff joined 14:32 rir_ joined 14:50 Sgeo joined 15:03 Xliff left 15:16 pedro__ joined 15:18 plvicente left
[Coke] github.com/Raku/doc/blob/master/do...6#L87-L141 - are the names in this table literal strings that have to appear as is? (I assume column two the answer is yes, but what about the last column, e.g. "guillemotleft") 15:22
(trying to cleanup failing doc spelling test) 15:25
rir_ A question on error messages: Can the colorization be shut off? Neovim is less than vim in regards to the tty environment it gives when you ":!raku % | less". 15:27
[Coke] docs.raku.org/programs/03-environm...ROR__COLOR 15:28
rir_ Thank you, Coke. 15:30
[Coke] FYI, I had no idea, I just searched the doc site.
rir_ Yes. I do that a lot, with fair success. Sometimes I seem to just think too differently. 15:35
Geth doc: 2375bd4699 | Coke++ | xt/pws/code.pws
track new words from compose table
[Coke] rir_: I searched for "color", fwiw. 15:37
anyway, glad it was already there and documented. :)
15:42 rindolf left, rindolf joined 15:43 parabolize joined 15:45 pedro_ joined 15:47 pedro__ left, Doc_Holliwood left 15:57 Doc_Holliwood joined 16:00 Garbanzo_ left 16:16 milocario joined
lizmat rir_: you might also find this interesting: docs.raku.org/programs/03-environm...S__HANDLER 16:16
16:22 berber44 left 16:25 eseyman left 16:29 eseyman joined 16:40 Doc_Holliwood left 16:42 Doc_Holliwood joined
lizmat and another Rakudo Weekly News hits the Net: rakudoweekly.blog/2021/03/08/2021-...ated-star/ 17:04
El_Che let me check if I am already famous 17:07
lizmat alas... no mention of El_Che in this week's RWN 17:08
El_Che still a nobody
lizmat sorry, I'm not Oprah :-) 17:09
El_Che lizmat: you're the Oprah of Raku 17:10
lizmat eek
El_Che "you get a speedup, you get a speedup, speedups for everbody!" 17:11
lizmat but that's only so because we both have to watch our weight :-)
17:12 Doc_Holliwood left 17:13 brtastic left, brtastic joined 17:18 jmerelo joined 17:25 PimDaniel left 17:27 domidumont left 17:37 pedro_ left 17:39 dakkar left 17:40 camelia left 17:41 plvicente joined, aborazmeh joined 17:47 aborazmeh left 17:49 m_athias left, camelia joined 17:50 mowotter left
leont Another weekly, yet I still haven't published that module :-o 17:52
moritz lizmat++ # weekly 17:55
17:55 mowcat joined 18:07 plvicente left 18:12 milocario left 18:14 domidumont joined
lizmat leont: there'll be another Weekly :-) 18:15
18:49 domidumont left 18:58 m_athias joined 19:09 jmerelo left 19:42 plvicente joined 19:55 abraxxa left 20:01 Doc_Holliwood joined 20:12 patrickb joined 20:24 Black_Ribbon joined
gfldex .seen raiph 20:25
tellable6 gfldex, I saw raiph 2021-02-22T00:18:21Z in #raku: <raiph> SmokeMachine: goodnight; I hope you dream of throwing dictionaries through hoops :)
20:33 plvicente left 20:35 aborazmeh joined 20:53 aluaces left 20:59 aborazmeh left, plvicente joined 21:00 Garbanzo_ joined 21:10 Garbanzo joined 21:11 Garbanzo_ left, plvicente left 21:13 brtastic left 21:20 aluaces joined 21:22 plvicente joined 21:34 plvicente left 21:46 rindolf left, aindilis joined 21:52 wamba left 21:56 patrickb left 22:01 tyil left, tyilanmenyn joined 22:09 xxpor left 22:12 kaiwulf joined 22:22 aluaces left
Doc_Holliwood m: say <1 2 3>.map: { |( $_ xx 2 ) } 22:25
camelia (1 1 2 2 3 3)
Doc_Holliwood is there a better way to do this? (doubling the list)
22:27 aluaces joined, tyilanmenyn is now known as tyil
Doc_Holliwood Z of course, i am an idiot 22:27
lucs Doc_Holliwood: Can you spell it out for future people who read the chat logs? 22:31
lucs pretends he knows how to do what Doc_Holliwood is talking about. 22:32
Doc_Holliwood m: say flat <1 2 3> Z <1 2 3>
camelia (1 1 2 2 3 3)
lucs Thanks :)
gfldex m: say ((1,2,3) xx 2).&[Z].flat; 22:42
camelia (1 1 2 2 3 3)
gfldex m: say ((1,2,3) xx 8).&[Z].flat;
camelia (1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3)
gfldex Doc_Holliwood: you can have as many as you want ^^^ 22:43
gfldex .oO( I ♥ .& ) 22:44
Doc_Holliwood i know about xx. i didnt like the parens
just looks nicer this way =) twitter.com/HrBollermann/status/13...2690476038 22:45
what i didn't know is that you can do a &[] 22:47
gfldex Doc_Holliwood: That is not overly surprising because that's an ENODOC. It is very well specced tho. 23:14
m: say &[Z].name;
camelia infix:<Z>
Doc_Holliwood enodoc? 23:20
gfldex error not documented 23:25
23:25 mowcat left
gfldex that you can find it in /usr/include/errno.h is also an error :-> 23:26
moon-child enodoc is itself an enodoc o_O 23:29
23:30 MasterDuke left, mowcat joined
gfldex .oO( Raku is a very functional PL. Even our errors are recursive. ) 23:39
23:41 _________ left, _________ joined
tbrowder hi, folks, i need a sanity check on raku number handling 23:58
m: say -1.5e0.Int 23:59
camelia -1
tbrowder but
m: say -1.5e0.abs
camelia -1.5
tbrowder a wee bug it looks to me