guifa | I don't think the ecosystem has enough stuff to have developed strong naming patterns — codesections and I were actually discussion the naming question on Grammars and Actions and there's nothing rremotely near universal consensus there on their names or the names of the modules that contain them. | 00:09 | |
01:03
frost joined
03:05
frost left
03:15
frost joined
04:06
frost left
|
|||
Jaguart | If I ``zef list --installed`` I see ALL versions of installed upgraded distributions - is this expected? e.g. ``zef upgrade`` and list --installed shows ``JSON::Fast:ver<0.16>`` and ``JSON::Fast:ver<0.17>:auth<cpan:TIMOTIMO>`` | 05:26 | |
06:10
Guest1838 left
07:14
ccntrq joined
07:33
jdv joined
|
|||
jdv | jaguart: makes sense as one can use multiple versions of a dist | 07:35 | |
Jaguart | oops - so which one am I using in my code then? | 07:36 | |
when no version is specified | |||
jdv | iirc the highest ver | 07:37 | |
Jaguart | yeah I guess that makes sense... maybe there is a --replace option on ``zef upgrade`` - will check | 07:39 | |
hmm - nothing obvious | |||
jaguart | m: use Hash::Ordered; my %h is Hash::Ordered = ( a => 1, b => 2, c => 3 ); | 07:45 | |
camelia | ===SORRY!=== Error while compiling <tmp> Could not find Hash::Ordered in: inst#/home/camelia/.raku inst#/home/camelia/rakudo-m-inst-2/share/perl6/site inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor inst#/home/cam… |
||
jaguart | I know that ``use Hash::Ordered; my %h is Hash::Ordered = ( a => 1, b => 2, c => 3 );`` works, and %h is an ordered Hash | 07:46 | |
What is the 'is Hash::Ordered syntax when there is no `my`, e.g. when its embedded inside another hash, like my $x = %( a => %( a => 1, b => 2, ) is Hash::Ordered, ) | 07:47 | ||
jdv | there might be an uninstall... | 07:58 | |
if you really want to know what the ver of a module is you can get it it seems | 08:00 | ||
m: use JSON::Fast; JSON::Fast.^ver; | 08:01 | ||
camelia | ===SORRY!=== Error while compiling <tmp> Could not find JSON::Fast in: inst#/home/camelia/.raku inst#/home/camelia/rakudo-m-inst-2/share/perl6/site inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor inst#/home/cameli… |
||
08:01
dakkar joined
|
|||
jdv | basically the same thing - the "is $class" instances you mentioned | 08:10 | |
well, if they both worked. the 2nd instance isn't valid. | 08:18 | ||
08:20
frost joined
09:30
frost left
11:04
dakkar left
11:06
frost joined
13:26
ccntrq left
|
|||
guifa | jaguart: I don't think that there is. %( ) is basically syntactical sugar for Hash.new: | 14:09 | |
so you could say Hash::Ordered.new(…) | 14:10 | ||
14:12
frost left
|
|||
guifa | If you're going to do it a lot though | 14:14 | |
multi sub circumfix:<%O( )> (@p) { Hash::Ordered.new.STORE: @p } | 14:15 | ||
then you can say my $foo = %O( … ); | 14:16 | ||
Nemokosch | is the % sigil naturally unordered? | 14:32 | |
guifa | There's a couple of things going on. | 14:43 | |
the % sigil on a variable just means "does Associative", but by default when declared will create a Hash (e.g. my %foo; %foo will be a Hash), and Hashes are unordered | 14:45 | ||
the %( … ) is actually a combination of two separate operators. The first is the list operator ( … ), and then the % prefix operator which says "treat this as a Hash" (I think technically it's not an operator, but a contextualizer, and it calls `.hash` on the thing it's applied to. So %(foo) is the same as List.new(foo).hash, which is the same as Hash.new.STORE(List.new(foo)) | 14:47 | ||
15:39
ismustachio joined
15:56
ismustachio left
16:27
ismustachio joined
16:34
ismustachio left
16:56
ismustachio joined
20:57
TempIRCLogger joined
21:16
discord-raku-bot left,
discord-raku-bot joined
21:40
ismustachio left
21:55
ismustachio joined
22:24
ismustachio left
22:49
ismustachio joined
22:55
ismustachio left
23:09
ismustachio joined
|
|||
Jaguart | @guifa++ thank you 🙂 | 23:13 | |
23:13
Dikkemeijer joined
23:14
ismustachio left,
Dikkemeijer left
|
|||
I will try this later - Hash::Ordered is a role... | 23:14 | ||
23:37
ocomport joined
|