»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:02 Manifest0 left 00:06 Manifest0 joined 00:18 netrino joined 00:27 lucasb left 00:35 MilkmanDan left 00:37 MilkmanDan joined 01:04 Manifest0 left 01:09 Manifest0 joined, netrino left 01:18 Manifest0 left, synopsebot joined
tyil timotimo: will synopsebot generate a lot of output at times? 01:19
01:22 Manifest0 joined 01:27 Manifest0 left 01:32 Manifest0 joined 01:38 Manifest0 left 01:43 Manifest0 joined 01:47 Manifest0 left 01:52 Actualeyes left 01:53 Manifest0 joined, hythm joined 01:55 aatw joined 01:57 hythm_ joined 01:58 aatw left, hythm left, molaf left 02:00 Manifest0 left 02:03 loops_ left 02:05 Manifest0 joined 02:11 molaf joined 02:18 aatw joined 02:20 Manifest0 left 02:26 Manifest0 joined 02:53 Manifest0 left 02:57 Manifest0 joined
lucs After cloning rakudo and configuring it with 'perl Configure.pl --prefix=/wherever/install --backends=moar --gen-nqp --gen-moar' and then doing a 'make', how do I get back a pristine "non-maked", so to speak, environment? 03:06
vrurg lucs: you mean `make clean` or `make realclean`? 03:07
lucs 'make clean', 'make realclean', 'make distclean' appear insufficient, because when I run the configure part again, it just says "Cleaning up..." and has nothing to do.
The nqp part doesn't get cleaned (or something?) 03:08
vrurg git reset --hard but it would skip .gitignore, of course.
cpan-p6 New module released to CPAN! Async::Workers (0.0.1) by 03VRURG
vrurg Ah, that you must do manually.
cd nqp; make realclean 03:09
or just rm -rf nqp
lucs Aha, cool. Trying, thanks.
vrurg would eventually do something about it.
lucs Like tweaking the makefile?
vrurg But remember that if nqp is found in --prefix it won't be built anyway. 03:10
lucs Hmm... I'll have to throw that out too then I guess.
vrurg So, best of all is to cd nqp && make install manually. Configure.pl won't re-configure nqp without removal of --prefix
lucs You know, now that I've explained my x/y problem, here's what I'm really trying to do, maybe there's a better way :) 03:11
vrurg If you need to do a lot of rebuilding/testing you could simply skip --prefix whatsoever and get in installed into ./install. This one you can always delete with no worries. 03:12
lucs I want to 'git bisect' rakudo to try to pinpoint a problem that appears to be present in the latest version.
And since I'm building everything from scratch, I want things to be clean clean clean between builds. 03:13
vrurg So, ./install would be the best choice.
lucs Just dumping it should be sufficient?
vrurg Oki, I time to finish for today. Good luck!
lucs Thanks :) 03:14
03:19 Manifest0 left 03:27 Manifest0 joined 03:31 Manifest0 left 03:37 Cabanossi left, hythm__ joined 03:38 Manifest0 joined, hythm_ left 03:39 Cabanossi joined, hythm__ left 03:45 molaf left
MasterDuke lucs: are you aware of bisectable6? 03:50
bisectable6: help 03:51
bisectable6 MasterDuke, Like this: bisectable6: old=2015.12 new=HEAD exit 1 if (^∞).grep({ last })[5] // 0 == 4 # See wiki for more examples: github.com/perl6/whateverable/wiki/Bisectable
03:52 Manifest0 left
AlexDaniel lucs: also, if there's something that has to be bisected locally, you can use Blin github.com/perl6/Blin 03:52
I did bisect rakudo-nqp-moar many times manually, but it is always painful
even if it takes you 10 minutes to configure Blin or figure out how to shove it into bisectable, it's still easier than doing it manually :) 03:53
lucs MasterDuke: I want to compare the results of running a test under t/..., so not sure that would apply, but noted, thanks. 03:54
AlexDaniel: I'll look it up, thanks :)
AlexDaniel lucs: of a module? Or is it a test in rakudo? 03:55
lucs: normally I'd just gist the whole file and give it to bisectable
lucs rakudo test, failing here: ./perl6 -Ilib t/02-rakudo/04-diag.t
AlexDaniel mm that one inconveniently uses Test::Helpers :) 03:56
03:57 Manifest0 joined
AlexDaniel oh can't believe it, github finally subscribes you to your gists 03:58
lucs: soo… what's your setup?
c: HEAD,HEAD,HEAD,HEAD,HEAD gist.github.com/AlexDaniel/1878b6a...8a7618769d
committable6 AlexDaniel, gist.github.com/fbb1490063458427f9...6b7ab6742c 03:59
AlexDaniel lucs: seems to be working fine?
I did remove the includes line though
c: HEAD,HEAD,HEAD,HEAD,HEAD,HEAD,HEAD,HEAD,HEAD,HEAD gist.github.com/AlexDaniel/1878b6a...8a7618769d
committable6 AlexDaniel, gist.github.com/98bf6c97372c1626f9...e72ee62112 04:00
lucs AlexDaniel: Yeah, the error I'm getting is pretty weird: 04:04
gist.github.com/lucs/9c234303a7b70...7e045c9a74
04:05 Manifest0 left 04:12 Manifest0 joined 04:18 Manifest0 left 04:25 Manifest0 joined 04:36 Manifest0 left 04:41 Manifest0 joined
AlexDaniel lucs: weird 04:47
lucs: if you clearly know that it wasn't like this before, file a bug report
04:53 Manifest0 left 04:55 espadrine_ left 04:57 Manifest0 joined 05:02 Manifest0 left 05:07 Manifest0 joined 05:12 Manifest0 left 05:14 sauvin joined 05:15 ccntrq- joined 05:16 afresh1_ joined, yubimusubi joined, veesh_ joined 05:17 Mithaldu joined, kaare__ left, cpan-p6_ joined, cpan-p6_ left, cpan-p6_ joined, kaare__ joined, ccntrq left, Manifest0 joined, veesh left, Possum left, nekomune left, afresh1 left, vxe left, vxe_ joined, cpan-p6 left, SCHAPiE left, eater left, gabc left, gabc joined, khisanth_ left, Mithaldu` left, veesh_ is now known as veesh, khisanth_ joined 05:18 eater joined 05:19 vrurg left, nekomune joined 05:20 Geth_ left, holyghost left, holyghost joined 05:21 ribasushi left, SCHAPiE joined 05:28 ribasushi joined 05:32 jargan joined 05:33 jast left, jargan is now known as jast 05:42 Manifest0 left, ribasushi left 05:46 ribasushi joined 05:47 Manifest0 joined
lucs Whoaboy. It appears that my problem is caused by my working directory having a component whose name starts with (or maybe it's just because it contains) a comma :-( 05:49
05:49 molaf joined 05:51 bartolin joined, gabc_ joined, vxe joined, vxe_ left, gabc left, kurahaupo left, bartolin_ left, khisanth_ left
lucs Hmm... PERL6LIB components are comma separated, right. Gotta be related. 05:52
05:52 khisanth_ joined 05:58 kurahaupo joined 06:04 Manifest0 left
lucs is not sure how to report the problem, or if it's more of a "then don't do that" thing. 06:06
Anyway, ZZZ now.
lucs &
lizmat lucs: it feels like a case of DIHWIDT 06:08
06:09 Manifest0 joined
lucs lizmat: Um, what's that acronym? 06:09
lizmat Doctor, It Hurts When I Do This :-) 06:10
lucs Right, exactly :)
lizmat (then don't do that)
06:11 molaf left 06:18 Manifest0 left, jmerelo joined 06:19 lizmat left 06:23 Manifest0 joined
holyghost gm, JJ 06:25
yoleaux 10 May 2019 20:33Z <Xliff> holyghost: It seems to be up, now.
06:27 Manifest0 left 06:28 discord6 left, discord64 joined 06:29 discord64 is now known as discord6 06:32 Manifest0 joined, molaf joined
jmerelo Hi 06:44
06:45 pony joined 06:46 molaf left, pony left
holyghost .tell Xliff ssh hangs, maybe the ip changed ? 54.90.70.61 06:46
yoleaux holyghost: I'll pass your message to Xliff.
06:54 domidumont joined 07:03 Manifest0 left 07:08 Manifest0 joined
holyghost .tell Xliff ssh does not ask for a public key password, it just hangs 07:11
yoleaux holyghost: I'll pass your message to Xliff.
07:21 Manifest0 left 07:22 andrzejku joined 07:25 Manifest0 joined 07:29 andrzejku left, Manifest0 left 07:30 gabc_ is now known as gabc 07:34 Manifest0 joined 07:37 lizmat joined
lizmat waves from T-Dose 07:37
El_Che lizmat: have fun there 07:40
lizmat: visiting, speaking, booth?
lizmat visiting / booth 07:42
El_Che say hi to woolfy for me
07:55 Manifest0 left 08:01 Manifest0 joined 08:10 natrys joined
jmerelo lizmat: have a lot of fun 08:17
lizmat: you fixed the link from T-Dose? Also, Geth is down.
08:17 lizmat_ joined 08:20 lizmat left 08:22 andrzejku joined 08:23 lizmat joined 08:24 lizmat_ left, tyil[m]1 left, lance_w[m] left 08:25 mack[m] left, unclechu left, Seance[m] left, rba[m] left, MitarashiDango[m left, Garland_g[m] left, tyil[m] left, Demos[m] left, AlexDaniel` left, Matthew[m] left 08:28 cgfbee left 08:29 holyghost left, holyghost joined, irdr_ left 08:30 irdr joined 08:35 cgfbee joined, AlexDaniel` joined 08:39 rindolf joined 08:46 tyil[m]1 joined, Matthew[m] joined, lance_w[m] joined, unclechu joined, tyil[m] joined, rba[m] joined, Demos[m] joined, mack[m] joined, MitarashiDango[m joined, Garland_g[m] joined, Seance[m] joined 08:49 sena_kun joined 08:55 lizmat left 08:56 Manifest0 left 08:59 lizmat joined 09:01 Manifest0 joined
timotimo tyil: do you mean messages sent to irc or stdout/stderr logging? 09:07
09:11 dolmen joined, arkaitz joined 09:16 dolmen left 09:22 Manifest0 left, espadrine_ joined 09:30 Manifest0 joined 09:32 kurahaupo_ joined 09:34 lizmat left, kurahaupo left 09:35 SCHAPiE left 09:37 lizmat joined 09:40 SCHAPiE joined 09:41 netrino joined 09:46 nebuchadnezzar left 09:47 mowcat joined 09:53 Manifest0 left 09:59 Manifest0 joined, Kaiepi left 10:00 Kaiepi joined 10:02 mowcat left 10:05 arkaitz left 10:10 Manifest0 left 10:15 Manifest0 joined 10:19 natrys left 10:20 Manifest0 left 10:25 Manifest0 joined 10:31 Manifest0 left
lizmat hmmm... looks like we lost Geth ? 10:36
tyil: ^^^
10:38 Manifest0 joined
jmerelo lizmat: a while ago, yes. 10:41
10:46 Manifest0 left
holyghost I've worked on some more code and managed to setup SDL2::Raw 10:48
I can debug my games now, on my own boxes 10:49
I need to write a widget tree, again
Then I have to decide on the topic for a game, the infrastructure is in place though
I'll put the game script and modules on p6 CPAN 10:50
Now, I need to rest
10:51 holyghost left 10:55 Manifest0 joined 10:59 Manifest0 left 11:01 lizmat left 11:05 Manifest0 joined, andrzejku left 11:11 pecastro joined 11:12 jmerelo left 11:21 lizmat joined 11:22 arkaitz joined 11:25 arkaitz left 11:28 pecastro left 11:29 sena_kun left, sena_kun joined 11:32 pecastro joined 11:34 molaf joined, aatw left 11:42 Manifest0 left 11:44 espadrine_ left 11:45 espadrine_ joined 11:49 Manifest0 joined 11:51 Geth joined
tyil timotimo: to irc 11:55
if it's "spammy", I need to look for ways to make it auth to get a cloak so it wont get klined every other day :p
timotimo i don't remember it being spammy 11:56
it's already got a bit of code in it to prevent it from saying the same thing twice in a medium span
tyil sweet
timotimo though i guess if you write something like R#1 R#2 R#3 R#4 R#5 ... you'll get it to say a bit more 11:57
which i don't expect anybody to need to do
tyil so long as it aint abused it doesn't really matter for now :>
R#1234
synopsebot R#1234 [open]: github.com/rakudo/rakudo/issues/1234 [RFC] Whitespacey things in «» (say «a\nb».perl)
tyil looks like it works 11:58
timotimo cool
i didn't even see it come in :D
tyil I did it at 3 am last night
I was woken up and couldn't sleep anymore ;~;
timotimo damn :(
tyil eh, it felt productive since I got something working, so I dont mind
MasterDuke tyil++ 12:03
12:03 andrzejku joined
tyil if I'm bored tomorrow I want to look into spinning up a VM on my desktop to share some load of my k8s cluster 12:03
I need more ram to host new things
if anyone knows a reasonably cheap host I can look for just getting another VPS too, tho 12:04
timotimo you can trade some speed for less ram usage by turning off spesh if you have a perl6 program 12:07
how much ram you get freed up depends entirely on the program's run time behaviour, though 12:09
i wonder if we can deallocate some spesh stuff if spesh hasn't done anything in a couple of minutes maybe 12:10
12:11 Altai-man_ joined 12:15 sena_kun left 12:26 Manifest0 left 12:30 kurahaupo_ left, kurahaupo joined 12:32 Manifest0 joined 12:34 squashable6 left 12:38 squashable6 joined, ChanServ sets mode: +v squashable6 12:39 xenowoolfy joined
tyil I only have 5gb ram spread over 3 servers rn to begin with 12:39
12:40 lucasb joined 12:45 Manifest0 left 12:46 xenowoolfy left 12:50 Manifest0 joined 13:05 MilkmanDan left 13:07 nadim joined 13:08 MilkmanDan joined
nadim hi, I have an array in an object, dd dumps it as "Array @!elements = [(0, " = ", "\@a = [1..2]" => [1, 2]),]", it try this code @!elements.map: -> ($k, $b, $sub_element) {} but I get error: Too few positionals passed to '<anon>'; expected 3 arguments but got 2 in sub-signature! 13:09
timotimo ooh, that's data::dump::tree isn't it 13:11
i just used that again yesterday
nadim hi timotimo, yes
timotimo m: my @array = [(0, " = ", "\@a = [1..2]" => [1, 2]),]; @array.map: -> ($k, $b, $sub_el) { } 13:12
camelia Too few positionals passed to '<anon>'; expected 3 arguments but got 2 in sub-signature
in block <unit> at <tmp> line 1
timotimo m: my @array = [(0, " = ", "\@a = [1..2]" => [1, 2]),]; @array.map: -> $foo { $foo.perl.say }
camelia $(0, " = ", "\@a = [1..2]" => [1, 2])
timotimo is it mistakenly trying to make that last bit a named? that would be rather wrong, but i can't imagine anything else? 13:13
13:13 Praise left, Praise joined, Praise left, Praise joined
nadim at this point DTD is no doing anything yet, P6 extraction of the element doesn't work 13:15
and the lastelement looksvery much like a Pair to me
timotimo yeah, it should be passed as a third element 13:16
nadim most surprising is that it says got 2 insub-signatures!
timotimo yeah
m: my $thing = (0, " = ", "\@a = [1..2]" => [1, 2]); -> ($a, $b, $c) { }($thing) 13:17
camelia Too few positionals passed to '<anon>'; expected 3 arguments but got 2 in sub-signature
in block <unit> at <tmp> line 1
timotimo m: my $thing = (0, " = ", Pair.new("\@a = [1..2]", [1, 2])); -> ($a, $b, $c) { }($thing)
camelia Too few positionals passed to '<anon>'; expected 3 arguments but got 2 in sub-signature
in block <unit> at <tmp> line 1
timotimo m: my $thing = (0, " = ", ["\@a = [1..2]", [1, 2]]); -> ($a, $b, $c) { }($thing)
camelia ( no output )
timotimo the pair is upsetting it
13:18 vrurg joined
nadim m: my $thing = (0, " = ", ["\@a = [1..2]", [1, 2]]); -> ($a, $b,( $c)) { }($thing) 13:18
camelia Too many positionals passed to '<anon>'; expected 1 argument but got 2 in sub-signature in sub-signature
in block <unit> at <tmp> line 1
nadim m: my $thing = (0, " = ", ["\@a = [1..2]", [1, 2]]); -> ($a, $b,( $c, $d)) { }($thing)
camelia ( no output )
timotimo perhaps using Capture could be interesting for this use case 13:20
since that lets you more cleanly separate positionals and nameds
nadim m: my $thing = (0, " = ", ["\@a = [1..2]", ); -> ($a, $b, $c) { }($thing)
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in array composer; couldn't find final ']' (corresponding starter was at line 1)
at <tmp>:1
------> 3my $thing = (0, " = ", ["\@a = [1..2]", 7⏏5); -> ($a, $b, $c) { }…
nadim timotimo: it's 3 elements, and I have no idea of what the 3rd element is, it just happens to be a Pair here but could be anything 13:21
13:21 dolmen joined, mowcat joined
nadim m: my $thing = (1, 2, "K" => 3, ); -> ($a, $b, $c) { }($thing) 13:22
camelia Too few positionals passed to '<anon>'; expected 3 arguments but got 2 in sub-signature
in block <unit> at <tmp> line 1
nadim m: my $thing = (1, 2, Pair("K" => 3), ); -> ($a, $b, $c) { }($thing) 13:23
camelia Too few positionals passed to '<anon>'; expected 3 arguments but got 2 in sub-signature
in block <unit> at <tmp> line 1
nadim IMHO, this is a bug!
timotimo it probably is 13:25
moritz m: Pair("K" => 3)
camelia ( no output )
timotimo m: my $thing = (1, 2, $(Pair.new("K" => 3)), ); -> ($a, $b, $c) { }($thing)
camelia Cannot resolve caller new(Pair:U: Pair:D); none of these signatures match:
(Pair: Cool:D \key, Mu \value, *%_)
(Pair: Mu \key, Mu \value, *%_)
(Pair: Mu :$key!, Mu :$value!, *%_)
in block <unit> at <tmp> line 1
nadim m: my $thing = (1, 2, Pair("K" ,3), ); -> ($a, $b, $c) { }($thing)
camelia Cannot find method 'Pair' on object of type List
in block <unit> at <tmp> line 1
timotimo m: my $thing = (1, 2, $(Pair.new("K", 3)), ); -> ($a, $b, $c) { }($thing)
camelia Too few positionals passed to '<anon>'; expected 3 arguments but got 2 in sub-signature
in block <unit> at <tmp> line 1
nadim timotimo: I am not 100% sure but I think this worked before 13:27
timotimo we can find that out easily :) 13:28
bisect: my $thing = (1, 2, $(Pair.new("K", 3)), ); -> ($a, $b, $c) { }($thing)
bisectable6 timotimo, Bisecting by output (old=2015.12 new=b2e72d6) because on both starting points the exit code is 1
timotimo, bisect log: gist.github.com/ceb3097b7a6ab2bd19...d49a3afd63
timotimo, (2017-05-31) github.com/rakudo/rakudo/commit/77...fd60823c30
timotimo sounds like only the error message changed, not the behaviour 13:29
13:30 ribasushi left
nadim I can extract the elements manually fornow and hopew I don't have more code written like that. Should this bereported somewhere? 13:32
13:33 |oLa| joined
timotimo i'd expect an issue on the rakudo bug tracker on github would be good, though it's possible that there's already a ticket in RT for this 13:33
BBL
13:33 vs^ joined, stanley joined
moritz
.oO( lost in rtanslation )
13:35
nadim m: my $thing = (0, 1, Pair.new("K", [3, 4])); -> ($a, $b, $c) { }($thing) 13:37
camelia Too few positionals passed to '<anon>'; expected 3 arguments but got 2 in sub-signature
in block <unit> at <tmp> line 1
lizmat m: my $thing = (1, 2, 3, "K" => 3, ); -> ($a, $b, $c) { dd $a, $b, $c }($thing)
camelia Unexpected named argument 'K' passed in sub-signature
in block <unit> at <tmp> line 1
lizmat so the signature binding is interpreting the Pair as a named parameter
when it shouldn't 13:38
nadim m: my $thing = (1, 2, "K" => 3, ); -> ($a, $b, $c) { dd $a, $b, $c }($thing) 13:39
camelia Too few positionals passed to '<anon>'; expected 3 arguments but got 2 in sub-signature
in block <unit> at <tmp> line 1
nadim lizmat: didn't you have an extr element in your example above?
lizmat yes
the important thing was that the Pair is interpreted as a named parameter, when it shoultn't 13:40
so it is a bug
nadim how can you see that iti is interpretated that way? 13:42
lizmat in the error message
m: my $thing = (1, 2, "K" => 3, ); (sub a( ($a,$b,$c) ) { dd $a, $b, $c })($thing)' # similar with sub
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3 ($a,$b,$c) ) { dd $a, $b, $c })($thing)7⏏5' # similar with sub
expecting any of:
infix
infix stopper
statement end…
lizmat m: my $thing = (1, 2, "K" => 3, ); (sub a( ($a,$b,$c) ) { dd $a, $b, $c })($thing) # similar with sub
camelia Too few positionals passed to 'a'; expected 3 arguments but got 2 in sub-signature
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
lizmat nadim: "Unexpected named argument 'K' passed in sub-signature␤" 13:43
vrurg How can be a pair notation be distinguished from a named parameter? Considering a signature to make that distinction isn't a very good idea as it complicates reading the sources. 13:46
yoleaux 12:40Z <lizmat> vrurg: installing Async::Workers failed for me twice, with different error modes
13:46 lizmat_ joined, |oLa| left, molaf left
lizmat_ vrurg: don't get me started on that :-) 13:47
vrurg lizmat_: any interesting link where I can read about your previous starts? ;)
13:47 dolmen left
lizmat_ it's been quite a few years ago already when I suggested using the :foo syntax for named parameters / adverbs only 13:47
and the fat comma => syntax for creating positional pairs 13:48
13:48 |oLa| joined
lizmat_ but I guess Larry felt it was a too big a step away from Perl 5 13:48
13:48 lizmat left
Altai-man_ m: sub a ($a, Pair $b) { say $a; say $b }; a(5, (a => 5)); 13:49
camelia 5
a => 5
Altai-man_ ^ is the best I can think of
m: sub a ($a, :$b) { say $a; say $b }; a(5, b => 5);
camelia 5
5
13:50
vrurg Too sad. Because in a couple of places I now do something like method foo ( *%pair where *.keys == 1 ) to have `foo Name => { ... }' syntax.
13:50 dolmen joined
Altai-man_ not like I am a comprehensive source. ;) 13:50
13:50 Altai-man_ is now known as sena_kun 13:51 lizmat_ is now known as lizmat, |oLa| left 13:57 Manifest0 left 13:59 dolmen left
lizmat m: my $thing = \(1, 2, "K" => 3, ); -> ($a, $b, $c) { dd $a, $b, $c }($thing) # vrurg making it a Capture, seems to be a workaround 13:59
camelia 1
2
:K(3)
14:01 arkaitz joined 14:02 arkaitz left
vrurg lizmat: Another one is assigning to a Pair scalar and passing that as a parameter. 14:02
But that doesn't help in creating nice syntax sugar.
lizmat prefixing a \ seems to be less intrusive :-) 14:03
14:03 Manifest0 joined, abc joined 14:05 ChoHag left
tyil vrurg: in Async::Workers-0.0.2.tar.gz, the contained META6.json still says 0.0.1 for the version 14:06
vrurg tyil: thanks, I was sure it was updated... :( 14:09
14:10 xenowoolfy joined
nine This is why ORMs are doomed to fail in the end: ronsavage.github.io/SQL/sql-2003-2.bnf.html 14:10
How could anyone hope to map that to a different language?
jnthn 90% solutions are still useful 90% of the time 14:11
14:12 xenowoolfy left
jnthn Trying to force *every single DB interaction* through an ORM is pretty much doomed, though :) 14:12
14:13 Altai-man_ joined
nine But....what if queries were constructed and modified as actual SQL ASTs? 14:14
By now my usual approach is to just type the darn SQL statement myself. And then swear at myself because I need to make some parts of them optional. Then spend even more time converting the query to SQL::Abstract syntax just to run into some limitation of that. 14:16
14:16 sena_kun left 14:18 abc left 14:24 Manifest0 left
cpan-p6_ New module released to CPAN! Async::Workers (0.0.3) by 03VRURG 14:29
14:29 Manifest0 joined 14:52 lizmat left, holyghost joined
holyghost timotimo : if I get a runtime error of function SDL_LoadBMP not found in 'libSDL2.dynlib', do I need to compile something in then ? 14:54
14:54 grow_grew joined
grow_grew hi all 14:54
holyghost hello
grow_grew perl6 beginner with a problem here, can someone pls give me a 1 min hand?
I'm doing Project Euler questions on P6 to train 14:55
but something is driving me crazy
when I try $calc *= $current[$p];
it simply does not multiply incrementally
if I do += just to test it does the incremental sum
tadzik holyghost: sound like you may be missing sdl_image 14:56
Altai-man_ grow_grew, can you please provide a gist or a simplified code where the issue is visible?
grow_grew yes, Altai-man 14:57
one minute I'll get the link
14:57 dogbert17 joined
holyghost tadzik : sdl_image uses IMG_Load to load something else than bmp 15:01
SDL_LoadBMP is in the SDL lib, anyway, I'll figure it out tomorrow 15:02
Program code is there for the start of making the game
which I'm happy with
15:02 lizmat joined
holyghost There's probably some crazy cracker out there who managed that ;-) 15:03
I can upload tomorrow or next week, I only need to abstract the image loading and anyone can start making games, with my game I mean 15:06
SDL/SDL2 for perl6 really is the killer app thing
You write your own widgets :-) 15:07
15:07 Manifest0 left
Altai-man_ m: my @a = 1,2,3,4,5; my $calc = [*] @a; say $calc; 15:08
camelia 120
grow_grew here guys gist.github.com/growgrew/11d825180...d6f2fd77fa 15:10
line 46 15:11
*=
does not work
it says 0 for the inc multiplier
while if I change to += it does the sum
holyghost grow_grew : see above what Altai-man wrote ^^^
Altai-man_ tries it out... 15:12
grow_grew what is the name of this? [*] I mean
15:12 Manifest0 joined
grow_grew in P6 jargon :) 15:13
15:13 Sgeo_ joined
Altai-man_ eeeh... reduction metaop? 15:13
grow_grew metaop, ok cool
Altai-man_ grow_grew, docs.perl6.org/language/operators#...aoperators <-
grow_grew very cool 15:14
Let me try it
Altai-man_ grow_grew, the issue is with logic, I am afraid
grow_grew I actually tried it at first
but it didn't work
let me try it again
Altai-man_ you start with 0, and then do * x, *x2, *x3, but in the end it is still zero
with plus, there are no such a problem.
grow_grew but there is no 0 on the sequence 15:15
Altai-man_ grow_grew, no, you have `$calc = 0`.
right at the start
grow_grew oh
gosh
Altai-man_ line 42
grow_grew of course man
15:15 kent\n left
grow_grew if the logic fails, not even P6 can make it happen, right? lolololol 15:16
thanks so much guys
Altai-man_ I guess
np
15:16 Sgeo__ left
Altai-man_ also you don't populate $answer 15:16
but this is "not yet implemented" thing, I suspect. :) 15:17
15:17 Sgeo joined 15:18 Sgeo_ left, lizmat left 15:20 mowcat left 15:25 Manifest0 left
Altai-man_ grow_grew, what is the answer, by the way? 15:26
15:27 kent\n joined
holyghost enjoys some paprika nuts 15:27
I got a hack attack this afternoon and totally settled on making games again, this time in perl6 :-) 15:28
I'm a hack n' slasher :-) 15:30
15:31 Manifest0 joined, |oLa| joined
holyghost hi |oLa| 15:33
15:58 jmerelo joined
holyghost hi JJ 15:59
jmerelo : I'm programming a perl6 game tomorrow, the foundations have been laid, I have figured out the SDL2::Raw system and can start on using it 16:00
I'll upload it to cpan later on
16:01 |oLa| left
grow_grew Altai-man_ answer is 23514624000 but I need to finish the solution 16:01
:) - I'll set it up on the gist as I have it 16:02
Altai-man_ grow_grew, ok. \o/
jmerelo holyghost: remember to test it first.
grow_grew My strategy is to have my own and then put one or two from others and compare 16:03
that way I may learn P6 and evolve
become a ONE_LINER! lol 16:04
16:05 zakharyas joined
Altai-man_ grow_grew, well, that'd be hard to solve in a single line, I think, with effective approach of array shifting. An one-line is likely possible, but I suspect it won't be too efficient. :| 16:05
holyghost jmerelo : I can run it, it has no dependencies except for SDL2::Raw, anyway, HAND
eveyrone can start making games with it, I'll work out a widget tree later on 16:06
jmerelo holyghost: running is not testing. It's writing actual unitary tests for all functions.
holyghost right
jmerelo holyghost: they probably won't unless it's tested thoroughly. A 90% coverage is not compulsory, but it helps (you and others).
holyghost I see, do I need to release it as a module ? 16:07
jmerelo holyghost: uploading to CPAN == releasing as a module. 16:08
holyghost with test dir, META.json and so on ?
ok, so I just put the script to run it in the README
The problem is, I cannot test much as it's all graphics
jmerelo holyghost: no. Please follow instructions to release modules here: 16:09
docs.perl6.org/language/modules#Di...ng_modules
holyghost: you can test _everything_
holyghost: if you can run, you can test.
holyghost: what's said above applies to all modules.
holyghost ok 16:10
I'm reading you link ...
s/you/your
grow_grew thanks guys, thanks altai-man_ here's the final gist, works ok and it runs fast gist.github.com/growgrew/11d825180...d6f2fd77fa less than .1 seconds 16:11
O(n) = n I believe 16:12
holyghost jmerelo : I'll try to test as much as possible, it needs code on the test side to test gfx I guess
So modules with a p6 script which is a game are ok on CPAN ? 16:13
with a Game.pm6 and so on I mean
I figured 16:14
jmerelo holyghost: CPAN is OK with everything, at least on the p6 side, as long as the compressed file is not corrupted. However, a proper release must follow a number of rules.
holyghost I understand
jmerelo holyghost: rules that are in the document are linked, but are not the only ones. Another, maybe not sufficiently written, rule, is that the module should be in a public repo such as GitHub 16:15
holyghost It says so in the link you gave me 16:17
I better follow the rules, instead of just hacking away, I'll make some test tomorrow then 16:19
*tests
I remember that tk on cpan of perl5 even tested graphically, so it popped up windows 16:20
cpan-p6_ New module released to CPAN! Term::Choose (1.5.4) by 03KUERBIS 16:24
16:25 Manifest0 left 16:26 antoniogamiz joined
antoniogamiz o/ 16:27
why chrome is saying that examples.perl6.org is not secure?
16:27 cpan-p6_ left 16:28 cpan-p6 joined, cpan-p6 left, cpan-p6 joined
antoniogamiz ah it is using http 16:28
mmm examples.perl6.org looks like a duplicate of docs.perl6.org 16:29
timotimo on my end it just gives "welcome to nginx!" 16:30
16:31 Manifest0 joined
antoniogamiz try with examples.perl6.org/ 16:32
timotimo not sure why it does that, but there the docs.perl6.org domain answers 16:33
that's why you get the certificate error
antoniogamiz mmm
timotimo if you actually need the examples, you can still find them on github; personally i'm quite disappointed in the stuff on the site 16:34
16:41 grow_grew left
Geth doc: d2eaa3dd1d | (JJ Merelo)++ | xt/examples-compilation.t
Minor doc changes
16:43
doc: 29952fcf34 | (JJ Merelo)++ | xt/examples-compilation.t
Avoid using global variables

So that it's not as memory hungry as before, and also chunks are checked on the fly, instead of consigning them to a global variable. it's still using memory (5G in my machine), but not as much as before, I guess. This closes #2764
jmerelo antoniogamiz: it's in a non-permament infrastructure, and probably the certificate does not include that address.
16:43 rindolf left, zakharyas left
jmerelo timotimo: did you see D#2778? 16:43
synopsebot D#2778 [open]: github.com/perl6/doc/issues/2778 [site] doc.perl6.org cert invalid
jmerelo Hey, that works :-) 16:44
timotimo: also this: github.com/perl6/doc/issues/2777#i...-491524535 16:45
timotimo i didn't know we had docs and doc
16:46 arkaitz joined
jmerelo timotimo: me neither. 16:46
timotimo works now 16:48
jmerelo timotimo: as in a miracle passed, or you did something to make it work?
timotimo: if 2), can you please close the issue?
timotimo i did something, but can you test if everything actually works? 16:49
jmerelo examples.perl6.org still issues a yellow-framed warning in Firefox.
timotimo well, yeah, it doesn't exist
16:50 rindolf joined
jmerelo timotimo: doc.perl6.org works without a problem. 16:50
16:50 afresh1_ is now known as afresh1
jmerelo timotimo: that might be the cause. 16:50
timotimo i only set up what i considered necessary, so no examples.perl6.org 16:51
holyghost I'm going offline for a bit, tak care 16:52
16:52 holyghost left
jmerelo timotimo: what was in there before? Was there an actual page? 16:52
timotimo: oh, wow, it's got its very own htmlify.p6 16:53
It's like the fossil record of perl6/DOC 16:54
timotimo the contents are mostly stale, too 16:55
16:55 antoniogamiz left 16:56 antoniogamiz joined
jmerelo timotimo: maybe the best is to eliminate that link from the docs menu. 16:56
timotimo go for it 16:57
possibly also from perl6.org
jmerelo timotimo: D#2783. I like to create issues for everything so that future me does not wonder "Who the hell did this and why?" 16:59
synopsebot D#2783 [open]: github.com/perl6/doc/issues/2783 Eliminate the "examples" link from the top menu
timotimo yeah
antoniogamiz I can resolve that issue if you want 17:00
jmerelo antoniogamiz: doing it now... Recompiling. But if you need an issue, there are aplenty :-)
antoniogamiz: I was about to do D#2782 when I got into this... 17:01
synopsebot D#2782 [open]: github.com/perl6/doc/issues/2782 ::Metamodel::MethodContainer is not composable
antoniogamiz I will take a look 17:02
17:04 kurahaupo left 17:09 andrzejku left, zacts joined 17:13 khisanth_ left 17:15 kurahaupo joined
Geth doc: antoniogamiz self-assigned ::Metamodel::MethodContainer is not composable github.com/perl6/doc/issues/2782
34ff25117f | (JJ Merelo)++ | htmlify.p6
17:17
antoniogamiz jmerelo: what definition should be checked in #27882? 17:19
I've checked ParametricRoleHOW and it looks like correct mm
jmerelo antoniogamiz: it's correct _now_ 17:20
Altai-man_ m: class Foo does Metamodel::MethodContainer {}; say Foo; 17:21
camelia (Foo)
antoniogamiz so.. you have already fixed it?
17:21 pmurias joined
jmerelo antoniogamiz: camelia does master. We do 2019.03.1 17:21
pmurias nine: re ORMs isn't the point of them more to create an OO "layer" on top of SQL
jmerelo antoniogamiz: but we don't know when master will become 2019.xx
Altai-man_ jmerelo, it works on 2019.03 for me 17:22
jmerelo Altai-man_: can you please check the example?
Altai-man_ perl6 --version -> `This is Rakudo version 2019.03 built on MoarVM version 2019.03` 17:23
jmerelo Altai-man_: it works for me now
Altai-man_ `perl6 -e 'class Metamodel::ParametricRoleHOW does Metamodel::Naming does Metamodel::Documenting does Metamodel::Versioning does Metamodel::MethodContainer does Metamodel::PrivateMethodContainer does Metamodel::MultiMethodContainer does Metamodel::AttributeContainer does Metamodel::RoleContainer does Metamodel::MultipleInheritance does Metamodel::Stashing does Metamodel::TypePretense does Metamodel::RolePunning does Metamodel::ArrayTyp 17:24
pmurias nine: if you just want to built SQL, building SQL by quasi quoting indeed seems like a better Perl6y solution
Altai-man_ e {}'` is not raising an error
antoniogamiz jmerelo: mmm
Altai-man_ 6c: class Foo does Metamodel::MethodContainer {}; say Foo; 17:25
committable6 Altai-man_, ¦6c (37 commits): «(Foo)␤»
antoniogamiz perl6 --version
jmerelo antoniogamiz: no idea, really. Maybe a flapper. You can probably close it now.
antoniogamiz ups incorrect terminal
jmerelo: ok :)
(I have checkd both definitions, master and 2019.03.1 and they are the same 17:26
jmerelo antoniogamiz: leave it open 17:29
antoniogamiz ok :) 17:30
jmerelo it's probably got something to do with D#2764, because it only happens if I run the whole set.
synopsebot D#2764 [closed]: github.com/perl6/doc/issues/2764 [bug] xt/examples-compilation.t is too memory-hungry
antoniogamiz something wierd
weird*
17:30 stanley left
jmerelo antoniogamiz: pick another issue, whichever you want. There are more than 200 to choose from :-) 17:31
antoniogamiz: plus you're working in D#2739 already, right? 17:32
synopsebot D#2739 [open]: github.com/perl6/doc/issues/2739 [docs][new] Document Range.new and revise other methods in Range.
antoniogamiz I was working on the mini-doc project. I'm also trying to close #2739
17:32 andrzejku joined
antoniogamiz jmerelo: yep 17:32
jmerelo antoniogamiz: the mini-doc is important. 17:33
I'd like to get rid of the disambiguation files, for instance, but not before having something to test the new thing on. They might be used for something else we have no idea about.
antoniogamiz I already have a "complete subset", I'm working now to change the links 17:34
jmerelo: I take note, when I finish I will try that
jmerelo antoniogamiz: create issues on the repo you're working, so that we can comment or help you if needed.
antoniogamiz that's already done :)
17:37 lucasb left
jmerelo antoniogamiz: starting with the whole set might be more difficult than starting from a small set and adding stuff. There's a lot of things, like the Dockerfile, you are not vely likely to need 17:37
antoniogamiz: I would get rid of all that stuff first, so that they don't get in the way.
whole directories like writing-docs and resources are not going to be needed either. 17:38
antoniogamiz ah ok, I will remove all of that
jmerelo And tests and scripts like htmlify.p6 neither. it's better to use the originals always.
antoniogamiz ok, thanks for the info :) 17:40
17:41 khisanth_ joined
antoniogamiz i did not know milestones at all :oooo 17:42
jmerelo antoniogamiz: the curricula in the university you are attending has a way to go... 17:43
timotimo: there are 22 issues in the perl6.org repo. One of yours is from 2015 17:46
nine pmurias: that's something I've thought about, too. ORMs actually provide 2 services: an OO window into data and a way to compose queries. With all the statistics work I do lately, I'm really just after the second part. 17:47
jmerelo timotimo: maybe we should do a perl6.org hackathon...
17:48 ufobat joined
ufobat could someone please explain this to me? 17:48
jmerelo ufobat: "this" is a demonstrative pronoun
ufobat so it is!
m: role Foo {}; my $o = 1; sub mix-it-in(*%attr) { my $o = %attr<object>; for %attr<does> -> $role { say $role; $o does $role}}; mix-it-in(object => $o, :does(Foo))
camelia (Foo)
Cannot mix in non-composable type Foo into object of type Int
in sub mix-it-in at <tmp> line 1
in block <unit> at <tmp> line 1
ufobat m: role Foo {}; my $o = 1; sub mix-it-in(*%attr) { my $o = %attr<object>; for %attr<does> -> $role { say $role; $o does $role}}; mix-it-in(object => $o, :does(Foo,))
camelia (Foo)
ufobat what about that? 17:49
:D
jmerelo ufobat: that is a naughty comma
ufobat i dont see why it makes a difference, because in the for loop the say $role does always print the same: (Foo) 17:51
jmerelo ufobat: I want to say it's a case of LTA error.
m: role Foo {}; my $o = 1; sub mix-it-in(*%attr) { my $o = %attr<object>; for %attr<does> -> $role { say $role.perl; $o does $role}}; mix-it-in(object => $o, :does(Foo,)) 17:53
camelia Foo
jmerelo m: role Foo {}; my $o = 1; sub mix-it-in(*%attr) { my $o = %attr<object>; for %attr<does> -> $role { say $role.perl; $o does $role}}; mix-it-in(object => $o, :does(Foo))
camelia Foo
Cannot mix in non-composable type Foo into object of type Int
in sub mix-it-in at <tmp> line 1
in block <unit> at <tmp> line 1
jmerelo ufobat: really beats me. Try Stackoverflow? 17:56
m: role Foo {}; my $o = 1; sub mix-it-in(*%attr) { my $o = %attr<object>; for %attr<does> -> $role { say $role.^name; $o does $role}}; mix-it-in(object => $o, :does(Foo)) 17:57
camelia Foo
Cannot mix in non-composable type Foo into object of type Int
in sub mix-it-in at <tmp> line 1
in block <unit> at <tmp> line 1
jmerelo m: role Foo {}; my $o = 1; sub mix-it-in(*%attr) { my $o = %attr<object>; for %attr<does> -> $role { say $role.^name; $o does $role}}; mix-it-in(object => $o, :does(Foo,))
camelia Foo
jmerelo m: role Foo {}; my $o = 1; sub mix-it-in(*%attr) { my $o = %attr<object>; for %attr<does> -> $role { say $role.^name; $o does $role; say $o.^name}}; mix-it-in(object => $o, :does(Foo,)) 17:58
camelia Foo
Int+{Foo}
jmerelo m: role Foo {}; my $o = 1; sub mix-it-in(*%attr) { my $o = %attr<object>; for %attr<does> -> $role { say $role.^name; $o does $role; say $o.^name}}; mix-it-in(object => $o, :does(Foo))
camelia Foo
Cannot mix in non-composable type Foo into object of type Int
in sub mix-it-in at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo is this about ints and the int cache? 18:01
bisect: role Foo {}; my $o = 1; sub mix-it-in(*%attr) { my $o = %attr<object>; for %attr<does> -> $role { say $role.^name; $o does $role; say $o.^name}}; mix-it-in(object => $o, :does(Foo)) 18:02
bisectable6 timotimo, On both starting points (old=2015.12 new=b2e72d6) the exit code is 1 and the output is identical as well
timotimo, Output on both points: «Foo␤Cannot mix in non-composable type Foo into object of type Int␤ in sub mix-it-in at /tmp/WkAKDpV9mZ line 1␤ in block <unit> at /tmp/WkAKDpV9mZ line 1␤␤»
timotimo bisect: role Foo {}; my $o = 1; sub mix-it-in(*%attr) { my $o = %attr<object>; for %attr<does> -> $role { say $role.^name; say ($o but $role).^name }}; mix-it-in(object => $o, :does(Foo)) 18:03
bisectable6 timotimo, On both starting points (old=2015.12 new=b2e72d6) the exit code is 1 and the output is identical as well
timotimo, Output on both points: «Foo␤Cannot mix in non-composable type Foo into object of type Int␤ in sub mix-it-in at /tmp/Xd2GSUSqE0 line 1␤ in block <unit> at /tmp/Xd2GSUSqE0 line 1␤␤»
ufobat if my $o is no int it's the same, timotimo? 18:06
timotimo is that a question? 18:13
18:13 zacts left 18:14 antoniogamiz left
ufobat could you explain "<timotimo> is this about ints and the int cache?" to me? 18:15
jmerelo ufobat: the only difference I see is that the first Foo is the result of calling pull-one on Foo.Iterator, while the second is simply Foo. Both look the same, maybe they are not the same. 18:18
m: my role A {}; say A === A.Iterator.pull-one 18:20
camelia No such method 'Iterator' for invocant of type 'A'
in block <unit> at <tmp> line 1
jmerelo m: my role A {}; say A === A.iterator.pull-one 18:21
camelia False
jmerelo m: my role A {}; say A.iterator.pull-one
camelia (A)
jmerelo m: my role A {}; say A.iterator.pull-one; say (A) === A.iterator.pull-one
camelia (A)
False
ufobat shrugs 18:22
jmerelo ufobat: is that a "don't care" shrug or "I knew" shrug or a shivering shrug? 18:23
18:23 ayerhart left
ufobat what is a shivering shrug? 18:23
i am not feeling cold 18:24
jmerelo ufobat: it's the one you use to shake the chill off. You shrug, then you shiver a little tiny bit.
ufobat it's a shrug that you could compare with a sigh :)
jmerelo m: my role A {}; my $o = 1; $o does A; 18:25
camelia ( no output )
ufobat this evening i am expecting a scheme book :) but the delivery service wasnt here, yet :( 18:26
jmerelo m: my role A {}; my $o = 1; $o does A.iterator.pull-one
camelia Cannot mix in non-composable type A into object of type Int
in block <unit> at <tmp> line 1
jmerelo He
ufobat jmerelo++!
jmerelo ufobat: that golfs it. It does not explain it... 18:27
18:27 ayerhart joined 18:28 mowcat joined
ufobat but 18:29
m: role A {}; A.HOW.say; A.iterator.pull-one.HOW.say
camelia Perl6::Metamodel::ParametricRoleGroupHOW.new
Perl6::Metamodel::ClassHOW.new
jmerelo ufobat: ah, right. I should have known that. 18:30
18:30 domidumont left
ufobat so is it a bug? 18:30
jmerelo m: role A {}; role A[::T] {}; A.HOW.say; A.iterator.pull-one.HOW.say 18:31
camelia Perl6::Metamodel::ParametricRoleGroupHOW.new
Perl6::Metamodel::ClassHOW.new
jmerelo ufobat: apparently, it's punning the role. Not sure it's a bug.
ufobat m: role A {}; (A, ).iterator.pull-one.HOW.say
camelia Perl6::Metamodel::ParametricRoleGroupHOW.new
ufobat m: role A {}; (A).iterator.pull-one.HOW.say 18:32
camelia Perl6::Metamodel::ClassHOW.new
jmerelo ufobat: it's A the role vs. A the auto-punned class
ufobat: that explains that they have the same name and that it's not composable. 18:33
Apparently, punning happens when a role is used as a type object... so it might be spec 18:35
so that's the explanation
18:37 jmaslak joined
jmerelo hi, jmaslak ! 18:39
doing well?
jmaslak Okay, so I've been on and off drugs this week so am not sure if I stumbled upon a bug or not. 18:41
Mostly golfed, but here's what I found: gist.github.com/jmaslak/b5820c5c2f...034a70340d
I'm doing reasonably well, enough so to try to report a bug, if it looks like it is one. :)
(I *always* have programmed while sick my entire life) 18:42
jmerelo jmaslak: like 14 might not do what you want it to do.
jmaslak fair enough, albeit the logic is mostly nonsense in this after being stripped down to the smallest chunk that gives the error
The error is line 18 18:43
(the message references the code before I added the error message to the comment - doh)
18:49 gfldex joined
jmerelo jmaslak: $potential is empty each time 18:49
jmaslak: leaving now for dinner. Maybe ask in Stackoverflow? Also, take care. 18:51
ufobat <jmerelo> Apparently, punning happens when a role is used as a type object... so it might be spec <- but that doesn't explain why it's not happening if you start with (Role,) 18:52
jmerelo In that case it's just a role 18:53
ufobat ah.. (A) is not a list 18:54
18:54 jmerelo left 19:04 Manifest0 left 19:08 pmurias left 19:09 Manifest0 joined 19:13 zacts joined 19:14 Manifest0 left 19:17 jmaslak left 19:20 Manifest0 joined
MasterDuke .ask pmurias have you seen news.ycombinator.com/item?id=19875335 ? seems like something you might be interested in 19:23
yoleaux MasterDuke: I'll pass your message to pmurias.
19:25 pmurias joined 19:30 zacts left, khisanth_ left 19:32 espadrine_ left 19:40 Manifest0 left 19:41 mowcat left 19:44 arkaitz left 19:46 Manifest0 joined 19:48 zacts joined, khisanth_ joined 19:55 dolmen joined 19:58 espadrine_ joined 20:08 ufobat_ joined 20:12 ufobat left
Xliff
.oO( Methinks it's time for a beer )
20:17
yoleaux 06:46Z <holyghost> Xliff: ssh hangs, maybe the ip changed ? 54.90.70.61
07:11Z <holyghost> Xliff: ssh does not ask for a public key password, it just hangs
20:18 zacts left
Xliff ,tell holyghost I had to get a permanent IP from amazon, so it changed. Please read your emails for the new one, 20:18
20:18 zacts joined 20:19 dolmen left 20:24 Manifest0 left 20:28 dolmen joined 20:29 DrForr left 20:30 Manifest0 joined, DrForr joined 20:37 lizmat joined
nine Ha! Getting there :) SQL::Statement::Select.new( :select-list( SQL::Statement::Asterisk.new), :table-expression( SQL::Statement::TableExpression.new( :from-clause( SQL::Statement::FromClause.new( :table-references( SQL::Statement::TableReference.new( :table(SQL::Statement::TableOrQueryName.new(:name<customers>)),),),)),)),).sql.say 20:38
SELECT * FROM customers
20:38 Kaiepi left
timotimo i wasn't aware you were working on this :) 20:38
20:44 lichtkind joined 20:48 Manifest0 left
nine SQL::Statement::Select.new( :select-list( SQL::Statement::Asterisk.new), :table-expression( SQL::Statement::TableExpression.new( :from-clause( SQL::Statement::FromClause.new( :table-references( SQL::Statement::TableReference.new( :table( SQL::Statement::DerivedTable.new( :correlation_name<c>, :subquery( SQL::Statement::Subquery.new( :query( SQL::Statement::Select.new( :select-list( 20:50
DrForr Oof, I was planning to work along similar lines...
nine SQL::Statement::Asterisk.new), :table-expression( SQL::Statement::TableExpression.new( :from-clause( SQL::Statement::FromClause.new( :table-references( SQL::Statement::TableReference.new( :table(SQL::Statement::TableOrQueryName.new(:name<customers>)),))))))))))))),),)),)),).sql
SELECT * FROM (SELECT * FROM customers ) AS c 20:51
Now that ^^^ is something DBIx::Class just cannot do...
timotimo can you please `constant S = SQL::Statement`? :)
nine Yeah, this needs lots of sugar... 20:52
20:53 molaf joined
timotimo use Slang::SQL 20:53
nine I actually have a patched Grammar::BNF that can successfully parse ronsavage.github.io/SQL/sql-2003-2.bnf.html with the goal of converting that to a Perl 6 grammar 20:54
timotimo neato
20:55 Manifest0 joined, dolmen left
lizmat is tired after a long day at T-Dose and goes to bed& 20:56
timotimo rest well!
21:03 zacts left, vrurg left
nine I think in order to accomodate different flavours of SQL as implemented by databases, it'll be wise to keep the stringification methods out of these AST classes and put them into an SQL::Generator. This will just have multi candidates for all the AST classes which can be overridden or inherited as needed. 21:06
21:06 lembark joined
nine That'll probably make it easier to collect values for the placeholders anyway. 21:08
21:08 andrzejku left
Xliff nine: So that IS an AST! 21:09
21:09 arkaitz joined
Xliff nine: How much of the parsing is done? 21:11
nine Xliff: as mentioned above I plan to generate the parser from the official BNF. I can already parse that BNF 21:12
DrForr In ANTLR I have a set of separate Actions that generate Perl, I was figuring i could use a different set to generate something like BNF or whatever it was. 21:13
Xliff nine: OK. So we should try and pool resources, then.
github.com/Xliff/perl6-Parser-Sql <- For MySQL. 21:14
Would make a lot of sense to use yours as a base.
21:14 dolmen joined
Xliff However, I am coding mine by hand. I had no idea there was a BNF out for SQL-2003. 21:14
nine duckduckgo found it for me :) 21:15
Xliff LOL
timotimo he came, he ducked, he went
Xliff I was specifically looking for a railroad diagram.
DrForr ANTLR's test suite has {89,92,2003} SQL BNF grammars, I believe.
21:16 zacts joined 21:17 Sgeo left
Xliff /0\ 21:17
.oO( Now I know what that sudden "I could have had a V8" moment feel like )
nine Yep, the multi method thing works 21:24
21:24 _jrjsmrtn left, zacts left, __jrjsmrtn__ joined
nine Pushed the stuff to github.com/niner/SQL-Statement 21:27
Good night! 21:28
timotimo gnite nine
21:36 arkaitz left 21:37 Manifest0 left 21:39 Sgeo joined 21:42 Manifest0 joined 21:43 Sgeo_ joined 21:44 Sgeo left 21:49 Manifest0 left 21:50 dolmen left 21:54 Manifest0 joined 21:55 zacts joined 22:05 Sgeo joined 22:07 Sgeo_ left 22:15 |oLa| joined 22:17 Manifest0 left 22:22 Manifest0 joined 22:26 Manifest0 left, zacts left 22:31 dolmen joined, Manifest0 joined 22:37 Manifest0 left 22:43 Manifest0 joined, nadim left 22:49 zacts joined, Manifest0 left 22:54 Manifest0 joined 22:56 Kaiepi joined 23:01 Manifest0 left 23:03 pecastro left 23:06 vrurg joined, Manifest0 joined 23:08 adu joined
xinming pmurias: ping 23:12
23:13 arkaitz joined
xinming pmurias: Do you have idea how we import perl6 module into nodejs? Or it's not available ATM yet? 23:14
23:23 dolmen left 23:29 Manifest0 left 23:30 zacts left 23:31 pmurias left 23:34 Manifest0 joined 23:43 arkaitz left 23:49 Manifest0 left 23:52 skids joined 23:54 Manifest0 joined 23:55 rindolf left