Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-02-21

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 TimToady there's a way to get "2/3" out of it
00:00 skids joined #perl6
00:00 TimToady m: say unival('⅔').WHAT
00:00 camelia rakudo-moar 114659: OUTPUT«(Rat)␤»
00:00 TimToady m: say unival('⅔').nude
00:00 camelia rakudo-moar 114659: OUTPUT«2 3␤»
00:01 TimToady but numericvalue isn't the right property for that
00:01 kjs_ joined #perl6
00:02 diakopter m: say [/] unival('⅔').nude
00:02 camelia rakudo-moar 114659: OUTPUT«0.666667␤»
00:03 Kristien does Perl 6 have __DATA__ and __END__?
00:04 TimToady m: say uniprop('⅔','numericvaluenumerator')
00:04 camelia rakudo-moar 114659: OUTPUT«2␤»
00:04 TimToady m: say uniprop('⅔','numericvaluedenominator')
00:04 camelia rakudo-moar 114659: OUTPUT«3␤»
00:04 TimToady that were it
00:05 TimToady Kristien: no, supposed to have Pod blocks instead
00:05 TimToady dunno if it's implemented though
00:05 Kristien OK
00:07 TimToady geezernap &
00:29 raydiak timotimo: unival comes from the ucd... http://www.unicode.org/Public/UNIDATA/extracted/DerivedNumericValues.txt lists the numeric values
00:34 kjs_ joined #perl6
00:52 merc_ joined #perl6
00:54 xiaomiao joined #perl6
01:00 Sqirrel_ joined #perl6
01:08 larion joined #perl6
01:12 timotimo thank you, raydiak
01:20 timotimo we kind of sort of have these pod blocks
01:20 timotimo they are super hard to input properly on the channel, though :)
01:24 zcm joined #perl6
01:31 rurban joined #perl6
01:35 raydiak is CArray of structs still NYI?
01:35 timotimo no
01:35 timotimo it is implemented
01:36 timotimo don't forget to .new the CArray! :P
01:36 raydiak yes I got past all that and some other stuff too
01:36 timotimo :)
01:37 raydiak still no dice, even with proper error checking
01:37 timotimo may i see?
01:37 raydiak yeah just a minute, I'll gist
01:39 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 :)
01:39 timotimo haha
01:39 timotimo excellent
01:39 timotimo do you know extensions like undotree and such?
01:40 raydiak yes I've played with them, but...I keep my vim config very simple...should be using some plugins I'm sure
01:41 raydiak where is the int32 supposed to go?  I used 'int' where the SDL docs did...is that bad?
01:41 timotimo yes, it is
01:41 timotimo in C, "int" is 32bit
01:41 timotimo in perl6, int is 64bit
01:42 raydiak heh okay, one more global replace, then I'll gist if it's still broken :)
01:43 timotimo what are you making?
01:44 raydiak I was just playing with what he started, seeing what the problems were...and it gives me...ideas...
01:45 timotimo k
01:45 raydiak here is where it's at now: https://gist.github.com/raydiak/9193e818d781a80ad946
01:47 * raydiak hopes he pressed 'u' the correct number of times
01:47 timotimo and you don't get an "invalid renderer" any more?
01:47 timotimo i don't know why grondilu and you chose these flags for window and renderer
01:47 raydiak nope, just blackness again
01:47 timotimo i'd at least set "accelerated" and "opengl"
01:47 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
01:48 timotimo in the examples, see how i used "SDL_CreateRendererAndWindow"
01:48 timotimo which should give you a better chance at getting a valid renderer
01:49 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
01:49 timotimo but then i had a person who was interested in perl6 and i talked to him a lot
01:49 timotimo flooded him with stuff, i suppose
01:49 timotimo poor guy
01:50 raydiak there is a lot to say about it, that's for sure
01:53 PZt joined #perl6
01:54 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:56 timotimo <3
01:56 timotimo it just noms its tail off and continues
01:56 timotimo gotta go now
01:56 timotimo good * #perl6
01:56 raydiak \o
01:56 raiph bye timotimo, hi raydiak
01:57 raiph 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 rakudo-moar 114659: ( no output )
01:57 raiph $obj
01:57 raiph .=foo
01:57 raiph .=bar
01:57 raiph would then be possible
01:59 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
01:59 camelia rakudo-moar 114659: ( no output )
02:00 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␤»
02:02 raydiak hm I've no idea...I would have guessed that should work as-is and filed it as a parsing bug
02:02 raydiak or some kinda bug...
02:04 raydiak shoot...time...afk
02:16 TimToady joined #perl6
02:32 timotimo one important thing i just remembered
02:33 timotimo don't forget to set the alpha value of the pixels you're going to draw to something other than 0
02:33 timotimo o/
02:35 labster joined #perl6
02:37 TimToady joined #perl6
02:53 TimToady joined #perl6
03:00 dolmen joined #perl6
03:18 Psyche^ joined #perl6
03:26 fernand__ joined #perl6
03:36 kurahaupo1 joined #perl6
03:36 dolmen joined #perl6
03:58 noganex_ joined #perl6
04:10 timotimo my head wouldn't let me fall asleep, so i made Bool.pick and Bool.roll up to 2x faster
04:10 timotimo time perl6 -e 'for ^(3_000_000) { nqp::p6bool(nqp::rand_n(2e0) >= 1e0) }; 1'
04:10 timotimo 2.45user 0.08system 0:02.54elapsed 99%CPU (0avgtext+0avgdata 270920maxresident)k
04:10 timotimo time perl6 -e 'for ^(3_000_000) { nqp::p6bool(nqp::rand_n(2e0) >= 1) }; 1'
04:10 timotimo 4.98user 0.07system 0:05.06elapsed 99%CPU (0avgtext+0avgdata 270352maxresident)k
04:10 timotimo this is the after/before comparison
04:10 dalek rakudo/nom: e8e9d71 | timotimo++ | src/core/Bool.pm:
04:10 dalek rakudo/nom: make Bool.pick and Bool.roll up to 2x faster
04:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e8e9d71304
04:10 timotimo (not quite sure why it's nomming so many datas)
04:11 timotimo that code seems to allocate a crapton of Int objects. perhaps our for-to-while optimization is b0rked yet again
04:12 timotimo huh, the parens around the number of iterations made it b0rk
04:13 timotimo but the improvement is still 2x
04:14 fernand__ joined #perl6
04:14 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 #perl6
04:19 timotimo maybe i can have the sleeps now
04:27 aborazmeh joined #perl6
04:27 aborazmeh joined #perl6
04:31 rmgk_ joined #perl6
04:52 fhelmberger joined #perl6
05:03 Sqirrel joined #perl6
05:04 Mudguts joined #perl6
05:48 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:51 rindolf joined #perl6
06:53 dalek doc: 7557533 | moritz++ | lib/Language/io.pod:
06:53 dalek doc: Some small improvements to io.pod
06:53 dalek doc:
06:53 dalek doc: * do not advertise deprecated IO.slurp method
06:53 dalek doc: * mention procedural form of &slurp
06:53 dalek doc: * spaces instead of hard tabs
06:53 dalek doc: review: https://github.com/perl6/doc/commit/7557533e36
06:58 dalek rakudo-star-daily: 4e5f046 | coke++ | log/ (14 files):
06:58 dalek rakudo-star-daily: today (automated commit)
06:58 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/4e5f0463a2
07:09 slacko22403 joined #perl6
07:11 jack_rabbit joined #perl6
07:11 gfldex joined #perl6
07:13 dalek star: 38197bc | moritz++ | modules/doc:
07:13 dalek star: Update to newer doc
07:13 dalek star: review: https://github.com/rakudo/star/commit/38197bc8d5
07:15 moritz http://home.p6c.org/~moritz/rakudo-star-2015.02-rc1.tar.gz release candidate of the 2015.02 star release
07:15 moritz changes since rc0: update to newer perl6/doc, update release announcements
07:15 moritz tests very welcome
07:22 diana_olhovik_ joined #perl6
07:32 xfix joined #perl6
07:34 wicope joined #perl6
07:41 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 ....)
07:42 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:43 FROGGS_ japhb: to land panda/eleven we need to put some work to make CompUnitRepo::Local::Installation saner
07:45 wicope joined #perl6
07:51 FROGGS_ japhb: so something where everyone can help is to test and patch this on his/her platform: https://github.com/retupmoca/P6-Compress-Zlib-Raw
07:53 FROGGS_ 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:54 FROGGS_ retupmoca: I also have a bunch of different boxes to test my changes right
07:54 FROGGS_ retupmoca: I'd work in a branch until it works on all of my platforms
08:02 FROGGS_ 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␤»
08:02 camelia ..rakudo-moar 114659: OUTPUT«===SORRY!===␤QAST::Block with cuid cuid_1_1424505772.89936 has not appeared␤»
08:08 jack_rabbit_ joined #perl6
08:13 prime joined #perl6
08:20 darutoko joined #perl6
08:21 jluis joined #perl6
08:35 rurban joined #perl6
08:36 c0m0 joined #perl6
08:43 slacko22403 joined #perl6
08:45 Sir_Ragnarok joined #perl6
08:50 sqirrel_ joined #perl6
08:53 jack_rabbit_ joined #perl6
08:55 wicope_ joined #perl6
09:03 raiph joined #perl6
09:05 Rounin joined #perl6
09:20 _mg_ joined #perl6
09:30 spider-mario joined #perl6
09:36 vendethiel \o, #perl6
09:37 coffee` joined #perl6
09:43 _mg_ joined #perl6
09:53 kurahaupo joined #perl6
09:55 larion joined #perl6
10:09 espadrine_ joined #perl6
10:22 mvuets joined #perl6
10:31 Kristien joined #perl6
10:32 perl6_newbee joined #perl6
10:32 perl6_newbee hi all
10:34 kjs_ joined #perl6
10:42 moritz \o
10:44 Kristien hi
10:47 mvuets joined #perl6
10:48 FROGGS[mobile] joined #perl6
10:49 FROGGS[mobile] o/
10:56 rindolf perl6_newbee: hi.
10:57 rindolf FROGGS[mobile]: hi, sup?
10:57 FROGGS[mobile] rindolf: too much
10:57 rindolf FROGGS[mobile]: ah.
11:01 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:13 kjs_ joined #perl6
11:14 dolmen joined #perl6
11:25 fernand__ joined #perl6
11:30 espadrine_ joined #perl6
11:51 [ptc] moritz++
11:53 [ptc] moritz: just noticed that doc.perl6.org hasn't been updated since 17:20 yesterday.  Is there a problem with the cronjob?
11:57 masak good afternoon, #perl6
11:58 Kristien joined #perl6
11:58 diakopter masak: imma lookit ur ropeybug
11:58 diakopter [or has it been fixed]
11:59 masak diakopter: hasn't.
11:59 masak also, \o/
11:59 masak diakopter! \o/
11:59 diakopter if rt.perl.org ever replies
11:59 tadzik oh hai diakopter
12:00 diakopter what's the golfiest repro
12:00 diakopter m: say ("0" x 3 ~ "1").substr(2)
12:00 camelia rakudo-moar 114659: OUTPUT«00␤»
12: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!"
12:00 masak diakopter: yeah, that's probably the golfiest.
12:01 diakopter that's likely golfy enough to decipher by inspection
12:01 mst masak: I'
12:01 mst masak: I'm pretty sure I know the PAUSE id of at least one member of the L.A. Rope Group
12:02 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
12:03 mst diakopter evidently does.
12:03 masak getting roped into punning here.
12:04 mst I still have to fight the urge to twitch every time she says "hey, I invented a new tie"
12:04 c0m0 joined #perl6
12:06 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 mst diakopter: both
12:07 mst diakopter: you start the scratch build in a fresh checkout
12:07 diakopter masak: does an analogous problem occur using nqp:: ops only?
12:07 mst diakopter: then read the code and see if you can spot it before the build explodes
12:07 mst Sufficiently Creative Laziness etc.
12:07 diakopter hum, I wonder if I have git or a C compiler on this machine
12:09 masak diakopter: haven't tried it using just nqp:: ops
12:09 diakopter lazybrain fails to recall the proper nqp:: ops
12:13 FROGGS_ joined #perl6
12:17 raiph joined #perl6
12:18 masak isn't there, like, a list somewhere?
12:19 diakopter LINEAR SEARCH  OOOOO_OOO
12:19 * masak .oO( I'm sorry, this search will take a while, as you requested a character far into the string )
12:21 Sqirrel joined #perl6
12:21 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…»
12:21 diakopter waaaaat
12:22 vendethiel probably the *
12:22 kjs_ joined #perl6
12:22 diakopter m: say ("0" x 3 ~ "1").substr(*-2)
12:22 camelia rakudo-moar 114659: OUTPUT«00␤»
12:22 vendethiel not allowed as the second argument then :P
12:22 FROGGS_ m: say ("0" x 3 ~ "1")
12:22 camelia rakudo-moar 114659: OUTPUT«0001␤»
12:23 diakopter m: say ("0" x 2 ~ ("1"x 3) ~ "0").substr(*-2)
12:23 camelia rakudo-moar 114659: OUTPUT«11␤»
12:23 diakopter o_O
12:24 diakopter masak: ^
12:25 diakopter m: say ("0"x 3 ~ ("1"x 3) ~ "0"x 3).substr(*-4)
12:25 camelia rakudo-moar 114659: OUTPUT«1100␤»
12:25 diakopter m: say ("0"x 3 ~ ("1"x 3) ~ "0"x 3).substr(*-5)
12:25 camelia rakudo-moar 114659: OUTPUT«11000␤»
12:25 diakopter *cry*
12:26 moritz [ptc]: http://doc.perl6.org/build-log/ might have answers
12:27 moritz segfault :(
12:28 FROGGS_ m: say $*VM.config<dll>
12:28 camelia rakudo-moar 114659: OUTPUT«lib%s.so␤»
12:29 [ptc] moritz: ah, that location is good to know
12:31 dalek doc: ea0f45f | paultcochrane++ | lib/Type/X/Attribute/Undeclared.pod:
12:31 dalek doc: Capitalise title keyword so that htmlify can find it
12:31 dalek doc: review: https://github.com/perl6/doc/commit/ea0f45f3ff
12:31 dalek doc: bb27cf2 | paultcochrane++ | lib/Type/X/Placeholder/Block.pod:
12:31 dalek doc: Correct X::Placeholder::Block class name
12:31 dalek doc: review: https://github.com/perl6/doc/commit/bb27cf20a6
12:32 [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
12:32 moritz [ptc]: something shortly before the 2015.02 release
12:33 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 moritz rakudobrew@hack:~$ perl6-m --version
12:33 moritz This is perl6 version 2015.01-223-g313ea7b built on MoarVM version 2015.01-72-g9106bee
12:33 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
12:34 colomon diakopter: looking at the source to substr in github, isn’t line 1567 wrong?
12:34 [ptc] hrm, that version should work
12:34 colomon https://github.com/rakudo/rakudo/blob/nom/src/core/Str.pm#L1567
12:34 diakopter colomon: which substr
12:34 diakopter oh
12:34 FROGGS_ diakopter: moar --dump ...
12:34 [ptc] moritz: you can give me an account if you want; then I can help out as need be
12:34 colomon nqp::istype($from, Callable) — $from is defined as my int $from five lines above
12:34 FROGGS_ diakopter: cat `which perl6-m` and then insert the --dump
12:34 [ptc] moritz: especially helpful if you're on holiday or somewhere without internet etc.
12:34 moritz [ptc]: what username do you want?
12:34 diakopter --dump used to dump the bytecode
12:35 colomon perhaps should be nqp::istype(from, Callable)
12:35 diakopter not a trace of moarop executions
12:35 FROGGS_ diakopter: right, but it is the only thing you have
12:35 Kristien I just did #undef __GNUC__
12:35 Kristien :(
12:36 diakopter I thought there was a fancy trace thing
12:36 dalek doc: 3369c3a | paultcochrane++ | htmlify.p6:
12:36 dalek doc: Mention location of htmlify build logs
12:36 dalek doc: review: https://github.com/perl6/doc/commit/3369c3ab5f
12:36 FROGGS_ diakopter: you probably mean the spesh log?
12:37 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…»
12:37 FROGGS_ colomon: smart quotes
12:37 colomon “smart” quotes, you mean
12:37 FROGGS_ hehe, yeah
12:37 [ptc] moritz: "ptc" should do; if you want something longer (due to e.g. security) then "cochrane"
12:40 colomon > ("0"x 3 ~ ("1"x 3) ~ "0"x 3).Str.substr(5)
12:40 colomon 1100
12:42 diakopter I thought it was already a Str
12:45 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:46 perl6_newbee However every time I call my script I get the usage message. perl6 script.p6 --file=irgendwas --tags=wasanderes
12:46 perl6_newbee How is the format for array parameter?
12:46 perl6_newbee the help says --tags=<Positional[Str]>
12:47 dalek doc: 2f506b6 | paultcochrane++ | util/update-and-sync:
12:47 dalek doc: Temporarily turn off syntax highlighting
12:47 dalek doc:
12:47 dalek doc: This is to check pygmentize's effect on html build stability
12:47 dalek doc: review: https://github.com/perl6/doc/commit/2f506b6c96
12:51 aborazmeh joined #perl6
12:51 aborazmeh joined #perl6
12:56 ggoebel111111114 joined #perl6
12:58 dalek doc: 0548853 | moritz++ | htmlify.p6:
12:58 dalek doc: htmlify: option for disabling Inline::Python
12:58 dalek doc: review: https://github.com/perl6/doc/commit/054885336e
13:00 raiph joined #perl6
13:01 dalek doc: 12cfc6a | moritz++ | util/update-and-sync:
13:01 dalek doc: Restore hilighting, though without Inline::Python
13:01 dalek doc: review: https://github.com/perl6/doc/commit/12cfc6ae5f
13:06 dalek doc: 96d4af2 | moritz++ | util/update-and-sync:
13:06 dalek doc: record htmlify time
13:06 dalek doc: review: https://github.com/perl6/doc/commit/96d4af2ccc
13:06 FROGGS_ perl6_newbee: that's a known issue... leave away the Str constraint for now
13:06 perl6_newbee ah, thanks a lot froggs
13:06 FROGGS_ m: say Array[Str] ~~ Array[Str]
13:06 camelia rakudo-moar 114659: OUTPUT«False␤»
13:07 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 #perl6
13:08 pmurias hi
13:09 perl6_newbee without the Str contraint I still get the usage help. This time saying --tags=<Positional>.
13:09 perl6_newbee hello
13:09 moritz \o pmurias
13:09 FROGGS_ perl6_newbee: can you make it slurpy instead?
13:09 perl6_newbee slurpy?
13:11 perl6_newbee for each str a parameter on its own?
13:12 psch a named array parameter needs multiple instances of the cl-argument it seems
13:13 psch i.e. "perl6 test.pl6 --tags='foo' --tags='bar'" works for me
13:13 moritz that's a bug; a single one should work
13:13 psch but only one --tags doesn't
13:14 perl6_newbee aah psch is right. several --tags parameter and the script works
13:15 dalek doc: cb7856f | moritz++ | htmlify.p6:
13:15 dalek doc: htmlify: document the build process in the comments
13:15 dalek doc: review: https://github.com/perl6/doc/commit/cb7856f661
13:15 perl6_newbee until it is fixed I will use Str and split it at the ',' char. thx for the help
13:16 psch ooc, is that designed? i.e. should "--tags=foo,bar,baz" select an :@tags candidate and split on ','`
13:16 psch ?
13:17 perl6_newbee that would be very convenient. by the way I thought it works this way
13:18 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
13:19 perl6_newbee I am a lazy person, even when enter command line parameter...
13:28 moritz the problem is passing things that contain commas
13:28 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'?␤␤»
13:28 psch m: sub f($, @) { }; say &f.cando(Capture.new(list => [Any, Array])); say &f.cando(Capture.new(list => [Any, Any]))
13:28 camelia rakudo-moar 114659: OUTPUT«sub f (Any $, @) { #`(Sub|74269672) ... }␤␤»
13:29 psch that's why one --tags doesn't dispatch to the :@tags candidate
13:29 psch which i suppose is correct, but makes the MAIN stuff kinda complicated
13:29 psch (note the second .cando doesn't find &f)
13:29 moritz there's extra argument massaging for MAIN
13:29 moritz it needs to take that into account
13:30 psch moritz: yeah, the extra argument massaging has to assume every named could be an array as i see it
13:30 psch we don't get an implicit *@_ though i think, which makes that kinda ok, maybe :/
13:35 ribasushi joined #perl6
13:39 lol_ joined #perl6
13:40 lol_ hi all!
13:40 lol_ when perl 6 will be released?
13:41 xfix lol_: On Christmas.
13:42 xfix I mean, by Christmas.
13:43 lol_ xfix: itsclearigetit, thanks
13:45 [ptc] lol_: it looks like Christmas could be in September this year, though it's not 100% certain
13:48 dalek rakudo/nom: 51593ce | colomon++ | src/core/Str.pm:
13:48 dalek rakudo/nom: Fix typo in substr.
13:48 dalek rakudo/nom:
13:48 dalek rakudo/nom: Old code checked nqp::istype($from, Callable), but this will always
13:48 dalek rakudo/nom: be false, as $from is defined as an int five lines above.  Presumably
13:48 dalek rakudo/nom: nqp::istype(from, Callable) was actually meant, so I have switched it
13:48 dalek rakudo/nom: to that.
13:48 perl6_newbee cool, christmas is in September this year. I am happy
13:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/51593cea34
13:50 masak lol_: are you waiting for Perl 6 to be released?
13:50 masak lol_: you know you can try it already, right?
13:53 timotimo colomon: good catch
13:53 lol_ i dont know anything about perl. is perl 6 feature freezed?
13:53 colomon timotimo: I was trying to look at the bug diakopter++ is working on, and this one jumped out at me
13:53 FROGGS_ lol_: no, it is not dead yet :o)
13:54 FROGGS_ lol_: I would consider COBOL to be feature freezed
13:54 FROGGS_ Perl 6 is feature rich
13:56 lol_ and whats about testing?
13:56 FROGGS_ lol_: testing what?
13:57 colomon Hurm, should have tested my change before pushing, it’s still kind of gnarly.
13:59 lol_ FROGGS_: COBOL. and perl 6, btw (all the richness)
14:00 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:01 FROGGS_ lol_: here are records of daily runs: https://github.com/coke/perl6-roast-data/blob/master/perl6_pass_rates.csv
14:02 raiph joined #perl6
14:03 masak lol_: I write lots of tests for most of my Perl 6 code.
14:04 grondilu joined #perl6
14:04 [Coke] ... crap. can someone reset my password on hack?
14:05 [Coke] left #perl6
14:05 [Coke] joined #perl6
14:13 dalek doc: 1266647 | paultcochrane++ | util/update-and-sync:
14:13 dalek doc: Replace hard tabs with spaces
14:13 dalek doc: review: https://github.com/perl6/doc/commit/12666475fc
14:13 dalek doc: 38dfcf2 | paultcochrane++ | / (2 files):
14:13 dalek doc: Merge branch 'master' of github.com:perl6/doc
14:13 dalek doc:
14:13 dalek doc: Conflicts:
14:13 dalek doc: util/update-and-sync
14:13 dalek doc:
14:13 dalek doc: Conflits resolved successfully
14:13 dalek doc: review: https://github.com/perl6/doc/commit/38dfcf2814
14:13 dalek doc: 6eb6fa8 | paultcochrane++ | lib/Type/IO.pod:
14:13 dalek doc: Correct links to `say` and `close`
14:13 dalek doc: review: https://github.com/perl6/doc/commit/6eb6fa8366
14:13 dalek doc: 97af8f4 | paultcochrane++ | lib/Type/IO/FileTestable.pod:
14:13 dalek doc: Extend discussion of file test operators
14:13 dalek doc: review: https://github.com/perl6/doc/commit/97af8f4bc2
14:14 lol_ ROGGS_, masak: thank for answers
14:17 FROGGS_ lol_: pleasure
14:22 [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:23 [Coke] I suspect I need another reset, maybe I fat fingerd something. one sec.
14:25 [Coke] moritz++ [ptc]++ # can now connect from new desktop.
14:29 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␤»
14:29 moritz m: use soft; &sqrt.wrap(-> $n { say "wrapped!"; nextsame }); sqrt(4)
14:29 camelia rakudo-moar 114659: ( no output )
14:29 moritz why doesn't this call the wrapper?
14:30 vendethiel use soft?!
14:30 moritz soft binding
14:30 moritz to enable such wrappings
14:31 moritz (I thought)
14:31 vendethiel well, you're wrapping sqrt, but discarding it right after
14:31 moritz discarding? how so?
14:31 psch m: use soft; &sqrt.=wrap(-> $n { say "wrapped!"; nextsame }); wrapped-sqrt(4)
14:31 camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/41e7eu0WTF␤Undeclared routine:␤    wrapped-sqrt used at line 1␤␤»
14:31 psch eh
14:31 psch m: use soft; &sqrt.=wrap(-> $n { say "wrapped!"; nextsame }); sqrt(4)
14:31 vendethiel wrap() returns a new routine
14:31 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␤␤»
14:31 xfix [15:01] <FROGGS_> lol_: here are records of daily runs: https://github.com/coke/perl6-roast-data/blob/master/perl6_pass_rates.csv
14:31 psch vendethiel: doesn't look like it, from the error message there
14:31 xfix Any idea why Perl 6 implementations long time ago did 273.72% of test suite?
14:32 psch it has +{Wrapped} before the assignment
14:32 vendethiel because they were awesome.
14:32 vendethiel they still are, btw :P
14:32 moritz vendethiel: wrappings are supposed to be in-place
14:32 vendethiel m: use soft; my &foo = sqrt.wrap(-> $n { say "wrapped!"; nextsame ); foo(4)
14:32 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…»
14:32 FROGGS_ xfix: I have no idea
14:32 vendethiel m: use soft; my &foo = &sqrt.wrap(-> $n { say "wrapped!"; nextsame ); foo(4)
14:32 moritz and with --optimize=off, it works
14:32 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…»
14:33 * vendethiel 's never really happy with in-place mutations :-).
14:33 vendethiel moritz: how is it scoped?
14:33 moritz vendethiel: dunno
14:36 moritz ok, reading S06, it seems that the routine declaration that is wrapped must be in scope of a 'use soft;'
14:36 moritz not just the place where it's wrapped and called
14:38 dalek rakudo/nom: 022e452 | colomon++ | src/core/Str.pm:
14:38 dalek rakudo/nom: Further tweak error messages from substr.
14:38 dalek rakudo/nom:
14:38 dalek rakudo/nom: Previously a range error from a Callable argument always
14:38 dalek rakudo/nom: produced a "Code object coerced to string" message.  This
14:38 dalek rakudo/nom: fix gives the actual number that the code object calculates.
14:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/022e452dec
14:39 smls joined #perl6
14:39 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;␤»
14:39 smls m: say $_ for 0..$_ for 2, 3;
14:39 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;␤»
14:40 smls ^^ NYI, or are statement modifiers not supposed to be chained arbitrarily?
14:40 _mg_ joined #perl6
14:40 moritz they aren't
14:40 moritz iirc only one level of if/for nesting is allowed
14:40 moritz m: say $_ if $_ for 0..3
14:40 camelia rakudo-moar 114659: OUTPUT«1␤2␤3␤»
14:41 smls how come?
14:42 smls 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 smls rather than having "... if ... for ..." as a special case
14:43 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;␤»
14:43 vendethiel indeed.
14:44 smls Although allowing "... for ... if ..." might confuse people with a python background
14:45 dalek doc: ba46aa9 | moritz++ | lib/Language/functions.pod:
14:45 dalek doc: More use cases for nextsame and friends
14:45 dalek doc: review: https://github.com/perl6/doc/commit/ba46aa911a
14:48 [ptc] Where does roast get run at present?  Only Rakudo, or also the other implementations?
14:48 [ptc] 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
14:49 [ptc] *that
14:49 * colomon is apparently trying to get as many ++s as possible by adding or removing dollar signs from substr….
14:49 * vendethiel pings [Coke] on that matter
14:49 skids .oO(NativeCall binding to perl5 XS .so files... there's a concept.)
14:50 mst colomon++ # inventive approach
14:51 moritz [ptc]: I don't think anybody runs roast with niecza yet
14:51 moritz [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
14:52 moritz (unless it already does that)
14:52 [ptc] moritz: ok, so updating the (not yet run, afaict) 1-basic.t tests should work ok
14:52 [ptc] moritz: that's on the todo list
14:53 * moritz would be surprised if it worked without marcro support
14:53 [ptc] moritz: it doesn't import symbols yet
14:53 [ptc] moritz: what I'm trying to fix in roast is that use_ok is used there, even though it wasn't implemented anywhere
14:53 [ptc] moritz: thus I'd just like to rename the function to match current calling conventions
14:53 moritz [ptc]: ah, ok. Might have been a p5ism
14:54 [ptc] moritz: yes, I've got a PR waiting in the wings which renames the test functions to use hyphenated versions
14:54 [ptc] moritz: but I wanted to test the Test module first before I submit
14:54 fhelmberger joined #perl6
14:55 * [ptc] wonders why the test functions in roast all want a :todo option...
14:57 dalek roast: ec00053 | paultcochrane++ | S24-testing/1-basic.t:
14:57 dalek roast: Fix typo in S24-testing/1-basic.t
14:57 dalek roast: review: https://github.com/perl6/roast/commit/ec00053568
14:57 dalek roast: 9e877fc | paultcochrane++ | S24-testing/1-basic.t:
14:57 dalek roast: Remove trailing whitespace
14:57 dalek roast: review: https://github.com/perl6/roast/commit/9e877fc643
14:57 dalek roast: 86d0806 | paultcochrane++ | S24-testing/1-basic.t:
14:57 dalek roast: Wrap lines nicely in POD
14:57 dalek roast: review: https://github.com/perl6/roast/commit/86d0806121
14:57 dalek roast: f0dad37 | paultcochrane++ | S24-testing/1-basic.t:
14:57 dalek roast: Rename use_ok -> use-ok
14:57 dalek roast:
14:57 dalek roast: use-ok has now been implemented in Rakudo's Test.pm using the newer Perl 6
14:57 dalek roast: style function naming convention (with hyphens instead of underscores),
14:57 dalek roast: hence this change.
14:57 dalek roast: review: https://github.com/perl6/roast/commit/f0dad37c77
14:59 Kristien joined #perl6
15:01 dalek nqp/sizeof: 2e9ec95 | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
15:01 dalek nqp/sizeof: map nativecallsizeof op on moar
15:01 dalek nqp/sizeof: review: https://github.com/perl6/nqp/commit/2e9ec9573e
15:02 dalek rakudo/sizeof: 5bc543d | FROGGS++ | lib/NativeCall.pm:
15:02 dalek rakudo/sizeof: add nativesizeof sub
15:02 dalek rakudo/sizeof: review: https://github.com/rakudo/rakudo/commit/5bc543d313
15:03 dalek rakudo/nom: 83072af | colomon++ | src/core/Str.pm:
15:03 dalek rakudo/nom: Eliminate another ugly error message from substr.
15:03 dalek rakudo/nom:
15:03 dalek rakudo/nom: This time it was for using a code object that resulted in
15:03 dalek rakudo/nom: an index too big for the string.
15:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/83072af577
15:04 FROGGS_ .tell retupmoca say nativesizeof(z_stream) / 8; # 112
15:04 yoleaux FROGGS_: I'll pass your message to retupmoca.
15:05 skids Wow, if all the Test underscores go, that's going to be one big s/// diff on roast :-)
15:05 FROGGS_ ohh, hups
15:05 FROGGS_ sizeof returns number of bytes, ehh?
15:06 skids In C, yes.
15:06 mr-foobar joined #perl6
15:07 FROGGS_ yeah, had a thinko
15:07 FROGGS_ ( https://github.com/MoarVM/MoarVM/commit/c314d3dffc )
15:07 arnsholt FROGGS_: Multiple of the size of char, technically
15:08 FROGGS_ arnsholt: ahh, interesting
15:09 arnsholt So sizeof(char) is defined to be 1
15:09 arnsholt Of course that's mostly a technical footnote in this age
15:10 FROGGS_ hopefully :o)
15:10 skids Thankfully.  Could you imagine... ick.
15:10 jbd___ joined #perl6
15:10 * geekosaur doesn't have to imagine; worked with a PDP10 in pre-college
15:11 FROGGS_ everything will break... I often see sizeof(...)*8
15:13 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␤»
15:13 masak \o/
15:14 zakharyas joined #perl6
15:15 mst you've ... changed the date on the bot for a pun
15:15 * mst applauds
15:15 timotimo no
15:15 timotimo Date.new creates "a date object"
15:15 timotimo there's no sensible default, so what we do is assign the coming christmas
15:16 mst hah
15:16 timotimo m: say Date.new(now)
15:16 camelia rakudo-moar 114659: OUTPUT«2015-02-21␤»
15:16 timotimo m: say Date.now
15:16 camelia rakudo-moar 114659: OUTPUT«No such method 'now' for invocant of type 'Date'␤  in block <unit> at /tmp/zZxYq6S_E0:1␤␤»
15:16 timotimo m: say Date.today
15:16 camelia rakudo-moar 114659: OUTPUT«2015-02-21␤»
15:16 timotimo m: say Date.tomorrow
15:16 camelia rakudo-moar 114659: OUTPUT«No such method 'tomorrow' for invocant of type 'Date'␤  in block <unit> at /tmp/lsq6dZLEY8:1␤␤»
15:16 timotimo :P
15:17 masak mst: I'm reckless, but not that reckless :P
15:17 masak mst: but yeah, Date.new is a nice in-joke, and one that I don't mind.
15:17 masak timotimo: I wouldn't mind a method Date.tomorrow (and Date.yesterday), actually.
15:18 masak timotimo: thought Date.today + 1 is al quite short and unambiguous...
15:19 jluis joined #perl6
15:21 timotimo fair enough
15:25 dalek rakudo/nom: 639886b | paultcochrane++ | lib/Test.pm:
15:25 dalek rakudo/nom: Add expandtab and shiftwidth=4 to Test.pm vim coda
15:25 dalek rakudo/nom:
15:25 dalek rakudo/nom: This means hard tabs are replaced with spaces and tabs have a width of 4 as
15:25 dalek rakudo/nom: wished for by TimToady++.
15:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/639886b9a6
15:25 dalek rakudo/nom: 571ab31 | moritz++ | lib/Test.pm:
15:25 dalek rakudo/nom: Merge pull request #369 from paultcochrane/pr/add_expandtab_to_vim_coda
15:25 dalek rakudo/nom:
15:25 dalek rakudo/nom: Add expandtab and shiftwidth=4 to Test.pm vim coda
15:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/571ab31ab9
15:34 telex joined #perl6
15:35 leigh964 joined #perl6
15:39 leigh964 left #perl6
15:43 dalek roast: 303fb0d | paultcochrane++ | S24-testing/ (6 files):
15:43 dalek roast: Add vim coda to test files
15:43 dalek roast: review: https://github.com/perl6/roast/commit/303fb0dc77
15:43 dalek roast: dd43dec | paultcochrane++ | S24-testing/6-done_testing.t:
15:43 dalek roast: Add missing use v6; pragma
15:43 dalek roast: review: https://github.com/perl6/roast/commit/dd43dec43a
15:45 perl6_newbee joined #perl6
15:45 pmurias is there a reason why someone would call Date.new?
15:46 moritz curiosity?
15:46 Rounin joined #perl6
15:47 pmurias shouldn't we die instead of returning a stupid value?
15:47 moritz maybe we should
15:47 moritz but were would be the fun?
15:47 perl6_newbee lol
15:48 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 :(
15:49 moritz 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:
15:50 perl6_newbee 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:51 perl6_newbee 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:53 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
15:55 perl6_newbee its enough to declare a variable just like "my $sql;". Still no usage.
15:55 vendethiel I agree with pmurias, a lot, here
15:55 psch http://design.perl6.org/S06.html#Declaring_a_MAIN_subroutine strongly suggests it's buggy, yeah
15:55 vendethiel is it bad if Date.new is an alias for Date.today?
15:56 smls "shouldn't we die instead of returning a stupid value"  +1
15:56 moritz die "Whom do you want to Date?"
15:58 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" }
15:58 camelia rakudo-moar 114659: OUTPUT«Usage:␤  /tmp/aPnfe0ZyAx --required=<Any> ␤»
15:59 pmurias new Date() returns the current moment in time in javascript
16:00 * moritz knows the sinking feeling in his stomach when he realizes his toys/easter eggs are about to be removed
16:01 * psch duhs
16:01 psch moritz++ # i had the same thinko as perl6_newbee
16:03 psch hm, array args in MAIN seem grossly under-designed
16:04 psch 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 psch the existing tests (that passed before) still pass, but none of them tests for array behavior
16:05 perl6_newbee :-) psch
16:05 moritz psch: so add more tests
16:06 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 psch well, except for slurpy positional
16:07 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:08 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
16:09 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 #perl6
16:10 moritz perl6_newbee: mailto:rakudobug@perl.org
16:10 perl6_newbee ah ok. bug tracker at rakudo.org/tickets
16:10 moritz psch: so, write tests for those too
16:10 perl6_newbee afk
16:17 raiph joined #perl6
16:22 psch $ ./perl6 -e'sub MAIN(:$foo) { say $foo.perl }' -- --foo="bar" --foo="baz"
16:22 psch ["bar", "baz"]
16:22 psch that's without my patch, fwiw
16:23 psch 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 psch i suppose i should check out GetOpt::Long?
16:25 psch ah, Getopt::Long needs either an arrayref as target or an '@' in the desciptor to allow multiple occurences
16:25 psch which i think means our current behavior is arguably wrong?
16:34 moritz yes
16:36 Kristien joined #perl6
16:36 Kristien hi
16:42 vendethiel hi
16:43 tadzik joined #perl6
16:43 * moritz is amused that https://github.com/OTRS/FAQ shows Perl6 in the language statistics
16:44 FROGGS_ moritz: has birdless landed already?
16:44 vendethiel moritz: https://github.com/OTRS/FAQ/search?l=perl6 :P
16:45 moritz FROGGS_: yes (in rakudo)
16:45 moritz not yet in star
16:45 moritz which reminds me, I should release star.
16:45 FROGGS_ moritz++
16:45 moritz (I have a local birdless star branch)
16:50 adu joined #perl6
16:59 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
17:00 lizmat TimToady: that's how it works already ?
17:01 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␤------> ␤»
17:01 TimToady don't think so
17:01 lizmat ah, ok
17:01 lizmat gotcha now, the other way around
17:01 _mg_ joined #perl6
17:02 lizmat you want to add "is a(Man)", not add "is Man"
17:02 TimToady we already have is Man
17:02 TimToady as in Socrates is a Man
17:02 lizmat yeah...  :-)
17:02 TimToady well, that would be Man.new, but yeah
17:03 TimToady or Man.old maybe :)
17:03 * TimToady wonders if he will be forced to drink hemlock for corruping the youth
17:05 lizmat .oO( even the corruption is corrupted )
17:05 TimToady yeah, that birot
17:05 TimToady or was that bitro
17:05 TimToady ?
17:06 FROGGS_ that can quickly turn into bistro
17:06 TimToady wait, that's byterot
17:06 lizmat .oO( wrdrot )
17:07 TimToady would be more like bitrod
17:09 dalek star: 427ef56 | moritz++ | modules/doc:
17:09 dalek star: downgrade "doc" to before use_ok
17:09 dalek star: review: https://github.com/rakudo/star/commit/427ef56fcb
17:15 moritz there I was, bumping the version of doc between star release candidates, because "it's just documentation"
17:15 moritz foolish me
17:18 diana_olhovik joined #perl6
17:18 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␤»
17:18 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«bi4rot␤»
17:18 lizmat colomon++  # for cleaning up after me
17:18 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«ritrot␤»
17:18 dalek doc: 5ef5cef | paultcochrane++ | lib/Language/testing.pod:
17:18 dalek doc: Document $ex_type argument in throws_like()
17:18 dalek doc: review: https://github.com/perl6/doc/commit/5ef5cef457
17:18 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
17:20 colomon lizmat++ # getting all the nice error messages there in the first place…
17:22 gfldex joined #perl6
17:22 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.  :)
17:23 * colomon thinks he may have written one of the versions of substr, oh, about six years ago…
17:23 BenGoldberg joined #perl6
17:24 * psch wonders how long we're gonna keep "The following step can take a long time, please be patient." around
17:26 lizmat Stage parse      :  64.438   # is this a long time?   (JVM parse, BTW)
17:27 * 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?
17:28 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
17:28 [ptc] vendethiel: sorry, was still typing :-)
17:28 vendethiel I think |%c should work
17:29 vendethiel 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␤␤»
17:29 [ptc] so, if throws_like is defined like so: throws_like($code, $ex_type, $reason?, *%matcher)
17:29 vendethiel m: sub foo(*%a) { say %a.perl; }; sub bar(*%a) { foo(|%a); }; bar():a;
17:29 camelia rakudo-moar 114659: OUTPUT«("a" => Bool::True).hash␤»
17:29 vendethiel here.
17:30 [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?
17:31 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␤»
17:31 TimToady even easier
17:31 TimToady m: sub foo($arg, *%a) { say $arg, %a.perl; }; sub bar(|c) { foo(|c); }; bar(42):a;
17:31 camelia rakudo-moar 114659: OUTPUT«42("a" => Bool::True).hash␤»
17:32 [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.
17:32 vendethiel TimToady++
17:33 [ptc] oops, I meant the first one was throws_like, not throws-like
17:33 [ptc] *sigh
17:33 TimToady you're working too hard
17:33 psch [ptc]: you still need the %-sigil if you want to go that way
17:33 TimToady just sub throws_like (|c) { throws-like(|c) }
17:33 [ptc] psch: ok thanks
17:33 [ptc] TimToady: ok, wow, that's easy
17:34 psch [ptc]: i'd take TimToady++'s advice though ;)
17:34 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
17:34 [ptc] TimToady++  :-)
17:34 TimToady being on the learning curve is not a problem
17:34 TimToady it's just part of the process :)
17:35 * TimToady still learns something new every decade or so...
17:35 [ptc] [Coke]: cool, thanks for the info
17:35 * [ptc] grins
17:36 [ptc] [Coke]: so, if I understand you correctly, if I start changing the S24 tests in roast, it's not a major problem?
17:37 timotimo m: say 1.24 / 1.38
17:37 camelia rakudo-moar 114659: OUTPUT«0.898551␤»
17:37 [ptc] thanks everyone, for their advice!
17:38 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.
17:39 [ptc] [Coke]: sweet, thanks.  Good to know
17:39 dalek perl6-roast-data: dc6a763 | coke++ | / (5 files):
17:39 dalek perl6-roast-data: today (automated commit)
17:39 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/dc6a763f96
17:40 [ptc] afk
17:41 dalek rakudo/nom: 58bf903 | timotimo++ | src/core/Bool.pm:
17:41 dalek rakudo/nom: make Bool.pick()/roll() another 10% faster
17:41 dalek rakudo/nom:
17:41 dalek rakudo/nom: but for some reason this seems to still box a Num
17:41 dalek rakudo/nom: somewhere ...
17:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/58bf903304
17:41 lizmat timotimo++
17:41 kjs_ joined #perl6
17:42 lizmat timotimo: so there *is* a difference between using nqp::opts l)ike isge_n) when using native nums versus using >= ?
17:42 lizmat is this also true for ints ?
17:43 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, ?
17:43 moritz like the guard clauses that check the types
17:44 moritz lizmat: I'm pretty sure nqp::p6bool does not box a Num
17:44 dalek perl6-roast-data: bfc2b36 | coke++ | / (3 files):
17:44 dalek perl6-roast-data: rakudo.parrot is not currently an option;
17:44 dalek perl6-roast-data:
17:44 dalek perl6-roast-data: Stop running the tests for now.
17:44 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/bfc2b3643e
17:45 lizmat moritz: well, it turns something native into a P6 boxed object
17:45 moritz rerun with an nqp::p6bool(1) instead for comparison?
17:47 moritz rakudo-star 2015.02 release tagged and uploaded
17:48 dalek roast: 96472ef | peschwa++ | S06-other/main-usage.t:
17:48 dalek roast: Add few dispatch related tests for MAIN.
17:48 dalek roast: review: https://github.com/perl6/roast/commit/96472efec6
17:50 psch https://github.com/peschwa/rakudo/compare/main-single-positional?expand=1 # is the diff of Main.pm that passes those tests
17:50 psch as noted in the commit message, this pretty much bypasses the dispatcher
17:50 psch which we kinda have to do because a Scalar in a signature can take an itemified array
17:50 psch *as parameter
17:53 psch the patches now also exist as a PR (https://github.com/rakudo/rakudo/pull/370) with an argument why it's implemented like that
17:54 perl6_newbee bye guys
17:58 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:59 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,"
17:59 synopsebot Link: http://design.perl6.org/S32/Str.html#line_460
17:59 camelia rakudo-moar 114659: OUTPUT«␤»
18:00 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␤»
18:01 moritz lizmat: seems rakudo interprets "outside" a bit differently than you do
18:02 [Coke] that seems buggy
18:02 lizmat it is passed the last char in the string: that means outside to me
18:02 lizmat *past
18:02 moritz m: say 'foo'.substr($_) for 0..3
18:02 camelia rakudo-moar 114659: OUTPUT«foo␤oo␤o␤␤»
18:02 moritz I can see the use case for it
18:03 moritz it feels strangely consistent in this light
18:03 lizmat well, then we need to change the synopsis
18:03 lizmat or accept the P5 behaviour
18:03 lizmat 6 ""foo".substr(123456789)
18:03 lizmat m: "foo".substr(123456789)
18:03 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-…»
18:03 lizmat m: "foo".substr(4)
18:03 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…»
18:03 moritz fwiw p5 and rakudo behave consistently
18:04 lsm-desktop joined #perl6
18:04 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 #perl6
18:04 moritz it warns and returns undef for substr 'foo', 4;
18:04 moritz lizmat: well, use -wE :-)
18:05 moritz perl 6 resembles perl 5 with strict and warnings more closely than without
18:05 lizmat ok, just checking  :-)
18:06 moritz lizmat: I'd see it this way: it's a programming error to request characters outside the string
18:06 moritz but requesting the empty string from the end is often enough what the programmer actually wants
18:07 lizmat ok
18:12 moritz fwiw I've gpg-signed the star release tag
18:13 lizmat moritz++
18:13 moritz a habit we could start if the release managers don't oppose
18:13 FROGGS_ moritz: just put it in the release guide :o)
18:14 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 timotimo another thing is that the one version gets jitted, the other one doesn't
18:14 moritz FROGGS_: willdo
18:14 lizmat that's also what jnthn has told me in the past
18:14 timotimo and i don't really understand that either
18:15 lizmat which one gets jitted?
18:15 lizmat the nqp one, or the other one?
18:16 dalek star: 0a06799 | moritz++ | tools/star/release-guide.pod:
18:16 dalek star: Document this release
18:16 dalek star: review: https://github.com/rakudo/star/commit/0a0679942f
18:16 timotimo the one with nqp::isge_n
18:17 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
18:21 dalek nqp: e4193d1 | moritz++ | docs/release_guide.pod:
18:21 dalek nqp: Release guide: sign the release tags
18:21 dalek nqp: review: https://github.com/perl6/nqp/commit/e4193d1943
18:22 dalek star: a08a24a | moritz++ | tools/star/release-guide.pod:
18:22 dalek star: release guide: sign release tag
18:22 dalek star: review: https://github.com/rakudo/star/commit/a08a24a0e7
18:23 moritz oops, I accidentally sent the release mail to perl6-language-subscribe :(
18:24 BenGoldberg joined #perl6
18:25 TimToady note that I'm currently rewriting Bool.pick to avoid floating point altogether
18:25 timotimo the boxing and unboxing comes from spesh inlining the infix:«>=» code
18:26 BenGoldberg joined #perl6
18:27 timotimo AFK, BBIAB
18:27 lizmat timotimo: expect quite a significant general speedup if that is fixed  :-)
18:28 lizmat there's a lot of code involving natives and operators like >=
18:28 lizmat especially in the hot loops
18:36 * moritz prepares Lefsa for supper
18:43 _mg_ joined #perl6
18:47 colomon joined #perl6
18:48 timotimo TimToady: do you think Enum.roll/pick have some room for improvement? it could benefit code like ForestFire, i suspect
18:50 * 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:54 timotimo you know Bool.pick only has to return either True, False, (True, False) or (False, True)? :)
18:55 BenGoldberg joined #perl6
18:56 timotimo (i'm expecting you've really been talking about roll) (or maybe you're caching one 64bit integer result?)
18:57 TimToady I'm testing on pick, but plan to work on roll if I can make pick faster
18:58 TimToady well, I know I can make it a little faster by using rand_i and comparing with 0, but I'm gunning for more
19:02 TimToady 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:03 TimToady in principle they should run faster, so maybe it's worth it to have code in there that may be further optimized later
19:04 lucas__ joined #perl6
19:09 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:10 TimToady but you'd think that multiply floaters just to pull single bit out is suboptimal
19:10 TimToady *ing
19:10 Kristien are there multidimensional arrays like in c#?
19:10 Kristien or should you create arrays of arrays?
19:10 TimToady how should I know?
19:10 Kristien you know a lot about Perl 6 :P
19:11 * TimToady knows next to nothing about C# though
19:11 Kristien oh right
19:12 Kristien 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 bronco_creek joined #perl6
19:13 Mouq joined #perl6
19:13 bronco_creek o/ p6
19:17 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 TimToady as currently defined you could constrain a paramater @array where *.shape[*-1] ~~ Int or so
19:17 TimToady *meter
19:18 Kristien ok :p
19:18 TimToady I suppose one could define a role that enforced that typology
19:18 TimToady but my int @array[*,*] is potentially ragged
19:19 TimToady er, *;* rather
19:20 TimToady likewise 3;4 above
19:21 TimToady 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 TimToady but it might be more important to catch the , vs ; error, or require a ; somewhere if you really mean something like that
19:22 TimToady it's not needed really for arrays, but hashes want to be able to define the sets of legal keys
19:23 TimToady my %hash{DaysOfWeek; HoursOfDay}
19:23 TimToady so enums or sets or lists would define sets of valid keys
19:23 TimToady in that dimension
19:24 TimToady (though by that set-of-keys reckoning, [1,2] is illegal, since arrays are always 0 based
19:25 TimToady but nothing says we have to interpet lists the same for array indices as we do for hash indices
19:25 TimToady except maybe a hobgoblin or two
19:26 TimToady so interpreting each of them as a valid size rather than a valid key seems okayish to me
19:26 Rounin joined #perl6
19:27 TimToady if we want to get that fancy, which we probably don't, at least not for 6.0
19:27 TimToady but we should reserve the syntax, so [1,2] is illegal if you really mean [1;2]
19:28 grondilu joined #perl6
19:32 moritz +1
19:32 BenGoldberg joined #perl6
19:33 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:34 moritz bronco_creek: modify your $PATH to contain the install location of the 2015.02 release first
19:34 moritz bronco_creek: or use https://github.com/tadzik/rakudobrew/ to manage your rakudo installion(s)
19:35 moritz 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 #perl6
19:43 jack_rabbit_ joined #perl6
19:44 hdzz joined #perl6
19:45 _mg_ joined #perl6
19:47 _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:58 BenGoldberg joined #perl6
19:59 moritz can somebody on Mac OS test if .w works on dirs?
19:59 moritz something like perl6-m -e 'say ".".IO.w'
19:59 hdzz left #perl6
19:59 BenGoldberg joined #perl6
19:59 lizmat $ ls -lsd foo
19:59 lizmat 0 drwxrwxr-x  3 liz  macports  102 Jan 28 23:11 foo
20:00 lizmat $ 6 'say "foo".IO.w'
20:00 lizmat True
20:00 moritz ok, so that's not it :(
20:00 lizmat $ ls -lsd foo
20:00 lizmat 0 dr-xr-xr-x  3 liz  macports  102 Jan 28 23:11 foo
20:00 lizmat $ 6 'say "foo".IO.w'
20:00 lizmat False
20:12 kjs_ joined #perl6
20:18 dalek roast: 8c619fc | lizmat++ | S06-other/main-usage.t:
20:18 dalek roast: Unfudge now passing tests [ptc]++
20:18 dalek roast: review: https://github.com/perl6/roast/commit/8c619fc9c0
20:19 dalek nqp/sizeof: 43e8467 | FROGGS++ | src/vm/jvm/ (2 files):
20:19 dalek nqp/sizeof: port nativecallsizeof op to jvm
20:19 dalek nqp/sizeof: review: https://github.com/perl6/nqp/commit/43e84677b2
20:20 dalek rakudo/nom: 32041d3 | lizmat++ | src/core/Str.pm:
20:20 dalek rakudo/nom: Make substr(-rw) about 10% faster
20:20 dalek rakudo/nom:
20:20 dalek rakudo/nom: Thanks to the wonders of Str() coercion for parameters now working
20:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/32041d37a8
20:30 dalek nqp/js: 998c438 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
20:30 dalek nqp/js: Start of work on rules.
20:30 dalek nqp/js: review: https://github.com/perl6/nqp/commit/998c43817c
20:30 dalek nqp/js: 9c089b3 | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js:
20:30 dalek nqp/js: Add a hack to make nqp::istype work on number and strings.
20:30 dalek nqp/js:
20:30 dalek nqp/js: Doing this the proper way would require though how we are going to represent native numbers as objects, BOOT type etc.
20:30 dalek nqp/js: We need the hack to be able to get rules to work before that.
20:30 dalek nqp/js: review: https://github.com/perl6/nqp/commit/9c089b350d
20:30 dalek nqp/js: ccb21ea | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
20:30 dalek nqp/js: Implement the 'pass' rxtype.
20:30 dalek nqp/js: review: https://github.com/perl6/nqp/commit/ccb21ea314
20:32 dalek roast: deecfcd | paultcochrane++ | S24-testing/ (3 files):
20:32 dalek roast: Remove superfluous trailing '1;'s and trailing whitespace
20:32 dalek roast: review: https://github.com/perl6/roast/commit/deecfcd0a6
20:32 fernand__ for me it's happening too: https://gist.github.com/anonymous/3be64d971438ee6098e5
20:33 mj41 joined #perl6
20:36 fernand__ i tryed again and just worked...
20:39 fernand__ why this: sub MAIN (Str :@requires! where {require $^module}, :@resources!) {
20:40 fernand__ means this: ResourceManager.p6 --requires=<Positional[Str]> --resources=<Positional>
20:40 fernand__ ?
20:40 fernand__ what means Positional in this context?
20:41 FROGGS_ fernand__: Positional means Arrayish
20:41 bjz joined #perl6
20:42 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
20:42 fernand__ or --requires=Mod1 --requires=Mod2
20:43 FROGGS_ ahh, and remove the Str constraint
20:43 FROGGS_ this is buggy still
20:43 LLamaRider joined #perl6
20:43 fernand__ but it's not working...
20:43 FROGGS_ -sub MAIN (Str :@requires! where {require $^module}, :@resources!) {
20:43 FROGGS_ +sub MAIN (:@requires! where {require $^module}, :@resources!) {
20:45 fernand__ doesn't work too...
20:45 fernand__ shows the usage message
20:45 FROGGS_ how do you call it now?
20:45 FROGGS_ m: say (require Test)
20:45 camelia rakudo-moar 114659: OUTPUT«True␤»
20:45 FROGGS_ m: say (require foo)
20:45 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…»
20:46 FROGGS_ k
20:46 FROGGS_ that part should be right
20:47 fernand__ sub MAIN (:@requires!, :@resources!) { dont works too...
20:47 fernand__ perl6 -I. ResourceManager.p6 --resources=Ad --resources=User --requires=./BlogResources.pm6
20:47 fernand__ maybe the require isn't working, right?
20:47 fernand__ yes... if the require is the problem it should die with this error msg...
20:48 mj41 btw: "say" (or/and "print") is still slow
20:48 mj41 time perl -e 'print "$_\n" foreach 1..2_000_000' > /tmp/perl-print2
20:48 mj41 real0m0.218s
20:48 mj41 time perl6 -e 'say $_ for 1..2_000_000;' > /tmp/rakudo-say2
20:48 mj41 real0m9.569s
20:48 mj41 https://gist.github.com/mj41/6761c021135ae1cb17f9
20:49 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 #perl6
20:50 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 FROGGS_ fernand__: you can, when the bug is fixed
20:50 fernand__ FROGGS_: it worked...
20:51 fernand__ FROGGS_: thanks!
20:51 FROGGS_ psch: are you happy with PR370?
20:51 FROGGS_ fernand__: :o)
20:52 FROGGS_ fernand__: PR 370 seems to be the fix to the one element array problem with MAIN
20:52 fernand__ perlfect!
20:53 fernand__ *perfect
20:57 dalek rakudo/sizeof: 0c0accc | FROGGS++ | lib/NativeCall.pm:
20:57 dalek rakudo/sizeof: the nativesizeof op itself deconts, so we dont
20:57 dalek rakudo/sizeof: review: https://github.com/rakudo/rakudo/commit/0c0accceaa
20:57 dalek rakudo/sizeof: 9b60206 | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
20:57 dalek rakudo/sizeof: add tests for nativesizeof
20:57 dalek rakudo/sizeof:
20:57 dalek rakudo/sizeof: This uncovers a bug in moar about calculation the size and probably also offset of
20:57 dalek rakudo/sizeof: C structure members.
20:57 dalek rakudo/sizeof: review: https://github.com/rakudo/rakudo/commit/9b6020677a
21:02 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␤»
21:02 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␤2␤3␤3␤4␤6␤7␤8␤8␤8␤11␤12␤12␤12␤»
21:03 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 joined #perl6
21:12 mj41 FROGGS_: https://gist.github.com/mj41/6761c021135ae1cb17f9#file-gistfile1-txt-L54 https://gist.github.com/mj41/6761c021135ae1cb17f9#file-gistfile1-txt-L133
21:14 FROGGS_ mj41: I see
21:14 FROGGS_ so, it is say()
21:14 Mouq mj41++
21:14 Mouq also, o/ #perl6
21:15 FROGGS_ hi Mouq
21:15 mj41 yes, say ... http://irclog.perlgeek.de/perl6/2014-05-21#i_8753753
21:17 Mouq FROGGS++ too # all kinds of awesome nativecall work
21:17 moritz FROGGS_++ indeed
21:21 BenGoldberg m:p5/^FROGGS_?$/++
21:21 jack_rabbit_ joined #perl6
21:26 FROGGS_ *g*
21:29 timotimo i'd like printing to be faster
21:30 dolmen joined #perl6
21:36 * FROGGS_ .oO( Save the environment - Think before you print! )
21:38 dalek nqp/sizeof: 3764d99 | FROGGS++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java:
21:38 dalek nqp/sizeof: return size of CStructs correctly in bytes
21:38 dalek nqp/sizeof: review: https://github.com/perl6/nqp/commit/3764d99719
21:39 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:40 FROGGS_ hmmmm, I doubt it
21:40 Sysaxed joined #perl6
21:41 BenGoldberg So you want a code prettifier which works equally well on perl, C, lisp, etc?
21:43 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)
21:43 moritz ("world domination is such an ugly phrase. I prefer to call it ''world pretty-printing''"
21:43 lizmat so I have this sub that can fail
21:43 lizmat if it does, I want it to return that fail
21:43 lizmat if it doesn't, I want it to go on
21:44 masak hugme: hug the world
21:44 * hugme hugs the world
21:44 lizmat I was thinking some R// magic
21:44 moritz lizmat: that's what fail() does, yes
21:44 pmurias FROGGS_: it's possible for sure, the simplest implementation would have the hint be: sub ($code) {...; return $beautified_code }
21:44 lizmat m: sub a() { fail }; a() // 42  # want the reverse
21:44 camelia rakudo-moar 114659: ( no output )
21:45 lizmat m: sub a() { fail }; say a() // 42  # want the reverse
21:45 camelia rakudo-moar 114659: OUTPUT«42␤»
21:45 pmurias but the question is how much info can we infer from the grammar
21:45 lizmat if a() returns something defined, I want it to go on, else return what was returned
21:46 lizmat in a way, I want the sink to go through on a fail
21:46 Mouq m: sub a() { fail }; say a() andthen 42
21:46 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␤␤»
21:46 Mouq m: sub a() { 1 }; say a() andthen 42
21:46 camelia rakudo-moar 114659: OUTPUT«1␤»
21:46 moritz m: sub a() { 0 }; say a() andthen 42
21:46 camelia rakudo-moar 114659: OUTPUT«0␤»
21:46 pmurias if we want to have an extendable grammar we also need to have a code prettifier that handles it
21:48 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␤»
21:48 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«still here␤»
21:48 moritz lizmat: ^^
21:48 moritz m: sub f() {  42 }; sub g() { my &p = -> Mu $x { return $x if defined $x }; p f(); say "still here" }; g
21:48 camelia rakudo-moar 114659: ( no output )
21:48 Sysaxed So I was walking through this list: http://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?
21:48 moritz m: sub f() {  42 }; sub g() { my &p = -> Mu $x { return $x if defined $x }; p f(); say "still here" }; say g
21:48 camelia rakudo-moar 114659: OUTPUT«42␤»
21:48 Sysaxed m: my @l = (1); say "@l[]";
21:48 camelia rakudo-moar 114659: OUTPUT«1␤»
21:49 moritz Sysaxed: because the LHS of = doesn't need to be a list
21:49 FROGGS_ RHS* ?
21:49 moritz m: my @l = 42;
21:49 camelia rakudo-moar 114659: ( no output )
21:49 moritz yes, RHS, sorry
21:50 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␤»
21:50 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
21:50 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
21:50 FROGGS_ sigled*
21:52 Sysaxed okay :)
21:55 dalek ecosystem: aa1d420 | (Andrew Egeler)++ | META.list:
21:55 dalek ecosystem: Add XML::Canonical
21:55 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/aa1d42044a
21:57 aborazmeh joined #perl6
21:57 aborazmeh joined #perl6
22:00 dalek nqp: edd4dc9 | moritz++ | src/ (2 files):
22:00 dalek nqp: Add option --profile-filename=s
22:00 dalek nqp:
22:00 dalek nqp: this makes it easier to automate the generation of profiles
22:00 dalek nqp: review: https://github.com/perl6/nqp/commit/edd4dc9979
22:01 timotimo moritz: could you also somehow bake the commandline that was used into the resulting html file?
22:08 dalek nqp: 2e9ec95 | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
22:08 dalek nqp: map nativecallsizeof op on moar
22:08 dalek nqp: review: https://github.com/perl6/nqp/commit/2e9ec9573e
22:08 dalek nqp: 43e8467 | FROGGS++ | src/vm/jvm/ (2 files):
22:08 dalek nqp: port nativecallsizeof op to jvm
22:08 dalek nqp: review: https://github.com/perl6/nqp/commit/43e84677b2
22:08 dalek nqp: 3764d99 | FROGGS++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java:
22:08 dalek nqp: return size of CStructs correctly in bytes
22:08 dalek nqp: review: https://github.com/perl6/nqp/commit/3764d99719
22:08 dalek nqp: 879ebe4 | FROGGS++ | src/vm/ (3 files):
22:08 dalek nqp: Merge branch 'sizeof' of github.com:perl6/nqp
22:08 dalek nqp: review: https://github.com/perl6/nqp/commit/879ebe4053
22:08 dalek nqp: db8d16d | FROGGS++ | tools/build/MOAR_REVISION:
22:08 dalek nqp: bump moar for nativecallsizeof op
22:08 dalek nqp: review: https://github.com/perl6/nqp/commit/db8d16d4bc
22:09 dalek rakudo/sizeof: 680410d | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
22:09 dalek rakudo/sizeof: more CStruct sizeof tests
22:09 dalek rakudo/sizeof: review: https://github.com/rakudo/rakudo/commit/680410d663
22:10 fernand__ joined #perl6
22:13 dalek rakudo/nom: e321ea6 | FROGGS++ | lib/NativeCall.pm:
22:13 dalek rakudo/nom: add nativesizeof sub
22:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e321ea69c4
22:13 dalek rakudo/nom: 8369018 | FROGGS++ | lib/NativeCall.pm:
22:13 dalek rakudo/nom: the nativesizeof op itself deconts, so we dont
22:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/836901862e
22:13 dalek rakudo/nom: f8eec5a | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
22:13 dalek rakudo/nom: add tests for nativesizeof
22:13 dalek rakudo/nom:
22:13 dalek rakudo/nom: This uncovers a bug in moar about calculation the size and probably also offset of
22:13 dalek rakudo/nom: C structure members.
22:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f8eec5a097
22:13 dalek rakudo/nom: 23f9130 | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
22:13 dalek rakudo/nom: more CStruct sizeof tests
22:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/23f9130ccf
22:13 dalek rakudo/nom: d322551 | FROGGS++ | tools/build/NQP_REVISION:
22:13 dalek rakudo/nom: bump nqp for nativecallsizeof op
22:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d32255175b
22:15 grondilu lol I check out http://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:16 grondilu timotimo: ok, noted.
22:16 dalek rakudo/nom: 5bc543d | FROGGS++ | lib/NativeCall.pm:
22:16 dalek rakudo/nom: add nativesizeof sub
22:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5bc543d313
22:16 dalek rakudo/nom: 0c0accc | FROGGS++ | lib/NativeCall.pm:
22:16 dalek rakudo/nom: the nativesizeof op itself deconts, so we dont
22:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0c0accceaa
22:16 dalek rakudo/nom: 9b60206 | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
22:16 dalek rakudo/nom: add tests for nativesizeof
22:16 dalek rakudo/nom:
22:16 dalek rakudo/nom: This uncovers a bug in moar about calculation the size and probably also offset of
22:16 dalek rakudo/nom: C structure members.
22:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9b6020677a
22:16 dalek rakudo/nom: 680410d | FROGGS++ | t/04-nativecall/12-sizeof. (2 files):
22:16 dalek rakudo/nom: more CStruct sizeof tests
22:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/680410d663
22:16 dalek rakudo/nom: f74fa58 | FROGGS++ | /:
22:16 dalek rakudo/nom: Merge branch 'sizeof' of github.com:rakudo/rakudo into nom
22:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f74fa58bec
22:16 masak FROGGS_++
22:17 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 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:23 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␤»
22:27 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 grondilu plus it's not like it's going to conflict with an other name in rakudo.
22:27 jack_rabbit_ joined #perl6
22:29 grondilu though more elegant would be a size method to all native types.
22:29 grondilu (not sure it's possible thouhg)
22:29 FROGGS_ grondilu: that's not so easy, because NativeCall usually just offers a representation
22:30 grondilu yeah I was beginning to realise it's not that simple.
22:30 grondilu m: say int.^methods
22:30 camelia rakudo-moar 114659: OUTPUT«No such method 'methods' for invocant of type 'Perl6::Metamodel::NativeHOW'␤  in block <unit> at /tmp/nd9nOAIjDa:1␤␤»
22:31 grondilu (yeah, makes sense)
22:33 grondilu 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)
22:33 mj41 Rakudo Star 2015.02 Docker image available https://registry.hub.docker.com/u/mj41/perl6-star/tags/manage/
22:34 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"'
22:34 mj41 6
22:34 mj41 real0m2.298s
22:35 mj41 this command create new container, run perl6 say inside and remove container ... all in 2.3 seconds
22:35 masak o.O
22:35 * masak can hardly contain himself
22:36 mj41 without --rm it is around 1 second
22:36 FROGGS_ O.o
22:38 FROGGS_ mj41++
22:41 * grondilu wonders why http://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
22:42 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
22:43 FROGGS_ Mouq: you cannot call NativeCall::refresh though... but I see what you mean
22:43 Mouq Oh.. I guess not :P
22:43 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..?
22:43 * grondilu eventually killed it.  Whishes he knew what's wrong with this program.
22:44 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`?
22:44 psch FROGGS_: oh.  yeah, i had spectested it, but the behavior is definitely up for discussion imo
22:44 FROGGS_ multi MAIN(:$foo) { }; multi MAIN(:@foo) { } is ambiguous for one element
22:44 FROGGS_ okay
22:44 FROGGS_ so I wont merge it?
22:45 Mouq masak: I'm pretty sure that's how the grammars do it
22:45 psch i had a passing todo and a fail somewhere in S17, which i think are known flappers
22:45 FROGGS_ psch: probably
22:45 masak Mouq: could a left-associative `?? !!` operator exist? how would it parenthesize?
22:45 masak Mouq: is A the lhs? what does that make B?
22:45 psch «multi MAIN(:$foo) { }; multi MAIN(:@foo) { }»  in PR 370 would dispatch to the first candidate with one argument, fwiw
22:46 psch 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.
22:47 masak indeed.
22:47 masak so ?? !! has an lhs (A), a *mumble* (B), and an rhs (C).
22:47 Mouq masak: https://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 masak Mouq: I know. I'm trying to think up multi-part user infixes for 007.
22:49 lizmat ok, I have a bit of a dilemma:
22:49 lizmat I have a patch that will make substr-rw accept all the parameters that substr accepts
22:49 lizmat (it currently doesn't)
22:49 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.
22:49 lizmat the con: it makes substr() about 2.5x as slow
22:50 Mouq .o( circuminfix:<?? !!> )
22:50 grondilu oops, I meant 0.08 fps instead of 0.8
22:50 FROGGS_ lizmat: btw: https://gist.github.com/FROGGS/75dc69c6939956d16f73
22:50 lizmat the gist of the substr(-rw) patch: https://gist.github.com/lizmat/695c8187f5279ab41c88
22:51 lizmat FROGGS_: huh, I've built and spectested on jvm earlier today
22:51 lizmat lemme pull and check again
22:52 lizmat didn't we pull some Test.pm stuff earlier today ?
22:52 FROGGS_ that too, yes
22:52 FROGGS_ and there was something about substr taking whatever code as second argument
22:53 lizmat yes, but that only complains now if there is an actual error
22:53 lizmat and which I will fix tomorrow anyway
22:54 FROGGS_ I am just too tired right now too look at any code
22:54 lizmat yeah, know the feeling  :-)
22:56 fhelmberger joined #perl6
23:04 FROGGS_ the folder is there now but empty: http://video.fosdem.org/2015/
23:08 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:15 lizmat found the problem with the JVM build
23:16 telex joined #perl6
23:18 lizmat_ joined #perl6
23:18 lizmat_ apparently, on Moar you can do:  sub a( Str() \a ), on JVM you must do sub a( Str() $a )
23:19 lizmat_ 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:20 Sysaxed $object.method: $arg # why : is required?
23:20 rurban joined #perl6
23:20 masak Sysaxed: because otherwise the `$object.method` would in itself be the method call.
23:20 flussence joined #perl6
23:20 masak Sysaxed: and the parser would be surprised at seeing `$arg` after it.
23:21 Sysaxed masak: hmm
23:21 lizmat_ m: sub a(Str() \a) { say a; say a.WHAT }; a 42
23:21 camelia rakudo-moar 114659: OUTPUT«42␤(Str)␤»
23:21 lizmat_ $ perl6-j -e 'sub a(Str() \a) { say a; say a.WHAT }; a 42'
23:21 lizmat_ 42
23:21 lizmat_ (Int)
23:21 lizmat JVM does not actually coerce
23:22 masak boo
23:22 lizmat $ perl6-j -e 'sub a(Str() $a) { say $a; say $a.WHAT }; a 42'
23:22 lizmat 42
23:22 lizmat (Str)
23:22 lizmat if you give it a sigil, it does
23:23 dalek rakudo/nom: 7254f2b | lizmat++ | src/core/Str.pm:
23:23 dalek rakudo/nom: Fix build on JVM
23:23 dalek rakudo/nom:
23:23 dalek rakudo/nom: sub foo(Str() \a) { say a; say a.WHAT }; foo 42
23:23 dalek rakudo/nom:
23:23 dalek rakudo/nom: does not actually coerce to Str on JVM, it does on Moar!
23:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7254f2bd12
23:24 lizmat and on that note, I'm going to get some shuteye
23:24 lizmat &
23:25 masak good shuteye, lizmat
23:39 esaym153 joined #perl6
23:44 timotimo grondilu: understood. a pity ;(

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo