Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-11-08

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 dalek modules.perl6.org: 734174d | (Zoffix Znet)++ | web/assets/css/style.css:
00:00 dalek modules.perl6.org: Fix travis buttons display on mobile
00:00 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/734174d322
00:01 Skarsnik Oh sorry
00:01 Skarsnik I push, pull? the pull request
00:02 Zoffix \o/
00:02 RabidGravy Skarsnik, just hit merge in the github
00:02 RabidGravy Zoffix, the travis status has a ghost "Travis" behind on Chrome of you're looking ;0
00:02 Skarsnik Yes, I mean the proper term was "I merged the request"
00:03 RabidGravy ah
00:03 RabidGravy coolio
00:03 Zoffix RabidGravy, yeah, the above commit should fix that
00:03 Skarsnik hm, should I had received a mail for the request btw?
00:03 RabidGravy groovy
00:04 RabidGravy Skarsnik, usually :)
00:04 RabidGravy right, I think bed is calling
00:04 RabidGravy toodlepip
00:05 Zoffix \o
00:07 AlexDaniel joined #perl6
00:11 Ven joined #perl6
00:15 cognominal Does panda install scripts? I don't see that mentionned in http://doc.perl6.org/language/modules ?  I have not yet read the new doc about the package ecosystem.
00:17 llfourn cognominal: "nd possibly a bin directory for executable programs and scripts." -- /language/modules :)
00:17 f3ew joined #perl6
00:17 rjbs joined #perl6
00:17 llfourn though I have never tested it personally
00:17 Zoffix Running "panda install ufo" would be the conclusive test :) https://github.com/masak/ufo/
00:18 Zoffix panda install ufo ..... ==> Successfully installed ufo
00:18 dalek modules.perl6.org: c6f1a06 | (Zoffix Znet)++ | web/index-project-list.tmpl:
00:18 dalek modules.perl6.org: Fix logotype display on mobile (Closes #25)
00:18 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/c6f1a063bb
00:19 cognominal oops
00:19 llfourn cognominal: it's a tad unorganised...that should be in the distributing modules section really
00:20 cognominal so, there is no META.info convention to advertise it to panda?
00:22 llfourn afaik no
00:22 cognominal there is a bin/panda so, that would really be dogfood
00:26 cognominal S22 talks about bin/, but not about advertising scripts in META.info
00:27 cognominal it is about time I clean my code to make it available.
00:29 psch ugexe: i don't think mental illnesses come with fun drugs.  well, ADHD excepted, but with a year long commit streak that's probably out... :)
00:30 Zoffix :)
00:30 pink_mist haha, psch++ # very good point
00:31 cognominal psch, you mean -Ofun drugs?
00:32 psch cognominal: drugs optimized for fun were made illegal in the 60s i read
00:33 Zoffix W00t \o/ the sprite commit to modules.perl6.org reduced 51 HTTP requests per page load to just 7 :) and soon I'll reduce that to just 3 :P
00:33 Ven joined #perl6
00:42 rurban joined #perl6
00:46 dalek modules.perl6.org: 49bb82f | (Zoffix Znet)++ | web/index.tmpl:
00:46 dalek modules.perl6.org: Optimize page load speed
00:46 dalek modules.perl6.org:
00:46 dalek modules.perl6.org: Move sprite CSS to the end of page, to load last, since it only has non-essential base64-encoded images
00:46 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/49bb82f8b5
00:47 Ven joined #perl6
00:49 aborazmeh joined #perl6
00:49 aborazmeh joined #perl6
00:57 dalek modules.perl6.org: 01bb818 | (Zoffix Znet)++ | web/assets/js/main.js:
00:57 dalek modules.perl6.org: Fix sort-by-name breakage
00:57 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/01bb818c35
01:01 Ven joined #perl6
01:12 mr_ron joined #perl6
01:13 Ven joined #perl6
01:19 zengargoyle i have a couple modules to add to the ecosystem hopefully in the next week-ish.
01:20 zengargoyle a clone-like of Search::Dict - simple fast-ish binary search on dict type files
01:21 Zoffix Awesome :)
01:21 zengargoyle and a NativeCall binding for libdatrie - a double-array Trie
01:22 cognominal I will have a filter to add T<> and K<> directives to a REPL session pasted to a Pod file
01:22 dalek modules.perl6.org: ae2dd75 | (Zoffix Znet)++ | web/lib/P6Project/Hosts/Github.pm:
01:22 dalek modules.perl6.org: Handle GitHub API Redirects
01:22 dalek modules.perl6.org:
01:22 dalek modules.perl6.org: The API docs say any request can result in a redirect. Not handling this made us fail handling a couple of modules in the eco
01:22 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/ae2dd75531
01:22 cognominal so my question about scripts
01:24 ollej joined #perl6
01:29 Ven joined #perl6
01:44 Ven joined #perl6
01:49 ugexe psch: i assure you this was fueled in part by
01:49 ugexe adhd
01:49 Ulti https://gist.github.com/MattOates/c5879a07b1ef2c013097  check out the difference in times on the bottom two comments
01:50 ugexe cognominal: zef will install bin scripts from your module
01:50 ugexe zef also works on jvm now
01:51 tokuhiro_ joined #perl6
01:54 Actualeyes joined #perl6
01:56 raiph joined #perl6
01:59 Ven joined #perl6
02:13 lucs How do I get the equivalent of perl5's  split('', "abc") ? (three elements; perl6 appears to have five)
02:13 Ven joined #perl6
02:13 zengargoyle m: 'abc'.comb
02:13 camelia rakudo-moar 4988c7: ( no output )
02:13 zengargoyle m: say 'abc'.comb
02:13 camelia rakudo-moar 4988c7: OUTPUT«(a b c)␤»
02:13 lucs zengargoyle: Aha, thanks.
02:14 zengargoyle there's probably an option to split to drop empty elements or such.
02:17 lucs I didn't see any such in the docs, but comb() is just what I need (and, rereading the docs just now, comb() is mentioned, I had missed it)
02:26 ugexe net::http working on jvm as well
02:27 Sgeo_ joined #perl6
02:29 Ven joined #perl6
02:31 ugexe would be nice if travis allowed separate badges for different envs, ala separate badges for passes on moar and passes on jvm
02:32 mst create an extra repository?
02:32 mst I mean, some sort of crazy hack like that should work
02:32 ugexe yeah, it just wouldnt be *that* nice if i had to do that for multiple repos
02:34 mst absolutely
02:34 mst the alternative might be to have some sort of small script that pushes a second copy of the branch and do it via branch name
02:45 rangerprice joined #perl6
02:46 ilbot3 joined #perl6
02:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
02:55 sprocket joined #perl6
03:19 skids joined #perl6
03:30 rurban joined #perl6
03:31 Sgeo joined #perl6
03:32 chenryn joined #perl6
03:42 ZoffixMobile joined #perl6
03:50 psch ugexe: oh.  i was just playing of the cultural notion of ADHD for laughs, sorry if that was in any way insensitive or in bad taste
03:53 tokuhiro_ joined #perl6
03:56 TEttinger psch: ugexe: can confirm, ADHD does come with fun drugs
03:56 TEttinger my 512 day commit streak coincides rather cleanly with about 500 days of ADHD medication
03:58 TEttinger the wikipedia page on adderall is amazing, the studies that just recently came out that show increases in IQ and reductions in noted behavioral incidents in school after like 6 months on adderall, persisting longer than the 6 months the kids were on it
03:59 TEttinger how many pills increase your IQ, seriously
04:00 TEttinger it makes me sad that these meds can be abused because when they aren't abused they are so effective
04:02 psch i don't have any therapeutic experience with amphetamines
04:02 psch only the dreaded abuse, which luckily subsided rather quickly after relocating
04:03 raiph joined #perl6
04:04 psch but yes, nootropics in general are pretty interesting
04:04 psch although i rather like watching them from a distance :)
04:05 TEttinger it's weird how closely chemically linked all these things are
04:06 TEttinger decongestants can be used to make crystal meth, and crystal meth is similar but not identical to amphetamines used for AD(H)D treatment
04:06 TEttinger what does clearing your mind have to do with clearing your nose?
04:07 psch TEttinger: you might want to read PiHKAL
04:07 TEttinger not to mention how badly people can screw up designer drugs to evade the law for just a bit longer...
04:09 TEttinger all these tiny tweaks to chemicals, n-BOMe claims to be legal LSD but apparently people who take it frequently hallucinate violent images that make them stab themselves in the back
04:09 TEttinger with whatever they can find, scissors, pencils
04:09 TEttinger it's amazing and terrifying how easily the brain is altered
04:09 psch 2c-i gave me seizures :S
04:10 psch but that was back when it was legal, so... vOv
04:11 TEttinger it's more amazing that nature sometimes already takes advantage of how easily some brains are altered. like the emerald jewel wasp, which stabs a cockroach in just the right place so that it can't walk backwards, then leads it into a thin tunnel and leaves it there with eggs in it
04:11 TEttinger it's a neurological injury that the wasp can perform effectively
04:17 psch yeah, zombie ants too
04:17 psch brains are definitely weird
04:19 zengargoyle m: my $s = "hello" but 12; say $s.Int; say +$s;
04:19 camelia rakudo-moar 4988c7: OUTPUT«12␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5hello' (indicated by 7⏏)␤  in block <unit> at /tmp/t_7vSfgdtG:1␤␤Actually thrown at:␤  in block <unit> at /tmp/t_7vSfgdtG:1␤␤»
04:20 zengargoyle m: my $s = "hello" but 12; say $s.Int;
04:20 camelia rakudo-moar 4988c7: OUTPUT«12␤»
04:20 zengargoyle i though + and .Int did about the same numberwise
04:20 psch m: my $s = "hello" but role { method Numeric { 12 } }; say +$s
04:20 camelia rakudo-moar 4988c7: OUTPUT«12␤»
04:21 zengargoyle ah
04:21 psch m: my $s = "hello" but role { method Numeric { 12 } }; say $s.Int # this still works too
04:21 camelia rakudo-moar 4988c7: OUTPUT«12␤»
04:21 zengargoyle is there a short version..
04:22 zengargoyle like but 12 for Int
04:22 psch i don't think so.  Numeric is a role that's does'd by Int, Rat, Num
04:23 psch fwiw, the issue seems more in MMD but in "but"
04:23 psch s:1st/but/than/
04:24 psch as in, if you want a prefix:<+> that calls Int, there isn't one
04:25 zengargoyle doing a return $x but (12, True, "yes") would be nicer if it got +$x, ?$x, ~$x
04:26 zengargoyle but i need a more complex role anyways ATM so no biggie.
04:26 psch ye, prefix:<+> is somewhat overloaded relative to the others
04:26 mr_ron joined #perl6
04:26 psch although i suspect that at least ~ might get somewhat more ambiguous
04:27 psch but that's maybe misunderstanding what exactly is still missing on the Stringy bits
04:28 timotimo i wonder if it's a good idea to have the camelia as part of the spritesheet
04:28 timotimo as it forces the whole spritesheet to be pretty wide
04:29 timotimo and the program that creates the spritesheet doesn't put multiple things into the same row
04:29 psch m: my $s = 12 but Uni.new(65, 65, 65); say ~$s; say Uni.new(65, 65, 65).Str # same things with Stringy i guess?
04:29 camelia rakudo-moar 4988c7: OUTPUT«12␤AAA␤»
04:30 ugexe TEttinger: that fueled my streak as well heh
04:32 zengargoyle hrm, Uni... is there a thingy to check whether a char is in the 16bit range
04:32 zengargoyle i'm playing with a library who's idea of unicode is a uint32
04:33 zengargoyle so unicode, but in the not-so-great way
04:33 psch m: my $a = Uni.new; $a.of.say
04:33 camelia rakudo-moar 4988c7: OUTPUT«(uint32)␤»
04:34 psch what a library that must be... :P
04:34 zengargoyle i'm bluffing it at the moment and just assuming that my .ords are <= 16bit
04:34 zengargoyle oops, mean 32
04:35 zengargoyle maybe my brain broke..  is any unicode > 32bits.. i think i'm mixing up utf16/ucs
04:35 psch m: my uint32 $x = -1; say $x # this is still there though... :/
04:35 camelia rakudo-moar 4988c7: OUTPUT«-1␤»
04:42 weihan joined #perl6
04:46 rurban joined #perl6
04:47 cognominal joined #perl6
04:47 pochi_ joined #perl6
04:52 weihan_ joined #perl6
04:57 weihan joined #perl6
05:11 weihan joined #perl6
05:21 mr_ron joined #perl6
05:22 weihan joined #perl6
05:24 kaare_ joined #perl6
05:31 weihan joined #perl6
05:32 timotimo .u ????
05:32 yoleaux U+1F527 WRENCH [So] (????)
05:32 timotimo .u star
05:32 yoleaux U+0001 START OF HEADING [Cc] (␁)
05:32 yoleaux U+0002 START OF TEXT [Cc] (␂)
05:32 yoleaux U+0086 START OF SELECTED AREA [Cc] (<control>)
05:32 timotimo no, not start m)
05:33 weihan joined #perl6
05:36 weihan joined #perl6
05:39 weihan joined #perl6
06:09 mr_ron joined #perl6
06:58 aborazmeh joined #perl6
06:58 aborazmeh joined #perl6
07:07 CIAvash joined #perl6
07:40 xfix joined #perl6
07:50 timotimo the reason why we can't slurp /proc/cpuinfo is our slurp implementation gets the file size from a stat call, which returns 0 for that file
07:50 timotimo so we read 0 bytes and close and consider ourselves finished
07:51 timotimo i'm not sure if i should put in a special case for 0-bytes-sized-files to just read until EOF or just read stuff until EOF anyway
07:51 timotimo as in, never rely on the size reported by stat
07:55 Begi1116 joined #perl6
07:57 TimToady joined #perl6
07:59 mst timotimo: st_size is only valid for something that's a regular file. surely /proc stuff, by definition, isn't (and surely there's some other way to determine that?)
08:01 timotimo mhm
08:10 timotimo i'm working on something else at the moment
08:10 timotimo which is that Blob.new: @values is ridiculously slow
08:14 mst timotimo: aha!
08:14 mst timotimo: at the C level, S_ISREG(st_mode) (POSIX macro) should allow you to detect regular file or not
08:15 mst only if that macro returns true can you use the st_size
08:15 mst or st_mode & S_IFREG
08:15 timotimo what do i do for non-linux?
08:15 mst what do you mean? this is all POSIX
08:15 zhmylove joined #perl6
08:15 timotimo oh, windows is happy about this, too?
08:15 mst windows has /proc/cpuinfo ?
08:15 timotimo no
08:15 zhmylove mst: why not?
08:15 timotimo does windows have S_ISREG?
08:15 mst more seriously
08:16 mst do you even use the stat() system call on windows?
08:16 timotimo no, we go through libuv
08:16 zhmylove mst: nope, only mmap() :p
08:16 mst ok, so, I have no idea
08:16 timotimo hehe
08:16 timotimo welcome to my world :)
08:17 mst I do know, however, that returning 0 for size if S_ISREG is false is probably wrong for a high level API on a *n?x
08:18 rindolf joined #perl6
08:23 mst timotimo: but, anyway, fixing a bug on *n?x shouldn't introduce one on win32 ... *crosses toes*
08:23 darutoko joined #perl6
08:23 timotimo hehe
08:23 timotimo right. with the other thing i've been working on for a few minutes blown up, i can have a look at that slurp thing again
08:24 mst bah. for some reason most of my 'help' in here turns out to be 'blowing up somebody's life'
08:25 mst at least I only managed to get larry to destroy his dev env oncr
08:25 timotimo haha, nah, it had nothing to do with you :)
08:25 timotimo just that i thought i could apply a certain optimization which wasn't applicable after all
08:25 mst nah, more, "that indicates a gaping bug in your slurp() code" in this case
08:26 timotimo oh
08:26 timotimo wel, i knew it wasn't right, you just pointed me at the exact wrongness
08:27 mst my superpower: realising I've forgotten how it works too and re-reading the man page until I can fake competence
08:30 telex joined #perl6
08:30 timotimo cache invalidation is one of the hardest problems in IT
08:30 timotimo so yeah, that's a good superpower
08:39 timotimo um ...
08:39 timotimo so why would S_ISREG give me 1 in this case?
08:39 timotimo the mode is 33060
08:41 timotimo is the file regular? 1 (33060)
08:41 timotimo fprintf(stderr, "is the file regular? %d (%d)\n", S_ISREG(req.statbuf.st_mode), req.statbuf.st_mode);
08:42 timotimo how can this be? :\
08:42 timotimo aleggedly S_IFREG is 01000000
08:42 timotimo allegedly*
08:42 timotimo m: say 33060 +& 1000000
08:42 camelia rakudo-moar 4988c7: OUTPUT«0␤»
08:44 timotimo that could be hexadecimal, though
08:45 timotimo m: say 33060 +& 0x1000000
08:45 camelia rakudo-moar 4988c7: OUTPUT«0␤»
08:45 timotimo or actually octal
08:45 timotimo m: say 33060 +& 0o1000000
08:45 camelia rakudo-moar 4988c7: OUTPUT«0␤»
08:45 timotimo m: say 0o1000000
08:45 camelia rakudo-moar 4988c7: OUTPUT«262144␤»
08:45 timotimo m: say 0o100000
08:45 camelia rakudo-moar 4988c7: OUTPUT«32768␤»
08:45 timotimo yeah, that's right
08:45 timotimo it *is* a regular file, according to the test
08:45 mst oh wow
08:45 xenu joined #perl6
08:45 timotimo and according to what is in the st_mode field
08:45 timotimo except
08:46 mst S_ISREG I suspect is just '& S_IFREG'
08:46 timotimo nah, it really should be that
08:46 timotimo yeah
08:46 timotimo it's supposed to be
08:46 timotimo and st_mode & S_IFREG is also true
08:46 mst how bizarre
08:47 [Tux] test             50000    22.776    22.663
08:47 [Tux] test-t           50000    19.249    19.136
08:47 mst timotimo: I. er. er. dunno then.
08:47 [Tux] what happened that test got so much faster (and test-t didn't)?
08:47 timotimo well, now i'm just using an implementation that reach 4k chunks until it EOFs
08:47 [Tux] must be regex related
08:47 mst possibly the best balance would be to ignore a 0 and do a single read, to check you get eof
08:48 mst and then if not go 'oooooh' and do something better
08:48 timotimo "better"?
08:49 mst er, I mean, switch to the 4k chunk impl. or whatever
08:49 timotimo so, "if the size is nonzero, read exactly the size. if the size is zero, try a small read, if that succeeds, do 4k reads until you've reached EOF"?
08:51 tokuhiro_ joined #perl6
08:54 timotimo that seems to work well
08:58 dalek nqp: 3f074d4 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js:
08:58 dalek nqp: [js] Serialize the repr data for a VMArray.
08:58 dalek nqp: review: https://github.com/perl6/nqp/commit/3f074d4a6e
08:58 dalek nqp: 7ff5456 | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (3 files):
08:58 dalek nqp: [js] Implement nqp::objprimspec.
08:58 dalek nqp: review: https://github.com/perl6/nqp/commit/7ff5456762
08:58 dalek nqp: f5856f0 | (Pawel Murias)++ | t/nqp/93-oo-ops.t:
08:58 dalek nqp: Test nqp::objprimspec.
08:58 dalek nqp: review: https://github.com/perl6/nqp/commit/f5856f06b3
08:59 mst something like that, or maybe it'll turn out to be better just to go for a 4k chunk to begin with if not regular file or size 0
08:59 mst the small read is probably pointless, a 4k read on an actual zero size file will fail just as nicely, no?
08:59 mst (all this is thinking out loud, no warranty, express or implied)
09:00 timotimo well, before we actually attempt the read, we do allocate two buffers of that exact size
09:00 timotimo so a smaller allocation - as long as it's a friendly size for the allocator implementation - will totally work
09:00 timotimo actually ... why do we malloc that instead of allocating it on stack?
09:00 Ulti so I'm having a hard time with .race() getting 290x faster since Sept 22nd what magic is this?
09:00 mst yeah. just a question of whether it's an optimization or a pessimization overall
09:00 timotimo Ulti: oh, whoops
09:00 mst IME attempts at micro-optimization like that often turn out to cost more in branches
09:01 timotimo the branch happens before the loop, so it'll not be very expensive
09:01 timotimo the whole "going through libuv" thing we're doing at the moment probably dwarfs the cost of that
09:03 pmurias joined #perl6
09:04 pmurias timotimo: unless we benchmark this just doing things the simplest way IMHO seems best
09:04 timotimo right
09:04 timotimo at least perl6-bench has no benchmark for slurping files
09:06 timotimo ah, neat, jnthn's "sync-without-uv" branch already sets chunksize if the file size is reported to be 0
09:06 timotimo but his chunksize is 32k
09:13 spider-mario joined #perl6
09:16 mrf morning #perl6
09:33 Actualeyes joined #perl6
09:35 xinming_ joined #perl6
09:45 RabidGravy joined #perl6
09:52 RabidGravy joined #perl6
09:52 xfix joined #perl6
09:56 rurban joined #perl6
10:28 abraxxa joined #perl6
10:30 RabidGravy boom!
10:38 Ulti m: say (2 .. 100).race(batch => 25, degree => 4).grep({(2 .. truncate sqrt $^n).grep($^n %% *).elems == 0});
10:38 camelia rakudo-moar 4988c7: OUTPUT«()␤»
10:38 Ulti m: say (2 .. 100).grep({(2 .. truncate sqrt $^n).grep($^n %% *).elems == 0});
10:38 camelia rakudo-moar 4988c7: OUTPUT«(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97)␤»
10:38 Ulti :/
10:38 Ulti so much for faster it just doesn't execute really quickly
10:39 Ulti that used to work though
10:40 Ulti with a speed up for > first 2000 primes
10:44 Ulti m: say (2 .. 100).race().grep({(2 .. truncate sqrt $^n).grep($^n %% *).elems == 0});
10:44 camelia rakudo-moar 4988c7: OUTPUT«()␤»
10:45 DarthGandalf joined #perl6
10:45 lizmat [Tux]: I sped up the Str.split(Regex) version by a factor of two yesterday
10:46 Ulti m: say (2 .. 100).hyper().grep({(2 .. truncate sqrt $^n).grep($^n %% *).elems == 0});
10:46 camelia rakudo-moar 4988c7: OUTPUT«()␤»
10:47 abraxxa joined #perl6
10:52 tokuhiro_ joined #perl6
10:53 raoulvdberge joined #perl6
10:54 raoulvdberge can someone give me a few usecases for phasers? (besides exception handling)
10:54 lizmat m: LEAVE say "goodbye"
10:54 camelia rakudo-moar 4988c7: OUTPUT«goodbye␤»
10:55 lizmat m: LEAVE say "goodbye"; die
10:55 camelia rakudo-moar 4988c7: OUTPUT«goodbye␤Died␤  in block <unit> at /tmp/qfeKPRtBkb:1␤␤»
10:55 raoulvdberge well, usecases that are "useful" for a real world app :P
10:55 pink_mist raoulvdberge: if you want to print a table of rows/columns, you could have a first phaser that prints out the headers
10:56 pink_mist in a for loop
10:56 pink_mist though that's not really super useful, granted :P
10:57 Ulti BEGIN for doing things at compile time
10:57 moritz closing file handles or committing transactions is a good use case for LEAVE/KEEP phasaers
10:57 [Tux] lizmat, that is notable (and laudable!)
10:57 [Tux] lizmat++
10:57 lizmat please note that it was not the regex itself that got speeded up, just the post matching handling in split
10:57 [Tux] measuring++
10:58 raoulvdberge thanks!
10:59 moritz fwiw Perl 5 even has a Scope::Guard module for emulating LEAVE phasers
11:00 ^elyse^ joined #perl6
11:01 leont joined #perl6
11:07 chenryn joined #perl6
11:07 dalek rakudo/nom: 5a692f0 | lizmat++ | src/core/Str.pm:
11:07 dalek rakudo/nom: Be more open minded, give more rope
11:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5a692f085c
11:10 pink_mist joined #perl6
11:25 xfix joined #perl6
11:32 Joy joined #perl6
11:36 kid51 joined #perl6
11:37 CIAvash joined #perl6
11:37 mr_ron joined #perl6
11:41 xinming joined #perl6
11:43 Ven_ joined #perl6
11:43 vendethiel joined #perl6
11:50 virtualsue joined #perl6
11:52 CIAvash In order to test a script, I want to replace an instance of a module which will be used in MAIN subs with a mock object. Is this possible? Or Is there some way to achieve this goal?
11:53 tokuhiro_ joined #perl6
11:57 moritz CIAvash: you can't mess with another compilation unit's symbol table; you have to use something like Dependency Injection
11:57 moritz (at least not that I'm aware of; maybe somebody else has a better idea)
11:58 arnsholt Presumably you can do it somehow with dark forbidden magics
11:58 arnsholt But there's probably a better way to do testing/mocking
12:00 dalek nqp: a0bf15e | (Pawel Murias)++ | src/NQP/Compiler.nqp:
12:00 dalek nqp: Make nqp accept a --custom-regex-lib command line flag.
12:00 dalek nqp: review: https://github.com/perl6/nqp/commit/a0bf15e0f5
12:00 dalek nqp: 414563e | (Pawel Murias)++ | src/QAST/Var.nqp:
12:00 dalek nqp: Fix a bug in dumping QAST::Var as AST.
12:00 dalek nqp: review: https://github.com/perl6/nqp/commit/414563e74e
12:01 Ven_ joined #perl6
12:01 CIAvash If everything was a class, injecting would be easy. But here it's a script with subroutines, how can I do something like that?
12:04 isBEKaml joined #perl6
12:05 dalek rakudo/nom: dc5690c | lizmat++ | src/core/Str.pm:
12:05 dalek rakudo/nom: Some more corner case fixes in Str.split()
12:05 dalek rakudo/nom:
12:05 dalek rakudo/nom: ++ for writing tests!
12:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dc5690cf51
12:14 Ven_ joined #perl6
12:20 moritz CIAvash: you could use a dynamic variable, such as   my $*HTTP_MODULE = LWP::UserAgent; sub MAIN($url) { $*HTTP_MODULE.new.get($url) }
12:20 moritz CIAvash: and the in the test code, set the dynamic variable to a different value
12:25 yqt joined #perl6
12:28 lizmat m: dd (", ", / ", " /, / ,\s /, / ,\s+ /)   # seems this confuses the parser to no end
12:28 camelia rakudo-moar dc5690: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter , (must be quoted to match literally)␤at /tmp/lBotfQJLiv:1␤------> 3dd (", ", / ", " /, / 7⏏5,\s /, / ,\s+ /)   # seems this confuses␤Unrecognized regex metacharacter \ (must be quoted to ma…»
12:30 Ven_ joined #perl6
12:31 lizmat m: / ,\s /   # golfed
12:31 camelia rakudo-moar dc5690: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter , (must be quoted to match literally)␤at /tmp/9MfCZyzS7U:1␤------> 3/ 7⏏5,\s /   # golfed␤Unrecognized regex metacharacter \ (must be quoted to match literally)␤at /tmp/9MfCZyzS7U:1␤----…»
12:31 lizmat am I doing a P5ism ?
12:31 lizmat m: / , \s /
12:31 camelia rakudo-moar dc5690: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter , (must be quoted to match literally)␤at /tmp/GYLIzjpajS:1␤------> 3/ 7⏏5, \s /␤Unrecognized regex metacharacter   (must be quoted to match literally)␤at /tmp/GYLIzjpajS:1␤------> 3/ ,…»
12:31 lizmat m: / \s /
12:31 camelia rakudo-moar dc5690: OUTPUT«getlexrelcaller needs a context␤  in block <unit> at /tmp/EIgVvyOi3E:1␤␤»
12:32 lizmat m: say " " ~~ / \s /
12:32 camelia rakudo-moar dc5690: OUTPUT«「 」␤»
12:32 lizmat ah,,,  duh
12:32 lizmat *sigh*
12:32 lizmat Read The Error Message, Stupid  :-)
12:35 arnsholt Yeah, was about to say. Any non-alphanumeric is reserved =)
12:35 CIAvash moritz: will try it out, thanks
12:36 mr_ron joined #perl6
12:37 bartolin_
12:38 bartolin_ oops, sorry
12:38 clkao joined #perl6
12:43 RabidGravy CIAvash, the "dynamic variables" are discussed in http://docs.perl6.org/language/variables#The_*_Twigil for reference
12:45 Ven__ joined #perl6
12:47 CIAvash RabidGravy: thanks
12:52 Spot__ joined #perl6
12:52 Skarsnik joined #perl6
12:57 lizmat m: $_ = ""; /<null>/   # is this really a bug or a case of DIHWIDT ?
12:57 camelia rakudo-moar dc5690: OUTPUT«Method 'null' not found for invocant of class 'Cursor'␤  in block <unit> at /tmp/e3mqiCC4y8:1␤␤»
12:57 pmurias joined #perl6
12:57 lizmat m: $_ = ""; /<foobar>/   # null is not special
12:57 camelia rakudo-moar dc5690: OUTPUT«Method 'foobar' not found for invocant of class 'Cursor'␤  in block <unit> at /tmp/TkOWnAQcQO:1␤␤»
12:57 lizmat we seem to have a ticket for that: #124685
12:57 lizmat https://rt.perl.org/Public/Bug/Display.html?id=124685
12:58 lizmat feels to me the ticket is ENOTABUG
12:59 RabidGravy perhaps a slightly less than explanatory message however
12:59 bbkr joined #perl6
13:06 AlexDaniel joined #perl6
13:07 CIAvash moritz: How should I run the script in the test file? so that the dynamic variable can work. Maybe I misunderstood something.
13:14 moritz CIAvash: I don't know; how would you have run it contained a class? (which seems to have been your starting point)
13:14 arnsholt CIAvash: The usual way to make this kind of stuff test is to encapsulate the application logic as a module
13:15 arnsholt Then the script itself only does argument parsing and calling into the library
13:15 moritz CIAvash: one thing I occasionally do is have a multi sub MAIN('test') { ... } that runs the test code
13:15 arnsholt And testing can be done on the APIs exposed by the library
13:15 moritz CIAvash: though arnsholt's option is more reliable and modular
13:19 CIAvash joined #perl6
13:19 Zoffix joined #perl6
13:26 zhi joined #perl6
13:27 RabidGravy speaking of dynamic variables. is it bad form to do something like
13:27 RabidGravy m: PROCESS::<$FOO> = "bar"; say $*FOO
13:27 camelia rakudo-moar dc5690: OUTPUT«bar␤»
13:28 RabidGravy in a module?
13:28 RabidGravy well the setting part
13:28 lizmat well, it's trampling and action at a distance
13:29 lizmat do you need it to be set outside of the module's scope ?
13:29 RabidGravy yeah
13:30 CIAvash joined #perl6
13:30 RabidGravy I basically want one that has a sensible default but can be over-ridden by the use of the module
13:30 mr_ron joined #perl6
13:31 CIAvash moritz, arnsholt: Sorry I got disconnected. Well I am doing that. The script is only going to call the module and print the data it retrurns. But if the module works, it doesn't guarantee that the script is going to work as expected. Am I wrong? Or Am I going too far?
13:31 RabidGravy "user of the module"
13:32 moritz CIAvash: personally I'm fine with leaving four lines of code or so untested
13:32 lizmat RabidGravy: so the dynamic is for your module only ?
13:32 moritz CIAvash: and it sounds like you're not doing much more than   use MyModule; sub MAIN(*@args) { print MyModule.new.doit(@args) }
13:33 lizmat RabidGravy: what's wrong with $*FOO // sensible default ?
13:33 lizmat m: say $*FOO // "foo"
13:33 camelia rakudo-moar dc5690: OUTPUT«foo␤»
13:33 moritz or more to the point, that's something that integration (not unit) tests can catch
13:36 RabidGravy lizmat, it's probably in need of more coffee but I can't see how "use Foo;  exported-from-foo(); #use default; $*FOO = "otherwise"; exported-from-foo(); # use users value" will work
13:37 lizmat m: sub a { say $*FOO // "foo" }; a; my $*FOO = "bar"; a
13:37 camelia rakudo-moar dc5690: OUTPUT«foo␤bar␤»
13:38 lizmat m: sub a { say $*FOO // "foo" }; a; $*FOO = "bar"; a
13:38 camelia rakudo-moar dc5690: OUTPUT«foo␤Dynamic variable $*FOO not found␤  in block <unit> at /tmp/1z1hV1cE_u:1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp:2864␤  in block <unit> at /tmp/1z1hV1cE_u:1␤␤»
13:38 lizmat if you want to allow the latter, then indeed you would need to prime PROCESS::<$FOO>
13:39 lizmat I think teaching developers to use a lexical dynamic, is the best way wrt to composability and scoping
13:39 RabidGravy actually I think I may have just confused myself
13:40 RabidGravy m: module Foo { sub foo() is export { my $foo = $*FOO // "foo" } }; import Foo; say foo(); my $*FOO = "bar"; say foo()
13:40 camelia rakudo-moar dc5690: OUTPUT«foo␤bar␤»
13:40 CIAvash moritz: The reason I wanted to inject a mock object was that I wanted to avoid sending requests to the web API the module uses. Maybe I should just forget about testing the script.
13:42 RabidGravy lizmat, so why doesn't the use of $*FOO in the sub blow up with not found, like it does outside?
13:42 RabidGravy this is the source of my misunderstanding I think
13:42 lizmat because you disarm the failure with //
13:43 RabidGravy ah, so "access to a non-defined * variable is a failure not fatal", gotcha
13:43 lizmat well, it's more general
13:43 lizmat m: fail // say "foo"
13:43 camelia rakudo-moar dc5690: OUTPUT«5===SORRY!5=== Error while compiling /tmp/q2OVF5ug6e␤Null regex not allowed␤at /tmp/q2OVF5ug6e:1␤------> 3fail //7⏏5 say "foo"␤»
13:43 lizmat m: fail "fbar" // say "foo"
13:43 camelia rakudo-moar dc5690: ( no output )
13:44 lizmat m: say fail "fbar" // "foo"
13:44 camelia rakudo-moar dc5690: ( no output )
13:44 lizmat hmmm....
13:44 lizmat m: say Failure.new("foo") // "bar"
13:44 camelia rakudo-moar dc5690: OUTPUT«bar␤»
13:44 lizmat ^^^ that's basically what's happening
13:45 RabidGravy yeah, it's runtime not compile time
13:45 RabidGravy all good
13:45 lizmat m: $*FOO.WHAT.say
13:45 camelia rakudo-moar dc5690: OUTPUT«(Failure)␤»
13:46 CIAvash moritz: Yeah, it's going to more than 4 lines of code :) I thought about that, but that way I have to handle the command line options myself, right? The MAIN sub is convenient.
13:47 zemmihates joined #perl6
13:49 moritz my $class = %*ENV<MYSCRIPT_BACKEND_CLASS> // 'DefaultClass'; require ::($class); print ::$(class).new.someaction(@args)
13:49 moritz now you can test by setting an environment variable
13:51 PotatoGim joined #perl6
13:51 RabidGravy lizmat, somehow that entire feature of dynamic variables had escaped me, thanks for the enlightenment
13:54 tokuhiro_ joined #perl6
13:58 lizmat RabidGravy: you're welcome  :-)
13:58 rindolf joined #perl6
14:06 vendethiel joined #perl6
14:06 * RabidGravy updates the variables.pod so he doesn't forget ;-)
14:11 RabidGravy lizmat, before I commit this does that failure thing only apply to '*' twigilled variables?  I tested the others I know about and it seems so.
14:11 lizmat it applies to Failures in general
14:12 RabidGravy er
14:12 lizmat anything that contains a Failure
14:12 lizmat m: my $a = fail "foo"; say $a // "bar"
14:12 camelia rakudo-moar dc5690: ( no output )
14:12 lizmat m: my $a = { fail "foo" }; say $a // "bar"
14:12 camelia rakudo-moar dc5690: OUTPUT«-> ;; $_? is raw { #`(Block|61490616) ... }␤»
14:12 man joined #perl6
14:12 lizmat hmmm....
14:13 lizmat m: my $a = { fail "foo" }; say $a() // "bar"
14:13 camelia rakudo-moar dc5690: ( no output )
14:13 lizmat hmmm...
14:13 lizmat m: my $a = Failure.new("foo"); say $a // "bar"
14:13 camelia rakudo-moar dc5690: OUTPUT«bar␤»
14:14 RabidGravy that bit I understand
14:14 RabidGravy but
14:14 lizmat m: sub a { fail "foo" }; say a // "bar"
14:14 camelia rakudo-moar dc5690: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CqNuHqB2aF␤Null regex not allowed␤at /tmp/CqNuHqB2aF:1␤------> 3sub a { fail "foo" }; say a //7⏏5 "bar"␤»
14:14 RabidGravy m: say $a // "foo"
14:14 camelia rakudo-moar dc5690: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CyGohhRAAz␤Variable '$a' is not declared␤at /tmp/CyGohhRAAz:1␤------> 3say 7⏏5$a // "foo"␤»
14:14 RabidGravy differs from
14:14 lizmat m: sub a { fail "foo" }; say a() // "bar"
14:14 camelia rakudo-moar dc5690: OUTPUT«bar␤»
14:14 RabidGravy m: say $*a // "foo";
14:14 camelia rakudo-moar dc5690: OUTPUT«foo␤»
14:15 lizmat well, the say $a is a compile time error
14:15 mr_ron joined #perl6
14:15 lizmat m: no strict; say $a // "foo"
14:15 camelia rakudo-moar dc5690: OUTPUT«foo␤»
14:15 lizmat although in that case, $a just contains Any
14:16 lizmat m: no strict; say $a
14:16 camelia rakudo-moar dc5690: OUTPUT«(Any)␤»
14:16 RabidGravy yes, but it isn;t in the case of $*a - my question was more are there any other types of variables where that is the case or disnctly dynamic variables
14:16 lizmat only dynamic variables
14:16 lizmat afaik
14:17 RabidGravy cool
14:20 CIAvash moritz: I'll try that, I think I need to take a break :) thanks for your help
14:32 raiph joined #perl6
14:38 Begi1116 joined #perl6
14:41 Ven joined #perl6
14:44 Ven joined #perl6
14:55 [TuxCM] joined #perl6
15:02 dalek nqp: e84c552 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
15:02 dalek nqp: [js] Implement sub foo(:$*dynamic_variable) {...}.
15:02 dalek nqp: review: https://github.com/perl6/nqp/commit/e84c552ab5
15:02 dalek nqp: df42786 | (Pawel Murias)++ | t/nqp/21-contextual.t:
15:02 dalek nqp: Test using a dynamic variable as a named parameter.
15:02 dalek nqp: review: https://github.com/perl6/nqp/commit/df4278669f
15:03 xpen joined #perl6
15:04 Begi1116 joined #perl6
15:07 sprocket joined #perl6
15:15 dalek roast: 7b87896 | lizmat++ | S32-str/split.t:
15:15 dalek roast: Re-do tests for Str.split/split()
15:15 dalek roast:
15:15 dalek roast: This should exercise just about every nook and cranny of Str.split
15:15 dalek roast: with all permutations of the new named parameters.  Note that the
15:15 dalek roast: number of tests has halved: that's because most of those tests are
15:15 dalek roast: actually a subtest doing 41 tests.  So we're really doing ~2K tests!
15:15 dalek roast: review: https://github.com/perl6/roast/commit/7b87896b99
15:16 dalek doc: fbaf86a | RabidGravy++ | doc/Language/variables.pod:
15:16 dalek doc: Document the failure nature of undeclared dynvars
15:16 dalek doc: review: https://github.com/perl6/doc/commit/fbaf86a45b
15:19 RabidGravy someone might want to check that as my understanding may differ from reality :)
15:20 Ven joined #perl6
15:20 lizmat RabidGravy: s/an undeclared dynamic variable/an uninitialized dynamic variable
15:20 lizmat hmmm...  tricky
15:21 RabidGravy er, that's not how it appears
15:21 psch m: say $*FOO
15:21 camelia rakudo-moar dc5690: OUTPUT«Dynamic variable $*FOO not found␤  in block <unit> at /tmp/vZ6TqKdh5q:1␤␤Actually thrown at:␤  in block <unit> at /tmp/vZ6TqKdh5q:1␤␤»
15:21 RabidGravy m: $*g = 1
15:21 camelia rakudo-moar dc5690: OUTPUT«Dynamic variable $*g not found␤  in block <unit> at /tmp/43mq4k6Z6J:1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp:2864␤  in block <unit> at /tmp/43mq4k6Z6J:1␤␤»
15:21 psch m: say $*FOO; CATCH { default { .perl.say } }
15:21 camelia rakudo-moar dc5690: OUTPUT«X::Dynamic::NotFound.new(name => "\$*FOO")␤»
15:21 psch m: say $bar; CATCH { default { .perl.say } }
15:21 camelia rakudo-moar dc5690: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Up5fdr_DTS␤Variable '$bar' is not declared␤at /tmp/Up5fdr_DTS:1␤------> 3say 7⏏5$bar; CATCH { default { .perl.say } }␤»
15:22 lizmat All tests successful.
15:22 lizmat Files=1071, Tests=49722, 228 wallclock secs (12.51 usr  3.71 sys + 1391.65 cusr 126.75 csys = 1534.62 CPU)
15:23 psch 76391ca9 was actually bogus, i notice now
15:23 psch i completely overlooked the bitneg_i...
15:23 RabidGravy whilst it may not be what is actually going on under the hood "undeclared" is closer to what the user sees
15:23 psch but i also have trouble reproducing the previous behavior anyway vOv
15:24 psch star-m: multi f(Int $a is rw) { "Int" }; multi f(int $a is rw) { "int" }; f 5
15:24 camelia star-m 2015.09: ( no output )
15:24 psch star-m: multi f(Int $a is rw) { "Int" }; multi f(int $a is rw) { "int" }; say f 5
15:24 camelia star-m 2015.09: OUTPUT«int␤»
15:24 psch m: multi f(Int $a is rw) { "Int" }; multi f(int $a is rw) { "int" }; say f 5
15:24 camelia rakudo-moar dc5690: OUTPUT«int␤»
15:24 psch m: sub f($a is rw) { $a }; f 5
15:24 camelia rakudo-moar dc5690: OUTPUT«Parameter '$a' expected a writable container, but got Int value␤  in sub f at /tmp/OKNuqNqQfg:1␤  in block <unit> at /tmp/OKNuqNqQfg:1␤␤»
15:24 psch m: sub f($a is rw) { $a }; { f 5 }
15:24 camelia rakudo-moar dc5690: ( no output )
15:26 lizmat RabidGravy: perhaps TimToady or jnthn or masak will want to chime in later  :-)
15:26 lizmat meanwhile, cycling again&
15:30 Ven joined #perl6
15:42 ^elyse^ joined #perl6
15:45 Ven joined #perl6
15:53 dalek doc: d1c282c | RabidGravy++ | doc/Language/variables.pod:
15:53 dalek doc: That'll be spaces not tabs
15:53 dalek doc: review: https://github.com/perl6/doc/commit/d1c282ccb5
15:54 khw joined #perl6
15:57 raiph p6doc /language/variables#Sigils on List assignment: "Contrary to item assignment ... type of the variable on the left always stays [the same], ...". I think this is misleading and I intend to delete this sentence later today. Discussion of why, and what to say instead is welcome...
15:58 raiph (http://doc.perl6.org/language/variables#Item_and_List_Assignment)
15:58 yqt joined #perl6
16:00 psch m: my $a = 1, 3; say $a.perl
16:00 camelia rakudo-moar dc5690: OUTPUT«WARNINGS:␤Useless use of constant integer 3 in sink context (line 1)␤1␤»
16:00 psch m: my $a = (1, 3); say $a.perl
16:00 camelia rakudo-moar dc5690: OUTPUT«$(1, 3)␤»
16:00 Ven joined #perl6
16:02 sprocket joined #perl6
16:03 psch m: my Cool $a; $a = 5; $a.VAR.of.say; $a = "foo"; $a.VAR.of.say # the type of the variable stays the same in item assignment too, doesn't it..?
16:03 camelia rakudo-moar dc5690: OUTPUT«(Cool)␤(Cool)␤»
16:05 raiph psch: the type of an item *variable* is generally Scalar aiui
16:05 raiph (Cool) or whatevs is the type of the current value
16:05 psch raiph: no, (Cool) in that case is the type constraint on the Scalar, afaiu
16:06 loren joined #perl6
16:06 raiph oops, yes, you're right
16:06 psch m: my Cool $a; $a = 5; say $a.WHAT; $a.VAR.of.say; $a = "foo"; $a.VAR.of.say; say $a.WHAT
16:06 camelia rakudo-moar dc5690: OUTPUT«(Int)␤(Cool)␤(Cool)␤(Str)␤»
16:06 loren evening, #perl6
16:06 psch raiph: so, yes, you're probably right that the variable stays a Scalar
16:06 psch ("probably" because i often feel i don't really understand this well enough to be confident... :) )
16:07 dalek rakudo/nom: 8b0d257 | peschwa++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
16:07 dalek rakudo/nom: Revert "Refuse to compile-time bind subs with rw parameters."
16:07 dalek rakudo/nom:
16:07 dalek rakudo/nom: This reverts commit 76391ca91b37e14b323dc729aec500e84c2362c3.
16:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8b0d257834
16:07 dalek rakudo/nom: b1a465c | peschwa++ | src/Perl6/ (2 files):
16:07 dalek rakudo/nom: Properly refuse to trial bind and analyze subs and multis with RW Parameters.
16:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b1a465c2c5
16:07 sprocket joined #perl6
16:07 loren Somebody can help me add my module to ecosystem
16:09 moritz loren: what do you need help with?
16:09 Skarsnik Short answer: fork ecosystem on github, add your module to the rigth file and submit a pull request x)
16:10 mr_ron joined #perl6
16:11 moritz long answer: http://doc.perl6.org/language/modules#Distributing_Modules
16:11 loren OK, Skarsnik
16:11 loren thks
16:16 Ven joined #perl6
16:16 dalek roast: 2fcc4cc | peschwa++ | S06-traits/misc.t:
16:16 dalek roast: Unfudge now passing test.
16:16 dalek roast: review: https://github.com/perl6/roast/commit/2fcc4cc14b
16:17 raiph m: my Cool $a; .say for $a.VAR.WHAT, $a.VAR.of, $a.WHAT
16:17 camelia rakudo-moar b1a465: OUTPUT«(Scalar)␤(Cool)␤(Cool)␤»
16:26 loren joined #perl6
16:27 autarch joined #perl6
16:27 autarch is there anything like "perldoc perl" for perl6?
16:28 autarch also, is there anything that documents core modules? I see the core types, but I'm wondering if there's something like FindBin and lib, etc.
16:29 diakopter joined #perl6
16:30 llfourn joined #perl6
16:30 psch autarch: there's https://github.com/perl6/doc, which has p6doc for local use
16:31 pink_mist I think he specifically meant the `perldoc perl` perldoc page
16:31 psch oh
16:32 autarch yeah, I guess the best version of that is doc.perl6.org
16:32 autarch and maybe there aren't really any core modules like in Perl 5?
16:32 pink_mist there are plenty :P
16:32 psch well, there's a CORE
16:32 psch i guess CORE modules are NativeCall and JSON::Tiny..?
16:32 psch and probably a few more, yeah
16:33 autarch how do I find a list of those?
16:33 pink_mist http://doc.perl6.org/type.html <-- these?
16:34 autarch well, I note that neither NativeCall nor JSON::Tiny show up there ;)
16:34 autarch maybe I'll ask a simpler question - is there anything like "use lib" for p6?
16:34 autarch and FindBin?
16:35 Zoffix autarch, check out http://doc.perl6.org/language/5to6-nutshell
16:35 autarch yep, been looking there
16:35 Zoffix autarch, there's also a couple of other P5->P6 tuts at the top of this page: http://doc.perl6.org/language.html
16:35 autarch saw those too ;)
16:35 Zoffix autarch, http://doc.perl6.org/language/5to6-nutshell#Perl_module_library_path
16:35 jdv79 JSON::Tiny is core?
16:35 Zoffix No idea about Findbin
16:36 autarch syntax and such I can figure out - but it's harder to answer questions of "how do I do X" when it's not a core language syntax thingy
16:36 psch m: use JSON::Tiny
16:36 camelia rakudo-moar b1a465: OUTPUT«===SORRY!===␤Could not find JSON::Tiny in any of:␤  file#/home/camelia/.perl6/2015.10-224-gb1a465c/lib␤  inst#/home/camelia/.perl6/2015.10-224-gb1a465c␤  file#/home/camelia/rakudo-m-inst-1/share/perl6/lib␤  file#/home/camelia/rakudo-m-inst-1/shar…»
16:36 psch jdv79: hm, apparently not :)
16:36 jdv79 i thought the core setting defined the core set - basically itself
16:36 Zoffix autarch, yeah, it takes getting used to
16:36 jdv79 once its all up and running
16:36 psch m: say &to-json
16:36 camelia rakudo-moar b1a465: OUTPUT«sub to-json ($, :$indent = { ... }, :$first = { ... }) { #`(Sub|55132912) ... }␤»
16:36 autarch ah, so there is a "use lib" but I do wonder where that sort of thing is documented outside the 5-to-6 tutorial?
16:36 jdv79 autarch: the code:)
16:37 autarch that's what I was afraid of ;)
16:37 jdv79 the modules handling code is serious flux though atm
16:37 Zoffix autarch, at this point "it's not documented yet" might be a viable answer for some things :)
16:37 psch m: say $*PROGRAM
16:37 camelia rakudo-moar b1a465: OUTPUT«"/tmp/qx5CMZraGR".IO␤»
16:37 jdv79 nine and liz and froggs might know more
16:37 autarch another question - I see that "sub MAIN" does getopt like things - let's say I want to make my CLI app a class - can I somehow move the CLI processing to a class easily?
16:38 autarch like with MooseX::Getopt if anyone's familiar with that
16:38 psch m: say $?COMPILER
16:38 camelia rakudo-moar b1a465: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iOPipi_7MM␤Variable '$?COMPILER' is not declared␤at /tmp/iOPipi_7MM:1␤------> 3say 7⏏5$?COMPILER␤»
16:38 psch ah, NYI
16:39 grondilu autarch: I think you can just put your sub MAIN in a class, if that's what you mean.
16:39 autarch grondilu: yep, that's what I mean
16:39 autarch how do I call that from the CLI then?
16:39 jdv79 might have to export it or something
16:40 grondilu may make it our
16:40 grondilu our sub MAIN {...} might just work
16:40 psch m: sub MAIN() { say "main" }
16:40 camelia rakudo-moar b1a465: OUTPUT«main␤»
16:40 psch m: class A { our sub MAIN() { say "main" } }
16:40 camelia rakudo-moar b1a465: ( no output )
16:40 grondilu hum, apparently not
16:40 psch m: class A { sub MAIN() is export { say "main" } }; import A;
16:40 camelia rakudo-moar b1a465: OUTPUT«main␤»
16:40 psch that's kind of wonky :/
16:40 liztormato joined #perl6
16:41 jdv79 how?  i think it looks in the "main" (whatever its called) scope for that symbol.
16:41 psch jdv79: just from an aesthetic point of view.  it works fine
16:42 grondilu m: class A { our sub main { MAIN() } }; sub MAIN { say "hi" }; A::main();
16:42 camelia rakudo-moar b1a465: OUTPUT«hi␤hi␤»
16:42 jdv79 not sure how you'd do it otherwise
16:42 grondilu m: class A { our &main = &MAIN }; sub MAIN { say "hi" };
16:42 camelia rakudo-moar b1a465: OUTPUT«hi␤»
16:42 autarch sub MAIN() is export does make sense to me
16:43 jdv79 and it works!  woohoo
16:43 RabidGravy to be honest that's now I would expect it to work
16:43 psch jdv79: right, but it still looks kind of weird to import the class you're declare after you declare, in the same file non the less... :S
16:43 psch but yes, it's probably how that has to be done
16:43 ^elyse^ joined #perl6
16:44 autarch is there any consensus on the relationship between modules, files, and individual classes? one class per file? related classes all in one module file? something else?
16:46 RabidGravy currently I'm going with if a class is typically used only by another class then stick it in the outer class in the same file
16:47 RabidGravy i.e "class A { class B { } }" if the user is never going to have to refer the class by name
16:47 autarch right, that makes sense
16:49 dalek perl6-most-wanted: 93a847a | loren++ | most-wanted/modules.md:
16:49 dalek perl6-most-wanted: Update modules.md
16:49 dalek perl6-most-wanted:
16:49 dalek perl6-most-wanted: Add Ftp Module Net::Ftp
16:49 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/93a847a5b5
16:49 dalek perl6-most-wanted: a9158c5 | RabidGravy++ | most-wanted/modules.md:
16:49 dalek perl6-most-wanted: Merge pull request #7 from araraloren/master
16:49 dalek perl6-most-wanted:
16:49 dalek perl6-most-wanted: Update modules.md
16:49 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/a9158c521f
16:50 * Zoffix 's OCD triggers on Net::Ftp
16:50 RabidGravy yeah
16:50 RabidGravy I actually thought there was a Net::FTP, but it appears not
16:51 jdv79 let it go:)
16:51 jdv79 what's in a name anyway - its clear what it is
16:51 nowan_ joined #perl6
16:52 loren thks everyone, nice
16:52 Zoffix A rose by any name would transfer files just the same? :)
16:53 loren Night, #perl6
16:53 autarch I see this in the 5to6 docs but can't find anything that explains what it's doing - sub MAIN { ..., :file($data) = 'path.dat' } - what is ":file(...)" doing? is it a coercion of some sort?
16:54 Praise joined #perl6
16:54 Praise joined #perl6
16:55 autarch aha, I see, it's an alternate name
16:57 psch autarch: it's a named parameter, which on the CLI are invoked with --file (in this case) usually
16:57 autarch yep, figured that out after I asked the question
16:58 psch note that that form doesn't alias, i.e. --data doesn't work
16:59 dalek modules.perl6.org/mojo-app: 32af11a | (Zoffix Znet)++ | mojo-app/t/01-model-dists.t:
16:59 dalek modules.perl6.org/mojo-app: Test suite for dist model
16:59 dalek modules.perl6.org/mojo-app: review: https://github.com/perl6/modules.perl6.org/commit/32af11ac2b
17:01 jdv79 that's just normal signature stuff right?
17:01 jdv79 i haven't had a use yet
17:01 psch jdv79: for named parameters?
17:01 autarch given an IO::Handle containing a directory path, how do I append to that path to make a subdirectory?
17:01 autarch do I just treat is as a string? seems a bit gross
17:01 jdv79 yeah
17:02 autarch there's also IO::Spec - how does that work with handles?
17:03 autarch sorry, I meant IO::Path earlier, btw, not IO::Handle
17:03 flussence hah, modules.perl6.org's installdeps fails because one of the p5 modules depends on CGI.pm and didn't declare it :)
17:03 autarch these built-in type docs could _really_ use synopsis sections!
17:03 psch m: say IO::Handle.^can('child')
17:03 camelia rakudo-moar b1a465: OUTPUT«()␤»
17:03 psch m: say IO::Path.^can('child') #errr
17:03 camelia rakudo-moar b1a465: OUTPUT«()␤»
17:03 psch m: say IO::Path.can('child') #errr
17:03 camelia rakudo-moar b1a465: OUTPUT«()␤»
17:03 psch well
17:04 psch is that about type object vs instance..?
17:04 psch oh, yeah
17:04 psch IO::Path.child needs an instance, so i guess that means the type object can't do it
17:05 jdv79 autarch: you mean on doc.perl6.org or in the pod?
17:05 autarch jdv79: the former
17:05 jdv79 for some reason almost no pod6 is used anywhere
17:05 jdv79 :(
17:06 jdv79 dha was working on that i think
17:06 jdv79 how do i check for a type obj again?
17:06 jdv79 .defined isn't the same as :D, right?
17:07 andreoss joined #perl6
17:07 autarch m: say IO::Path.new('/etc').child('foo')
17:07 camelia rakudo-moar b1a465: OUTPUT«IO::Path is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in method new at src/RESTRICTED.setting:32␤  in block <unit> at /tmp/oimQLXRmlp:1␤␤»
17:08 autarch ok, it works on the CLI, but how would I know from the docs that this would work?
17:09 Zoffix flussence, we won't be using that module soon.
17:09 andreoss masak: consider my PRs
17:10 flussence hm, I'm getting more than one cpan thing failing to install. think I've got a messed up local::lib...
17:10 dalek modules.perl6.org: f4eee6f | (Zoffix Znet)++ | Build.PL:
17:10 dalek modules.perl6.org: Add CGI.pm to prereqs
17:10 dalek modules.perl6.org:
17:10 dalek modules.perl6.org: It is used by HTML::Template whose author has not merged the PR to fix it yet
17:10 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/f4eee6f29e
17:11 timotimo Zoffix: do you know if removing camelia from the list of images that get put into the spriteset would make it significantly smaller? it'd at least make the image only 1/8th as wide, but i imagine png compresses blank space somewhat efficiently?
17:11 timotimo Zoffix: oh, and there's still passing/failing/unknown images in there that aren't being used any more
17:11 Zoffix flussence, what's failing? You might need to apt-get install libpng12-dev to get the sprite thing to work
17:12 Zoffix timotimo, there is where?
17:12 timotimo you know, the image that contains all the sprites?
17:12 flussence Zoffix: "Imager" module failing, sounds like what you describe.
17:13 liztormato joined #perl6
17:13 Zoffix .oO( where did my "View background image" button go :S )
17:13 raiph joined #perl6
17:13 Zoffix timotimo, alright, I know what's going on.
17:14 _mg_ joined #perl6
17:14 Zoffix timotimo, and I'll see about the difference with/without camelia in the sprite
17:15 timotimo cool
17:16 Begi1116 joined #perl6
17:17 timotimo when making the web site slimmer, the text in the introductory textbox touches the bottom of that textbox quite closely
17:17 Zoffix Actually, I don't even need to check the size. Camelia needs to go, because there's a limit to how many pixels the image can be, and with her present each small item adds many additional pixels.
17:18 timotimo wha? why would there be a limit?
17:18 autarch where in the docs would I find documentation on defining types?
17:18 Zoffix Limit in how big an image a browser would display
17:18 timotimo autarch: "defining types" is just "making classes", really
17:19 Zoffix autarch, I found this guide quite handy: http://learnxinyminutes.com/docs/perl6/
17:19 autarch I'm thinking about "where { ... }" type stuff - like how do I define a type inside a module using that syntax?
17:19 Zoffix For learning Perl 6 (and it does mention the subtypes)
17:19 RabidGravy oh
17:19 timotimo autarch: do you mean something like a subset type?
17:20 autarch timotimo: yes
17:20 timotimo ah
17:20 Zoffix autarch, here's an example. https://github.com/zoffixznet/perl6-Pastebin-Gist/blob/master/lib/Pastebin/Gist.pm6#L8
17:20 Zoffix not sure if it's documented anywhere
17:20 RabidGravy m: subtype Goo of Int where { * == 1 }; my Goo $a; $a = 9;
17:20 camelia rakudo-moar b1a465: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zJwQ0UIYFB␤Two terms in a row␤at /tmp/zJwQ0UIYFB:1␤------> 3subtype Goo of Int7⏏5 where { * == 1 }; my Goo $a; $a = 9;␤    expecting any of:␤        infix␤        infix stopper␤        postf…»
17:21 Zoffix :S
17:21 RabidGravy or somthing like that
17:21 ugexe http://doc.perl6.org/type/Signature#Type_Constraints
17:21 andreoss m: subtype Goo of Int where -> { $^a == 1 }; my Goo $a; $a = 9;
17:21 camelia rakudo-moar b1a465: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0YEI7ogipC␤Two terms in a row␤at /tmp/0YEI7ogipC:1␤------> 3subtype Goo of Int7⏏5 where -> { $^a == 1 }; my Goo $a; $a = ␤    expecting any of:␤        infix␤        infix stopper␤        po…»
17:21 autarch if I can find some tuits I'll try to work on these docs at some point
17:21 flussence Zoffix: huh, Imager is failing in t/t10ft2.t, that's freetype2 and nothing to do with pngs...
17:21 RabidGravy m: subtype Goo of Int where * == 1 ; my Goo $a; $a = 9;
17:21 camelia rakudo-moar b1a465: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aiC5Xfx31e␤Two terms in a row␤at /tmp/aiC5Xfx31e:1␤------> 3subtype Goo of Int7⏏5 where * == 1 ; my Goo $a; $a = 9;␤    expecting any of:␤        infix␤        infix stopper␤        postfix…»
17:22 timotimo andreoss: don't -> and at the same time $^a
17:22 timotimo because "-> {" already defines a signature
17:22 RabidGravy m: subtype Goo of Int where { $_ == 1  }; my Goo $a; $a = 9;
17:22 camelia rakudo-moar b1a465: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ztZLQ5GEbb␤Two terms in a row␤at /tmp/ztZLQ5GEbb:1␤------> 3subtype Goo of Int7⏏5 where { $_ == 1  }; my Goo $a; $a = 9;␤    expecting any of:␤        infix␤        infix stopper␤        pos…»
17:22 andreoss m: subtype Goo of Int where -> { $^x == 1 }; my Goo $a; $a = 9;
17:22 camelia rakudo-moar b1a465: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CEvumU3E5g␤Two terms in a row␤at /tmp/CEvumU3E5g:1␤------> 3subtype Goo of Int7⏏5 where -> { $^x == 1 }; my Goo $a; $a = ␤    expecting any of:␤        infix␤        infix stopper␤        po…»
17:22 timotimo ... why would that be failing?
17:22 timotimo oh
17:22 timotimo m: subset Goo of Int where * == 1;
17:22 camelia rakudo-moar b1a465: ( no output )
17:22 timotimo it's not called subtype, it's called subset
17:22 Zoffix heh
17:23 RabidGravy duh
17:23 timotimo rakudo thinks you're trying to call a sub "subtype" that you'll declare later
17:23 RabidGravy m: subset Goo of Int where * == 1 ; my Goo $a; $a = 9;
17:23 camelia rakudo-moar b1a465: OUTPUT«Type check failed in assignment to $a; expected Goo but got Int␤  in block <unit> at /tmp/TlNBnkL_qN:1␤␤»
17:23 Zoffix flussence, ¯\_(ツ)_/¯  works for me
17:23 RabidGravy that's better
17:23 autarch https://gist.github.com/autarch/e07cfcd2a30eb384e6d6 - any idea what this error is telling me?
17:23 RabidGravy this is why
17:24 timotimo autarch: inside the where block you should refer to the "it" by $_
17:24 flussence Zoffix: yeah, I just force-installed it in the end. not sure what's wrong but I'll find out the hard way if it matters :)
17:25 autarch timotimo: that doesn't change the error
17:25 ugexe because there is no root attribute in your class
17:25 RabidGravy autarch  "has $!root" -> "has $.root"
17:25 nightfrog joined #perl6
17:25 timotimo autarch: so it's "has Dir $!root where { $_.d };" ?
17:25 autarch oh, doh, I meant to get rid of that, obviously
17:26 RabidGravy must be "public"  to work from constructor like that
17:26 ugexe well , `$root` attribute rather
17:26 timotimo ah, yes. that, too.
17:26 timotimo BBIAB
17:26 autarch ok, now I seem to be having a problem with MAIN wanting an IO::Handle - is there way to tell it to coerce the string passed on the CLI?
17:27 autarch although even if I run the script without any args I get the same usage error
17:27 dalek modules.perl6.org: 5407f03 | (Anthony Parsons)++ | Build.PL:
17:27 dalek modules.perl6.org: File::Slurp and JSON need adding to deps
17:27 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/5407f03e1f
17:28 ugexe if you are wanting to pass a path string, why arent you taking IO::Path instead of IO::Handle?
17:28 autarch doh, cause I'm an idiot, apparently
17:28 dalek modules.perl6.org: 0d0e92b | (Zoffix Znet)++ | web/assets/css/style.css:
17:28 dalek modules.perl6.org: Add proper spacing to #about paras; timotimo++
17:28 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/0d0e92bab9
17:29 RabidGravy yeah IO::Path ne IO::Handle :)
17:29 Zoffix Ehehe, both File::Slurp and JSON need to be tossed from the code base :P
17:29 autarch but that doesn't seem to help - I still just get the usage message when running the script, which I assume means it doesn't like the type of the thing I'm passing
17:30 RabidGravy I'd create another multi with Str :$root
17:30 ugexe thats not neccesary
17:30 autarch yeah, that would be gross if I had to do that - shouldn't I be able to tell it to coerce it somehow?
17:30 Zoffix flussence, are you working on anything significant on modules.perl6.org?
17:30 ugexe IO::Path already coerces via Str(Cool)
17:31 RabidGravy You meab
17:32 autarch the weird thing is that even if I run the script with no args I get the usage error - so it apparently doesn't like the default value either
17:32 RabidGravy m: sub foo(IO::Path() $f) { }; foo("ff");
17:32 camelia rakudo-moar b1a465: OUTPUT«Method 'IO::Path' not found for invocant of class 'Str'␤  in sub foo at /tmp/ROvSnSJh71:1␤  in block <unit> at /tmp/ROvSnSJh71:1␤␤»
17:32 ugexe i dont get the usage message
17:32 RabidGravy m: sub foo(IO() $f) { }; foo("ff");
17:32 camelia rakudo-moar b1a465: ( no output )
17:32 RabidGravy that works though
17:32 autarch This is perl6 version 2015.10-220-g4988c70 built on MoarVM version 2015.10-61-g624d504
17:33 flussence Zoffix: nothing major, just reading https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity and thought I'd try adding it. wanted to test it properly locally first because I usually screw up :)
17:35 andreoss m: $*VM.perl.say
17:35 ugexe autarch: actually its not printing anything for me even if i do --help... strange
17:35 camelia rakudo-moar b1a465: OUTPUT«VM.new(config => ${:ar("ar"), :arflags("rcs"), :arout(""), :asm(".s"), :asmout("-o "), :asmswitch("-S"), :auxclean("\@:"), :be("0"), :bindir("/home/camelia/rakudo-m-inst-1/bin"), :can_unaligned_int32("1"), :can_unaligned_int64("1"), :can_unaligned_num64("1…»
17:35 RabidGravy so you'd want MAIN( IO() :$root = $*HOME.child('.insucalc') where { $_.d } ) is export
17:35 andreoss m: %*VM.perl.say
17:35 camelia rakudo-moar b1a465: OUTPUT«Failure.new(exception => X::Dynamic::NotFound.new(name => "\%*VM"), backtrace => Backtrace.new)␤»
17:35 autarch why "IO()" instead of "IO"
17:35 RabidGravy for coecrion
17:36 Zoffix flussence, keep in mind there was some argument against us using a CDN, but the conversation stalled https://github.com/perl6/perl6.org/issues/40
17:36 RabidGravy basically if the method is found on the arg it calls it
17:36 timotimo IO() is short for IO(Any)  ... or IO(Cool)?
17:37 autarch so I don't see why my subset doesn't work the same way
17:37 liztormato IO(Any)
17:37 RabidGravy I don't think the coercion is that clever yet
17:38 RabidGravy it would want a Dir method on the arg
17:38 autarch although it now occurs to me that the dir may not exist, in which case my subset won't work anyway
17:38 dalek modules.perl6.org: cdf6396 | (Zoffix Znet)++ | web/build-project-list.pl:
17:38 dalek modules.perl6.org: Clean up image assets dir on each build
17:38 dalek modules.perl6.org:
17:38 dalek modules.perl6.org: Otherwise old images remain and we still build them into the sprite. timotimo++
17:38 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/cdf6396194
17:38 liztorma_ joined #perl6
17:39 Zoffix ummm...
17:41 dalek modules.perl6.org: 7f4cfd5 | (Zoffix Znet)++ | web/build-project-list.pl:
17:41 dalek modules.perl6.org: Revert "Clean up image assets dir on each build"
17:41 dalek modules.perl6.org:
17:41 dalek modules.perl6.org: This reverts commit cdf6396194ad621712a2282ec3e31d839d2ffcd3.
17:41 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/7f4cfd5a67
17:41 liztorm__ joined #perl6
17:42 flussence Zoffix: fwiw I agree with what moritz says, but I'm seeing if we can have the cake and eat it too first :)
17:42 timotimo yeah, assets/ and images/ fully removed? that doesn't sound so good
17:42 [TuxCM] joined #perl6
17:42 Zoffix timotimo, it's just assets/images
17:43 timotimo oh
17:43 timotimo catdir, of course
17:43 Zoffix But... that will break if the $outputdir is ./ :)
17:46 autarch is there a common idiom people use for lazy private attributes?
17:48 liztormato I usually do it with a custom BUILD
17:49 autarch that's not lazy
17:49 liztormato Yeah you're right
17:50 autarch I imagine I could write some sort of meta thing that let me write "has $!foo is lazy(build-foo)" or something, but I'll settle for something a little less complex ;)
17:50 liztormato Perhaps a Proxy?
17:50 liztormato Feels contrived
17:51 liztormato Well. Such a trait has been discussed and even implemented but also reverted
17:52 dalek modules.perl6.org: d43d8e8 | (Zoffix Znet)++ | / (2 files):
17:52 dalek modules.perl6.org: Clean up image assets dir for sprite on each build
17:52 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/d43d8e8730
17:53 skids joined #perl6
17:53 liztormato autarch: don't think there's an idiom for this atm
17:53 dalek modules.perl6.org: 5961d5d | (Anthony Parsons)++ | web/index.tmpl:
17:54 dalek modules.perl6.org: Make the jQuery include slightly safer
17:54 dalek modules.perl6.org:
17:54 dalek modules.perl6.org: s/http:/https:/, added a Subresource Integrity hash, and a Cross-Origin
17:54 dalek modules.perl6.org: attribute that (according to the docs) blocks 3rd-party cookies.
17:54 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/5961d5d56b
17:54 psch https://github.com/rakudo/rakudo/blob/nom/src/core/StrDistance.pm#L22 is what i usually saw recommended
17:54 autarch liztormato: ok, I can go non-lazy for now
17:55 psch for a lazy attribute
17:55 liztormato Perhaps a private method with the private attribute's name?
17:55 autarch psch: ah, that works
17:56 jdv79 is there a nice way to get the value type of a Positional or Associative thing?
17:56 moritz jdv79: .of
17:56 autarch wait, can I define both "has $!foo" and "method !foo" ?
17:56 liztormato method !foo { $!foo //= lazy code }
17:56 liztormato Yes you can
17:57 autarch ah, cool, that works perfectly
17:57 autarch it'd be nice to have a trait for that in the future, I think
17:58 zengargoyle re: MAIN / coersion / subset...
17:58 jdv79 thanks
17:58 liztormato Note that private methods need to be called with ! Instead of .
17:58 zengargoyle subset File of Str where { $_.IO ~~ :e & :f };
17:58 * flussence thought about doing s/http/https/ on a few more of the modules page links, turns out a lot of other people's servers are misconfigured (including github's own travis docs site!)
17:58 zengargoyle sub MAIN('test', File(File) :$datfile = $TEST-FILE) {
17:58 liztormato self!foo
17:59 autarch liztormato: yep, I'd figured that out
17:59 zengargoyle makes sure $datfile exists and makes the error message actually use 'File' instead of Str
17:59 autarch I'm like 1% of the way to writing my actual app!
18:00 ugexe zengargoyle: thats no good if you are giving it a file you want created
18:00 liztormato autarch++
18:00 autarch this is a good learning experience though - the actual app I'm writing is kind of dumb and I could write it in Perl 5 in maybe an hour or so
18:01 zengargoyle yeah, just an example of MAIN tomfoolery
18:01 liztormato ;-)
18:01 liztormato Cycling continues&
18:01 Actualeyes left #perl6
18:01 flussence ugexe: that's easy enough, subset WritableFile of Str where { $_.IO.parent ~~ :d & :w }
18:02 ugexe what if they give you an absolute path and it needs to create directories?
18:02 flussence hm, good point
18:03 dalek modules.perl6.org: 14bece2 | (Zoffix Znet)++ | web/ (3 files):
18:03 dalek modules.perl6.org: Do not include camelia in the sprite
18:03 dalek modules.perl6.org:
18:03 dalek modules.perl6.org: Adding her introduces a lot of whitespace for each small image and browsers have a limit to how many pixels the image can be. timotimo++
18:03 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/14bece22c0
18:03 adu joined #perl6
18:05 andreoss joined #perl6
18:05 zengargoyle sorta wish for something like: sub MAIN(…) does GetoptLong # fancier option handling
18:05 andreoss m: class Foo { has $!bar } ; class Fee is Foo { method get-bar { $!bar } };
18:05 camelia rakudo-moar b1a465: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0LVw4O5DOQ␤Attribute $!bar not declared in class Fee␤at /tmp/0LVw4O5DOQ:1␤------> 3 Fee is Foo { method get-bar { $!bar } }7⏏5;␤    expecting any of:␤        horizontal whitespace␤        post…»
18:06 andreoss m: class Foo { has $!bar is export } ; class Fee is Foo { method get-bar { $!bar } };
18:06 camelia rakudo-moar b1a465: OUTPUT«5===SORRY!5=== Error while compiling /tmp/atb5j5dRVM␤Can't use unknown trait 'is export' in an attribute declaration.␤at /tmp/atb5j5dRVM:1␤    expecting any of:␤        rw␤        readonly␤        box_target␤        leading_docs␤       …»
18:06 zengargoyle 'cause --arg=value annoys me.
18:07 andreoss how does one inherit private attributes?
18:08 Skarsnik well you mean how to make them inheritable?
18:08 andreoss yes
18:11 moritz by making them public
18:11 moritz anyone can subclass your class, so it doesn't make sense to force somebody to subclass it just to get access a certain part of an API
18:13 espadrine joined #perl6
18:14 brrt joined #perl6
18:14 andreoss were the privates attributes inheritable before?
18:14 moritz what does "before" mean?
18:14 andreoss some time ago
18:16 brrt which time ago?
18:16 pink_mist "before" - "clarify" - "some time ago" <--- that's not helpful, andreoss :P
18:17 andreoss circa 2011
18:18 andreoss i was trying to make web work, but it uses this kind of inheritance of private attributes
18:18 dalek modules.perl6.org/mojo-app: b84b8e8 | (Zoffix Znet)++ | mojo-app/t/ (2 files):
18:18 dalek modules.perl6.org/mojo-app: Add Helper test class, so we do not duplicate our data in each test
18:18 dalek modules.perl6.org/mojo-app: review: https://github.com/perl6/modules.perl6.org/commit/b84b8e874d
18:19 andreoss web as in masak/web
18:27 Begi1116 joined #perl6
18:30 mr-foobar joined #perl6
18:35 andreoss m: multi trait_auxiliary:<is>(Int $a, $b) { say $a ; say $b }
18:35 camelia rakudo-moar b1a465: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fFvZKRjpIi␤Cannot add tokens of category 'trait_auxiliary'␤at /tmp/fFvZKRjpIi:1␤------> 3multi trait_auxiliary:<is>7⏏5(Int $a, $b) { say $a ; say $b }␤»
18:36 andreoss m: multi trait_verb:<of>(Int $a, $b) { say $a ; say $b }
18:36 camelia rakudo-moar b1a465: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0KQj4khUQu␤Cannot add tokens of category 'trait_verb'␤at /tmp/0KQj4khUQu:1␤------> 3multi trait_verb:<of>7⏏5(Int $a, $b) { say $a ; say $b }␤»
18:36 timotimo Zoffix: i'd still be interested to know what the filesize of "tiles with camelia" vs "tiles without camelia + camelia" is
18:38 [particle]1 joined #perl6
18:42 Zoffix timotimo, tiles with camelia are 10KB larger
18:42 Zoffix At least as .png images (on the site we're base64ing it, which I'm guessing adds size)
18:44 hahainternet left #perl6
18:44 hahainternet joined #perl6
18:45 jdv79 what's the list constructor again?
18:46 raiph .List
18:46 jdv79 oh, ().  forgot.
18:46 raiph (1,2)
18:46 jdv79 [] vs ()
18:46 jdv79 thanks
18:47 raiph :)
18:50 dalek modules.perl6.org: c2e0183 | (Zoffix Znet)++ | web/assets/images/ (10 files):
18:50 dalek modules.perl6.org: PNGCrush image assets to shave off 10KB
18:50 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/c2e01837c2
18:50 dalek modules.perl6.org/mojo-app: 10f0d67 | (Zoffix Znet)++ | mojo-app/t/ (3 files):
18:50 dalek modules.perl6.org/mojo-app: Inter
18:50 dalek modules.perl6.org/mojo-app: review: https://github.com/perl6/modules.perl6.org/commit/10f0d67c1d
18:50 Zoffix Aw, crap
18:50 Zoffix Didn't realize pushing will push both branches. I guess that makes sense.
18:53 geekosaur you can specify, I think
18:53 masak Zoffix: the pre-2.0 push.default in Git was "matching", where everything that had the same name on the remote side got pushed automatically.
18:54 masak Zoffix: 2.0 and onwards switches to "simple" pushing, where only the current branch is pushed to its upstream, and only if the names match.
18:54 Zoffix I'm on git version 1.7.9.5
18:54 masak all the above applies to "git push" without any further arguments. if you're more specific, you don't get the default behavior.
18:55 timotimo Zoffix: with the tiles image being 61 kB in size (perhaps post-base64ing), i'd call that significant
18:55 timotimo 80 kB for camelia herself
18:56 Zoffix I wouldn't. The extra HTTP request would likely give more latency, especially on mobile.
18:56 timotimo Zoffix: do we have an optipng step in there?
18:56 Zoffix My concern was us hitting the browser size limit really
18:56 Zoffix timotimo, what is that?
18:57 timotimo twiddles the compression parameters around until it finds something smaller
18:57 Zoffix timotimo, you lost me :P
18:59 timotimo you know how PNG uses basically zlib compression?
18:59 timotimo or something similar, at least
19:00 Zoffix timotimo, but what do you mean "do we have an option"...? In the code that builds the sprite?
19:00 yqt joined #perl6
19:00 timotimo i didn't say "do we have an option" :)
19:00 timotimo i said "do we have an optipng step"
19:00 Zoffix Right that :)
19:00 sprocket joined #perl6
19:00 Zoffix Where would we have that step? :P
19:00 vendethiel joined #perl6
19:00 timotimo after concatenating all the images into the tile png
19:01 timotimo and i forgot to say: the first thing optipng does is reduce the bit depth or even make a palette if it can do so losslessly
19:01 timotimo basically optipng makes png files as small as they can reasonably be
19:01 arnsholt optipng is similar to pngcrush, I think
19:01 timotimo that's right
19:01 Zoffix timotimo, don't think so: https://metacpan.org/source/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.68/lib/Mojolicious/Plugin/AssetPack/Handler/Sprites.pm#L70
19:02 timotimo ah, right. that step would probably go between ->write(data ...) and building the checksum
19:02 moritz huh, are we having a discussion about a 61kb image?
19:02 Zoffix moritz, :)
19:03 Zoffix timotimo, that would save us 3KB, based on my pngcrush results :)
19:03 lizmat joined #perl6
19:04 Zoffix (which is why it's not worth trying to implement that).
19:05 * Zoffix ponders adding something like that to AssetPack in production mode
19:06 mr_ron joined #perl6
19:07 moritz that's only worth it if you can cache it, and serve for 100+ requests
19:07 * zengargoyle is actually tickled that modules have a logotype
19:07 Zoffix tickled? Are you excited or disappointed?
19:08 zengargoyle i like it
19:09 Zoffix As for the pic, well, if you play the devil's advocate, you could argue about less developed countries. Like FB devs deliberately limit their connection speed and use ancient phones for dev, just to get a feel for what sort of tech people use.
19:09 jdv79 so i created a type list attr but i can't construct it with the type obj
19:10 jdv79 ah, and it delegates.  maybe that's why its complicated 
19:10 zengargoyle maybe we could also have a :logotype(<base64>) modifier to objects and get a jumpstart on visual programming. :P
19:10 Zoffix :D
19:10 _mg_ joined #perl6
19:10 jdv79 how can a positional type obj's default constructor take named args
19:11 jdv79 how do i even get that list of args?
19:13 lizmat_ joined #perl6
19:14 arnsholt jdv79: Could you elaborate? Not sure what you mean
19:14 telex joined #perl6
19:15 jdv79 i have something like: has Foo @.foos handles <list elems AT-POS EXISTS-POS>;
19:15 jdv79 then teh type obj is Positional[Foo] - can one use that type obj to create an instancej?
19:16 timotimo jdv79: without having looked, i expect the .new method takes positionals and calls bless with the appropriate nameds
19:16 arnsholt Should think so. @.foos .= new
19:17 jdv79 ah, so the error message my not be conveying what constructror its talking about
19:18 timotimo oh lord, blogs.perl.org
19:19 timotimo when zooming in, at every other zoom step the text in the uppermost menu jumps out of the little bar they're supposed to be in and hang half-way into the page itself
19:19 El_Che timotimo: not with FF on ubuntu
19:19 Zoffix Doesn't happen for me in Palemoon (though I do see it move a bit)
19:19 jdv79 timotimo: nope
19:20 timotimo weird!
19:20 jdv79 i'll just try to work around it then
19:20 timotimo and below 100% it's always wrong
19:20 El_Che timotimo: wasn't there a grant request to look at that soft or replace it?
19:20 timotimo blogs.perl.org?
19:21 timotimo wow! i was about to complain about the lack of a feature, but i've just found it in an odd place
19:21 El_Che timotimo: http://news.perlfoundation.org/2015/10/migrating-blogsperlorg-first-p.html
19:22 El_Che By our own DrForr :)
19:23 timotimo oh no
19:23 timotimo aaw crap
19:25 timotimo so it turns out you can get an RSS feed of "answers to your comments"
19:25 timotimo which would be super helpful
19:25 timotimo if it weren't per blog on blogs.perl.org
19:25 timotimo so whenver i comment on a blog i've not yet commented on, i'd have to add another rss feed to my feed reader
19:27 zhmylove joined #perl6
19:30 dalek modules.perl6.org: 7750ad1 | timotimo++ | web/index.tmpl:
19:30 dalek modules.perl6.org: give camelia an alt text and specify exact dimensions
19:30 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/7750ad1612
19:30 RabidGravy yeah you want a sort of meta feed for that
19:31 lizmat joined #perl6
19:33 timotimo the template output for the project list is filled with very weird whitespace from all the <TMPL> tags that were thrown out
19:35 timotimo it's a tiny bit weird that the sprite.css is at the very end of the document
19:37 pmurias joined #perl6
19:38 timotimo looking at the network tab, it seems like there's a noticable delay between "the css file finishes loading" and "the image comes in via the 'cache'"
19:43 Zoffix joined #perl6
19:44 autarch If I want something like List::Util's any from Perl 5 do I just use grep and it short circuits appropriately?
19:44 timotimo i think if you boolify the result of grep, it'll short-circuit, but there's also "first"
19:44 lizmat m: my $a = 42; say "foo" if $a == 1|2|42
19:44 camelia rakudo-moar b1a465: OUTPUT«foo␤»
19:44 lizmat m: my $a = 42; say "foo" if $a == 1|2|3
19:44 camelia rakudo-moar b1a465: ( no output )
19:45 lizmat ^^^ autarch
19:45 autarch I really mean "any", not "first"
19:45 lizmat is that what you had in mind ?
19:45 autarch no, this is more like "are any fields in this array not empty"
19:45 timotimo autarch: well, if there is a first at all, there's any.
19:45 autarch so I tried to write - @fields.any { $_ ne q{} }
19:45 autarch actually, I guess just @fields.any would work, right?
19:45 timotimo that's right
19:45 timotimo but it gives you a junction, which is a very powerful thing
19:46 Zoffix timotimo, the TMPL stuff will be gone soon.
19:46 timotimo Zoffix: oh, cool. what template system are you going to use instead?
19:46 timotimo Zoffix: also, will we put the sprites css closer to the beginning?
19:46 autarch yeah, I'm vaguely familiar with junctions from Damian's talk about them in Perl 5 way back when
19:46 Zoffix timotimo, ep
19:47 lizmat m: my @a; @a[9] = "foo"; say ?@a.first: .chars
19:47 camelia rakudo-moar b1a465: OUTPUT«Method 'chars' not found for invocant of class 'Any'␤  in block <unit> at /tmp/knjsMXE6qH:1␤␤»
19:47 lizmat m: my @a; @a[9] = "foo"; say ?@a.first: .defined
19:47 camelia rakudo-moar b1a465: OUTPUT«False␤»
19:47 timotimo huh
19:47 lizmat m: my @a; @a[9] = "foo"; say ?@a.first: *.defined
19:47 camelia rakudo-moar b1a465: OUTPUT«True␤»
19:47 timotimo ah
19:47 lizmat either a whatever or a block  :-)
19:47 timotimo BBIAB, dinner time
19:47 lizmat m: my @a; @a[9] = "foo"; say ?@a.any
19:47 camelia rakudo-moar b1a465: OUTPUT«True␤»
19:47 tokuhiro_ joined #perl6
19:48 lizmat m: my @a; @[9] = Any; say ?@a.any
19:48 camelia rakudo-moar b1a465: OUTPUT«False␤»
19:48 lizmat m: my @a; @[9] = 42; say ?@a.any
19:48 camelia rakudo-moar b1a465: OUTPUT«False␤»
19:48 Zoffix timotimo, that's an interesting choice for alt="" text for camelia. That attribute is meant for functional replacement of the image content, not a description of the image. Looks weird too: http://i.imgur.com/XwhiANW.png
19:48 lizmat m: my @a; @a[9] = 42; say ?@a.any
19:48 camelia rakudo-moar b1a465: OUTPUT«True␤»
19:48 lizmat m: my @a; @a[9] = Any; say ?@a.any
19:48 camelia rakudo-moar b1a465: OUTPUT«False␤»
19:48 lizmat I guess any works as well  :-)
19:48 raiph joined #perl6
19:49 autarch if I want to include a space in a character class do I write it like this? <[ A .. Z \  ]> ?
19:50 autarch or maybe it's easier to just write ... / <[ A .. Z ]> || ' ' / ?
19:50 moritz m: say so ' ' ~~ / <[ \c[SPACE] ]> /
19:50 camelia rakudo-moar b1a465: OUTPUT«True␤»
19:50 moritz autarch: that's what I'd use
19:50 autarch wfm
19:50 moritz autarch: though \ should also work
19:50 moritz m: say so ' ' ~~ / <[ \  ]> /
19:50 camelia rakudo-moar b1a465: OUTPUT«True␤»
19:51 autarch huzzah, I think I've written a function Perl 6 program
19:53 moritz autarch: welcome to the club!
19:54 Amnez777 joined #perl6
19:55 autarch I'm really liking the error messages for the most part - but I wish my CLI programs would run a lot faster ;)
19:55 autarch https://gist.github.com/autarch/da744699061efabb0dcc - is line 19 the idiomatic way to write that in Perl 6?
19:56 autarch and generally speaking, are there other spots that could be more idiomatic?
19:57 vendethiel autarch: I'd join with ' ' instead (and same for split)
19:57 vendethiel or just use .words, if it can be more than one
19:57 moritz autarch: if you don't care about preserving multiple spaces in a row, you can use .words instead of .split(' ')
19:57 autarch vendethiel: you mean ' ' instead of q{ } ?
19:58 geraud joined #perl6
19:59 moritz also /^ CAA || PPV $/ might or might not be a precedence bug
19:59 moritz you really want "starting with CAA or ending in PPV"?
20:00 moritz but that's the same as in p5, so I guess you do :-)
20:00 lizmat autarch: looking
20:00 autarch moritz: no, I don't, but I'm not remembering all my p5
20:00 dalek ecosystem: c5622af | retupmoca++ | META.list:
20:00 dalek ecosystem: Add Web::RF
20:00 dalek ecosystem:
20:00 dalek ecosystem: A(nother) web application routing framework that attempts to decouple URLs and
20:00 dalek ecosystem: your application code as much as possible, while leaving you to handle your own
20:00 dalek ecosystem: templating and data storage.
20:00 dalek ecosystem:
20:00 dalek ecosystem: https://github.com/retupmoca/P6-Web-RF
20:00 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/c5622af8fc
20:01 moritz autarch: if you want to test for equaltiy, $_ eq any(<CAA PPV>)
20:01 arnsholt In that case [CAA || PPV] is what you want
20:01 moritz no need for a regex at all
20:01 arnsholt Or what moritz says, yeah
20:01 autarch ah, that's nice
20:01 arnsholt And in that regex, you probably just want | instead of ||
20:02 autarch arnsholt: the docs say ||
20:02 autarch http://doc.perl6.org/language/regexes#Alternation
20:03 arnsholt That's a doc-bug, definitely
20:03 arnsholt There are two alternation operators: | and ||
20:03 sprocket joined #perl6
20:03 arnsholt || has the same semantics as | in Perl 5: try each alternative in sequence until something matches
20:04 arnsholt | matches in parallel (not really in the implementation, but the semantics are the same), preferring the match that's more longer
20:04 * moritz adds something to the docs
20:04 arnsholt s/more//
20:04 arnsholt (Almost wrote more specific)
20:05 [Tux] I see Text::CSV in most wanted, and the link is still to the non-existing masak version
20:06 [Tux] https://github.com/perl6/perl6-most-wanted/blob/master/most-wanted/modules.md
20:06 [Tux] FWIW, Text::CSV also deals with TSV
20:06 dalek doc: ea0f0ef | moritz++ | doc/Language/regexes.pod:
20:06 dalek doc: Mention | in regexes
20:06 dalek doc:
20:06 dalek doc: one could write so much more about that, though (hint, hint)
20:06 dalek doc: review: https://github.com/perl6/doc/commit/ea0f0ef273
20:07 moritz arnsholt: maybe you want to add some of your own explanations to the docs?
20:07 arnsholt moritz: I can try. My LTM semantics are a bit rusty =)
20:07 arnsholt But that's as good excuse as any to read the specs again =)
20:09 ifim joined #perl6
20:10 dalek rakudo/nom: 058ea86 | lizmat++ | src/core/Str.pm:
20:10 dalek rakudo/nom: Simplify Str.chomp now that \r\n is 1 grapheme
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/058ea86006
20:11 * moritz is currently rewriting an old webapp from 2006/2007
20:11 dalek doc: 8b842a5 | lizmat++ | doc/Type/Str.pod:
20:11 dalek doc: Document Str.chomp a bit better
20:11 dalek doc: review: https://github.com/perl6/doc/commit/8b842a54fd
20:12 moritz what annoys me most is that when I wrote the original website, I added every feature that I could think of or that sounded like cool tech, even if it was clear that it would never be used.
20:12 moritz and now I'm stuff with either porting obscure features, or finding out what's actually used
20:13 Zoffix :)
20:15 moritz also back then, I wrote it with an "as static as possible" approach
20:15 zengargoyle you now *can* have whitespace with the '.'.  akin to p5 ->
20:15 retupmoca .tell masak I PR'd HTML::Template to make some warnings go away: https://github.com/masak/html-template/pull/12
20:15 yoleaux retupmoca: I'll pass your message to masak.
20:15 moritz which meant including CGI scripts via SSI
20:15 moritz and the other way too (CGI script output was parsed for SSIs again)
20:16 zengargoyle nevermind that, i wasn't caught up with backlog
20:16 dalek ecosystem: 827f96c | RabidGravy++ | META.list:
20:16 dalek ecosystem: Add Test::META
20:16 dalek ecosystem:
20:16 dalek ecosystem: https://github.com/jonathanstowe/Test-META
20:16 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/827f96c17c
20:16 RabidGravy Zoffix, ^ there you go :)
20:17 dalek rakudo/nom: eba3116 | lizmat++ | src/core/Str.pm:
20:17 dalek rakudo/nom: Further simplify Str.chomp, duh!
20:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eba3116be1
20:17 RabidGravy if anyone else has input on what could be tested please Issue/PR
20:18 Zoffix RabidGravy, great, you should list it on the README.md of the /ecosystem repo
20:18 moritz and on the language/modules page in perl6/doc
20:19 Zoffix RabidGravy, one thing it doesn't check for is the source-url value. And I doubt it should. Basically, the builder for modules.perl6.org doesn't handle: (a) git urls that don't end with .git (b) https urls that don't end with '/'; even though both work in the browser. Now, it's easy enough to fix on modules.perl6.org but would fixing that break panda and something else?
20:21 RabidGravy yeah, it's tricky as the source-url is "customary" but not specced and clearly it's not necessarily going to be required if some other installation mechanism comes along
20:21 moritz Zoffix: it's ecosystem/server that assembles the .json file that panda uses in the URL
20:21 moritz Zoffix: so if you teach that one to normalize URLs, then you can be pretty sure that panda will accept them
20:22 Zoffix Alright. I'll take a look.
20:24 [Tux] if a variable is a Cool, I can use === 1 to see if it has the Int 1. Is there an op to check that is an Int and is smaller than 4?
20:24 [Tux] if the Cool is a Str, $i < 4 barfs
20:26 RabidGravy try Int($i) < 4?
20:26 RabidGravy or something
20:26 [Tux] $i ~~ Int && $i < 4
20:26 [Tux] works, but is rather ugly compared to ===
20:26 moritz m: say 'a' before 4
20:26 camelia rakudo-moar b1a465: OUTPUT«False␤»
20:27 moritz m: say 3.5 before 4
20:27 camelia rakudo-moar b1a465: OUTPUT«True␤»
20:27 moritz [Tux]: you can use a numeric comparison that doesn't barf when it's a Str (with infix:<before>)
20:27 moritz [Tux]: if you want to check for Int and smaller, you need two ops.
20:32 rindolf joined #perl6
20:33 Ven joined #perl6
20:33 uruwi joined #perl6
20:36 dalek ecosystem: 5a348c4 | RabidGravy++ | README.md:
20:36 dalek ecosystem: Mention Test::META in the ecosystem README
20:36 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/5a348c4a64
20:38 dalek modules.perl6.org/mojo-app: a945e20 | (Zoffix Znet)++ | mojo-app/t/ (3 files):
20:38 dalek modules.perl6.org/mojo-app: Test suite for the home page
20:38 dalek modules.perl6.org/mojo-app: review: https://github.com/perl6/modules.perl6.org/commit/a945e20d01
20:40 zengargoyle what's a good module name for a NativeCall wrapper around libdatrie.  libdatrie is an implementation of a character Trie.
20:40 ShimmerFairy joined #perl6
20:41 Skarsnik DataTrie ?
20:41 RabidGravy I don't even know what that is
20:41 zengargoyle http://linux.thai.net/~thep/datrie/datrie.html
20:42 zengargoyle it's that thing that makes searching for completions fast and easy...  'p' -> 'ool', 'romise', 'rize', etc.
20:42 Skarsnik Well go for the libname DaTrie ?
20:43 RabidGravy if it's something that could be implemented in pure perl then I'd go something like Algorithm::Trie::Libdatrie
20:43 RabidGravy or something
20:43 raiph joined #perl6
20:44 arnsholt moritz: Expanding the alternation stuff now. I'm in "more words!" mode on my thesis, so I ended up expanding the docs a bit as well. Thanks for the prod =)
20:44 RabidGravy i.e. categorise at a top level, and distinguish how it is implemented at the lowest level
20:44 Skarsnik Look of CPAN for the perl5 name if it exists?
20:44 Skarsnik I like the Algorithm:: solution though  x)
20:44 zengargoyle Algorithm::Trie::Libdatrie is a rather nice ida
20:45 RabidGravy yeah, it stops the top level getting cluttered, and doesn;'t close the door on someone trying a pure perl implementation
20:45 zengargoyle i think i looked on CPAN and didn't find anything quite the same, but worth a second look.
20:46 zengargoyle yeah, or a more substantial implementation.  libdatrie has a few caveats: 255 indexing characters (although they can be disjoint and unicode)
20:47 Skarsnik maybe it could be worth defining 'base' place in module, like everything html related in a HTML:: or Web:: prefix?
20:47 lizmat zengargoyle: how would it deal with synthetics ?
20:48 zengargoyle though i think the standard camel-case of ::Libdatrie from libdatrie is yucky
20:48 RabidGravy I right a special Lucy tokeniser to do that a while back
20:49 dalek rakudo/nom: f0221aa | lizmat++ | src/core/Supply.pm:
20:49 dalek rakudo/nom: Simplify Supply.lines, now that \r\n is 1 grapheme
20:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f0221aa070
20:50 zengargoyle it somehow conflicts in my mind the the thing is 'libdatrie' but we're coing to call it 'Libdatrie' instead.
20:51 RabidGravy and someone wants to write an Apache Lucy binding - I didn't really get my head around that Charmoniser stuff
20:51 zengargoyle same with things like FTP -> Ftp or whatnot
20:51 RabidGravy well, FTP is an acronym
20:52 Skarsnik libDatrie?
20:52 RabidGravy there are no good names
20:52 Skarsnik for me it mark it has a C binding this way x)
20:52 zengargoyle One of the miseries of life is that everybody names things a little bit wrong. —- Richard P. Feynman
20:53 lizmat .oO( wasn't that Feynmann ? :-)
20:53 timotimo Zoffix: thanks for the hint on the alt text, that makes a lot of sense
20:53 tokuhiro_ joined #perl6
20:53 RabidGravy yeah, but we'd spend all our time naming things and not making things
20:54 RabidGravy and we're not all TS Elliot so we can't make names for ourselves by naming cats
20:54 zengargoyle and then it should be libDATrie as it's a Dual-Array based Trie implementation
20:54 RabidGravy lower case initial letter in some part of the class name makes it seem *special* somehow to me
20:55 zengargoyle well special in that it's not Pure Perl and requires a installed libdatrie to work.
20:56 * zengargoyle unless i also figure out bundling in the library ala Linenoise does.
20:56 RabidGravy maybe it's make Algorithm::Trie and make the libdatrie binding an internal default implementation with whatever name you want
20:57 RabidGravy but make it so someone can substitute a different implementation
20:57 zengargoyle making a top-level-ish Algorithm::Trie be dependent on a library seems sorta wrong.
20:58 RabidGravy yep
20:59 zengargoyle seems i've seen a few modules with ::NativeCall:: in their names somewhere... not a bad idea i think to mark things as not Pure Perl™
21:00 zengargoyle Algorithm::Trie::NativeCall::libdatrie
21:01 Skarsnik <RabidGravy> but make it so someone can substitute a different implementation <- I have a similar discution with the author of HTML::Parser::XML because I bind a clib that parse html, and it could be good if it was easy to switch implementation of the same thing for the user
21:01 zengargoyle but then i hit the long-names-are-ugly point
21:01 DrForr I thought about Binding:".
21:02 DrForr Grr. ::
21:02 RabidGravy Skarsnik, HTML::Parser::Any :)
21:02 zengargoyle Algorithm::Trie::NC::libdatrie
21:02 Ven_ joined #perl6
21:02 RabidGravy lots of precedent on CPAN for that malarkey
21:02 zengargoyle Algorithm::Trie::NCdatrie
21:03 Ven joined #perl6
21:04 zengargoyle sorta like that, gets NativeCall and the library (modulo lib)
21:04 RabidGravy zengargoyle, at this point I'd go with making the thing, making it work then adjusting the name before releasing it ;-)
21:04 lizmat RabidGravy zengargoyle : please remember that wrt to naming, the name of the *auth* is really part of the module name
21:05 lizmat so that you have less to worry about trampling on a namespace
21:05 zengargoyle oh, i've got it working, this is the make a distributable out of it part.
21:05 RabidGravy :)
21:06 RabidGravy lizmat, right now that's only *in theory* though right?
21:06 zengargoyle and pick a #*(&@ name
21:07 mr_ron joined #perl6
21:08 * zengargoyle and then draw a logotype :)
21:08 * zengargoyle and then write documentation
21:08 zengargoyle heh, priorities
21:10 timotimo Zoffix: so really the alt text should rather be empty like it was before?
21:10 Zoffix timotimo, I guess it could be "»ö«" :)
21:11 lizmat RabidGravy: yes
21:11 timotimo that's a good idea, actually :)
21:11 * timotimo commits that
21:12 dalek modules.perl6.org: 1cd9db9 | timotimo++ | web/index.tmpl:
21:12 dalek modules.perl6.org: the alt text wasn't good. now it's the text version of camelia
21:12 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/1cd9db9046
21:12 zengargoyle so just jump on Algorithm::Trie:auth<zengargoyle> and not worry about it until later...
21:13 _mg_ joined #perl6
21:14 timotimo sprocket: hey, are you there? i fixed the slurp thing with /proc/cpuinfo and friends
21:14 timotimo rejoice!
21:14 sprocket timotimo: ah!  great!
21:14 sprocket what was the issue?
21:15 timotimo sprocket: we were fstating the file and using its size
21:15 sprocket was it on account of /proc/cpuinfo not being a real file?
21:15 sprocket aah, ok :)
21:15 timotimo welllllll, fstat says it's a regular file
21:15 sprocket yes, i suspected something like that might be happening
21:15 sprocket true :)
21:15 timotimo so now the code acts extra suspiciously when encountering a file that's "0 bytes big"
21:16 sprocket thanks!  i’ll update my code to take advantage of the newly fixed slurp :)
21:16 timotimo it turns out a very similar fix had already been put into the branch that throws out libuv for the synchronous I/O stuff
21:18 timotimo i can't wait to see what the performance gain is from that branch :S
21:20 llfourn I get S17-supply/syntax.t hanging forever on test "Can only be in one whatever block at a time" sometimes
21:22 RabidGravy sprocket, timotimo -  be alove and patch Linux::Cpuinfo to that effect then :-*
21:22 _mg_ joined #perl6
21:22 llfourn if this thread https://github.com/perl6/roast/blob/master/S17-supply/syntax.t#L353 starts before the lock below it it will hang
21:22 llfourn does that make sense to anyone
21:23 RabidGravy and Liniix::Fuser for that matter
21:23 RabidGravy Linux
21:24 RabidGravy I didn't RT it at the time 'cause I wasn't sure if it was supposed to work like that ;-)
21:25 psch m: multi foo(Int $x is rw) { say "writable" }; multi foo(Int $x) { "readonly" }; foo(42) # RT #74414
21:25 camelia rakudo-moar f0221a: OUTPUT«Parameter '$x' expected a writable container, but got Int value␤  in sub foo at /tmp/IXLz34XYeD:1␤  in block <unit> at /tmp/IXLz34XYeD:1␤␤»
21:26 psch that's still wrong, isn't it?  as in, it should dispatch to the wider candidate if possible
21:27 RabidGravy it took me a few minutes to think why you might want to do that
21:27 RabidGravy but yeah
21:27 dalek modules.perl6.org/mojo-app: d51bd8f | (Zoffix Znet)++ | mojo-app/t/0 (2 files):
21:27 dalek modules.perl6.org/mojo-app: Test suite for the non-JS search feature
21:27 dalek modules.perl6.org/mojo-app: review: https://github.com/perl6/modules.perl6.org/commit/d51bd8f3a2
21:32 Ven joined #perl6
21:33 nys joined #perl6
21:33 dalek modules.perl6.org/mojo-app: 1f3db52 | (Zoffix Znet)++ | mojo-app/t/ (4 files):
21:33 dalek modules.perl6.org/mojo-app: Move db setup to the helper. Model gets its own temp db
21:33 dalek modules.perl6.org/mojo-app: review: https://github.com/perl6/modules.perl6.org/commit/1f3db5292f
21:37 eliasr joined #perl6
21:37 RabidGravy I know all the bits aren't there yet bit wouldn't it be a fairly strong aspiration to have all the perl6.org stuff y'know actually made in Perl 6?
21:38 Zoffix But why?
21:38 RabidGravy for me it's self evident
21:39 RabidGravy eat your own dog food and cause the yaks to be shaved
21:39 RabidGravy if we do it other people can
21:39 dalek rakudo/nom: 1b3e467 | lizmat++ | docs/ChangeLog:
21:39 dalek rakudo/nom: Put some stuff in da ChangeLog
21:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1b3e467fca
21:41 Zoffix There's a lot of bits missing.
21:41 Zoffix And the interpreter is in flux.
21:41 RabidGravy I'm not saying *now*, but making a list of the missing things would be a start
21:42 * Zoffix wonders if blogs.perl.org still using a PHP CMS
21:43 RabidGravy these are the reasons I used the word "aspiration"
21:43 DrForr Not for much longer :)
21:43 zakharyas joined #perl6
21:45 timotimo Zoffix: why would you say "interpreter"? :)
21:45 RabidGravy but asking the question "why can't we do this in Perl 6", listing the missing parts, encouraging people to make those things and making it possible is a good thing right?
21:46 timotimo +   + New Range.int-bounds returns first/last value for integer ranges
21:46 Zoffix ¯\_(ツ)_/¯ compiler? core? that things that makes the magic happen? :)
21:46 DrForr I'd love to run blogs.perl.org on perl 6 but I don't think it's the right time yet.
21:46 timotimo ^- lizmat, i think this has to make it a bit clearer that it's for integer type value ranges... i fail to express it, though
21:46 timotimo Zoffix: yeah, the magicky parts!
21:47 RabidGravy I think people get bogged down in the monolithic things
21:47 raiph psch: "it should dispatch to the wider candidate if possible" <-- s/wider/narrower/
21:47 timotimo RabidGravy: what do you mean by that?
21:48 psch raiph: "is rw" is narrower, according to RT #74414
21:48 psch raiph: but that's what it wrongfully tries to dispatch to
21:48 psch (and then throws Parameter::RW)
21:49 RabidGravy in P5 the Catalyst, Mojo are monstrous frameworks, people fear to start implementing that size thing
21:49 DrForr *cough* Bailador?
21:49 jdv79 fear?
21:49 RabidGravy I think it's make a great kit of fabulous tiny parts
21:50 Zoffix RabidGravy, sure, which is why I think we shouldn't rush them out for the of making all perl6.org stuff in Perl 6 :)
21:50 Zoffix s/the of/the sake of/;
21:50 pink_mist I'm not sure I'd call Mojo "Monstrous" :P
21:50 Zoffix It is if you consider how much polishing it undertook.
21:51 raiph psch: if mmd is supposed to (try to) dispatch to the narrowest candidate, and "is rw" narrows, then it *should* dispatch to the "is rw" candidate, right?
21:51 pink_mist ah, that's a fair point Zoffix =)
21:51 timotimo raiph: it should dispatch to the "is rw" candidate only if it's possible to call it
21:51 RabidGravy sorry I didn't  mean to imply what you think I did
21:52 raiph oh, duh, gotchya
21:52 Ven joined #perl6
21:52 Zoffix Alright :)
21:53 psch fwiw, the fix for that looks scarily easy, which means i'm probably missing something...
21:53 * psch waits for the spectest...
21:54 lizmat I'm not sure "is rw" actually partakes in mmd selection
21:55 psch lizmat: it didn't, no
21:55 RabidGravy I can explain why I think it should if you want :)
21:55 raiph ++psch
21:55 psch as in, !find_best_dispatchee doesn't yet pay attention to rwness of a given parameter
21:55 diana_olhovik_ joined #perl6
21:56 lizmat m: multi a($a) { say "foo" }; multi a($a is rw) { say "bar" }; a 42   # indeed
21:56 camelia rakudo-moar 1b3e46: OUTPUT«Parameter '$a' expected a writable container, but got Int value␤  in sub a at /tmp/JbH8e6IPD_:1␤  in block <unit> at /tmp/JbH8e6IPD_:1␤␤»
21:56 psch grr
21:56 lizmat oddly enough, that doesn't complain about having multiple candidates matching
21:56 psch of course when i teach !find_best_dispatchee about rwness it starts throwing X::Multi::NoMatch for e.g. --"foo"
21:56 psch and not Parameter::RW
21:57 virtualsue joined #perl6
21:57 psch that's what i overlooked, i knew the patch can't be that simple :P
21:57 jdv79 lizmat: what was this amazing perf thing you did for Tux?
21:57 jdv79 my backlogging has been spotty recetnly 
21:57 lizmat jdv79: basically Str.split(@needles)
21:57 jdv79 git hist on Str.pm tehn?
21:59 lizmat Tux was using a rather complicated regex, which became real simple with the new Str.split candidate
21:59 lizmat m: dd "flabbergasted".split( <a e> )
21:59 camelia rakudo-moar 1b3e46: OUTPUT«List $var = $("fl", "bb", "rg", "st", "d")␤»
22:00 lizmat m: dd "flabbergasted".split(/a|e/)    # before
22:00 camelia rakudo-moar 1b3e46: OUTPUT«List $var = $("fl", "bb", "rg", "st", "d")␤»
22:00 jdv79 nice
22:01 lizmat $ 6 'my @a = "words".IO.slurp.split("\r\n"); say +@a'
22:01 lizmat 235887
22:01 lizmat real0m0.462s
22:01 lizmat $ 6 'my @a = "words".IO.slurp.split(/\r\n/); say +@a'
22:01 lizmat 235887
22:01 lizmat real0m5.058s
22:01 bbkr joined #perl6
22:02 jdv79 the regex engine could use some work:)
22:02 lizmat yup, but we know that, and that's post 6.c
22:02 jdv79 in p5, in may cases, handing off as much as possible to the regex engine can boost perf
22:02 bbkr hi. do we have lazy attributes in P6 like in Mouse/Moose?
22:02 Ven joined #perl6
22:03 Zoffix That's second time asked today.
22:03 jdv79 classic wedge as much as possible into one dyn lang op optimization
22:03 flussence m: class A { has $.b = !!! }; given A.new { say 'alive'; say .b }
22:03 camelia rakudo-moar 1b3e46: OUTPUT«Stub code executed␤  in method  at /tmp/hTOOpHohKL:1␤  in block <unit> at /tmp/hTOOpHohKL:1␤␤»
22:03 lizmat bbkr: the idiom really is: write your own method like: method foo { $!foo //= lazy code }
22:03 RabidGravy bbkr, not directly no
22:04 Zoffix bbkr, you can search the log for "lazy" :) http://irclog.perlgeek.de/perl6/2015-11-08
22:04 Zoffix bbkr, here's one example: https://github.com/rakudo/rakudo/blob/nom/src/core/StrDistance.pm#L22
22:04 bbkr thanks, already found it
22:04 bbkr ah, do{} is lovely syntax in p6 :)
22:06 lizmat jdv: mind you, when using multiple matchers, the regex might win at some point:
22:06 lizmat $ 6 'my @a = "words".IO.slurp.split(("\r\n","\r","\n")); say +@a'
22:06 lizmat 235887
22:06 lizmat real0m5.760s
22:06 timotimo Zoffix: will we be seeing a WIP of the new module app hosted somewhere before it lands on our server?
22:06 lizmat $ 6 'my @a = "words".IO.slurp.split(/\r\n|\r|\n/); say +@a'
22:06 lizmat 235887
22:06 lizmat real0m8.231s
22:07 Zoffix timotimo, yeah.
22:07 Zoffix timotimo, but Fallout 4 comes out the day after tomorrow...
22:07 Zoffix :}
22:08 * bbkr thinks that some attribute trait like "is('lazy')" should be built into P6 in the future
22:08 timotimo i expect you're going to make it before then!
22:08 Zoffix :D
22:08 jdv79 lizmat: did you happen to hit an optimized path?
22:08 jdv79 or is it something else
22:08 timotimo bbkr: we had it built-in at one point, then it got thrown out again so that it could be implemented in module space
22:08 timotimo lizmat: is split using "simplematch"?
22:09 RabidGravy bbkr, nah - someone could make a module that does that
22:09 lizmat well, the multi Str needle approach just does a pure string search for all needles (seeing each char multiple times)
22:09 lizmat and then does some sorting/pointer algo to simulate LTM
22:10 lizmat timotimo: what is "simplematch" ?
22:10 timotimo lizmat: it's a method larry built that is a little bit cheaper than match
22:11 timotimo i don't know the exact details, but if it can be used there, perhaps it'll be a good thing
22:11 lizmat the Str.split(@needles) case uses nqp::index
22:11 lizmat it does not use the regex engine in any way, shape or form
22:11 jdv79 very nice
22:11 timotimo right
22:11 timotimo i meant the regex variant :)
22:12 lizmat once it's a regex, I consider it a black box inside Str.split
22:12 lizmat and just use .match on it
22:13 timotimo is it a :g match?
22:13 timotimo actually
22:13 timotimo i have the code in front of me now
22:13 * timotimo digs in
22:14 tardisx joined #perl6
22:14 timotimo right, i think for :g, simplematch doesn't help
22:20 Ven joined #perl6
22:27 mr_ron joined #perl6
22:27 lizmat .tell jnthn when thinking about VM level chomping, I was thinking that chomp would be a VMIO attribute
22:27 yoleaux lizmat: I'll pass your message to jnthn.
22:28 lizmat .tell and that nqp::readlinefh would then just DTRT
22:28 yoleaux lizmat: I'll pass your message to and.
22:29 lizmat .tell jnthn is there a reason for not making chomp a VMIO level attribute ?
22:29 yoleaux lizmat: I'll pass your message to jnthn.
22:37 timotimo lizmat: we don't really have a faster way to get a bunch of Int objects from an array into a Buf, than to loop over indices and use bindpos_i with .AT-POS, right?
22:37 timotimo because Blob.new (and Buf.new) take a gigantic amount of time for this task
22:37 AlexDaniel joined #perl6
22:38 lizmat int array or Int array ?
22:38 lizmat ah, Int
22:39 lizmat f the Int array is reified, you could go over the $!reified list and use nqp::atpos ?
22:39 lizmat and nqp::unbox_i of course
22:40 lizmat timotimo: are you doing something there ?
22:40 lizmat I think I can make it faster, fwiw
22:47 cygx joined #perl6
22:47 cygx o/
22:48 cygx Camelia says hello as well: http://cygx.github.io/js-rgba/camelia.html
22:50 dalek doc: 820d1c7 | raiph++ | doc/Language/variables.pod:
22:50 dalek doc: http://irclog.perlgeek.de/perl6/2015-11-08#i_11502289
22:50 dalek doc: review: https://github.com/perl6/doc/commit/820d1c724a
22:51 timotimo lizmat: i tried to use nqp::splice instead, but of course that doesn't work for object arrays into int arrays
22:52 timotimo lizmat: in that case it's not even an "Int Array", though that doesn't make a difference when compared to "Any Array" i suppose
22:52 timotimo er ... well ... i mean, it's okay to try to unbox each entry as an int and assign it to the buf, because that's really what you'd expect that to do
22:52 timotimo so if that exact thing blows up, nobody would say "it's not doing what i'd hoped!"
22:54 tokuhiro_ joined #perl6
22:58 autarch left #perl6
23:00 jdv79 how is a $h = {}; markedly different from a %h = (); type of deal?
23:01 jdv79 i just moved the latter to the former and lost my "references"
23:02 ugexe {} can act weird sometimes, especially with trace where it then treats it like a block instead of a hash
23:02 jdv79 no, i had stuff wired up with binds and now i don't get where it went wrong
23:03 jdv79 probably gonna be a slog.  i guess my container fu is weaker than i thought.
23:04 lizmat when in doubt, decont!  :-)
23:05 timotimo when know you don't, decont!
23:15 sprocket joined #perl6
23:16 RabidGravy if only all that was properly dumented
23:16 RabidGravy eh?
23:17 RabidGravy documented
23:17 TEttinger joined #perl6
23:18 lizmat .oO( we need dumentors :-)
23:18 RabidGravy or dimentos
23:20 llfourn dementors?
23:21 RabidGravy I'm going to bed now and then in the morning one of you is going to 'fess up to having written the best Perl 6 templating module which I need for what's next
23:21 RabidGravy okay?
23:21 llfourn kay
23:22 llfourn what are you templating?
23:22 RabidGravy Perl 6
23:22 llfourn you want to template perl6 in perl6?
23:22 RabidGravy yep
23:22 llfourn isn't that what macros are >.<
23:23 RabidGravy the reason for doing so will become apparent ;-)
23:23 * llfourn is excited to discover the apparrentness
23:23 raiph m: say "tiny template system: { $*IN.slurp }"
23:23 camelia rakudo-moar 1b3e46: OUTPUT«Method 'slurp' not found for invocant of class 'IO::Handle'␤  in block <unit> at /tmp/etzFZ1Zj8Y:1␤␤»
23:25 raiph . O ( dumented dreaming )
23:27 pochi joined #perl6
23:37 dalek rakudo/nom: e7ebf6c | lizmat++ | src/core/IO/Handle.pm:
23:37 dalek rakudo/nom: Make IO::Handle.get a bit faster
23:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e7ebf6cff7
23:39 pippo joined #perl6
23:40 pippo m: my @a = <a a>; my @b = <b b>; say (@a.Slip, @b,Slip); say (@a, @b)>>.Slip;
23:41 camelia rakudo-moar 1b3e46: OUTPUT«(a a [b b] (Slip))␤((a a) (b b))␤»
23:41 pippo m: my @a = <a a>; my @b = <b b>; say (@a.Slip, @b.Slip); say (@a, @b)>>.Slip;
23:41 camelia rakudo-moar 1b3e46: OUTPUT«(a a b b)␤((a a) (b b))␤»
23:41 pippo Why they are not the same?
23:41 dalek rakudo/nom: b60b2fe | (Lloyd Fournier)++ | src/Perl6/Metamodel/BUILDPLAN.nqp:
23:41 dalek rakudo/nom: Attribute required check before build
23:41 dalek rakudo/nom:
23:41 dalek rakudo/nom: fix #126436
23:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b60b2fed83
23:41 dalek rakudo/nom: e31463d | lizmat++ | src/Perl6/Metamodel/BUILDPLAN.nqp:
23:41 dalek rakudo/nom: Merge pull request #579 from LLFourn/is_required_fix
23:41 dalek rakudo/nom:
23:41 dalek rakudo/nom: Attribute required check before build
23:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e31463da57
23:45 pippo m: my @a = <a a>; my @b = <b b>; say (@a.Slip, @b.Slip); say (@a, @b)>>.Slip; say map { .Slip }, (@a, @b);
23:45 camelia rakudo-moar 1b3e46: OUTPUT«(a a b b)␤((a a) (b b))␤(a a b b)␤»
23:47 timotimo http://casual-effects.com/markdeep/ - this looks neat
23:47 pippo Should'nt map { .Slip }, () be equivalent to ()>>.Slip ??
23:49 timotimo not quite
23:49 timotimo hyper vs lazy semantics
23:49 skids joined #perl6
23:49 pippo timotimo: you mean from the result point of view?
23:50 timotimo from the way it's executed, i mean
23:50 timotimo i didn't actually look at the result you got there yet
23:50 timotimo i think the reason why you get ((a a) (b b)) from the hyperop is that hyperops try to retain the original layout as close as possible
23:51 timotimo m: say (((1, 2), 3, 4), 5, 6)>>++
23:51 camelia rakudo-moar e31463: OUTPUT«Parameter '$a' expected a writable container, but got Int value␤  in block <unit> at /tmp/TspCUmwqsk:1␤␤»
23:51 timotimo er, yeah
23:51 timotimo m: say (((1, 2), 3, 4), 5, 6)>>.succ
23:51 camelia rakudo-moar e31463: OUTPUT«(((2 3) 4 5) 6 7)␤»
23:51 timotimo tthat would explain why it doesn't slip the elements into one list
23:53 pippo timotimo: Do you think it is a bug?
23:54 pippo timotimo: I mean the .Slip behaviour.
23:54 timotimo not sure
23:55 timotimo i'm inclined to believe it's behavior as specced, but i didn't look at the spec closely enough
23:55 pippo timotimo: OK. TY. I leave with it then :-))
23:55 pippo timotimo: have a good night.
23:55 pippo left #perl6
23:56 dalek rakudo/nom: 460d89d | lizmat++ | src/core/Buf.pm:
23:56 dalek rakudo/nom: Make Buf/Blob.new upto 20x faster for Iterables
23:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/460d89d022
23:56 lizmat timotimo:  ^^^
23:57 timotimo lizmat: very good!
23:57 lizmat could you verify it works for you?  I fear Bufs etc are a bit under covered in the spectest
23:58 timotimo oh
23:59 dayangkun joined #perl6

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

Perl 6 | Reference Documentation | Rakudo