Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-11-17

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:09 felher joined #perl6
00:14 felher_ joined #perl6
00:20 hoelzro colomon: did you happen to file a bug report for that bug your found?
00:22 colomon hoelzro: no
00:27 tinyblak_ joined #perl6
00:27 hoelzro ah, ok
00:27 hoelzro do you know why it's not working?
00:27 hoelzro or just that I broke it? =P
00:38 kurahaupo joined #perl6
00:40 tinyblak joined #perl6
01:01 kurahaupo joined #perl6
01:04 dayangkun joined #perl6
01:09 tinyblak_ joined #perl6
01:17 dalek ecosystem: cb077e2 | (David Farrell)++ | META.list:
01:17 dalek ecosystem: Added System-Passwd
01:17 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/cb077e2c5f
01:22 tinyblak joined #perl6
01:32 kurahaupo1 joined #perl6
01:41 raiph joined #perl6
01:42 erkan joined #perl6
01:50 colomon hoelzro: I've not the faintest idea why it's not working.  I just know your commit broke it.  (Or perhaps as likely, made the otherwise hidden brokeness show up.)
02:02 zakharyas joined #perl6
02:04 xinming joined #perl6
02:06 raiph FROGGS++ # p6 overload constant in a trice
02:12 immortal joined #perl6
02:16 xinming joined #perl6
02:28 chenryn joined #perl6
02:29 adu joined #perl6
02:37 erkan joined #perl6
02:39 dalek ecosystem: 495db61 | (David Farrell)++ | META.list:
02:39 dalek ecosystem: Added Software-License
02:39 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/495db6101d
02:52 AlexDaniel joined #perl6
02:54 chenryn joined #perl6
02:55 AlexDaniel Hi! I just installed rakudo from debian repos, wrote a simple hello world program (just say 'hello world';) and was surprised that it takes 7 seconds to execute. It feels like it spends most of the time just starting up, is there any way to make it faster?
02:58 perltricks AlexDaniel: it might be an older version of Rakudo. Have you tried downloading Rakudo Star?
02:58 AlexDaniel apt-cache policy rakudo says  *** 2014.07-4 0
02:58 AlexDaniel which is old, right?
02:59 perltricks what is the output if you type this in the terminal: time perl6 -e 'say "Hello World"';
03:02 AlexDaniel hm, that's faster
03:02 japhb AlexDaniel: What is the output of `perl6 -v`?
03:03 AlexDaniel perltricks: real0m1.278s; user0m1.112s; sys0m0.116s
03:03 AlexDaniel japhb: This is perl6 version 2014.07 built on parrot 6.6.0 revision 0
03:03 japhb Oh yeah, that's a large part of the problem.
03:04 ugexe AlexDaniel: what OS are you on
03:04 japhb That's 3-4 months old, and on a VM known to have slow startup (not as slow as JVM, mind you, but not as fast as MoarVM).
03:05 AlexDaniel I'm on debian unstable
03:05 perltricks AlexDaniel: d/l http://rakudo.org/downloads/star/rakudo-star-2014.09.tar.gz
03:05 japhb AlexDaniel: You may want to just build and install from source, or get and build a recent Rakudo Star from the Rakudo downloads site
03:05 AlexDaniel perltricks: yea-yea, already did :)
03:05 ugexe alternatively you can use rakudobrew https://github.com/tadzik/rakudobrew
03:05 AlexDaniel Um, guys, I just noticed something
03:05 AlexDaniel hold on...
03:06 * japhb wishes we could get Debian to update, rather than having to explain to people how to get something recent.
03:06 ugexe if debian would update it would make travis testing modules way more realistic
03:07 japhb I can understand having testing behind -- by design, that lag will happen.  But the whole point of unstable is to be current.  :-/
03:08 AlexDaniel Hmm, I was testing it inside a folder that is mounted with sshfs. So if I run it on my local hard drive, I get exactly the same 1.5s result.
03:08 AlexDaniel why would that matter
03:08 AlexDaniel no, seriously. What kind of file system operations is it trying to perform?
03:09 ugexe lot of file system work has been done since 2014-09 i believe
03:09 japhb AlexDaniel: There's some searching for module library locations, loading .so's if needed, etc.  But ugexe is right ... there was a lot of work in the last few months about reducing startup, and FS ops was part of that.
03:10 AlexDaniel okay, so I'll just update then
03:10 AlexDaniel oh, so what should I use then?
03:10 ugexe try using the other vms as well
03:10 AlexDaniel parrot or moarvm?
03:11 japhb moarvm
03:11 japhb Plus moarvm has better async I/O and concurrency support
03:12 AlexDaniel yea I see
03:12 perltricks AlexDaniel: as a benchmark, on my old Mac with moarvm and the latest Rakudo build, the real is 0.427s
03:13 AlexDaniel Hmm, I just felt like Parrot is the recommended choice. Don't know why
03:13 AlexDaniel maybe because it is first on every list everywhere
03:14 perltricks yeah it's got more history than the JVM and moarvm builds. And more baggage too :)
03:21 firefish5000 joined #perl6
03:28 AlexDaniel Well, yeah, it is really fast now if I run it locally
03:29 AlexDaniel and 0m6.342s otherwise
03:29 AlexDaniel which is 1 second faster, indeed
03:29 AlexDaniel :\
03:43 AlexDaniel Any Emacs users here? I've read that cperl mode should work pretty well with perl6, but apparently it does not. Perhaps I'm using too old version? Or maybe I should use something else?
03:50 telex joined #perl6
04:04 rmgk_ joined #perl6
04:04 yeahnoob joined #perl6
04:06 jdv79 no HTML::TreeBuilder type p6 modules yet?
04:07 anaeem1_ joined #perl6
04:07 erkan joined #perl6
04:15 anaeem1 joined #perl6
04:23 yeahnoob I thought Perl6 currently is in the stage of "Language Specification Implementation", not in a "Module/Library Expanding" stage.
04:25 kaare_ joined #perl6
04:28 ugexe xml, xml::query, html::xml::parser
04:32 AlexDaniel what is the alternative to [^abc] ? It seems like <[^abc]> does not work
04:34 adu joined #perl6
04:35 AlexDaniel oh, <-[abc]> I guess
04:57 chenryn joined #perl6
05:03 Mouq joined #perl6
05:03 chenryn joined #perl6
05:03 chenryn joined #perl6
05:04 chenryn joined #perl6
05:05 chenryn joined #perl6
05:05 chenryn joined #perl6
05:06 chenryn joined #perl6
05:06 chenryn joined #perl6
05:07 chenryn joined #perl6
05:08 chenryn joined #perl6
05:08 chenryn joined #perl6
05:09 chenryn joined #perl6
05:09 chenryn joined #perl6
05:10 chenryn joined #perl6
05:11 chenryn joined #perl6
05:11 chenryn joined #perl6
05:12 chenryn joined #perl6
05:12 chenryn joined #perl6
05:13 chenryn joined #perl6
05:14 chenryn joined #perl6
05:14 chenryn joined #perl6
05:26 Mouq .tell AlexDaniel https://github.com/lue/p6mode
05:26 yoleaux Mouq: I'll pass your message to AlexDaniel.
05:34 ptc_p6 joined #perl6
05:47 kaare_ joined #perl6
05:53 dalek nqp/longlit: 4f1b3f0 | TimToady++ | src/QRegex/ (2 files):
05:53 dalek nqp/longlit: make ltm work on regex modifiers
05:53 dalek nqp/longlit: review: https://github.com/perl6/nqp/commit/4f1b3f020a
05:53 dalek rakudo/longlit: 7bb3656 | TimToady++ | src/Perl6/Actions.nqp:
05:53 dalek rakudo/longlit: force <.foo> to call method even if sub declared
05:53 dalek rakudo/longlit: review: https://github.com/rakudo/rakudo/commit/7bb36563ad
06:01 chenryn joined #perl6
06:35 firefish5000 joined #perl6
06:38 jack_rabbit joined #perl6
07:02 kaleem joined #perl6
07:06 gfldex joined #perl6
07:11 dalek nqp: f4c6cbc | TimToady++ | src/QRegex/NFA.nqp:
07:11 dalek nqp: correctly propagate longlit info in NFAs
07:11 dalek nqp: review: https://github.com/perl6/nqp/commit/f4c6cbcb1d
07:11 dalek nqp: 4f1b3f0 | TimToady++ | src/QRegex/ (2 files):
07:11 dalek nqp: make ltm work on regex modifiers
07:11 dalek nqp: review: https://github.com/perl6/nqp/commit/4f1b3f020a
07:11 dalek nqp: 68dfa22 | TimToady++ | / (6 files):
07:11 dalek nqp: Merge branch 'master' into longlit
07:11 dalek nqp: review: https://github.com/perl6/nqp/commit/68dfa222a2
07:14 dalek rakudo/longlit: ef6924e | TimToady++ | src/Perl6/Actions.nqp:
07:14 dalek rakudo/longlit: nqp wants 1/0, not True/False
07:14 dalek rakudo/longlit: review: https://github.com/rakudo/rakudo/commit/ef6924e894
07:14 erkan joined #perl6
07:15 travis-ci joined #perl6
07:15 travis-ci NQP build failed. TimToady 'Merge branch 'master' into longlit'
07:15 travis-ci http://travis-ci.org/perl6/nqp/builds/41217953 https://github.com/perl6/nqp/compare/fd8e5ed403cd...68dfa222a290
07:15 travis-ci left #perl6
07:16 dalek rakudo/nom: 7137b21 | TimToady++ | src/Perl6/Actions.nqp:
07:16 dalek rakudo/nom: replace INDRULE with var carrying actual coderef
07:16 dalek rakudo/nom:
07:16 dalek rakudo/nom: This is so that the nfa routines can call .NFA on the coderef to extract
07:16 dalek rakudo/nom: the NFA and merge properly when <foo> refers to a lexical regex.
07:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7137b213f8
07:16 dalek rakudo/nom: 4da5e49 | TimToady++ | src/Perl6/Grammar.nqp:
07:16 dalek rakudo/nom: coloncircumfix was stealing :() pseudo-sigs
07:16 dalek rakudo/nom:
07:16 dalek rakudo/nom: (This was due to the new longest-literal tiebreaking rule.)
07:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4da5e49f6a
07:16 dalek rakudo/nom: 5f5ddb4 | TimToady++ | src/Perl6/ (2 files):
07:16 dalek rakudo/nom: <?{}> parse depended on non-lltm ordering
07:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5f5ddb48f2
07:16 dalek rakudo/nom: 7bb3656 | TimToady++ | src/Perl6/Actions.nqp:
07:16 dalek rakudo/nom: force <.foo> to call method even if sub declared
07:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7bb36563ad
07:16 dalek rakudo/nom: ef6924e | TimToady++ | src/Perl6/Actions.nqp:
07:16 dalek rakudo/nom: nqp wants 1/0, not True/False
07:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ef6924e894
07:16 dalek rakudo/nom: 4d80624 | TimToady++ | / (38 files):
07:16 dalek rakudo/nom: Merge branch 'nom' into longlit
07:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4d806242fa
07:16 dalek roast: 3426474 | TimToady++ | S05- (2 files):
07:16 dalek roast: modify tests that assume <.foo> can call sub
07:16 dalek roast: review: https://github.com/perl6/roast/commit/34264741b5
07:17 Mouq TimToady: Does NQP need a Moar revision bump?
07:17 TimToady oh, probably
07:18 TimToady as well as an nqp bump
07:19 TimToady hmm, could sworn I had a script somewhere to do that...
07:21 travis-ci joined #perl6
07:21 travis-ci Rakudo build failed. TimToady 'Merge branch 'nom' into longlit'
07:21 travis-ci http://travis-ci.org/rakudo/rakudo/builds/41218173 https://github.com/rakudo/rakudo/compare/38e77b645bb3...4d806242faa2
07:21 travis-ci left #perl6
07:21 dalek nqp: 4c2e52a | TimToady++ | tools/build/MOAR_REVISION:
07:21 dalek nqp: bump moar rev
07:21 dalek nqp: review: https://github.com/perl6/nqp/commit/4c2e52af97
07:22 dalek rakudo/nom: 48edaa3 | TimToady++ | tools/build/NQP_REVISION:
07:22 dalek rakudo/nom: bump nqp rev
07:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/48edaa3a7c
07:23 TimToady there, hope I did it right--haven't bumped revs in months...
07:24 TimToady now to pull it all down and test on a different machine
07:25 travis-ci joined #perl6
07:25 travis-ci NQP build passed. TimToady 'bump moar rev'
07:25 travis-ci http://travis-ci.org/perl6/nqp/builds/41218445 https://github.com/perl6/nqp/compare/68dfa222a290...4c2e52af9706
07:25 travis-ci left #perl6
07:25 Mouq TimToady++
07:30 travis-ci joined #perl6
07:30 travis-ci Rakudo build passed. TimToady 'bump nqp rev'
07:30 travis-ci http://travis-ci.org/rakudo/rakudo/builds/41218522 https://github.com/rakudo/rakudo/compare/4d806242faa2...48edaa3a7c1c
07:30 travis-ci left #perl6
07:35 TimToady took me more than a week to implement a single line of the spec, S05:37
07:35 synopsebot Link: http://perlcabal.org/syn/S05.html#line_37
07:38 lizmat TimToady++  :-)
07:39 woolfy left #perl6
07:40 lue joined #perl6
07:41 zakharyas joined #perl6
07:42 FROGGS joined #perl6
07:42 TimToady but I could just see it was one of those things that nobody else would do if I didn't :)
07:43 FROGGS TimToady++
07:43 FROGGS also, good morning
07:43 TimToady still 17 minutes till morning here :)
07:45 FROGGS clearly it depends on the definition of 'morning'
07:45 jimmy_ joined #perl6
07:46 jimmy_ TimToady: I could't understand that line without a test or example :(
07:47 zakharyas joined #perl6
07:47 lizmat commute to venue&
07:49 JimmyZ hmm, maybe I understand now ...
07:49 chenryn joined #perl6
07:51 TimToady for instance, we have an 'if' keyword that has two literal characters, and a listop rule that recognizes the same word with \w and such
07:51 TimToady the literal 'if' is more specific than \w+, so we pick that if the two rules come out to the same longest token by the first rule
07:52 TimToady before this fix, you had to be careful to put the rules into the right order
07:52 FROGGS which makes some look aheads obsolete now that it is implemented :o)
07:52 TimToady potentially
07:53 nine Perl 6 is travelling backwards in time!
07:54 nine It went from "release date will be announced at FOSDEM" to "will be released at FOSDEM" to "at FOSDEM Larry will say that it is production ready" in just a week...
07:55 FROGGS O.o
07:55 JimmyZ Oh, It means rakudo can be aligned a bit more with STD
07:56 FROGGS maybe he will state that it was already done last Christmas :o)
07:56 nine The christmas before that ;)
07:56 FROGGS perhaps...
07:57 * FROGGS .oO( The Perl 6 Of Christmas Past' )
07:57 FROGGS btw, I always favoured a book with the title - "Perl 6 - A Christmas Carol"
08:03 rurban joined #perl6
08:05 masak mornings, #perl6
08:06 JimmyZ Perl 6 - the rakudo way to Christmas!
08:06 JimmyZ morning, masak!
08:06 FROGGS morning one of the masaks
08:11 darutoko joined #perl6
08:18 sergot moritz++ # I will fix this, thanks!
08:20 masak FROGGS: a little inspired by one of Stanisław Lem's short stories, we label ourselves Monday..Sunday. that also helps us keep track of whose turn it is to work that day.
08:24 lizmat joined #perl6
08:25 pdcawley joined #perl6
08:25 FROGGS masak: I hope there is enough room on the sofa for the other six :o)
08:26 masak sofa + chairs + floors work fine.
08:37 kurahaupo joined #perl6
08:39 yeahnoob joined #perl6
08:45 virtualsue joined #perl6
08:46 ghostlines joined #perl6
08:46 salv0 joined #perl6
08:47 ptc_p6 joined #perl6
08:51 denis_boyun_ joined #perl6
08:51 molaf_ joined #perl6
08:59 masak Perl 5 regexes. I feel efficient and somehow dirty at the same time when using them.
08:59 tinyblak joined #perl6
09:01 immortal joined #perl6
09:01 immortal joined #perl6
09:03 lizmat m: my @a = do for ^10 { state $a; last if $a++ > 5; $a }; say @a   # huh ???
09:03 camelia rakudo-moar 48edaa: OUTPUT«7 7 7 7 7 7␤»
09:03 lizmat m: my @a = do for ^10 { state $a; $a++; $a }; say @a
09:03 camelia rakudo-moar 48edaa: OUTPUT«10 10 10 10 10 10 10 10 10 10␤»
09:04 lizmat m: my @a = do for ^10 { state $a; $a++; +$a }; say @a
09:04 camelia rakudo-moar 48edaa: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
09:04 moritz lizmat: it's always returning $a
09:04 KCL_ joined #perl6
09:04 moritz lizmat: the container, not the value
09:04 moritz lizmat: and there's only one $a
09:05 FROGGS m: my @a = do for ^10 { state $a; last if $a++ > 5; say $a; $a }; say @a # maybe that shows it better
09:05 camelia rakudo-moar 48edaa: OUTPUT«1␤2␤3␤4␤5␤6␤7 7 7 7 7 7␤»
09:06 jluis joined #perl6
09:06 masak m: my @a = do for ^10 { state $a; last if $a++ > 5; 0 + $a }; say @a
09:06 camelia rakudo-moar 48edaa: OUTPUT«1 2 3 4 5 6␤»
09:06 masak m: my @a = do for ^10 { state $a; last if $a++ > 5; +$a }; say @a
09:06 camelia rakudo-moar 48edaa: OUTPUT«1 2 3 4 5 6␤»
09:07 FROGGS in `last if $a++ > 5;` it feels like the `last` intercepts the postincrement
09:07 masak I wonder why "it's the container, not the value!" becomes so much of a talking point in (some corners of) Perl 6, but not so much in other languages I deal with on a daily basis.
09:10 arnsholt All of the upboats to everyone who made the Rakudo NQP Internals course happen
09:10 JimmyZ joined #perl6
09:10 arnsholt My Python project would be so screwed without it
09:10 * lizmat is glad to hear it  :-)
09:12 arnsholt I mean, I could probably figure out this stuff from the NQP and Rakudo sources, but figuring out how to do metamodel stuff purely from that wouldn't be very -Ofun
09:12 arnsholt And then the project would stop =)
09:15 lizmat m: my @a = do for ^10 { state $a; $a++; nqp::decont($a) }; say @a   # point taken  :-)
09:15 camelia rakudo-moar 48edaa: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
09:18 osfameron joined #perl6
09:18 * osfameron waves
09:19 masak lizmat: ...but don't do that in user-facing code ;)
09:19 masak in fact, I think we should avoid it in the core setting, too.
09:19 lizmat $ ack nqp::decont src/core | wc -l
09:19 lizmat 203
09:19 lizmat a nice project  :-)
09:20 masak to the extent that the core setting should serve as readable/inspirational examples of good Perl 6 programming practice for curious readers, and not an exercise in manual optimization.
09:20 JimmyZ so it needs remove all nqp::xxx ?
09:21 lizmat masak: I think that goal is unattainable
09:21 moritz JimmyZ: no
09:21 masak it would be an interesting exercise to find out (a) which of those instances of nqp::decont are there to make spectests pass, and (b) how much removing all of the rest affects Rakudo performance today.
09:21 lizmat osfameron o/
09:21 lizmat (and in the right channel)  :-)
09:22 tinyblak joined #perl6
09:22 osfameron heh :-)  I did think the perl.org #perl6 seemed a bit underpopulated
09:23 masak we're small, but not *that* small.
09:23 lizmat osfameron:  yeah...  :-)
09:23 * osfameron is vaguely planning a Perl6 christmas project
09:24 osfameron thinking of porting one of my WIP modules.  Either MooX::Zippable, or Open311::Endpoint.
09:25 dakkar joined #perl6
09:26 lizmat ++osfameron
09:27 osfameron former would be interesting for playing with the OO stuffs, latter might be useful as a realworld example.
09:27 FROGGS osfameron: what do both modules do?
09:28 moritz osfameron: what's Open311::Endpoint? I can't find it on CPAN
09:28 moritz and then name doesn't tell me anything either
09:28 osfameron indeed, they're both WIP, 1 sec
09:29 osfameron O311::E is a webservice implementing Open311 (to let people report civic problems to government authorities) https://github.com/mysociety/fixmystreet/blob/master/perllib/Open311/Endpoint.pm
09:30 osfameron and Zippable is a zipper implementation to let you efficiently traverse and update complex object structures purely functionally https://github.com/osfameron/MooX-Zippable
09:30 FROGGS nice :o)
09:36 fhelmberger joined #perl6
09:41 masak I think Zippable was what I saw a YAPC::EU talk about this year.
09:45 osfameron yes, that's right
09:45 osfameron I haven't actually had any time to work on the module since then...)
09:57 alexghacker joined #perl6
09:59 masak nwc10: you may or may not have seen http://www.i-programmer.info/news/98-languages/6810-was-python-3-a-mistake.html
09:59 masak and https://alexgaynor.net/2013/dec/30/about-python-3/
10:01 nwc10 I'd seen the latter
10:01 nwc10 not the former
10:02 nwc10 oh, disappointment
10:02 nwc10 it only has the raw answer results
10:02 nwc10 not correlation between the answers
10:05 masak oh, point.
10:05 masak that would have been highly useful.
10:08 pdcawley joined #perl6
10:08 lizmat pdcawley o/
10:08 lizmat lunch&
10:08 pdcawley lizmat: o/
10:09 rindolf joined #perl6
10:09 espadrine_ joined #perl6
10:11 erkan joined #perl6
10:11 erkan joined #perl6
10:17 osfameron our datapoint for python 2/3 is that @dracos likes 'six' (compatibility library for python 2 to give it various py3 features) so our code in general targets both
10:19 nwc10 osfameron: remember that I'm an outside observer in all this. You have more experience than I do
10:19 nwc10 but it seems that six is sane, and the approach you describe is sane
10:20 nwc10 however, there's a massive lag between when Python 3 first appeared, and when six appeared
10:21 espadrine_ joined #perl6
10:21 osfameron yeah, I'm not much of a python developer either, but occasionally hack on some project using it
10:22 Ugator1 joined #perl6
10:22 osfameron this article calls the subset of pythong that works in 2 and 3 "python X" https://medium.com/@thezerobit/python-3-is-killing-python-5d2ad703365d
10:23 masak interesting.
10:23 masak I have heard of six, and I tend to recommend it as a sane option in my Python courses.
10:23 osfameron (it's a controversial post, there are various rebuttals around.)
10:23 masak and it's moved to http://blog.thezerobit.com/2014/05/25/python-3-is-killing-python.html, apparently.
10:24 nwc10 osfameron: it's also a "someone [else] should do this" post
10:24 Ugator left #perl6
10:24 nwc10 I don't know if it was him, but someone set up a (logged) IRC channel for "what should be in 2.8?"
10:24 nwc10 and the channel fizzles out
10:24 nwc10 but it was clear from what I read of the channel, that the sensible folks on it couldn't work out a useful answer
10:26 nwc10 I'm wondering how easy it is these days to get useful pypi download stats, and hence repeat Alex Gaynor's analysis
10:26 masak cf. all the projects over the years that have gone "no, no, Perl 6 is going about this all wrong, here's what we should..." *fizzle*
10:26 masak at least Perl 6 has tenacity going for it.
10:27 pecastro joined #perl6
10:27 nwc10 masak: I'm not aware of any projects saying that other than Py3k
10:28 nwc10 and the basic idea of py3k was sensible
10:28 nwc10 and really it's mostly hindsight which has shown its flaws
10:28 masak I was thinking of things like p2 and rindolf.
10:28 nwc10 aha
10:28 masak and moe, ish.
10:29 TuxCM joined #perl6
10:31 Ugator joined #perl6
10:32 masak oh, and perl5i -- is that still active?
10:33 rurban not really
10:33 FROGGS what about that rperl?
10:33 rurban very active
10:34 rurban but not related to perl6 that much
10:34 FROGGS yeah, I know...
10:34 peterete1 hat does "very active" mean regarding rperl?
10:34 FROGGS peterete1: that: https://github.com/wbraswell/rperl/graphs/contributors
10:35 tinyblak_ joined #perl6
10:35 rurban look at #perl11
10:35 * masak would think it'd be interesting with a Perl 5 on NQP
10:36 rurban well, nqp is a bit too slow still to be attractive
10:37 peterete1 I wonder if/when they'll smoke it against CPAN
10:37 moritz it'd just make compilation a bit slower
10:37 rurban but the nqp in https://github.com/fperrad/tvmjit would be
10:43 virtualsue joined #perl6
10:46 sqirrel__ joined #perl6
10:46 rurban joined #perl6
10:46 arnsholt masak: I agree. I don't think I want to be the one to replicate all of the smoke and mirrors in the parsing though =)
10:47 masak that's a good point.
10:47 masak maybe it could be a "sane subset", though.
10:47 arnsholt Yeah, that's a starting point
10:48 arnsholt Maybe the easiest way would be to implement a yaccalike in NQP and port the perl5 yacc code to that
10:49 masak ooh, like a yacc->nqp compiler?
10:49 arnsholt Yep
10:49 * masak almost said "transpiler"
10:49 arnsholt Then you "only" have to port the C parts of the Perl 5 code to NQP too =)
10:49 dsm joined #perl6
10:50 masak right.
10:53 lizmat joined #perl6
10:57 dsm if I call the nqp::encode function in MoarVM back-end, does MVM_string_encode function called somehow?
10:58 lizmat that would make sense, I think, but only code viewing would give you a real answer
10:58 lizmat m: my $a = Mu  # shouldn't this give a typecheck failure ?
10:58 camelia rakudo-moar 48edaa: ( no output )
10:58 nwc10 Moe started from a "sane subset". How does one avoid ending up where it did?
10:59 dsm if I want to add another character encoding set, should I write a encoding.c and encoding.h files in MoarVM/src/strings?
11:02 FROGGS dsm: you may want to add it to https://github.com/sergot/perl6-encode/
11:04 immortal joined #perl6
11:04 dsm thanks
11:10 jnthn lizmat: No, the default type constraint is Mu. It's the default *value* that is Any
11:10 lizmat ah, yes, of course  :-)
11:12 jnthn dsm: That's how you'd add it in MoarVM, plus you'd need to give it an entry in a couple of lookup/switch statements in src/strings/ops.c iirc
11:16 dsm okay thank you.
11:18 jnthn commute &
11:24 dsm lol
11:24 FROGGS NO LOL :P
11:25 daxim joined #perl6
11:28 Mso150 joined #perl6
11:31 tadzik :D
11:38 chenryn joined #perl6
11:44 chenryn joined #perl6
11:52 arnsholt masak: Heck, if you're clever enough it might be possible to do the yacc-ing in such a way that most of the things can be handled as a standard grammar things and the crazy stuff as custom-generated methods in the grammar
12:02 smls joined #perl6
12:04 smls re http://irclog.perlgeek.de/perl6/2014-11-17#i_9672813 -- so, the block of a for loop is automatically considered "is rw"?
12:04 smls What's the reasoning for that design?
12:05 masak things like `for @chars { .=uc }`
12:05 smls Well but you have to explicitly say "is rw" in case of a subroutine, and with good reason I think - because that behavior is unintuitive unless you really want it.
12:06 smls I wonder if it's a design decision that was made before using loops as an expressions with a return list was a thing, and should be revisited.
12:06 masak oh, you mean the return value of the block. I see.
12:07 masak I can't say I have a sensible/consistent opinion about that.
12:09 smls Yeah, I mean the return value. The rw-ness of parameters is independent of that.
12:12 pdcawley joined #perl6
12:13 smls m: my @a = (^10).map: { state $a; $a++; $a }; say @a
12:13 camelia rakudo-moar 48edaa: OUTPUT«10 10 10 10 10 10 10 10 10 10␤»
12:13 smls m: (^10).map({ state $a; $a++; $a }).say
12:13 camelia rakudo-moar 48edaa: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
12:13 masak this decontainerization business has been up for discussion before. there are RT tickets about it.
12:14 masak I bet pmichaud would have something coherent to say about it.
12:15 smls ^^ Why does it not happen when constructing a Parcel instead of assigning to an Array, tough?
12:15 smls *though
12:18 smls Let's hope the GLR will make everything awesome and easy to understand... :)
12:22 masak because a Parcel is Perl 6's version of references.
12:23 masak m: my $x = 5; my $y = \$x; say $y.WHAT
12:23 camelia rakudo-moar 48edaa: OUTPUT«(Capture)␤»
12:23 masak hm. :)
12:23 masak ...or maybe it was Captures.
12:23 smls :)
12:27 lizmat this just on the NPW: deploying perl to heroku  http://goo.gl/GfN81w
12:27 smls I came across an old document once that advertised early Perl 6 "Captures" as Perl 5 references on steroids...
12:27 * masak would like to deploy Perl 6 to heroku, too
12:27 lizmat look at the last slides: it's about deploying rakudo to heroku
12:27 smls But I was under the impression that they have evolved in a different direction, and the roles of P5's references are now fulfiled by the container system, binding, and opque objects.
12:27 lizmat there's a buildpack for it now
12:27 masak lizmat: ooh!
12:27 moritz smls: that's correct
12:28 Woodi joined #perl6
12:28 lizmat masak: http://goo.gl/GfN81w
12:28 lizmat grrrr
12:28 lizmat https://github.com/pnu/heroku-buildpack-rakudo
12:29 lizmat (sorry Grrrr)
12:30 jnthn pnu++ # my hero...ku
12:30 masak lizmat: wow. if my vacation were today and not next week, I would sit down and try that right away.
12:33 timotimo o/
12:50 FROGGS hi timotimo
12:55 TuxCM scoping bug for $!attr inside regex still exists: http://pastie.org/9725046
12:58 jnthn m: /$!attr/
12:58 camelia rakudo-moar 48edaa: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/k1MDHftC1a�Variable $!attr used where no 'self' is available�at /tmp/k1MDHftC1a:1�------> [32m/$!attr[33m�[31m/[0m�»
12:58 jnthn m: class A { has $!attr; method m() {  /$!attr/ } }
12:58 camelia rakudo-moar 48edaa: ( no output )
12:58 masak TuxCM: ticketed here: https://rt.perl.org/Ticket/Display.html?id=122892
12:58 jnthn Yeah, that shouldn't compile.
12:59 jnthn Since it can never work out.
12:59 * masak .oO( <regex> I'm sorry, $!attr -- it would just never work out between us )
13:09 kaleem joined #perl6
13:24 bwisti joined #perl6
13:27 prevost joined #perl6
13:29 denis_boyun_ joined #perl6
13:30 pnu jnthn, masak: thanks.. :-)
13:35 chenryn joined #perl6
13:43 chenryn joined #perl6
13:51 araujo joined #perl6
13:52 anaeem1_ joined #perl6
13:52 lizmat joined #perl6
13:54 masak pnu++
13:55 masak pnu: I had been meaning to do that for quite some time, but never got the right kind of round tuit for it.
13:55 kurahaupo joined #perl6
13:57 anaeem1 joined #perl6
13:57 brrt joined #perl6
13:58 zakharyas joined #perl6
14:05 Ulti is there an equivalent to Python's 'ast' module that can parse Perl6 for you and return an AST?
14:08 moritz m: macro ast($x) { say $x.^name }; ast 42 + 1
14:08 camelia rakudo-moar 48edaa: OUTPUT«AST␤===SORRY!===␤Too few positionals passed; expected 3 arguments but got 2␤»
14:08 moritz m: macro ast($x) { say $x.^name; return }; ast 42 + 1
14:08 camelia rakudo-moar 48edaa: OUTPUT«AST␤»
14:08 moritz Ulti: that's how you get an AST in Perl 6. But right now ASTs are very opaque (you can't introspect them properly)
14:08 masak ...but <caveats>.
14:08 masak right.
14:09 masak I expect what you'll eventually *want* is Qtrees.
14:10 Ulti cool! second question can I inspect the call stack?
14:10 moritz yes, with callframe()
14:10 Ulti >:3 I'm definitely not trying to do something gross
14:10 Ulti great thanks moritz
14:10 moritz "of course"
14:11 Ven joined #perl6
14:16 Ulti "Callframe.callframe not yet implemented. Sorry."   ;___;
14:16 Ven .tell masak typo on your last blog post "Macro paramters/"
14:16 yoleaux Ven: I'll pass your message to masak.
14:16 Ulti assuming that's how you get the callingframe of the callframe?
14:16 moritz Ulti: you can just do callframe(2) to go deeper
14:16 Ulti ahh oj
14:17 Ulti thanks
14:21 prevost joined #perl6
14:29 pdcawley joined #perl6
14:34 telex joined #perl6
14:38 smls https://rt.perl.org/Public/Bug/Display.html?id=123060 -- That bug report's title doesn't really reflect what's going on.
14:38 smls A lone  $  currently always gets `state` scoping, never `my` scoping. (See also TimToady's comment at the end.)
14:39 smls It's just that Rakudo doesn't parse the first use of  $  as if it were part of the declaration (as masak and lizmat seem to except judging from the comments), and instead adds an invisible declaration for it.
14:39 smls Which I think is a *good* thing - the current behavior is by far the saner alternative. (And also less pythonic... ;)
14:39 smls Parsing something as half of a declaration even though you can't see the other half and thus it doesn't look like a declaration at all, would be far too magical.
14:40 smls If you want a custom declaration, then go and write a full declaration - including the my/state/our keyword that makes it clear to readers what's going on.
14:41 smls The implicit declaration that gets added for  $  is there for making simple things (e.g. loop counters) easy. If your use-case is less trivial and requires a custom declaration (e.g. a state variable with a default value different from Any), then the  $  feature is imo simply not applicable.
14:43 smls my 3¢... :)
14:43 * Ven 's not sure he likes the bare-`$` idea anyways... :)
14:43 colomon joined #perl6
14:43 FROGGS does 3¢ already make a lone $ ? :o)
14:45 guru joined #perl6
14:50 tadzik hmm, pumpkin ale
14:51 jnthn tadzik: I've had one of those before. It was interesting. :)
14:51 tadzik it is indeed :)
14:51 tadzik reminds me of this finnish beer-thing
14:53 osfameron kotikalja?
14:55 tadzik I don't remember the name :(
15:04 cognominal joined #perl6
15:05 arnsholt Python just keeps getting odder >.<
15:05 Spot_ joined #perl6
15:05 arnsholt The semantics of foo.bar(...) depend on whether the object foo has a member named bar or not
15:06 chenryn joined #perl6
15:08 itz_ joined #perl6
15:10 Ven arnsholt: well, otherwise it calls a magical fallback nethod, right?
15:10 Ven like __fallback or ruby's method_missing or our FALLBACK or php's __method or..
15:11 arnsholt Not quite
15:11 Ven okay, I'm interested now :D
15:12 arnsholt If foo has a member bar, we invoke the special __call__ method on the member. If not, we look for a member named bar in the class object Foo
15:12 arnsholt If that exists, we invoke it as a method with foo as the invocant
15:12 Ven like a class method?
15:13 arnsholt No, that's how instance methods are found
15:13 arnsholt But now that I've started complaining, I realize that it's just a question of having a fallback in the case of attribute lookup
15:13 arnsholt If the attribute exists, return that. Else, we return an invokable with the object bound as the invocant
15:23 chenryn joined #perl6
15:23 arnsholt From a cursory think, I think this should be mostly a question of doing the implementation legwork
15:28 Diederich-away joined #perl6
15:31 kurahaupo1 joined #perl6
15:47 lizmat slides of the talk I just gave: http://www.liz.nl/Perl6ForNeophytesNPW2014.pdf
15:47 * Ven reads
15:48 Ven lizmat: thanks for the credit.
15:48 lizmat you deserve it!
15:49 Ven lizmat: I'm going to remove the "5th" syntax from my tutorial. It needn't be here
15:50 Ven it's so little-used it was stupid of me to include it. It just confuses people
15:51 treehug88 joined #perl6
15:51 kaare_ joined #perl6
15:52 Ven m: sub f($a is copy) { $a++ }; f(42);
15:52 camelia rakudo-moar 48edaa: ( no output )
15:53 lizmat m: sub f($a is copy) { $a++ }; say f(42);
15:53 camelia rakudo-moar 48edaa: OUTPUT«42␤»
15:53 lizmat m: sub f($a is copy) { ++$a }; say f(42);
15:53 camelia rakudo-moar 48edaa: OUTPUT«43␤»
15:53 lizmat did I make a mistake in a slide?
15:53 Ven lizmat: I'm just wondering if the "copy" is... "elided" in this case :)
15:54 lizmat well, I used the slides as examples and elided a lot  :-)
15:54 lizmat basically following the flow you had in learnXinY
15:54 treehug88 joined #perl6
15:54 lizmat and saying the lines you had in grey  :-)
15:55 Ven right. It's a lot simpler. I should take note
15:55 lizmat and sort of sprinkled (new) features in the examples
15:56 lizmat to see if people were paying attention
15:57 guru joined #perl6
15:58 Ven ...yes you did :). Like when you introduce the $^a sneakily
16:10 dalek perl6-roast-data: 54d75d3 | coke++ | / (5 files):
16:10 dalek perl6-roast-data: today (automated commit)
16:10 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/54d75d3757
16:10 dalek perl6-roast-data: 9c35a88 | coke++ | / (5 files):
16:10 dalek perl6-roast-data: today (automated commit)
16:10 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/9c35a88451
16:24 smls S05:2031"ident   Match an identifier." - That's not very specific. What is the exact meaning? Does it depend on the system locale?
16:24 synopsebot Link: http://perlcabal.org/syn/S05.html#line_2031
16:25 ingy joined #perl6
16:26 lizmat timotimo: should you be working on the weekly, I think https://github.com/pnu/heroku-buildpack-rakudo of pnu is worth mentioning
16:28 FROGGS smls: no, an identifier is everything that matches: \w+ [ <[\-']> \w+ ]*
16:29 TimToady not exactly
16:29 TimToady each chunk has to start alpha
16:30 FROGGS ahh, yeah
16:31 TimToady <.ident> [ <.apostrophe> <.ident> ]* is how STD has it
16:32 TimToady same in rakudo, I guess
16:36 anaeem1 joined #perl6
16:37 smls ok
16:39 smls m: say "ab'cd-ef" ~~ /^ <ident>* % . $/
16:39 camelia rakudo-moar 48edaa: OUTPUT«「ab'cd-ef」␤ ident => 「ab」␤ ident => 「cd」␤ ident => 「ef」␤␤»
16:39 smls hm...
16:40 anaeem1 joined #perl6
16:44 kaleem joined #perl6
16:44 grondilu joined #perl6
16:50 ajr joined #perl6
16:52 anaeem1 joined #perl6
16:53 pdcawley joined #perl6
16:53 lizmat_ joined #perl6
17:03 guru joined #perl6
17:11 FROGGS TimToady: nqp/src/NQP/Grammar.nqp:40:    token identifier { <.ident> [ <[\-']> <.ident> ]* }
17:11 adu joined #perl6
17:13 ugexe should panda return an exit code of non-0 when it fails to install a module? it'd be nice to be able to do panda install Gonna::Fail || panda install Different::Module
17:14 lizmat ugexe: it probably should (and note to self :-)
17:22 sqirrel__ joined #perl6
17:24 anaeem1 joined #perl6
17:28 timotimo lizmat: oh damn, i forgot about the weekly half-way throuh the day :S
17:34 ajr_ joined #perl6
17:35 jnthn brb, asia :) &
17:35 TimToady o_O
17:37 lizmat safe travels, jnthn!
17:37 ajr_ joined #perl6
17:38 TimToady "redeye", so descrbing, much English
17:39 nwc10 , LTA
17:39 nwc10 or at least, less than enjoyable
17:39 TimToady .oO(Longest Travel Matching)
17:40 jfredett joined #perl6
17:40 timotimo x= and X= should not accidentally be confused %)
17:40 timotimo Xx= on the other hand ... totally legit? :)
17:40 TimToady you could remove your shift keys
17:40 timotimo longest travel marching?
17:41 lizmat timotimo: I guess TimToady's LTM fixes are also mentionable  :-)
17:42 TimToady well, PEG rules, really, doesn't actually change LTM, only the tiebraker when LTM doesn't say
17:42 TimToady *break
17:46 TimToady 1st rule of LTM club, nobody talks about LTM club.
17:47 TimToady actually, I suppose PEG grammars really are a kind of fight club for rules
17:51 sqirrel_ joined #perl6
17:51 TimToady masak: on the atom-for-atom cloning, it is fairly certain that both of you are clones, since we don't know how to read out atoms non-destructively
17:52 TimToady s/both/all/ by induction
18:00 vendethiel joined #perl6
18:09 guru joined #perl6
18:13 guru joined #perl6
18:15 guru joined #perl6
18:15 lizmat post NPW meeting shutting down&
18:19 treehug88 joined #perl6
18:20 smls m: say "foo".^mro>>.^methods.uniq.sort(*.name)
18:20 camelia rakudo-moar 48edaa: OUTPUT«ACCEPTS Bool Capture DUMP FLATTENABLE_HASH FLATTENABLE_LIST Numeric Parcel STORE Str WHICH at_pos elems flat fmt gist item list lol new of perl reverse rotate␤»
18:20 raiph joined #perl6
18:20 smls ^^ is there an easier way to list all methods available for an object?
18:21 TimToady what is this .uniq thing?  I thought that was deprecated...
18:21 ajr_ joined #perl6
18:22 TimToady m: say "foo".^methods(:all)
18:22 camelia rakudo-moar 48edaa: OUTPUT«WHY BUILD Int Num chomp chop substr pred succ match ords samecase samespace trim-leading trim-trailing trim encode wordcase trans indent codes path unival univals WHICH Bool Str Stringy DUMP ACCEPTS Numeric gist perl comb subst lines split words abs conj s…»
18:22 TimToady m: say "foo".^methods
18:22 camelia rakudo-moar 48edaa: OUTPUT«WHY BUILD Int Num chomp chop substr pred succ match ords samecase samespace trim-leading trim-trailing trim encode wordcase trans indent codes path unival univals WHICH Bool Str Stringy DUMP ACCEPTS Numeric gist perl comb subst lines split words␤»
18:23 smls thanks
18:23 TimToady note the default leaves out Cool
18:26 TimToady the assumption is that most people are only interested in the methods defined associated with the user-visible behavior, but not in the boilerplate conversion and object management methods
18:26 TimToady so syntax
18:35 spider-mario joined #perl6
18:36 mj41 joined #perl6
18:36 raiph lizmat++ # p6 for neos
18:36 raiph lizmat:  (typo at end: "http://learnxinyminutes/docs/perl6" is missing .com)
18:39 ab5tract joined #perl6
18:41 smls joined #perl6
18:48 netstar joined #perl6
18:49 netstar rakudo: say 4
18:50 camelia rakudo-{parrot,moar} 48edaa: OUTPUT«4␤»
18:50 denis_boyun_ joined #perl6
18:50 netstar rakudo-parrot: say 4
18:50 camelia rakudo-parrot 48edaa: OUTPUT«4␤»
18:50 netstar rakudo-moar: say 4
18:50 camelia rakudo-moar 48edaa: OUTPUT«4␤»
18:50 netstar healthy
18:51 ajr_ joined #perl6
18:55 Mouq joined #perl6
18:57 tinyblak joined #perl6
18:57 netstar is there online some discussion about bitwise operator changes???
18:57 netstar Rather, the reason behind them.
18:58 tinyblak_ joined #perl6
18:58 firefish5000 joined #perl6
19:01 gfldex joined #perl6
19:01 TimToady we wanted & and | for more important things, linguistically speaking
19:01 guru joined #perl6
19:01 TimToady and they are badly overloaded in P5 depending on string vs numeric history
19:01 tinyblak_ joined #perl6
19:01 TimToady so we disambiguated them
19:01 vendethiel I can't even remember the last time I did bitwise thingies
19:02 netstar Thank you
19:02 TimToady and because they are rarer in Perl than in C, we didn't think the longer huffman coding was a problem
19:02 FROGGS joined #perl6
19:02 * TimToady --> NorCal &
19:03 ab5tract TimToady: happy trails!
19:03 FROGGS o/
19:05 firefish5000 m: class tt { has %.a; submethod BUILD(:$def) { my %a is default(3); %!a := %a; } }; my tt $a .= new(:def(5));  say $a.a.default;
19:05 camelia rakudo-moar 48edaa: OUTPUT«3␤»
19:05 firefish5000 m: class tt { has %.a; submethod BUILD(:$def) { my %a is default($def); %!a := %a; } }; my tt $a .= new(:def(5));  say $a.a.default;
19:05 camelia rakudo-moar 48edaa: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/o1TZ6vYy6V�Can't use unknown trait 'is default' in a variable declaration.�at /tmp/o1TZ6vYy6V:1�------> [32mod BUILD(:$def) { my %a is default($def)[33m�[31m; %!a := %a; } }; my tt $a .= …»
19:07 firefish5000 Can anyone explain this error to me? why would 'is default' be an unknown trait just because its value is variable?
19:09 n0use joined #perl6
19:10 Sqirrel joined #perl6
19:14 moritz firefish5000: traits are applied at compile time; at compile time, the value of the parameter isn't known
19:14 tinyblak joined #perl6
19:14 moritz firefish5000: though the error message isn't awesome
19:14 nwc10 cue the masakbot?
19:14 Mso150 joined #perl6
19:26 Ulti m: my %a = EVAL("my %a is default(42);"); say %a.^name; say %a.default; my $a = EVAL("my %a is default(42);"); say $a.^name; say $a.default;
19:26 camelia rakudo-moar 48edaa: OUTPUT«Hash␤(Any)␤Hash␤42␤»
19:26 Ulti ^ isnt that a bit odd?
19:27 firefish5000 motitz, Thanks. That explains it well. (Hadn't tried variable defaults outside classes. All recognized as Mu or Any.) Build method recognizes is default to the normal extent. (so only has is different?)
19:29 Ulti firefish5000 you can use the second EVAL to get what you wanted /kind of/
19:31 khisanth_ joined #perl6
19:35 tinyblak joined #perl6
19:38 vendethiel motitz :o)
19:39 moritz vendethiel: I'm used to various misspellings of my name :-)
19:39 vendethiel sorry, noritz
19:40 firefish5000 Util: Im not quite sure why, but that did the trick. Works great in Build assighnment to hash, must assighn to scalar in 'has' statement. Thanks.
19:41 Ulti is there a reason why the default constructor accepts anything without complaint?
19:41 Mouq joined #perl6
19:42 Ulti feels like a time bomb waiting for a change to a class the programmer already expects but without it being implemented and probably getting it wrong
19:42 vendethiel Ulti: every method does that
19:42 vendethiel and it's been discussed a lot already, I think
19:42 Ulti right but you could make the constructor not do it
19:42 Ulti as in it could check
19:45 Ulti m: my %stuff = Hash.new(default => 42); say %stuff.default
19:45 camelia rakudo-moar 48edaa: OUTPUT«(Any)␤»
19:45 Ulti got me excited until I saw it did nothing
19:46 Ulti and that EVAL is actually the only way to get a hash with a default value at runtime?
19:54 espadrine_ joined #perl6
19:57 anaeem1 joined #perl6
19:57 cognominal joined #perl6
19:58 daxim joined #perl6
19:58 anaeem1 joined #perl6
20:05 ClarusCogitatio joined #perl6
20:09 ptc_p6 joined #perl6
20:10 firefish5000 In a class, are the subroutines/methods.. setup in order (as of right now, in moar)?  I have BUILD seting up a hash to a sub defined in the class. it works if the sub is defined above BUILD, but not below. (the best place would is above the class? or is it okay for BUILD to refer to class routines?)
20:13 bjz joined #perl6
20:14 firefish5000 m: class t { has %.h; sub cc($p){ return "got a $p";}; submethod BUILD() { my %b is default(&cc); %!h := %b; } }; my t $a .= new; say $a.h.default; say $a.h<c>(45);
20:14 camelia rakudo-moar 48edaa: OUTPUT«sub cc (Any $p) { #`(Sub|99547056) ... }␤got a 45␤»
20:15 firefish5000 but with the sub defined after BUILD
20:15 firefish5000 m: class t { has %.h; submethod BUILD() { my %b is default(&cc); %!h := %b; }; sub cc($p){ return "got a $p";}; }; my t $a .= new; say $a.h.default; say $a.h<c>(45);
20:15 camelia rakudo-moar 48edaa: OUTPUT«Nil␤Nil␤»
20:16 moritz again, the 'is default' runs at time compile time
20:16 moritz that is, before the sub is even parsed
20:19 firefish5000 my question is morso if the first example is a bad & unreliable way to do what I want. (just redefined the question in my head)
20:20 moritz I don't see what's bad about it
20:25 firefish5000 Well, being able to call a routine in a class prior to it being fully built seems ify to me, the fact that I cannot call routines defined after build shows that BUILD is treated specially (since normal routines can see ones defined after themselves in perl) so I fear BUILD may, in the future, be processed before any routine in a class regardless of position.
20:27 moritz BUILD is not treated specially
20:27 moritz it's the 'is default' that happens at compile time
20:27 dalek joined #perl6
20:29 firefish5000 ohh... I probably should have paid more attention to that part.... so during compile time, the routines above would have already been defined, while those below wouldnt be... thats sincable. (I apologize for making you explain that 3 times)
20:30 gtodd joined #perl6
20:32 telex joined #perl6
20:33 FROGGS time perl6-j -e 'say 42'
20:33 FROGGS 42
20:33 FROGGS real0m8.530s
20:33 FROGGS user0m18.729s
20:33 FROGGS and I was under the impression that the oracle jdk is faster than the openjdk -.-
20:34 FROGGS that's oracle jdk 8u25, and before I had openjdk 7u40 or so, and it was about 20-25% faster
20:34 FROGGS 7u65*
20:35 ab5tract FROGGS: is it possible we could set up something like nailgun with rakudo?
20:35 FROGGS ab5tract: what's that?
20:36 ab5tract it preloads the JVM, so you don't pay the startup cost every time
20:36 FROGGS ab5tract: we have that in rakudo, it is called evalserver
20:36 FROGGS it is used to run the spectests for example
20:36 ab5tract http://www.martiansoftware.com/nailgun/
20:36 ab5tract ah, ok
20:36 FROGGS it still does not feel like a nailgun, but anyway :o)
20:36 ab5tract hehe
20:37 ab5tract does perl6-j -e automatically point to the evalserver, if the evalserver is runnin?
20:37 [Coke] no
20:38 [Coke] the evalserver is used automatially for "make spectest".
20:38 FROGGS correct, we don't install the evalserver for example
20:38 ab5tract with an easy way to set that up, it could be presented as a way to speed up developing with perl6-j
20:39 FROGGS true
20:39 FROGGS and it could heat your room if you have enough cores :o)
20:40 ab5tract if one is doing any kind of debugging on the jvm, those startup times start to add up
20:40 [Coke] my laptop hits 100ºC when it's running the java spectests.
20:40 FROGGS [Coke]: mine did that too until I cleaned it, then the temp went down by 30°C
20:41 firefish5000 m: my Pod::Block $pb .= new; say $pb.^methods; say $pb.content;  ## Should this not list contents?
20:41 camelia rakudo-moar 48edaa: OUTPUT«BUILD content gist <anon> <anon>␤␤Saw 1 call to deprecated code during execution.␤================================================================================␤Method content (from Pod::Block) called at:␤  /tmp/ylzug6borF, line 1␤Deprecated …»
20:41 FROGGS firefish5000: what content?
20:43 moritz FROGGS: it does. It's empty.
20:43 firefish5000 content is depriciated in favor of content<s> . and I suppose Nil? Any?
20:43 [Coke] moritz++
20:43 moritz m: say Pod::Block.new.contents.perl
20:43 camelia rakudo-moar 48edaa: OUTPUT«Array.new()␤»
20:44 moritz empty array
20:44 [Coke] You can see it in your output, even, there's an extra newline before the "Saw 1"…
20:45 firefish5000 Im wondering why contents isnt in the ^meethods list
20:45 FROGGS m: say Pod::Block.^mro
20:45 camelia rakudo-moar 48edaa: OUTPUT«(Pod::Block) (Any) (Mu)␤»
20:46 sergot m: say
20:46 camelia rakudo-moar 48edaa: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/dyhcaXC2sSâ�¤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argumentâ�¤at /tmp/dyhcaXC2sS:1â�¤------> [32msay[33mâ��[31m<EOL>[0mâ�¤    e…»
20:46 sergot m: say <1 2 3>[*-1];
20:46 camelia rakudo-moar 48edaa: OUTPUT«3␤»
20:46 sergot m: say (1,2,3)[*-1];
20:46 camelia rakudo-moar 48edaa: OUTPUT«3␤»
20:46 sergot m: say ()[*-1];
20:46 camelia rakudo-moar 48edaa: OUTPUT«Unsupported use of [-1] subscript to access from end of Parcel; in Perl 6 please use [*-1]␤  in method gist at src/gen/m-CORE.setting:13756␤  in sub say at src/gen/m-CORE.setting:16487␤  in block <unit> at /tmp/3Y4PZ09Bdi:1␤␤»
20:47 sergot I use *-1 ! :)
20:47 FROGGS *g*
20:47 FROGGS kill it with fire!
20:47 sergot :)))
20:47 ugexe ive run into that before too
20:48 FROGGS someone should fix it :o)
20:49 [Coke] I'm pretty sure there's a ticket for that.
20:49 sergot If I called it, then I should fix it!
20:49 FROGGS ++sergot
20:49 sergot And I'm eagor to do this.
20:49 sergot eager
20:49 [Coke] I don't see it, though.
20:49 FROGGS bettery than lazy in this case anyway
20:50 FROGGS now I'd like to read news about the GLR by pmichaud++
20:51 [Coke] .seen pmichaud
20:51 yoleaux I saw pmichaud 10 Nov 2014 15:02Z in #perl6: <pmichaud> good morning, #perl6
20:52 ugexe m: my @a; say @a[@a.end];
20:52 camelia rakudo-moar 48edaa: OUTPUT«Unsupported use of [-1] subscript to access from end of Array; in Perl 6 please use [*-1]␤  in method gist at src/gen/m-CORE.setting:13756␤  in sub say at src/gen/m-CORE.setting:16487␤  in block <unit> at /tmp/kjJyT_NI8F:1␤␤»
20:53 [Coke] r: say "abcde" ~~ / (a | b | bc | cde)+»/
20:53 camelia rakudo-{parrot,moar} 48edaa: OUTPUT«「abcde」␤ 0 => 「a」␤ 0 => 「bc」␤ 0 => 「b」␤ 0 => 「cde」␤␤»
20:54 [Coke] TimToady: ^^ RT #116895
20:54 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=116895
20:56 Mouq .tell raydiak https://github.com/raydiak/Math-Symbolic/issues/1
20:56 yoleaux Mouq: I'll pass your message to raydiak.
20:56 [Coke] m: my $x = 1/ 0; $x.gist
20:56 camelia rakudo-moar 48edaa: OUTPUT«Type check failed for return value; expected 'Int' but got 'Failure'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤  in method floor at src/gen/m-CORE.setting:11234␤  in method Str at src/gen/m-CORE.setting:11255␤  in method gist at src/ge…»
20:57 sergot anyway, how the error message should look like?
20:57 [Coke] https://rt.perl.org/Ticket/Display.html?id=112492 - do we support building with C++?
20:58 sergot I mean on: ()[*-1]
20:58 Mouq .tell raydiak (Found because of https://gist.github.com/Mouq/f36a4ccf9547947eec8e btw :)
20:58 yoleaux Mouq: I'll pass your message to raydiak.
20:58 [Coke] (I'm not a huge fan of build warning tickets in the first place)
20:59 jdv79 it makes sense that a parser built using p6 grammars has to be slower than one in p5 using a hybrid regex/handrolled that's been optimized heavily?
21:00 jdv79 that's not a real question.
21:01 jdv79 is it in the realm of possibility that could reverse after the upcoming p6 work?
21:01 bartolin wrt ()[*-1] there is RT #111924
21:01 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=111924
21:01 bartolin and: hi, #perl6
21:02 sergot bartolin++ thanks
21:03 denis_boyun_ joined #perl6
21:03 anaeem1 joined #perl6
21:04 treehug8_ joined #perl6
21:06 Khisanth joined #perl6
21:08 Mouq jdv79: I think that it makes sense, but I think development turnaround with the kind of framework that p6 grammars provide. It could probably be faster with hand-optimized assembly, but is that really what you want to be writing in and playing with after its already been optimized?
21:10 bartolin FROGGS: there are spectest failures in S11-modules/export.t for rakudo.jvm. it looks like the failures started with commit https://github.com/rakudo/rakudo/commit/393acf095d.
21:11 FROGGS bartolin: ohh
21:11 bartolin FROGGS: Though I'm not sure the tests work as intended on the other backends
21:11 jdv79 For this particular case its almost 2 orders of mag slower so its not insignificant.  300ns in p5 vs 25ms in p6.
21:11 FROGGS bartolin: I was inspecting these issues yesterday and had a gut feeling about my commit from back then
21:11 bartolin m: sub exp_no_parens is export { "r_exp_no_parens" }; say &exp_no_parens
21:11 camelia rakudo-moar 48edaa: OUTPUT«sub exp_no_parens () { #`(Sub|76375248) ... }␤»
21:11 jdv79 i need to profile the p6 grammar to see if there's some fat there
21:12 FROGGS perl6-j -e 'sub exp_no_parens is export { "r_exp_no_parens" }; say &exp_no_parens; say &EXPORT::ALL::exp_no_parens; say &exp_no_parens;'
21:12 FROGGS sub exp_no_parens () { #`(Sub|1937383200) ... }
21:12 FROGGS sub exp_no_parens () { #`(Sub|1302328437) ... }
21:12 FROGGS sub exp_no_parens () { #`(Sub|1937383200) ... }
21:12 FROGGS bartolin: ^^
21:13 bartolin FROGGS: the following is after undoing your commit:
21:13 bartolin ./perl6-j -e 'sub exp_no_parens is export { "r_exp_no_parens" }; say &exp_no_parens; say &EXPORT::ALL::exp_no_parens'
21:13 bartolin sub exp_no_parens () { #`(Sub|2118721206) ... }
21:13 FROGGS bartolin: reverting my patch is also not solution, because that will break NativeCall and many modules that depend on it
21:13 bartolin sub exp_no_parens () { #`(Sub|2118721206) ... }
21:13 FROGGS so we need a third option :o)
21:13 bartolin FROGGS: ;-)
21:15 bartolin FROGGS: But what does this test mean: "ok( &exp_no_parens === &EXPORT::ALL::exp_no_parens, 'exp_no_parens -- values agree' );"?
21:16 bartolin FROGGS: why does it say "values agree"? is "sub exp_no_parens () { #`(Sub|1937383200) ... }" meant as "value"?
21:17 FROGGS the subroutine object is meant as a value here I guess, yes
21:17 FROGGS I wondered about that too
21:17 bartolin FROGGS: Aha. I (naively) expected 'r_exp_no_parens' to be the "value" ;-)
21:18 FROGGS I dunno, maybe the test is wrong after all
21:18 jluis_ joined #perl6
21:18 bartolin m: sub exp_no_parens is export { "r_exp_no_parens" }; say &exp_no_parens; say &exp_no_parens();
21:18 camelia rakudo-moar 48edaa: OUTPUT«sub exp_no_parens () { #`(Sub|75933088) ... }␤r_exp_no_parens␤»
21:18 FROGGS but... it perhaps gives some insights about my weird patch
21:30 pecastro joined #perl6
21:32 ClarusCogitatio joined #perl6
21:46 virtualsue joined #perl6
21:59 lizmat joined #perl6
22:00 dg joined #perl6
22:00 ClarusCogitatio joined #perl6
22:02 [Sno] joined #perl6
22:03 dalek roast: edf9db8 | usev6++ | S12-subset/subtypes.t:
22:03 dalek roast: Fudge (skip) failing test for rakudo.parrot (RT #123234)
22:03 dalek roast: review: https://github.com/perl6/roast/commit/edf9db86bc
22:03 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123234
22:03 jdv79 oh man, i tightened up this grammar and now its slower:)
22:03 jdv79 can't win
22:04 FROGGS *g*
22:04 jdv79 at least its easier to read now
22:04 tony-o m: my @a; my $b = @a[*-1];
22:04 camelia rakudo-moar 48edaa: OUTPUT«Unhandled exception: Unsupported use of [-1] subscript to access from end of Array; in Perl 6 please use [*-1]␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13…»
22:05 tony-o is that the right error msg?
22:05 FROGGS no
22:05 FROGGS because it proposes what you already did
22:05 PerlJam Wasn't there a ticket about that already?
22:05 FROGGS yes
22:06 FROGGS was discussed just an hour ago
22:06 tony-o ah, ok
22:06 lizmat TimToady: re http://irclog.perlgeek.de/perl6/2014-11-17#i_9675682 , the message won't appear until after the next release
22:07 woolfy joined #perl6
22:10 woolfy Wanna mention that today at the Nordic Perl Workshop in Helsinki, lizmat gave a Perl 6 tutorial of 1 hour to 15 people who (mostly) never did any Perl 6.  Perl 6 for Neophytes.  http://act.yapc.eu/npw2014/talk/5905
22:10 amkrankruleuen joined #perl6
22:10 amkrankruleuen joined #perl6
22:10 woolfy Almost everybody was hanging on her lips!
22:10 jdv79 whatsup with nopaste.info gobbling backslashes?
22:10 lizmat raiph: re http://irclog.perlgeek.de/perl6/2014-11-17#i_9675759  thanks!  fixed and uploaded again  :-)
22:12 PerlJam .oO( lizmat's lips must have really hurt after that! ;)
22:12 woolfy moritz++ because of "Re: The next 100 Years"
22:12 lizmat they actually did, but that was more from talking for an hour in a very dry atmosphere  :-)
22:12 PerlJam lizmat++ sounds like NPW was very productive though :)
22:13 jdv79 http://nopaste.info/3f465c6aa2.html
22:13 jdv79 is that as good as it  gets right now?
22:13 lizmat PerlJam: well, at least it's now known we can deploy rakudo on heroku
22:14 PerlJam jdv79: I would have used % in the selector rule.
22:14 Alula joined #perl6
22:20 PerlJam jdv79: and now that I glance at the code again, in t he selector_group rule as well:  rule selector_group { '[' ~ ']' [ <selector>* % ',' ]
22:20 PerlJam }
22:21 PerlJam jdv79: and ... rule selector { [ <selector_path_part> | <selector_group> ]* % '.' }
22:21 * PerlJam afk &
22:26 lizmat m: my @a; @a[@a.end]   # maybe .end should return Nil on an empty list ?
22:26 camelia rakudo-moar 48edaa: OUTPUT«Unhandled exception: Unsupported use of [-1] subscript to access from end of Array; in Perl 6 please use [*-1]␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13…»
22:26 lizmat m: my @a; @a[Nil]  # so it wouldn't be an error, but a warning?
22:27 camelia rakudo-moar 48edaa: OUTPUT«use of uninitialized value of type Nil in numeric context  in block <unit> at /tmp/zWW1dKd6BM:1␤␤»
22:33 cognominal what I need to do to feed data to testers.perl6.org?
22:37 grondilu left #perl6
22:37 Alina-malina joined #perl6
22:41 raiph joined #perl6
22:47 itz_ was the NPW videoed?
22:54 lizmat itz_: most of the presentations were videod mostly
22:54 ClarusCogitatio joined #perl6
22:54 jdv79 PerlJam: thanks!  i didn't know about that.
22:55 lizmat by one of the organisers using a DSLR...  no idea if / when that will come online and where
22:55 lizmat itz_: you might want to ask on #npw on irc.perl.org
22:55 Alina-malina joined #perl6
22:58 rurban joined #perl6
23:03 ab5tract is panda working for others?
23:04 ab5tract my projects.json file contains an HTML doc remarking on a 404
23:05 tadzik oh?
23:05 tadzik do 'panda update'
23:05 tadzik http://feather.perl6.nl:3000/projects.json works fine
23:07 ab5tract ah, proxy settings
23:10 ClarusCogitatio joined #perl6
23:14 tony-o is there a quick way in p6 regex to say match a ';' that isn't surrounded by ' or "? or is it the usual old tricks
23:16 lue joined #perl6
23:18 lizmat good night, #perl6!
23:27 cognominal http://testers.perl6.org/  does not answer anymore :(
23:28 Alina-malina joined #perl6
23:46 Mouq joined #perl6
23:54 nebuchadnezzar joined #perl6
23:55 chenryn joined #perl6
23:55 Mouq tony-o: \;
23:55 Mouq m: say ";" ~~ / \; /
23:55 camelia rakudo-moar 48edaa: OUTPUT«「;」␤␤»
23:57 raiph joined #perl6

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

Perl 6 | Reference Documentation | Rakudo