Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-02

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:01 [ptc] joined #perl6
00:05 prammer joined #perl6
00:08 timotimo gnite lizmat :)
00:11 [ptc] joined #perl6
00:14 [ptc] joined #perl6
00:26 idiosyncrat_ joined #perl6
00:30 [ptc] joined #perl6
01:02 tardisx joined #perl6
01:06 skids joined #perl6
01:10 yeahnoob joined #perl6
01:22 Actualeyes joined #perl6
01:50 cdg joined #perl6
02:02 tmch joined #perl6
02:02 themonkeybob11 joined #perl6
02:08 telex joined #perl6
02:09 zpmorgan joined #perl6
02:12 themonkeybob11 joined #perl6
02:24 partly_ joined #perl6
02:27 tardisx joined #perl6
02:37 ParsonsNose joined #perl6
02:46 quester joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
03:28 JimmyZ_ joined #perl6
03:52 noganex joined #perl6
04:04 pierrot joined #perl6
04:04 pierrot joined #perl6
04:16 molaf joined #perl6
04:22 Actualeyes joined #perl6
04:23 themonkeybob11 joined #perl6
04:35 cognominal joined #perl6
04:51 Brock At DC-Baltimore Perl Workshop (April 16 -- Baltimore, MD, USA) I'm going to give a hands-on tutorial getting people started with Perl 6!
04:51 awwaiid http://dcbpw.org/ for details & sign-up :)
04:51 awwaiid I'm also thinking of running a Randori session there, though I might do that on the hackathon day
04:56 labster joined #perl6
05:08 cdg joined #perl6
05:15 anaeem1_ joined #perl6
05:21 yoleaux joined #perl6
05:21 dalek joined #perl6
05:27 anaeem1__ joined #perl6
05:30 TEttinger awwaiid: will there be softshell crab? that's much of what I know baltimore for. one of my best friends in high school grew up in maryland and was absolutely done with crab by the time he was a teenager.
05:30 awwaiid TEttinger: I'm sure it can be obtained during your visit :)
05:30 TEttinger haha
05:31 awwaiid some of my coworkers (in DC, but still) worked as teenagers doing various things with crabs, though they didn't report being sick of them quite
05:32 anaeem1_ joined #perl6
05:32 TEttinger it is nice that baltimore has some uncommon features like that. pretty good football team I think, some years; it was interesting that one of the Ravens'... linemen I think, is also publishing math papers while he's a pro football player
05:33 TEttinger being known for softshell crab is better than what many other cities are known for :)
05:34 awwaiid hehe
05:35 TEttinger I live in the LA area, and even though we definitely deserved the reputation for smog capital of america for many years, it's really gotten a fair bit better
05:35 nakiro joined #perl6
05:35 TEttinger still very bad traffic here.
05:36 TEttinger but that's a recurring theme around all major cities it seems. public transit is kinda impossible here though, so sprawling
05:45 awwaiid I got this hired.com report on cost-of-living comparisons, and LA had a really good ratio compared to other cities (good purchasing power AND good absolute pay)
05:46 TEttinger huh
05:46 Cabanossi joined #perl6
05:46 TEttinger I guess "LA' could really mean a number of different areas
05:47 TEttinger san bernardino county has massive amounts of cheap homes built during the housing boom, but it's quite the commute to downtown LA or most other areas
05:48 wamba joined #perl6
05:48 DANtheBEASTman joined #perl6
05:49 TEttinger gas is pricey here in california due to more stringent environmental regulations, and also supply and demand (demand is HIGH)
05:49 DANtheBEASTman i have a working perl6 install with rakudobrew, but having trouble figuring out how to make sure it's up to date and upgrading if not
05:52 rindolf joined #perl6
05:52 awwaiid DANtheBEASTman: try 'perl6 -v' and see what it says. The latest rakudo is 2016.02, though I kinda recommend 2016.01.1 with Rakudo Star if you don't have any reason to be more cutting edge
05:53 awwaiid DANtheBEASTman: you can also use the (I think undocumented) "rakudobrew list" to see what you have installed
05:54 DANtheBEASTman cheers. a friend just told me to `perlbrew self-upgrade && perlbrew build moar` so i'm waiting on that now
05:54 awwaiid Lovely; that should hopefully get you 2016.02
05:54 DANtheBEASTman yeah i was on 2015.11-474-gf457007 (which doesn't seem tooo old..)
05:54 awwaiid thought MIGHT get you the 'nom' version
05:55 awwaiid you definitely want 2015.12 at the LEAST, but as I said, really 2016.01.1 or 2016.02 are much better. There were a lot of fixes between your version and the Christmas Release
05:56 awwaiid oh wait, you said "perlbrew". I should pay attention
05:57 awwaiid "perlbrew" is a perl5 version manager, "rakudobrew" is a rakudo/perl6 version manager -- you probably meant rakudobrew
05:57 awwaiid (esp since the params you mention are for rakudobrew. so probably just muscle memory -> IRC I'm guessing)
05:57 DANtheBEASTman yeah you're right. i said perlbrew but i meant rakudobrew.
05:57 awwaiid :)
05:58 DANtheBEASTman still new af to perl. coming from a mostly php/node.js background. first project is to port this horrible runlength encoder I made today into perl
06:00 DANtheBEASTman well, it's not too horrible, it works exactly as I intended, i just never figured out how to handle anything but letters.. https://gist.github.com/DanielFGray/cefe1b6afc364bac0ee9
06:06 awwaiid sounds fun
06:06 llfourn How do I rethrow an exception with the backtrace. It seems when I do $!.rethrow it only dies with the message.
06:07 awwaiid it is probably the decoding part that is restricted to letters from the \w . Note though that with this encoding you'll probably never be able to encode numbers since you won't be able to tell the difference between a number for the lenght and the number for an expansion
06:07 DANtheBEASTman awwaiid: yeah i'm unsure of how to actually take arbitrary inputs
06:07 awwaiid llfourn: http://doc.perl6.org/routine/rethrow says you're doing it right
06:08 Timbus http://www.rosettacode.org/wiki/Run-length_encoding#Perl_6 <- if you ever need to be inspired... (also I think the workaround is no longer needed?)
06:08 llfourn awwaiid: hmm I thought so. Maybe it's a bug.
06:09 DANtheBEASTman oh dear. `rakudobrew build moar` failed..
06:09 awwaiid DANtheBEASTman: you should work out an encoding format that can more exactly differentiate data from meta-data. Maybe a special character to separate the repeated-char from the repeated-char-count for example
06:10 Timbus that would be cool
06:10 DANtheBEASTman http://sprunge.us/iCdY
06:12 awwaiid DANtheBEASTman: to simplify, and assuming you don't have a reason otherwise, you might just "rm -rf /home/dan/.rakudobrew/" and start fresh with a new rakudobrew install
06:12 DANtheBEASTman will give that a go
06:13 awwaiid DANtheBEASTman: also, I suggest "rakudobrew build moar 2016.02"
06:13 awwaiid that way it'll get the specific version, in case it doesn't defaut correctly
06:15 DANtheBEASTman is it worth building from the AUR on archlinux? i see there's rakudo-git ..
06:17 DANtheBEASTman i guess i'll just tias
06:21 DANtheBEASTman re RLE: i'd thought about returning an array, with data and metadata as separate items
06:22 virtualsue joined #perl6
06:23 sftp joined #perl6
06:48 bjz joined #perl6
06:50 domidumont joined #perl6
06:55 domidumont joined #perl6
06:59 cibs joined #perl6
06:59 Hotkeys DANtheBEASTman: I'm on arch and I just build from source, but I guess rakudo-git would work
07:04 xinming joined #perl6
07:14 virtualsue joined #perl6
07:24 bjz_ joined #perl6
07:27 kjs_ joined #perl6
07:32 rhr joined #perl6
07:37 dalek Inline-Perl5: 518b6d1 | (Brock Wilcox)++ | / (2 files):
07:37 dalek Inline-Perl5: Set up travis
07:37 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/518b6d13f7
07:37 dalek Inline-Perl5: 9c6fa98 | niner++ | / (2 files):
07:37 dalek Inline-Perl5: Merge pull request #54 from awwaiid/travis
07:37 dalek Inline-Perl5:
07:37 dalek Inline-Perl5: Wow, thank you so much!
07:37 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/9c6fa987b9
07:38 Relsak joined #perl6
07:38 firstdayonthejob joined #perl6
07:43 bjz joined #perl6
07:43 labster joined #perl6
07:44 CIAvash joined #perl6
07:44 tinita_ joined #perl6
07:48 RabidGravy joined #perl6
07:49 darutoko joined #perl6
07:49 RabidGravy MARNING
07:50 awwaiid nine_: yeah, I had that on the back-burner for a while :)
07:56 dalek ecosystem: 29fa5a0 | azawawi++ | META.list:
07:56 dalek ecosystem: Add Memoize to ecosystem
07:56 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/29fa5a0425
07:58 RabidGravy azawawi++ # harr
07:58 dalek perl6-most-wanted: 4f05d4d | azawawi++ | most-wanted/modules.md:
07:58 dalek perl6-most-wanted: Added WIP for Memoize
07:58 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/4f05d4d7af
07:58 AlexDaniel joined #perl6
08:05 Actualeyes left #perl6
08:06 ely-se joined #perl6
08:23 zakharyas joined #perl6
08:32 fireartist joined #perl6
08:32 sno joined #perl6
08:39 Amnez777 joined #perl6
08:59 dakkar joined #perl6
08:59 rurban joined #perl6
08:59 Gothmog_ joined #perl6
09:00 virtualsue joined #perl6
09:06 [ptc] joined #perl6
09:23 quester left #perl6
09:31 dalek rakudo/jvminterop: 7242188 | peschwa++ | src/vm/jvm/Perl6/Metamodel/JavaHOW.nqp:
09:31 dalek rakudo/jvminterop: Return the right thing when we don't find a method.
09:31 dalek rakudo/jvminterop:
09:31 dalek rakudo/jvminterop: This way we get a proper X::Method::NotFound, instead of a low-level "Can not
09:31 dalek rakudo/jvminterop: invoke this object."
09:31 dalek rakudo/jvminterop: review: https://github.com/rakudo/rakudo/commit/7242188766
09:31 dalek rakudo/jvminterop: 2cc0f06 | peschwa++ | t/03-jvm/01-interop.t:
09:31 dalek rakudo/jvminterop: Remove erroneous comment.
09:31 dalek rakudo/jvminterop: review: https://github.com/rakudo/rakudo/commit/2cc0f06696
09:31 dalek rakudo/jvminterop: 17e2679 | peschwa++ | t/03-jvm/01-interop.t:
09:31 dalek rakudo/jvminterop: Add a test for throwing X::Method::NotFound.
09:31 dalek rakudo/jvminterop: review: https://github.com/rakudo/rakudo/commit/17e2679d9f
09:33 psch the next obvious issue would be throwing the right thing when the user passes wrongly typed arguments to a Java method...
09:34 psch which seems like it involves quite a bit of shuffling things from BootJavaInterop to RakudoJavaInterop
09:35 psch the former can get away with just dying straight out of the corresponding SMO subtypes get_* method, but rakudo can't
09:35 psch not sure what the good way to solve that is, though
09:36 psch what comes to mind immediately is type checking when trying to fit the arguments into the Java class
09:36 psch but that kind of replicates a lot of Binder code in the interop code, which i don't think is a good idea
09:37 [ptc] joined #perl6
09:38 psch so i probably should try and get Binder involved there directly, if possible...
09:38 psch *the
09:44 psch hm, actually the Binder should already be involved i suppose
09:54 abraxxa joined #perl6
09:57 AlexDaniel m: say grep:kv(/./, <a b c>)
09:57 camelia rakudo-moar 50a4df: OUTPUT«Regex object coerced to string (please use .gist or .perl to do that)  in any canonicalize_pair at src/Perl6/World.nqp line 4040␤Regex object coerced to string (please use .gist or .perl to do that)  in any canonicalize_pair at src/Perl6/World.nqp line 4…»
10:00 masak m: say grep:kv(rx/./, <a b c>)
10:00 camelia rakudo-moar 50a4df: OUTPUT«Regex object coerced to string (please use .gist or .perl to do that)  in any canonicalize_pair at src/Perl6/World.nqp line 4040␤Regex object coerced to string (please use .gist or .perl to do that)  in any canonicalize_pair at src/Perl6/World.nqp line 4…»
10:03 SCHAAP137 joined #perl6
10:09 Skarsnik joined #perl6
10:11 Skarsnik Hello
10:12 timotimo o/
10:14 Skarsnik Any idea on what can I do to run a part of my code that leak, I mean to freely kill it and restart it? I tried using fork but it lock the C lib I use to parse html
10:15 Skarsnik leak = fill 2GB in 24h x)
10:16 gregf_ hi
10:17 gregf_ i've installed a module using panda. is there a way to check where it got installed (~/.rakudobrew does not have it). something like $INC{"Foo/Bar.pm"}
10:18 timotimo Skarsnik: just isolate the workload in a separate worker process (full process; a thread isn't enough) and have it exit when it's done enough work?
10:18 Skarsnik Yes, but how I do that without fork? I run a different script?
10:19 gregf_ `locate Tiny.pm | grep JSON` <- does not return any results *ive installed JSON::Tiny*
10:19 Skarsnik gregf_, try using it? it's put in PERL6 Install/site/panda/... something like that
10:19 Skarsnik and the name is marshamaled
10:20 Skarsnik so you can't find it with a locate/find
10:20 gregf_ Skarsnik: using it works.. but i just wanted to know where modules get installed by default
10:21 RabidGravy m: say $*REPO.repo-chain
10:21 camelia rakudo-moar 50a4df: OUTPUT«(inst#/home/camelia/.perl6/2016.02-72-g50a4df3 inst#/home/camelia/rakudo-m-inst-1/share/perl6/site inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-1/share/perl6 CompUnit::Repository::AbsolutePath.new(next-repo => Comp…»
10:21 partly_ OMFG I think i figured out my OpenSSL issue, which i talked about yesterday. An XMPP Server uses StartTLS to signal that it want to start a secure connection. I need to handle this in my application, before I switch to SSL
10:22 Skarsnik Is there a page on the doc about compunit/repo stuff?
10:22 RabidGravy no, I was going to start writing it, got distracted and mde some software instead
10:23 araujo joined #perl6
10:23 RabidGravy gregf_, https://gist.github.com/jonathanstowe/be951a63cbf713cff2b5 has the basic guts of a thing to find *all* the installed modules, this could be adapted
10:25 gregf_ RabidGravy: nice, thanks... hmmm quite a few locations :|
10:27 gregf_ also, out os curiosity. would there be an AWS api using Perl6 anytime? *the Perl5 ones are pretty much incomplete :|*
10:27 gregf_ s/os/of/
10:27 moritz there would be one if somebody made one
10:27 timotimo nobody knows. except the person who makes it
10:28 moritz "someone like you"
10:28 gregf_ we do use a lot of the API(S3/DynamoDb,Sns) :| *all PHP or Java*
10:28 gregf_ heh
10:28 Skarsnik x)
10:29 gregf_ working on Perl6 makes me feel im using Ruby .... from a distance ;)
10:32 Skarsnik wow Stage parse      : 108.744 it was around 70 for me previously
10:32 RabidGravy I've got to make some adaptions to HTTP::UserAgent for it to be able to properly work with AWS
10:33 Skarsnik I feel like h:ua crash on some malformed http occasionnaly
10:33 Skarsnik I had to put some code on a try {} block because of that x)
10:34 RabidGravy entirely possible, but without test cases it won't get fixed
10:34 Skarsnik I should keep the full trace of this code in a file
10:35 molaf joined #perl6
10:44 RabidGravy really the URI of a server that makes http that H::UA can't handle would be enough
10:45 Skarsnik hm running something with perl6-valgrind-m output nothing outside the start, is that normal?
10:46 Skarsnik RabidGravy, na it's occasionnal (I fetch regulary the same page)
10:46 cognominal joined #perl6
10:47 timotimo you need to know that valgrind is EXTREMELY slow
10:47 timotimo expect your script to take at lest 20x longer to do anything at all
10:49 Skarsnik Yes, but I mean, it reached some say (yes it take a while) but it output nothing
10:49 timotimo you may have more luck building moarvm with --asan (a Configure.pl option), that's about 3x slower and catches many things valgrind catches, but not nearly everything
10:49 timotimo how can you know it reaches the say if it outputs nothing?
10:51 Skarsnik I mean, there is no valgrind output
10:51 timotimo that means everything is going well
10:51 timotimo valgrind only outputs things if things go wrong
10:51 timotimo ==18801== Memcheck, a memory error detector
10:51 timotimo ==18801== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
10:51 timotimo ==18801== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
10:51 timotimo ^- it did output this, right?
10:51 Skarsnik I tried to track down this perl6 leak x)
10:51 Skarsnik Yes
10:52 zakharyas joined #perl6
10:52 timotimo well, you cannot detect a leak until the program ends
10:52 timotimo btw, if you're looking for leaks, you really do need to run your moar with --full-cleanup and also tell valgrind to --leak-check=full
10:52 Skarsnik Oh yeah, it only show error in memory allocation/free
10:53 timotimo if you do not use --full-cleanup, moar will just leave everything allocated and exit when it's finished
10:54 arnsholt Which generates a bunch of "potential leak" messages (or something along those lines. It's been a while since I last used valgrind)
10:56 brainwash left #perl6
10:59 Skarsnik it's like 100x slower x)
10:59 arnsholt Wouldn't surprise me. It's really slow
11:01 timotimo yes, valgrind is really, really slow.
11:04 espadrine_ joined #perl6
11:06 Skarsnik hm, aside from the 4MB lost at the end, it does not look that bad https://gist.github.com/Skarsnik/7863fd11b361df6fd931
11:07 jnthn ==17380== 4,404,470 (4,002,840 direct, 401,630 indirect) bytes in 200,142 blocks are definitely lost in loss record 68 of 68
11:07 timotimo you'ven't built moar with --debug?
11:07 jnthn ==17380==    at 0x40291CC: malloc (vg_replace_malloc.c:296)
11:07 Skarsnik but it's close to what is lost on a real run of this for each iteration of the loop
11:07 jnthn ==17380==    by 0x40B51AC: MVM_args_copy_callsite (in /home/skarsnik/devel/leak-rakudo/rakudo/install/lib/libmoar.so)
11:07 jnthn Wow, that's not good...
11:07 timotimo jnthn: i've seen something similar to this somewhere else, too
11:07 Skarsnik I use default option of Configure.pl
11:08 Skarsnik I added --full-cleanup to moar and --leak-check=full to the valgrind-m script
11:08 timotimo i always --debug=3 --optimize=3 and also set CFLAGS=-march=native
11:09 timotimo we need some way to give perl6-valgrind-m arguments that get passed to valgrind itself
11:10 Skarsnik want me to try with debug and opti option?
11:10 timotimo that'll at least give line numbers and filenames in the traceback :)
11:10 timotimo which i find is always nice
11:11 Skarsnik lookfor is something that recurse a lot (the xml tree is quite huge/deep)
11:12 Skarsnik optimize is a good idea? does it change much the behavior?
11:14 timotimo the --optimize flag is only for the C compiler
11:14 timotimo if lookfor is implemented in the native library (gumbo?) then it can't do anything about that whatsoever. if lookfor is implemented in perl6, it won't do anything about that, because in order to make that better it'd have to improve the bytecode, or the semantics :P
11:15 Skarsnik Na it's perl6 native (the xml moduke)
11:15 timotimo OK, then it will very unlikely change the performance much
11:16 timotimo recursion - well, invocation in general - is somewhat expensive in moarvm at the moment. it's on jnthn's to-do list for this year.
11:17 Skarsnik Well the execution time does not bother me, but the fact I lost 4Mb for each iteration of the loop it's really annoying :)
11:19 timotimo that's not something the optimizer will be able to fix
11:20 Skarsnik I mean, I though the optimize flag will change stuff in moar on how it handle thing
11:20 Skarsnik if it's just a compiler option, I guess it change nothing
11:24 Skarsnik brb lunch
11:30 kaare_ joined #perl6
11:40 johndau joined #perl6
11:40 Sherwool joined #perl6
11:44 rurban joined #perl6
11:50 dalek perl6.org: dea96f3 | (Steve Mynott)++ | source/downloads/index.html:
11:50 dalek perl6.org: add one line docker install docs
11:50 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/dea96f3072
11:52 kid51 joined #perl6
12:08 sufrostico joined #perl6
12:11 virtualsue joined #perl6
12:14 dalek rakudo/faster-accessors: b66dc24 | jnthn++ | src/Perl6/World.nqp:
12:14 dalek rakudo/faster-accessors: Generate correct signature for accessors.
12:14 dalek rakudo/faster-accessors: review: https://github.com/rakudo/rakudo/commit/b66dc246b0
12:14 dalek rakudo/faster-accessors: c69c013 | jnthn++ | src/Perl6/World.nqp:
12:14 dalek rakudo/faster-accessors: Share signature of accessors within a package.
12:14 dalek rakudo/faster-accessors:
12:14 dalek rakudo/faster-accessors: Since they're identical, and there's no user opportunity to apply any
12:14 dalek rakudo/faster-accessors: traits to them. Shaves 160KB off CORE.setting size relative to after
12:14 dalek rakudo/faster-accessors: adding the accessor generation code.
12:14 dalek rakudo/faster-accessors: review: https://github.com/rakudo/rakudo/commit/c69c013d59
12:14 dalek nqp: 79e10b4 | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
12:14 dalek nqp: Workaround for unsigned attribute access bug.
12:14 dalek nqp: review: https://github.com/perl6/nqp/commit/79e10b42b3
12:16 timotimo jnthn: how much bigger does the core setting get with generated accessors?
12:16 timotimo i imagine it could be a sizable bit
12:17 wamba joined #perl6
12:19 * timotimo compares locally
12:19 jnthn Will find out soon
12:20 jnthn Going to merge that in a moment :)
12:21 dalek nqp: 902c10d | jnthn++ | tools/build/MOAR_REVISION:
12:21 dalek nqp: Bump for performance, inlining fixes.
12:21 dalek nqp: review: https://github.com/perl6/nqp/commit/902c10dff0
12:23 jnthn timotimo: nom: 11,587,320 bytes. faster-accessors: 11,457,008
12:23 timotimo huh. i was expecting the other way around :D
12:23 timotimo oh well ;)
12:23 timotimo i'm liking that
12:23 jnthn m: say "so, it's {11587 - 11457}KB smaller"
12:23 camelia rakudo-moar 50a4df: OUTPUT«so, it's 130KB smaller␤»
12:23 * lizmat looks forward to seeing all these opts
12:23 kid511 joined #perl6
12:23 jnthn timotimo: Well, remember that it was serializing closures before, which meant they accidentally took in a bunch of scoping
12:23 jnthn uh
12:24 timotimo oh!
12:24 jnthn A bunch of scopes
12:24 timotimo that makes sense indeed
12:24 jnthn I was expecting to come out with about a draw though
12:24 lizmat but first I'm going to be offline for a bit
12:24 lizmat &
12:24 timotimo this potentially also means we'll see shorter gen2 root lists, too?
12:24 jnthn So, coming out with a win on space *and* time is nice
12:24 jnthn timotimo: yeah
12:24 timotimo awesome :)
12:24 jnthn Though not sure how much of a dent it'll really make
12:25 Skarsnik I don't have the line in valgrind output even with --debug=3 on moar, hm
12:25 timotimo uh oh
12:25 jnthn For anyone curious, together this work makes https://gist.github.com/jnthn/ee65e3be80f4a5485944 go from around 3.34s down to around 0.65s
12:26 timotimo why does this make that crash ...
12:26 timotimo Cannot unbox a type object
12:26 timotimo at gen/moar/stage2/QAST.nqp:4364  (/home/timo/perl6/install/share/nqp/lib/QAST.moarvm:push_op:2)
12:27 jnthn That looks very much like something in RT
12:27 timotimo the branch merge tickles it
12:28 jnthn What code?
12:28 timotimo trying to run my white_noise.p6 from the SDL2::Raw examples/ folder
12:28 timotimo it dies while precompiling
12:28 jnthn Got any unsigned attributes?
12:28 timotimo panda install . also does that
12:28 timotimo could be, gimme a moment
12:28 timotimo yes, a whole bunch of 'em
12:29 jnthn aha
12:29 jnthn I suspect it tickles an existing issue
12:29 timotimo in repr('CPointer') classes as well as native functions, their return types and also parameterizing Bufs
12:29 jnthn Got a golf, ooc? But I can also take the one in rT
12:29 timotimo i'll try, gimme a minute
12:31 jnthn OK
12:31 jnthn lunch here :)
12:33 timotimo i've got one
12:33 jnthn OK; gist it and I'll check if the fix for that RT that I'll do after lunch also fixes it :)
12:33 timotimo class golf { has uint32   $.format is rw; }
12:33 timotimo remove the "is rw" and it's gone. remove the "u" and it's gone
12:35 timotimo unsurprisingly, "is rw" can also go on the class instead of the attribute
12:35 timotimo so ... do i have to gist that? :D
12:36 timotimo data:text/plain;charset=utf-8;base64,Y2xhc3MgZ29sZiB7IGhhcyB1aW50MzIgICAkLmZvcm1hdCBpcyBydzsgfQ==
12:36 timotimo ^- here, have it as a URL :D
12:39 rurban joined #perl6
12:42 Skarsnik hm, is there something in moar to free moarstruct?
12:44 timotimo "moarstruct"?
12:46 Skarsnik I mean like freeMVMCallsite, but I found it x)
12:48 timotimo i'm not certain MVMCallsite is gc-managed
12:48 psch hm, complicated /o\
12:48 psch Java methods are ForeignCode objects
12:48 timotimo right. it is not.
12:48 psch which means i only get :(| is raw) for them, which is probably why the Binder doesn't really care
12:48 timotimo so it's just a Plain Old Struct. if it gets malloc'd, you'll just free it later
12:49 timotimo urgh :|
12:49 psch and BootJavaInterop can't do any Exception-y stuff, 'cause it doesn't even neccessarily know about the Exception i'd like thrown
12:49 arnsholt Skarsnik: I hope you're not trying to free things from Perl 6 code by binding Moar internals with NativeCall. That's not going to work out
12:49 Skarsnik MVMCallsite is a MVMThreadContext?
12:50 psch but nqp::callmethod is defined in QAST::Compiler
12:50 Skarsnik I try to figure what cause the leak x)
12:50 psch so i'd have to lift that up into P6 land to call a RakOps method instead of an Ops method..?
12:50 psch err, no, callmethod calls IndyBootstrap.methcall_noa
12:51 timotimo Skarsnik: wat? "is a"?
12:51 timotimo all i can see is that you're clearly very confused ?!?
12:52 Skarsnik can be cast if you prefer, there is no cleanup function for MVMCallSite
12:52 timotimo well, yeah, you can cast a MVMCallsite into an MVMThreadContext if you like
12:52 timotimo you're not going to get data that makes much sense out of it, though
12:52 psch which means the cleanest way might actually be subclassing ForeignCode and attaching a compatible Signature
12:52 timotimo Skarsnik: did you see MVM_callsite_destroy?
12:53 psch but that'd mean ditching all the mmd work i did up to now, 'cause i'd have to have P6 level protos instead
12:53 edehont joined #perl6
12:53 timotimo psch: argh :(
12:53 psch ...which i don't even know if that really works, seeing as the marshalling still has to happen on the Java level
12:53 skids joined #perl6
12:54 psch well, or stick with the uncomfortable alternative and reimplement parts of the Binder in RakudoJavaInterop... :|
12:54 Skarsnik hm, ok this destroy function look correct
12:59 Actualeyes joined #perl6
13:00 Skarsnik https://github.com/MoarVM/MoarVM/blob/master/src/core/args.c#L72 hm, should the malloc be fsize * sizeof(src_flags)?
13:04 arnsholt Probably not. If the source of your leak is callsite objects leaking, it's almost definitely not a logic bug in the callsite class itself, but rather a problem in some part of the code that *uses* callsites
13:06 wamba joined #perl6
13:07 rudi_s I'd like to create a list of "quoted" paths. my @a = 'foo', 'bar', 'baz' should be converted to '"foo", "bar", "baz"' (it doesn't have to correctly " in the filenames). Basically I want join which also wraps the arguments. Any ideas?
13:08 DrForr rudi_s: map{ qq{"$_"} } @paths
13:09 DrForr "A join which also..." that way lies madn^wPHP :)
13:09 rudi_s DrForr: Awesome, thank you ;-)
13:10 psch string_real_escape_and_quote_join() # perfectly sane!
13:13 rudi_s Sounds great ;-)
13:15 dalek nqp: be15097 | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
13:15 dalek nqp: Fix crash in unsinged attributeref code-gen.
13:15 dalek nqp: review: https://github.com/perl6/nqp/commit/be15097326
13:16 riatre joined #perl6
13:17 jnthn timotimo: The NQP patches should fix things up :)
13:17 DrForr I always seem to singe my attribute refs.
13:17 jnthn And also that RT :)
13:17 jnthn hah :P
13:21 jnthn m: class MV { has uint64 $.start; method s { if $!start {} } }
13:21 camelia rakudo-moar 50a4df: OUTPUT«===SORRY!===␤Cannot unbox a type object␤»
13:21 jnthn Turns out RT #127548 golfs further - doesn't need the CStruct repr
13:21 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127548
13:22 huggable joined #perl6
13:25 uruwi joined #perl6
13:32 * [Coke] finds out there's a perl workshop in april a scant 5 hour drive from his house. nifty.
13:37 DrForr NLPW?
13:38 [Coke] http://dcbpw.org/dcbpw2016/ - mentioned in backscroll
13:38 dalek rakudo/nom: 62ed92a | jnthn++ | tools/build/NQP_REVISION:
13:38 dalek rakudo/nom: Bump NQP_REVISION for code-gen fixes, Moar fixes.
13:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/62ed92add6
13:38 dalek rakudo/nom: fdd37a9 | jnthn++ | src/ (12 files):
13:38 dalek rakudo/nom: Start to code-gen simple accessors.
13:38 dalek rakudo/nom:
13:38 dalek rakudo/nom: This makes them rather simpler/faster than adding them as closures.
13:38 dalek rakudo/nom: Most importantly, though, it will enable inlining of them, which is
13:38 dalek rakudo/nom: where the real speed-up will come from.
13:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fdd37a9e0b
13:38 dalek rakudo/nom: ae7f822 | jnthn++ | src/Perl6/World.nqp:
13:38 dalek rakudo/nom: Generate correct signature for accessors.
13:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ae7f822503
13:38 dalek rakudo/nom: 3176cb1 | jnthn++ | src/Perl6/World.nqp:
13:38 dalek rakudo/nom: Share signature of accessors within a package.
13:38 dalek rakudo/nom:
13:38 dalek rakudo/nom: Since they're identical, and there's no user opportunity to apply any
13:38 dalek rakudo/nom: traits to them. Shaves 160KB off CORE.setting size relative to after
13:38 dalek rakudo/nom: adding the accessor generation code.
13:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3176cb146c
13:40 dalek roast: eb2b08e | jnthn++ | S12-attributes/native.t:
13:40 dalek roast: Tests for RT #127548.
13:40 dalek roast: review: https://github.com/perl6/roast/commit/eb2b08ebb1
13:40 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127548
13:40 RabidGravy joined #perl6
13:41 RabidGravy Boom!
13:41 RabidGravy yuck weather out there
13:45 jnthn Rained here and washed all the pretty snow away :(
13:48 andreoss joined #perl6
13:49 perlpilot left #perl6
13:49 perlpilot joined #perl6
13:51 dalek perl6-bench: ea2a4d0 | jnthn++ | microbenchmarks.pl:
13:51 dalek perl6-bench: Add object accessor micro-benchmark.
13:51 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/ea2a4d0168
13:52 arnsholt jnthn: Better than half of it melting away and the other half freezing to ice again =)
13:53 andreoss left #perl6
13:53 * stmuk wonders what the weather in Nuremberg will be like
13:55 jnthn arnsholt: True :)
13:56 llfourn m: sub foo { "foo".return }; foo().say # I don't get it
13:56 camelia rakudo-moar 3176cb: OUTPUT«Attempt to return outside of any Routine␤  in block <unit> at /tmp/KTOQC8ZyDc line 1␤␤»
13:58 jnthn We have a .return? :S
13:58 llfourn apparently :P
13:58 llfourn it's in Mu
14:00 psch m: sub f { my $ret = Mu.^find_method('return'); $ret("foo") }; f().say
14:00 camelia rakudo-moar 3176cb: OUTPUT«foo␤»
14:00 llfourn heh that's interesting
14:01 psch i'd guess the anon Capture doesn't get the invocant right or something..?
14:01 psch m: class A { method f(|c) { c.perl.say } }; A.new.f("foo")
14:01 camelia rakudo-moar 3176cb: OUTPUT«\("foo")␤»
14:01 llfourn m: sub a { b() }; sub b { "foo".return }; b().say;
14:01 camelia rakudo-moar 3176cb: OUTPUT«Attempt to return outside of any Routine␤  in block <unit> at /tmp/hPrmBPJzrF line 1␤␤»
14:02 psch note that in A.f there it doesn't print the invocant
14:02 llfourn m: sub a { b() }; sub b { "foo".return }; a().say; # woops
14:02 camelia rakudo-moar 3176cb: OUTPUT«foo␤»
14:02 llfourn so it goes one too far out
14:03 liztormato joined #perl6
14:03 jnthn Yeah, maybe it's a scope off-by-one or something
14:04 liztormato The .return was meant for idioms like " .return with $foo "
14:05 liztormato Returning only if the value is defined
14:05 llfourn liztormato: That's just what I was about to use it for until I found it was broken :)
14:05 liztormato Argh
14:05 jnthn Guessing it's not very tested :)
14:05 llfourn well .return with %hash{$key} # specifically
14:06 andreoss joined #perl6
14:06 andreoss left #perl6
14:06 andreoss joined #perl6
14:06 liztormato Well. We should add some tests then first
14:06 themonkeybob11 joined #perl6
14:08 llfourn I added to TODO list
14:09 cdg joined #perl6
14:09 andreoss m: my \x = ">>>" ; multi infix:x($a,$b){ }
14:09 camelia rakudo-moar 3176cb: OUTPUT«===SORRY!===␤Cannot unbox a type object␤»
14:09 liztormato llfourn++
14:09 andreoss m: my $x = ">>>" ; multi infix:$x($a,$b){ }
14:09 camelia rakudo-moar 3176cb: ( no output )
14:09 cdg joined #perl6
14:10 jnthn Skarsnik: I've golfed what's probably the same leak you're seeing to `multi foo($ where 1) { }; loop { foo(|(1,)) }`
14:10 psch m: my $x = ">>>" ; multi infix:$x($a,$b){ say "ok" }; 1 >>> 2
14:10 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tsN2Xry5pm␤Missing << or >>␤at /tmp/tsN2Xry5pm:1␤------> 3multi infix:$x($a,$b){ say "ok" }; 1 >>>7⏏5 2␤    expecting any of:␤        infix␤        infix stopper␤»
14:12 Skarsnik jnthn, weird, there is no multi involved. I tried to golf it without success so far
14:12 rurban1 joined #perl6
14:12 jnthn Skarsnik: If you're using Perl 6 for anything non-trivial, there'll be multis involved :)
14:12 themonkeybob11 joined #perl6
14:13 jnthn Skarsnik: There's more than one way to reach the leaky code-path though, this is just the way I engineered from the valgrind output you sent.
14:13 rurban2 joined #perl6
14:15 Skarsnik if you find a short case, it's better ^^
14:15 edehont While looking for a way to loop over a multidimensional array, I thought something like .shape would be quite handy. Turns out it already exixts... But not in the docs.
14:16 edehont Is that intentional?
14:17 rurban joined #perl6
14:17 jnthn edehont: No, just missing, I expect. Please file an issue on the perl6/doc repo, if you have a github account
14:17 rurban1 joined #perl6
14:17 llfourn ( or a pull request :D)
14:17 jnthn Skarsnik: Yeah. Now I need to understand what's happening :)
14:17 jnthn Well, or that ;)
14:18 edehont I will give it a shot!
14:18 llfourn edehont++
14:19 jnthn edehont: Why do you need shape to iterate over it by the way? :)
14:19 jnthn m: my @a[2;2] = (1, 2), (3, 4); for @a { .say }
14:19 camelia rakudo-moar 3176cb: OUTPUT«1␤2␤3␤4␤»
14:19 jnthn m: my @a[2;2] = (1, 2), (3, 4); for @a.kv -> $indices, $value { say "$indices => $value" }
14:19 camelia rakudo-moar 3176cb: OUTPUT«0 0 => 1␤0 1 => 2␤1 0 => 3␤1 1 => 4␤»
14:20 andreoss m: my $x = "xyz";; sub infix:$x($a, $b) { $a + $b } ; 1 xyz 3;
14:20 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s9_JjS91Md␤Two terms in a row␤at /tmp/s9_JjS91Md:1␤------> 3";; sub infix:$x($a, $b) { $a + $b } ; 17⏏5 xyz 3;␤    expecting any of:␤        infix␤        infix stopper␤        statement end…»
14:21 andreoss what is $x supposed to be?
14:21 andreoss m: sub infix:"xyz"($a, $b) { $a + $b } ; 1 xyz 3;
14:21 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jgvxZtzsEC␤Missing block␤at /tmp/jgvxZtzsEC:1␤------> 3sub infix:7⏏5"xyz"($a, $b) { $a + $b } ; 1 xyz 3;␤»
14:21 andreoss also why this doesn't work?
14:21 psch m: sub infix:<"xyz">($a, $b) { "ok" }; say 1 xyz 2
14:21 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YK37GD5qcN␤Two terms in a row␤at /tmp/YK37GD5qcN:1␤------> 3ub infix:<"xyz">($a, $b) { "ok" }; say 17⏏5 xyz 2␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤    …»
14:21 psch hm, seems that broke..?
14:22 psch ah, no
14:22 psch < > quotes
14:22 psch m: sub infix:<xyz>($a, $b) { "ok" }; say 1 xyz 2
14:22 camelia rakudo-moar 3176cb: OUTPUT«ok␤»
14:22 psch andreoss: you need a delimiter around your operator
14:22 andreoss "" used to work to, didn't it?
14:23 jnthn m: sub infix:<<"xyz">>($a, $b) { "ok" }; say 1 xyz 2
14:23 camelia rakudo-moar 3176cb: OUTPUT«ok␤»
14:24 jnthn You'd need that to interpolate
14:24 jnthn I don't think infix:"..." has ever worked, no
14:24 jnthn It's not a valid colonpair
14:24 psch m: my $x = "xyz"; sub infix:<<$x>>($a, $b) { "ok" }; say 1 xyz 2
14:24 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fHwrD3VrUz␤Colon pair value '$x' too complex to use in name␤at /tmp/fHwrD3VrUz:1␤------> 3my $x = "xyz"; sub infix:<<$x>>7⏏5($a, $b) { "ok" }; say 1 xyz 2␤»
14:24 psch hm, that's broken though :/
14:24 psch not sure since when...  i'm pretty sure we should have tests for it though
14:24 jnthn I don't think it needs to work
14:24 jnthn I mean
14:24 jnthn That one *can't* work
14:24 jnthn Ever.
14:25 Ven joined #perl6
14:25 jnthn Think about the timing
14:25 psch oh, right
14:25 jnthn m: constant $x = "xyz"; sub infix:<<$x>>($a, $b) { "ok" }; say 1 xyz 2
14:25 camelia rakudo-moar 3176cb: OUTPUT«ok␤»
14:25 psch constant should yeah
14:25 jnthn And that one is fine :)
14:25 andreoss m: my $x = "xyz";; my sub infix:<<$x>>($a, $b) { $a + $b } ; 1 xyz 3;
14:25 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gMxlzfEaG4␤Colon pair value '$x' too complex to use in name␤at /tmp/gMxlzfEaG4:1␤------> 3my $x = "xyz";; my sub infix:<<$x>>7⏏5($a, $b) { $a + $b } ; 1 xyz 3;␤»
14:26 andreoss m: INIT my $x = "xyz";; my sub infix:<<$x>>($a, $b) { $a + $b } ; 1 xyz 3;
14:26 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AGXRTxk470␤Colon pair value '$x' too complex to use in name␤at /tmp/AGXRTxk470:1␤------> 3INIT my $x = "xyz";; my sub infix:<<$x>>7⏏5($a, $b) { $a + $b } ; 1 xyz 3;␤»
14:26 jnthn andreoss: You need constant
14:26 jnthn INIT is too late
14:26 jnthn It's after compile time
14:26 jnthn m: BEGIN my $x = "xyz";; my sub infix:<<$x>>($a, $b) { $a + $b } ; 1 xyz 3;
14:26 camelia rakudo-moar 3176cb: ( no output )
14:26 jnthn m: BEGIN my $x = "xyz";; my sub infix:<<$x>>($a, $b) { $a + $b } ; say 1 xyz 3;
14:26 camelia rakudo-moar 3176cb: OUTPUT«4␤»
14:27 jnthn Needs to be at BEGIN time.
14:27 jnthn But srsly, just use constant ;)
14:27 Ven o/
14:27 jnthn o/ Ven
14:28 rdleon left #perl6
14:30 edehont jhthn: Ah... so I don't need .shape after all for what I want. Thanks.
14:31 jnthn Another situation saved from introspection land :)
14:32 * llfourn wonders if we'll get that PR
14:32 jnthn Damn, yeah. I shouldn't be so helpful. :P
14:32 llfourn haha
14:34 Skarsnik m: sub foo() {}; our $foo is export = &foo;
14:34 camelia rakudo-moar 3176cb: ( no output )
14:35 uruwi joined #perl6
14:35 Skarsnik m: sub foo() {}; constant $foo is export = &foo;
14:35 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uiTcHx8CO3␤Can't use unknown trait 'is export' in a sub declaration.␤at /tmp/uiTcHx8CO3:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
14:36 llfourn hmmm
14:36 llfourn m: consant $foo is export = "foo"
14:36 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DGWgtYLU6r␤Variable '$foo' is not declared␤at /tmp/DGWgtYLU6r:1␤------> 3consant 7⏏5$foo is export = "foo"␤»
14:36 llfourn m: constant $foo is export = "foo"
14:36 camelia rakudo-moar 3176cb: ( no output )
14:37 Skarsnik m: constant $foo is export = sub {};
14:37 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yZ5YBVEieT␤Can't use unknown trait 'is export' in a sub declaration.␤at /tmp/yZ5YBVEieT:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
14:37 llfourn m: constant $foo is export = anon sub foo {};
14:37 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vSocjMEWuC␤Can't use unknown trait 'is export' in a sub declaration.␤at /tmp/vSocjMEWuC:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
14:37 abaugher joined #perl6
14:37 llfourn nice bug.
14:37 llfourn m: constant $foo is export = -> { }
14:37 camelia rakudo-moar 3176cb: ( no output )
14:38 llfourn m: constant $foo is export = anon method foo { }
14:38 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ksmZHV8KSr␤Can't use unknown trait 'is export' in a method declaration.␤at /tmp/ksmZHV8KSr:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATE…»
14:38 llfourn looks to be assigning to a routine goofs it
14:39 llfourn it somehow thinks is export is export is being applied to the routine...or something
14:39 llfourn s/is export xx 2/is export/
14:41 Skarsnik m: constant $foo is export = Mu || sub {};
14:41 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6cBhyHrj_t␤Can't use unknown trait 'is export' in a sub declaration.␤at /tmp/6cBhyHrj_t:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
14:41 llfourn m: constant $foo is export = True || sub foo { }
14:41 camelia rakudo-moar 3176cb: ( no output )
14:41 llfourn maybe there's some hackyness in the implementation of constant is export
14:47 awwaiid So I'm currently installing Task::Star into a fresh rakudo 2016.02. While it is running I try to start a new perl6 and it blocks waiting for ""/home/awwaiid/.perl6/2016.02/precomp/.lock" . If this was a production environment that would be bad I think
14:48 llfourn I've had similar weirdness with locks... like I start a websever and can't panda install anything until I stop it
14:49 dalek rakudo/repl6: f61e067 | hoelzro++ | src/ (2 files):
14:49 dalek rakudo/repl6: REPL6: Add rudimentary Perl 6 REPL loading support
14:49 dalek rakudo/repl6:
14:49 dalek rakudo/repl6: This is the start of moving advanced REPL functionality into Perl 6.
14:49 dalek rakudo/repl6: This is to lower the barrier to entry for improving the REPL, allowing
14:50 dalek joined #perl6
14:51 virtualsue joined #perl6
14:54 skids joined #perl6
15:01 sufrostico joined #perl6
15:03 stmuk awwaiid: ISTR some locking behaviour being fixed in the last few days .. not sure if it's that
15:04 stmuk there is also the awful hack of -IFakeDir which I used in p6doc :/
15:08 themonkeybob11 joined #perl6
15:11 lizmat joined #perl6
15:12 * lizmat waves from a ferry
15:12 * Ven waves lizmat
15:12 Ven at*
15:12 lizmat o/ Ven
15:14 masak o/ lizmat
15:15 * jnthn hopes the sea isn't waving too much at lizmat :)
15:15 jnthn Skarsnik: Currently spectesting a patch to deal with the leak
15:15 lizmat naah... we won't be leaving the harbour for at least an hour
15:15 DrForr Heh. I recommended Dylan to use the ferry next time he's headed to the UK.
15:16 Skarsnik good :), ping me if you commit or want me to test
15:16 rudi_s m: use Test; is-deeply {a => Blob}, {a => Blob};
15:16 camelia rakudo-moar 3176cb: OUTPUT«Invocant requires an instance of type Blob, but a type object was passed.  Did you forget a .new?␤  in any  at gen/moar/m-Metamodel.nqp line 1723␤  in sub is-deeply at /home/camelia/rakudo-m-inst-1/share/perl6/sources/C712FE6969F786C9380D643DF17E85D068…»
15:16 rudi_s Is this expected?
15:17 llfourn rudi_s: nah looks like a bug
15:17 Skarsnik is deeply do gist to compare I think
15:17 llfourn :S
15:17 edehont joined #perl6
15:17 rudi_s Interestingly it works with Int
15:17 rudi_s m: use Test; is-deeply {a => Int}, {a => Int};
15:17 camelia rakudo-moar 3176cb: OUTPUT«ok 1 - ␤»
15:18 Skarsnik Blob is a role, that maybe why
15:18 jnthn I thought is-deeply used eqv?
15:18 jnthn m: say {a => Blob} eqv {a => Blob}
15:18 camelia rakudo-moar 3176cb: OUTPUT«Invocant requires an instance of type Blob, but a type object was passed.  Did you forget a .new?␤  in any  at gen/moar/m-Metamodel.nqp line 1723␤  in block <unit> at /tmp/2ikvkWKM_q line 1␤␤»
15:18 jnthn m: say Blob eqv Blob
15:18 camelia rakudo-moar 3176cb: OUTPUT«Invocant requires an instance of type Blob, but a type object was passed.  Did you forget a .new?␤  in any  at gen/moar/m-Metamodel.nqp line 1723␤  in block <unit> at /tmp/RNJf5GbSYV line 1␤␤»
15:18 llfourn jnthn++
15:19 jnthn I wonder if the eqv candidate for Blob is missing a smiley?
15:19 psch m: say Blob
15:19 camelia rakudo-moar 3176cb: OUTPUT«(Blob)␤»
15:19 llfourn .say for &infix:<eqv>.candidates
15:19 llfourn m: .say for &infix:<eqv>.candidates
15:19 camelia rakudo-moar 3176cb: OUTPUT«sub infix:<eqv> ($?) { #`(Sub|69036160) ... }␤sub infix:<eqv> ($a, $b) { #`(Sub|69038136) ... }␤sub infix:<eqv> (@a, @b) { #`(Sub|69037832) ... }␤sub infix:<eqv> (Stringy:D $a, Stringy:D $b) { #`(Sub|69037984) ... }␤sub infix:<eqv> (Numeric:D $a, N…»
15:19 jnthn m: say &infix:eqv.cando(Int,Int)
15:19 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2b4M6T19Sa␤Undeclared routine:␤    infix:eqv used at line 1. Did you mean 'infix:<eq>', 'infix:<eqv>', 'infix:<∖>'?␤␤»
15:19 moritz src/core/Buf.pm:multi sub infix:<eqv>(Blob:D \a, Blob:D \b) {
15:19 jnthn m: say &infix:<eqv>.cando(Int,Int)
15:19 camelia rakudo-moar 3176cb: OUTPUT«Too many positionals passed; expected 2 arguments but got 3␤  in block <unit> at /tmp/06vyQdFGs8 line 1␤␤»
15:19 jnthn m: say &infix:<eqv>.cando(\(Int,Int))
15:19 camelia rakudo-moar 3176cb: OUTPUT«(sub infix:<eqv> ($a, $b) { #`(Sub|63176776) ... })␤»
15:20 jnthn m: say &infix:<eqv>.cando(\(Blob,Blob))
15:20 camelia rakudo-moar 3176cb: OUTPUT«(sub infix:<eqv> (@a, @b) { #`(Sub|58109752) ... } sub infix:<eqv> ($a, $b) { #`(Sub|58110056) ... })␤»
15:20 jnthn m: say Blob ~~ Positional
15:20 camelia rakudo-moar 3176cb: OUTPUT«True␤»
15:20 llfourn o.o
15:20 moritz uhm, I hope @a constrains to Positional:D ?
15:20 jnthn Ah, so it's hitting an @a, @b candidate in that case
15:20 llfourn what moritz said
15:20 jnthn moritz: I'm guessing not...though maybe it should
15:21 llfourn m: sub (@a) { }.(List)
15:21 camelia rakudo-moar 3176cb: ( no output )
15:21 llfourn +1 for that
15:21 jnthn Something we could fix in 6.d, since we'd be able to do it conditionally in the compiler
15:22 lizmat jnthn: multi sub infix:<eqv>(Blob:D \a, Blob:D \b)
15:24 jnthn lizmat: Read the last few minutes of discussion :)
15:25 jnthn m: say List eqv List
15:25 camelia rakudo-moar 3176cb: OUTPUT«True␤»
15:25 jnthn Curious why that doesn't hit it though
15:25 jnthn m: say &infix:<eqv>.cando(\(List,List))
15:25 camelia rakudo-moar 3176cb: OUTPUT«(sub infix:<eqv> (@a, @b) { #`(Sub|73035592) ... } sub infix:<eqv> ($a, $b) { #`(Sub|73035896) ... })␤»
15:26 jnthn m: say List.list
15:26 camelia rakudo-moar 3176cb: OUTPUT«((List))␤»
15:26 jnthn m: say Blob.list
15:26 camelia rakudo-moar 3176cb: OUTPUT«((Blob))␤»
15:26 jnthn m: say List.elems
15:26 camelia rakudo-moar 3176cb: OUTPUT«1␤»
15:26 jnthn m: say Blob.elems
15:26 camelia rakudo-moar 3176cb: OUTPUT«Invocant requires an instance of type Blob, but a type object was passed.  Did you forget a .new?␤  in any  at gen/moar/m-Metamodel.nqp line 1723␤  in block <unit> at /tmp/8FKsGUk7rZ line 1␤␤»
15:26 jnthn Aha
15:26 jnthn I bet it's that
15:27 jnthn Skarsnik: If you try your code with MoarVM HEAD now, hopefully your leak is gone
15:27 Skarsnik I just need to git pull in moar or I can use the configure to do it?
15:28 jnthn Skarsnik: git pull && make install in Moar would do it
15:28 jnthn I would think so, anyways
15:29 llfourn m: my @a = List; my @b := List; say @a.perl,@b.perl;
15:29 camelia rakudo-moar 3176cb: OUTPUT«[List,]List␤»
15:29 timotimo mhm mhm
15:30 nemo wow. Zoffix is still not back
15:30 yoleaux 25 Feb 2016 13:08Z <ZoffixW> nemo: I'm not deathly sick :) While still not fully well, the reason I'm not around is because I've just moved and (a) I don't have Internet at my new place yet and won't until next week. (b) I'm too busy with unpacking and settling in :)
15:30 nemo he must have been really really sick
15:31 nemo ah
15:31 nemo thanks ms bot
15:31 nemo and he left me a message ☺
15:31 uruwi joined #perl6
15:32 Skarsnik hm, moar is in src/vm/moar or gen?
15:32 timotimo i'm now only missing him, but not worried any more :)
15:32 jnthn Skarsnik: You should have a MoarVM directory somewhere, maybe under nqp/ ?
15:33 Skarsnik hm, interesting stage parse is back a 60 , it was 100 this morning x)
15:34 jnthn urgh, headache...time for a break I guess... &
15:36 Skarsnik yep, fixed, jnthn++
15:37 Skarsnik Afterlookfor :71.616 kb,  Afterlookfor :71.616 kb , Afterlookfor :71.616 kb
15:37 Skarsnik .... instead of growing by 4Mb each time
15:40 timotimo sweet!
15:40 Ven pretty good :D.
15:40 timotimo yo ven
15:40 Ven yo timotimo !
15:41 virtualsue joined #perl6
15:42 idiosyncrat_ joined #perl6
15:45 zpmorgan joined #perl6
15:45 rudi_s Regarding the Blob eqv Blob issue. Should I report a bug (and if yes where)?
15:46 moritz rudi_s: yes, and by mailto:rakudobug@perl.org
15:49 ptolemarch joined #perl6
15:50 rudi_s moritz: [x]
15:51 rudi_s Can I easily fake the current time (now()) to get reproducible test cases?
15:54 ugexe create a mock object. or maybe you can use monkey-typing/augment or wrap
15:55 khw joined #perl6
15:55 timotimo m: now()
15:55 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fwyXAZoqRK␤Undeclared routine:␤    now used at line 1. Did you mean 'not', 'HOW'?␤␤»
15:55 timotimo m: now
15:55 camelia rakudo-moar 3176cb: ( no output )
15:55 timotimo you can't wrap a term, i don't think
15:55 timotimo so that's out
15:56 rudi_s I guess I could use $*test-fake-time // now in the code but that's a little ugly IMHO.
15:57 rudi_s How would you write it?
15:57 ugexe create a routine that creates the delta of the real now and the now you want?
15:57 rudi_s (Is there a convention in perl6 for "private" $* variables?)
15:58 rudi_s I could use a method which I overwrite in my test. Good idea.
15:58 ugexe m: sub now { say 420; }; say now
15:58 camelia rakudo-moar 3176cb: OUTPUT«420␤True␤»
15:59 ugexe yeah looks like that'll work
16:02 * ugexe wonders how feasible automatically creating NC wrappers via machine learning is
16:03 Skarsnik machine learning?
16:04 rudi_s ugexe: Doesn't work if the sub is in another module.
16:04 rudi_s I guess I'll just use $*test-fake-time // now;
16:04 rudi_s Is there a convention in perl6 for "private" $* variables?
16:04 rudi_s Perl6 itself uses uppercase, so those are out.
16:05 DrForr rudi_s: I'd probably use $*_xxx but that's just me.
16:05 timotimo m: my $*MyModule::Test = 5
16:05 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8qDx4wnOQG␤Dynamic variables cannot have package-like names, like $*MyModule::Test␤at /tmp/8qDx4wnOQG:1␤------> 3my $*MyModule::Test7⏏5 = 5␤»
16:05 timotimo :|
16:06 rudi_s DrForr: Sounds good, thanks.
16:06 * perlpilot would do the same as DrForr
16:07 themonkeybob11 joined #perl6
16:07 perlpilot (assuming I could agree with the idea of "private" $*vars)
16:07 ugexe i would just shell out to change the system time to whatever i need
16:07 dalek rakudo-star-daily: 5a44c8a | coke++ | log/ (9 files):
16:07 dalek rakudo-star-daily: today (automated commit)
16:07 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/5a44c8a0ae
16:07 dalek rakudo-star-daily: f47e270 | coke++ | log/ (9 files):
16:07 dalek rakudo-star-daily: today (automated commit)
16:08 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/f47e2709dc
16:08 * rudi_s hopes ugexe is joking.
16:09 ugexe its not a problem if you run each test in its own vm
16:09 arnsholt ugexe: I'm not sure I'd use ML for generating wrappers
16:09 arnsholt ML has many useful attributes, but for this it's not ideal, I think
16:10 ugexe arnsholt: im still new to ML, but why? it would seem to have some fairly obvious patterns
16:10 jnthn Skarsnik: Yay \o/
16:12 hoelzro joined #perl6
16:14 arnsholt ugexe: Primarily because ML is inherently fuzzy
16:14 olinkl_ joined #perl6
16:14 kipd_ joined #perl6
16:14 flussenc1 joined #perl6
16:15 Lucas_One__ joined #perl6
16:15 BinGOs_ joined #perl6
16:15 integral_ joined #perl6
16:15 integral_ joined #perl6
16:15 Lucas_One__ joined #perl6
16:15 timotimo joined #perl6
16:15 drforr1 joined #perl6
16:18 themonkeybob11 joined #perl6
16:19 japhb \o/  # More perl6-bench benchmarks when I do my morning 'git pull'
16:19 yoleaux 29 Feb 2016 08:33Z <sortiz> japhb: The DBIish install time issues are solved and a PR opened in MoarVM for a definite fix. Thanks for your report.
16:19 pierrot joined #perl6
16:19 japhb .tell sortiz Great, thank you, I'll rebuild-all and see if DBIish install is fixed
16:19 yoleaux japhb: I'll pass your message to sortiz.
16:22 japhb Does anyone have a mirror/fork of flussence's Text-Tabs-Wrap (and Test-Corpus, needed to test it)
16:24 skids I have it offline, by virtue of perl6-all-modules.  Probably stale though.
16:24 ugexe thi sis from 2016-1-30: http://hack.p6c.org:5001/authors/id/J/JD/JDV/Perl6/Text-Tabs-Wrap-0.2.5.tar.gz
16:25 skids Yeah mine is older
16:28 prammer joined #perl6
16:29 themonke1bob11 joined #perl6
16:38 japhb ugexe: Does JDV ~~ flussence?  ISTR there are a couple different repos out there with the same name, and I'm not sure if they were forks, or different people porting the Perl 5 modules, or what
16:38 ugexe everything on that metacpan mirror is under JDV
16:38 japhb oh
16:39 ugexe its not a finalized service, its just something we have been using to test integration
16:39 japhb ugexe: Can you make it do directory indexes?
16:41 jantore joined #perl6
16:43 ugexe japhb: what do you mean
16:44 timotimo http://hack.p6c.org:5001/ <- why not use the interface?
16:44 vendethiel joined #perl6
16:46 Ulti if I want to make some of my own code friendly to the new multiline REPL is there anything I can do?
16:46 hoelzro Ulti: how do you mean? like a slang, or...?
16:46 Ulti yeah a slang with a quote construct
16:46 ugexe you can also search it by enabling cpan in zef and using `zef search XXX`
16:46 Ulti it at least has a nice error where its running my actions
16:47 Ulti before it didnt get that far so figure now's the time to update my stuff
16:47 Ulti I can take a look at the grammar for "" if that's where the magic lies
16:47 hoelzro if you have a custom quoting construct, it *should* pick up on that as long as failures are triggered via FAILGOAL, thanks to sortiz++
16:48 llfourn Slangs won't work in REPL if introduced the normal way
16:48 Ulti hoelzro okedoke I will take a look, thanks :)
16:48 llfourn if you use https://github.com/LLFourn/p6-CompUnit-Util#mixin_lang it will
16:48 Hotkeys Morning
16:48 llfourn or just copy what is done in the source
16:48 Hotkeys Still 10 minutes til noon so I get to say morning
16:48 Ulti will be really cool if I can get my slang to work since it will make perl6 into an interactive research tool without much effort
16:49 Hotkeys Interesting
16:49 llfourn Ulti: the reason it's not working is because modifications to %*LANG don't carry over to REPL/EVAL
16:49 llfourn you have to manually pass them to %?LANG for it to work
16:50 llfourn we obviously don't have a proper implementation of slangs yet so it's all a bit rough.
16:50 kalkin- Is there a way to create a class or module programmaticaly and then generate perl 6 code from that? Something like Class.new("Foo::Bar").to-source-code()
16:51 llfourn m: class Class { }; say Class.new.perl;
16:51 camelia rakudo-moar 3176cb: OUTPUT«Class.new␤»
16:51 timotimo https://github.com/timo/ADT - this neat little module of mine generates classes programmatically
16:51 llfourn kalkin-: like that?
16:52 torbjorn joined #perl6
16:52 kalkin- How can i provide the class name?
16:52 kalkin- ohh
16:52 timotimo m: class Class { }; ::('Class').new.perl.say
16:52 camelia rakudo-moar 3176cb: OUTPUT«Class.new␤»
16:53 kalkin- m: class "Foo" {}; Foo.new.perl.say
16:53 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bq1P3j8BBL␤Unable to parse class definition␤at /tmp/bq1P3j8BBL:1␤------> 3class7⏏5 "Foo" {}; Foo.new.perl.say␤    expecting any of:␤        generic role␤»
16:53 kalkin- m: class Class {}; ::('Foo').new.perl.say
16:53 camelia rakudo-moar 3176cb: OUTPUT«Failure.new(exception => X::AdHoc.new(payload => "Failed"), backtrace => Backtrace.new)␤»
16:53 Ulti llfourn well the modification is there since I'm seeing my slang error coming up in the repl
16:54 Ulti thats the issue its doing a panic and crashing out during the multiline
16:54 llfourn m: Metamodel::ClassHOW.new_type(:name("Foo")).say
16:54 camelia rakudo-moar 3176cb: OUTPUT«Method 'say' not found for invocant of class 'Foo'␤  in block <unit> at /tmp/dctEC7OELp line 1␤␤»
16:54 llfourn m: Metamodel::ClassHOW.new_type(:name("Foo")).^name.say
16:54 camelia rakudo-moar 3176cb: OUTPUT«Foo␤»
16:54 llfourn kalkin-: something like that
16:55 llfourn Util_: hmm ok nvm me then. I'd be interested to see what your slang is like.
16:55 CIAvash joined #perl6
16:56 Ulti though cool you've made that easier
16:56 kalkin- m: Metamodel::ClassHOW.new_type(:name("Foo")).perl.say
16:56 camelia rakudo-moar 3176cb: OUTPUT«Method 'perl' not found for invocant of class 'Foo'␤  in block <unit> at /tmp/uQQIXAloGJ line 1␤␤»
16:56 Ulti I'll port over so I dont have to keep up with all the cool kids on how to inject my slang in
16:56 Ulti llfourn: https://github.com/MattOates/BioInfo/blob/master/lib/BioInfo.pm6
16:56 llfourn :P it's just lonely old me afaik
16:57 llfourn kalkin-: you might want to compose the type
16:57 llfourn m: Metamodel::ClassHOW.new_type(:name("Foo")).^compose.perl.say
16:57 camelia rakudo-moar 3176cb: OUTPUT«Foo␤»
16:57 * llfourn takes a look
16:57 llfourn kalkin-: essentially you create the new type do stuff to it like .^add_method and then .^compose.
16:58 Ulti its really nice too I can paste in a mixture of bio sequence types and get back an array of typed objects automatically :) so with multiline it becomes actually useful in the REPL which was what I originally imagined its use case
16:58 llfourn kalkin-: http://jnthn.net/papers/2015-fosdem-static-dynamic.pdf # page 64 has a cool example
16:59 * llfourn actually takes a look
16:59 kjs_ joined #perl6
17:00 llfourn Util_: awesome
17:01 kalkin- llfourn: thanks will have a look at it. need to go afk.
17:02 llfourn Util_: btw there is this "find-the-other-quote-not-sure-what-its-called" grammar thing like '[' ~ '] <stuff> # finds <stuff> in between the brackets
17:03 llfourn m: say '[foo]' ~~ /'[' ~ ']' 'foo'/ #maybe
17:03 camelia rakudo-moar 3176cb: OUTPUT«「[foo]」␤»
17:03 llfourn Util_: you might be able to use it for wrapping your quites
17:03 llfourn quotes*
17:06 ugexe i thought that bracket matching grammar thing was nyi
17:06 zakharyas joined #perl6
17:07 llfourn well it seems to be yi
17:07 jnthn Long implemented
17:07 jnthn Goat matching syntax
17:07 jnthn ...
17:07 jnthn *Goal* matching syntax
17:07 llfourn m: say '[fo[bar]o]' ~~ /'[' ~ ']' 'foo'/ #does it do balanced text?
17:07 camelia rakudo-moar 3176cb: OUTPUT«Nil␤»
17:08 jnthn No, just looks for the end
17:08 llfourn m: say '[fo[bar]o]' ~~ /'[' ~ ']' 'fo[bar]o'/ #does it do balanced text?
17:08 camelia rakudo-moar 3176cb: OUTPUT«「[fo[bar]o]」␤»
17:08 jnthn You'd need to recurse to do structure
17:08 llfourn makes sense
17:08 jnthn It's used extensively in the Perl 6 grammar
17:08 jnthn m: say [1,2
17:08 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XRAefm3rSy␤Unable to parse expression in array composer; couldn't find final ']' ␤at /tmp/XRAefm3rSy:1␤------> 3say [1,27⏏5<EOL>␤    expecting any of:␤        statement end␤        statement m…»
17:08 Ulti llfourn yeah I have to admit I just picked the first thing in the grammar that looked like it did roughyl what I wanted... I'll take a look
17:08 ugexe ah i was thinking of a more general rule for arbitrary brackets. like %% but somehow knowing what the RHS bracket is based on the LHS bracket
17:09 jnthn That "couldn't find final ']'" is part of the goal-matching syntax.
17:09 llfourn yep I did discover it from looking at Perl6::Gramamr
17:10 Hotkeys Could do it with captures?
17:11 llfourn Hotkeys: do what?
17:11 Hotkeys Arbitrary brackets
17:11 llfourn but you can do arbitrary brackets goat matching
17:11 llfourn #greatname
17:12 Hotkeys Oh
17:12 Hotkeys I don't really know anything about the goal matching syntax
17:12 Hotkeys I only just heard of it when it was mentioned here a few minutes ago
17:12 Hotkeys :p
17:13 llfourn well it's pretty handy
17:13 domidumont joined #perl6
17:14 ugexe but you have to declare both brackets! i dont have time for that!
17:15 ugexe really though thats good to know. i can clean up some code with that
17:16 Hotkeys Just checked the regex doc page and goal matching isn't there :(
17:16 * ugexe wonders if it can do alternate sets of brackets
17:16 Hotkeys Or if it is it isn't there by name
17:16 llfourn it probs isn't
17:17 ugexe its mention in design s05 though
17:17 llfourn Hotkeys: did you search for goat?
17:17 ugexe goat matching goes well with monkey typing
17:18 uruwi joined #perl6
17:19 [ptc] joined #perl6
17:21 llfourn m: say ???????????????????????????????????? ~~ /'????' ~ '????' .+/
17:21 camelia rakudo-moar 3176cb: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/d1J4ggH24V:1␤------> 3say7⏏5 ???????????????????????????????????? ~~ /'????' ~ '????' .+/␤Bogus postfix␤at /tmp/d1J4ggH24V:1␤------> 3say 7⏏5????????????????????????…»
17:21 goodname joined #perl6
17:22 llfourn m: say '???????????????????????????????????? '~~ /'????' ~ '????' .+/
17:22 camelia rakudo-moar 3176cb: OUTPUT«「????????????????????????????????????」␤»
17:31 itaipu joined #perl6
17:39 virtualsue joined #perl6
17:39 Actualeyes left #perl6
17:57 addison joined #perl6
17:59 prammer joined #perl6
17:59 FROGGS joined #perl6
18:04 firstdayonthejob joined #perl6
18:07 TreyHarris Just trying to understand an architectural decision: why are, for instance, the several descendents of X:IO with the single attribute :path (or even all the ones having to do with directories) not descendents of a single common exception? Is the complication of a more complex type heirarchy (especially containing classes that will never be directly instantiable) judged to be a greater issue than boilerplate
18:07 TreyHarris code repetition?
18:08 TreyHarris Or did it just happen that way without any concious architectural "decisionmaking" process?
18:08 [Coke] Don't assume the exception hierarchy is well thought out.
18:08 [Coke] right, that.
18:09 [Coke] I'm sure a plan to clean that up would be considered for v6.d
18:12 TreyHarris Also, I've seen it both ways in older docs and in the synopses so I'm not sure if there's a consensus: do people talk of classes (and/or objects) having "attributes", or is that an internal thing that you shouldn't talk about outside of the class and you should refer to methods instead?
18:13 prammer joined #perl6
18:15 skids Classes are talked about as "having attributes", it's easier than explaining they have a private data slot and a (useually autoconstructed) accessor method.  Moreover, ISTR jnthn working on making attribute accessors inlineable yesterday so they will be special in some sense, if virtually equivalent to that model.
18:17 skids (Plus it makes sense to distinguish them in case someone cares what gets stored on serialization)
18:18 timotimo that code about making attribute accessors more inlinable is already in nom
18:22 prammer joined #perl6
18:23 virtualsue joined #perl6
18:23 spider-mario joined #perl6
18:23 TreyHarris Liskov substitution is a problem, too; right now, if I do Klass.new(:attr('foo') :method('bar')), that doesn't work, and I can't do $obj.method = 42, but if attr is rw I can do $obj.attr = 42, so attributes are special
18:24 llfourn TreyHarris: you can make method is rw :)
18:27 [Coke] m: (^10e4).map({$_ => $_.uniname}).grep({.value~~/GOAT/}) # for someone in backscroll
18:27 camelia rakudo-moar 3176cb: ( no output )
18:27 [Coke] m: say (^10e4).map({$_ => $_.uniname}).grep({.value~~/GOAT/}) # for someone in backscroll
18:27 camelia rakudo-moar 3176cb: OUTPUT«(65672 => LINEAR B IDEOGRAM B107F SHE-GOAT 65673 => LINEAR B IDEOGRAM B107M HE-GOAT)␤»
18:29 llfourn nice goat matching
18:29 jnthn m: say chr(65672)
18:29 camelia rakudo-moar 3176cb: OUTPUT«????␤»
18:29 jnthn Aww
18:30 TreyHarris llfourn: that's what I thought, but https://gist.github.com/treyharris/3e813c150f86d993f07d isn't how it works... I don't see an example suggesting it would be used otherwise in the specs or docs but I may be blind (also, this isn't very useful obviously since you can't do anything but expose an lvalue by returning it)
18:30 timotimo you need to return-rw
18:30 TreyHarris oh, proxies... right. forgot about those.
18:30 timotimo alternatively no return at all
18:30 jnthn Hmm...it only sort of looks like a goat :)
18:32 BinGOs joined #perl6
18:32 * llfourn goes to bed
18:32 TreyHarris timotimo: but proxies are the only way to, say, internally store double the value assigned, right? and .new won't call methods regardless, or is there an adverb to make it do so?
18:32 wamba joined #perl6
18:34 timotimo you're right
18:36 aindilis joined #perl6
18:36 jnthn `has $.foo` means 3 things: 1) declare `has $!foo`, 2) set the meta-attribute's has_accessor property, and 3) at class composition time, if there isn't a method foo, generate a simple accessor method, paying attention to the `rw` trait
18:36 jnthn The things you can set in new pay attention to the property set in step 2
18:37 jnthn So you can write your own accessor method.
18:37 jnthn And it won't be a problem, 'cus we only generate such a method if you didn't write one yourself already.
18:38 timotimo a custom accessor method still won't allow every value assigned to it to land as "twice as much" in the attribute itself; except when building a Proxy for that
18:38 TreyHarris jnthn: right... so there's no way except for writing your own BUILD to have internal-state variables that are backends for attribute-like accessors including at construction time? Like, I want an Angle object to take either :degrees or :radians and respond to either .degrees or .radians in read or write?
18:38 jnthn TreyHarris: Yes, then you write your own BUILD
18:39 TreyHarris I see you can't multi on is rw, not that that would make sense unless is rw were special for multi dispatch
18:39 aindilis` joined #perl6
18:42 TreyHarris though it could have been, right? like there were an implicit is-rw boolean attached to every multi?
18:43 jnthn TreyHarris: For that use-case I'd probably make it something like class Angle { has $.radians; submethod BUILD(:$degrees, :$!radians = d2r($degrees)) { }; method degrees { d2r($!radians) }; sub d2r {... } } or so
18:44 jnthn TreyHarris: We don't really pass down context in Perl 6 in that way
18:44 jnthn You can differentiate on rw-ness if you're *receiving* something
18:45 TreyHarris jnthn: by any means other than a Proxy object?
18:45 jnthn TreyHarris: Well, I tend to regard using proxies a lot as a design smell.
18:46 jnthn I'd somehwat hope an Angle object would be immutable, so I don't see a need for it in that case
18:46 TreyHarris jnthn: agreed, but while I'm not a slave to the substitution principle, I'm a big fan of Liskov substitutability being easier than not
18:46 jnthn And I think more interesting objects are better designed in terms of methods expressing interesting behaviors.
18:47 renormalist joined #perl6
18:48 jnthn TreyHarris: I don't see where you demonstrated it being hard.
18:49 jnthn It's every bit as easy to factor out common code using roles, rather than turn to inheritance for that, though.
18:49 jnthn And easier the moment you want to compose two other bits of functionality.
18:49 jnthn So that gives a non-inheritance option for plenty of cases.
18:49 TreyHarris jnthn: right, but in general, changing some part of an object's internal representation from a storable one to a calculable one or vice versa should be possible without changing the code of consumers of the object. and it is, but not without proxies unless I'm missing something
18:50 TreyHarris unless you avoid from the start ever making the storable state available in "bare attribute" mode
18:51 renormalist If I want to re-write one of my modules into Perl6, are there conventions of how to name github repo and module name? Can it have the same name as its older Perl5 brother module?
18:52 TreyHarris renormalist: the github repo can't have the *same* name, no, not unless you define a master and a master-perl6 or somesuch, which would be weird. I've seen examples where the repo name is "Old-Name-p6"
18:53 renormalist TreyHarris: sure, understood. And the module itself in Perl world? With having a later CPAN upload in mind?
18:53 TreyHarris (Git doesn't treat the name "master" specially in any way except for in git init; GitHub, OTOH, does treat "master" specially as the branch to which pull requests are applied.)
18:54 TreyHarris renormalist: there are modules in the ecosystem with exactly the same name, yes; i wouldn't choose a new name just to do so. I'd personally ask if you were porting someone else's CPAN module before using precisely the same name for your own Perl 6 version, but I'm not sure if others would agree.
18:55 jnthn TreyHarris: Yes, in those cases you'd probably look to Proxy.
18:57 TreyHarris jnthn: since I like using attribute access over getter/setter methods, that's where it's, if not "hard", demonstrably "harder", and does add a code smell--and I don't think having an attribute-access API is a code smell, but transitively it would seem to be equivalent to one
18:57 renormalist I want a simple own module first, and have it the prototype for myself before doing the complicated ones. So, let's say, Acme::Foo will then exist twice in CPAN, just separated by their PAUSE subdir Perl6/, ok, I will try.
18:57 renormalist TreyHarris: thanks
18:58 jnthn TreyHarris: I think attribute-access APIs have their place but are vastly overused in the real world (I'm thinking where a Foo type comes along with a FooService or FooManager)
19:01 TreyHarris jnthn: agreed, and I think immutable value types are their best use case. You can avoid a proxy in that case, as you pointed out above, since all assignment is done at object creation time. you still do have to have a BUILD submethod, which makes inheritance dicier than if there were a way to declare getter/setter methods as callable by Mu.new, but that doesn't seem like a big deal.
19:02 TreyHarris jnthn: consider me convinced pragmatically but I reserve the right to re-argue the point in a year or two with some real-world experience under my belt :)
19:04 jnthn :-)
19:06 Skarsnik when is the next moar push version in rakudo? so I can install the 'not leaking' moar/rakudo on my dedicated server x)
19:08 TreyHarris jnthn: at one point (in an Apocolypse?) I recall that value types were specifically supported, but in synopses it looks like they're only glancingly supported by .WHICH and their users. There's also in S09 a "compact struct" described, but the syntax isn't given. Does that actually exist yet? Either way, am I correct that that's all the language support now for value types?
19:10 spider-mario joined #perl6
19:10 rurban joined #perl6
19:10 jnthn TreyHarris: Yeah, the WHICH thing needs more attention. We didn't get the compact structs yet in general; we do have support for inlined structs to some degree for the nativecall stuff
19:11 jnthn Skarsnik: I'll probably do one later this evening
19:16 TreyHarris jnthn: Thanks. Yeah, searching perl6/docs--which I hadn't had cloned before--showed me that. Is simply defining a multi method WHICH (Klass:D:) { ObjAt.new(.gist) } sufficient for now and likely forward-compatability? (And if so, shouldn't there really be a Value subtype of Mu that just defines that since it's just an incantation that should generally work?)
19:17 uruwi joined #perl6
19:17 TreyHarris er, I guess that would be a role
19:18 jnthn TreyHarris: It'll work for now, though I think we'll extend it in the future
19:18 jnthn In terms of marking things, it'd probably want doing with a trait on the meta-object rather than something visible on the type itself.
19:19 jnthn But, to be decided :)
19:20 TreyHarris wait, how does that syntax work? I was just cribbing from rakudo, but doesn't the signature (Klass:D:) mean that it's the meta-object and not the object that's the invocant of .gist?
19:21 TreyHarris oh... no, ignore me. I'm stoopid.
19:22 TreyHarris I was confused by my own generalization, if I'd written "(MyClass:D:)" I wouldn't have been, but I'm used to $klass holding a metaobject.
19:26 kjs_ joined #perl6
19:28 Hotkeys Why does rakudo-git require the jdk
19:29 timotimo Hotkeys: because you can build a jvm back-end, too
19:33 labster joined #perl6
19:35 Skarsnik jnthn, this fixed leak is crazy, my january rakudo: "After parsing :85.164 kb
19:35 Skarsnik ", with today rakudo and your patch "After parsing :71.620 kb" nearly 20% gain of memory just on the start
19:35 Hotkeys timotimo: oh right
19:35 Hotkeys I forgot that the jvm backend is a thing
19:35 timotimo Hotkeys: why it's a requirement and not a suggestion ... i dunno
19:36 Skarsnik these size are from /proc/pid/statm
19:37 jnthn Skarsnik: Crazy *good* yes? :)
19:37 azawawi joined #perl6
19:37 azawawi hi
19:37 yoleaux 27 Feb 2016 18:34Z <moritz> azawawi: cannot reproduce (re 403 for http://irclog.perlgeek.de/perl6/search); if the problem persists, please /msg me your public IP address
19:38 azawawi moritz: it is now working as expected... thanks :)
19:39 azawawi what's the best way to pass named parameters to a trait (i.e. ... is something(:p1(1), :p2(2)) )
19:43 itaipu joined #perl6
19:54 pierrot joined #perl6
20:03 prammer joined #perl6
20:06 uruwi_ joined #perl6
20:08 jnthn azawawi: You only get one argument to a trait really. You can write what you did, but you'll receive a list of pairs
20:08 jnthn (As the second arg)
20:09 FROGGS m: multi trait_mod:<is>(Routine $r, :$awesome!) { say $awesome }; sub foo is awesome(:yeah, :geez) { } # azawawi
20:09 camelia rakudo-moar 3176cb: OUTPUT«(yeah => True geez => True)␤»
20:10 FROGGS m: multi trait_mod:<is>(Routine $r, :$awesome!) { say (% = |$awesome) }; sub foo is awesome(:yeah, :geez) { } # azawawi
20:10 camelia rakudo-moar 3176cb: OUTPUT«geez => True, yeah => True␤»
20:12 azawawi jnthn: thanks
20:13 azawawi FROGGS++:)
20:13 sortiz joined #perl6
20:14 sortiz \o #perl6
20:14 yoleaux 16:19Z <japhb> sortiz: Great, thank you, I'll rebuild-all and see if DBIish install is fixed
20:15 prammer joined #perl6
20:19 themonkeybob11 joined #perl6
20:19 prammer joined #perl6
20:21 QORRiE joined #perl6
20:22 prammer joined #perl6
20:24 kjs_ joined #perl6
20:26 virtualsue joined #perl6
20:29 prammer joined #perl6
20:30 azawawi FROGGS: ping
20:30 labster joined #perl6
20:31 azawawi FROGGS: https://github.com/azawawi/perl6-memoize/blob/master/t/01-load.t#L36    # tests
20:31 azawawi FROGGS: https://github.com/azawawi/perl6-memoize/blob/master/lib/Memoize.pm6#L7  # trait implementation
20:32 FROGGS hmmm
20:32 FROGGS is this still problematic in Perl 6?
20:32 FROGGS https://github.com/azawawi/perl6-memoize/blob/master/lib/Memoize.pm6#L9
20:32 FROGGS jnthn: ^^
20:32 vendethiel huh, that was a pretty sad blogpost to read.
20:32 FROGGS I know that this caused a lot of bug hunting work for me with Perl 5...
20:34 FROGGS m: sub foo($bar) { my $baz = 42 if $bar; say $baz }; foo 0; foo 1; foo 0
20:34 camelia rakudo-moar 3176cb: OUTPUT«(Any)␤42␤(Any)␤»
20:34 FROGGS okay, seems to work better than in Perl 5
20:34 mst FROGGS: is what problematic?
20:34 vendethiel FROGGS: but hunting with Perl 5? :o
20:34 FROGGS m: sub foo($bar) { my $baz = 42 if $bar; say $baz }; foo 1; foo 0
20:34 camelia rakudo-moar 3176cb: OUTPUT«42␤(Any)␤»
20:35 FROGGS vendethiel: bug* :P
20:35 vendethiel FROGGS: bug hunting with Perl 5? :o
20:35 FROGGS mst: a statement modifying condition on a declaration
20:35 FROGGS mst: it acts like a state variable
20:36 mst ah
20:36 jnthn FROGGS: I don't think it acts like state accidentaly in Perl 6, no :)
20:36 FROGGS which was not what I intended
20:36 jnthn At least, I sure hope not :)
20:36 FROGGS jnthn: yes, which is a relief
20:37 jnthn :)
20:37 azawawi FROGGS: anyway, that's 'is memoized'  with simple LRU cache eviction :)
20:37 FROGGS just had one of these in my middleware service (Perl 5) a week ago
20:37 FROGGS azawawi: it reads nicely I think :o)
20:43 Ven joined #perl6
20:44 azawawi so what is a better name than 'is memoized' other than 'is cached' in your opinion?
20:45 Skarsnik is azawawied
20:46 perlpilot "memoized" is an excellent name IMHO
20:46 Skarsnik guess_library_name in NC could be cached I think x)
20:47 azawawi Skarsnik: :)
20:47 perlpilot azawawi: it would be interesting if you could pass the thing that handles the caching as a parameter, but perhaps only as an academic exercise.
20:48 prammer joined #perl6
20:48 azawawi perlpilot: cool
20:49 azawawi #TODO cache eviction should be done if needed in another thread every N seconds :)
20:50 azawawi is unforgettable  :)
20:50 dalek nqp: d8dab2f | jnthn++ | tools/build/MOAR_REVISION:
20:50 dalek nqp: Bump for MoarVM memory fix.
20:50 dalek nqp: review: https://github.com/perl6/nqp/commit/d8dab2f3c3
20:52 dalek rakudo/nom: 855de77 | jnthn++ | tools/build/NQP_REVISION:
20:52 dalek rakudo/nom: Bump for MoarVM memory fix.
20:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/855de77b22
20:52 jnthn Skarsnik: There's the bump
20:52 jnthn Skarsnik: Didn't get the other thing I was working on done :)
20:52 Ven joined #perl6
20:53 Skarsnik Well you are forgiven! It weird nobody get bothered by it before
20:58 SCHAAP137 joined #perl6
21:00 jnthn :)
21:03 sortiz azawawi, IMO any trait of this kind should check that the Routine 'is pure' also, for completeness.
21:04 jnthn Well, arguably if you're sticking "is memoized" on it then you're stating that it makes sense
21:04 jnthn is pure doesn't actually check anything
21:04 jnthn It just means "if you constant-fold me at compile time, then it's fine", and other such things :)
21:07 sortiz I know that 'is pure' right now don't have much semantic, but can be an opportunity to give them some, like "I'm a candidate to memoization", or can be the other side: if "is memoized", imply that "is pure" :)
21:08 timotimo is pure on the optimizer does a tiny bit of stuff
21:09 timotimo er, i mean, the optimizer inspects subs for pureness in some cases
21:10 sortiz And in time that can be extended, I suppose. So that can promote, one way or the other, its use.
21:11 azawawi sortiz: is memoized/cached were created to get faster execution time. That's their main objective :)
21:12 timotimo i think for optimize-time-evaluation
21:13 eiro joined #perl6
21:14 sortiz azawawi, I understand, my comment is about semantic closure, ie the 'is memoize' trait imply 'is pure', that can be asserted or auto applied, that's my point.
21:16 azawawi sortiz: PRs are more than welcome :)
21:17 TEttinger joined #perl6
21:19 dalek rakudo-star-daily: 750fe88 | coke++ | log/ (9 files):
21:19 dalek rakudo-star-daily: today (automated commit)
21:19 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/750fe88a1b
21:20 tmch joined #perl6
21:25 azawawi good night everyone and thanks :)
21:29 jnthn Time for me to rest also :) Enjoy the speed-ups/leak fixes :) o/
21:30 sortiz o/ jnthn
21:34 sno joined #perl6
21:36 [Coke] (rakudo-git requires jvm) only if you configure it to build the jvm.
21:36 [Coke] *on the
21:36 [Coke] which you might have done accidentally in the Configure step
22:00 prammer joined #perl6
22:08 itaipu joined #perl6
22:14 itaipu joined #perl6
22:16 bjz joined #perl6
22:21 rudi_s Hi. How can I "cast" an argument. I have for example (1,2,3) and I want to pass it to a function which takes a Int @foo.
22:24 bjz joined #perl6
22:26 timotimo assign to the right kind of container
22:27 timotimo blah_func(my Int @ = (1, 2, 3))
22:39 vendethiel joined #perl6
22:41 timotimo https://www.youtube.com/watch?v=IvUU8joBb1Q - what a beautiful contraption
22:42 tardisx joined #perl6
22:42 rudi_s timotimo: Thank you.
22:43 pdcawley joined #perl6
22:56 virtualsue joined #perl6
23:02 vendethiel joined #perl6
23:07 FreezerburnV joined #perl6
23:14 itaipu joined #perl6
23:16 lucs timotimo: Have you seen this one?: https://youtu.be/lHdcjW3bDTk
23:16 musca joined #perl6
23:17 timotimo yeah, that one's not real, though
23:18 lucs Aw, you knew ;)
23:19 timotimo a year ago my dad sent it to me and i was legit wondering if he knew it was computer animation
23:19 lucs Yeah, even though it is, it's pretty neat.
23:20 timotimo yeah
23:20 timotimo i appreciate the actually-built one a bit more, though. it has the catchier track playing on it
23:22 lucs You probably know Stephen Malinowski's Music Animation Machine videos?
23:25 timotimo not sure
23:26 lucs Example: https://youtu.be/yojDu3E9jls
23:26 lucs He came up with a lot of different visualization techniques.
23:27 timotimo pretty!
23:36 themonkeybob11 joined #perl6
23:50 vendethiel joined #perl6
23:53 themonkeybob11 joined #perl6
23:54 virtualsue joined #perl6

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

Perl 6 | Reference Documentation | Rakudo