00:02 RobRaku left 00:25 shan left 00:31 pecastro left
SmokeMachine .tell niner it’s probably not that helpful, but I had played with libgccjit before, if it’s somehow helpful... github.com/FCO/bernalang/blob/mach...GccJit.pm6 00:34
tellable6 SmokeMachine, I haven't seen niner around, did you mean nine?
00:38 cydf left 01:25 shan joined 01:39 shan left 01:40 marcusr left 01:41 marcusr joined 02:17 kvw_5 joined 02:19 JRaspass left 02:20 kvw_5_ left 03:20 bisectable6 left, nativecallable6 left, shareable6 left, coverable6 left, greppable6 left, tellable6 left, benchable6 left, unicodable6 left, squashable6 left, evalable6 left, sourceable6 left 03:21 benchable6 joined, bisectable6 joined 03:22 squashable6 joined, sourceable6 joined, evalable6 joined, tellable6 joined, coverable6 joined 03:23 greppable6 joined, nativecallable6 joined, unicodable6 joined, shareable6 joined 03:24 rindolf joined 04:24 benchable6 left, bisectable6 left, sourceable6 left, releasable6 left, coverable6 left, evalable6 left, shareable6 left, greppable6 left, nativecallable6 left, tellable6 left, unicodable6 left, squashable6 left, quotable6 left, notable6 left, linkable6 left, bloatable6 left, committable6 left, statisfiable6 left, squashable6 joined, shareable6 joined 04:25 tellable6 joined, committable6 joined, sourceable6 joined, coverable6 joined, greppable6 joined 04:26 quotable6 joined, bloatable6 joined, linkable6 joined, evalable6 joined, bisectable6 joined 04:27 benchable6 joined, nativecallable6 joined, statisfiable6 joined, unicodable6 joined, notable6 joined, releasable6 joined 04:29 _jrjsmrtn joined 04:31 __jrjsmrtn__ left 04:53 epony left 05:27 kaiwulf left 05:39 parabolize left 06:01 db48x left 06:03 aindilis` joined 06:05 aindilis left 06:10 aindilis` left 06:56 ufobat joined 07:01 brtastic joined, jmerelo joined 07:15 wamba joined 07:25 domidumont joined 07:32 ilhud9s joined 07:33 stoned75 joined 07:36 ilhud9s left 07:59 sjm_uk joined 08:02 ufobat left 08:06 Garbanzo left 08:09 Garbanzo joined 08:14 abraxxa joined 08:15 jmerelo left, jmerelo joined 08:16 Garbanzo left 08:21 abraxxa left 08:24 abraxxa joined 08:29 gnufr33dom left 08:31 Altai-man_ left, jmerelo left 08:37 vike left 08:40 gnufr33dom joined 08:44 Sgeo left 08:47 jmerelo joined 08:56 vrurg_ joined 08:58 vrurg left 09:00 fluca1978 joined
fluca1978 I'm getting an error I cannot understand: I try to insert an element in ordered array of integers 09:00
given @N.grep: { $_ >= $N }, :k { @N = |@N[ 0 .. $_ - 1 ], $N, |@N[ $_ .. * ]; @N.say; exit; }
but I got "Seq objects are not valid endpoints for Ranges"
so I suspect I cannot change @N while `given`ing it, but I don't understand the error. 09:01
09:02 ufobat joined 09:04 vike joined 09:07 sena_kun joined
fluca1978 got it, it was simple: `grep` is returning a list, so I need to get the very first element by means of adding .first 09:09
jmerelo fluca1978: great you found it. I would encourage you to post questions also in StackOverflow. It's quieter than it should be... 09:19
09:21 gnufr33dom left 09:22 JRaspass joined
fluca1978 jmerelo: I will try but I'm not a great stack overflow fan 09:25
09:28 aindilis joined 09:31 MasterDuke joined
elcaro fluca1978: instead of @N.grep(EXPR).first, in most cases you can just do @N.first(EXPR) 09:40
09:44 avar joined 09:48 Scimon joined 09:49 dakkar joined
fluca1978 elcaro: thanks, I think I'm addicted to grep! 09:50
10:10 pecastro joined, MasterDuke left
lizmat fluca1978: alternately, you can do "last" in a .grep 10:19
10:20 MasterDuke joined 10:25 wamba left 11:06 wamba joined 11:09 avar left, avar joined 11:12 cydf joined 11:15 PimDaniel joined
PimDaniel \o 11:15
What's the hell to export constants or variables when they are into a module, i mean without writing 'is export' but with EXPORT sub? 11:17
I need to export and/or export_ok like it was done in p5. 11:18
I'v observe it works when there's no module i mean no module mymodule { nor unit module mymodule; 11:19
but i do need a module just to preserve namespaces 11:20
jmerelo Hi, PimDaniel 11:26
lizmat the most common gotcha with writing an EXPORT sub, is that it needs to be in the compunit's namespace
class A { sub EXPORT { } } won't cut it 11:27
it would need to be
class A { } sub EXPORT { }
jmerelo PimDaniel: additionally to what lizmat says, check out the documentation docs.raku.org/language/modules#ind...sub_EXPORT 11:28
PimDaniel I'v allway look at this doc and it does not help me. 11:30
s/allway/allready/ 11:31
Theses cases do not work for what i want to do. 11:32
jmerelo PimDaniel: I'd appreciate if you raised that issue in the documentation repo 11:34
lizmat PimDaniel: this may be overkill for you, but maybe it could help: github.com/lizmat/List-AllUtils/bl...lUtils.pm6 11:35
it;s an example of a module re-exporting symbols from other modules
PimDaniel :lizmat thank's for your help! 11:37
:jmerelo , thank's tooo!
Reference is not really well organize but it think the problem is Raku. Really that part is not easy at all and i really wonder why. 11:39
In perl5 it was yet bullshit, sorry but... it is still. 11:41
elcaro PimDaniel: For selective exporting of subs (like EXPORT_OK) there's Exportable on the ecosystem 11:50
full disclosure: I wrote that module.
Exportable needs to be imported outside of the class you're using it in (probably for the same namespacing issues lizmat mentioned) 11:51
but unfortunately won't help you exporting constants/vars
but yes, I feel writing an EXPORT sub is low-level plumbing. It could probably be improved... and you're welcome to dig your teeth into it 11:52
you could try writing some sugar around exporting vars (like Exportable does for subs) 11:53
supporting selecting imports should be made easier in general. unfortunately, the path of least resistence is just doing `is export` and polluting the importers namespace 11:59
Sorry... diggin' up old wounds :D I complained about this a couple years back 0racle.info/articles/exportation_exploration 12:00
12:04 epony joined
PimDaniel elcaro: Thanks! I look at your article. 12:08
elcaro I should go back through all my old blog posts and change Perl 6 to Raku 12:10
lizmat elcaro: I've been meaning to do this more generally 12:29
glad to see more people having the same idea 12:34
elcaro at the very least, it should provide more "Raku" hits for the Google spider 12:43
lizmat indeed
something like a "remastered" edition of these blog posts 12:44
not unlike the re-issue of Wendy Carlos' work :-)
or The Hype -> U2 :-) 12:45
12:51 brtastic left 12:52 cydf left 13:35 MasterDuke left, MasterDuke joined 13:45 PimDaniel left 13:48 dakkar left, dakkar joined, PimDaniel joined
PimDaniel why \o 13:48
lizmat 42 13:49
PimDaniel where can i found many example on "str".match method. And why does "MSTR".match(/^[A-Z]$/) does not work? 13:50
MasterDuke that's looking for exactly one character 13:51
PimDaniel Where is doc about regexes with exhausted examples in ordre to understand something?
MasterDuke m: "MSTR".match(/^[A-Z]+$/)
evalable6 (exit code 1) ===SORRY!===
MasterDuke, Full output: gist.github.com/1e398b56d9718f9224...f4a35196e6
Scimon m: "MSTR".match( /^ [A .. Z]+ $/ ) 13:52
PimDaniel moi@DebianMsrv64:~/raku$ moi@DebianMsrv64:~/raku$
Scimon m: "MSTR".match( /^ <[A .. Z]>+ $/ )
PimDaniel re '"MSTR".match(/^[A-Z]+$/)' ------> "MSTR".match(/^[A⏏-Z]+$/) : BANG!
Unable to parse expression in metachar:sym<[ ]>; couldn't find final ']' (corresponding starter was at line 1) 13:53
Scimon You don't use `-` in a Raku regex.
13:53 brtastic joined
MasterDuke "Searching and Parsing with Perl 6 Regexes" by moritz is good 13:53
PimDaniel so re '"MSTR".match(/^[AZ]+$/).say' -> Nil 13:54
Does NOT match.
Scimon m: "MSTR".match( /^ <[A .. Z]>+ $/ ).say
evalable6 「MSTR」
PimDaniel works but , tell me : spaces are no more take in account? 13:56
And character classes are suppressed?
MasterDuke not by default. it's like the /x modifier in perl5 regexes
PimDaniel Ok so flag /x is enable by default? 13:57
MasterDuke yeah
PimDaniel ok ok
Scimon docs.raku.org/language/regexes#Enu...and_ranges : Sorry. Meeting can't handle more.
PimDaniel :Scimon thank's... 13:58
13:58 JRaspass left
JJAtria[m] m: my %a = gather with "foo" { take "literal" => $_ }; dd %a 14:01
evalable6 Hash %a = {:literal("foo")}
JJAtria[m] m: my %a = gather with "foo" { take literal => $_ }; dd %a
evalable6 (exit code 1) Unexpected named argument 'literal' passed
in code at /tmp/kjdTKk5MfD line 1
in block <unit> at /tmp/kjdTKk5MfD line 1
JJAtria[m] ^ Any idea why this is? It took me by surprise
moritz you've called take() with named arguments, but it doesn't like that 14:11
MasterDuke it's something about how the unquoted version creates a Pair
moritz correct
m: my %a = gather with "foo" { take (literal => $_) }; dd %a
evalable6 Hash %a = {:literal("foo")}
moritz another way to avoid it being interpreted as a named arg
JJAtria[m] I guess what took me by surprise was that quoting the key would make the pair not be a named argument for "take" but the pair that needs to be taken 14:12
I wouldn't have expected it to have an effect
And I'm not sure I can justify why it does make a difference 14:14
PimDaniel Hi : 14:29
lizmat I think in a future language version, we should consider making a difference between named parameters and Pair syntax 14:30
and force :foo(value) for named parameters 14:31
PimDaniel Hi! what is IRC command that you use and makes my Nick appear Highlighted?, Thanks!
lizmat PimDaniel: start the line with "/me" ?
PimDaniel lizmat: thank's! 14:32
.beer lizmat 14:33
doesn't work :(! No beer : sorry! 14:34
PimDaniel thank's 14:35
hum i suppose it works.
14:38 aindilis left 14:40 PimDaniel left
lizmat it's really a function of the IRC client that you use 14:40
15:03 gnufr33dom joined 15:17 wamba left, Sgeo joined 15:23 RaycatWh` joined, RaycatWh` is now known as Raycat|Work 15:34 JRaspass joined 15:43 parabolize joined 15:57 wamba joined 16:09 b2gills left
lizmat yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2021/02/01/2021-...proposing/ 16:18
sjn yay! 16:23
16:24 Raycat|Work left
jmerelo lizmat++ 16:29
16:33 rindolf left 16:44 b2gills joined 16:54 [Coke] joined 17:08 PimDaniel joined
PimDaniel \o 17:09
what is the default tag for is import?
The problem is when i import things on the use Line, all is import things are not imported anymore. :(. 17:10
The things into list are module constants. 17:11
The problem is when i import things on the use Line, all "is import" things are not imported anymore. :( 17:12
Undeclared routine: bar used at line 11. :( 17:14
hooo sorry : it works! tests are difficult to do anyway! 17:19
17:28 domidumont left 17:37 dakkar left 17:44 MasterDuke left 17:48 natrys joined 17:49 domidumont joined 17:56 PimDaniel left 18:05 domidumont left 18:08 perry left, perryprog joined 18:09 daxim left, perryprog is now known as perry 18:21 aindilis joined 18:22 daxim joined 18:23 rindolf joined 18:24 Scimon left
[Coke] "has anyone seen Perry?" 18:27
perry Noooo
[Coke] (/phinneas-and-ferb)
oops, phineas. 18:28
18:33 Garbanzo joined 18:35 PimDaniel joined
PimDaniel \o 18:36
Yet another problem that stucks me.
PimDaniel lizmat: i watched your examples of code. 18:38
Here is my question : How could i export 50 Constant living into a module calling a TAG on the script side? 18:40
i mean without writing is export(:mytag) on each constant. 18:41
Oh sorry : the day is Monday. i'v forgotten.
18:43 _jrjsmrtn left, stoned75 left
[Coke] Are you not allowed to ask questions on Monday? :) 18:47
PimDaniel: so, if you want your export to follow your rules and not "is export", then you can create a sub EXPORT in your module (docs.raku.org/language/modules#ind...ub_EXPORT) 18:48
(er, it's in the compunit of your module, not the module itself, I think) 18:49
18:50 mowcat joined
[Coke] so then you can either put the constants in there by name, or dynamically get the list of constants somehow. If you are exporting all constants, that's probably straightforward - if you want to discriminate... 'is export' may be just as much typing. 18:50
18:52 stoned75 joined
PimDaniel Thank's Coke. I allready know how to bind variables with EXPORT sub. 18:54
what i want is group them into tags because thez are many.
and i want to group them.
18:56 __jrjsmrtn__ joined
PimDaniel but without is export(':TAG') which is silly. Anyway all export will allways be bullshit in all Perl/Raku versions. 18:56
I think those that made it like masturbation. 18:57
You need to write lines of code just to export: silly tricky!
I should say that thinks are still more complicated than in p5. 19:02
19:07 xelxebar_ left 19:12 xelxebar joined 19:19 RaycatWhoDat joined
RaycatWhoDat QQ: Is there a more succinct version of this: glot.io/snippets/fvh9phcmda 19:19
I know it's pretty close right now but I just wanna make sure there's no Raku magic I can use in lieu of this. 19:20
19:23 vrurg_ is now known as vrurg 19:24 vrurg left 19:25 __jrjsmrtn__ left 19:31 __jrjsmrtn__ joined, MasterDuke joined
tonyo RaycatWhoDat: is `E` not the next grade? 19:32
19:32 gnufr33dom left
RaycatWhoDat tonyo: probably 19:32
I'm just guessing at the prompt from a glance in an email, lol 19:33
19:36 jmerelo left 19:38 MasterDuke left 19:41 MasterDuke joined 19:42 gurmble joined 19:45 gurmble is now known as grumble
tonyo m: sub grade(Int() $a) { qw<E E E E E E D C B A A>[max(min(100, $a),0)/10]; }; grade(5000).say; # this is a more succinct way of getting a letter grade 19:51
evalable6 A
tonyo RaycatWhoDat: ^
19:53 ufobat_ joined, sjm_uk left 19:55 natrys left 19:57 ufobat left 20:00 vrurg joined, vrurg left 20:05 neshpion joined
tonyo m: sub grade(Int() $a) { qw<E D C B A>[(max(min(90, $a),59)-50)/10]; }; grade(100).say; # even better RaycatWhoDat 20:08
evalable6 A
neshpion wouldn't it be <F D C B A> 20:10
20:14 tejr left 20:17 tejr joined 20:19 Some-body_ joined
tonyo not if you grew up somewhere that knows the order of the alphabet 20:22
20:23 PimDaniel left, vrurg joined 20:26 releasable6 left, notable6 left, statisfiable6 left, nativecallable6 left, bisectable6 left, linkable6 left, quotable6 left, greppable6 left, shareable6 left, squashable6 left, DarthGandalf left, BarrOff[m] left, Some-body_ is now known as DarthGandalf 20:32 ufobat_ left 20:35 BarrOff[m] joined
[Coke] seeing a very slow module 'use' time for a not-very-complicated module of about 30 lines. gist.github.com/coke/7d6cac113a7fa...9b9a38c023 20:47
20:47 rindolf left
[Coke] I get that time with multiple runs of the .t file - so the .pm should already be compiled. 20:48
21:01 finsternis left 21:03 mowcat left 21:14 Garbanzo left, Garbanzo joined 21:15 shareable6 joined 21:16 greppable6 joined, bisectable6 joined, squashable6 joined, releasable6 joined, nativecallable6 joined 21:17 linkable6 joined, quotable6 joined, notable6 joined, statisfiable6 joined 21:22 Celelibi joined 21:48 marcusr left, MasterDuke left 21:50 marcusr joined 21:54 brtastic left 22:01 kaiwulf joined
[Coke] nine guessed "too many files in lib", and yes, there were over 9K due to a cache of compiled POD files. 22:10
moved the cache out of lib, all is well 22:11
22:36 wamba left
neshpion why is $HOSTNAME defined in my shell but is uninitialized under raku and returns (Any) ? 23:14
i thought it would inherit all environment variables D:
and apparenlty i can't `say "{shell "hostname"}";` either because it returns "Proc<\d+>` D: reee i just want to simulate my $PS1 23:16
fwiw i installed via rakubrew i don't know if it uses a shim that nukes my env before executing or something 23:18
23:23 Garbanzo left, Garbanzo joined 23:41 Garbanzo left 23:57 Black_Ribbon joined, neshpion left