»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
ugexe | maybe method native-descriptor needs to be added to IO::Pipe itself | 00:01 | |
skids | .native-descriptor is a recent add, and may only have been done for sockets. | ||
commit a819231 | |||
00:01
autarch left,
BenGoldberg joined
|
|||
ugexe | you could try passing in your own IO::Handle to :in | 00:02 | |
rudi_s | ugexe: ? | ||
ugexe | my $handle = IO::Handle.new(whatever); run @cmd, :in($handle); | 00:03 | |
as in, maybe if you create the handle yourself instead of letting Proc do it in .new that the native-descriptor might end up working | |||
just a wild guess though | 00:04 | ||
00:05
autarch joined
|
|||
awwaiid | What is a control exception? | 00:07 | |
skids | Things like the "next" in loop { next } use the exeception mechanism to do their work. At least, virtually... the optimizer could remove that. | 00:09 | |
Basically anything that does not fall off the bottom of a brace. | |||
Hrmph. nqp::filenofh(nqp::getattr(nqp::decont($p.in), IO::Handle, "\$!PIO")) is also -1. | 00:10 | ||
rudi_s | skids: Hm. Is this a bug in moar/jvm? | 00:11 | |
skids | I dunno. The nqp::getattr does return an MVMOSHandle. But actually seeing what's in it is difficult. | 00:12 | |
00:15
johndau joined
|
|||
skids | Note that "pipes" on windows are strange ISTR. | 00:16 | |
00:16
zpmorgan joined
|
|||
rudi_s | Hm. The moarvm implements it for syncfile and syncstream. Not sure if this includes pipes. | 00:18 | |
(On the other hand IO::Pipe is a IO::Handle with no special cases.) | 00:19 | ||
Ah, the pipe-fh comes from syncpipe.c. | 00:21 | ||
jnthn: ^ - would it be possible to implement the MVMIOIntrospection also for syncpipe.c and if yes would it be much work or can one just add the &introspection to the op_table and it just works? | 00:23 | ||
skids | Likely he | ||
s alseep you may want to .tell | 00:24 | ||
rudi_s | .tell jnthn Would it be possible to implement the MVMIOIntrospection also for syncpipe.c and if yes would it be much work or can one just add the &introspection to the op_table and it just works? - The idea is to support .native-descriptor also for pipes, e.g. when using run(). | ||
yoleaux | rudi_s: I'll pass your message to jnthn. | ||
rudi_s | skids: Thanks. | ||
BenGoldberg | If, on windows, you want something *like* a pipe, but which select() will work on, use socketpair, then use shutdown to make one end read-only and the other write-only. If you don't need select() for readability, then please ignore me ;) | 00:27 | |
00:29
tmch joined
|
|||
rudi_s | (I don't care about windows, but thanks.) | 00:30 | |
00:41
rindolf left
00:49
tmch left
00:54
yeahnoob joined
00:55
labster left
01:02
acrussell joined
|
|||
dalek | kudo-star-daily: 38f4aae | coke++ | log/ (9 files): today (automated commit) |
01:06 | |
01:24
perlawhirl joined
01:33
grondilu left
01:34
grondilu joined
|
|||
nadim | what's a cleanway to flip flop between two string,preferably held within the same variable/oject | 01:34 | |
skids | you mean on each read a different string is returned? | 01:36 | |
nadim | yes | ||
or a circular buffer | 01:37 | ||
skids remembers an IRC conversation about a true/false flipflop. | |||
nadim | I've seen something too but can't remember what | 01:38 | |
ugexe | ff ? | ||
skids | Well, not a "flip flop" exactly | 01:39 | |
There was a golfing contest for a variable that returned 0 and 1 on alternate reads. | |||
grondilu | m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" }; my $text is flicking; say $text; say $text; | 01:40 | |
camelia | rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wcjJmjqEHOis trait on $-sigil variable not yet implemented. Sorry. at /tmp/wcjJmjqEHO:1------> 3"flip" !! "flop" }; my $text is flicking7⏏5; say $text; say $text; expecting any of: …» | ||
grondilu | m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" }; my $text; $text does flicking; say $text; say $text; | ||
camelia | rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/00ub7NNIgrMissing blockat /tmp/00ub7NNIgr:1------> 3ext does flicking; say $text; say $text;7⏏5<EOL>» | ||
skids | Heheh. Checting though with an implicit .Str | 01:41 | |
grondilu | m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" }; my $text = Str but flicking; say $text; say $text; | ||
skids | *Cheating | ||
camelia | rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3IEgslkBSgMissing blockat /tmp/3IEgslkBSg:1------> 3 Str but flicking; say $text; say $text;7⏏5<EOL>» | ||
01:41
gfldex left
|
|||
grondilu | m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" } }; my $text = Str but flicking; say $text; say $text; | 01:41 | |
camelia | rakudo-moar 69426b: OUTPUT«(Str+{flicking})(Str+{flicking})» | ||
grondilu | m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" } }; my $text = "" but flicking; say $text; say $text; | 01:42 | |
camelia | rakudo-moar 69426b: OUTPUT«» | ||
grondilu | m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" } }; my $text = "" but flicking; say ~$text; say ~$text; | ||
camelia | rakudo-moar 69426b: OUTPUT«» | ||
grondilu gives up | |||
nadim | hehe! | ||
grondilu | m: print role { method Str { "duh" } }.new | 01:43 | |
camelia | rakudo-moar 69426b: OUTPUT«duh» | ||
grondilu | m: print role { method Str { state "duh" } }.new | ||
camelia | rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mu0H6NzrDAMalformed stateat /tmp/mu0H6NzrDA:1------> 3print role { method Str { state7⏏5 "duh" } }.new» | ||
grondilu | m: my $str = role { method Str { state $++ %% 2 ?? "one" !! "two" } }.new; print $str for ^5; | 01:44 | |
camelia | rakudo-moar 69426b: OUTPUT«onetwoonetwoone» | ||
skids | I would suggest a Proxy, but unfortunately, FETCH gets called extra times in the current implementation. | 01:47 | |
01:53
kid51 left,
labster joined
02:11
Sqirrel left
02:12
kalkin-_ joined
02:16
kalkin- left
02:17
sufrostico left
02:26
johndau left,
johndau` joined
02:28
johndau` left
02:29
johndau joined,
vendethiel joined
02:31
Actualeyes left
02:44
Actualeyes joined
02:47
jolts left
02:54
vendethiel left
03:16
Sqirrel joined
03:23
Upasaka_ joined,
Timbus_ joined,
Upasaka_ left
03:24
peter joined,
peter is now known as Guest51674
03:26
Upasaka left
03:27
Upasaka joined
03:29
cdg left
03:30
Timbus left,
alpha123 left
03:38
Actualeyes left
03:39
Actualeyes joined
03:42
noganex joined
03:45
noganex_ left
03:50
molaf joined
03:58
BenGoldberg left
04:11
cpage_ left
04:23
araujo_ left
04:25
wamba joined
04:41
molaf left
04:47
rickbike joined,
cpage_ joined,
davido joined
04:57
rickbike left
05:05
John[Lisbeth] left
05:09
jdliver joined
05:10
yqt left
05:19
notbenh left
05:28
wamba left
05:36
perlawhirl left
05:46
johndau` joined
05:49
johndau left,
johndau` left
05:50
|Sno| joined,
johndau joined
05:51
davido left
05:52
[Sno] left
05:53
Timbus_ left,
Timbus joined,
Cabanossi left
05:54
khw left
05:55
Cabanossi joined
05:56
zpmorgan left,
Spot__ left,
pnu left,
dalek left,
solarbunny left,
baest left
05:59
labster left,
labster joined
06:01
skids left
06:02
zpmorgan joined,
Spot__ joined,
pnu joined,
dalek joined,
solarbunny joined,
baest joined,
WAAEBUL joined,
leguin.freenode.net sets mode: +v dalek
06:15
jdliver left
|
|||
sortiz | m: use NativeCall; sub free(Pointer) is native() { * }; free(Pointer); | 06:18 | |
camelia | ( no output ) | ||
[ptc] | timotimo: wrt: the Num/Rat question. I know that 1234/56 is a Rat, however both 1234.56 and 1234/56 are numbers of some sort. Maybe I meant really Numeric... | 06:29 | |
timotimo: which then brings me to the real question: is it possible to say in a regex "match a Numeric-looking thing"? | 06:30 | ||
06:30
cdg joined
06:35
cdg left
06:40
musiKk_ joined
|
|||
[ptc] | timotimo: oops, it seems you answered the question earlier this morning. Sorry! | 06:50 | |
07:04
domidumont joined
07:09
domidumont left,
pdcawley joined,
domidumont joined
|
|||
nine | .tell mst The 13 seconds for loading Inline::Perl6 are mostly spent on compiling Inline::Perl5 which cannot be precompiled currently. So actually my work in that area will directly benefit Inline::Perl5 and ::Perl6 :) | 07:09 | |
yoleaux | nine: I'll pass your message to mst. | ||
07:10
zpmorgan left,
Spot__ left,
pnu left,
dalek left,
solarbunny left,
baest left
|
|||
nine | .tell ilmari the REPL locking bug is already fixed on the relocatable-precomp branch | 07:18 | |
yoleaux | nine: I'll pass your message to ilmari. | ||
07:18
CIAvash joined,
darutoko joined
07:19
pdcawley left,
pdcawley joined
07:21
zpmorgan joined,
Spot__ joined,
pnu joined,
dalek joined,
solarbunny joined,
baest joined,
WAAEBUL joined,
leguin.freenode.net sets mode: +v dalek
|
|||
a3r0 | ~. | 07:23 | |
07:29
nakiro joined
07:47
zpmorgan left,
Spot__ left,
pnu left,
dalek left,
solarbunny left,
baest left
07:49
buharin joined
07:54
zpmorgan joined,
Spot__ joined,
pnu joined,
dalek joined,
solarbunny joined,
baest joined,
WAAEBUL joined,
leguin.freenode.net sets mode: +v dalek,
yeahnoob left
|
|||
sortiz | .tell lizmat Something is broken in commit 69426bd, with *some* calls, somehow $lib2mangler remains undefined, that results in "This type does not support associative operations … in method setup at … line 276 … in method CALL-ME … line 294"" | 08:05 | |
yoleaux | sortiz: I'll pass your message to lizmat. | ||
08:23
jsimonet1 left
08:25
jsimonet joined,
pdcawley left
|
|||
dalek | rl6-examples/fix-dbi-sql-test: 2f07ded | paultcochrane++ | .travis.yml: Try installing sqlite It could be that the dbi-sql script needs sqlite to be installed before it can run correctly. |
08:27 | |
sortiz | .tell lizmat Trying the binding of nqp::hash at the $lib2mangler declaration, the *same* error is generated early, at rakudo's 'make test', I don't understand why :-( | 08:28 | |
yoleaux | sortiz: I'll pass your message to lizmat. | ||
08:30
kjs_ joined,
geekosaur left
08:31
geekosaur joined
|
|||
[Tux] | test 22.132 | 08:31 | |
test-t 12.746 | |||
csv-parser 52.734 | |||
08:32
gfldex joined
|
|||
nadim | Morning all | 08:33 | |
my (@sub_elements, %glyphs) = some_sub(...) how do I get @sub_elements to not grab everything? | 08:34 | ||
08:34
fireartist joined
08:35
cpage left
|
|||
nadim | := hmmm | 08:35 | |
It's going to take 100 years to learn | 08:36 | ||
08:36
cpage joined
08:37
firstdayonthejob left,
dakkar joined
08:39
wamba joined
08:41
zakharyas joined
08:43
kjs_ left
08:50
cpage left
08:51
araujo joined,
araujo left,
araujo joined
08:52
araujo left,
cpage joined,
araujo joined
|
|||
dalek | rl6-examples/fix-dbi-sql-test: f56a7ae | paultcochrane++ | .travis.yml: Back out the sqlite installation ... it didn't get travis to run the dbi-sql script, so the change can go. |
08:52 | |
rl6-examples/fix-dbi-sql-test: d919e8f | paultcochrane++ | categories/cookbook/14database-access/14-09-dbi-sql.pl: Use the connect calling style from DBIish docs |
|||
08:55
Azry left
08:58
Azry_ joined
09:06
RabidGravy joined
09:08
buharin left
|
|||
tadzik | itz_stmuk++ # nice talk, running the examples now :) | 09:09 | |
09:09
tmch joined
|
|||
masak | yes, itz++ | 09:10 | |
moritz | stmuk++ | ||
masak | _++ | ||
09:11
buharin joined
09:13
brrt joined
|
|||
[ptc] | stmuk++ | 09:14 | |
09:14
integral left
|
|||
Woodi | so, any place to gat that (and other) slides ? # nine++ :) | 09:16 | |
moritz | Woodi: act.yapc.eu/gpw2016/schedule has links to talks (and other days), and some of the talks have links to slides | ||
I've asked the speakers to upload their slides, though stmuk might not have gotten around to it yet | 09:17 | ||
dalek | rl6-examples/fix-dbi-sql-test: 3450c31 | paultcochrane++ | .travis.yml: Try installing sqlite3 ... instead of just sqlite |
09:19 | |
09:21
integral joined
|
|||
tadzik 's lightnink talk slides' interesting part was the one that said "(Live demo here)" :P | 09:21 | ||
masak | tadzik: guess those of us who missed it'll have to wait for the video ;) | 09:26 | |
masak 's talks are now online as slide PDFs at act.yapc.eu/gpw2016/talk/6517 and act.yapc.eu/gpw2016/talk/6496 | |||
tadzik | masak: I can show you on the coffee break :) | 09:27 | |
but I'm also planning to write a blog toast on it | |||
moritz | masak++ | ||
masak | tadzik: yes, please! private demo | 09:28 | |
I've heard excited whispers about "sixify", so my expectations are high :P | |||
tadzik | :D | 09:29 | |
so it's settled, there'll be a lightning talk showing | |||
09:41
zhmylove left,
zhmylove joined
09:43
[ptc] left
09:44
matt_ joined,
matt_ is now known as Guest88249
09:49
rindolf joined
|
|||
lizmat | . | 09:50 | |
yoleaux | 08:05Z <sortiz> lizmat: Something is broken in commit 69426bd, with *some* calls, somehow $lib2mangler remains undefined, that results in "This type does not support associative operations … in method setup at … line 276 … in method CALL-ME … line 294"" | ||
08:28Z <sortiz> lizmat: Trying the binding of nqp::hash at the $lib2mangler declaration, the *same* error is generated early, at rakudo's 'make test', I don't understand why :-( | |||
09:50
nakiro left
|
|||
lizmat | .tell sortiz make test has always been clean for me: do you have an example that consistently fails? | 09:51 | |
yoleaux | lizmat: I'll pass your message to sortiz. | ||
09:53
Sqirrel left
09:54
Sqirrel joined
10:00
johndau left
10:02
nakiro joined
10:06
pdcawley joined
10:07
FROGGS joined
10:08
pmurias joined
|
|||
pmurias | masak: what's sixify? | 10:08 | |
tadzik | a lie :) | 10:10 | |
I used it on my lightning talk, "I'm now going to port this thing to perl 6: 'sixify'" | 10:11 | ||
but it was just an alias to 'git stash pop &> /dev/null' :P | |||
arnsholt | =D =D =D | 10:12 | |
jnthn | masak: I'd love to know the story between the Brazil/Argentina correction slide :D | ||
yoleaux | 00:24Z <rudi_s> jnthn: Would it be possible to implement the MVMIOIntrospection also for syncpipe.c and if yes would it be much work or can one just add the &introspection to the op_table and it just works? - The idea is to support .native-descriptor also for pipes, e.g. when using run(). | ||
10:19
[ptc] joined
|
|||
jnthn | .tell rudi_s It shouldn't be much harder than just filling in that entry in the op_table | 10:20 | |
yoleaux | jnthn: I'll pass your message to rudi_s. | ||
brrt | yeah, i was curious about that too | 10:32 | |
lizmat | m: use nqp; my @s = "a".comb(1); nqp::join("::",nqp::getattr(@s,List,q/$!reified/)) # what am I missing?? | 10:33 | |
camelia | rakudo-moar 69426b: OUTPUT«This type cannot unbox to a native string in block <unit> at /tmp/wg0OltfJmO line 1» | ||
RabidGravy | it turns out that it helps to have the microphone volume turned up when testing recording | 10:34 | |
jnthn | lizmat: Scalars | ||
lizmat | so I need to decont ? | ||
jnthn | Yeah...see the code in (or just use? :)) the Perl 6 join | 10:35 | |
Better just use Perl 6's join and we can put our efforts into optimizing that... | |||
lizmat | okidoki :-) | 10:36 | |
masak | jnthn: guess you had to be there :) | 10:38 | |
jnthn | heh, then I'll go with assuming you said Argentina and put up a map of Brazil :D | ||
lizmat | m: v* # DIHWIDT ?? | 10:40 | |
camelia | rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vWBhqZVKCWMissing required term after infixat /tmp/vWBhqZVKCW:1------> 3v* # DIHWIDT ??7⏏5<EOL> expecting any of: prefix term» | ||
lizmat | m: v+ # DIHWIDT ?? | 10:41 | |
camelia | rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DOIboYhDvsMissing required term after infixat /tmp/DOIboYhDvs:1------> 3v+ # DIHWIDT ??7⏏5<EOL> expecting any of: prefix term» | ||
lizmat | m: dd Version.new(*) | ||
camelia | rakudo-moar 69426b: OUTPUT«Version.new('*')» | ||
lizmat | I guess that's why .perl of Version is not outputting v strings | ||
jnthn | lizmat: I'm not sure those are common enough to deserve the sugar... | ||
lizmat: It could be smart enough to do v-strings when it can | 10:42 | ||
lizmat | well, the only reason I can think of, is that it would make .perl better readable ? | ||
yeah, will look at that | |||
jnthn | And can we not call them v-strings? :P | 10:43 | |
lizmat | sorry, P5 leftover :-) | ||
Woodi | moritz: thanx | ||
jnthn | Yeah, just unfortunate if people google :P | ||
RabidGravy | but "special Version constructor syntax" is a bit of a mouthful ;-) | 10:46 | |
Woodi | .oO( hmm, no one thinked about slides for coffe break so far... ) |
||
10:52
Azry_ left
|
|||
ilmari | "version literal"? | 10:58 | |
yoleaux | 07:18Z <nine> ilmari: the REPL locking bug is already fixed on the relocatable-precomp branch | ||
RabidGravy | when did the CArray.new(@a) constructor come in? That has totally revolutionised my life | 11:00 | |
11:02
Upasaka left
|
|||
lizmat | RabidGravy: I think that was sortiz | 11:04 | |
dalek | rl6-examples/fix-dbi-sql-test: 5825851 | paultcochrane++ | .travis.yml: Try specifying a stable perl6 version |
||
lizmat | m: use lib # DIHWIDT :-) | ||
camelia | rakudo-moar 69426b: OUTPUT«===SORRY!===Cannot iterate object with P6opaque representation» | ||
jnthn | We could do with a better error for that :) | 11:05 | |
lizmat | yeah, will look at that | ||
jnthn: feels like it should actually be silent ? | |||
jnthn | "What lib, duh!" | ||
lizmat: It's probably a mistake not to specify a lib? | 11:06 | ||
11:06
Upasaka joined
|
|||
lizmat | did you mean "use lib 'lib'" | 11:06 | |
jnthn | Something like that | ||
masak .oO( use lib 'lib "lib"' ) | |||
RabidGravy | sortiz++ # totally revolutionised the thing | 11:07 | |
lizmat | .oO( enters doowop choir) |
||
RabidGravy | next up let's see if we can record from jack | 11:08 | |
11:08
pdcawley left
11:10
TEttinger left
|
|||
RabidGravy | (recording the sound of the computers fan isn't too interesting) | 11:11 | |
11:14
pdcawley joined
11:17
pmurias left
11:18
CIAvash left
|
|||
dalek | rl6-examples/fix-dbi-sql-test: 1e343a4 | paultcochrane++ | .travis.yml: Use stack version 2016.01 |
11:22 | |
11:26
sammers left
|
|||
masak | I have a case where I want to turn a `token statement:if` into a `rule statement:if` in my grammar | 11:27 | |
it works great, and I can remove all those pesky <.ws> calls when I do | |||
...but... | |||
suddenly this kind of input fails: "if 0 {\n}\nmy x" | |||
I've tracked that down to the fact that my `statement:if` rule gobbles too much whitespace after the "}", and then <.eat_terminator> doesn't work properly | 11:28 | ||
and I can "fix" the problem by removing absolutely all whitespace at the end of the rule, but that means I cannot indent the closing brace of the *rule* properly | |||
which seems like a high price to pay | |||
when I look at Rakudo's Grammar.npq, it does not seem to have this problem at all | 11:29 | ||
what am I missing? :) | |||
I tried using unspace, but that only crashed Rakudo with the internal error "Cannot find method 'rxtype'" | 11:30 | ||
moritz | masak: I'd think that <ws> shouldn't eat up a whitespace if it's significant for statement end detection | 11:32 | |
<.ws> is explicitly for *in*significant whitespace | |||
masak | hm, I *am* overriding the ws rule... | 11:33 | |
jnthn | masak: blockoid is a token | ||
masak: And it calls <?ENDSTMT> after parsing the } | 11:34 | ||
So we've already marked statement end | |||
moritz | masak: you could also use :!r within the rule to be able to indent the closing curly brace | ||
masak | jnthn: I see. 007 doesn't have the <?ENDSTMT> mechanism, though. | ||
jnthn: in fact, this is the first I hear/learn about it :) | |||
moritz: ooh, I'll try that | 11:35 | ||
jnthn | masak: It's the mechanism that makes } always be a statement end | ||
Well, } \n I guess | |||
masak | aye | ||
something to look into in the long run | |||
11:36
espadrine_ joined,
espadrine_ is now known as espadrine
|
|||
masak | moritz: doesn't :r have to do with ratcheting semantics, though? | 11:36 | |
not sigspace? | |||
jnthn | Yeah | 11:37 | |
:!s | |||
moritz | erm, yes | ||
sorry | |||
masak | I already tried :!s, and it had no effect | ||
11:37
brrt left
|
|||
moritz | we use :!s in Perl6::Grammar, so it shouldn't be totally broken | 11:38 | |
jnthn | Where did you try it? | ||
moritz | masak: did you put a whitespace before it? :-) | ||
jnthn | Yeah, that's what I was wondering ;-) | ||
moritz | I hope not | ||
masak | :) | ||
I didn't, I put it right where I had to put the "}" of the rule | |||
it *does* work if I put it before the whole optional `else` group | 11:39 | ||
11:39
sammers joined
|
|||
masak | but I fear that eliminates an implicit <.ws> inside it that I actually wanted | 11:39 | |
bah | 11:41 | ||
I'll just keep it as `token` for now | 11:42 | ||
I suspect moritz is right, and I brought this on myself by having a too-simple `ws` rule | |||
but that also means that that's where I ought to fix it... some other time | |||
11:48
labster left
11:51
Azry_ joined
|
|||
dalek | pan style="color: #395be5">perl6-examples: 8c950e5 | paultcochrane++ | .travis.yml: Use perl6 stack version 2016.01 This gives a stable moar/nqp/rakudo version upon which to test the examples, based upon the 6.c perl6 version. |
11:51 | |
[ptc] | masak: thanks for the tip about the perl6 version. It turned out that by using a bleading edge version showed up the same error on my machine and not only on travis. | 11:54 | |
masak | [ptc]: \o/ | ||
"environment -- the silent killer" :D | |||
nine | tadzik: your segfault is due to "Can't undef active subroutine" which kind of makes sense. We're still inside a Perl 5 subroutine while trying to tear down the interpreter. | 11:56 | |
11:57
pdcawley left
|
|||
tadzik | right | 11:57 | |
awwaiid | nine: what is the use-case for the control { ... } catches in Inline::Perl5 (such as github.com/niner/Inline-Perl5/blob...pm6#L528)? | 12:01 | |
nine | awwaiid: they're for Inline::Perl6 actually. | 12:02 | |
12:04
jack_rabbit left
|
|||
awwaiid | nine: see... I expected you to say something like "well if you call 'next' in a p6 block that p5 is running, this will catch it for ... something" | 12:04 | |
12:09
kid51 joined
12:12
ridthyself joined
12:19
pmurias joined
|
|||
ridthyself | Good morning! I'm having trouble loading a module into the REPL. I run: perl6 -I test.pm6, but when i try to call the sub from the REPL, i get the error: Undeclared routine. | 12:21 | |
I run the REPL from the directory where the module is located. | |||
llfourn | ridthyself: -I is to load a lib path not a module | 12:22 | |
there is -M but I don't *think* that works with just any file | |||
ridthyself: you can do require "test.pm6"; as the first line which should work. | |||
ridthyself | failed: not a directory? | 12:23 | |
12:24
kjs_ joined
|
|||
llfourn | ridthyself: where do you get that error? I think require is the only way to do it. | 12:24 | |
perl6 -e 'require "Foo.pm6"' # should work | 12:25 | ||
ridthyself | it appears to work, but doesn't run the REPL, just compiles runs and closes | 12:26 | |
llfourn | ridthyself: right. So for the REPL you will simply need to type that as the first line. | ||
12:27
pdcawley joined
|
|||
llfourn | ridthyself: alternitvely you can put it into a directory called "lib" and do perl6 -Ilib -MFoo # and then you will have your module already loaded | 12:27 | |
of course it doesn't have to be called "lib" it's just convention :) | 12:28 | ||
jnthn | If it's in the current directory then -I. -MFoo would work too | ||
llfourn | ^ that's probably easiest then | 12:29 | |
ridthyself | THAT WORKS! | 12:30 | |
llfourn | \o/ | 12:31 | |
ridthyself | the file in the current directory is test.pm6. I ran perl6 -I. -Mtest and it worked. Thank you, ever so much | ||
so perl is an anagram for REPL... coincidence? | 12:33 | ||
llfourn | I'd say so :P | ||
DrForr_ | Yep. | 12:34 | |
12:34
kid51 left
|
|||
ridthyself | thanks again, | 12:35 | |
12:36
ridthyself left
12:38
zpmorgan left
12:41
pmurias left
|
|||
Azry_ | Hi! I have this code : class IO::Pty is IO::Handle { submethod BUILD() { say self.perl; } } why is the result of this a "IO::Handle" and not a "IO::Pty" ? | 12:42 | |
12:43
abraxxa left
|
|||
Azry_ | also self.WHAT gives me (Pty) | 12:43 | |
12:46
mr-foobar left
|
|||
llfourn | m: class IO::Pty is IO::Handle { submethod BUILD() { say self.perl; } } | 12:47 | |
camelia | ( no output ) | ||
llfourn | m: class IO::Pty is IO::Handle { submethod BUILD() { say self.perl; } }; IO::Pty.new | ||
camelia | rakudo-moar 69426b: OUTPUT«IO::Pty is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting line 1 in method new at src/RESTRICTED.setting line 32 in block <unit> at /tmp/gfgsn7Kt7j line 1» | ||
llfourn | m: class IO::Foo is IO::Handle { submethod BUILD() { say self.perl; } }; IO::Foo.new | ||
camelia | rakudo-moar 69426b: OUTPUT«IO::Foo is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting line 1 in method new at src/RESTRICTED.setting line 32 in block <unit> at /tmp/rCP0S9GCZK line 1» | ||
Azry_ | i use it like that IO::Pty.new(path => "/dev/null"); | 12:48 | |
llfourn | m: class IO::Foo is Str { submethod BUILD() { say self.perl; } }; IO::Foo.new | ||
camelia | rakudo-moar 69426b: OUTPUT«""» | ||
tadzik | download.java.net/jdk9/docs/api/jav...V-K-V-K-V- I found this moderately amusing | ||
llfourn | m: class IO::Foo is Perl { submethod BUILD() { say self.perl; } }; IO::Foo.new | ||
camelia | rakudo-moar 69426b: OUTPUT«IO::Foo.new(compiler => Compiler.new(id => "D1585FFC2043CFF5D06D7C99A4A788099F9BB225.1457646626.73081", release => "", codename => "", name => "rakudo", auth => "The Perl Foundation", version => Version.new('2016.2.122.g.69426.bd'), signature => Blob, desc…» | ||
llfourn | m: class IO::Foo is Perl { submethod BUILD() { say self.^name; } }; IO::Foo.new | ||
camelia | rakudo-moar 69426b: OUTPUT«IO::Foo» | ||
12:48
mr-foobar joined
|
|||
lizmat | llfourn Azry_ : seems IO::Handle is hard-coded in IO::Handle.perl | 12:50 | |
llfourn | ah | ||
lizmat | PR's welcome | ||
otherwise I'll fix that in the next half hour or so | |||
llfourn | Azry_: so it's just cosemetic :) | ||
cosmetic* | 12:51 | ||
Azry_ | uh i don't understand =) PR ? | ||
llfourn | Azry_: Pull request on github if you want to help fix it :) | ||
Azry_ | ah uh i've never done that, any pointer where to look for it ? otherwise i'd like to see that commit =) | 12:52 | |
dalek | kudo/nom: 02122e5 | lizmat++ | src/core/Version.pm: Streamline Version creation / handling and fixes Makes it 10% (for v1.foo) to 36x faster (for v6) - use custom SET-SELF method for faster initialization - save parts as native list with deconted values (makes it truly immutable) - creates stringification at creation time (faster .perl/.gist/.Str) - shares instances for v6, v6.c, v, v*, v+ - outputs .perl as version string whenever possible |
||
lizmat | I'll do it now | ||
llfourn | lizmat++ | ||
Azry_: it's here: github.com/rakudo/rakudo/blob/nom/...le.pm#L782 # as you can see it's hardcoded | 12:53 | ||
DrForr_ | tadzik: Closed the issue, I was probably out-of-date. | ||
tadzik | DrForr_: sounded like that; thanks :) | 12:54 | |
12:54
Skarsnik joined
|
|||
dalek | kudo/nom: a2774a7 | lizmat++ | src/core/IO/Handle.pm: IO::Handle.perl|gist now a bit more subclass aware Spotted by Azry_++ and llfourn++ |
12:57 | |
Azry_ | llfourn: thank you very much =) i'll look into rakudo code a bit more now | 12:59 | |
*from now on | |||
13:00
geekosaur left
|
|||
llfourn | Azry_: ^ lizmat++ fixed it so if you rebuild you will get a sane .perl :) | 13:00 | |
13:00
geekosaur joined
|
|||
Azry_ | yes i saw that, thanks lizmat | 13:01 | |
[ptc] | m: use DBIish; | 13:03 | |
camelia | rakudo-moar 69426b: OUTPUT«===SORRY!===Could not find DBIish in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6 CompUnit::Repository::Abso…» | ||
13:03
perlawhirl joined
|
|||
nine | Is there a way to overwrite &exit in the dynamic scope? | 13:04 | |
Skarsnik | star-m: use DBIish; | ||
camelia | ( no output ) | ||
Skarsnik | wow old star x) | ||
llfourn | nine: you can't overwrite anything in dynamic scope apart from $* variables? | ||
nine | I need to anyway | 13:05 | |
llfourn | hmmm | ||
well I actually do do this in a project I have | |||
but I overwrite exit to do be sub exit(|args){ $*some-dynamic.exit(|args) } | 13:06 | ||
(lexically) | |||
13:07
molaf joined
|
|||
lizmat | perhaps we need to make sub exit look at $*EXIT for code to ectually execute ? | 13:09 | |
*actually | 13:10 | ||
but I'm not sure whether that would be 6.c, 6.c.1 or 6.d land | |||
moritz | why not simply die, when you want it to be interceptible? | ||
nine | Because tadzik decided to use exit in his code and I can't influence that :) | 13:11 | |
dalek | kudo/nom: c124e57 | lizmat++ | src/core/VM.pm: Streamline VM.platform-library-name a bit |
||
13:11
musiKk_ left
|
|||
llfourn | can we do signal trapping? | 13:12 | |
moritz | yes | ||
nine | Using exit in a Perl 6 callback called from Perl 5 code causes a segfault during cleanup of the Perl 5 interpreter because that still is inside a running subroutine | ||
lizmat | llfourn: exit / die / warn are not signals in the P6 world ? | ||
tadzik | :D | ||
moritz | die and warn are control exceptions | ||
lizmat | moritz: ah, yes... | 13:13 | |
duh -) | |||
perhaps exit should also be ? | |||
nine | If I could, I would actually replace exit with a sub that dies while we're inside Perl 5 code | ||
lizmat | nine: if sub exit would merely execute what is in $*EXIT, you would be in business, right ? | 13:15 | |
(and having PROCESS::<$EXIT> set to what sub exit now is) | 13:16 | ||
13:18
pdcawley left
13:19
buharin left
|
|||
jnthn | Could be &EXIT | 13:19 | |
moritz | star-m: say 'version?' | ||
camelia | star-m 2016.01: OUTPUT«version?» | ||
nine | lizmat: yes | ||
lizmat | jnthn: &*EXIT you mean? | ||
moritz | Skarsnik: we now have a contemporary star | ||
Skarsnik | nice | ||
tadzik | star: use lib: confused; | 13:20 | |
camelia | star-m 2016.01: OUTPUT«===SORRY!===Cannot iterate object with P6opaque representation» | ||
tadzik | this is even better! | ||
but this is what I meant; | |||
star: use Panda: confuse-me; | 13:21 | ||
camelia | star-m 2016.01: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4K1lGm6EoxConfusedat /tmp/4K1lGm6Eox:1------> 3use Panda7⏏5: confuse-me;» | ||
jnthn | lizmat: I meant in PROCESS | ||
tadzik | "Confused" :) | ||
lizmat | jnthn nine ok, patch almost ready | ||
tadzik | I encountered it mistyping "use HTTP::UserAgent: simple" instead of "use HTTP::UserAgent :simple" | ||
nine | I think I found a fix on the Perl 5 side :) | 13:23 | |
I copied this code from perl's S_my_exit_jump into p5_destruct_perl: if (PL_e_script) { SvREFCNT_dec(PL_e_script); PL_e_script = NULL; } POPSTACK_TO(PL_mainstack); dounwind(-1); LEAVE_SCOPE(0); | 13:24 | ||
Seems to clean up perl's callstack enough so the teardown would go through | |||
lizmat | nine: nonetheless, being able to capture exit() may be useful for embedding applications | 13:25 | |
nine | absolutely | ||
mod_perl does it for example | 13:26 | ||
lizmat | hmmmm... problem with creatin restricted setting | ||
chicken/egg problem | 13:29 | ||
masak | hehe -- implementing fizzbuzz in 007 revealed all kinds of parsing and scoping issues! | 13:30 | |
and here I thought it would be straightforward | 13:31 | ||
13:31
sufrostico joined
|
|||
masak | currently, 007 has a fizzbuzz score of 5, because it gets to 5 ("buzz") before it croaks :P | 13:31 | |
13:31
kaare_ joined
|
|||
tadzik | hahahh | 13:31 | |
dalek | line-Perl5: 5160dd1 | (Stefan Seifert)++ | p5helper.c: Fix segfault on using exit() in a Dancer2 action exiting Perl 6 while in a callback from Perl 5 leaves the Perl 5 callstack still in place and may confuse Perl 5's cleanup on interpreter shut down. So we try to tear down the Perl 5 callstack first. tadzik++ for reporting this issue! |
13:32 | |
rudi_s | jnthn: Awesome. - Seems to work fine. Proposed path here (works fine for me): pbot.rmdir.de/YNtqa61WMPIphTA-w5IA5Q - do you want to apply the patch or should I create a pull request on github? | ||
yoleaux | 10:20Z <jnthn> rudi_s: It shouldn't be much harder than just filling in that entry in the op_table | ||
rudi_s | *patch | ||
moritz | masak: regarding your naming of Q trees: you should make a connection to the Q character in the James Bond movies :-) | ||
("awesome tech from the future") | |||
tadzik | masak: "is it a man-compiler, or a boy-compiler?" -- "It's a man. A 5 year old man" | 13:33 | |
moritz | lol | ||
masak | moritz: somewhat embarrassingly, I forgot completely about the 007<->Q connection (and it being funny). I'm just so used to it! | ||
jnthn | rudi_s: Well, PR is lazy way for me ;) | ||
masak | moritz: the causal order is I came up with Q, and shortly after that, 007 was born. so 007 is actually named after Q. | 13:34 | |
rudi_s | jnthn: As in easier for you? Then I'll create a pull request. | ||
masak | heh, turns out it was only a parsing problem. 007 really didn't like that I named my recursive sub `subtract`... :P | ||
moritz | masak: that makes sense. Kinda. | ||
masak | so now 007 has a fizzbuzz score of 100 \o/ | ||
jnthn | rudi_s: Yes, easier for me :) | ||
rudi_s | jnthn: Ok. Will do. | 13:35 | |
jnthn | Thanks! | ||
lizmat | $ 6 'my &*EXIT = -> $s = 0 { say $s; die }; exit' | ||
0 | |||
Died | |||
nine jnthn : something like that? ^^^ | |||
nine | Looks cool :) | ||
jnthn | lizmat: think that's OK | ||
lizmat | ok, spectesting now | 13:36 | |
rudi_s | jnthn: [x] - any idea if this also needs to be implemented for the jvm backend (sadly I can't test that)? | 13:37 | |
llfourn | will signals call &*EXIT? | ||
jnthn | rudi_s: Probably, I don't think .native-descriptor is implemented at on JVM | 13:38 | |
llfourn: Not unless you wire up a signal handler | |||
And have that call exit | |||
llfourn | jnthn: cool. But would a custom &*EXIT ever be in the signal handler anyway? | 13:39 | |
I would guess not... | |||
jnthn | Probably not, though you could also set GLOBAL::<&EXIT> instead and that'd work out | ||
llfourn | oh GLOBAL::&EXIT is already a thing? | 13:40 | |
do you mean GLOBAL::&exit? | |||
jnthn | No, I didn't :P | 13:41 | |
That compiles into GLOBAL:: & exit, no? :) | |||
llfourn | right you need < > | 13:42 | |
13:42
avalenn_ left
13:50
musiKk_ joined
13:52
buharin joined
|
|||
lizmat | hmmm.... somehow the &*EXIT is not being registered... | 13:55 | |
13:56
pmurias joined
|
|||
lizmat | will look at it when I'm back& | 13:56 | |
current state: gist.github.com/lizmat/ad713ff87e8c4c307a81 # for the tinkerers | 13:57 | ||
afk& | |||
rudi_s | jnthn: tests for the pull request complete - btw. I noticed a few other pull requests which look fine, any reason they weren't merged yet? | 14:03 | |
14:03
[Tux] left
|
|||
jnthn | rudi_s: Not reviewed, mostly | 14:05 | |
rudi_s | Ok. | ||
The VS2013 looks correct (have no windows to test though). | 14:06 | ||
jnthn | I think the lint ones I maybe didn't like | ||
rudi_s | The lint ones too (if they compile). - Why didn't you like them? | ||
jnthn | Will have to look at them more closely | 14:07 | |
rudi_s | More const sounds always like a good thing, and correct format string specifier too. | ||
jnthn | More const is *not* always a good thing, if it leads to new warnings and clutter. | ||
rudi_s | Well, assuming they don't introduce more warnings of course. | 14:08 | |
Haven't checked the build. | |||
jnthn | Yeah, I think some patches that've gone consting in the past did | ||
Also I'm just generally not fond of linting and changing stuff to please some tool. | |||
14:09
virtualsue joined
|
|||
perlawhirl | hi perlers | 14:10 | |
if i already have a token, can i "append/concat" to it like i would a string, eg: my token foo { <$bar> }; token foo { <foo> <$baz> }; | |||
i can do it with EVAL *spit* but just wondering if there's another way | |||
or alternatvely, can i generate a new token from an array of tokens, eg: my token foo { <{ @list-of-tokens }>; | 14:11 | ||
masak | that latter sounds much better | 14:12 | |
perlawhirl | yeah it does | ||
can i do it ? :D | |||
14:13
Mouq joined
|
|||
perlawhirl | i am currently doing it that way with EVAL | 14:13 | |
ie. my $rx = EVAL '/' ~ @tokens.join('\s') ~ '/'; $sting ~~ $rx | |||
perlpilot | Doesn't <@foo> do that? | 14:14 | |
Skarsnik | m: sub foo($c) { return if $c == 0; { say "B $c"; repeat { say "A $c"; foo($c -1) } while 0 } }; foo(3) | ||
camelia | rakudo-moar c124e5: OUTPUT«B 3A 3B 2» | ||
perlawhirl | i think i tried, let me check again | ||
14:14
skids joined,
fireartist left
14:15
[Tux] joined
|
|||
perlawhirl | doesn't seem to be, no. matches the first token in the array only | 14:15 | |
jnthn | <@foo> means an alternation of the things in @foo | 14:16 | |
llfourn | perlawhirl: <{ @list-of-token.join('||') }> # maybe I'm not that good with grammar | ||
masak | but <{ }> is basically an EVAL | 14:17 | |
jnthn | token foo(*@tokens) { [<?{@tokens}> $(@tokens.shift)]* } or soemthing | ||
perlawhirl | jnthn: i'll try it out | ||
jnthn | I didn't :) | 14:18 | |
perlpilot | It's funny that @arrays are an order sequence, but in regex we get an alternation which can match in any order. | ||
llfourn | grammar Foo { proto token foo {*} }; for @tokens -> $toke { Foo.^add_multi_method('foo',my token { $toke } } # maybe? | 14:19 | |
perlawhirl | jnthn: it worked! thanks | ||
masak: i know it basically an EVAL, just didn't want no MONKEYS in my code :) | 14:20 | ||
llfourn | jnthn++ solution is fascinating | 14:21 | |
perlawhirl | it is indeed... but makes perfect sense! | ||
dalek | p: cd2c69d | FROGGS++ | tools/build/MOAR_REVISION: bump moar revision for nativecall feature |
||
llfourn | perlawhirl: if you can explain it to me it would be cool :D | 14:22 | |
why does it iterate over each token? | |||
perlpilot | llfourn: because of the * | ||
perlawhirl | because * is 0 or more, so it keeps shifting as it matches | ||
perlpilot | though, I would expect that it could also stop early (not sure if that's desirable or not) | ||
perlawhirl | maybe *? will stop early... though i am dubious | 14:23 | |
llfourn | but * checks for 0 or more, once it fails to match the first thing shouldn't it stop rather than try them all? | ||
or is that what you want? | |||
dalek | kudo/nom: a8f407c | FROGGS++ | / (4 files): allow to cast Pointer to "is native" subroutine |
14:24 | |
perlawhirl | yes, that's exactly what i wanted, to fail unless all tokens match | ||
llfourn | ahh ok I thought you wanted a disjunction | ||
perlawhirl | but i wanted to dynamically generate the list of tokens based on some input | ||
llfourn | still interesting :) | 14:25 | |
perlawhirl | actually, it does stop early, but which i mean the $/ has up to the tokens that matched, which is normal behavour of a match object | 14:27 | |
but it's probably easy enough to check if all of them matched | |||
14:27
virtualsue left
|
|||
perlawhirl | a basic way would just be check if there's anything left in @tokens | 14:27 | |
14:27
Upasaka left
|
|||
perlawhirl | if there is, we didn't shift all of them, so they didn't all match | 14:27 | |
14:28
Upasaka joined
|
|||
perlpilot | yep | 14:28 | |
And if you wanted to do this in a context where there's backtracking, you may have to worry about the destructive nature of .shift :) | 14:30 | ||
14:31
musiKk_ left
14:35
FROGGS[mobile] joined
14:36
virtualsue joined
14:41
virtualsue left
|
|||
[Coke] could use some coffee | 14:43 | ||
perlawhirl | for those still playing at home... this also works a treat: token foo { <{@tokens[$++]}>+ }; | 14:49 | |
dalek | kudo/nom: 2a87489 | hoelzro++ | lib/NativeCall.pm6: Fix NativeCall For some reason (role bodies are tricky), we got an error along the lines of "this type does not support associative operations" regarding $lib2mangler. Initializing $lib2mangler at the unit level fixes the issue |
||
14:49
cdg joined
|
|||
llfourn | perlawhirl: nice | ||
perlpilot | perlawhirl: how about <{@tokens[$++]}> ** {+@tokens} (to make sure they all match) | 14:50 | |
? | |||
perlawhirl | my mind was already walking down that path :) let me test | ||
yes =) | 14:51 | ||
perlpilot | cool | ||
perlawhirl | fails nicely | ||
llfourn | perlpilot++ perlawhirl++ | ||
perlawhirl | with a big fat Nil | ||
perlpilot | perl6++ | ||
14:53
tmch left
|
|||
perlpilot | It's still weird that to get the most salient feature of arrays in a regex, you have to be so verbose. It would be nice if there were some built-in way to say "match these things in order" and "match *all* of these things in order" | 14:58 | |
jnthn | Yeah... We're at least consistent though :) | 14:59 | |
< foo bar baz > in a regex is also an alternation | |||
15:00
brrt joined
15:02
brrt left,
perlawhirl left
|
|||
perlpilot | It's too bad @array doesn't match all of the items in sequence and you must say |@array or ||@array to get the alternation. (you'd probably need some modifier to make @array stop early though) | 15:10 | |
though that this is the first time since the regex reformation that this has come up says something about the demand for such a feature too :) | |||
15:11
sufrostico left
|
|||
perlpilot | anyway ... | 15:11 | |
perlpilot stops thinking about it | |||
geekosaur | you know, I don;t think I've ever needed that | ||
since, uh, a week after the release of perl 3 | |||
15:20
eiro left
15:21
jameslenz left
15:24
sufrostico joined
15:26
Mouq left
|
|||
dalek | c: 1dd6bbf | FROGGS++ | doc/Language/nativecall.pod: describe how to invoke function pointers |
15:39 | |
Skarsnik | duh that really work? | 15:42 | |
15:45
MadcapJake left
15:50
FROGGS left
15:52
andreoss joined
|
|||
andreoss | is there way to pass by name in Perl 6? | 15:54 | |
15:55
travis-ci joined
|
|||
travis-ci | Doc build failed. Tobias Leich 'describe how to invoke function pointers' | 15:55 | |
travis-ci.org/perl6/doc/builds/115346161 github.com/perl6/doc/compare/f6084...d6bbf419bb | |||
15:55
travis-ci left
|
|||
andreoss | or rather call by name | 15:56 | |
skids | m: 42."say" | 15:57 | |
camelia | rakudo-moar 2a8748: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NckFTcfdd_Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.at /tmp/NckFTcfdd_:1------> 0342."say"7⏏5<EOL>» | ||
skids | m: 42."say"() | ||
camelia | rakudo-moar 2a8748: OUTPUT«42» | ||
15:59
xinming left
|
|||
andreoss | something like this docs.scala-lang.org/sips/pending/re...tion-rules | 15:59 | |
16:01
eiro joined
|
|||
andreoss | m: sub loop-while(&cond, &body) { &body() if &cond(); &?ROUTINE(&cond, &body) }; my $i = 0; loop-while({ $i < 5 }, { $i++; say $i }); | 16:05 | |
camelia | rakudo-moar 2a8748: OUTPUT«12345Memory allocation failed; could not allocate 127424 bytes» | ||
jnthn | No, you have to explicitly closure them on the callee side | 16:06 | |
It's the kind of thing macros might enable | |||
16:06
cognominal joined
|
|||
jnthn | But we don't have those yet. | 16:06 | |
andreoss | m: sub loop-while(&cond, &body) { &body() and &?ROUTINE(&cond, &body) if &cond() }; my $i = 0; loop-while({ $i < 5 }, { $i++; say $i }); | ||
camelia | rakudo-moar 2a8748: OUTPUT«12345» | ||
jnthn | fwiw, you can just say body() and cond() for calling them if you bound them with the & sigil | 16:07 | |
dalek | pan style="color: #395be5">perl6-examples: c7cef31 | raiph++ | categories/tutorial/01-word-wrap.pl: Rewrite for reasonable naming and bug fix(es) |
16:09 | |
andreoss | so closures don't count as `by name` | 16:13 | |
llfourn | I did some googling on "pass-by-name" ... Don't really get it | 16:14 | |
andreoss | llfourn: look for scala examples | ||
llfourn | andreoss: yeah I have -- they just say it's a syntax trick where instead of doing somefunc(() => math.random) you can just pass somefunc(math.random) # is this right? | 16:15 | |
ie it's just shorthand | 16:16 | ||
but in other places it seems to be some more high level compsci abstraction | |||
andreoss | I guess it doesn't use closures at all, but rather operates on AST level somehow | 16:17 | |
llfourn | so it's just a macro? | ||
16:19
nakiro left
|
|||
llfourn | oh you mean it like compiles a new func each time it sees a call to it and s/arg/math.random/. Kinda interesting. | 16:20 | |
but how did this ever get called "call-by-name" | |||
Azry_ | is it good practices to use cmake or autoconf to build a module ? I need to check for some libraries/vars/functions. works with cmake but i wonder if it's the way to go | 16:25 | |
16:25
ygbn joined
|
|||
Azry_ | Or can Nativecall check for functions/structs/var itself ? | 16:26 | |
Skarsnik | Nc only use the library file | 16:27 | |
source/header are irrelevant, only the symbols in the library files, and proper size for signature of stuff | 16:28 | ||
Azry_ | so i need to check for functions like i would though CHECK_FUNCTION_EXISTS with cmake, is there a perlish way to do that ? | 16:32 | |
16:34
Guest51674 is now known as alpha123
|
|||
Skarsnik | I am not sure to get what you want to do. NC work with compiled library, it depend on how the library you want to use had been compiled | 16:34 | |
16:34
ygbn left,
khw joined
16:36
FROGGS joined
|
|||
Azry_ | i want my code to be portable, and differents OS have differents functions to do the same thing (Pty allocation). I want to know which function to use. I'm currently doing it by initialising variables like "HAVE_PTSNAME" with cmake | 16:37 | |
but that implies that the user needs cmake, so i'm not completely satisfied | 16:38 | ||
16:38
rhmekjfn joined
|
|||
Skarsnik | you can test the os in perl6 and change what you bind if you already know the symbol | 16:39 | |
geekosaur | might be better to just declare a dependency on one of the C libraries that abstract pty creation | ||
rhmekjfn | m: sub loop-while(&cond, &body) { if (&cond()) {&body()} else {return}; &?ROUTINE(&cond, &body) }; my $i = 0; loop-while({ $i < 5 }, { say $i; $i++; }); # andreoss | ||
camelia | rakudo-moar 2a8748: OUTPUT«01234» | ||
geekosaur | and bind to that, for a fixed perl6-facing abi | ||
this also protects you from having to deal with e.g. some of the security gotchas around pt_chown | 16:41 | ||
andreoss | m: proto role YYY {*}; | 16:42 | |
camelia | rakudo-moar 2a8748: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lNjGdeFuWkMissing blockat /tmp/lNjGdeFuWk:1------> 3proto role7⏏5 YYY {*}; expecting any of: new name to be defined» | ||
pmurias | what is nqp::closefh_i on a syncpipe supposed to return? | ||
andreoss | is there proto roles? | ||
rhmekjfn | m: sub loop-while(&cond, &body) { &body() and &?ROUTINE(&cond, &body) if &cond() }; my $i = 0; loop-while({ $i < 5 }, { say $i; $i++; }); | ||
camelia | rakudo-moar 2a8748: OUTPUT«0» | ||
16:44
FROGGS_ joined
|
|||
FROGGS_ | m: use NativeCall; say cglobal Str, 'malloc', Pointer # Azry_ | 16:44 | |
camelia | rakudo-moar 2a8748: OUTPUT«NativeCall::Types::Pointer<0x7fb9c563ef60>» | ||
FROGGS_ | m: use NativeCall; say cglobal Str, 'flubber', Pointer # Azry_ | ||
camelia | rakudo-moar 2a8748: OUTPUT«Cannot locate symbol 'flubber' in native library '' in block at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 line 406 in block <unit> at /tmp/lzg2iW_fpm line 1» | ||
FROGGS_ | Azry_: Str is the arg where you'd put the library name | ||
and malloc and flubber are just examples of functions you want to check | 16:45 | ||
Azry_ | FROGGS: wow, so there is a way =) great i'll test this, thanks | ||
Skarsnik | is that a typed execption that could be catch? | ||
FROGGS_ | if the lib exposes that symbol, you get a valid pointer back, otherwise an exception | ||
pmurias | jnthn: is there a reason for nqp::closefh_i to return the exit value shifted by 8 bits? | 16:46 | |
16:47
FROGGS left,
cdg left
16:49
FROGGS__ joined
|
|||
FROGGS__ | Skarsnik: dont think so | 16:49 | |
16:49
FROGGS__ is now known as FROGGS
16:50
FROGGS_ left
|
|||
andreoss | p: use MONKEY-TYPING; use class :open<Foo>; class Foo is open {...}; | 16:50 | |
m: use MONKEY-TYPING; use class :open<Foo>; class Foo is open {...}; | |||
camelia | rakudo-moar 2a8748: OUTPUT«===SORRY!===Could not find class in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-2/share/perl6/site /home/camelia/rakudo-m-inst-2/share/perl6/vendor /home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Repository::Absol…» | ||
FROGGS | what's that? | 16:51 | |
andreoss | S12 | ||
16:52
rhmekjfn left
|
|||
FROGGS | NYI | 16:52 | |
dunno if we ever get that | |||
16:53
FROGGS[mobile] left
|
|||
pmurias | jnthn: it seems we are unpacking it into signal and exit code in the Perl 6 layer so it seems ok | 16:54 | |
16:54
zakharyas left
16:55
domidumont left
|
|||
FROGGS | has somebody ever spotted that? travis-ci.org/perl6/doc/builds/115346161#L1674 | 16:55 | |
llfourn | FROGGS: same thing happened to me | 16:56 | |
FROGGS | ahh | ||
llfourn | it's non-deterministic | ||
FROGGS | so I am not to blame? | ||
llfourn | no your pod is probably not bad enough to cause a segfault | ||
FROGGS | I'll let it rebuild | ||
*g* | |||
thanks | |||
nine | Is there some way to only enable a pragma if the compiler supports it? | 17:02 | |
FROGGS | maybe use this? github.com/FROGGS/p6-if | 17:03 | |
nine | To be precise: to only pass an argument to a pragma if the compiler support it | 17:04 | |
llfourn | FROGGS++ a World mixin nice idea | ||
in a scary sort of way | 17:05 | ||
nine | I don't even want to think about how that interacts with precompilation :) | ||
skids | m: my $c = Channel.new; $c.send($(1,2)); $c.send((1,2)); $c.receive.perl.say; $c.receive.perl.say; # any particular reason why Channel stripping itemization is beneficial behavior? | ||
camelia | rakudo-moar 2a8748: OUTPUT«(1, 2)(1, 2)» | ||
nine | my role BetterWorld | 17:06 | |
llfourn | XD | ||
FROGGS | well, can you check the signature of the thing the pragma calls or so? | 17:07 | |
then you'd have a somewhat robust test to use with pragma if | |||
nine | The pragma is 'precompilation' which is implemented directly in do_pragma | 17:08 | |
dalek | p: 6d38769 | (Pawel Murias)++ | src/NQP/Compiler.nqp: [js] Add our custom command line flags to the nqp-js-on-js. |
17:11 | |
p: 3242d3e | (Pawel Murias)++ | src/vm/js/ (3 files): [js] Implement nqp::closefh_i and nqp::syncpipe. This allows us to pass test 86. This also makes --beautify on nqp-js-on-js work. |
|||
17:13
travis-ci joined
|
|||
travis-ci | NQP build failed. Pawel Murias '[js] Implement nqp::closefh_i and nqp::syncpipe. | 17:13 | |
travis-ci.org/perl6/nqp/builds/115369672 github.com/perl6/nqp/compare/cd2c6...42d3ee0d18 | |||
17:13
travis-ci left
17:14
gtodd1 joined,
gtodd left
|
|||
pmurias checks why it fails | 17:15 | ||
weird this seems to be an js only commit that fails | 17:16 | ||
dalek | p: 8b11181 | coke++ | README.pod: Make MoarVM more prominent than the Parrot VM |
17:19 | |
[Coke] restarts the failed job. | 17:20 | ||
FROGGS | I can reproduce here | ||
17:21
travis-ci joined
|
|||
travis-ci | NQP build failed. Will "Coke" Coleda 'Make MoarVM more prominent than the Parrot VM' | 17:21 | |
travis-ci.org/perl6/nqp/builds/115371602 github.com/perl6/nqp/compare/3242d...1118196e03 | |||
17:21
travis-ci left
|
|||
FROGGS | pmurias: why does my moar only nqp fail to build with your patch? that does not make any sense | 17:22 | |
[Coke] | that's the failure in the travis, also: Unhandled exception: While looking for 'nqp.moarvm': no such file or directory | ||
17:22
sufrostico left,
travis-ci joined
|
|||
travis-ci | NQP build failed. Pawel Murias '[js] Implement nqp::closefh_i and nqp::syncpipe. | 17:22 | |
travis-ci.org/perl6/nqp/builds/115369672 github.com/perl6/nqp/compare/cd2c6...42d3ee0d18 | |||
17:22
travis-ci left
|
|||
FROGGS | maybe it does not understand #?if js in NQP::Compiler? | 17:23 | |
17:25
sufrostico joined
|
|||
FROGGS | pmurias: found it! | 17:26 | |
dalek | p: 9b10c93 | FROGGS++ | src/NQP/Compiler.nqp: fix typo in fudge line |
17:27 | |
17:27
andreoss left
|
|||
dalek | c: 3b5bd22 | paultcochrane++ | doc/Language/testing.pod: Document the can-ok() test function |
17:29 | |
17:30
travis-ci joined
|
|||
travis-ci | NQP build passed. Tobias Leich 'fix typo in fudge line' | 17:30 | |
travis-ci.org/perl6/nqp/builds/115373403 github.com/perl6/nqp/compare/8b111...10c935309f | |||
17:30
travis-ci left,
FROGGS left
|
|||
pmurias | sorry for breaking master :/ | 17:32 | |
dalek | line-Perl5: 827f9bf | (Stefan Seifert)++ | lib/Inline/Perl5.pm6: Allow for precompilation of Inline::Perl5 itself As we can precompile Inline::Perl5 just fine and only modules that use :from<Perl5> cannot be precompiled, we "export" the no precompilation pragma to them. This takes several seconds off the startup time of any program using Inline::Perl5 FROGGS++ for contributing the winning idea! |
17:33 | |
tadzik | nice! | 17:34 | |
now even tests pass faster :) | 17:36 | ||
and Perldancer.org starts in like 1 second | 17:37 | ||
17:38
sufrostico left
17:39
sufrostico joined
17:41
FROGGS[mobile] joined
|
|||
FROGGS[mobile] | sergot, tadzik: are you comming? | 17:42 | |
tadzik | ye | 17:43 | |
ilmari | nine++ # perl6 -e 'use Inline::Perl5' down from 6.9 to 0.3 seconds on my machine | 17:45 | |
FROGGS[mobile] | nice! | ||
timotimo | oooh | ||
17:47
sufrosti1o joined,
sufrostico left,
sufrosti1o is now known as Sufrostico,
Sufrostico left,
Sufrostico joined
17:49
SCHAAP137 joined
|
|||
hoelzro | wow | 17:49 | |
Hotkeys | Oh god xkcd.com/1654/ | 17:53 | |
timotimo | <3 | 17:54 | |
17:59
prammer left
18:00
prammer joined
|
|||
geekosaur can double that list without even trying, and add even more with some thought... | 18:01 | ||
18:02
xfix joined
18:03
xfix left
18:05
domidumont joined
18:06
pmurias left
18:08
buharin left,
AlexDaniel joined
18:09
kjs_ left
|
|||
AlexDaniel | m: say [1, 2, 3] Z= (4, 5, 6) # heh | 18:09 | |
camelia | rakudo-moar 2a8748: OUTPUT«(4 5 6)» | ||
jnthn | nine: Wow, that's evil! :-D | 18:11 | |
18:15
dakkar left,
Skarsnik left,
Skarsnik joined
18:18
maybekoo2 joined
18:19
prammer left
|
|||
Azry_ | is LibraryCheck the best way to test if a library exists ? | 18:19 | |
18:20
zpmorgan joined
|
|||
Azry_ | (with nativecall) | 18:21 | |
RabidGravy | Or do what it does | 18:25 | |
it's not very complicated | |||
Azry_ | well, i could parse ldconfig -r but i doesn't look clean =) | 18:26 | |
RabidGravy | all LibraryCheck does is create a native sub on the library and execute it, checking the exception, if it's "library not found" then it returns false | 18:28 | |
18:29
jevin left
18:30
atweiden joined
|
|||
timotimo | what if the library actually has the function of that name, and executing that function willy-nilly will give you big trouble? | 18:32 | |
i mean, sure, it uses a 15-letters-long random combination of lower and upper case letters | 18:33 | ||
RabidGravy | it tries hard to make an unlikely name ;-) | ||
timotimo | but how hard is it really to build a library that has all of these? | ||
18:33
wamba left
|
|||
Azry_ | my problem is : on debian i need to refer to libc.so.6 and on my freebsd i need to refer to libc.so.7 | 18:34 | |
timotimo | did you see the thing froggs showed off with "malloc" and "flubber" using cglobal? | ||
Azry_ | yes, but it guesses the name of the library the same way | ||
RabidGravy | you shouldn't need to worry about the library for libc, it'll be loaded already | 18:35 | |
Azry_ | oh, i didn't know that, so i donc need to give an argument to "is native()" then ? | ||
18:36
andreoss joined
|
|||
RabidGravy | no you shouldn''t have to | 18:36 | |
Azry_ | okay thanks, i look into that =) | ||
andreoss | is there a type like Nil on which roles can be applied? | ||
timotimo | yesterday i saw a post by an "expert" who said "it's still a board-game, though. you can just calculate every possible move, then every possible counter-move, then every counter-counter move, and so on, until you win. why is everybody so excited about this?" | ||
andreoss | m: role Foo { }; my $x = Nil.new ; $x does Foo; | 18:37 | |
camelia | rakudo-moar 2a8748: OUTPUT«Cannot use 'does' operator with a type object. in block <unit> at /tmp/PtveJTPJbR line 1» | ||
timotimo | er, don't you have to give an argument to "is native" still? | ||
just an undefined one? like Str? | |||
RabidGravy | andreoss, "but" | ||
andreoss | m: role Foo { }; my $x = Str.new ; $x does Foo; | ||
camelia | ( no output ) | ||
andreoss | m: but.WHAT.say | 18:38 | |
camelia | rakudo-moar 2a8748: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zkRKjo_rl4Undeclared routine: but used at line 1. Did you mean 'put'?» | ||
timotimo | (to be fair, that person didn't claim to be an expert) | ||
RabidGravy | m: role F {} ; say (Nil but F}.WHAT | ||
camelia | rakudo-moar 2a8748: OUTPUT«5===SORRY!5=== Error while compiling /tmp/foL_YVw9pKUnable to parse expression in parenthesized expression; couldn't find final ')' at /tmp/foL_YVw9pK:1------> 3role F {} ; say (Nil but F7⏏5}.WHAT expecting any of: stat…» | ||
RabidGravy | m: role F {} ; say (Nil but F}).WHAT | ||
camelia | rakudo-moar 2a8748: OUTPUT«5===SORRY!5=== Error while compiling /tmp/98CyzKXCdqUnable to parse expression in parenthesized expression; couldn't find final ')' at /tmp/98CyzKXCdq:1------> 3role F {} ; say (Nil but F7⏏5}).WHAT expecting any of: sta…» | ||
RabidGravy | m: role F {} ; say (Nil but F).WHAT | ||
camelia | rakudo-moar 2a8748: OUTPUT«Nil» | ||
RabidGravy | m: role F {} ; say (Str but F).WHAT | 18:39 | |
camelia | rakudo-moar 2a8748: OUTPUT«(Str+{F})» | ||
[Coke] | m: role F {} ; my $x = F.new; say $x.WHAT | ||
camelia | rakudo-moar 2a8748: OUTPUT«(F)» | ||
RabidGravy | oh | ||
andreoss | RabidGravy: thanks | 18:40 | |
lizmat | .tell hoelzro your fix makes all native call tests from "make test" fail for me :-( how is that for you ? | ||
yoleaux | lizmat: I'll pass your message to hoelzro. | ||
18:40
skids left
|
|||
andreoss | but i still somehow get `slip()` | 18:40 | |
RabidGravy | from a sub? that's usually when you slipped off the end without a suitable value to return | 18:41 | |
18:41
RabidGravy left
|
|||
ugexe | m: my $x = gather for 1..5 { take $_; say $x; }; say $x.perl # is this error message able to be improved? | 18:42 | |
camelia | rakudo-moar 2a8748: OUTPUT«List_57850416List_57850416List_57850416List_57850416List_57850416(\List_57850416 = (1 1 2 3 4 5))Method 'push' not found for invocant of class 'Mu' in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line …» | ||
18:43
maybekoo2 left
|
|||
andreoss | paste.debian.net/414250/ | 18:44 | |
anyone did monads in perl6? | 18:45 | ||
18:45
jevin joined
18:47
maybekoo2 joined
18:48
xinming joined
|
|||
hoelzro | lizmat: oh no =( | 18:49 | |
yoleaux | 18:40Z <lizmat> hoelzro: your fix makes all native call tests from "make test" fail for me :-( how is that for you ? | ||
hoelzro | I didn't spectest, I had to get out the door | ||
timotimo | well, those aren't spec tests though :) | ||
those are non-spec tests! | |||
lizmat | .oO( why are people committing changes without testing ?) |
||
there are no nativecall spectests afaik | 18:50 | ||
hoelzro | yeah, that was not cool on my part | ||
Skarsnik | well nc is rakudo | ||
lizmat | hoelzro: so, I would like to see a piece of code that fails for you | ||
hoelzro | my canary was just telling me tab completion was broken, so I wanted to fix it before work | ||
Skarsnik | maybe there could be test for the nqp part x) | ||
timotimo | i don't really remember what those changes were | ||
hoelzro | lizmat: install Linenoise and fire up the REPL | ||
lizmat | ok, will do | 18:51 | |
hoelzro | lizmat: feel free to revert my change for now | ||
I'll do a proper fix after work | |||
lizmat | lemme see if I can see what's wrong in the REPL case | ||
hoelzro | my commit message describes the situation too | 18:52 | |
lizmat | yeah, but not *how* you got that message | ||
hoelzro | true! | 18:53 | |
18:54
skids joined
|
|||
lizmat | it is somehow related to precomp | 18:58 | |
if the order is: use lib 't/04-nativecall'; use CompileTestLib; use lib 'lib'; use NativeCall | 18:59 | ||
it fails, but if the order is: | 19:00 | ||
if the order is: use lib 't/04-nativecall'; use lib 'lib'; use CompileTestLib; use NativeCall | |||
it works ok | |||
yuck | |||
could it be that we're nuking the mainline of NativeCall somehow? | 19:01 | ||
19:01
RabidGravy joined
|
|||
RabidGravy | kernel update | 19:02 | |
19:07
buharin joined
|
|||
RabidGravy | really struggling with reading from a jack source with portaudio, can't seem to find the right combination of buffer size and latency | 19:08 | |
19:09
lichtkind joined
19:16
prammer joined
|
|||
dalek | kudo/nom: 3e2e7f9 | lizmat++ | t/04-nativecall/ (17 files): Remove superfluous 'use lib "lib"' This fixes the nativecall test breakage caused by 2a8748979b321635 . As an added bonus, this makes "make test" go 3x as fast. hoelzro++ for pointing the way |
19:16 | |
19:16
firstdayonthejob joined
|
|||
dalek | kudo/nom: 5a1e681 | lizmat++ | t/04-nativecall/19-function-pointers.t: Correct test count |
19:17 | |
RabidGravy | is evil going to happen if I close over a channel in a sub passed as a callback that may get executed in another thread? | 19:20 | |
moritz | RabidGravy: I sure hope not | 19:21 | |
it's supposed to be, like, thread safe :-) | 19:22 | ||
RabidGravy | a callback that will get called by native code this is | ||
19:23
buharin left
|
|||
dalek | kudo/nom: b703d67 | lizmat++ | t/0 (41 files): Make sure all test files start with "use v6" And some additional cosmetics |
19:24 | |
19:26
kerframil joined
|
|||
dalek | kudo/nom: 5e59d2d | lizmat++ | src/core/Version.pm: Oops, we should share v6.c, not v6c |
19:29 | |
19:29
domidumont left
19:33
Sufrostico left
|
|||
AlexDaniel | lizmat: I love your commits :) | 19:33 | |
19:33
lichtkind_ joined
|
|||
AlexDaniel | it's always like “oh, things are much better now” | 19:33 | |
19:34
Sufrostico joined,
ely-se joined
|
|||
dalek | kudo/nom: 41d0007 | lizmat++ | src/core/Version.pm: Make sure we get stringification correct (*sigh*) |
19:35 | |
lizmat | AlexDaniel: well, I'm going for better generally :-) | 19:36 | |
19:36
yqt joined
19:37
lichtkind left,
spider-mario joined
|
|||
perlpilot | aye, lizmat++ for always improving things | 19:37 | |
(even with missteps, you're still headed in the right direction) | 19:38 | ||
lizmat | thank you both for your kind words :-) | ||
Skarsnik | 3x faster for NC test | ||
nice | |||
lizmat | Skarsnik: I think we need to thank nine++ for that essentially | 19:39 | |
with the recent precomp improvements | |||
Skarsnik | I though it was the compile time that was slowy then a lot | 19:40 | |
*slowing | |||
lizmat | I think it was basically precomping all of NativeCall in each test, it doesn't do that anymore | 19:41 | |
Skarsnik | I mean, the c library compile time | ||
lizmat | *test file | ||
hoelzro | lizmat: thanks for fixing that! | ||
lizmat++ | |||
Skarsnik | because 17-18 are quite fast | ||
19:43
cdg joined
19:47
atweiden left
19:49
prammer left,
prammer joined
|
|||
timotimo | that's quite good | 19:49 | |
19:52
andreoss left
19:54
espadrine left
19:56
pdcawley joined
19:59
prammer left
20:04
prammer joined,
musiKk_ joined
20:05
prammer left,
rindolf left
|
|||
Woodi | I found in Moust Needed that LDIF files parsing is missing so here is pure Perl6 (grammars) version: github.com/slunski/perl6-text-ldif | 20:06 | |
20:08
rindolf joined
|
|||
RabidGravy | there may be a problem "use v6.c;" in "2016.02-128-g3e2e7f9" | 20:09 | |
20:09
jjido joined
|
|||
timotimo | RabidGravy: a diferent problem from what liz fixed in 5e59d2d ? | 20:10 | |
lizmat | and further fixed in 41d0007 ? | ||
RabidGravy | I.e. if I load a module which is simply "use v6.c; module F {}" it craps out in "Missing serialize REPR function for REPR NativeRef" | 20:11 | |
those just tests though | |||
20:12
prammer joined
|
|||
lizmat | RabidGravy: can't reproduce that here :-( | 20:12 | |
RabidGravy | maybe it was the latter one that fixed t | 20:13 | |
20:13
rindolf left
|
|||
lizmat | I *did* just see that "use v6.c; use Test" runs the CORE setting mainline *twice* | 20:13 | |
RabidGravy | let's see | ||
timotimo | o_O | ||
lizmat | m: A.a; class A { method a() { say "a" } } # core setting doesn't complain about this situation | 20:14 | |
camelia | rakudo-moar 41d000: OUTPUT«5===SORRY!5=== Error while compiling /tmp/B5RcqCwX4MIllegally post-declared type: A used at line 1» | ||
rudi_s | Hi. Is there a shortcut for $_ ~~ ...? | 20:17 | |
lizmat | ...ACCEPTS($_) | 20:18 | |
rudi_s | I'll stick with $_ ~~, thanks ;-) | ||
20:18
Mouq joined
|
|||
timotimo | given/when will use ~~ for you | 20:18 | |
actually, when will use ~~ on $_ for you | 20:19 | ||
but when also has implications on program flow | |||
20:19
prammer left
|
|||
rudi_s | Yeah. Just an if in this case. | 20:19 | |
lizmat | m: $_ = 42; when Int { .say } | ||
camelia | rakudo-moar 41d000: OUTPUT«42» | ||
lizmat | m: $_ = "42"; when Int { .say } | ||
camelia | ( no output ) | ||
20:20
darutoko left
|
|||
timotimo | m: $_ = 64; .say when Int | 20:20 | |
camelia | rakudo-moar 41d000: OUTPUT«64» | ||
RabidGravy | lizmat, yes it was the latter commit that fixed it, I must have pulled immediately before you did that one | 20:21 | |
lizmat | sorry 'bout that one... | ||
RabidGravy | Hmm, but I'm still getting "Missing serialize REPR function for REPR NativeRef" in the module | 20:23 | |
20:24
labster joined
|
|||
lizmat | RabidGravy: gist ? | 20:24 | |
RabidGravy | so previously just a "use v6.c" was enough to provoke it, now I don't know what | 20:25 | |
the module I'm testing is fine, but a script that uses amother module too gets that | 20:26 | ||
20:27
prammer joined
|
|||
dalek | kudo/nom: 697fb83 | lizmat++ | src/core/ (2 files): Implement &*EXIT to catch "exit" By creating your own &*EXIT, you can catch what "exit" does, e.g.: $ 6 'my &*EXIT = -> $a = 0 { $a.say; die }; exit' 0 Died |
20:28 | |
lizmat | RabidGravy: could you test whether this diff solves it ? | 20:29 | |
gist.github.com/lizmat/e683c036e1e5dcc6e385 | |||
RabidGravy | just rebuilding | 20:35 | |
and nope | 20:41 | ||
lizmat | :-( | ||
20:43
Sufrostico left
|
|||
lizmat | brb& | 20:43 | |
RabidGravy | yeaah, it's Audio::Sndfile | 20:44 | |
20:45
lichtkind_ is now known as lichtkind
|
|||
lichtkind | i just rethought roles and i meaby dont get a thing but would it be possible to have just finer grained classes and do multiple inheritance instead of "does" | 20:46 | |
yes hter is still ability to mix in at runtime | |||
but for the rest im correct? | |||
20:47
cognominal left,
prammer left
20:48
cognominal joined,
prammer joined,
cognominal left
20:49
cognominal joined,
prammer left,
rindolf joined
20:50
prammer joined
20:51
prammer left
|
|||
lizmat | RabidGravy: could you try this gist ? gist.github.com/lizmat/1f401586d4098569ebae | 20:52 | |
20:53
prammer joined
|
|||
RabidGravy | something strange happened in 2016.02-121-g84a84f2 and 2016.02-133-g697fb83 | 20:54 | |
between that is | |||
20:55
prammer left,
Mouq left
|
|||
lizmat | RabidGravy: inclusive or exclusive ? | 20:56 | |
RabidGravy | well the earlier one works and the latter one doesn't | ||
20:57
prammer joined,
partly joined
20:58
partly left
|
|||
lizmat | RabidGravy: did you try that last gist already ? | 20:58 | |
RabidGravy | just rebuilding | ||
skids | lichtkind: you can do it that way, as long as you can live with the stricture of heirarchy. Most languages felt the need to have "traits" to escape that heirarchy. | 20:59 | |
jnthn | It's also about conflict detection. | 21:00 | |
Roles flatten and methods that are identical in name or, if multis, in signature, will conflict. | |||
21:00
jjido left
|
|||
jnthn | Whereas with inheritance it's just that you get the first one by C3 ordering | 21:00 | |
21:01
TreyHarr1 joined
21:02
TreyHarr2 joined
|
|||
lizmat | jnthn: is it correct that a "use v6.c" should cause to run the CORE settings mainline twice ? | 21:02 | |
21:02
TreyHarris left
|
|||
lichtkind | skids, thanks for understanding the question :) | 21:03 | |
jnthn++ too :) | 21:04 | ||
21:04
DarthGandalf left
|
|||
jnthn | lizmat: No...that should be nearly impossible... | 21:04 | |
lizmat | ok, lemme see if I can double verify | ||
jnthn | Unless the setting loading got really shagged up somewhere but even then I don't think Moar would actually run load twice on the same bytecode file | 21:05 | |
Since it keeps the filenames cached | |||
lizmat | ok | ||
jnthn | So we'd more likely get a weird error than run twice | ||
lizmat | jnthn: BTW, is a REPR NativeRef ever in the works ? | ||
jnthn | But yeah, worth confirming | ||
RabidGravy | lizmat, no that didn't fix it | ||
jnthn | NativeRef? | 21:06 | |
21:06
TreyHarr1 left
|
|||
lizmat | my Version changes seems to have caused a regression related to module loading :-( | 21:06 | |
RabidGravy | I am getting "Missing serialize REPR function for REPR NativeRef" in something that worked an hour ago | ||
lizmat | I guess somehow it tries to precomp some native values from a Version object | 21:07 | |
jnthn | There is a NativeRef REPR; it's the one that's used for passing around references to native attributes etc. | ||
We can probably serialize those in *some* cases... | |||
Maybe all if we hurt our branes enough :) | |||
lizmat | jnthn: then why is it complaining about it being missing ? | 21:08 | |
jnthn | lizmat: Because we didn't implement serializing them yet :) | ||
RabidGravy | it is associated with the version thing | ||
skids | .oO(That error message might do with mentioning "constant" somehow since that's how users stub their toe on it.) |
21:11 | |
jnthn | skids: Theres's plenty of ways you might | 21:12 | |
And we can't easily trace it back to the problem | 21:13 | ||
lizmat | RabidGravy: could you verify that b703d6727714aa24 still works ok ? | ||
jnthn | Well, he origin | ||
21:13
prammer left
|
|||
timotimo | i'll be bringing a few snack-ish things to the hackathon, too. among other things, a "fizzbuzz" themed one, and a bag of "crazy python" | 21:14 | |
21:14
prammer joined
|
|||
lizmat wishes she could be there | 21:15 | ||
instead, I'll be sitting in a car most of the day | |||
21:17
prammer left
|
|||
timotimo | :< | 21:17 | |
21:18
SCHAAP137 left
|
|||
timotimo | i got sit on by a cat right now. i think that's better than sitting in a car | 21:18 | |
21:18
prammer joined
|
|||
lizmat | :-) | 21:18 | |
t.h8.lv/andshare/IMG_20160217_211308~2.jpg.jpg | 21:19 | ||
timotimo | yup | 21:22 | |
RabidGravy | lizmat, no that doesn't work either | ||
will bisect harder | |||
jnthn hopes to be sleeping lots tomorrow :) | 21:24 | ||
Then maybe some heap profiler hackery :) | |||
Given I lost a day's worth of working time this week to darn headaches | |||
(They've mostly cleared up again... :)) | |||
lizmat | :-) | 21:25 | |
Hotkeys | I'm trying to make an equivalent to /(?<=(.))(?=\1)/ in p6 but I can't do captures in the perl 6 lookarounds | ||
21:25
colomon left
|
|||
Hotkeys | is this intended? | 21:25 | |
timotimo | i notice a distinct lack of tadzik for the hackathon? :o | ||
21:25
colomon joined
|
|||
Hotkeys | m: m/<?after (.)><?before $0>/ | 21:26 | |
camelia | rakudo-moar 697fb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/56pYr0WI__Unable to parse expression in metachar:sym<( )>; couldn't find final ')' at /tmp/56pYr0WI__:1------> 3m/<?after (.)><?before $0>7⏏5/ expecting any of: infix stopper» | ||
lizmat | RabidGravy: I would try before 02122e5e67d0c9738c and after | 21:27 | |
RabidGravy: also, could you post a --ll-exception trace ? | |||
perlpilot | m: /<?after (.) ><?before $0>/ | 21:28 | |
camelia | ( no output ) | ||
Hotkeys | oh | 21:29 | |
perlpilot | Hotkeys: )> might be confusing the parser? | ||
Hotkeys | I just needed a space? | ||
perlpilot | I dunno, it was just a guess | ||
Hotkeys | well it didn't get angry | ||
let's see | |||
dalek | ast: ebcd568 | lizmat++ | / (76 files): Make sure that we only have one "use lib" *BEFORE* loading any modules. Looks like this causes less precomp, resulting in the spectest using ~50 CPU seconds less, and about 10 seconds wallclock less (with TEST_JOBS=8) |
||
jnthn | ooh | 21:30 | |
lizmat++ | |||
lizmat: Did you spot any spectest CPU time reduction from my compiler improvements earlier in the week, btw? | |||
lizmat | no, alas, or I would have mentioned it :-) | ||
lichtkind | lizmat++ | ||
jnthn | OK. It shoulda shaved a little of startup time too, but I suspect it's more "measurable with callgrind" :) | 21:31 | |
lizmat | jnthn: fwiw, the tendency has been upward for bare startup time | ||
115 msecs for me | 21:32 | ||
21:32
DarthGandalf joined
|
|||
lizmat | pretty far away from <100 msecs of half a year / a year ago :-( | 21:32 | |
but at least, loading modules Is now a *lot* faster (once they're precomped) | 21:33 | ||
21:33
prammer left
|
|||
jnthn | lizmat: Yeah well, the code size of CORE.setting is probably somewhat to thank | 21:34 | |
lizmat | ah, I realize where the "running mainline twice" came from | ||
from precomping a module (in another process) | |||
jnthn | Ah :) | 21:35 | |
21:35
prammer joined
|
|||
lizmat | jnthn: had a bit of a puzzle implementing &*EXIT | 21:35 | |
m: A.a; class A { method a() { say "a" } } # jnthn: core setting doesn't complain about this situation | |||
camelia | rakudo-moar 697fb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DwSiMqFL_IIllegally post-declared type: A used at line 1» | ||
jnthn | Curious | 21:36 | |
21:36
prammer left
|
|||
perlpilot | Hotkeys: BTW, I think /(.) <( )> $0 / may actually do what you want | 21:36 | |
jnthn | Wonder why | ||
21:37
prammer joined
|
|||
lizmat | m: class A { ... }; A.a; class A { say "running"; method a() { say "a" } } # mainline is run *after* the method call | 21:37 | |
camelia | rakudo-moar 697fb8: OUTPUT«arunning» | ||
lizmat | jnthn: ^^^ that was the actual situation | 21:38 | |
jnthn | If you have a class A { ... } then it's pre-declared and the method call is OK | ||
lizmat | yeah, it was just a gotcha / DIHWIDT | ||
jnthn | But yeah, code in a class block just runs as it it was in a bare block | ||
tadzik | timotimo: yeah, plane's at 12.ish | ||
Hotkeys | perlpilot: you're wonderful | 21:39 | |
21:39
SCHAAP137 joined
|
|||
RabidGravy | is the first one where it starts going wrong 69426bd8b3adeffd0a1a23ff240bb1018bfedca4 | 21:39 | |
lizmat | jnthn: not sure whether that could / should warrant a warning | ||
and hoelzro's fix didn't fix ? | 21:40 | ||
aka 2a8748979b32163563 | 21:41 | ||
RabidGravy | every commit after that one doesn't work | ||
21:41
FROGGS[mobile] left
|
|||
hoelzro | I broke everything? =( | 21:41 | |
lizmat looks | |||
no, *I* did | 21:42 | ||
hoelzro | I broke it transitively, then =P | ||
timotimo | tadzik: sad to hear i'll be missing you by a day :| | ||
RabidGravy | just rolling back to the one before that one | ||
jnthn | lizmat: No, I don't think it's anything unusual | 21:43 | |
lizmat: Anything that actually affects the class should be done at BEGIN time anyway | |||
lizmat | in the case of the settings, it's not always clear in which order the files are.. :-( | 21:44 | |
but yeah, lesson learned | |||
jnthn | We could merge it all into one file to help ;) | 21:45 | |
</trololol> | |||
timotimo | tadzik: but it's my own darn fault :( | ||
RabidGravy | yeah, rolled back to 84a84f218d1af089a311cb52cfbfa5f264a19e74 and it's all good | ||
tadzik | timotimo: schade :( | 21:47 | |
lizmat | RabidGravy: could you try this gist gist.github.com/lizmat/9e0330b039f482c6ae6a after undoing the revert ? | 21:48 | |
RabidGravy | not quite sure how that plays in but hey | 21:50 | |
sortiz | \o | 21:51 | |
yoleaux | 09:51Z <lizmat> sortiz: make test has always been clean for me: do you have an example that consistently fails? | ||
sortiz | lizmat, I'll try the gist, seems related to my problems. | ||
lizmat | and another of my heroes bites the dust: en.wikipedia.org/wiki/Keith_Emerson :-( | 21:53 | |
21:55
perlawhirl joined
|
|||
sortiz | The gist fails the NC tests in rakudo. | 21:56 | |
lizmat | huh? it doesn't for me :-( | 21:57 | |
sortiz: you mean the ones in t/04-nativecall right ? | |||
RabidGravy | lizmat, nope that didn't help | 21:58 | |
21:58
kaare_ left
|
|||
sortiz | lizmat, wait, my tree wasn't clean... | 21:59 | |
lizmat | argh, I messed up my repo | 22:00 | |
22:00
skids left
|
|||
sortiz | lizmat, pass all tests AND fixes my issues. | 22:02 | |
22:03
perlawhirl left
|
|||
lizmat | RabidGravy: ah, I misread, I thought you reverted 84a84f218d1af089a311c | 22:04 | |
RabidGravy: so 69426bd8b3adeffd0a1a23f is the first one that fails? | 22:05 | ||
RabidGravy: or 02122e5e67d0c973 ? | |||
RabidGravy | no, I just rolled back to 84a84f218d1af089a311cb52cfbfa5f264a19e74 | ||
so the one after that | |||
22:05
prammer left,
prammer joined
|
|||
AlexDaniel | github just added “reactions” thingy | 22:06 | |
no more lame “+1” comments! | |||
RabidGravy | so 69426bd8b3adeffd0a1a23ff240bb1018bfedca4 | 22:07 | |
and all after that | |||
lizmat | adapted gist: gist.github.com/lizmat/d0594826506ed6d0b1aa | ||
it unnativies some attributes | 22:08 | ||
RabidGravy | so this applies to HEAD? | ||
I'm beginning to get confused | 22:09 | ||
lizmat | to HEAD yes | ||
22:09
Mouq joined
|
|||
lizmat | grrrr.... one test fails in "make", works ok with "perl6" | 22:11 | |
I hate that | |||
timotimo | so, forgot to make install?! | ||
sortiz | lizmat, With Int I'm seeing a Segfault in some of my modules, my be a missing unbox | ||
timotimo | o_O | 22:14 | |
well, with NativeCall, segfaults are provocable, but still ... :| | 22:15 | ||
lizmat | grrr, FROGGS++ commit is interfering with the revert :-( | ||
RabidGravy | lizmat, nope that doesn't help | ||
mst | damn contributors, going around contributing things | ||
yoleaux | 07:09Z <nine> mst: The 13 seconds for loading Inline::Perl6 are mostly spent on compiling Inline::Perl5 which cannot be precompiled currently. So actually my work in that area will directly benefit Inline::Perl5 and ::Perl6 :) | ||
timotimo | mst: and Inline::Perl5 is now precompilable, so it's now much faster! | 22:16 | |
mst | sweeeet | ||
sortiz | lizmat, In my case, the change from $lib2mangler to %lib2mangler works great. | 22:17 | |
timotimo | tadzik: did you ever try the particles or white_noise examples from my SDL2::Raw repo? | ||
22:18
kid51 joined
|
|||
tadzik | timotimo: nope, they don't sound familiar | 22:19 | |
timotimo | well, maybe you should have a quick look? :) | 22:20 | |
tadzik | prolly :) | ||
timotimo | hrm. i want a script that lets me say "gimme ./foo.txt" on an ssh server i've connected to and let me say "drophere" on my local machine and the file gets transferred immediately | 22:22 | |
bonus points if i can say "drophere" on any machine i'm connected to and it'd still work | 22:23 | ||
22:30
Mouq left
22:31
TEttinger joined
22:34
jameslenz joined
|
|||
dalek | kudo/nom: 5930d11 | lizmat++ | lib/NativeCall.pm6: Basically revert 69426bd8b3adeffd0a1a Not sure what is going on here. Waiting for better times, I guess. Thanks to RabidGravy++ and sortiz++ for support |
22:38 | |
lizmat | RabidGravy: ^^^ | ||
jnthn | 'night, #perl6 | 22:39 | |
timotimo | wow, whoops, seems like i b0rked the profiler's routine tab a tiny bit | ||
lizmat | gnight jnthn | 22:40 | |
brb | |||
dalek | p: 4091c73 | timotimo++ | src/vm/moar/profiler/template.html: fix icicle graph in profiler |
22:44 | |
Hotkeys | m: say "ha" x 10 ** 10 | ||
camelia | rakudo-moar 697fb8: OUTPUT«repeat count > 1073741824 arbitrarily unsupported... in block <unit> at /tmp/vXqgbNmnLk line 1» | ||
Hotkeys | arbitrary unsupported? | ||
s/ry/rily/ | |||
timotimo | yeah, sorry about that | 22:45 | |
does anybody fancy a bit of work in angularjs on our profiler? i've got a little task | 22:48 | ||
22:56
Crw joined
|
|||
timotimo | we don't really divide very efficiently when we have Int and Num for example, maybe i'll add candidates for that to the core setting | 22:58 | |
22:59
maybekoo2 left,
|Tux| joined
|
|||
timotimo | i wonder if that makes any difference at all to my current use case | 23:00 | |
RabidGravy | lizmat, in summary none of the above worked | ||
all commits after and including 69426bd8b3adeffd0a1a23ff240bb1018bfedca4 give me the "Missing serialize REPR function for REPR NativeRef" | 23:02 | ||
timotimo | oh jesus, that's pretty bad performance | 23:03 | |
find_best_dispatchee is back >_> | |||
sortiz | RabidGravy, 69426bd is now reverted. Still with the problem? | 23:05 | |
23:05
prammer left
|
|||
RabidGravy | yes | 23:06 | |
lizmat | hmmm.... | 23:07 | |
sortiz | Oops! | ||
lizmat | RabidGravy: apart from completely nuking your install, I've run out of ideas :-( | 23:08 | |
timotimo | oh come on, why would infix:<+> be calling find_best_dispatchee all the time? >_> | 23:09 | |
or is the profile just being messed up? | 23:10 | ||
sortiz | RabidGravy, Are you sure that the error is at the time of a native call? | ||
dalek | kudo/nom: 845a95d | lizmat++ | lib/NativeCall.pm6: Remove a straggling str |
||
lizmat | RabidGravy: perhaps it was this | ||
RabidGravy | sortiz, it's on module load | 23:11 | |
right now Audio::Sndfile won't load | 23:12 | ||
sortiz | So can't be related to the NC setup changes, unless you are doing a call at compile time. | ||
RabidGravy | no it doesn't | 23:13 | |
lizmat | ok, fwiw, I cannot install Audio::Sndfile either | 23:14 | |
Missing serialize REPR function for REPR NativeRef | |||
sortiz | Let me take a look... | ||
lizmat | so, confirmed that the last patch also doesn't fix this | ||
timotimo | i changed something in the core setting, find_best_dispatchee appeared in my profile, i changed it back, it didn't disappear | ||
dalek | line-Perl5: d231878 | (Stefan Seifert)++ | META.info: Version 0.6 Changes: * Fix segfault on using exit() in a Dancer2 action * Allow for precompilation of Inline::Perl5 itself |
23:15 | |
23:15
SCHAAP137 left
|
|||
lizmat | hmmm... the problem is in JSON::Name ??? | 23:18 | |
23:18
sufrostico joined
|
|||
lizmat | and there's no NC involved there ??? | 23:18 | |
23:18
perlawhirl joined
|
|||
lizmat nukes install | 23:19 | ||
RabidGravy | that sounds odd | 23:20 | |
the module only has about ten lines, it's just to share a role and a trait used by JSON::Marshal and JSON::Unmarshal | |||
23:21
TreyHarr2 left
23:22
WAAEBGW joined
|
|||
16WAAEBGW | Rakudo build failed. Elizabeth Mattijsen 'Basically revert 69426bd8b3adeffd0a1a | 23:22 | |
travis-ci.org/rakudo/rakudo/builds/115439103 github.com/rakudo/rakudo/compare/6...30d11e87f2 | |||
RabidGravy | okay I've got it | 23:23 | |
lizmat | RabidGravy++ | ||
RabidGravy | it's a :ver<v0.0.1> | 23:24 | |
hahahahaa | |||
23:26
skids joined
|
|||
sortiz | lizmat, so a complete revert wasn't needed, only the change in %lib2mangler. | 23:26 | |
lizmat | well, I've had it with this particular line of optimization, so I'm not going to touch it | 23:27 | |
RabidGravy: so you're saying there is no issue ? | |||
RabidGravy | well, I'd actually call it an issue, inasmuch as this has been like this since November | 23:29 | |
so even if it was wrong in the first place it should at least make a nice error message | 23:32 | ||
lizmat | agree | ||
lizmat is tired and goes to bed | 23:33 | ||
good night, #perl6! | |||
sortiz | lizmat, o/ | ||
23:34
LGD left
|
|||
timotimo | gnite lizmat! | 23:34 | |
23:35
musiKk_ left
23:37
Skarsnik left
23:38
geraud left
|
|||
timotimo | oh wow | 23:39 | |
what if ... but fast | |||
timotimo doubled the execution speed of the galton box example | 23:40 | ||
23:40
cpage_ left
23:43
Vlavv_ left
23:44
rindolf left
23:45
kid511 joined,
firstdayonthejob left
23:46
kid51 left
23:47
perlawhirl left,
sufrostico left
23:48
sufrostico joined
23:55
Vlavv_ joined
23:56
BenGoldberg joined
|
|||
timotimo | a bit better than double, actually | 23:59 |