🦋 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 reportable6 left 00:03 reportable6 joined 00:05 TieUpYourCamel joined 00:17 timo left 00:18 timo joined 00:27 timo left 00:28 timo joined 01:03 xinming left 01:06 xinming joined 01:12 jpn joined 01:17 jpn left 01:20 MasterDuke joined 02:16 Xliff left 02:20 teatwo joined 02:22 teatime left 02:49 teatwo left, teatwo joined 03:00 jpn joined 03:05 jpn left 03:15 tea3po joined 03:18 teatwo left
SmokeMachine coleman: My NATS client (github.com/FCO/nats) has a few tests now, I still do nothing with the data received by servers INFO command and do not pass anything on CONNECT, and many other non implemented features... do you have any suggestion on what should be the next step? 03:21
04:18 evalable6 left, linkable6 left 04:19 linkable6 joined, evalable6 joined 04:36 kybr left, kybr joined 04:48 jpn joined 04:53 jpn left 05:43 jpn joined 05:48 jpn left 05:57 emakei joined, emakei left 06:00 lizmat left, vrurg left, rypervenche left, gfldex left, gabiruh left, Altreus left, lucs left, moritz left, bdju left, rjbs left, zups left, esh left, amenonsen left, pierrot left, Sevalecan left, JRaspass left, lucs joined, moritz joined, reportable6 left, gfldex joined, rypervenche joined, esh joined, amenonsen joined, zups joined, rjbs joined, JRaspass joined 06:01 vrurg joined, lizmat joined, rypervenche left, rypervenche joined, reportable6 joined 06:02 gabiruh joined, pierrot joined, Sevalecan joined 06:03 Altreus joined 06:06 bdju joined 06:49 zara joined 06:59 zara left 07:24 squashable6 left 07:26 squashable6 joined 07:32 jpn joined 07:37 jpn left 08:21 RonaldR34g4m left, RonaldR34g4m joined 08:57 jpn joined 09:57 quotable6 left, reportable6 left, squashable6 left, bloatable6 left, bisectable6 left, linkable6 left, greppable6 left, statisfiable6 left, unicodable6 left, tellable6 left, evalable6 left, sourceable6 left, releasable6 left, shareable6 left, benchable6 left, notable6 left, nativecallable6 left, coverable6 left, committable6 left, committable6 joined, squashable6 joined, notable6 joined, statisfiable6 joined 09:58 linkable6 joined, bloatable6 joined, unicodable6 joined, releasable6 joined, nativecallable6 joined, coverable6 joined 09:59 evalable6 joined, benchable6 joined, greppable6 joined, shareable6 joined, tellable6 joined, bisectable6 joined, reportable6 joined, sourceable6 joined 10:00 quotable6 joined 10:01 Archenoth joined 10:02 arch left 10:29 Sgeo left 11:02 derpydoo joined 11:37 linkable6 left 11:39 linkable6 joined 11:43 derpydoo left 12:00 reportable6 left 12:02 codesections1 joined, reportable6 joined 12:03 codesections left, codesections1 is now known as codesections 12:08 codesections1 joined 12:10 codesections left, codesections1 is now known as codesections 12:12 codesections1 joined 12:14 codesections left 12:15 codesections joined 12:17 codesections1 left 12:33 codesections1 joined 12:34 codesections left, codesections1 is now known as codesections 12:57 codesections1 joined 12:59 codesections left, codesections1 is now known as codesections
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/05/29/2023-...t-rolling/ 13:23
13:59 linkable6 left, evalable6 left, linkable6 joined 14:01 evalable6 joined 14:13 BinGOs left, perlbot_ joined, bingos joined 14:14 perlbot left, perlbot_ joined, perlbot_ is now known as perlbot 14:19 tea3po left, tea3po joined 14:20 tea3po left, Xliff joined
Xliff \o 14:20
14:20 tea3po joined 14:21 tea3po left 14:22 tea3po joined 14:36 codesections1 joined 14:38 codesections left, codesections1 is now known as codesections 15:10 Archenoth is now known as 011AAH1DS, 011AAH1DS is now known as arch
uzl[m] lizmat++ 15:28
I ~~didn't~~ don't know much about the differences between sigilless and sigilled variables so I created this gist highlighting their differences. Let me know if I'm lying somewhere or completely misunderstanding things haha 15:32
gist.github.com/uzluisf/b3539dbf95...f4646e6c05
lizmat uzl[m]: I wouldn't call [1, 2] a container 15:34
uzl[m] m: my \a := [1, 2]; say a; a = [3, 4]; say a; 15:36
camelia [1 2]
[3 4]
uzl[m] What allows for storing new values into a sigilless once it's been bound to here?
lizmat with sigilless "variables" you create a term to which an object is bound 15:37
15:38 bingos is now known as BinGOs
lizmat m: my \a = [1,2]; dd a 15:38
camelia [1, 2]
lizmat m: my \a = [1,2]; dd a; a := 42
camelia ===SORRY!=== Error while compiling <tmp>
Cannot bind to 'a' because it is a term and terms cannot be rebound
at <tmp>:1
------> my \a = [1,2]; dd a; a := 42⏏<EOL>
lizmat m: my \a = [1,2]; dd a; a.push(666); dd a
camelia [1, 2]
[1, 2, 666]
lizmat the object that it is bound to, can be mutable, in case of an Array
m: my \a = (1,2); dd a; a.push(666) 15:39
camelia (1, 2)
Cannot call 'push' on an immutable 'List'
in block <unit> at <tmp> line 1
lizmat but if it is not mutable, you cannot change the contents of that object
m: my \a = my $; a = 42; say a
camelia 42
uzl[m] So the object is mutable but it's not a container, right? I think this makes sense but trying to wrap my head around it 15:40
lizmat now, if you bind a container to a sigilless variable, it becomes assignable, because containers *are* assignable
well, the thing you need to realize is that sigilless variables are just objects
uzl[m] What would that look like? Something like my \a := $;?
lizmat if the object in question can be mutated, it is mutable 15:41
my \a = $ would bind the nameless state variable
uzl[m] Right, that makes sense 🤔
Tangentially related, where does Raku borrow the concept of containers from (in this context)? 15:42
lizmat the simplest way to bind a container is the '= my $' trick
good question: it was one of the hardest things I have needed to grok when starting with Raku, coming from Perl 15:43
uzl[m] m: my \s = my $ = 1; say s; s++; say s; 15:44
camelia 1
2
uzl[m] Cool, back in Python land haha
lizmat yup -)
uzl[m] Yeah I haven't tried that many languages but I have never found the concept of containers in the ones I've tinkered with so it's kind of interesting 15:45
Thanks Liz! Happy Memorial Day everyone! 15:47
I'm back to reading Liz's Rakudo Weekly!
16:38 linkable6 left, evalable6 left, linkable6 joined 16:41 evalable6 joined 16:57 jpn left 17:07 jpn joined 18:00 reportable6 left 18:03 reportable6 joined 18:14 bigdata joined 18:32 codesections1 joined 18:35 codesections left, codesections1 is now known as codesections 18:40 jpn left
tbrowder__ m: my \a = [1,2]; a.push: 3; dd a 19:00
camelia [1, 2, 3]
tbrowder__ my a is an array. wasn't yours a list? 19:01
sorry, i missed the first exmpl, back to sleep, bozo 19:02
19:14 jpn joined 19:17 Sgeo joined 19:20 jpn left 19:34 jpn joined 20:02 rcy joined 20:13 jpn left
lucs Can I obtain the value (if any) of the "-I" command line option from inside my program? 20:27
tbrowder__ m: constant %h = [ a => 1 ]; say %h.WHAT 20:42
camelia (Map)
20:53 derpydoo joined
Xliff lucs: stackoverflow.com/questions/353529...-not-found 21:12
21:17 jpn joined
Xliff lucs: That boils down to the following -- $*REPO.repo-chain.grep( * ~~ CompUnit::Repository::FileSystem ).gist.say 21:18
If you want the entire list of include directories, use: $*REPO.repo-chain.map( ~* ).grep( *.starts-with("/") ).gist.say 21:21
lucs Xliff: Nice, thanks. 21:34
21:39 jpn left
Xliff lucs: yw 22:07
lizmat lucs: there's also an undocumented way: 22:19
m: say Rakudo::Internals.INCLUDE
camelia ()
lizmat m: use lib 'lib'; say Rakudo::Internals.INCLUDE
camelia ()
lizmat it's definitely just what is on -I
22:20 bigdata left 22:21 jpn joined
ugexe -I is not restricted to file system repos 22:21
and you shouldn’t feel the repo chain objects using starts-with expecting paths eithe reslly 22:22
Just $*REPO.repo-chain is sufficient 22:24
why you shouldn’t follow rhose 22:25
Xliff ugexe: Actually, those are stringified CompUnit::Repository objects.
ugexe grep examples is that /foo and file#/foo are the same
22:26 jpn left
Xliff Which will resolve to a path or the name of the class. Hence the .starts-with for things like AbsolutePath, Perl5 and such. 22:26
ugexe I just showed why that is a bad assumption
Xliff m: $*REPO.repo-chain.map( ~* )
camelia ( no output )
Xliff m: $*REPO.repo-chain.map( ~* ).say
camelia (/home/camelia/.raku /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6/core CompUnit::Repository::AbsolutePath<2461569001312> CompUnit::Repository::NQP<24615940821…
ugexe file#/foo is the same as /foo
Your example just shows what some possible values are. You shouldn’t assume those are the only values it could be 22:27
Xliff I'm noit.
ugexe sirry for the typos, my phone is not playing nice
Xliff However in the lack of documentation, this is the best I could get in the time allowed.
No worries. I'm on my keyboard and I get them more than I'd like. 22:28
I was actually hoping the stringified objects would contain the "file#" or "inst#" designation. 22:29
Which CompUnit::Repository method handles that piece of information?
ugexe Ah I see what you are saying, yeah I was wrong about how I thought they would stringify there
I think what is expected of people is to map the repo chain to repo-spec or spec-path or some such method I can’t grep for right now 22:31
maybe it’s .id on the repo 22:35
Xliff m: $*REPO.repo-chain.map( .id ).say 22:36
camelia No such method 'id' for invocant of type 'Any'
in block <unit> at <tmp> line 1
Xliff m: $*REPO.repo-chain.map( *.id ).say
camelia (C76BB82FC7ACA3EB05223CDEDFE6A2A07C8298BD 9DEE4D5C0BAEF261BC738E4CD37D299285F14758 4673D8D2419A42AF180D631AE8A132D0EA08987B B36589A247B3ED3CF56CB3E15D65D79D282CBB49 ap NQP Perl5)
Xliff m: $*REPO.repo-chain.head.^methods.map( *.name ).say
camelia (TWEAK writeable-path can-install name upgrade-repository install uninstall files candidates resolve need resource id short-id loaded distribution installed precomp-store precomp-repository load repo-chain new source-file WHICH Str gist raku next-repo…
Xliff m: $*REPO.repo-chain.map( *.name ).say 22:37
camelia No such method 'name' for invocant of type
'CompUnit::Repository::AbsolutePath'. Did you mean any of these: 'are',
'none', 'note', 'take'?
in block <unit> at <tmp> line 1
Xliff m: $*REPO.repo-chain.map( *.name ).say
camelia No such method 'name' for invocant of type
'CompUnit::Repository::AbsolutePath'. Did you mean any of these: 'are',
'none', 'note', 'take'?
in block <unit> at <tmp> line 1
Xliff m: $*REPO.repo-chain.map( *.?name ).say
camelia (home site vendor core Nil Nil Nil)
ugexe Oh it is path-spec
Xliff m: $*REPO.repo-chain.map( *.?path-spec ).say
camelia (inst#/home/camelia/.raku inst#/home/camelia/rakudo-m-inst-1/share/perl6/site inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-1/share/perl6/core ap# nqp# perl5#)
Xliff Ahh... was hoping to just get the inst or file designation, but that works. Thanks. 22:38
22:39 daxim left
ugexe I think short-id would be just the prefix part 22:39
uzl[m] .seen codesections1 22:40
tellable6 uzl[m], I saw codesections1 2022-03-29T20:41:00Z in #raku: <codesections> I don't have a release date for epee yet, sorry ☹
uzl[m] .tell codesections1 If your RA article (raku-advent.blog/2022/12/20/sigils/), there's this incomplete sentence:
"Or we could group them with curly brackets, which creates a."
tellable6 uzl[m], I'll pass your message to codesections
Xliff ugexe: That it is! I almost missed that one. Thanks! 22:43
m: $*REPO.repo-chain.map( ~* ).grep( *.short-id eq 'file' ) # -I list 22:44
camelia No such method 'short-id' for invocant of type 'Str'
in block <unit> at <tmp> line 1
Xliff m: $*REPO.repo-chain.grep( *.short-id eq 'file' ) # -I list
camelia No such method 'short-id' for invocant of type
'CompUnit::Repository::AbsolutePath'
in block <unit> at <tmp> line 1
Xliff m: $*REPO.repo-chain.grep( *.?short-id eq 'file' ) # -I list
camelia Use of Nil in string context
in block <unit> at <tmp> line 1
Use of Nil in string context
in block <unit> at <tmp> line 1
Use of Nil in string context
in block <unit> at <tmp> line 1
Xliff m: $*REPO.repo-chain.grep({ ( .?short-id // '' ) eq 'file' }) # -I list 22:45
camelia ( no output )
ugexe Welol, you can pass inst# repos or any repo to -I
Xliff Wheee....
I thought -I was only filesystem
ugexe nope
Xliff How would you pass #inst?
Or inst#?
ugexe inst#/path/to/repo typically 22:46
quoted
Xliff Oh. That simple. LOL
ugexe if it’s a named repo (one of the defaults) then inst#site works 22:47
Xliff OK, thanks.
Is any of this documented anywhere?
ugexe No clue 22:49
Xliff OK.
I'll see if I can turn this conversation into something usable in my copious amounts of spare time.
Speaking of which... I think p6-EDS is screaming my name....
Xliff is off on more Adventures of the Quixotic Coder 22:50
22:53 daxim joined 23:15 daxim left 23:37 daxim joined