🦋 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 brtastic left 00:24 aborazmeh left 00:27 xinming_ left 00:28 xinming_ joined 00:41 pecastro left
tbrowder tony-o: got it, not much help on my end until after the holidays, sorry 00:43
tellable6 2020-12-19T08:38:46Z #raku <jmerelo> tbrowder let me check
2020-12-19T08:39:41Z #raku <jmerelo> tbrowder if it's about authorship of the articles, there's not much I can do. If it's some other thing, it got lost. Please use email...
00:46 murrayBlockchain left 00:54 wamba left 01:19 ggoebel_ left 01:20 Doc_Holliwood left 01:26 mowotter left 01:40 lucasb left 02:08 maggotbrain joined
Geth doc: JustThisGuyAZ++ created pull request #3748:
Update Path.pod6
02:45 xinming_ left, xinming_ joined 02:48 melezhik joined
melezhik .tell tony-o, I've uploaded fez plugin to SparrowHub - sparrowhub.io/plugin/raku-utils-fez/0.000002 , it happened to be number 200 in SparrowHub eco system, :-) 02:49
tellable6 melezhik, I'll pass your message to tony-o
02:51 xinming_ left 02:52 vrurg left 02:54 jmchael left, melezhik left, xinming_ joined 02:55 vrurg joined 03:12 aindilis joined 03:23 xinming_ left, xinming_ joined 03:32 leont left 03:42 melezhik joined
melezhik .tell tony-o , I've updated, with more accurate example - sparrowhub.io/plugin/raku-utils-fez/0.000003 03:42
tellable6 melezhik, I'll pass your message to tony-o
03:43 melezhik left 04:43 coverable6 left, committable6 left, linkable6 left, benchable6 left, statisfiable6 left, squashable6 left, shareable6 left, tellable6 left, unicodable6 left, notable6 left, evalable6 left, quotable6 left, bloatable6 left, releasable6 left, sourceable6 left, greppable6 left, nativecallable6 left, bisectable6 left, squashable6 joined 04:44 statisfiable6 joined, shareable6 joined, coverable6 joined, committable6 joined, quotable6 joined, greppable6 joined, sourceable6 joined, releasable6 joined 04:45 linkable6 joined, unicodable6 joined, evalable6 joined, benchable6 joined, notable6 joined, nativecallable6 joined, bloatable6 joined, bisectable6 joined, tellable6 joined 04:52 rindolf joined
tony-o 2 05:11
tellable6 2020-12-23T02:49:18Z #raku <melezhik> tony-o, I've uploaded fez plugin to SparrowHub - sparrowhub.io/plugin/raku-utils-fez/0.000002 , it happened to be number 200 in SparrowHub eco system, :-) 05:12
2020-12-23T03:42:57Z #raku <melezhik> tony-o , I've updated, with more accurate example - sparrowhub.io/plugin/raku-utils-fez/0.000003
05:44 Merfont left, Kaeipi joined 05:48 xinming_ left, xinming_ joined 05:50 Xliff left, Kaeipi left, Kaeipi joined 06:14 aluaces joined 06:17 Kaeipi left 06:20 Kaeipi joined, Merfont joined, Kaeipi left 06:23 Merfont left 06:25 Kaiepi joined 06:26 frost-lab joined 06:31 skids joined 06:32 Doc_Holliwood joined
Geth ecosystem: 52195f24aa | Coke++ | README.md
Minor cleanups

  * Use more serious tone up front
  * eliminate "temp" note. If we come up with a plan, we can then note it here.
  * more md formatting
  * less "META.info" references.
  * link to docs instead of design (which claims to be out of date)
ecosystem: 9b64d8a98f | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | README.md
Merge pull request #570 from coke/cleanup

Minor cleanups
06:38 jmerelo joined
jmerelo CFP for the FOSDEM devroom closes today! news.perlfoundation.org/post/fosde...for-papers 06:39
tellable6 2020-12-22T23:13:08Z #raku <tony-o> jmerelo fez is in the ecosystem now for install - included in it is a way to patch an existing zef config to use the p6c mirror & zef ecosystems
jmerelo .tell tony-o thanks!
tellable6 jmerelo, I'll pass your message to tony-o
06:44 skids left, Kaiepi left 06:45 Kaiepi joined 06:59 xinming_ left 07:02 xinming_ joined 07:35 sjm_uk joined 07:50 parabolize left 08:04 Altai-man joined
coldpress so I see from docs.raku.org/language/nativecall#Structs that CStructs can have CPointers. How do I define a CStruct for a node of a linked list? 08:20
moon-child coldpress: class CIntList is repr('CStruct') { has int64 $.n; has CIntList $.next; } 08:23
iirc 08:24
coldpress m: use NativeCall; class CIntList is repr('CStruct') { has int64 $.n; has CIntList $.next; }; CIntList.new(n=>0, dest=>CIntList.new(n=>1)).say; CIntList.new(n=>0, dest=>CIntList.new(n=>1)).dest.say 08:25
camelia CIntList.new(n => 0, next => CIntList)
No such method 'dest' for invocant of type 'CIntList'. Did you mean
any of these: 'does', 'gist', 'list', 'List'?
in block <unit> at <tmp> line 1
coldpress m: use NativeCall; class CIntList is repr('CStruct') { has int64 $.n; has CIntList $.next; }; CIntList.new(n=>0, next=>CIntList.new(n=>1)).say; CIntList.new(n=>0, next=>CIntList.new(n=>1)).next.say 08:26
camelia assign requires a concrete object (got a CIntList type object instead)
in block <unit> at <tmp> line 1
coldpress moon-child: ^^
I'm trying has Pointer[CIntList] instead of has CIntList, and that doesn't seem to work either
moon-child you shouldn't need a pointer; has makes a pointer by default. (You need to use HAS to embed a structure by value) 08:27
maybe try the TWEAK trick from the page you linked?
coldpress wouldn't that create an infinitely big linked list? 08:28
also, I want to create a circular list; so I don't think I can use TWEAK here
moon-child sure, but you can make a private method that binds to 'next' privately 08:29
ix.io/2JeF/perl6 08:32
coldpress I see, thank you very much 08:33
08:36 pecastro joined, Doc_Holliwood left 08:48 Kaiepi left 08:49 aborazmeh joined, aborazmeh left, aborazmeh joined, Sgeo left 08:56 Kaiepi joined 08:59 Ovidius joined 09:01 gugod left 09:02 gugod joined 09:09 domidumont joined 09:10 sena_kun joined 09:12 Altai-man left
kawaii what's the right way to string together these conditionals in the following statement? `if $content ~~ /^^@questions/ and $content ~~ / ?$$/ and rand < 0.01 { say 'yes' };`, `@questions` is an array of opening words i.e. `my @questions = 'can', 'when', 'should';` and `$content` is well, a question ending in `?`. :) 09:30
09:31 domidumont left
kawaii trying to check that the sentence starts with one of @questions and ends in ?, and then passes the 1% chance in the rand part 09:31
09:38 aborazmeh left
moritz you need to escape or quote that ? 09:50
and I would put the randomness test first, since it's the cheapest of all
09:52 tib_ joined 09:53 Geth left
kawaii moritz: ah of course, ? is a special character, thanks, missed that :) 09:53
and you're right, I'll do the rand check first
`if rand < 0.1 and $content ~~ /^^@questions/ and $content ~~ / '?'$$/ { say "a" };` 09:54
10:00 xinming_ left, xinming_ joined 10:01 cpage joined
moritz for the checks to pass as written, it is enough if $content starts with one of the @questions on any line, and ends on a question mark on any other line 10:05
dunno if that's what you want, or if it even can contain multiple lines 10:06
10:09 cpan-raku left 10:10 cpan-raku joined, cpan-raku left, cpan-raku joined 10:45 xinming_ left
jmerelo m: my $scalar-context = <1 2 3>; say "→ $_" for $scalar-context; say "→ $_" for $scalar-context<> 10:46
camelia → 1 2 3
→ 1
→ 2
→ 3
10:46 xinming_ joined 10:48 Geth joined 10:51 Black_Ribbon left
tib_ Hello, 11:10
jmerelo hi, tib!
tib_ from where comes all the files in ~/.raku/sources ?
hi jmerelo :)
jmerelo tib_: from rakubrew? Or rakudobrew?
tib_ hmm I don't installed any of it, but probably sparrow have installed it for me 11:11
jmerelo tib_: ah, OK, that's not it. Not really sure about sources, but the rest seems to be a precomp repo.
tib_ yep, it contains files like : AFED9027E812967FC8734CD341F7951801F8B86C 11:12
11:17 wamba joined 11:21 abraxxa left
jmerelo tib_: right, that's the hashed name that's computed by the precomp engine 11:23
El_Che This may be interesting to people interested in growing Raku. Nothing new as such, but it's interesting seeing it all put together (fron GopherCon 2020): www.youtube.com/watch?v=uMqosPm7BP...mp;index=2 11:24
tib_ yes, seems all related to precomp, when I removed it everything was broken on my machine :P 11:34
thank you 11:35
El_Che personnaly I would remove the .zef dir 11:37
11:38 Doc_Holliwood joined 12:06 Ovidius left 12:24 leont joined 12:33 xinming_ left 12:35 xinming_ joined 12:41 notandinus left 12:52 frost-lab left 13:00 jmchael joined 13:09 Altai-man joined 13:11 sena_kun left
kawaii want ^ and $ not ^^/$$, thanks :) 13:13
ugh, ooops 13:14
13:37 patrickb joined
[Coke] yawns. 13:59
14:00 jmerelo left
leont Once again, hyper operator nodality bites me 14:06
I really with ».foo was equivalent to .map(*.foo), it's the think I most frequently want to do with it 14:07
14:07 oddp joined 14:16 Doc_Holliwood left 14:20 xinming_ left 14:21 xinming_ joined 14:23 mowcat joined 14:27 tejr_ joined 14:28 tejr left, tejr_ is now known as tejr 14:37 domidumont joined 14:48 Sgeo joined 14:55 notandinus joined 15:01 parabolize joined 15:11 tejr left, tejr_ joined 15:12 tejr_ is now known as tejr 15:14 SeasonsBeatings is now known as grumble, wamba left 15:18 Doc_Holliwood joined 15:20 patrickb left 15:21 mowcat left 15:29 wamba joined
SmokeMachine m: for (0 .. $*SCHEDULER.max_threads * 2) { start sleep 10; }; say "hi"; 16:02
camelia hi
16:16 xinming_ left 16:17 xinming_ joined 16:21 shlomif joined, MasterDuke joined 16:22 rindolf left 16:36 melezhik joined
melezhik .tell tyil. Hi Patrick! Could you please comment on this? github.com/melezhik/sparky/pull/2#...-750376484 , thanks 16:37
tellable6 melezhik, I cannot recognize this command. See wiki for some examples: github.com/Raku/whateverable/wiki/Tellable
melezhik .tell tyil Hi Patrick! Could you please comment on this? github.com/melezhik/sparky/pull/2#...-750376484 , thanks
tellable6 melezhik, I'll pass your message to tyil
16:37 patrickb joined 16:38 asymptotically left, asymptotically joined
tony-o ^H^H^H^H^H^H^H^H^H^H^H~ 16:39
tellable6 2020-12-23T06:39:32Z #raku <jmerelo> tony-o thanks!
patrickb o/ tony-o 16:40
tellable6 2020-12-22T23:14:31Z #raku <tony-o> patrickb fez is in the ecosystem now for install - included in it is a way to patch an existing zef config to use the p6c mirror & zef ecosystems
tony-o hey patrickb 16:41
just responded to your emails - 16:42
i'd like to see your list of stuff todo, and i renamed the repos in the monkey patch for zef
patrickb Do you plan to keep fez dependency free? 16:43
modules.raku.org/dist/Terminal::Ge...an:TITSUKI could be the simple solution for the password problem. 16:44
tadzik hah, fez, what a fantastic name
tony-o patrickb: yea, no dependencies for fez. i have some code using the libs in that repo ^ but no way to test windows 16:45
patrickb In german we say "Dies oder das fetzt" roughly translating to "This or that rocks" 16:46
I have access to a Windows, so can do some testing / development there. 16:47
tony-o: I'll type together a list.
tony-o patrickb: thanks, i'll send you a gist to test out win pass 16:49
patrickb reboots to linux
16:50 patrickb left 16:51 patrickb joined 16:53 MilkmanDan left 16:54 MilkmanDan joined 16:56 Tirifto joined 16:59 Tirifto left 17:00 shlomif is now known as rindolf 17:02 melezhik left, brtastic joined
tony-o patrickb: github.com/tony-o/raku-fez/tree/winpass <- this *should* be okay to be built with zef 17:04
patrickb will give it a try (soonish, still have some other things to do first) 17:07
17:09 sena_kun joined
patrickb tony-o: Hm. Or I rewrite it to get rid of the native code. Requiring a compiler to build is suboptimal. That module I linked found a way around. I'll probably just copy that approach. 17:10
17:11 Altai-man left
tony-o doesn't msvct come as part of a compiler? 17:11
ahh, guess it comes as part of the visual studio run time and not just vs 17:12
patrickb I think it can be installed standalone as well...
tony-o i see that as well 17:14
patrickb I'll see what I can do. There has to be some way without requiring a compiler or install a library 17:20
have to leave... 17:24
17:24 patrickb left
tony-o gott speed 17:24
17:43 notagoodidea joined
notagoodidea Hi, a weird question : What is the different using & or 17:43
tadzik & or what? :) 17:44
notagoodidea $ sigils for function declaration as in : my &foo = {...} and my $l = {...}
17:44 Manifest0 left
notagoodidea (Sorry enter key slipped :)) 17:44
tadzik ah :)
using &foo allows you to then call it as foo(), without the sigil, in practice 17:45
under the hood, I'm not sure :o
moritz the other thing is that & implies the Callable role 17:46
so you're giving the optimizer a type hint
notagoodidea With &, I also can use an infix function call but not with $.
moritz and the reader
notagoodidea There is one that stand out as a good practice? (Based on the use of sigils, I tend to favor & but I am pretty new at Raku) 17:47
moritz yes, using the sigils tends to be good idea 17:48
tony-o notagoodidea: use & if you're calling something Callable, use $ if you're intending use of a scalar 17:49
17:49 Manifest0 joined 17:50 lucasb joined
notagoodidea tony-o: So avoiding $ for quick pseudo-anonymous functions or do you take into account the "nature" of the results for the scalar part? 17:50
18:07 bigdata joined
tony-o if it's a lambda it likely doesn't need a name, if it's a function ref then i'd use $ to pass it around 18:18
18:22 notagoodidea left 18:40 domidumont left 18:41 Tirifto joined, Tirifto left 18:51 bigdata left 18:58 notagoodidea joined 19:31 aborazmeh joined, aborazmeh left, aborazmeh joined 19:32 thundergnat left 19:42 imcsk8 left 19:43 imcsk8 joined 19:46 oneeggeach joined, oneeggeach left, guifa2 joined
guifa2 .tell jmerelo when you get a chance, I'm finishing up my FOSDEM proposal, have a few Qs 19:47
tellable6 guifa2, I'll pass your message to jmerelo
19:51 squashable6 left 19:53 squashable6 joined, sjm_uk left 20:01 oddp left 20:04 brtastic left
tony-o .tell patrickb check out the winpass branch - should work in linux and windows now without a compiler 20:14
tellable6 tony-o, I'll pass your message to patrickb
20:27 wamba left 20:36 wamba joined 20:42 mowcat joined 21:02 wamba left 21:08 Altai-man joined 21:11 sena_kun left 21:23 rindolf left 21:28 imcsk8 left 21:35 imcsk8 joined
[Coke] beats his head against Advent of Code Day 10 Part 2 some more. 21:38
21:40 thdrmz left 21:51 thdrmz joined
tony-o [Coke]: what is p2? 21:51
21:52 Altai-man left 21:55 patrickb joined
patrickb tony-o: There is no gzip on windows and there is no easy substitute. It seems zef also found no solution to this. Ugh. 22:02
tellable6 2020-12-23T20:14:16Z #raku <tony-o> patrickb check out the winpass branch - should work in linux and windows now without a compiler
[Coke] each day is split into two parts, each worth one gold star: the 2nd part of day 10 is, given a path from 0 to X through N possible nodes, figure out how many different ways there are to get there. 22:03
\o/ Got there. Whew. 22:04
patrickb ugexe: Do I understand correctly, that zef can't install from cpan on Windows, because there is no gzip?
tellable6 patrickb, I'll pass your message to ugexe
patrickb timotimo: Thinking about how to best get fez (a new ecosystem client) to support gzip on windows. Could a pure raku implementation of gzip be performant enough? 22:08
timotimo no clue without trying it
22:08 aborazmeh left
notagoodidea [Coke]: Because of you, I am trying it but I am stuck in a stupid place. When I open the input file with "foobar".IO.lines, I got an array of string. How to convert it to Int ? 22:10
patrickb timotimo: Any gut feeling? (Yours is probably worth more than mine) 22:11
timotimo my gut tells me raku dists are usually pretty small, so unless it's catastrophically slow, it should be all right
MasterDuke notagoodidea: `.map(*.Int)` or `>>.Int`
[Coke] notagoodidea: "1.txt".IO.lines.map(+*) should work
but raku will also DTRT most o the time with "32" when you mean 32 22:12
m: say "32" == 32
camelia True
notagoodidea Yep when for sorting the data, raku don't as string can ordered it seems.
*be 22:14
patrickb Ha! There is no gzip, but there is a tar which can compressK
[Coke] you can tell sort to sort by a function 22:15
m: my @a = <100 1 10 102 110 9 8>; say @a.sort(+*);
camelia (1 8 9 10 100 102 110)
[Coke] so you can keep the originals as strings, sort them numerically... or convert them to numbers up front... (on one of the challenges, I stored them as keys in a hash which re-stringified them... so then I didn't bother making them numbers first...) 22:16
notagoodidea Ah. I made it work based on the documentation with @data.sort({$^a.fc > $^b.fc}) but using the max method after gave me the wrong anwser as the data where not converted to an number.
timotimo why call .fc on it if it's supposed to be numbers? 22:17
notagoodidea a sad case of "blindly copying the documentation and it worked" 22:18
timotimo you should really replace the whole thing with .sort(+*) like coke said earlier 22:20
notagoodidea But when doing that the resulting elements are still string (after "ffo".IO.lines.sort(+*)) 22:22
MasterDuke that's just sorting them numerically, they're still strings
notagoodidea but doing "foo".IO.lines.map(+*).sort gives me the intended list
MasterDuke yeah, now you're converting to numbers first 22:23
patrickb .tell tony-o password reading seems to work on my machine. (Unless the server accepts empty passwords and the prompt just ignored all input or something similar went wrong).
tellable6 patrickb, I'll pass your message to tony-o
notagoodidea Ah ok, I began to understand that sorting is not a in-place operation or at least destruction (if it were the case, the casting due to the sorting will stay). 22:24
MasterDuke correct 22:27
22:33 guifa2 left 22:34 Black_Ribbon joined, patrickb left 22:36 patrickb joined, guifa2 joined
[Coke] is there a method to check equality on arrays or must I compare by element (current cheat: .join them and str compare) 22:59
23:00 patrickb left
lizmat You mean: you have two arrays, and are equal positioned elements the same ? 23:00
[Coke] all elements. 23:01
lizmat [Coke]: you know the number of elems is the same?
[Coke] Also: is it expected that a shaped array has extra "blanks" off the end when dd-ing?
lizmat: y
lizmat m: dd ?all((1,2,3) >>==<< (1,2,3)
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3dd ?all((1,2,3) >>==<< (1,2,3)7⏏5<EOL>
lizmat m: dd ?all((1,2,3) >>==<< (1,2,3)) 23:02
camelia Bool::True
lizmat m: dd ?all((1,2,3) >>==<< (1,2,4))
camelia Bool::False
[Coke] m: my @a = Array.new(:shape(3,3)); @a[2;2] = '3'; dd @a;
camelia Array @a = [Any, Any, [Any, Any, "3"], Any, Any, Any, Any, Any, Any]
timotimo do not recommend assigning a shaped array like that 23:03
m: my @a = Array.new(:shape(3,3)); dd @a
camelia Array @a = [Any, Any, Any, Any, Any, Any, Any, Any, Any]
[Coke] ok, what's the right way?
timotimo m: my @a := Array.new(:shape(3,3)); dd @a
camelia Array element = Array.new(:shape(3, 3), [Any, Any, Any], [Any, Any, Any], [Any, Any, Any])
23:03 kensanata joined
timotimo m: my @a[3;3]; dd @a 23:03
camelia Array element = Array.new(:shape(3, 3), [Any, Any, Any], [Any, Any, Any], [Any, Any, Any])
[Coke] Roger, trying the bind 23:04
... doh. had two arrays, only ONE was shaped, also.
lizmat sees [Coke] is in good hands, so feels free to goto sleep& 23:05
[Coke] ~~ 23:06
... ok, failing differently at least.
lizmat m: dd (1,2,3) eqv (1,2,3)
camelia Bool::True
lizmat m: dd (1,2,3) eqv (1,2,4)
camelia Bool::False
[Coke] timotimo: how to copy one shaped array into another @var ? 23:07
timotimo i think assigning a shaped array into a @var[3;3] with a matching shape will work?
[Coke] if I do "@old = @new" I get "must provided structured data", if I do "@old = @new" I get an error further along (digging into that one.) 23:09
it complains about the structure of that one, getting Index out of range. Is: 1, should be in 0..0 -- trying to index with 0;1 at that point on a thing with a shape of 97;97 - throwing in some .shape calls.. 23:11
23:13 aluaces left
[Coke] aha. 23:14
my @thing = stuff(@old) - if stuff returns a shaped array, also have to bind there or lose the shape.
23:18 xinming_ left, xinming_ joined
notagoodidea [Coke]: Ah! p1 solved and p2 looks... not fun :D 23:19
MasterDuke doesn't eqv work for array comparison? 23:28
m: for (1, 2, 4), (1, 2), (1, 2, 3), (1, 2, 4, 5) { say (1, 2, 4) eqv $_ } 23:30
camelia True
23:39 cpan-raku left 23:52 cpan-raku joined, cpan-raku left, cpan-raku joined
guifa2 Any examples of moduels that show off some seamless integration with Raku at an core / syntaxy level? 23:54
I'm thinking here of stuff like Cro (with its faux control blocks), Red (with its metamodels and traits) or my own DateTime::Timezones 23:55
23:56 xinming_ left 23:57 xinming_ joined