🦋 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:04 wamba left, Doc_Holliwould joined, vrurg joined 00:08 Doc_Holliwood left 00:10 Doc_Holliwould left, lucasb left 00:13 Doc_Holliwood joined 00:15 redable joined 00:17 wildtrees left 00:21 guifa2 joined 00:34 vrurg left 00:36 tony-o left 00:41 redable left 00:44 squashable6 left 00:45 redable joined, squashable6 joined 00:49 vrurg joined 00:59 stoned75 joined, pmurias left, cpan-raku left 01:01 cpan-raku joined, cpan-raku left, cpan-raku joined 01:05 redable left 01:07 warriors left 01:11 redable joined
guifa .tell SmokeMachine great presentation. I can’t wait to have some time to dive into using Red. e falas muito melhor do que achas 01:33
tellable6 guifa, I'll pass your message to SmokeMachine
01:36 Kaiepi left 01:39 Kaiepi joined 01:42 redable left
SmokeMachine vrurg: it seems that the tests are passing my branch copy of you PR... I'm thinking of merging it... I've run again th tests on your PR, but I'm having the same error there... that doesn't make any sense... 01:43
tellable6 2019-10-29T01:33:02Z #raku <guifa> SmokeMachine great presentation. I can’t wait to have some time to dive into using Red. e falas muito melhor do que achas
SmokeMachine vrurg: travis-ci.org/FCO/Red/builds/60422...tification 01:44
01:45 redable joined
SmokeMachine guifa: thanks! 01:45
red: say "are you there?!" 01:46
redable SmokeMachine, are you there?!␤
SmokeMachine red: use Post; .say for Post.^all 01:47
redable SmokeMachine, gist.github.com/4b39b830364475f936...ad07711069
01:48 huyna joined
huyna i found Bailador framework which support easy way to make http server, i wonder if this framework support HTTP/2.0 01:49
vrurg SmokeMachine: That's weird.
SmokeMachine huyna: I think it doesn't... but Cro does
vrurg: yes, a lot 01:50
huyna SmokeMachine: good to hear some, let me do Cro
SmokeMachine huyna: cro.services 01:51
huyna yes @Smok
sorry, yes SmokeMachine, thank you so much
SmokeMachine huyna: np
vrurg SmokeMachine: is it same rakudo version used by travis and with manual testing? 01:52
SmokeMachine vrurg: I'm running the same docker image/container...
vrurg SmokeMachine: but most certainly it gets a non-code in $meth. The only way to find out – is to print $meth. If I get time I would try to commit a "patch" and see what the output in travis would be. 01:53
SmokeMachine vrurg: I know it's working... but I'm afraid of merging it and the bug goes to master...
vrurg SmokeMachine: you're absolutely right. 01:54
01:58 lucs joined 02:08 redable left 02:20 tony-o joined, stoned75 left 02:41 huyna left 03:12 marcusr left, marcusr joined 03:16 marcusr left, marcusr joined 03:57 Doc_Holliwood left 04:04 marcusr left, marcusr joined 04:15 marcusr left 04:16 marcusr joined 04:47 guifa2 left 05:05 squashable6 left 05:07 squashable6 joined 05:14 guifa2 joined 05:28 squashable6 left 05:30 squashable6 joined 05:55 wamba joined 06:00 jmerelo joined
jmerelo releasable6: status 06:00
releasable6 jmerelo, Next release will happen when it's ready. There are no known blockers. 248 out of 451 commits logged (⚠ 9 warnings)
tellable6 2019-10-28T13:14:02Z #raku <tyil> jmerelo where to submit possible advent calendar entries?
releasable6 jmerelo, Details: gist.github.com/dab42ab183773bc10f...e28417374e
jmerelo .tell tyil plese submit them here github.com/perl6/advent/tree/maste...dvent-2019 06:01
tellable6 jmerelo, I'll pass your message to tyil
tyil thanks
jmerelo tyil sure :-) 06:02
06:02 vlad78 joined
jmerelo We're halfway there; anyone interested, please add yourself to the advent calendar schedule via PR 06:02
vlad78 Hi 06:03
I'm trying to find instructions on how to compile raku from sources
Latest git, not rakudo star
moritz vlad78: perl Configure.pl --gen-moar
make install
vlad78 moritz: that downloads moarvm or do I have to have it cloned in advance? 06:04
jmerelo vlad78: if you want to compile from source, you're supposed to have the source already... That does not download anything. 06:06
vlad78 jmerelo: Right, in that case what all packages do I need to download and where?
I'm aware of 'raku' and 'moarvm' 06:07
jmerelo vlad78: unless you want to do it yourself for some reason, I stronly advise to use something like rakudobrew... Will simplify stuff a lot.
vlad78 Right, /me googles rakudobrew
The thing is that I have tried to compile raku on solaris, and in current rakudo star is nasty bug in hostname resolving routine 06:08
But the current git has the code very different, probably fixed
jmerelo so you need HEAD as opposed to other 06:09
With rakudobrew you can install the point versions. 2019.07.1 is the latest
Ulti vlad78: p6env is also a useful choice especially if you want multiple versions for different projects 06:12
vlad78 All right, thank you all. I'll try rakudobrew, and if it fails just wait for next star release :) 06:18
06:25 Doc_Holliwood joined 06:30 stoned75 joined 06:31 vlad78 left 06:46 guifa2 left 06:50 stoned75 left 07:30 sarna joined 07:35 jmerelo left 07:36 El_Che joined 07:39 maettu joined 07:43 Voldenet left 07:54 sena_kun joined 08:01 bartolin left 08:03 bartolin joined
ZzZombo Is this correct: `@names.sort({ %sets{$_} }).sort({ %matches{$_} }).reverse;`? Doesn't the second `sort` call just override the previous? 08:31
tyil tony-o: in the readme on github.com/tony-o/p6-db-xoos-sqlite you refer to another github repo that gives me a 404 08:34
08:36 bartolin left 08:37 bartolin joined 08:59 rindolf joined
rindolf Hi everypony! 09:00
09:01 hungrydonkey joined
hungrydonkey hello, Is there a way to make the result of high precision in division? 09:03
like 1/3 in the REPL, the result is 0.333333. I want the result to have more decimal places, more accurate. 09:05
😶 09:06
09:06 Manifest0 left, Manifest0 joined
xinming_ SmokeMachine: How do we do multiple key renference? 09:24
SmokeMachine xinming_: what do you mean? 09:25
09:30 bartolin left
xinming_ create table a { part1 int, part2 int2, primary key(part1, part2) }; table b { id serial, part1 int, part2 int2, primary key(id) }; SELECT * FROM b JOIN a USING (part1, part2) WHERE a.part1 = 'part1 AND a.part2 = 'part2'; 09:31
termbin.com/lbjp <--- This is the most I can get and think of 09:33
El_Che m: (1/3).WHAT 09:34
camelia ( no output )
El_Che m: say (1/3).WHAT
camelia (Rat)
El_Che ^--- hungrydonkey
the devision is a Rational number until you force it to be something else, so you don't loose precision
m: say <1/3>.nude 09:35
camelia (1 3)
El_Che m: say <1/3>.^name
camelia Rat
El_Che hungrydonkey: docs.perl6.org/type/Rat 09:36
xinming_ SmokeMachine: termbin.com/72hv6 09:40
SmokeMachine xinming_: joins are not implemented yet... it's coming on :api<2> 09:41
xinming_ SmokeMachine: Ok. So, my second example can be updated as test.
So, in this case, it's has_many relationship join. 09:42
SmokeMachine red: termbin.com/72hv6
SmokeMachine needs to find somewhere to run this bot... 09:43
09:43 bartolin joined
xinming_ SmokeMachine: Is multi column unique constraint added? 09:47
ZzZombo Is there a way to use my Raku code outside of it, i. e. by compiling it into a DLL? 09:48
xinming_ Something like, is column{ :unique-constraint-name<xxx> }; 09:49
SmokeMachine xinming_: yes: `::?CLASS.^add-unique-constraint: { .col1, col2 }`, and it's plained `is column{ :unique<name> }` and `is unique<name>` 09:51
09:55 Altai-man_ joined 09:57 sena_kun left 10:08 thundergnat joined
thundergnat m: use lib ‘data/all-modules/github/thundergnat/Rat-Precise/’; use Rat::Precise; say (1/3).precise(32); 10:08
camelia ===SORRY!===
Could not find Rat::Precise at line 1 in:
thundergnat meh.
El_Che releasable6: status 10:16
10:16 thundergnat left
releasable6 El_Che, Next release will happen when it's ready. There are no known blockers. 248 out of 451 commits logged (⚠ 9 warnings) 10:16
El_Che, Details: gist.github.com/7c2b65b5d8ee8d97fa...1467079858
10:19 sarna left
hungrydonkey El_Che, thank you very much. 10:23
It's true. 10:25
p6 : say 1/3+0.11111111;
10:27 scimon joined 10:32 pmurias joined 10:35 sarna joined 10:47 hungrydonkey left 10:57 wamba left
ZzZombo m: class A {};class B does A {};B.new.WHAT.say 10:58
camelia 5===SORRY!5=== Error while compiling <tmp>
A is not composable, so B cannot compose it
at <tmp>:1
11:08 squashable6 left 11:11 squashable6 joined
pmurias MasterDuke: just not doing silly stuff gets us a bit faster on the point creation benchmark then the old jvm backend :) 11:30
MasterDuke: I'll try to add some truffle magic and will see how it goes ;)
11:31 donaldh joined 11:35 Voldenet joined, Voldenet left, Voldenet joined 11:38 pmurias left, xinming_ left, xinming_ joined 11:56 sena_kun joined 11:58 Altai-man_ left 11:59 ggoebel joined 12:03 squashable6 left 12:04 pmurias joined 12:05 squashable6 joined 12:06 hungrydonkey joined 12:19 hungrydonkey left, lucasb joined 12:23 hungrydonkey joined 12:28 hungrydonkey left 12:33 hungrydonkey joined, hungrydonkey left 12:39 donaldh left 12:52 MasterDuke left
scimon ossg.bcs.org/blog/event/modern-languages/ : Really should write slides for this. 12:55
13:12 guifa2 joined 13:31 maettu left 13:33 Juerd left 13:34 donaldh joined 13:46 guifa2 left 13:56 Altai-man_ joined
ZzZombo "Please note that one should keep the code inside the whenever as small as possible, as only one whenever block will be executed at any time" - shouldn't this read "at the same time"? 13:57
13:58 sena_kun left
jnthn That's also not especially good advice; you need to do whatever is transactionally required to process the event. 14:07
14:18 kybr left 14:23 guifa2 joined
guifa2 is making an e-mail token for regexen. Good lord we have come a long way in terms of designing formats 14:30
"<1234 @ local(blah) .machine .example>" (spaces intentional) is a valid e-mail address 🤦 14:31
14:34 Manifest0 left 14:35 Manifest0 joined 14:36 Manifest0 left
[Coke] O_o; 14:37
is it distinct from the version with no spaces? 14:39
Grinnz never forget: metacpan.org/release/Email-Valid/s...m#L399-400 14:40
[Coke] I am all in on never validating email except by trying to send an email. 14:41
14:42 warriors joined
guifa2 [Coke]: I'm more or less the same. But I was thinking one of the strengths of Raku is the ability to create some fairly powerful reusable tokens (the coolest so far I'm saving for advent calendar), and e-mail address is a fairly "easy" one to tackle to show its utility 14:43
[Coke] nice.
Do we have enough volunteers for the advent calendar this year? 14:44
guifa2 The goal (mostly working so far is to go "use Regex::EmailToken" and then [email@hidden.address] ~~ /My e-mail is <email>/; say $<email><domain> ---> "foo.com"; would work both in general code and inside of grammars! 14:45
14:46 pmurias left
guifa2 And I figured out how to grant dot access to the matches too, so the above could have say $<email>.domain, or $<email>.has-domain-literal , etc 14:46
(the dot access is I think the coolest bit I figured out, by wrapping tokens to provide a mixin) 14:47
14:48 pmurias joined
AlexDaniel jmerelo: so what's up with docs.raku.org ? 14:48
tellable6 AlexDaniel, I'll pass your message to jmerelo
14:55 sarna left
ZzZombo jnthn: so should that quote be edited out or corrected? 15:10
tony-o tyil: ty, should be fixed now 15:12
tyil tony-o: \o/ 15:13
tony-o jnthn: i ran a bisect on that commit regarding boundary issue and i think the regression is in 2019.03 and not actually in that PR, the test also passes fine on HEAD rakudo 15:14
re: cro routing boundary PR12 15:15
15:23 lil joined
jnthn ZzZombo: Maybe something like "Only a single whenever block may be running at a time for a given instance of a supply or react block. This means one can reliably write event processing code without races over the state declared inside the supply or react block. However, it also means that a long-running whenever block will prevent processing of further messages until it has completed." 15:29
ZzZombo Is this correct: `@names.sort({ %sets{$_} }).sort({ %matches{$_} }).reverse;`? Doesn't the second `sort` call just override the previous? 15:34
jnthn Yes, seems pointless
tony-o: Hm, interesting...thanks. Will take a look later. 15:35
Grinnz unless it's a stable sort and they aren't all uniquely ordered?
ZzZombo Another docs issue then. Will fix tomorrow. Gotta go to bed. Cya!
jnthn Should probably be `@names.sort({ %sets{$_}, %matches{$_} }).reverse`
Kaiepi any experts on how types are handled in raku on? 15:38
jnthn Well, I designed/implemented most of the MOP, which isn't unrelated. :) 15:40
Kaiepi yeah this is to do with a niche scenario when using the MOP
m: class FooHOW { method new_type() { my Mu:U $ := Metamodel::Primitives.create_type: self.new, 'Uninstantiable' } }; FooHOW.new_type
camelia Died with X::TypeCheck::Binding
in method new_type at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi there's nothing wrong with this 15:41
i haven't told the type to behave like Mu so it shouldn't type check as such
m: sub foo(Mu:U $ --> 1) { }; class FooHOW { method new_type() { Metamodel::Primitives.create_type: self.new, 'Uninstantiable' } }; say foo FooHOW.new_type 15:42
camelia 1
Kaiepi why does this type check?
jnthn In many places, Mu is taken to mean "don't even bother checking" 15:43
Because everything (should be) Mu
So the checks are simply optimized out.
This is allowed. 15:44
I guess the variable typed with Mu:U path is one where that optimization simply doesn't happen.
(I can kind of guess why; it's a bit harder to make it happen.)
Kaiepi is a library for a type that always succeeds type checks against it, but can't be used for anything outside of type annotations a bad idea? 15:46
jnthn Not sure I see the point of it, tbh 15:48
I bet `my Mu $ := ...` would also work out
Kaiepi m: class FooHOW { method new_type() { my Mu $ := Metamodel::Primitives.create_type: self.new, 'Uninstantiable' }; method shortname(--> Str:D) { 'Foo' } }; say FooHOW.new_type 15:49
camelia Cannot find method 'gist' on '': no method cache and no .^find_method
in block <unit> at <tmp> line 1
Kaiepi m: class FooHOW { method new_type() { my Mu $ := Metamodel::Primitives.create_type: self.new, 'Uninstantiable' }; method shortname(--> Str:D) { 'Foo' }; method find_method(Mu:U $type is raw, Str:D $name) { Mu.HOW.find_method: Mu, $name } }; say FooHOW.new_type 15:50
camelia Too many positionals passed; expected 1 argument but got 2
in method shortname at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: class FooHOW { method new_type() { my Mu $ := Metamodel::Primitives.create_type: self.new, 'Uninstantiable' }; method shortname(Mu:U $ --> Str:D) { 'Foo' }; method find_method(Mu:U $type is raw, Str:D $name) { Mu.HOW.find_method: Mu, $name } }; say FooHOW.new_type 15:51
camelia (Foo)
Kaiepi ah
there we go
tony-o [Coke]: do you need anyone for the advent calendar? 15:52
guifa2: did you look at using an action with your grammar to provide an email type object back? this would make it so you don't have to mixin or wrap grammar tokens 15:53
Kaiepi thanks jnthn
[Coke] tony-o: I don't need anything, just curious 15:54
guifa2 tony-o: I definitely did, and will probably still provide such an object. The catch is, actions can't be used in adhoc regexes, only in grammars
AlexDaniel [Coke]: jmerelo seems to be taking care of it 15:55
as for volunteers, you never know :) 15:56
15:56 sena_kun joined, cpan-raku left 15:57 cpan-raku joined, cpan-raku left, cpan-raku joined 15:58 Altai-man_ left
guifa2 tony-o: the actions route is what I took for the <local-number> token for Intl:: stuff when I did it a few weeks ago, but tbh the ability to quickly access the super important stuff seems worth it the wrap+mixin trouble 16:00
16:01 patrickb joined
tony-o ah, you can always call the actions manually from the resulting regex's match object 16:05
guifa2 true, but that's like a whole extra line of code for the end-user ;-) 16:06
(and honestly, now that I've figured out how to do it, only about 5-10 extra lines of code on my side) 16:07
tony-o ah 16:08
16:12 pmurias left 16:14 jmerelo joined 16:15 rindolf left
Kaiepi 👀 www.humblebundle.com/books/linux-b...2019-books 16:15
this could help increase the bus factor on bsd-related issues
jmerelo There's a book aout Perl too... 16:16
tellable6 2019-10-29T14:48:46Z #raku <AlexDaniel> jmerelo: so what's up with docs.raku.org ?
Kaiepi would be useful for me as well since idr linux that well
guifa2 jmerelo: but it's not Raku. I agree with Kaiepi, that would be a good "boom look at the evolution" if someone flipped through it after getting it 16:17
jmerelo .tell AlexDaniel I'll try to have it ready ASAP. 16:20
tellable6 jmerelo, I'll pass your message to AlexDaniel
16:20 scimon left 16:23 patrickb left
guifa2 Should we slowly start to remove compile errors that are exclusively to prevent P5-isms? I'm thinking about, for instance, where we disallow allow a hyphen in character classes except as the first/last to prevent gotchas, but there's no other reason to prevent it except for P5->P6 transitions 16:29
16:32 lil left
rba jmerelo: let me know if I can help. 16:34
jmerelo rba: I'll see if I can set it up this afternoon. I'm in the middle of a course, but I'll try. 16:37
rba: any feedback from AWS?
rba Jmerelo: not yet Gupta from AWS just accepted the application as it seems to be more complete now. 16:39
jmerelo rba: great :-)
rba jmerelo: we will see...
jmerelo: ping me, if you need me. :-) 16:40
jmerelo rba: sure, thanks!
16:45 xinming_ left 16:46 xinming_ joined 16:55 guifa2 left, donaldh left 16:59 Kaiepi left 17:10 guifa2 joined 17:13 guifa2 left
rba jmerelo: I‘ve claimed docs.perl6.org and docs.raku.org in Google Search Console already. After publishing docs.raku.org I can setup a permanent (301) redirect from docs.perl6.org/* -> docs.raku.org/*. Will this fit your needs? 17:15
17:15 wildtrees joined
xinming_ SmokeMachine: ^delete on ResultSeq doesn't work. 17:16
SmokeMachine xinming_: do you mean `.delete`?
xinming_ let me try. 17:17
SmokeMachine xinming_: you should use meta-methods only on your model, not on ResultSet...
17:18 guifa2 joined 17:27 MasterDuke joined
jmerelo releasable6: status 17:32
releasable6 jmerelo, Next release will happen when it's ready. There are no known blockers. 248 out of 451 commits logged (⚠ 9 warnings) 17:33
jmerelo, Details: gist.github.com/f981731bb3fae55969...1ce679fcba
17:34 wamba joined 17:37 guifa2 left
SmokeMachine xinming_: did it work? 17:39
17:40 Kaiepi joined
xinming_ Nope 17:43
SmokeMachine: //termbin.com/r413
SmokeMachine: termbin.com/r413
SmokeMachine xinming_: could you show me the code, please? 17:44
xinming_ BBL
I'll shrink the problem code for you.
17:48 wamba left
xinming_ SmokeMachine: BTW, do you dev use the master branch of rakudo? 17:49
I'm using the 2019.07.1
termbin.com/dx6y 17:50
17:55 Altai-man_ joined 17:57 sena_kun left
SmokeMachine yes... 18:01
18:03 chloekek joined
SmokeMachine xinming_: it's not binding the value... I'll try to fix it when I arrive at home... 18:07
xinming_: www.irccloud.com/pastebin/PHZJCmCa/ 18:08
xinming_: thanks... would you ming to open a issue?
xinming_ SmokeMachine: Ok 18:12
El_Che any news on the state of relocatable builds? I thought there were still some issues? 18:17
jmerelo .tell rba you've got email
tellable6 jmerelo, I'll pass your message to rba
tony-o AlexDaniel: not seeing an approve button on github.com/perl6/problem-solving/pull/87 18:53
but lgtm
AlexDaniel tony-o: hmm what about this link github.com/perl6/problem-solving/pull/87/files 18:54
tellable6 2019-10-29T16:20:11Z #raku <jmerelo> AlexDaniel I'll try to have it ready ASAP.
AlexDaniel tony-o: do you see “Review changes” button?
tony-o approved 18:58
AlexDaniel thank you! 19:00
19:02 wamba joined
jmerelo AlexDaniel: trying to copy stuff to stating server now, but having problems with ssh keys. Or something. Pinging +rba for help. 19:07
AlexDaniel El_Che: mind joining #raku-dev? :) 19:08
jmerelo: you too :) 19:09
missed discussion: colabti.org/irclogger/irclogger_lo...10-29#l179
vrurg m: our $foo = "really?"; say $*foo 19:20
camelia really?
vrurg ^ this is totally confusing... 19:21
jnthn: are you around?
19:23 wildtrees_ joined
Doc_Holliwood anybody here living in hungary? 19:24
19:25 wildtrees left 19:33 Xliff joined 19:34 wamba left, wamba joined
Xliff So, who can explain %?RESOURCES and it's proper use vis-a-vis META6.json? 19:42
Because I am trying to use it and it is NOT working.
m: $*OS.name.say
camelia Dynamic variable $*OS not found
in block <unit> at <tmp> line 1
Xliff m: $*KERNEL.gist.say 19:43
camelia linux (1.SMP.Fri.Mar.
Xliff m: $*KERNEL.os.say
camelia No such method 'os' for invocant of type 'Kernel'
in block <unit> at <tmp> line 1
Xliff m: $*KERNEL.WHAT.say
camelia (Kernel)
Xliff m: $*KERNEL.arch.say 19:44
camelia x86_64
Xliff m: $*KERNEL.archname.say
camelia x86_64-linux
Xliff m: $*KERNEL.cpu-cores.say
camelia 4
19:45 jmerelo left
Xliff m: $*KERNEL.release.say 19:45
camelia 4.4.176-96-default
Xliff m: $*DISTRO.say 19:46
camelia opensuse (42.3)
Xliff m: $*DISTRO.WHAT.say
camelia (Distro)
19:55 warriors left 19:57 Altai-man_ left
Xliff my %numKeys = :{ 3.1 => 'a', π => 'b', 22/6 => 'c' }; %numKeys.gist.say 19:58
m: my %numKeys = :{ 3.1 => 'a', π => 'b', 22/6 => 'c' }; %numKeys.gist.say
camelia Potential difficulties:
Useless use of hash composer on right side of hash assignment; did you mean := instead?
at <tmp>:1
------> 3= :{ 3.1 => 'a', π => 'b', 22/6 => 'c' }7⏏5; %numKeys.gist.say
{3.1 => a, 3.666667 => c, π …
19:58 kybr joined 19:59 pmurias joined
Xliff m: my %numKeys = :( 3.1 => 'a', π => 'b', 22/6 => 'c' ); %numKeys.gist.say 19:59
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix > instead.
at <tmp>:1
------> 3my %numKeys = :( 3.1 =>7⏏5 'a', π => 'b', 22/6 => 'c' ); %numKeys.
Xliff m: my $numKeys = :{ 3.1 => 'a', π => 'b', 22/6 => 'c' }; %numKeys.gist.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '%numKeys' is not declared. Did you mean '$numKeys'?
at <tmp>:1
------> 3:{ 3.1 => 'a', π => 'b', 22/6 => 'c' }; 7⏏5%numKeys.gist.say
Xliff m: my $numKeys = :{ 3.1 => 'a', π => 'b', 22/6 => 'c' }; $numKeys.gist.say
camelia {3.1 => a, 3.666667 => c, π => b}
20:03 Kaiepi left 20:05 Kaiepi joined 20:08 wamba left 20:10 donaldh joined
donaldh Is there a way to enumerate all the declared classes in global scope? 20:10
tony-o .seen ctilmes 20:11
tellable6 tony-o, I saw ctilmes 2019-10-22T21:07:27Z in #raku: <ctilmes> SmokeMachine: Ah... I haven't done testing/etc. for mac
20:11 wamba joined
tony-o .tell ctilmes running into FATAL: remaining connection slots are reserved for non-replication superuser connections using DB::Pg under heavy insert reps 20:11
tellable6 tony-o, I'll pass your message to ctilmes 20:12
20:29 xinming_ left, xinming_ joined 20:30 donaldh left 20:32 Manifest0 joined 20:35 Manifest0 left 20:37 pmurias left 20:38 pmurias joined 20:39 Manifest0 joined 20:46 pmurias left, chloekek left 20:47 pmurias joined, redable joined, wamba left 20:49 wamba joined 20:50 stoned75 joined 20:51 eseyman joined
SmokeMachine www.irccloud.com/pastebin/CWcYDy9P/ 20:57
red: www.irccloud.com/pastebin/raw/CWcYDy9P/
redable SmokeMachine, Successfully fetched the code from the provided URL
SmokeMachine, 04===SORRY!04=== Error while compiling /code/./code.p6␤'EXPORTHOW::DECLARE::model' conflicts with an existing meta-object imported into this lexical scope␤at /code/./code.p6:3␤------> 03use Red08⏏04;␤ 20:58
20:58 redable left 21:08 redable joined
SmokeMachine red: www.irccloud.com/pastebin/raw/CWcYDy9P/ 21:08
redable SmokeMachine, Successfully fetched the code from the provided URL
SmokeMachine, SQL : DELETE FROM film_playlist␤WHERE film_playlist.film_id = ?␤BIND: [1]␤
SmokeMachine xinming_: ^^ 21:09
21:14 ctilmes joined
ctilmes tony-o: You might need to up max_connections. You can also leak connections if you don't close them (could be a bug on the DB::Pg side preventing close..) 21:17
tellable6 2019-10-29T20:12:00Z #raku <tony-o> ctilmes running into FATAL: remaining connection slots are reserved for non-replication superuser connections using DB::Pg under heavy insert reps
lizmat weekly: news.perlfoundation.org/post/tpf-r...aku-rename 21:25
notable6 lizmat, Noted! (weekly)
21:51 normanrockwelles joined, normanrockwelles is now known as rockwellesque
lizmat weekly: dev.to/melezhik/informal-introduct...rrow6-40pa 21:52
notable6 lizmat, Noted! (weekly)
xinming_ SmokeMachine: Thanks. 21:56
SmokeMachine: Is it possible to implement the tree feature in Red?
SmokeMachine what's the tree feature? 21:57
xinming_ termbin.com/unlz 22:02
SmokeMachine: It's kind like this.
22:02 rockwellesque left
SmokeMachine xinming_: something like this? 22:04
22:04 redable left
SmokeMachine github.com/FCO/Red/blob/a0355f4fc6...del.t#L143 22:05
xinming_ SmokeMachine: It seems a bit confusing, the belongs_to and has_one relationship is hard to distinguish
SmokeMachine $ and @
tony-o ctilmes: i'll see if i can debug further, i'm only ever calling .execute so i'll see if i can log .close failures
xinming_ @.a is has_many, We can think $.a is has_one, But what about the belongs_to?
I'll go to bed. Thanks for your time 22:06
22:06 ctilmes left 22:07 ctilmes joined
tony-o belongs_to can be one or more if it's modeled after dbix xinming_ 22:07
(i'm assuming it is)
22:09 pmurias left
tyil I currently have the following rule to match a string surrounded by double quotes: `'"' ( <-["]>* ) '"'`, is there something better (preferably one that allows escaped double quotes) 22:09
22:11 ctilmes left
tony-o if you don't need nested quotes you can you use an <?after 22:12
22:13 epony left
tony-o m: my $x = 'x "hello \"world\"" x'; say $x ~~ /'"' .+? <!after '\\'> '"'/; 22:15
camelia 「"hello \"world\""」
tyil that would work for me 22:16
22:18 ctilmes joined
tony-o the way to do nested is with a tilde in case that comes in handy 22:18
ctilmes tony-o: Hmm.. .execute just does a "get handle from pool, do thing with it, return handle to pool". I may have to add some diagnostics 22:19
tony-o i'll add them, i'm running a script that is copy all of the META info from p6c to a database so zef can query it and it's doing 881 modules * however many times the version line changed in the META 22:20
that way i can do a fix instead of just complaining that it is dying :-)
22:23 wamba left 22:25 ctilmes left, pmurias joined
jnthn vrurg: I'm about-ish. About the example you showed, that's just because the default package is GLOBAL :) 22:30
vrurg jnthn: I'm about to open a problem-solving ticket. It doesn't look right to me. 22:48
22:50 guifa2 joined
jnthn m: say ::?PACKAGE 22:51
camelia (GLOBAL)
jnthn Why the problem-solving issue? So I can write the same thing I did here and close it? :)
(If there's more to it than this, then sure. If that's all there is, then that's the answer.) 22:52
vrurg jnthn: I'm still checking if I'm not mistaken about the outcomes of this design. 22:53
jnthn: ok, it only now that I got time to check it and though confusing it seemingly harmless. Though it still feels wrong and I would only allow `our $*foo` to be visible by dynamic lookups. Don't see the reason for current behavior. 22:59
Except that it could serve as an alternative solution for people asking for $* to be EXPORTable. 23:01
jnthn vrurg: It's long established that the * is removed from the name when doing lookups in GLOBAL and PROCESS. 23:02
That's how $*IN resolves to $PROCESS::IN 23:03
vrurg jnthn: I know. I only wonder what was the original purpose of this. Just to provide means for the above resolution?
jnthn Yes; it'd be really quite annoying to have to write PROCESS::<$*IN> instead 23:04
Not sure I follow the exportable thing: can't you already do `my $*foo is export`, or bind such a dynamic variable into the hash returned by sub EXPORT? 23:05
vrurg m: module Foo { our $*foo is export = "foo" }; import Foo; say $*foo 23:07
camelia (Any)
vrurg I don't remember if this is a bug or intended behavior. 23:08
jnthn m: module Foo { my $*foo is export = "foo" }; dd FOO::EXPORT::DEFAULT.WHO 23:09
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't apply trait 'is export' on a my scoped variable. Only our scoped variables are supported.
at <tmp>:1
------> 3module Foo { my $*foo is export7⏏5 = "foo" }; dd FOO::EXPORT::DEFAULT.WHO
jnthn m: module Foo { our $*foo is export = "foo" }; dd FOO::EXPORT::DEFAULT.WHO
camelia Could not find symbol '&DEFAULT'
in block <unit> at <tmp> line 1
jnthn m: module Foo { our $*foo is export = "foo" }; dd Foo::EXPORT::DEFAULT.WHO
camelia Stash element = {"\$*foo" => Any}
jnthn Hmm...that feels more like bug to me 23:10
vrurg Anyway, when I once was thinking about exporting dynamics, some unpleasant side effects was coming into mind. Unfortunately, it was long ago and I can't remember what seemed wrong to me then. 23:12
That's why this looks more appropriate to me now: 23:13
m: module Foo { our $foo = "my default"; sub foo is export { if $foo == 1 { say "ok" } } }; import Foo; my $*foo = 1; foo 23:14
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5my default' (indicated by ⏏)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff jnthn: Can you do multi subs with different signatures. Something like: multi sub func-with-callback( &func(Int, Str, gdouble is rw) ) and multi sub func-with-callback( &func(Str, Pointer --> Pointer) )
vrurg m: module Foo { our $foo = "my default"; sub foo is export { if $*foo == 1 { say "ok" } } }; import Foo; my $*foo = 1; foo
camelia ok
vrurg m: module Foo { our $foo = "my default"; sub foo is export { if $*foo == 1 { say "ok" } else { say "not ok" } } }; import Foo; foo 23:15
camelia Dynamic variable $*foo not found
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: module Foo { our $foo = "my default"; sub foo is export { if ?$*foo == 1 { say "ok" } else { say "not ok" } } }; import Foo; fo
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
fo used at line 1. Did you mean 'fc', 'so'?
Xliff m: module Foo { our $foo = "my default"; sub foo is export { if ?$*foo == 1 { say "ok" } else { say "not ok" } } }; import Foo; foo
camelia not ok
vrurg Xliff: right, but the idea is that `our $foo` must end up in GLOBAL and be available via $*foo. 23:17
Like in this simple snippet:
m: our $foo = 42; say $*foo
camelia 42
jnthn m: multi foo(&a:(Int)) { say "i" }; multi foo(&a:(Str)) { say "s" }; foo -> Str { }; foo -> Int { }; 23:19
camelia s
jnthn Xliff: ^^
Xliff jnthn: Would that work without the colons and an "is native" trait? 23:20
jnthn If you don't put the colon then you're trying to do an unpack 23:21
This won't go well
Xliff I've been using that without colons successfully for GtkPlus 23:22
jnthn Hm, that surprises me
I wonder if NativeCall is doing something special there
Xliff I would suspect so. If I use a colon, it doesn't work.
jnthn D'oh.
I don't think `multi` and `is native` go together too well, though that may have been addresed. 23:23
Xliff Ah. That's what I was worried about. 23:24
23:31 maggotbrain joined
jnthn Mostly I see modules write multis as the external interface and then call the appropriate native thing within them 23:32
23:32 maggotbrain left
jnthn Been a while since I wrote a native binding... 23:32
Xliff Yes, but there are times when I need to call a routine that has a nullable callback.
Which means I need two definitions: one with the callback and one with the callback replaced by Pointer. 23:33
jnthn Maybe 'cus folks use the ones I write and then ask hard questions... :)