»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
TimToady there's a way to get "2/3" out of it 00:00
00:00 skids joined
TimToady m: say unival('⅔').WHAT 00:00
camelia rakudo-moar 114659: OUTPUT«(Rat)␤»
TimToady m: say unival('⅔').nude
camelia rakudo-moar 114659: OUTPUT«2 3␤»
TimToady but numericvalue isn't the right property for that 00:01
00:01 kjs_ joined
diakopter m: say [/] unival('⅔').nude 00:02
camelia rakudo-moar 114659: OUTPUT«0.666667␤»
Kristien does Perl 6 have __DATA__ and __END__? 00:03
TimToady m: say uniprop('⅔','numericvaluenumerator') 00:04
camelia rakudo-moar 114659: OUTPUT«2␤»
TimToady m: say uniprop('⅔','numericvaluedenominator')
camelia rakudo-moar 114659: OUTPUT«3␤»
TimToady that were it
Kristien: no, supposed to have Pod blocks instead 00:05
dunno if it's implemented though
Kristien OK
00:05 wicope left
TimToady geezernap & 00:07
00:10 grondilu left 00:28 kjs_ left
raydiak timotimo: unival comes from the ucd... www.unicode.org/Public/UNIDATA/extr...Values.txt lists the numeric values 00:29
00:34 kjs_ joined 00:36 larion left, kjs_ left 00:43 coffee` left 00:52 merc_ joined, xiaomiao left 00:53 merc_ left 00:54 xiaomiao joined 00:55 Rounin left 01:00 Sqirrel_ joined, Sqirrel left 01:08 larion joined
timotimo thank you, raydiak 01:12
we kind of sort of have these pod blocks 01:20
they are super hard to input properly on the channel, though :)
01:24 zcm joined 01:31 rurban joined
raydiak is CArray of structs still NYI? 01:35
timotimo no
it is implemented 01:36
don't forget to .new the CArray! :P
raydiak yes I got past all that and some other stuff too
timotimo :) 01:37
raydiak still no dice, even with proper error checking
timotimo may i see?
01:37 larion left
raydiak yeah just a minute, I'll gist 01:37
timotimo did you use "int" when you meant "int32"? :) 01:39
raydiak pressed 'u' a bunch of times in vim to get back to the supposedly-almost-working point :)
timotimo haha
excellent
do you know extensions like undotree and such?
raydiak yes I've played with them, but...I keep my vim config very simple...should be using some plugins I'm sure 01:40
where is the int32 supposed to go? I used 'int' where the SDL docs did...is that bad? 01:41
timotimo yes, it is
in C, "int" is 32bit
in perl6, int is 64bit
raydiak heh okay, one more global replace, then I'll gist if it's still broken :) 01:42
timotimo what are you making? 01:43
raydiak I was just playing with what he started, seeing what the problems were...and it gives me...ideas... 01:44
timotimo k 01:45
raydiak here is where it's at now: gist.github.com/raydiak/9193e818d781a80ad946
raydiak hopes he pressed 'u' the correct number of times 01:47
timotimo and you don't get an "invalid renderer" any more?
i don't know why grondilu and you chose these flags for window and renderer
raydiak nope, just blackness again
timotimo i'd at least set "accelerated" and "opengl"
raydiak idk why he chose them either, suppose I can play with those next 01:48
timotimo also, i suggest you cargo cult a few bits from SDL2::Raw
in the examples, see how i used "SDL_CreateRendererAndWindow"
which should give you a better chance at getting a valid renderer
raydiak well, I'm sure just *using* SDL2::Raw would solve a lot...I pretty much nerd-sniped myself into trying to figure out specifically what is wrong here though 01:49
timotimo yeah, me too ... kind of
but then i had a person who was interested in perl6 and i talked to him a lot
flooded him with stuff, i suppose
poor guy
raydiak there is a lot to say about it, that's for sure 01:50
01:53 PZt joined
raydiak oh right speaking of time-wasting...you have no idea how furiously I was banging on my keyboard before I found out the snake doesn't die when it hits something :) 01:54
timotimo <3 01:56
it just noms its tail off and continues
gotta go now
good * #perl6
raydiak \o
raiph bye timotimo, hi raydiak
m: class c { method m { self } }; my c $o .= new; $o.=m.=m # how difficult would it be to allow the `$o.=m` to be expressible as `$o .=m` or `$o .= m` (ie have an infix op that does a mutating method call)? 01:57
camelia ( no output )
raiph $obj
.=foo
.=bar
would then be possible 01:58
raydiak hi raiph 01:59
raiph m: class c { method m { self } }; my c $o .= new; sub infix:<.=> ($l, $r) { $l.="$r"() }; $o.=m.=m
camelia ( no output )
raiph m: class c { method m { self } }; my c $o .= new; sub infix:<.=> ($l, $r) { $l.="$r"() }; $o .= m .= m 02:00
camelia rakudo-moar 114659: OUTPUT«===SORRY!===␤Method call node requires at least one child␤»
raydiak hm I've no idea...I would have guessed that should work as-is and filed it as a parsing bug 02:02
or some kinda bug...
shoot...time...afk 02:04
02:16 TimToady left 02:17 TimToady joined 02:27 labster left
timotimo one important thing i just remembered 02:32
don't forget to set the alpha value of the pixels you're going to draw to something other than 0 02:33
o/
02:33 TimToady left 02:34 zcm left 02:35 labster joined 02:37 TimToady joined 02:48 grettir left 02:51 TimToady left 02:53 TimToady joined 03:00 dolmen joined 03:04 Kristien left 03:18 Psyche^ joined 03:22 Patterner left 03:24 dolmen left 03:25 fernand__ left 03:26 fernand__ joined 03:28 rurban left 03:36 kurahaupo1 joined, dolmen joined 03:40 kurahaupo1 left 03:58 noganex_ joined 04:01 noganex left
timotimo my head wouldn't let me fall asleep, so i made Bool.pick and Bool.roll up to 2x faster 04:10
time perl6 -e 'for ^(3_000_000) { nqp::p6bool(nqp::rand_n(2e0) >= 1e0) }; 1'
2.45user 0.08system 0:02.54elapsed 99%CPU (0avgtext+0avgdata 270920maxresident)k
time perl6 -e 'for ^(3_000_000) { nqp::p6bool(nqp::rand_n(2e0) >= 1) }; 1'
4.98user 0.07system 0:05.06elapsed 99%CPU (0avgtext+0avgdata 270352maxresident)k
this is the after/before comparison
dalek kudo/nom: e8e9d71 | timotimo++ | src/core/Bool.pm:
make Bool.pick and Bool.roll up to 2x faster
timotimo (not quite sure why it's nomming so many datas)
that code seems to allocate a crapton of Int objects. perhaps our for-to-while optimization is b0rked yet again 04:11
huh, the parens around the number of iterations made it b0rk 04:12
04:13 fernand__ left
timotimo but the improvement is still 2x 04:13
04:14 telex left, fernand__ joined
timotimo .tell grondilu (and raydiak) you can use Bool.pick instead of rand < 0.5 for code that's a lot faster 04:14
yoleaux timotimo: I'll pass your message to grondilu.
04:16 telex joined 04:17 Sqirrel_ left
timotimo maybe i can have the sleeps now 04:19
04:27 aborazmeh joined, aborazmeh left, aborazmeh joined 04:31 rmgk is now known as Guest5952, rmgk_ joined, Guest5952 left, rmgk_ is now known as rmgk 04:52 fhelmberger joined 04:55 locsmif left 04:57 fhelmberger left 05:03 Sqirrel joined 05:04 Mudguts joined 05:06 raiph left
japhb .ask FROGGS_ It sounds like /CPAN and /eleven branches are ready to land. Anything still standing in your way before merging? (Especially since it's right after the release, so we have lots of time to pick up the pieces if anything breaks ....) 05:48
yoleaux japhb: I'll pass your message to FROGGS_.
06:09 dolmen left 06:10 aborazmeh left 06:51 rindolf joined
dalek c: 7557533 | moritz++ | lib/Language/io.pod:
Some small improvements to io.pod

  * do not advertise deprecated IO.slurp method
  * mention procedural form of &slurp
  * spaces instead of hard tabs
06:53
kudo-star-daily: 4e5f046 | coke++ | log/ (14 files):
today (automated commit)
06:58
07:09 slacko22403 joined 07:11 jack_rabbit left, jack_rabbit joined, gfldex joined
dalek ar: 38197bc | moritz++ | modules/doc:
Update to newer doc
07:13
moritz home.p6c.org/~moritz/rakudo-star-20...rc1.tar.gz release candidate of the 2015.02 star release 07:15
changes since rc0: update to newer perl6/doc, update release announcements
tests very welcome
07:22 diana_olhovik_ joined 07:32 xfix joined 07:34 wicope joined 07:38 wicope left
FROGGS_ japhb: it needs review and probably changes... 07:41
yoleaux 05:49Z <japhb> FROGGS_: It sounds like /CPAN and /eleven branches are ready to land. Anything still standing in your way before merging? (Especially since it's right after the release, so we have lots of time to pick up the pieces if anything breaks ....)
FROGGS_ japhb: the panda/CPAN does not work on windows yet, because Compress::Gzip does not ship a windows dll yet, and panda should fall back to system tools in case the lib is not there 07:42
japhb: to land panda/eleven we need to put some work to make CompUnitRepo::Local::Installation saner 07:43
07:45 wicope joined
FROGGS_ japhb: so something where everyone can help is to test and patch this on his/her platform: github.com/retupmoca/P6-Compress-Zlib-Raw 07:51
retupmoca: can I ask you for a compress-zlib(-raw) commit bit? I see a lot of hacks in there about missing this that are there now 07:53
retupmoca: I also have a bunch of different boxes to test my changes right 07:54
retupmoca: I'd work in a branch until it works on all of my platforms
r: use MONKEY_TYPING; augment slang Regex { token numish { \d+ } }; 08:02
camelia rakudo-parrot 114659: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1424505771.58768␤»
..rakudo-moar 114659: OUTPUT«===SORRY!===␤QAST::Block with cuid cuid_1_1424505772.89936 has not appeared␤»
08:05 prime left 08:08 jack_rabbit_ joined 08:11 jack_rabbit left 08:13 prime joined 08:20 darutoko joined 08:21 jluis joined 08:32 gfldex left 08:35 rurban joined 08:36 c0m0 joined 08:42 slacko22403 left 08:43 slacko22403 joined, Sir_Ragnarok left 08:45 Sir_Ragnarok joined 08:49 jack_rabbit_ left 08:50 sqirrel_ joined 08:53 jack_rabbit_ joined 08:55 wicope_ joined, wicope_ left 09:03 raiph joined 09:05 Rounin joined 09:20 _mg_ joined 09:23 slacko22403 left 09:30 spider-mario joined 09:32 _mg_ left 09:36 c0m0 left
vendethiel \o, #perl6 09:36
09:37 coffee` joined 09:41 raiph left 09:43 _mg_ joined 09:44 sqirrel_ left 09:53 kurahaupo joined 09:55 larion joined 09:58 _mg_ left 10:00 kurahaupo left 10:09 espadrine_ joined 10:22 mvuets joined 10:31 Kristien joined 10:32 perl6_newbee joined
perl6_newbee hi all 10:32
10:34 kjs_ joined
moritz \o 10:42
Kristien hi 10:44
10:44 mvuets left, kjs_ left 10:47 mvuets joined 10:48 FROGGS[mobile] joined
FROGGS[mobile] o/ 10:49
rindolf perl6_newbee: hi. 10:56
FROGGS[mobile]: hi, sup? 10:57
FROGGS[mobile] rindolf: too much
rindolf FROGGS[mobile]: ah.
10:58 espadrine_ left
vendethiel "2015.07 – I like trains! Fast trains, that is … (p6weekly.wordpress.com)" seems like someone from the future posted something on r/perl :) 11:01
11:03 Kristien left 11:13 kjs_ joined 11:14 dolmen joined 11:24 Mudguts left 11:25 fernand__ left, fernand__ joined 11:30 espadrine_ joined
[ptc] moritz++ 11:51
moritz: just noticed that doc.perl6.org hasn't been updated since 17:20 yesterday. Is there a problem with the cronjob? 11:53
11:56 firefish5000 left
masak good afternoon, #perl6 11:57
11:58 Kristien joined
diakopter masak: imma lookit ur ropeybug 11:58
[or has it been fixed]
masak diakopter: hasn't. 11:59
also, \o/
diakopter! \o/
diakopter if rt.perl.org ever replies
tadzik oh hai diakopter
diakopter what's the golfiest repro 12:00
m: say ("0" x 3 ~ "1").substr(2)
camelia rakudo-moar 114659: OUTPUT«00␤»
masak now imagines a scenario where diakopter read masak's blog post, and went "ropes! ropes! this is a job for... [wardrobe moment] diakopter-man!"
diakopter: yeah, that's probably the golfiest.
diakopter that's likely golfy enough to decipher by inspection 12:01
mst masak: I'
masak: I'm pretty sure I know the PAUSE id of at least one member of the L.A. Rope Group
masak mst: I fear I don't have enough context to appreciate that comment. :) 12:02
diakopter considers the intersection of rope fetish and rope walking
mst diakopter evidently does. 12:03
masak getting roped into punning here.
mst I still have to fight the urge to twitch every time she says "hey, I invented a new tie" 12:04
12:04 c0m0 joined
diakopter so, which approach to finding the bug problem WOULD be lazier - building rakudo-m from scratch, or reading the code on github 12:06
12:06 kjs_ left
mst diakopter: both 12:06
diakopter: you start the scratch build in a fresh checkout 12:07
diakopter masak: does an analogous problem occur using nqp:: ops only?
mst diakopter: then read the code and see if you can spot it before the build explodes
Sufficiently Creative Laziness etc.
diakopter hum, I wonder if I have git or a C compiler on this machine
12:08 Sqirrel left
masak diakopter: haven't tried it using just nqp:: ops 12:09
diakopter lazybrain fails to recall the proper nqp:: ops
12:10 FROGGS_ left 12:13 FROGGS_ joined 12:17 raiph joined
masak isn't there, like, a list somewhere? 12:18
diakopter LINEAR SEARCH OOOOO_OOO 12:19
12:19 c0m0 left
masak .oO( I'm sorry, this search will take a while, as you requested a character far into the string ) 12:20
12:21 Sqirrel joined
diakopter m: say ("0" x 3 ~ "1").substr(4,*-1) 12:21
camelia rakudo-moar 114659: OUTPUT«Code object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/sDfEQEkn9C:1␤␤Code object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/sDfEQEkn9C:1␤␤===SORRY!===␤Unhandled excepti…»
diakopter waaaaat
vendethiel probably the * 12:22
12:22 kjs_ joined
diakopter m: say ("0" x 3 ~ "1").substr(*-2) 12:22
camelia rakudo-moar 114659: OUTPUT«00␤»
vendethiel not allowed as the second argument then :P
FROGGS_ m: say ("0" x 3 ~ "1")
camelia rakudo-moar 114659: OUTPUT«0001␤»
diakopter m: say ("0" x 2 ~ ("1"x 3) ~ "0").substr(*-2) 12:23
camelia rakudo-moar 114659: OUTPUT«11␤»
diakopter o_O
masak: ^ 12:24
m: say ("0"x 3 ~ ("1"x 3) ~ "0"x 3).substr(*-4) 12:25
camelia rakudo-moar 114659: OUTPUT«1100␤»
diakopter m: say ("0"x 3 ~ ("1"x 3) ~ "0"x 3).substr(*-5)
camelia rakudo-moar 114659: OUTPUT«11000␤»
diakopter *cry*
moritz [ptc]: doc.perl6.org/build-log/ might have answers 12:26
segfault :( 12:27
FROGGS_ m: say $*VM.config<dll> 12:28
camelia rakudo-moar 114659: OUTPUT«lib%s.so␤»
12:28 molaf_ left
[ptc] moritz: ah, that location is good to know 12:29
dalek c: ea0f45f | paultcochrane++ | lib/Type/X/Attribute/Undeclared.pod:
Capitalise title keyword so that htmlify can find it
12:31
c: bb27cf2 | paultcochrane++ | lib/Type/X/Placeholder/Block.pod:
Correct X::Placeholder::Block class name
[ptc] moritz: which version of perl6 is it using? 12:32
moritz [ptc]: I think we need a README for htmlify, and mention the log dir there
[ptc]: something shortly before the 2015.02 release
12:33 larion left
moritz [ptc]: fwiw I can give you an account on hack.p6c.org so that I'm not the only one maintaing the doc.perl6.org build 12:33
rakudobrew@hack:~$ perl6-m --version
This is perl6 version 2015.01-223-g313ea7b built on MoarVM version 2015.01-72-g9106bee
diakopter sorry if this doesn't exist yet, but how do I get a dump of every moarop executed within a particular invocation in p6 source
colomon diakopter: looking at the source to substr in github, isn’t line 1567 wrong? 12:34
[ptc] hrm, that version should work
colomon github.com/rakudo/rakudo/blob/nom/...r.pm#L1567
diakopter colomon: which substr
oh
FROGGS_ diakopter: moar --dump ...
[ptc] moritz: you can give me an account if you want; then I can help out as need be
colomon nqp::istype($from, Callable) — $from is defined as my int $from five lines above
FROGGS_ diakopter: cat `which perl6-m` and then insert the --dump
[ptc] moritz: especially helpful if you're on holiday or somewhere without internet etc.
moritz [ptc]: what username do you want?
diakopter --dump used to dump the bytecode
colomon perhaps should be nqp::istype(from, Callable) 12:35
diakopter not a trace of moarop executions
FROGGS_ diakopter: right, but it is the only thing you have
Kristien I just did #undef __GNUC__
:(
diakopter I thought there was a fancy trace thing 12:36
dalek c: 3369c3a | paultcochrane++ | htmlify.p6:
Mention location of htmlify build logs
FROGGS_ diakopter: you probably mean the spesh log?
colomon m: say “000111000".substr(*-4) 12:37
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZNCJQb65Pf␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument␤at /tmp/ZNCJQb65Pf:1␤------> 3say 7⏏5“000111000".substr(*-4)␤ expe…»
FROGGS_ colomon: smart quotes
colomon “smart” quotes, you mean
FROGGS_ hehe, yeah
[ptc] moritz: "ptc" should do; if you want something longer (due to e.g. security) then "cochrane"
colomon > ("0"x 3 ~ ("1"x 3) ~ "0"x 3).Str.substr(5) 12:40
1100
diakopter I thought it was already a Str 12:42
perl6_newbee sorry, for disturbing, but I can not figure out how arrays as main parameter works. I have a sub MAIN(Str :$file, Str :@tags). 12:45
However every time I call my script I get the usage message. perl6 script.p6 --file=irgendwas --tags=wasanderes 12:46
How is the format for array parameter?
the help says --tags=<Positional[Str]>
dalek c: 2f506b6 | paultcochrane++ | util/update-and-sync:
Temporarily turn off syntax highlighting

This is to check pygmentize's effect on html build stability
12:47
12:51 aborazmeh joined, aborazmeh left, aborazmeh joined 12:54 ggoebel111111114 left 12:55 raiph left 12:56 ggoebel111111114 joined
dalek c: 0548853 | moritz++ | htmlify.p6:
htmlify: option for disabling Inline::Python
12:58
13:00 raiph joined
dalek c: 12cfc6a | moritz++ | util/update-and-sync:
Restore hilighting, though without Inline::Python
13:01
c: 96d4af2 | moritz++ | util/update-and-sync:
record htmlify time
13:06
FROGGS_ perl6_newbee: that's a known issue... leave away the Str constraint for now
perl6_newbee ah, thanks a lot froggs
FROGGS_ m: say Array[Str] ~~ Array[Str]
camelia rakudo-moar 114659: OUTPUT«False␤»
FROGGS_ that should be true 13:07
moritz thought that jnthn++'s mop stuff had fixed that, seems he was wrong
13:08 pmurias joined
pmurias hi 13:08
perl6_newbee without the Str contraint I still get the usage help. This time saying --tags=<Positional>. 13:09
hello
moritz \o pmurias
FROGGS_ perl6_newbee: can you make it slurpy instead?
perl6_newbee slurpy?
for each str a parameter on its own? 13:11
psch a named array parameter needs multiple instances of the cl-argument it seems 13:12
i.e. "perl6 test.pl6 --tags='foo' --tags='bar'" works for me 13:13
moritz that's a bug; a single one should work
psch but only one --tags doesn't
perl6_newbee aah psch is right. several --tags parameter and the script works 13:14
dalek c: cb7856f | moritz++ | htmlify.p6:
htmlify: document the build process in the comments
13:15
perl6_newbee until it is fixed I will use Str and split it at the ',' char. thx for the help
psch ooc, is that designed? i.e. should "--tags=foo,bar,baz" select an :@tags candidate and split on ','` 13:16
?
perl6_newbee that would be very convenient. by the way I thought it works this way 13:17
psch it seems a bit too magic to me on first impression 13:18
vendethiel yeah. maybe --tags=a --tags=b would make more sense
perl6_newbee I am a lazy person, even when enter command line parameter... 13:19
moritz the problem is passing things that contain commas 13:28
13:28 ribasushi left
psch m: sub f($, @) { }; say &f.cando(Capture.new(list => [Any, Array])); say &f.cando(Capure.new(list => [Any, Any])) 13:28
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cG0UnnxGSe␤Undeclared name:␤ Capure used at line 1. Did you mean 'Capture'?␤␤»
psch m: sub f($, @) { }; say &f.cando(Capture.new(list => [Any, Array])); say &f.cando(Capture.new(list => [Any, Any]))
camelia rakudo-moar 114659: OUTPUT«sub f (Any $, @) { #`(Sub|74269672) ... }␤␤»
psch that's why one --tags doesn't dispatch to the :@tags candidate 13:29
which i suppose is correct, but makes the MAIN stuff kinda complicated
(note the second .cando doesn't find &f)
moritz there's extra argument massaging for MAIN
it needs to take that into account
psch moritz: yeah, the extra argument massaging has to assume every named could be an array as i see it 13:30
we don't get an implicit *@_ though i think, which makes that kinda ok, maybe :/
13:35 ribasushi joined 13:37 raiph left 13:39 lol_ joined
lol_ hi all! 13:40
when perl 6 will be released?
xfix lol_: On Christmas. 13:41
I mean, by Christmas. 13:42
lol_ xfix: itsclearigetit, thanks 13:43
[ptc] lol_: it looks like Christmas could be in September this year, though it's not 100% certain 13:45
dalek kudo/nom: 51593ce | colomon++ | src/core/Str.pm:
Fix typo in substr.

Old code checked nqp::istype($from, Callable), but this will always be false, as $from is defined as an int five lines above. Presumably nqp::istype(from, Callable) was actually meant, so I have switched it to that.
13:48
perl6_newbee cool, christmas is in September this year. I am happy
masak lol_: are you waiting for Perl 6 to be released? 13:50
lol_: you know you can try it already, right?
timotimo colomon: good catch 13:53
lol_ i dont know anything about perl. is perl 6 feature freezed?
colomon timotimo: I was trying to look at the bug diakopter++ is working on, and this one jumped out at me
FROGGS_ lol_: no, it is not dead yet :o)
lol_: I would consider COBOL to be feature freezed 13:54
Perl 6 is feature rich
lol_ and whats about testing? 13:56
FROGGS_ lol_: testing what?
colomon Hurm, should have tested my change before pushing, it’s still kind of gnarly. 13:57
lol_ FROGGS_: COBOL. and perl 6, btw (all the richness) 13:59
FROGGS_ lol_: I don't get what you are saying... but if you talk about Perl 6's specification test suite, that lives in a repository called roast 14:00
lol_: here are records of daily runs: github.com/coke/perl6-roast-data/b..._rates.csv 14:01
14:02 raiph joined
masak lol_: I write lots of tests for most of my Perl 6 code. 14:03
14:04 grondilu joined
[Coke] ... crap. can someone reset my password on hack? 14:04
14:05 [Coke] left, [Coke] joined
dalek c: 1266647 | paultcochrane++ | util/update-and-sync:
Replace hard tabs with spaces
14:13
c: 38dfcf2 | paultcochrane++ | / (2 files):
Merge branch 'master' of github.com:perl6/doc

Conflicts: util/update-and-sync
Conflits resolved successfully
c: 6eb6fa8 | paultcochrane++ | lib/Type/IO.pod:
Correct links to `say` and `close`
c: 97af8f4 | paultcochrane++ | lib/Type/IO/FileTestable.pod:
Extend discussion of file test operators
lol_ ROGGS_, masak: thank for answers 14:14
FROGGS_ lol_: pleasure 14:17
[Coke] ok, ptc gave me a password change, I changed it... and now I can't login from the machine that doesn't have the key still. wtf. 14:22
I suspect I need another reset, maybe I fat fingerd something. one sec. 14:23
14:23 lol_ left
[Coke] moritz++ [ptc]++ # can now connect from new desktop. 14:25
moritz m: use sort; &sqrt.wrap(-> $n { say "wrapped!"; nextsame }); sqrt(4) 14:29
camelia rakudo-moar 114659: OUTPUT«===SORRY!===␤Could not find sort in any of: /home/camelia/rakudo-inst-1/languages/perl6/lib, /home/camelia/rakudo-inst-1/languages/perl6␤»
moritz m: use soft; &sqrt.wrap(-> $n { say "wrapped!"; nextsame }); sqrt(4)
camelia ( no output )
moritz why doesn't this call the wrapper?
14:29 dolmen left
vendethiel use soft?! 14:30
moritz soft binding
to enable such wrappings
(I thought) 14:31
vendethiel well, you're wrapping sqrt, but discarding it right after
moritz discarding? how so?
psch m: use soft; &sqrt.=wrap(-> $n { say "wrapped!"; nextsame }); wrapped-sqrt(4)
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/41e7eu0WTF␤Undeclared routine:␤ wrapped-sqrt used at line 1␤␤»
psch eh
m: use soft; &sqrt.=wrap(-> $n { say "wrapped!"; nextsame }); sqrt(4)
vendethiel wrap() returns a new routine
camelia rakudo-moar 114659: OUTPUT«Cannot modify an immutable Sub+{<anon>}+{Wrapped}␤ in method dispatch:<.=> at src/gen/m-CORE.setting:1334␤ in block <unit> at /tmp/RbMQuDfClG:1␤␤»
xfix [15:01] <FROGGS_> lol_: here are records of daily runs: github.com/coke/perl6-roast-data/b..._rates.csv
psch vendethiel: doesn't look like it, from the error message there
xfix Any idea why Perl 6 implementations long time ago did 273.72% of test suite?
psch it has +{Wrapped} before the assignment 14:32
vendethiel because they were awesome.
they still are, btw :P
moritz vendethiel: wrappings are supposed to be in-place
vendethiel m: use soft; my &foo = sqrt.wrap(-> $n { say "wrapped!"; nextsame ); foo(4)
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AaybrItOXG␤Unsupported use of bare 'sqrt'; in Perl 6 please use .sqrt if you meant $_, or use an explicit invocant or argument␤at /tmp/AaybrItOXG:1␤------> 3use soft; my &foo = sqrt7⏏5.wrap(-> $n { s…»
FROGGS_ xfix: I have no idea
vendethiel m: use soft; my &foo = &sqrt.wrap(-> $n { say "wrapped!"; nextsame ); foo(4)
moritz and with --optimize=off, it works
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NSRsgTLhqd␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/NSRsgTLhqd:1␤------> 3t.wrap(-> $n { say "wrapped!"; nextsame 7⏏5); foo(4)␤ expecting any of:␤ argument…»
vendethiel 's never really happy with in-place mutations :-). 14:33
moritz: how is it scoped?
moritz vendethiel: dunno
ok, reading S06, it seems that the routine declaration that is wrapped must be in scope of a 'use soft;' 14:36
not just the place where it's wrapped and called
dalek kudo/nom: 022e452 | colomon++ | src/core/Str.pm:
Further tweak error messages from substr.

Previously a range error from a Callable argument always produced a "Code object coerced to string" message. This fix gives the actual number that the code object calculates.
14:38
14:39 smls joined
smls m: say $_ for 0..3 if True; 14:39
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/P5da7SfwZk␤Missing semicolon.␤at /tmp/P5da7SfwZk:1␤------> 3say $_ for 0..3 7⏏5if True;␤»
smls m: say $_ for 0..$_ for 2, 3;
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1fFnAKv8hY␤Missing semicolon.␤at /tmp/1fFnAKv8hY:1␤------> 3say $_ for 0..$_ 7⏏5for 2, 3;␤»
smls ^^ NYI, or are statement modifiers not supposed to be chained arbitrarily? 14:40
14:40 _mg_ joined
moritz they aren't 14:40
iirc only one level of if/for nesting is allowed
m: say $_ if $_ for 0..3
camelia rakudo-moar 114659: OUTPUT«1␤2␤3␤»
smls how come? 14:41
Seems like a case where the complex use-cases could fall out naturally from a simple rule ("add a statement modifier, get a new statement") 14:42
14:42 _mg_ left
smls rather than having "... if ... for ..." as a special case 14:42
vendethiel m: .say if True if True for ^3; 14:43
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ahj_5yNMxl␤Missing semicolon.␤at /tmp/Ahj_5yNMxl:1␤------> 3.say if True 7⏏5if True for ^3;␤»
vendethiel indeed.
smls Although allowing "... for ... if ..." might confuse people with a python background 14:44
dalek c: ba46aa9 | moritz++ | lib/Language/functions.pod:
More use cases for nextsame and friends
14:45
[ptc] Where does roast get run at present? Only Rakudo, or also the other implementations? 14:48
The reason I ask is that use-ok has been recently added to Rakudo and I want to correct what is in the roast tests to match tyat
*that 14:49
colomon is apparently trying to get as many ++s as possible by adding or removing dollar signs from substr….
vendethiel pings [Coke] on that matter
skids
.oO(NativeCall binding to perl5 XS .so files... there's a concept.)
mst colomon++ # inventive approach 14:50
moritz [ptc]: I don't think anybody runs roast with niecza yet 14:51
[ptc]: but I'm against wide-spread use of 'use-ok' until it actually imports the symbols into te caller's scope, as 'use' does
(unless it already does that) 14:52
[ptc] moritz: ok, so updating the (not yet run, afaict) 1-basic.t tests should work ok
moritz: that's on the todo list
moritz would be surprised if it worked without marcro support 14:53
[ptc] moritz: it doesn't import symbols yet
moritz: what I'm trying to fix in roast is that use_ok is used there, even though it wasn't implemented anywhere
moritz: thus I'd just like to rename the function to match current calling conventions
moritz [ptc]: ah, ok. Might have been a p5ism
[ptc] moritz: yes, I've got a PR waiting in the wings which renames the test functions to use hyphenated versions 14:54
moritz: but I wanted to test the Test module first before I submit
14:54 fhelmberger joined
[ptc] wonders why the test functions in roast all want a :todo option... 14:55
14:56 Kristien left
dalek ast: ec00053 | paultcochrane++ | S24-testing/1-basic.t:
Fix typo in S24-testing/1-basic.t
14:57
ast: 9e877fc | paultcochrane++ | S24-testing/1-basic.t:
Remove trailing whitespace
ast: 86d0806 | paultcochrane++ | S24-testing/1-basic.t:
Wrap lines nicely in POD
ast: f0dad37 | paultcochrane++ | S24-testing/1-basic.t:
Rename use_ok -> use-ok

use-ok has now been implemented in Rakudo's Test.pm using the newer Perl 6 style function naming convention (with hyphens instead of underscores), hence this change.
14:59 fhelmberger left, Kristien joined
dalek p/sizeof: 2e9ec95 | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
map nativecallsizeof op on moar
15:01
kudo/sizeof: 5bc543d | FROGGS++ | lib/NativeCall.pm:
add nativesizeof sub
15:02
kudo/nom: 83072af | colomon++ | src/core/Str.pm:
Eliminate another ugly error message from substr.

This time it was for using a code object that resulted in an index too big for the string.
15:03
15:03 kjs_ left, aborazmeh left
FROGGS_ .tell retupmoca say nativesizeof(z_stream) / 8; # 112 15:04
yoleaux FROGGS_: I'll pass your message to retupmoca.
15:05 Rounin left
skids Wow, if all the Test underscores go, that's going to be one big s/// diff on roast :-) 15:05
FROGGS_ ohh, hups
sizeof returns number of bytes, ehh?
skids In C, yes. 15:06
15:06 jluis left, mr-foobar joined
FROGGS_ yeah, had a thinko 15:07
( github.com/MoarVM/MoarVM/commit/c314d3dffc )
arnsholt FROGGS_: Multiple of the size of char, technically
FROGGS_ arnsholt: ahh, interesting 15:08
arnsholt So sizeof(char) is defined to be 1 15:09
Of course that's mostly a technical footnote in this age
FROGGS_ hopefully :o) 15:10
skids Thankfully. Could you imagine... ick.
15:10 jbd___ joined
geekosaur doesn't have to imagine; worked with a PDP10 in pre-college 15:10
FROGGS_ everything will break... I often see sizeof(...)*8 15:11
masak m: say "Mirror mirror on the wall, when will Perl 6 release?"; say Date.new 15:13
camelia rakudo-moar 114659: OUTPUT«Mirror mirror on the wall, when will Perl 6 release?␤2015-12-24␤»
masak \o/
15:14 zakharyas joined
mst you've ... changed the date on the bot for a pun 15:15
mst applauds
timotimo no
Date.new creates "a date object"
there's no sensible default, so what we do is assign the coming christmas
mst hah 15:16
timotimo m: say Date.new(now)
camelia rakudo-moar 114659: OUTPUT«2015-02-21␤»
timotimo m: say Date.now
camelia rakudo-moar 114659: OUTPUT«No such method 'now' for invocant of type 'Date'␤ in block <unit> at /tmp/zZxYq6S_E0:1␤␤»
timotimo m: say Date.today
camelia rakudo-moar 114659: OUTPUT«2015-02-21␤»
timotimo m: say Date.tomorrow
camelia rakudo-moar 114659: OUTPUT«No such method 'tomorrow' for invocant of type 'Date'␤ in block <unit> at /tmp/lsq6dZLEY8:1␤␤»
timotimo :P
masak mst: I'm reckless, but not that reckless :P 15:17
mst: but yeah, Date.new is a nice in-joke, and one that I don't mind.
timotimo: I wouldn't mind a method Date.tomorrow (and Date.yesterday), actually.
timotimo: thought Date.today + 1 is al quite short and unambiguous... 15:18
15:19 jluis joined
timotimo fair enough 15:21
dalek kudo/nom: 639886b | paultcochrane++ | lib/Test.pm:
Add expandtab and shiftwidth=4 to Test.pm vim coda

This means hard tabs are replaced with spaces and tabs have a width of 4 as wished for by TimToady++.
15:25
kudo/nom: 571ab31 | moritz++ | lib/Test.pm:
Merge pull request #369 from paultcochrane/pr/add_expandtab_to_vim_coda

Add expandtab and shiftwidth=4 to Test.pm vim coda
15:33 telex left 15:34 telex joined 15:35 jack_rabbit_ left 15:36 leigh964 joined, jbd___ left 15:39 leigh964 left 15:43 perl6_newbee left
dalek ast: 303fb0d | paultcochrane++ | S24-testing/ (6 files):
Add vim coda to test files
15:43
ast: dd43dec | paultcochrane++ | S24-testing/6-done_testing.t:
Add missing use v6; pragma
15:45 perl6_newbee joined
pmurias is there a reason why someone would call Date.new? 15:45
moritz curiosity? 15:46
15:46 Rounin joined
pmurias shouldn't we die instead of returning a stupid value? 15:47
moritz maybe we should
but were would be the fun?
perl6_newbee lol
pmurias moritz: the fun would be not having to debug a bug caused by someone trying to be funny 15:48
moritz pmurias: sounds like a very abstract idea of fun :(
like from somebody who has never experienced fun, only read about it from books 15:49
perl6_newbee hmm maybe my question is lost. once more:
I have a script with a sub MAIN(several parameters) at the top. Always the usage is shown if I call it without parameters 15:50
I have add a line code just before the MAIN declaration. my $sql = SqlWrapper.new(some paramters); And now the usage is no longer printed. Is that a bug? 15:51
moritz perl6_newbee: I'd have to read it up in S06 myself, but I'd tend to think it's a bug 15:53
perl6_newbee thx
its enough to declare a variable just like "my $sql;". Still no usage. 15:55
vendethiel I agree with pmurias, a lot, here
psch design.perl6.org/S06.html#Declaring...subroutine strongly suggests it's buggy, yeah
vendethiel is it bad if Date.new is an alias for Date.today?
smls "shouldn't we die instead of returning a stupid value" +1 15:56
moritz die "Whom do you want to Date?"
15:58 tadzik left
perl6_newbee ups, usage is not shown, because the main sub is invoked, but without any parameter set. weird. possible my fault 15:58
moritz m: my $thingy = 42; sub MAIN(:$required!) { say "IN MAIN" }
camelia rakudo-moar 114659: OUTPUT«Usage:␤ /tmp/aPnfe0ZyAx --required=<Any> ␤»
pmurias new Date() returns the current moment in time in javascript 15:59
moritz knows the sinking feeling in his stomach when he realizes his toys/easter eggs are about to be removed 16:00
psch duhs 16:01
moritz++ # i had the same thinko as perl6_newbee
hm, array args in MAIN seem grossly under-designed 16:03
i have a patch that solves the "sub MAIN(:@tags) { }; " & "./test --tags='bar'" from before, but i'm not sure if there's cases it could break 16:04
the existing tests (that passed before) still pass, but none of them tests for array behavior
perl6_newbee :-) psch 16:05
moritz psch: so add more tests
psch moritz: yeah, i'm having trouble identifying behaviors that seems correct, seeing as S06 doesn't talk about array params at all 16:06
well, except for slurpy positional
moritz psch: :@tags being filled by multiple --tags=... occurrences on the command line is consistent with p5's Getopt::Long, and "obviosuly correct" to me :-) 16:07
perl6_newbee moritz: thanks for looking. I could swear the usage was shown even all parameter was *not* mendatory. Anyways, I cannot reproduce it. 16:08
moritz perl6_newbee: ok. If you happen to be able to reproduce it again, please rakudobug it
perl6_newbee ok, where can I file a bug report? 16:09
psch moritz: that case already works, only one occurence of --tags is what's broken. i'm more concerned about interaction of my patch with e.g. «multi MAIN(:$foo) { }; multi MAIN(:@foo) { }»
16:10 rurban1 joined
moritz perl6_newbee: mailto:rakudobug@perl.org 16:10
perl6_newbee ah ok. bug tracker at rakudo.org/tickets
moritz psch: so, write tests for those too
perl6_newbee afk
16:11 raiph left 16:17 raiph joined 16:18 Kristien left
psch $ ./perl6 -e'sub MAIN(:$foo) { say $foo.perl }' -- --foo="bar" --foo="baz" 16:22
["bar", "baz"]
that's without my patch, fwiw
and my patch doesn't change it either, because it successfully dispatches and i only arrayify single named args when it doesn't 16:23
i suppose i should check out GetOpt::Long?
16:24 jakesyl left
psch ah, Getopt::Long needs either an arrayref as target or an '@' in the desciptor to allow multiple occurences 16:25
which i think means our current behavior is arguably wrong?
moritz yes 16:34
16:36 Kristien joined
Kristien hi 16:36
vendethiel hi 16:42
16:43 tadzik joined
moritz is amused that github.com/OTRS/FAQ shows Perl6 in the language statistics 16:43
FROGGS_ moritz: has birdless landed already? 16:44
vendethiel moritz: github.com/OTRS/FAQ/search?l=perl6 :P
moritz FROGGS_: yes (in rakudo) 16:45
not yet in star
which reminds me, I should release star.
FROGGS_ moritz++
moritz (I have a local birdless star branch)
16:50 adu joined
TimToady seeing 'is repr<CStruct>' and such, I'm wondering if we can have a disambiguation syntax for ISA, such that 'is Man' is short for 'is a(Man)' when there is no Man trait 16:59
lizmat TimToady: that's how it works already ? 17:00
TimToady m: class Foo is a(Int) {} 17:01
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XKAo8EzvU3␤'Foo' cannot inherit from 'a' because it is unknown.␤at /tmp/XKAo8EzvU3:1␤------> ␤»
TimToady don't think so
lizmat ah, ok
gotcha now, the other way around
17:01 _mg_ joined
lizmat you want to add "is a(Man)", not add "is Man" 17:02
TimToady we already have is Man
as in Socrates is a Man
lizmat yeah... :-)
TimToady well, that would be Man.new, but yeah
or Man.old maybe :) 17:03
TimToady wonders if he will be forced to drink hemlock for corruping the youth
lizmat
.oO( even the corruption is corrupted )
17:05
TimToady yeah, that birot
or was that bitro
?
FROGGS_ that can quickly turn into bistro 17:06
TimToady wait, that's byterot
lizmat
.oO( wrdrot )
TimToady would be more like bitrod 17:07
dalek ar: 427ef56 | moritz++ | modules/doc:
downgrade "doc" to before use_ok
17:09
17:12 _mg_ left
moritz there I was, bumping the version of doc between star release candidates, because "it's just documentation" 17:15
foolish me
17:16 jluis left, diana_olhovik_ left 17:18 diana_olhovik joined
TimToady m: given [+]('bitrot'.ords.reverse Z* (1,256,65536...*)) { say ($_ +^ (1,2,4 ... 2 ** .msb).pick).polymod(256 xx *).reverse.chrs } 17:18
camelia rakudo-moar 114659: OUTPUT«bitvot␤»
TimToady m: given [+]('bitrot'.ords.reverse Z* (1,256,65536...*)) { say ($_ +^ (1,2,4 ... 2 ** .msb).pick).polymod(256 xx *).reverse.chrs }
camelia rakudo-moar 114659: OUTPUT«bi4rot␤»
lizmat colomon++ # for cleaning up after me
TimToady m: given [+]('bitrot'.ords.reverse Z* (1,256,65536...*)) { say ($_ +^ (1,2,4 ... 2 ** .msb).pick).polymod(256 xx *).reverse.chrs }
camelia rakudo-moar 114659: OUTPUT«ritrot␤»
dalek c: 5ef5cef | paultcochrane++ | lib/Language/testing.pod:
Document $ex_type argument in throws_like()
TimToady probably an easier way to do that... 17:19
lizmat oddly enough, my typo in the refactor did not cause any spectest damage, so I guess we need to add some tests
colomon lizmat++ # getting all the nice error messages there in the first place… 17:20
17:22 gfldex joined
lizmat colomon: I just reformatted them, they were there before :-) 17:22
colomon Well, either you improved them or it wasn’t you I was cleaning up after. :)
colomon thinks he may have written one of the versions of substr, oh, about six years ago… 17:23
17:23 BenGoldberg joined
psch wonders how long we're gonna keep "The following step can take a long time, please be patient." around 17:24
lizmat Stage parse : 64.438 # is this a long time? (JVM parse, BTW) 17:26
vendethiel doesn't know about JVM parse times 17:27
[ptc] if a function has a slurpy parameter, how can one pass this information on to another function?
vendethiel [ptc]: I'm not sure what you mean 17:28
[ptc] for instance, I'm trying to rename throws_like() to throws-like() and simply pass the arguments from one to the other
vendethiel: sorry, was still typing :-)
vendethiel I think |%c should work
m: sub foo(%a) { say %a.perl; }; sub bar(%a) { foo(|%a); }; bar():a; 17:29
camelia rakudo-moar 114659: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in sub bar at /tmp/LXGBJhjCoK:1␤ in block <unit> at /tmp/LXGBJhjCoK:1␤␤»
[ptc] so, if throws_like is defined like so: throws_like($code, $ex_type, $reason?, *%matcher)
vendethiel m: sub foo(*%a) { say %a.perl; }; sub bar(*%a) { foo(|%a); }; bar():a;
camelia rakudo-moar 114659: OUTPUT«("a" => Bool::True).hash␤»
vendethiel here.
[Coke] [ptc]: perl6-roast-data is run on a linux box. all the rakudo implementations are run. niecza and pugs don't build on that the latest box we were running them on, so they are not enabled currently. Even if they were, we'd deal with it. 17:30
[ptc] then I can rename it to throws-like($code, $ex_type, $reason?, *%matcher) and have throws_like() pass with |%c?
TimToady m: sub foo(*%a) { say %a.perl; }; sub bar(|c) { foo(|c); }; bar():a; 17:31
camelia rakudo-moar 114659: OUTPUT«("a" => Bool::True).hash␤»
TimToady even easier
m: sub foo($arg, *%a) { say $arg, %a.perl; }; sub bar(|c) { foo(|c); }; bar(42):a;
camelia rakudo-moar 114659: OUTPUT«42("a" => Bool::True).hash␤»
[ptc] so to be concrete: does this work? throws-like($code, $ex_type, $reason?, *%matcher) { throws-like($code, $ex_type, $reason?, |matcher) } ?? 17:32
[Coke] 234% - because the meaning of the percentages chagned at one point, I think. used to be rakudo-parrot was the key value. then it was changed so that "the most" was the key value (er, key==100%). The percentages are all relative for teh given day of the run, they don't mean anything in particular.
vendethiel TimToady++
[ptc] oops, I meant the first one was throws_like, not throws-like 17:33
*sigh
TimToady you're working too hard
psch [ptc]: you still need the %-sigil if you want to go that way
TimToady just sub throws_like (|c) { throws-like(|c) }
[ptc] psch: ok thanks
TimToady: ok, wow, that's easy
psch [ptc]: i'd take TimToady++'s advice though ;) 17:34
17:34 zakharyas left
TimToady you can just capture the whole, er, capture 17:34
[ptc] the problem, I think, is that I don't know 100% what I'm doing. Still on a learning curve
TimToady++ :-)
TimToady being on the learning curve is not a problem
it's just part of the process :)
TimToady still learns something new every decade or so... 17:35
[ptc] [Coke]: cool, thanks for the info
[ptc] grins
[Coke]: so, if I understand you correctly, if I start changing the S24 tests in roast, it's not a major problem? 17:36
timotimo m: say 1.24 / 1.38 17:37
camelia rakudo-moar 114659: OUTPUT«0.898551␤»
[ptc] thanks everyone, for their advice!
timotimo another 10% speed improvement for Bool.pick() and Bool.roll(). anybody interested? ;) 17:38
[Coke] [ptc]: no. make the tests right; that's we run the tests, we'll clean up afterwards if needed.
[ptc] [Coke]: sweet, thanks. Good to know 17:39
dalek rl6-roast-data: dc6a763 | coke++ | / (5 files):
today (automated commit)
[ptc] afk 17:40
dalek kudo/nom: 58bf903 | timotimo++ | src/core/Bool.pm:
make Bool.pick()/roll() another 10% faster

but for some reason this seems to still box a Num somewhere ...
17:41
lizmat timotimo++
17:41 kjs_ joined
lizmat timotimo: so there *is* a difference between using nqp::opts l)ike isge_n) when using native nums versus using >= ? 17:42
is this also true for ints ?
moritz lizmat: I guess even the inlined sub has a non-zero cost 17:43
lizmat timotimo: wrt to boxing a Num, could that be the num -> Bool conversion, ?
moritz like the guard clauses that check the types
lizmat: I'm pretty sure nqp::p6bool does not box a Num 17:44
dalek rl6-roast-data: bfc2b36 | coke++ | / (3 files):
rakudo.parrot is not currently an option;

Stop running the tests for now.
lizmat moritz: well, it turns something native into a P6 boxed object 17:45
moritz rerun with an nqp::p6bool(1) instead for comparison?
rakudo-star 2015.02 release tagged and uploaded 17:47
dalek ast: 96472ef | peschwa++ | S06-other/main-usage.t:
Add few dispatch related tests for MAIN.
17:48
psch github.com/peschwa/rakudo/compare/...l?expand=1 # is the diff of Main.pm that passes those tests 17:50
as noted in the commit message, this pretty much bypasses the dispatcher
which we kinda have to do because a Scalar in a signature can take an itemified array
*as parameter
17:52 lsm-desktop left
psch the patches now also exist as a PR (github.com/rakudo/rakudo/pull/370) with an argument why it's implemented like that 17:53
perl6_newbee bye guys 17:54
17:54 perl6_newbee left
moritz psch: the other option would be to force people to Str-type their parameters if they don't want to receive an Array 17:58
psch moritz: i.e. «multi MAIN(:$foo) { }; multi MAIN(:@foo) { }» becomes illegal? 17:59
lizmat m: say "foo".substr(3) # shouldn't this fail ??? S32/Str:460 states: "it is illegal for the start position to be outside of the string,"
synopsebot Link: design.perl6.org/S32/Str.html#line_460
camelia rakudo-moar 114659: OUTPUT«␤»
moritz m: say "foo".substr(4) 18:00
camelia rakudo-moar 114659: OUTPUT«===SORRY!===␤Start of substr out of range. Is: 4, should be in 0..3␤»
moritz lizmat: seems rakudo interprets "outside" a bit differently than you do 18:01
[Coke] that seems buggy 18:02
lizmat it is passed the last char in the string: that means outside to me
*past
moritz m: say 'foo'.substr($_) for 0..3
camelia rakudo-moar 114659: OUTPUT«foo␤oo␤o␤␤»
moritz I can see the use case for it
it feels strangely consistent in this light 18:03
lizmat well, then we need to change the synopsis
or accept the P5 behaviour
6 ""foo".substr(123456789)
m: "foo".substr(123456789)
camelia rakudo-moar 114659: OUTPUT«Unhandled exception: Start of substr out of range. Is: 123456789, should be in 0..3␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:14887 (/home/camelia/rakudo-…»
lizmat m: "foo".substr(4)
camelia rakudo-moar 114659: OUTPUT«Unhandled exception: Start of substr out of range. Is: 4, should be in 0..3␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:14887 (/home/camelia/rakudo-inst-1/l…»
moritz fwiw p5 and rakudo behave consistently
18:04 lsm-desktop joined
moritz that is, perl 5 doesn't warn on substr 'foo', 3; and returns the empty string 18:04
lizmat $ perl -E 'say substr("foo",12345)'
18:04 espadrine joined
moritz it warns and returns undef for substr 'foo', 4; 18:04
lizmat: well, use -wE :-)
perl 6 resembles perl 5 with strict and warnings more closely than without 18:05
18:05 espadrine_ left
lizmat ok, just checking :-) 18:05
moritz lizmat: I'd see it this way: it's a programming error to request characters outside the string 18:06
but requesting the empty string from the end is often enough what the programmer actually wants 18:07
lizmat ok
18:07 adu left
moritz fwiw I've gpg-signed the star release tag 18:12
lizmat moritz++ 18:13
moritz a habit we could start if the release managers don't oppose
FROGGS_ moritz: just put it in the release guide :o)
timotimo lizmat: i'm rather sure the change to isge_n shouldn't have been necessary; i was convinced rakudo's optimizer should have determined the correct native candidate and inlined it 18:14
another thing is that the one version gets jitted, the other one doesn't
moritz FROGGS_: willdo
lizmat that's also what jnthn has told me in the past
timotimo and i don't really understand that either
lizmat which one gets jitted? 18:15
the nqp one, or the other one?
18:15 BenGoldberg left
dalek ar: 0a06799 | moritz++ | tools/star/release-guide.pod:
Document this release
18:16
timotimo the one with nqp::isge_n
lizmat so maybe the problem is that the code gen doesn't generate the proper sequence ? 18:17
timotimo yes, i'll do some more investigizing later tonight, i feel
dalek p: e4193d1 | moritz++ | docs/release_guide.pod:
Release guide: sign the release tags
18:21
ar: a08a24a | moritz++ | tools/star/release-guide.pod:
release guide: sign release tag
18:22
18:23 Sqirrel left
moritz oops, I accidentally sent the release mail to perl6-language-subscribe :( 18:23
18:24 BenGoldberg joined
TimToady note that I'm currently rewriting Bool.pick to avoid floating point altogether 18:25
18:25 BenGoldberg left
timotimo the boxing and unboxing comes from spesh inlining the infix:«>=» code 18:25
18:26 BenGoldberg joined
timotimo AFK, BBIAB 18:27
lizmat timotimo: expect quite a significant general speedup if that is fixed :-)
there's a lot of code involving natives and operators like >= 18:28
especially in the hot loops
18:29 bjz left
moritz prepares Lefsa for supper 18:37
18:43 _mg_ joined 18:47 colomon left, colomon joined
timotimo TimToady: do you think Enum.roll/pick have some room for improvement? it could benefit code like ForestFire, i suspect 18:48
18:50 Rounin left
TimToady is currently trying using all 64 bits returned from rand_i before calling it again, but it's not clear whether that will be faster 18:50
timotimo you know Bool.pick only has to return either True, False, (True, False) or (False, True)? :) 18:54
18:54 BenGoldberg left 18:55 BenGoldberg joined
timotimo (i'm expecting you've really been talking about roll) (or maybe you're caching one 64bit integer result?) 18:56
TimToady I'm testing on pick, but plan to work on roll if I can make pick faster 18:57
well, I know I can make it a little faster by using rand_i and comparing with 0, but I'm gunning for more 18:58
yes, I'm caching 64 bits at a time, but the nqp ops to get bits out run about the same speed as MT does so far 19:02
in principle they should run faster, so maybe it's worth it to have code in there that may be further optimized later 19:03
19:04 lucas__ joined 19:06 mvuets left
TimToady well, crud, suddenly the old code is now faster, so now there's no measurable difference with the floaters, so I'll just forget it for now 19:09
but you'd think that multiply floaters just to pull single bit out is suboptimal 19:10
*ing
Kristien are there multidimensional arrays like in c#?
or should you create arrays of arrays?
TimToady how should I know?
Kristien you know a lot about Perl 6 :P
TimToady knows next to nothing about C# though 19:11
Kristien oh right
you can create arrays with arbitrary dimensions, like int[,] for a 2D array which can be indexed as [1, 2]. this is guaranteed to be rectangular unlike arrays of arrays 19:12
19:12 bronco_creek joined, rurban left 19:13 Mouq joined
bronco_creek o/ p6 19:13
TimToady well, to create a concrete array in P6 it'll be my int @array[3,4], but there's not yet any plan for a type representing only rectangular arrays 19:17
as currently defined you could constrain a paramater @array where *.shape[*-1] ~~ Int or so
*meter
Kristien ok :p 19:18
TimToady I suppose one could define a role that enforced that typology
but my int @array[*,*] is potentially ragged
19:19 _mg_ left
TimToady er, *;* rather 19:19
likewise 3;4 above 19:20
my int @array[1,2;3,4] wold, in theory, be an array with 1 or 2 entries in the first dimension, and 3 or 4 in the second 19:21
but it might be more important to catch the , vs ; error, or require a ; somewhere if you really mean something like that
it's not needed really for arrays, but hashes want to be able to define the sets of legal keys 19:22
my %hash{DaysOfWeek; HoursOfDay} 19:23
so enums or sets or lists would define sets of valid keys
in that dimension
(though by that set-of-keys reckoning, [1,2] is illegal, since arrays are always 0 based 19:24
19:24 grondilu left
TimToady but nothing says we have to interpet lists the same for array indices as we do for hash indices 19:25
except maybe a hobgoblin or two
so interpreting each of them as a valid size rather than a valid key seems okayish to me 19:26
19:26 Rounin joined
TimToady if we want to get that fancy, which we probably don't, at least not for 6.0 19:27
but we should reserve the syntax, so [1,2] is illegal if you really mean [1;2]
19:28 kjs_ left, grondilu joined
moritz +1 19:32
19:32 BenGoldberg left, BenGoldberg joined
bronco_creek I installed the new Rakudo* on an Ubuntu VM. The new version runs if I explicitly point to the new perl6 executable, but the "perl6" command still points to the old version. Any advice on how to fix this? 19:33
moritz bronco_creek: modify your $PATH to contain the install location of the 2015.02 release first 19:34
bronco_creek: or use github.com/tadzik/rakudobrew/ to manage your rakudo installion(s)
and then you can 'panda install Task::Star' to get all the modules that are shipped with R* 19:35
bronco_creek moritz: Thank you.
19:40 zakharyas joined 19:41 smls left 19:43 jack_rabbit_ joined 19:44 hdzz joined 19:45 _mg_ joined
_mg_ Hello. While updating homebrew to rakudo star 2015.02 I noticed one small issue with panda on at least the Mac OS platform. On the first call after the update, panda bails out with the error "Found no writable directory into which panda could be installed". After that, everything works as it should. 19:47
19:53 _mg_ left 19:58 BenGoldberg left, BenGoldberg joined
moritz can somebody on Mac OS test if .w works on dirs? 19:59
19:59 BenGoldberg left
moritz something like perl6-m -e 'say ".".IO.w' 19:59
19:59 hdzz left, BenGoldberg joined
lizmat $ ls -lsd foo 19:59
0 drwxrwxr-x 3 liz macports 102 Jan 28 23:11 foo
$ 6 'say "foo".IO.w' 20:00
True
moritz ok, so that's not it :(
lizmat $ ls -lsd foo
0 dr-xr-xr-x 3 liz macports 102 Jan 28 23:11 foo
$ 6 'say "foo".IO.w'
False
20:05 jack_rabbit_ left 20:12 kjs_ joined 20:18 zakharyas left
dalek ast: 8c619fc | lizmat++ | S06-other/main-usage.t:
Unfudge now passing tests [ptc]++
20:18
p/sizeof: 43e8467 | FROGGS++ | src/vm/jvm/ (2 files):
port nativecallsizeof op to jvm
20:19
kudo/nom: 32041d3 | lizmat++ | src/core/Str.pm:
Make substr(-rw) about 10% faster

Thanks to the wonders of Str() coercion for parameters now working
20:20
20:25 rindolf left
dalek p/js: 998c438 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Start of work on rules.
20:30
p/js: 9c089b3 | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js:
Add a hack to make nqp::istype work on number and strings.

Doing this the proper way would require though how we are going to represent native numbers as objects, BOOT type etc. We need the hack to be able to get rules to work before that.
p/js: ccb21ea | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Implement the 'pass' rxtype.
ast: deecfcd | paultcochrane++ | S24-testing/ (3 files):
Remove superfluous trailing '1;'s and trailing whitespace
20:32
fernand__ for me it's happening too: gist.github.com/anonymous/3be64d971438ee6098e5
20:33 mj41 joined 20:35 lucas__ left
fernand__ i tryed again and just worked... 20:36
20:37 bronco_creek left
fernand__ why this: sub MAIN (Str :@requires! where {require $^module}, :@resources!) { 20:39
means this: ResourceManager.p6 --requires=<Positional[Str]> --resources=<Positional> 20:40
20:40 darutoko left
fernand__ ? 20:40
what means Positional in this context?
FROGGS_ fernand__: Positional means Arrayish 20:41
20:41 bjz joined
fernand__ I'd like to run like this: --requires=Mod1,Mod2,Mod3 20:42
FROGGS_ should be this then: --requires=Mod1 --requires=Mod2 --requires=Mod3
fernand__ or --requires=Mod1 --requires=Mod2
FROGGS_ ahh, and remove the Str constraint 20:43
this is buggy still
20:43 LLamaRider joined
fernand__ but it's not working... 20:43
FROGGS_ -sub MAIN (Str :@requires! where {require $^module}, :@resources!) {
+sub MAIN (:@requires! where {require $^module}, :@resources!) {
fernand__ doesn't work too... 20:45
shows the usage message
FROGGS_ how do you call it now?
m: say (require Test)
camelia rakudo-moar 114659: OUTPUT«True␤»
FROGGS_ m: say (require foo)
camelia rakudo-moar 114659: OUTPUT«Could not find foo in any of: /home/camelia/rakudo-inst-1/languages/perl6/lib, /home/camelia/rakudo-inst-1/languages/perl6␤ in any load_module at src/gen/m-ModuleLoader.nqp:199␤ in method load_module at src/gen/m-CORE.setting:25117␤ in block <unit…»
FROGGS_ k 20:46
that part should be right
fernand__ sub MAIN (:@requires!, :@resources!) { dont works too... 20:47
perl6 -I. ResourceManager.p6 --resources=Ad --resources=User --requires=./BlogResources.pm6
maybe the require isn't working, right?
yes... if the require is the problem it should die with this error msg...
mj41 btw: "say" (or/and "print") is still slow 20:48
time perl -e 'print "$_\n" foreach 1..2_000_000' > /tmp/perl-print2
real0m0.218s
time perl6 -e 'say $_ for 1..2_000_000;' > /tmp/rakudo-say2
real0m9.569s
gist.github.com/mj41/6761c021135ae1cb17f9
FROGGS_ fernand__: --requires must appear twice I've learned earlier this day to create an array... (unless this got fixed in the meantime) 20:49
fernand__ so I cant have a array with 1 element?
20:49 zakharyas joined
FROGGS_ mj41: can you turn it into a while loop with native integers and compare again? perhaps the for loop is the slower part 20:50
fernand__: you can, when the bug is fixed
fernand__ FROGGS_: it worked...
FROGGS_: thanks! 20:51
FROGGS_ psch: are you happy with PR370?
fernand__: :o)
fernand__: PR 370 seems to be the fix to the one element array problem with MAIN 20:52
fernand__ perlfect!
*perfect 20:53
dalek kudo/sizeof: 0c0accc | FROGGS++ | lib/NativeCall.pm:
the nativesizeof op itself deconts, so we dont
20:57
kudo/sizeof: 9b60206 | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
add tests for nativesizeof

This uncovers a bug in moar about calculation the size and probably also offset of C structure members.
BenGoldberg m: sub test { for 1..$^n { return False if rand < .5 }; True }; sub incr ($n is rw) { ++$n if test $n }; for ^14 { my $cnt = 0; incr $cnt for ^2**$_; say $cnt; } 21:02
camelia rakudo-moar 114659: OUTPUT«1␤1␤2␤2␤5␤4␤5␤6␤8␤8␤11␤11␤13␤12␤»
BenGoldberg m: sub test { for 1..$^n { return False if rand < .5 }; True }; sub incr ($n is rw) { ++$n if test $n }; for ^14 { my $cnt = 0; incr $cnt for ^2**$_; say $cnt; }
camelia rakudo-moar 114659: OUTPUT«1␤2␤3␤3␤4␤6␤7␤8␤8␤8␤11␤12␤12␤12␤»
BenGoldberg m: sub test { for 1..$^n { return False if rand < .5 }; True }; sub incr ($n is rw) { ++$n if test $n }; for ^14 { my $cnt = 0; incr $cnt for ^2**$_; say $cnt; } 21:03
camelia rakudo-moar 114659: OUTPUT«1␤1␤1␤3␤3␤5␤6␤7␤7␤9␤8␤10␤12␤13␤»
21:11 espadrine left, espadrine joined
mj41 FROGGS_: gist.github.com/mj41/6761c021135ae...e1-txt-L54 gist.github.com/mj41/6761c021135ae...1-txt-L133 21:12
FROGGS_ mj41: I see 21:14
so, it is say()
Mouq mj41++
also, o/ #perl6
FROGGS_ hi Mouq 21:15
mj41 yes, say ... irclog.perlgeek.de/perl6/2014-05-21#i_8753753
Mouq FROGGS++ too # all kinds of awesome nativecall work 21:17
moritz FROGGS_++ indeed
21:18 diana_olhovik left
BenGoldberg m:p5/^FROGGS_?$/++ 21:21
21:21 jack_rabbit_ joined
FROGGS_ *g* 21:26
timotimo i'd like printing to be faster 21:29
21:30 dolmen joined, jack_rabbit_ left
FROGGS_ .oO( Save the environment - Think before you print! ) 21:36
dalek p/sizeof: 3764d99 | FROGGS++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java:
return size of CStructs correctly in bytes
21:38
pmurias hmm, would it be possible to create a general code pretty printing tool, that would take a grammar (and a bunch of hints) and prettify code? 21:39
21:39 zakharyas left
FROGGS_ hmmmm, I doubt it 21:40
21:40 Sysaxed joined
BenGoldberg So you want a code prettifier which works equally well on perl, C, lisp, etc? 21:41
moritz and for the world 21:43
pmurias yes, combining a grammar and a bunch of extra info (describing how it should treat particular rules)
moritz ("world domination is such an ugly phrase. I prefer to call it ''world pretty-printing''"
lizmat so I have this sub that can fail
if it does, I want it to return that fail
if it doesn't, I want it to go on
masak hugme: hug the world 21:44
hugme hugs the world
lizmat I was thinking some R// magic
moritz lizmat: that's what fail() does, yes
pmurias FROGGS_: it's possible for sure, the simplest implementation would have the hint be: sub ($code) {...; return $beautified_code }
lizmat m: sub a() { fail }; a() // 42 # want the reverse
camelia ( no output )
lizmat m: sub a() { fail }; say a() // 42 # want the reverse 21:45
camelia rakudo-moar 114659: OUTPUT«42␤»
pmurias but the question is how much info can we infer from the grammar
lizmat if a() returns something defined, I want it to go on, else return what was returned
in a way, I want the sink to go through on a fail 21:46
Mouq m: sub a() { fail }; say a() andthen 42
camelia rakudo-moar 114659: OUTPUT«␤ in method gist at src/gen/m-CORE.setting:14879␤ in sub say at src/gen/m-CORE.setting:17636␤ in block <unit> at /tmp/tSPfYN2Hpv:1␤␤»
Mouq m: sub a() { 1 }; say a() andthen 42
camelia rakudo-moar 114659: OUTPUT«1␤»
moritz m: sub a() { 0 }; say a() andthen 42
camelia rakudo-moar 114659: OUTPUT«0␤»
pmurias if we want to have an extendable grammar we also need to have a code prettifier that handles it
moritz m: sub f() { fail 42 }; sub g() { my \&p = -> Mu $x { return $x if defined $x }; p f(); say "still here" }; g 21:48
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/B9FqbrAvLY␤Malformed my␤at /tmp/B9FqbrAvLY:1␤------> 3sub f() { fail 42 }; sub g() { my 7⏏5\&p = -> Mu $x { return $x if defined $x␤»
moritz m: sub f() { fail 42 }; sub g() { my &p = -> Mu $x { return $x if defined $x }; p f(); say "still here" }; g
camelia rakudo-moar 114659: OUTPUT«still here␤»
moritz lizmat: ^^
m: sub f() { 42 }; sub g() { my &p = -> Mu $x { return $x if defined $x }; p f(); say "still here" }; g
camelia ( no output )
Sysaxed So I was walking through this list: perlgeek.de/en/article/5-to-6 and saw this "Lists are constructed with the Comma operator. 1, is a list, (1) isn't. A special case is () which is how you spell the empty list.". But (1) works just fine, why?
moritz m: sub f() { 42 }; sub g() { my &p = -> Mu $x { return $x if defined $x }; p f(); say "still here" }; say g
camelia rakudo-moar 114659: OUTPUT«42␤»
Sysaxed m: my @l = (1); say "@l[]";
camelia rakudo-moar 114659: OUTPUT«1␤»
moritz Sysaxed: because the LHS of = doesn't need to be a list 21:49
FROGGS_ RHS* ?
moritz m: my @l = 42;
camelia ( no output )
moritz yes, RHS, sorry
Sysaxed m: my @l = ; 21:50
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0LwriteK2p␤Malformed initializer␤at /tmp/0LwriteK2p:1␤------> 3my @l = 7⏏5;␤ expecting any of:␤ prefix or term␤ prefix or meta-prefix␤»
FROGGS_ Sysaxed: that's what the @ sigil is for... when you assign a single element to an @-signed array, it knows that it should put it into the first slot
Mouq Sysaxed: Without a comma, parens are just a way of grouping. Even with the comma, you're just grouping the arguments to the comma
FROGGS_ sigled*
Sysaxed okay :) 21:52
21:53 kjs_ left
dalek osystem: aa1d420 | (Andrew Egeler)++ | META.list:
Add XML::Canonical
21:55
21:57 aborazmeh joined, aborazmeh left, aborazmeh joined 21:58 fernand__ left
dalek p: edd4dc9 | moritz++ | src/ (2 files):
Add option --profile-filename=s

this makes it easier to automate the generation of profiles
22:00
timotimo moritz: could you also somehow bake the commandline that was used into the resulting html file? 22:01
22:02 xfix left
dalek p: 2e9ec95 | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
map nativecallsizeof op on moar
22:08
p: 43e8467 | FROGGS++ | src/vm/jvm/ (2 files):
port nativecallsizeof op to jvm
p: 3764d99 | FROGGS++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java:
return size of CStructs correctly in bytes
p: 879ebe4 | FROGGS++ | src/vm/ (3 files):
Merge branch 'sizeof' of github.com:perl6/nqp
p: db8d16d | FROGGS++ | tools/build/MOAR_REVISION:
bump moar for nativecallsizeof op
kudo/sizeof: 680410d | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
more CStruct sizeof tests
22:09
22:10 fernand__ joined
dalek kudo/nom: e321ea6 | FROGGS++ | lib/NativeCall.pm:
add nativesizeof sub
22:13
kudo/nom: 8369018 | FROGGS++ | lib/NativeCall.pm:
the nativesizeof op itself deconts, so we dont
kudo/nom: f8eec5a | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
add tests for nativesizeof

This uncovers a bug in moar about calculation the size and probably also offset of C structure members.
kudo/nom: 23f9130 | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
more CStruct sizeof tests
kudo/nom: d322551 | FROGGS++ | tools/build/NQP_REVISION:
bump nqp for nativecallsizeof op
grondilu lol I check out video.fosdem.org/, notice there is now a 2015 directory, only to realise it's empty :/ 22:15
yoleaux 04:14Z <timotimo> grondilu: (and raydiak) you can use Bool.pick instead of rand < 0.5 for code that's a lot faster
22:15 Kristien left
grondilu timotimo: ok, noted. 22:16
dalek kudo/nom: 5bc543d | FROGGS++ | lib/NativeCall.pm:
add nativesizeof sub
kudo/nom: 0c0accc | FROGGS++ | lib/NativeCall.pm:
the nativesizeof op itself deconts, so we dont
kudo/nom: 9b60206 | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
add tests for nativesizeof

This uncovers a bug in moar about calculation the size and probably also offset of C structure members.
kudo/nom: 680410d | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
more CStruct sizeof tests
kudo/nom: f74fa58 | FROGGS++ | /:
Merge branch 'sizeof' of github.com:rakudo/rakudo into nom
masak FROGGS_++
grondilu 'nativesizeof' is quite a mouthfull, though. I guess the name can change eventually. 22:17
TimToady why is dalek reporting different numbers for the same patch in the same branch?
22:18 aborazmeh left
TimToady oh, different files, I guess 22:18
FROGGS_ grondilu: I considered 'sizeof', but I wanted to stay consistent the the rest of NativeCall
22:21 dolmen left
grondilu std: sizeof() 22:23
camelia std f9b7f55: OUTPUT«5===SORRY!5===␤Undeclared routine:␤ 'sizeof' used at line 1␤Check failed␤FAILED 00:00 134m␤»
grondilu ok but C's sizeof is so famous it might be a good thing to keep it as is. Possibly just make an alias or something. 22:27
plus it's not like it's going to conflict with an other name in rakudo.
22:27 jack_rabbit_ joined
grondilu though more elegant would be a size method to all native types. 22:29
(not sure it's possible thouhg)
FROGGS_ grondilu: that's not so easy, because NativeCall usually just offers a representation
grondilu yeah I was beginning to realise it's not that simple. 22:30
m: say int.^methods 22:31
camelia rakudo-moar 114659: OUTPUT«No such method 'methods' for invocant of type 'Perl6::Metamodel::NativeHOW'␤ in block <unit> at /tmp/nd9nOAIjDa:1␤␤»
grondilu (yeah, makes sense)
I still think an exact equivalent (including the name) of C's sizeof would be nice. 22:33
FROGGS_ but yeah, I'd like to call it 'sizeof' too, but I'd wait for jnthn++'s opinion here :o)
mj41 Rakudo Star 2015.02 Docker image available registry.hub.docker.com/u/mj41/per...gs/manage/
masak mj41++ 22:34
mj41 time docker run -i -t --rm --name p6-speed-test-container2 mj41/perl6-star:2015.02 /bin/bash -c $'perl6 -e"say 6"'
6
real0m2.298s
this command create new container, run perl6 say inside and remove container ... all in 2.3 seconds 22:35
masak o.O
masak can hardly contain himself
mj41 without --rm it is around 1 second 22:36
FROGGS_ O.o
mj41++ 22:38
grondilu wonders why rosettacode.org/wiki/Image_noise#Perl_6 does not catch Interrupt (Ctrl-C) signals. 22:41
Mouq FROGGS_: Shouldn't nativecast and nativesizeof be consistent with refresh? So they can be called as NativeCall::sizeof or use NativeCall :utils; sizeof
grondilu (jeez now I can't kill it at all) 22:42
psch FROGGS_: i don't if PR 370 is sufficient. from my POV, array parameters to MAIN are somewhat underdesigned
FROGGS_ Mouq: you cannot call NativeCall::refresh though... but I see what you mean 22:43
Mouq Oh.. I guess not :P
psch FROGGS_: i.e. moritz++ suggested to require typing a Scalar parameter as Str if you don't want to allow listyness for that parameter, but what happens with «multi MAIN(:$foo) { }; multi MAIN(:@foo) { }» in that case..?
grondilu eventually killed it. Whishes he knew what's wrong with this program.
FROGGS_ psch: I just want to know if you spectested it, because at least when I asked I was unable to test it 22:44
masak quick question: what does it mean for `?? !!` to associate to the right? what does `A ?? B !! C ?? D !! E` parenthesize to? `A ?? B !! (C ?? D !! E)`, right? does that mean that C can be considered the rhs of `A ?? B !! C`?
psch FROGGS_: oh. yeah, i had spectested it, but the behavior is definitely up for discussion imo
FROGGS_ multi MAIN(:$foo) { }; multi MAIN(:@foo) { } is ambiguous for one element
okay
so I wont merge it? 22:45
Mouq masak: I'm pretty sure that's how the grammars do it
psch i had a passing todo and a fail somewhere in S17, which i think are known flappers
FROGGS_ psch: probably
masak Mouq: could a left-associative `?? !!` operator exist? how would it parenthesize?
Mouq: is A the lhs? what does that make B?
psch «multi MAIN(:$foo) { }; multi MAIN(:@foo) { }» in PR 370 would dispatch to the first candidate with one argument, fwiw
currently it always dispatches to the first, no matter how many arguments 22:46
grondilu (a ?? b !! c) ?? d !! e would makes some sense and would qualify as the left associative version.
masak indeed. 22:47
so ?? !! has an lhs (A), a *mumble* (B), and an rhs (C).
Mouq masak: github.com/perl6/std/blob/master/STD.pm6#L3902 B is parsed with the operator, and handled by later as a special case
22:48 jack_rabbit_ left, Rounin left
masak Mouq: I know. I'm trying to think up multi-part user infixes for 007. 22:48
lizmat ok, I have a bit of a dilemma: 22:49
I have a patch that will make substr-rw accept all the parameters that substr accepts
(it currently doesn't)
grondilu timotimo: FYI, switching to Bool.pick allowed to go from about .07 fps to 0.8 fps. It's clearly not the bottleneck here.
lizmat the con: it makes substr() about 2.5x as slow
Mouq .o( circuminfix:<?? !!> ) 22:50
grondilu oops, I meant 0.08 fps instead of 0.8
FROGGS_ lizmat: btw: gist.github.com/FROGGS/75dc69c6939956d16f73
lizmat the gist of the substr(-rw) patch: gist.github.com/lizmat/695c8187f5279ab41c88
FROGGS_: huh, I've built and spectested on jvm earlier today 22:51
lemme pull and check again
didn't we pull some Test.pm stuff earlier today ? 22:52
FROGGS_ that too, yes
and there was something about substr taking whatever code as second argument
lizmat yes, but that only complains now if there is an actual error 22:53
and which I will fix tomorrow anyway
FROGGS_ I am just too tired right now too look at any code 22:54
lizmat yeah, know the feeling :-)
22:55 spider-mario left 22:56 fhelmberger joined 23:00 fhelmberger left
FROGGS_ the folder is there now but empty: video.fosdem.org/2015/ 23:04
23:05 FROGGS_ left 23:06 wicope left
lizmat j: sub a(Str() $a) { say $a.WHAT }; a 42 23:08
camelia rakudo-jvm 114659: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
23:10 gfldex left
lizmat found the problem with the JVM build 23:15
23:15 telex left, eternaleye left 23:16 telex joined 23:18 lizmat_ joined, mj41 left
lizmat_ apparently, on Moar you can do: sub a( Str() \a ), on JVM you must do sub a( Str() $a ) 23:18
I'm not sure whether the JVM has it wrong (should probably find out at compile time), or whether Moar has it wrong (allowing it) 23:19
23:19 rurban1 left 23:20 flussence left
Sysaxed $object.method: $arg # why : is required? 23:20
23:20 rurban joined
masak Sysaxed: because otherwise the `$object.method` would in itself be the method call. 23:20
23:20 lizmat left, flussence joined
masak Sysaxed: and the parser would be surprised at seeing `$arg` after it. 23:20
Sysaxed masak: hmm 23:21
lizmat_ m: sub a(Str() \a) { say a; say a.WHAT }; a 42
camelia rakudo-moar 114659: OUTPUT«42␤(Str)␤»
lizmat_ $ perl6-j -e 'sub a(Str() \a) { say a; say a.WHAT }; a 42'
42
(Int)
23:21 lizmat_ is now known as lizmat
lizmat JVM does not actually coerce 23:21
masak boo 23:22
lizmat $ perl6-j -e 'sub a(Str() $a) { say $a; say $a.WHAT }; a 42'
42
(Str)
if you give it a sigil, it does
dalek kudo/nom: 7254f2b | lizmat++ | src/core/Str.pm:
Fix build on JVM

sub foo(Str() \a) { say a; say a.WHAT }; foo 42
does not actually coerce to Str on JVM, it does on Moar!
23:23
lizmat and on that note, I'm going to get some shuteye 23:24
&
masak good shuteye, lizmat 23:25
23:38 esaym153 left 23:39 esaym153 joined
timotimo grondilu: understood. a pity ;( 23:44
23:53 coffee` left