Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-04

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:16 KCL_ joined #perl6
00:26 masak ooh, I had missed that the space between `-e` and the script string is no longer necessary when invoking `perl6`. neat.
00:26 masak (whoever implemented that)++
00:27 masak `perl6 -pe '.=indent(4)'` just got one character shorter :)
00:29 Ven masak: :D oooh just learn 'bout indent
00:29 Ven s/^/    / might work though :P
00:29 masak yeah, but it doesn't beat .=indent(4) in terms of readability :)
00:30 masak .indent has a fun history to it -- it was implemented in the setting because we needed it *anyway* for heredocs.
00:30 masak that's a nice form of dogfooding.
00:30 masak also, it took ages to spec it right.
00:30 masak (it's harder than you'd think.)
00:32 masak .indent(*) is lovely, too.
00:32 masak perhaps the best use of * in the entire language ;)
00:43 Ven oh?
00:44 masak m: say "   one\n     two\n       three".indent(*)
00:44 camelia rakudo-moar 80b912: OUTPUT«one␤  two␤    three␤»
00:44 masak \o/
00:45 Ven ...one more indent each line?
00:45 masak here "whatever" means "remove just enough, but no more".
00:45 jack_rabbit joined #perl6
00:45 Ven oh, it removed the "base" indent basically?
00:46 psch m: say "   one\n     two\n       three".indent(*+1)
00:46 camelia rakudo-moar 80b912: OUTPUT«Cannot call 'indent'; none of these signatures match:␤:(Str: Any $steps where { ... }, *%_)␤:(Str: Any $steps where { ... }, *%_)␤:(Str: Any $steps where { ... }, *%_)␤:(Str: Whatever $steps, *%_)␤  in block <unit> at /tmp/DD4jHrA2Nq:1␤␤»
00:46 masak Ven: yeah.
00:46 psch aww
00:47 masak m: say "   one\n     two\n       three".indent(*).indent(1)
00:47 camelia rakudo-moar 80b912: OUTPUT« one␤   two␤     three␤»
00:47 masak psch: yours could be made to work, I guess.
00:47 masak psch: I never even imagined a use case for that one.
00:47 Ven masak: that's the first use case I thought of ;-)
00:48 masak what, removing the base indent, except one space?
00:48 masak anyway, feel free to add support for WhateverCode. shouldn't be that hard.
00:49 psch i don't really see an actually sensible use case either, tbh
00:49 psch i was mainly curious
00:49 masak what does it mean when panda gives me `Missing or wrong version of dependency 'src/gen/m-CORE.setting'` ?
00:50 psch i came across that a bit back as well, and i'm not sure what causes it.  fixing it is with make realclean and rebuilding iirc
00:50 psch rakudo that is, not panda
00:51 psch i'd blindly guess src/gen/ is out of sync with what's in blib
00:51 TimToady I think 'make clean' is sufficient
00:51 * masak tries
00:51 ingy git clean -dxf
00:51 TimToady but might need a reconfig
00:52 masak did that too :)
00:52 TimToady . config.status
00:52 TimToady and the config will essentially also do a make clean
00:53 masak still the error message from panda :/
00:54 TimToady with the reconfig?
00:54 masak I re-ran Configure.pl, yes.
00:54 telex joined #perl6
00:54 masak now I'm trying it with `. config.status`
00:54 TimToady well, that'll do the same thing you just did
00:54 TimToady did you give it a prefix?
00:54 masak no, I never do that.
00:55 masak I always run from the default install folder.
00:56 * TimToady is not particularly panda savvy
00:56 masak I have a /usr/local/bin/perl6 which is supposed to do the same as the one in rakudo's install folder.
00:57 masak right now for me, the two executables md5sum to the same thing.
00:57 TimToady maybe try ingy's git thingie
00:57 * masak does
00:59 TimToady which may be largely equivalent to blowing away install and other created dirs
01:00 masak *nod*
01:00 TimToady well, install/bin
01:00 TimToady there's git stuff in other dirs
01:00 dayangkun joined #perl6
01:01 TimToady at which point git reset --hard becomes your friend, if you deleted those things :)
01:01 masak ooh, ingy++'s advice helped.
01:02 masak TimToady: well, `git clean` and `git reset` are orthogonal, as `clean` only touches un-added stuff.
01:02 * masak 's got panda! o/
01:02 TimToady Panda ko Panda ga Panda!
01:09 Mso150 joined #perl6
01:14 masak 'night, #perl6
01:22 Ven 'night!
01:46 ingy masak: git clean -dxn # show's what *would* be removed. I have both aliased to gcf and gcn
02:00 raydiak re my earlier question about putting apps in the ecosystem...I don't actually see the aforementioned App:: namespace, panda and farabi appear to have no prefix
02:01 colomon joined #perl6
02:03 yeahnoob joined #perl6
02:03 raydiak I can kick it off with App::Pray, just confirming that's the direction we want to go
02:05 hobbs well it has some traction in p5, and it seems like a decent idea.
02:10 raydiak has my vote too, so I'll just go with that for now
02:13 chenryn joined #perl6
02:19 KCL joined #perl6
02:23 rmgk_ joined #perl6
03:15 dalek ecosystem: 60942aa | raydiak++ | META.list:
03:15 dalek ecosystem: Add App::Pray to the ecosystem
03:15 dalek ecosystem:
03:15 dalek ecosystem: Sets a precedent for the App:: namespace
03:15 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/60942aa600
03:16 Mso150 joined #perl6
03:36 jack13 joined #perl6
03:38 noganex_ joined #perl6
03:55 colomon joined #perl6
04:10 adu joined #perl6
04:24 yeahnoob joined #perl6
04:45 Sir_Ragnarok joined #perl6
05:06 chenryn joined #perl6
05:16 raydiak so projects.json has updated twice since I added App::Pray to META.list, but it's still not there...nor is it in errors.json; modules.perl6.org picked it up just fine though
05:29 adu projects.json? is that on the modules site?
05:33 yeahnoob joined #perl6
05:45 Mso150 joined #perl6
05:58 yeahnoob joined #perl6
06:00 sirdancealot joined #perl6
06:06 kaare__ joined #perl6
06:17 chenryn joined #perl6
06:32 raydiak adu: http://ecosystem-api.p6c.org/projects.json is where panda gets its info from (among other things, I'm sure)
06:34 adu ok
06:35 adu is C::Parser there yet?
06:36 raydiak uh, actually...no...???...
06:37 adu why not
06:37 raydiak it's supposed to update once an hour, but obviously something is wrong
06:37 raydiak we moved a bunch of stuff to a big beefy new server recently, mayhaps something to do with that
06:41 raydiak .tell moritz projects.json doesn't seem to have been finding new additions to the ecosystem since some time between December 7 and 27, even 007 isn't there yet
06:41 yoleaux raydiak: I'll pass your message to moritz.
07:10 dalek ecosystem: 724a0f1 | moritz++ | server/ (18 files):
07:10 dalek ecosystem: Generate JSON files statically
07:10 dalek ecosystem:
07:10 dalek ecosystem: also generate an errors.json file with error messages per URL
07:10 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/724a0f106f
07:10 dalek ecosystem: ee73bd1 | moritz++ | server/ (18 files):
07:10 dalek ecosystem: Merge branch 'static'
07:10 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/ee73bd1bc9
07:11 moritz .tell raydiak the server was stuck on branch 'static', my fault
07:11 yoleaux 06:41Z <raydiak> moritz: projects.json doesn't seem to have been finding new additions to the ecosystem since some time between December 7 and 27, even 007 isn't there yet
07:11 yoleaux moritz: I'll pass your message to raydiak.
07:12 raydiak thank you moritz++ :)
07:12 yoleaux 07:11Z <moritz> raydiak: the server was stuck on branch 'static', my fault
07:16 raydiak adu: you should be able to "panda update" then "panda install C::Parser" now, if you wanted to try it out
07:16 adu yey
07:22 masak morning, #perl6
07:22 raydiak and the fastest raytracing test today is actually on parrot...but only because it fails all the intersection checks for some reason, and gives an empty image
07:22 raydiak g'morning masak
07:40 adu morning masak
07:56 xfix joined #perl6
07:59 moritz morning masak, adu, *
08:00 * moritz guesses it's not morning for raydiak++
08:00 adu moritz: It's 3am for me
08:00 adu I should be sleeping
08:00 moritz so, morning :-)
08:08 konsolebox joined #perl6
08:21 raydiak oh it's a bit after midnight now, but sure doesn't *feel* like what I would call "morning"
08:24 darutoko joined #perl6
08:26 JimmyZ .tell japhb Did you want add README in both nqp and perl6? about benchmark repo
08:26 yoleaux JimmyZ: I'll pass your message to japhb.
08:33 jluis joined #perl6
08:38 Akagi201 joined #perl6
08:47 adu is there a way to pretty print $x.perl?
08:51 raydiak there's also .gist which may or may not be suitable depending on what you want
08:51 raydiak afk
09:02 raydiak back for bit before bed
09:05 anaeem1 joined #perl6
09:12 adu raydiak: hey
09:14 adu raydiak: http://pastie.org/pastes/9812095/text
09:14 rurban joined #perl6
09:17 anaeem1_ joined #perl6
09:18 molaf_ joined #perl6
09:22 raydiak oh, looking
09:22 adu :)
09:22 adu it's working
09:22 raydiak oh nice, I see
09:23 raydiak adu++ :)
09:23 adu :D
09:26 raydiak that gcc tip in the README should help out a lot too, I meant to ask you if it does preprocessor stuff
09:28 adu nope, but gcc does preprocessor stuff
09:31 adu raydiak: http://www.researchgate.net/publication/3919782_Preprocessor_conditional_removal_by_simple_partial_evaluation/file/79e4150db16682f723.pdf
09:31 adu I was thinking of using something like this for the preprocessor
09:31 virtualsue joined #perl6
09:34 raydiak bit much for me to grok atm, but glad you're thinking about it :)
09:36 raydiak btw I don't think "fgrep -v '#'" is what you want so much as "grep -v '^#'"
09:37 adu You're right
09:37 adu I fixed the readme
09:39 raydiak cool
09:55 * JimmyZ uses ack-grep instead of grep
09:57 raydiak "extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));" does not parse
09:58 raydiak adu: also I assume it's because you're working on stuff in there, but a bunch of your tests are failing
09:58 adu raydiak: __attribute__ is unimplemented
09:58 pjablons stupid question (as mine tend to be): what's the preferred container for a simple binary string? buf8?
09:58 raydiak ah...I have no idea what it is, just that it's in zmq.h
09:59 adu raydiak: __attribute__ is a GNU extension to C
09:59 raydiak oh one of the other grammars you mention not existing yet in the readme
09:59 JimmyZ pjablons: Blob?
10:00 pjablons JimmyZ: Blob is immutable.  from what I understand, if you're actually going to be fiddling with it, buf* is the mutable version
10:00 adu raydiak: I'm trying to design C::Parser to accept language tokens (c99, c11, gnu99, gnu11, etc. just like GCC calls them)
10:01 mr-foobar joined #perl6
10:01 moritz afk, travel&
10:02 pjablons what's the difference between buf8, buf32, etc?
10:02 JimmyZ pjablons: http://design.perl6.org/S02.html#The_Buf_Type
10:02 * JimmyZ decomutes
10:04 pjablons looks like buf1 is what i'm looking for
10:15 raydiak okay I'm fading fast...\o #perl6
10:21 virtualsue joined #perl6
10:25 H2O1 joined #perl6
10:26 H2O1 left #perl6
10:37 konsolebox joined #perl6
11:13 lizmat m: sub a(|c) { |c }   #  Variable ???
11:13 camelia rakudo-moar 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/8w1NZZOTH1â�¤Variable '&prefix:<|>' is not declaredâ�¤at /tmp/8w1NZZOTH1:1â�¤------> [32msub a(|c) { [33mâ��[31m|c }   #  Variable ???[0mâ�¤Â»
11:19 kjs_ joined #perl6
11:22 dalek Inline-Perl5/create_used_packages: 2f4d4e4 | (Stefan Seifert)++ | / (2 files):
11:22 dalek Inline-Perl5/create_used_packages: Create a Perl 6 package for use'd Perl 5 modules.
11:22 dalek Inline-Perl5/create_used_packages:
11:22 dalek Inline-Perl5/create_used_packages: Allows:
11:22 dalek Inline-Perl5/create_used_packages: BEGIN $p5.use('Data::Dumper');
11:22 dalek Inline-Perl5/create_used_packages: my $dumper = Data::Dumper.new(perl5 => $p5, [{a => 1}]);
11:22 dalek Inline-Perl5/create_used_packages: say $dumper.Dump;
11:22 dalek Inline-Perl5/create_used_packages: review: https://github.com/niner/Inline-Perl5/commit/2f4d4e45fa
11:22 dalek ecosystem: 231a5c9 | FROGGS++ | META.list:
11:22 dalek ecosystem: add IDNA::Punycode
11:22 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/231a5c9fe6
11:23 denis_boyun_ joined #perl6
11:25 masak [D
11:26 FROGGS__ O.o
11:46 rindolf joined #perl6
11:50 masak huh. I'd never had a chair walk across my keyboard before. odd.
11:52 denis_boyun joined #perl6
12:06 dalek Inline-Perl5: 546bd09 | (Stefan Seifert)++ | / (2 files):
12:06 dalek Inline-Perl5: Create a Perl 6 package for use'd Perl 5 modules.
12:06 dalek Inline-Perl5:
12:06 dalek Inline-Perl5: Allows:
12:06 dalek Inline-Perl5: BEGIN $p5.use('Data::Dumper');
12:06 dalek Inline-Perl5: my $dumper = Data::Dumper.new(perl5 => $p5, [{a => 1}]);
12:06 dalek Inline-Perl5: say $dumper.Dump;
12:06 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/546bd09dcc
12:11 masak my dream/vision for this year's YAPC::EU -- provided I make it -- is to revisit November, to re-create it with modern Perl 6 tech.
12:12 masak ideally that'd just be a super-simple LEGO-like putting together of a few modules, and done.
12:12 nine m: BEGIN GLOBAL::<Test> = class { }; Test.new;
12:12 camelia rakudo-moar 80b912: OUTPUT«===SORRY!===␤Object of type <anon> in QAST::WVal, but not in SC␤»
12:12 masak if I start thinking about it now, I can probably provide the modules that we don't have yet.
12:12 masak or improve the ones we do have, but that could be better.
12:13 nine masak: sounds like a great idea! It's a shame that all the Perl 6 related websites run on other languages...
12:13 masak _sri: you're my go-to websockets guy, hence this question: if websockets are the future, is the idea of a "Save" or "Update" button (for blog posts or wiki pages or the like) totally passé? should it be all saved, all the time?
12:14 masak nine: we can do wonders on the web front if we just put out mind to it. we do have the speed now. and the stability. and it'll just get better.
12:15 nine masak: when preparing my Inline::Perl5 talk I thought "it's cool that we can use Catalyst in Perl 6 now, but also much of Catalyst could be simplified greatly if it were written in Perl 6"
12:16 nine Traits and signatures really is all you need for decent dispatch and you get them for free in Perl 6.
12:21 masak ooh
12:21 masak I would love to brainstorm such ideas in some form somewhere.
12:22 masak throw out some PoC mini-Catalyst code that implemented a wiki in Almost No Code At All.
12:23 sjn masak: where's November located these days, btw?
12:26 nine Absolutely! Catalyst actually is already a shrinking target. They move more and more code to PSGI middlewares where it can be reused easily in other frameworks. I would suggest actually using Perl 5's PSGI as base and concentrating on the high level API. Because that's where Perl 6's strengths can really show.
12:28 nine That way one instantly gains all the deployment options like starman, FastCGI, and so on. Working Cookie and session handling and other interesting middlewares.
12:33 Timbus sixplack
12:33 Akagi201 joined #perl6
12:35 masak sjn: still at https://github.com/viklund/november
12:35 masak sjn: probably deeply bitrotted by now.
12:37 _sri masak: no, both are valid designs
12:37 pjablons is buf1 not a thing?
12:37 _sri nine: actually, the catalyst code has only been growing
12:37 masak _sri: are there known forces determining when one is preferable over the other?
12:38 _sri masak: matter of taste
12:38 masak _sri: I really like Gmail's (and other products') preference of undoing over confirming actions. I wonder if it's a known thing.
12:38 masak a well-known design pattern, I mean.
12:39 _sri you don't even need websockets, all that can be done with ajax too
12:39 _sri websockets would just be an optimization
12:42 Akagi201 joined #perl6
12:42 arnsholt pjablons: The number is the bitwidth of the items, so I don't think we've thought much about buf1 yet, no
12:42 masak _sri: ok. I distinctly remember you proselytize them here on channel a year or so ago, though. :)
12:44 pjablons arnsholt: Out of pure curiosity, is there much of a backend difference between buf1 and buf8?
12:45 arnsholt A bit, probably, since the byte is generally the smallest convenient unit in C
12:45 arnsholt For a bit-array, you'll have to do a bit more work to extract the values you want (just a few more bitops though)
12:46 _sri masak: "the future" is http2, which is a terrible protocol
12:47 pjablons So at the moment, if I want a reasonably pure binary string, I should just suck it up and use a buf8?
12:47 _sri (ietf last call for http2 ends in like a week)
12:54 dj_goku_ joined #perl6
12:54 dj_goku_ joined #perl6
13:02 nine _sri: in what areas is the Catalyst codebase growing?
13:02 masak _sri: :/
13:03 masak _sri: I don't know enough about http2 to be saddened by that, except perhaps indirectly.
13:03 masak but I have seen enough improving and self-correcting standards lately (especially the ES6 and ES7 ones) to have a glimmer of hope.
13:13 gfldex joined #perl6
13:13 nine I'm now creating a Perl 6 class for every imported Perl 5 module. These classes inherit from Inline::Perl5::Perl5Package. Perl5Package's methods need a reference to the Inline::Perl5 object. I would like to store these in the created classes. How would I do that?
13:16 nine Create a role to store this reference and have $class.^does(Perl5PackageWrapper); $class.perl5 = self;?
13:22 pmurias joined #perl6
13:24 nine Should probably be $class does Perl5PackageWrapper but that gives me a "Cannot use 'does' operator with a type object."
13:30 xfix joined #perl6
13:30 masak _sri: is there a canonical websockets application demo somewhere, that people use to inform themselves about how to use websockets (and create APIs for them) in practice?
13:32 telex joined #perl6
13:43 yeahnoob|2 joined #perl6
13:44 green_ joined #perl6
13:48 _sri masak: no
13:49 green_ is it possible to get perl6 compiler on freebsd10?
13:54 Rounin joined #perl6
13:59 green_ How I can specify CC in Configure.pl instead of clang?
14:00 kjs_ joined #perl6
14:00 Ven joined #perl6
14:00 bartolin green_: I'm running daily builds of Moar, Parrot and JVM on FreeBSD 10.
14:01 nwc10 green_: --cc=
14:01 nwc10 you might also need --ld=
14:01 masak _sri: is it so intuitive to use websockets that no demonstration is necessary? or is there just a keenly felt lack of good examples?
14:01 bartolin green_: only for Parrot I have to pass --parrot-option="--link=c++"
14:01 masak this was a weird one: https://rt.perl.org/Ticket/Display.html?id=123541
14:02 masak I wouldn't mind if someone could try and reproduce it.
14:02 nwc10 green_: you might want to look at Configure.pl --help
14:02 bartolin green_: (those answers where only about your first question.)
14:03 lizmat masak: have you tried dropping the "our" from the sub def?
14:05 nine masak: for a cute little websockets using application have a look at http://net.muddasheep.com/nodecity/
14:05 nine masak: websockets code in http://net.muddasheep.com/nodecity/scripts.js
14:07 _sri masak: it's so easy we have a full example on the frontpage http://mojolicio.us
14:09 masak lizmat: yes. doing so makes the unexpected behavior ("undeclared x") persist.
14:09 masak nine, _sri: thank you both.
14:10 lizmat ok. OOC, what was the reason you used "our" in the first place ?
14:10 masak lizmat: I... I think I usually use `our` on subs I export.
14:11 masak lizmat: it gives the user the choice between x() and M::x()
14:11 lizmat fwiw, I think using M::x() is really bad
14:11 masak matter of taste, methinks.
14:11 _sri masak: thing is, you could do most of this stuff for many many years with ajax and long polling, but now with websockets it has become super simple
14:11 lizmat especially in the future where we have multiple versions of the same module loaded
14:11 masak I've heard people argue for using M::x() everywhere for clarity.
14:12 lizmat I think that's P5 think
14:12 masak lizmat: I don't see why multiple versions would have anything to do with the M::x() notation.
14:12 masak lizmat: regardless of how you call the sub, it comes from some version of the module, no?
14:12 lizmat not necessarily: I would think that the M:: in your call is the shortname of the module
14:13 masak _sri: you sound like you're not arguing for it being the "next big thing" the way you were. or did I interpret you wrongly back then?
14:13 masak _sri: the message I heard from you back then was basically that this would transform the web as we know it.
14:13 lizmat use Foo:name<M>; M::x  # x comes from Fii
14:13 lizmat Foo
14:13 _sri masak: dunno, websockets are just the new normal now
14:13 masak not for me; apparently I haven't kept up ;)
14:14 nine Websockets are clearly the best solution for server push applications. But not all applications are of that kind.
14:14 masak _sri: is there a sense in which REST and websockets are (a) at odds, and it requires careful design to do both well together, or (b) mutually empowering, and there are hidden advantages to be reaped?
14:15 _sri masak: just yesterday i've stumbled over this page where stackoverflow mentions that they handle 260k concurrent websockets http://stackexchange.com/performance
14:15 nine Oh I hate this "Object of type Data::Dumper in QAST::WVal, but not in SC" error!
14:16 _sri masak: no, REST and websockets are different tools for different jobs
14:16 _sri they work perfectly fine together
14:17 _sri some purists don't like websockets, but that doesn't really matter
14:18 _sri masak: there's also webrtc now, which is yet another tool for another job
14:19 KCL_ joined #perl6
14:19 _sri and spdy, which is a special case because the server can push content directly into the browser cache (same thing http2 will do)
14:20 _sri the web is very diverse these days
14:24 xfix joined #perl6
14:27 dalek rakudo/nom: 1983f42 | lizmat++ | src/core/Exception.pm:
14:27 dalek rakudo/nom: Make binding errors simpler and sturdier
14:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1983f420e5
14:28 Ven joined #perl6
14:35 araujo joined #perl6
14:36 ajr joined #perl6
14:38 nine Can someone explain to me where this "Object of type Test::More in QAST::WVal, but not in SC" message is coming from? This behavior doesn't make any sense at all.
14:39 yeahnoob|2 joined #perl6
14:39 lizmat in P6 there is no Test::More, so I assume it's coming from P5 somehow ?
14:39 nine In this case Test::More is a class I create at runtime using this code: https://gist.github.com/niner/565aa3cfb26897c27d63
14:40 nine If I move the %perl5_for_imported_packages{$module} := self; line to the end of the sub I get the error even sooner which does not make any sense.
14:42 lizmat have you tried with --optimize=off ?
14:43 nine lizmat: does not change anything
14:43 lizmat :-(   bin ich ja überfragt  :-(
14:45 zakharyas joined #perl6
14:46 green_ bartolin, can you please share how you run Configure.pl script? I experienced an error on linking libmoar.so. it seems I'm doing something wrong
14:48 raiph joined #perl6
14:48 FROGGS__ nine: that error means that an object is put in a world-val (WVal) probably in Perl6::Actions, but it was not added to the serialization context
14:48 FROGGS__ seems to be a bug in Perl6::Actions
14:49 FROGGS__ nine: did you golf it down yet?
14:49 nine FROGGS__: at it
14:54 nine It's difficult since the error appears/disappears with changes to seemingly unrelated code.
14:55 FROGGS__ :/
14:56 xinming joined #perl6
14:57 nine It doesn't exactly help that I have no idea when I need := or when a plain normal = would suffice.
14:59 nine m: my $class = Metamodel::ClassHOW.new_type(name => 'Test'); $class.HOW.compose($class);
14:59 camelia rakudo-moar 80b912: OUTPUT«(signal SEGV)»
14:59 nine m: my $class := Metamodel::ClassHOW.new_type(name => 'Test'); $class.HOW.compose($class);
14:59 camelia rakudo-moar 80b912: ( no output )
15:08 konsolebox joined #perl6
15:08 bartolin green_: my scripts for the daily builds are here https://github.com/usev6/perl6-roast-data/tree/master/bin
15:09 bartolin green_: for Moar I'm only doing "perl Configure.pl --gen-moar --gen-nqp --backends=moar", basically
15:09 green_ bartolin, ok, thank you!
15:11 nine Replacing the whole metamodel code with an EVAL "class GLOBAL::$module is Perl5Package \{ \}"; seems to get rid of the whole problem.
15:11 lizmat nine: seems like a good temp solution
15:11 Ven joined #perl6
15:12 nine Now I only need to find out how to add a fallback for class methods. Perl5Package.^add_fallback(...) doesn't seem to do it.
15:12 bartolin green_: btw, I have installed gcc with 'pkg install gcc'
15:13 Mso150 joined #perl6
15:15 lizmat nine: FALLBACK works now
15:17 rindolf joined #perl6
15:17 nine lizmat: great :)
15:19 FROGGS__ m: say $*DISTRO.name
15:19 camelia rakudo-moar 80b912: OUTPUT«opensuse␤»
15:20 FROGGS__ m: say $*DISTRO
15:20 camelia rakudo-moar 80b912: OUTPUT«opensuse (13.2.Harlequin)␤»
15:20 FROGGS__ m: say $*KERNEL
15:20 camelia rakudo-moar 80b912: OUTPUT«linux (1.SMP.Wed.Dec.17.18.0.44.UTC.2014.762.f.27.a)␤»
15:20 FROGGS__ m: say $*KERNEL.name
15:20 camelia rakudo-moar 80b912: OUTPUT«linux␤»
15:20 FROGGS__ hmmm
15:20 FROGGS__ does that say 'windows' on windows?
15:20 FROGGS__ and... what does that say on osx? that seems to have changed recently
15:21 lizmat $ 6 'say $*DISTRO.name'
15:21 lizmat macosx
15:21 FROGGS__ thanks :o)
15:21 lizmat $ 6 'say $*DISTRO'
15:21 lizmat macosx (10.10.1)
15:21 lizmat $ 6 'say $*KERNEL'
15:21 lizmat darwin (14.0.0)
15:22 FROGGS__ okay, that makes sense
15:22 lizmat $ 6 'say $*KERNEL.name'
15:22 lizmat darwin
15:23 FROGGS__ the good thing about cpandatesters is that it records dumps of $*VM, $*DISTRO, $*KERNAL and $*PERL... so I can fix the reports
15:25 lizmat :-)
15:26 dalek Inline-Perl5: 555fb84 | (Stefan Seifert)++ | / (2 files):
15:26 dalek Inline-Perl5: Support calling package functions as class methods of imported Perl 5 packages.
15:26 dalek Inline-Perl5:
15:26 dalek Inline-Perl5: Allows for:
15:26 dalek Inline-Perl5: BEGIN $p5.use('Test::More');
15:26 dalek Inline-Perl5: Test::More.ok(1);
15:26 dalek Inline-Perl5:
15:26 dalek Inline-Perl5: Replaced the code creating the Perl 6 class by a simple EVAL to get around
15:26 dalek Inline-Perl5: "Object of type Foo in QAST::WVal, but not in SC" errors.
15:26 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/555fb84960
15:26 Ven nine++
15:27 psch joined #perl6
15:28 psch hi #perl6 \o
15:29 dalek rakudo/newio: 1983f42 | lizmat++ | src/core/Exception.pm:
15:29 dalek rakudo/newio: Make binding errors simpler and sturdier
15:29 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/1983f420e5
15:29 dalek rakudo/newio: 16053a8 | lizmat++ | src/core/Exception.pm:
15:29 dalek rakudo/newio: Merge branch 'nom' into newio
15:29 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/16053a8733
15:29 dalek rakudo/newio: b8eafe5 | lizmat++ | src/core/IO/Locally.pm:
15:29 dalek rakudo/newio: IO::Locally is not just for existing paths
15:29 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/b8eafe5c91
15:29 dalek rakudo/newio: 2aa5471 | lizmat++ | src/core/IO/Handle.pm:
15:29 dalek rakudo/newio: IO::Handle now also consumes IO::Locally
15:29 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/2aa5471350
15:29 nine That's not yet perfect however. There's no distinction yet between P5 package functions and package methods. So for a real package method call one has to pass the package name as first parameter: Catalyst::ScriptRunner.run('Catalyst::ScriptRunner', 'XStats', 'Server');
15:30 kjs_ joined #perl6
15:30 nine Is there a way to have a fallback for fully qualified method names like Catalyst::ScriptRunner::run?
15:31 FROGGS__ that's a sub, and I think there is no fallback
15:31 FROGGS__ I mean, you can check if the symbol is null...
15:31 FROGGS__ m: say &Catalyst::ScriptRunner::run
15:31 camelia rakudo-moar 80b912: OUTPUT«(Any)␤»
15:31 FROGGS__ but that's it
15:32 dalek rakudo/newio: 81ef49b | lizmat++ | src/core/IO/Handle.pm:
15:32 dalek rakudo/newio: an IO::Handle is not a dir and is a file
15:32 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/81ef49b8d4
15:33 lizmat afk for a bit&
15:39 dalek roast: a543b07 | usev6++ | S32-hash/pairs.t:
15:39 dalek roast: Add tests for RT #117935
15:39 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=117935
15:39 dalek roast: review: https://github.com/perl6/roast/commit/a543b07ab4
15:56 dalek Inline-Perl5: 3910120 | (Stefan Seifert)++ | / (2 files):
15:56 dalek Inline-Perl5: Support use Foo:from<perl5>; to load Perl 5 modules in Perl 6
15:56 dalek Inline-Perl5:
15:56 dalek Inline-Perl5: Register a module loader for "perl5" on loading Inline::Perl5.
15:56 dalek Inline-Perl5:
15:56 dalek Inline-Perl5: Allows for:
15:56 dalek Inline-Perl5: use Inline::Perl5;
15:56 dalek Inline-Perl5: use Test::More:from<perl5>;
15:56 dalek Inline-Perl5: Test::More.ok(1);
15:56 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/3910120da0
15:57 nine Please have a look at this commit ^^^ and tell me if that is a somewhat sane way to do this.
15:59 FROGGS__ I guess it is sane
15:59 psch i'm wondering if we'd rather have :from<Perl5>, seeing as we're deprecating :from<java> for :from<Java>
15:59 psch but that's the module authors decision i guess
15:59 FROGGS__ psch: true
16:00 psch aside from that i agree with FROGGS__
16:00 FROGGS__ I was under the impression that :from<Perl5> was taken by v5, but that's not true as you don't load v5 too
16:00 FROGGS__ as long*
16:01 psch oh, i didn't consider that
16:02 psch i suppose with more of S22 either of v5 and Inline::Perl5 can offer use :from<Perl5>
16:02 Ven nine: seems sane *and* amazing.
16:02 nine Well one could argue that lower case "perl" is the name of the Perl 5 binary. Since Inline::Perl5 uses the accompanying shared library, a lower case "perl5" can be seen as a hint to Inline::Perl5. But that's just me trying to add meaning to an arbitrary decision :)
16:02 FROGGS__ we already can do that, you just cannot use both at the same time
16:03 FROGGS__ nine: yes, but :from is meant to be about a language... but I understand that hint :o)
16:03 nine I can change it to "Perl5" right away if that's the new way to follow.
16:04 FROGGS__ +1 from me fwiw
16:05 Ven I think we have ":from<Java>" as the correct form, so +1 for Perl5
16:05 psch Ven: we don't have it yet, it's in my PR though
16:05 psch so +1 from me as well :)
16:05 Ven psch: sorry, sorry ;-)
16:05 dj_goku joined #perl6
16:05 FROGGS__ I thought it was applied already
16:06 psch FROGGS__: no, only the NQP branch has been merged afaik
16:06 psch https://github.com/rakudo/rakudo/pull/344 still open :)
16:06 dalek Inline-Perl5: 3c10ff3 | (Stefan Seifert)++ | / (2 files):
16:06 dalek Inline-Perl5: Register Inline::Perl5 as "Perl5" module loader instead of "perl5"
16:06 dalek Inline-Perl5:
16:06 dalek Inline-Perl5: Title case seems to be the preferred way according to IRC discussion
16:06 dalek Inline-Perl5: at 2015-01-04 16:00 UTC
16:06 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/3c10ff3f10
16:07 psch iirc moritz++ said there's no new spectest failures, but i guess he didn't finish re-spectesting before bedtime yesterday
16:07 FROGGS__ psch: there is no spectest regression I guess?
16:07 FROGGS__ ahh
16:07 anaeem1_ joined #perl6
16:08 FROGGS__ psch: what's that about? https://github.com/peschwa/rakudo/commit/40076a86bd1a95602cf9c951240ed9117d40f81b
16:08 [TuxCM] joined #perl6
16:08 psch FROGGS__: currently running perl6-jdb-server doesn't break on enter, suspend=y enables break on enter
16:08 FROGGS__ break on enter?
16:08 psch FROGGS__: i figured if one is running the jdb server one wants to set break points before it goes executing everything
16:08 FROGGS__ ahh
16:09 dalek rakudo/nom: 97599f7 | peschwa++ | tools/build/create-jvm-runner.pl:
16:09 dalek rakudo/nom: Reference the users classpath in the JVM runner.
16:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/97599f77e8
16:09 dalek rakudo/nom: 40076a8 | peschwa++ | tools/build/create-jvm-runner.pl:
16:09 dalek rakudo/nom: Always suspend with perl6-jdb-server.
16:09 psch FROGGS__: mostly i got tired of editing perl6-jdb-server after each make && make install ;)
16:09 dalek joined #perl6
16:10 FROGGS__ psch: but that does not mean that it stops when it is meant to run the spectests, right?
16:10 psch FROGGS__: no, spectests run via perl6-eval-sever
16:10 dj_goku joined #perl6
16:10 FROGGS__ ahh, I see
16:11 psch perl6-jdb-server is really mostly for debugging the jvm backend, i can't imagine any other use case
16:24 nine Where exactly is "use" documented?
16:25 nine Or as a more concrete question: When I use Test::More:from<Perl5>, what is the syntax for passing the import list like tests => 1?
16:32 FROGGS__ S11 should talk about that
16:32 denis_boyun_ joined #perl6
16:33 nine It talks about that but not enough. Or I just don't understand it.
16:34 lizmat S11 is still slushy
16:34 lizmat OTOH, some of this could be considered implementation detail
16:35 nine I have a patch that implements it as "use Test::More:from<Perl5>:import<tests 1>;" but I have no idea if that's how Perl 6 should look like.
16:36 psch isn't it just "use Foo <bar>;"?
16:36 nine psch: how do you combine that with :from<Perl5>?
16:36 psch use Foo:from<Perl5> <bar>;
16:36 FROGGS__ m: use Test:from<Perl5> "foo" => 1
16:36 camelia rakudo-moar 80b912: OUTPUT«===SORRY!===␤Error while importing from 'Test': no such tag 'foo'␤»
16:36 FROGGS__ I'd misuse that syntax
16:36 FROGGS__ probably
16:37 psch nine: that's how i'd combine it.  the space makes introduces parameters to &EXPORT of the use'd module
16:37 psch s/makes//
16:37 psch while :from<> alters the behavior of use itself
16:37 FROGGS__ m: use Foo:from<Perl5> <bar 1> # should complain about &EXPORT
16:37 camelia rakudo-moar 80b912: OUTPUT«===SORRY!===␤Do not know how to load code from Perl5␤»
16:37 FROGGS__ ahh, it complains about that first :o)
16:43 nine Leaving the question of where I have to implement this EXPORT sub. It's not Perl5Package.
16:45 lizmat in the compunit, but outside the package, I seem to recall  :-)
16:47 nine lizmat: err....I would interpret this as in the file but not inside the class { ... }. But where do I put it for a class that's EVAL'ed?
16:47 lizmat before the class statement: the string is the compunit there
16:48 lizmat I mean, -use file- is basically BEGIN EVAL slurp 'file'
16:51 nine Doesn't seem to get called either
16:51 lizmat :-(
16:52 nine EVAL "method EXPORT(*@args) \{ warn 'EXPORT'; \%perl5_for_imported_packages\{self.perl.Str\}.invoke(self.perl.Str, 'import', @args.list); \} class GLOBAL::$module is Perl5Package \{ \}";
16:54 * lizmat notives nine has not read her last advent blog post yet
16:54 lizmat m: say qq:!c/foo { 42 }/   # so you don't need to escape all {}
16:54 camelia rakudo-moar 80b912: OUTPUT«foo { 42 }␤»
16:55 bartolin lizmat: yesterday I asked you about an issue with hashes and adverbs. in the meantime I found the relevant piece in S02 -- the current implementation is just right. i updated my gist accordingly: https://gist.github.com/usev6/3c5d27e558160c152358
16:55 lizmat ah, ok  :-)
16:55 lizmat nine: other than that, I have nothing to add  :-(
16:56 bartolin lizmat++  ## current implementation for hash adverbs
16:57 lizmat nine: also, qq:!c:!h/.../  to not interpolate hashes
16:57 denis_boyun_ joined #perl6
16:58 nine lizmat: you cought me. Thanks for the hint!
17:06 dalek rakudo/newio: 516a4a4 | lizmat++ | src/core/IO (2 files):
17:06 dalek rakudo/newio: Add rx and wx file tests
17:06 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/516a4a4d21
17:10 Mso150 joined #perl6
17:10 bartolin lizmat: since you mentioned it yesterday: it seems that using simple ternaries instead of infix:<|> in the code which checks for the precence of adverbs for subscriptions makes the operations a bit faster. (see my last comment in https://gist.github.com/usev6/3c5d27e558160c152358) do you think it would make sense to change that code?
17:12 lizmat benchmark it, I would say  :-)
17:12 timotimo bartolin: using a | gives you a junction
17:13 timotimo so that may be a bad idea, performance-wise
17:13 lizmat yeah, I was thinking that as well yesterday
17:13 lizmat I guess when I wrote that code, I wasn't aware of that yet
17:13 lizmat bartolin: if you're interested in speeding up, you might want to try replacing | with ||  :-)
17:16 bartolin lizmat: ok, I'll micro-benchmark a bit further. (for 5000 lookups the ternaries are about 30 percent faster than the current version)
17:16 timotimo huh, only 30% faster?
17:17 lizmat I'll take 30% any time  :-)
17:17 bartolin m: my %h; %h<a>=1; for ^5000 {%h<a>:p}; END { say now - BEGIN now }
17:17 camelia rakudo-moar 80b912: OUTPUT«4.0228318␤»
17:18 bartolin that was my simple benchmark. (locally it is 3.5 -> 2.5 seconds)
17:18 timotimo but it's pretty weird that the performance impact of building the junction is lower
17:18 dalek specs/newio: ce469ea | lizmat++ | S16-io.pod:
17:18 dalek specs/newio: Some more on IO::Locally
17:18 dalek specs/newio: review: https://github.com/perl6/specs/commit/ce469ea175
17:18 psch $ ./perl6-j -e'{b => 1, a => 1, c => -1}.Mix.roll(100).elems.say'
17:18 psch 53
17:18 bartolin timotimo: the junctions (current implementation) are slower
17:18 psch that's pretty wrong, isn't it..?
17:19 lizmat bartolin: I never intended to be junctions, so please fix  :-)
17:19 bartolin lizmat: will do, but it will take some time ;-)
17:19 timotimo of course they are slower, but i'd expect a much bigger impact
17:20 kjs_ joined #perl6
17:20 bartolin timotimo: sorry, misunderstood.
17:21 bartolin timotimo: but in my simple benchmar other operations are involved and the 30 % are the overall improvement
17:24 psch m: say { a => -10, b => 1, c => 2 }.Mix.roll
17:24 camelia rakudo-moar 80b912: OUTPUT«Nil␤»
17:24 psch that's not right either, isn't it?
17:24 psch s/isn't/is/
17:25 lizmat m: say ( a => -10, b => 1, c => 2 ).Mix.roll
17:25 camelia rakudo-moar 80b912: OUTPUT«Nil␤»
17:25 lizmat m: say ( a => -10, b => 1, c => 2 ).Mix.perl
17:25 camelia rakudo-moar 80b912: OUTPUT«("a"=>-10,"b"=>1,"c"=>2).Mix␤»
17:25 psch lizmat: i think it's Mix.roll, line Mixy.pm:51 doesn't abs() or skip negative values
17:26 psch i'm not sure how Mixy.roll should behave though
17:26 psch but having a negative $seen means nothing gets returned
17:26 lizmat well, it should ignore any values < 10
17:26 lizmat <0
17:26 lizmat m: say ( a => -1, b => 1, c => 2 ).Mix.perl
17:26 camelia rakudo-moar 80b912: OUTPUT«("a"=>-1,"b"=>1,"c"=>2).Mix␤»
17:26 lizmat m: say ( a => -1, b => 1, c => 2 ).Mix.roll
17:26 camelia rakudo-moar 80b912: OUTPUT«c␤»
17:26 psch fwiw, this fails spectesting on jvm, but doesn't on moar
17:27 psch m: say  {b => 1, a => -100000000000, c => 100000000000}.Mix.roll # is the test
17:27 camelia rakudo-moar 80b912: OUTPUT«Nil␤»
17:27 psch err
17:27 psch m: say  {b => 1, a => 100000000000, c => -100000000000}.Mix.roll # this one
17:27 camelia rakudo-moar 80b912: OUTPUT«a␤»
17:27 lizmat m: say ( a => -10, b => 1, c => 2 ).Mix.values
17:27 camelia rakudo-moar 80b912: OUTPUT«-10 1 2␤»
17:28 psch i'm thinking jvm doesn't preserve hash order but mvm does?
17:28 psch 'cause it reliably fails when the big negative value is further in the front on mvm
17:29 * lizmat is looking at it
17:31 lizmat psch: found it
17:31 lizmat hash order is indeed the reason why it (sometimes) works on the JVM
17:32 psch i haven't seen it work on jvm in 3 or so spectests runs in the last 2 days, but that's explicitly the test above (this one: {b => 1, a => -100000000000, c => 100000000000}.Mix.roll)
17:33 psch as in, the test in spectest fails reliably on jvm and passes on moar
17:38 nine That's funny. When I ::($module).WHO<EXPORT> = sub EXPORT(*@args) I get this error: "Error while importing from 'Test::More': no EXPORT sub, but you provided positional argument in the 'use' statement"
17:38 sergot hi o/
17:38 nine So it's only complaining about a missing EXPORT sub when I actually add one
17:40 lizmat so it sees that you added it, but then can't find it when it wants to act on it
17:41 nine Ok, usually EXPORT seems to be a Perl6::Metamodel::PackageHOW.new
17:41 nine So when I set it to a sub, it probably tries to call ::($module).WHO<EXPORT>.EXPORT(...)
17:44 psch lizmat: if i'm understanding S32:Containers/MixHash/Bag right it should just skip over Pairs with .value < 0?
17:44 synopsebot Link: http://perlcabal.org/syn/S32.html#Containers
17:45 psch S32/Containers:Bag/roll actually i guess
17:45 synopsebot Link: http://perlcabal.org/syn/S32/Containers.html#Bag
17:45 psch although roll doesn't have a link...
17:50 dalek rakudo/nom: ded7746 | lizmat++ | src/core/Mixy.pm:
17:50 dalek rakudo/nom: Fix problem Mix.roll spotted by psch++
17:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ded77460bd
17:50 lizmat feels wrong to iterate twice, but that didn't work for some reason
17:51 lizmat need to go now, probably the rest of the day&
17:54 rurban joined #perl6
18:01 Ven joined #perl6
18:02 dalek Inline-Perl5: 652c83c | (Stefan Seifert)++ | / (2 files):
18:02 dalek Inline-Perl5: Support import lists when loading P5 modules via use Foo:from<Perl5>
18:02 dalek Inline-Perl5:
18:02 dalek Inline-Perl5: Allows for:
18:02 dalek Inline-Perl5: use Test::More:from<Perl5> <tests 1>;
18:02 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/652c83cc18
18:03 nine .tell lizmat I got it! One has to set an EXPORT object (like Metamodel::PackageHOW) _and_ an &EXPORT sub in WHO.
18:03 yoleaux nine: I'll pass your message to lizmat.
18:05 Ven nine: what does <tests 1> mean?
18:08 [Tux] joined #perl6
18:20 mst Ven: it plans tests
18:20 mst like 'use Test::More tests => 1;' in perl5
18:20 Ven oh. oke
18:20 mst of course, IME that's a terrible idea
18:21 mst I don't even want to think about how much of my life I've wasted resolving merge conflicts in test plans
18:24 tadzik then again, it can be used for much nicer things too
18:24 tadzik import lists, that is
18:24 Mouq joined #perl6
18:26 mst well, sure, I just dislike that the example is a footgun
18:27 mst nine: oi :P
18:29 nine Well you can't please everyone :) But if know another P5 core module that is as useful for demonstrating such features, I'll use it.
18:30 vladtz joined #perl6
18:30 vladtz hi all
18:32 vladtz rakudo: 'class Q {}; Q.new;'
18:32 camelia rakudo-{parrot,moar} 80b912: ( no output )
18:32 vladtz rakudo: class Q {}; Q.new;
18:32 camelia rakudo-{parrot,moar} 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Couldn't find terminator .�at /tmp/tmpfile:1�------> [32mclass Q {}; Q.new;[33m�[31m<EOL>[0m�»
18:34 vladtz Yes I know Q (and little brother q) is quoting, but this way any name starting with Q can't be used ??
18:34 Ven uh-oh
18:35 psch m: class class { }; class.new # related bug, RT #67784
18:35 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=67784
18:35 Ven seems like it...?!
18:35 camelia rakudo-moar 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/XS0QJpUk7râ�¤Unable to parse class definitionâ�¤at /tmp/XS0QJpUk7r:1â�¤------> [32mclass class { }; class[33mâ��[31m.new # related bug, RT #67784[0mâ�¤    expecting any of:â�¤        generic rol…»
18:35 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=67784
18:35 FROGGS__ I guess it tries to find another '.' as the ending delimiter
18:35 FROGGS__ m: class Q {}; Q.new;    .
18:35 camelia rakudo-moar 80b912: ( no output )
18:35 FROGGS__ see
18:35 FROGGS__ std: class Q {}; Q.new;    .
18:35 camelia std f9b7f55: OUTPUT«ok 00:00 136m␤»
18:35 FROGGS__ std: class Q {}; Q.new;
18:35 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�Couldn't find terminator . at /tmp/AVUJUC_nQk line 1 (EOF):�------> [32mclass Q {}; Q.new;[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 136m�»
18:35 FROGGS__ and since STD agrees, I don't consider it a bug
18:36 Ven seems pretty limitating tho....
18:36 Ven std: class Qwerty {}; Qwerty.new
18:36 camelia std f9b7f55: OUTPUT«ok 00:00 136m␤»
18:36 Ven rakudo: class Qwerty {}; Qwerty.new
18:36 camelia rakudo-{parrot,moar} 80b912: ( no output )
18:36 Ven ... what?
18:36 psch for consistency i'd say Q and q should be allowed as class names, if class should be allowed
18:36 psch std: class class {}; class.new
18:37 camelia std f9b7f55: OUTPUT«ok 00:00 136m␤»
18:37 Ven psch: you can't, really
18:37 Ven m: class Qds{}; Qdds.new
18:37 FROGGS__ same goes for s and tr me thinks, but yeah, the keywords for quoting constructs are special here
18:37 camelia rakudo-moar 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ji2zAR7duPâ�¤Undeclared name:â�¤    Qdds used at line 1. Did you mean 'Qds'?â�¤â�¤Â»
18:37 Ven psch: it's ambiguous, sadly
18:37 psch Ven: right, the difference is that . could be a delim
18:37 Ven yes.
18:38 FROGGS__ m: class Q {}; ::('Q').new;
18:38 camelia rakudo-moar 80b912: ( no output )
18:38 FROGGS__ m: class Q {}; say ::('Q').new;
18:38 camelia rakudo-moar 80b912: OUTPUT«Q.new()␤»
18:40 psch std: class tr {}; tr.new
18:40 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�Couldn't find terminator . at /tmp/CrtAUSQWrE line 1 (EOF):�------> [32mclass tr {}; tr.new[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 136m�»
18:41 psch std: class tr {}; my tr $x .= new
18:41 camelia std f9b7f55: OUTPUT«ok 00:00 137m␤»
18:41 psch well, that helps
18:42 psch indirect lookup is more generally applicable though i guess
18:44 Ven well, here, it can't be a quoting construct. same reason as why `class tr` parses, I'll guess
18:44 vladtz m: class Q {}; my Q $q6 .=new;
18:44 camelia rakudo-moar 80b912: ( no output )
18:45 psch std: class tr{}
18:45 camelia std f9b7f55: OUTPUT«ok 00:00 135m␤»
18:45 psch m: class tr{}
18:45 camelia rakudo-moar 80b912: ( no output )
18:48 vladtz Well, one might not consider it a bug, but I would call it a major usability issue...
18:50 FROGGS__ perl -E 'sub s { 42 }; say s'
18:50 FROGGS__ Substitution pattern not terminated at -e line 1.
18:50 FROGGS__ vladtz: it is the same in Perl 5...
18:52 psch i suppose if there is a usability issue it's that only a select few keywords are forbidden
18:52 psch but they're all quoting constructors, aren't they
18:52 psch well, it's not even that they're forbidden
18:53 FROGGS__ it is just that they are parsed like quoting constructs
18:54 FROGGS__ m: sub if { 42 }; say if 42
18:54 camelia rakudo-moar 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/r11s7GwFDn�Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument�at /tmp/r11s7GwFDn:1�------> [32msub if { 42 }; say [33m�[31mi…»
18:54 FROGGS__ that's the same problems
18:54 FROGGS__ m: sub if { 42 }; say if(42)
18:54 camelia rakudo-moar 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/BXx9KP7F65â�¤Calling 'if' will never work with argument types (int)â�¤    Expected: :()â�¤at /tmp/BXx9KP7F65:1â�¤------> [32msub if { 42 }; say [33mâ��[31mif(42)[0mâ�¤Â»
18:54 FROGGS__ err
18:54 FROGGS__ m: sub if($x) { $x }; say if(42)
18:54 camelia rakudo-moar 80b912: OUTPUT«42␤»
18:54 FROGGS__ and there are solutions...
18:55 vladtz It is not just Q, but also Qx!
18:55 FROGGS__ here one can also say that this would be a bug... but the parser will parse a bare 'if' like the keyword
18:55 vladtz m: class Qa {}; my $q6 = Qa.new;
18:55 camelia rakudo-moar 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KN9jiXofHt�Couldn't find terminator .�at /tmp/KN9jiXofHt:1�------> [32mclass Qa {}; my $q6 = Qa.new;[33m�[31m<EOL>[0m�»
18:55 vladtz The fine line here is quote vs. keyword.
18:56 FROGGS__ we probably can check for an existing 'Qa' type, in case the thing afterwards could be an op
18:56 FROGGS__ but I'd to get TimToady's opinion on that first
18:57 vladtz Yes, a change like that is not to be embarked upon lightly.
18:58 vladtz Thanks for the help, at least I understand the problem I ran in to.
19:02 psch FROGGS__: doesn't that break LTM if we check if the string after the . is a type?
19:03 psch cause we have to parse it, look if it's an op and if not go back and parse the part before the . as type
19:03 psch s/as type/as quoteop/
19:05 FROGGS__ | <quote_mod> » <![(]> { $qm := $<quote_mod>.Str } <quibble(%*LANG<Q>, $qm)>
19:05 FROGGS__ that code block also terminates LTM
19:05 psch oh, okay
19:11 dalek nqp: 64a0711 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/io/ (2 files):
19:11 dalek nqp: Correctly block in closefh_i.
19:11 dalek nqp:
19:11 dalek nqp: Previously we didn't wait for pipes, which among other things broke panda bootstrap.
19:11 dalek nqp: Calling waitFor() instead of exitValue() prevents the JVM from dying and properly
19:11 dalek nqp: blocks until the client process has exited.
19:11 dalek nqp: review: https://github.com/perl6/nqp/commit/64a0711110
19:11 psch raydiak++ for reporting that one
19:14 FROGGS__ ohh nice
19:15 pmurias nine: use Test::More:from<Perl5> <tests 1> is an example of a thing that will cause problems with precompilation
19:16 rhr joined #perl6
19:25 kaare__ joined #perl6
19:27 nine pmurias: I remembered that when I finally got it working. I'll have a look at how I could do the same with require.
19:28 psch (flapping supply tests)--
19:29 psch aside from those jvm spectest is clean now, lizmat++
19:30 nine pmurias: Or... I could serialize the state as a list of loaded modules with their import parameters and just replay them on unserialization?
19:31 nine pmurias: would such a thing be possible?
19:31 raiph joined #perl6
19:37 jnthn Dear message bot, how easy will my evening be?
19:37 yoleaux 2 Jan 2015 16:48Z <lizmat> jnthn: is it correct that we cannot serialize any Lock objects
19:37 yoleaux 2 Jan 2015 16:49Z <lizmat> jnthn: if not, is that an omission?  or is that something we Just Cannot Do™
19:37 yoleaux 2 Jan 2015 22:27Z <lizmat> jnthn: perl6 --ll-exception -e 'CompUnit.new("t/spec/packages/Example/A.pm").precomp' fails with 'Missing serialize REPR function for REPR ReentrantMutex' on Moar
19:37 yoleaux 2 Jan 2015 22:27Z <lizmat> jnthn: I would expected it to fail with Could not find Example::C in any of: ....     Any ideas?
19:37 yoleaux 3 Jan 2015 03:19Z <japhb> jnthn: There's a hang on nqp-m (but not nqp-j) on the threading test I just added to NQP.  See https://github.com/perl6/nqp/commit/96752368eb .
19:37 jnthn Aww shucks.
19:38 jnthn .tell lizmat while we can't serialize the lock state (held or not), serializing lock instances makes sense to me, I think.
19:38 yoleaux jnthn: I'll pass your message to lizmat.
19:39 psch also a total 5 TODOs pass on jvm, 4 of which are unicode 6.1 related, the last one is in S22-package-format/local.t, the last test
19:40 psch o/ jnthn
19:41 masak \o jnthn
19:41 jnthn o/ all
19:42 japhb G'day, all!
19:42 yoleaux 08:26Z <JimmyZ> japhb: Did you want add README in both nqp and perl6? about benchmark repo
19:43 psch o/ japhb
19:45 Ven joined #perl6
19:45 japhb JimmyZ: No need to duplicate, just in the perl6/ subdir is fine; just mention where it is in the nqp/ scripts as well.
19:51 jnthn japhb: Time when I can concentrate enough to make good use of the parallel test/benchmark stuff you're doing is on the horizon, probably around a week and a bit away. Thanks for plugging on with it. :)
19:52 pmurias nine: not sure there is a soultion that will just work correctly all the time
19:53 kjs_ joined #perl6
19:53 timotimo i'm pretty annoyed by the libuv thread/loop problem we've hit
19:53 timotimo even though i don't fully understand the repercussions
19:54 japhb jnthn: Oh cool, that helps me prioritize.
19:54 timotimo except it sounds like our I/O (synchronous as well as asynchronous) is going to have a big performance problem :\
19:55 japhb timotimo: Why's that?
19:56 pmurias nine: perlcc which has the same problem as we do fails to handle this
19:57 jnthn timotimo: Unless we pick an awful solution, I don't think there's a real performance risk. Additionally, I'm quite happy that there's a whole bunch of options that will work out with changes behind the abstraction layer.
19:57 timotimo oh, OK
19:57 timotimo that saves my optimism a tiny bit
19:59 psch ah, the passing unicode todos are because i'm running openjdk8 with -source 1.7 instead of openjdk7
20:00 colomon joined #perl6
20:00 jnthn timotimo: Also note that the problem hoelzro++ uncovered is entirely with sync I/O; our async stuff is free of these issues by the design it already has.
20:00 timotimo ooooh, ok
20:00 timotimo that definitely makes it a bit better
20:01 [particle] joined #perl6
20:15 Mouq joined #perl6
20:19 Mouq psch++ # Java work \o/
20:19 nine pmurias: is there a way to prevent precompilation of a module?
20:20 FROGGS__ nine: no
20:20 FROGGS__ nine: though, what you've proposed earlier sounds pretty sane to me
20:24 dalek rakudo/nom: 2520958 | timotimo++ | src/core/Block.pm:
20:24 dalek rakudo/nom: junctions are expensive (though this isn't hot code)
20:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/25209589ff
20:28 jnthn .tell lizmat 7e95c05 in MoarVM should fix your reentrantmutex serialization woes.
20:28 yoleaux jnthn: I'll pass your message to lizmat.
20:30 FROGGS__ jnthn: that might also unbreak v5 \o/
20:30 jnthn \o/
20:34 arnsholt jnthn: 6model questions: is there a particular reason boolification is set via the boolspec, but stringification and numification happen via magical methods (Str and Num, IIRC)?
20:34 arnsholt *question
20:34 * moritz would guess performance
20:34 FROGGS__ me too
20:35 FROGGS__ so you can put the knowledge somewhere that you don't have to call .Bool
20:35 jnthn arnsholt: There's a .Bool too which is the coercy method
20:35 jnthn It's both performance but also a circularity saw, iirc.
20:37 arnsholt Right, the boolspec cuts the circularity for bools. For Snake stringification and numification working the same way would actually be cleaner =)
20:37 jnthn Note that unboxing to native int/num/str is also a low-level thing.
20:38 arnsholt Ah, right. That might be what I *actually* want, yeah
20:39 jnthn Well, maybe the best way - at least from a MoarVM perspective - is to emit code that checks if the thing already is a PyString, calls the coercion method if not, and then gets the native thing.
20:39 jnthn And then hope that spesh kills the type check and branch in hot paths.
20:39 jnthn (Which it is capable of.)
20:41 arnsholt Hmm. Sounds plausible, I think
20:43 denis_boyun_ joined #perl6
20:44 green_ joined #perl6
20:46 ggoebel111111117 joined #perl6
20:57 raiph joined #perl6
21:09 dalek roast: 1014935 | usev6++ | S06-signature/optional.t:
21:09 dalek roast: Add tests for RT #79288
21:09 dalek roast: review: https://github.com/perl6/roast/commit/1014935495
21:09 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=79288
21:10 vladtz left #perl6
21:11 FROGGS__ jnthn++ # it helped v5 indeed
21:11 FROGGS__ nine: you perhaps can strip these EVAls that made the ReentrantMutex thingy go away
21:12 adu joined #perl6
21:13 jnthn FROGGS__: yay :)
21:13 adu hi all
21:14 FROGGS__ hi adu
21:14 adu so I got 6 tests to pass yesterday
21:14 jnthn .oO( but then I eated them )
21:15 FROGGS__ pass? pass to whom?
21:15 * jnthn wonders which tests :)
21:15 adu FROGGS__: https://github.com/andydude/p6-c-parser/tree/master/t
21:15 adu my C::Parser
21:15 FROGGS__ ahh
21:16 jnthn ooh :)
21:16 adu one of these days, it's going to be able to parse all dialects of C! bwahaha
21:16 FROGGS__ *g*
21:17 FROGGS__ I think I have to test that parser
21:17 japhb jnthn: https://www.youtube.com/watch?v=_K5a4XSy0G4 (... but I ate it)
21:18 adu FROGGS__: I only separated it out into its own package/module about a week ago, so beware
21:18 jnthn japhb: :D
21:19 b2gills joined #perl6
21:19 jnthn Time for some rest. Maybe tomorrow I'll find time to do some other unbusting patch :)
21:19 jnthn o/
21:19 FROGGS__ gnight jnthn
21:20 japhb Good night!
21:20 adu FROGGS__: I would use it without the AST actions if I were you
21:20 FROGGS__ okay, will keep that in mind
21:21 anaeem1__ joined #perl6
21:33 Mouq TimToady: I'm looking to help with NFA/DFA work; trying to read through NFA.nqp now... is there specific work that needs/oughts to be done?
21:35 Mouq TimToady: I understand that we want transformation into DFA when possible, but I also understand that's a pretty difficult project
21:36 Mouq TimToady: I saw mentioned in the logs something about something that would generate a graph of the NFA. Would that be useful? Especially with all the debugging code that's had to be put into the NFA class..
21:38 kjs_ joined #perl6
21:45 moritz Mouq: well, one problem is that DFAs tend to be quite big
21:45 kurahaupo joined #perl6
21:45 moritz Mouq: sorear tried that for niecza, iirc, with mixed success
21:47 FROGGS__ moritz: btw, I am making progress with the static pages of testers.perl6.org
21:47 moritz FROGGS__++ !
21:48 abraxxa joined #perl6
21:49 FROGGS__ moritz: though... in case the apache is listening on port 80, how do we put the via post received reports into the database?
21:49 arnsholt I think worst-case the DFA is exponentially larger than the NFA
21:50 arnsholt So you've got to choose which bits you want to make deterministic
21:50 moritz FROGGS__: well, options exist. CGI, FastCGI, reverse proxies, mod_$thing
21:51 Mouq moritz: Yeah, it's one of those speed/memory trade-offs. It also can't track things as well as an NFA can, AFAIU
21:51 FROGGS[tab] joined #perl6
21:53 psch g'night, #perl6 \o
21:54 FROGGS__ moritz: k, I'll think about it
21:54 moritz Mouq: I wonder if it would make sense to apply the NFA-to-DFA transformation only to subsets of the NFA, and only where it doesn't explode the state space
21:54 timotimo FROGGS__: i always connect my web apps to the 'net via mod_proxy
21:54 nine FROGGS__: the EVAL was for "Object of type Foo in QAST::WVal, but not in SC" errors. The ReentrantMutex thingz went away by liz reverting her commit.
21:55 moritz but I guess that's not well researched yet
21:57 Mouq moritz: Yeah, and there seem to be many TimToady++ musings on the topic scattered through the logs, but I didn't see a strong direction
22:14 telex joined #perl6
22:18 moritz sleep&
22:18 Mouq g'night moritz!
22:28 dalek nqp: e17879d | (Geoffrey Broadwell)++ | t/concurrency/03-semaphore.t:
22:28 dalek nqp: Third concurrency test file, including basic single- and multi-threaded semaphore tests.  Works fine on both nqp-m and nqp-j.
22:28 dalek nqp: review: https://github.com/perl6/nqp/commit/e17879d254
22:28 virtualsue joined #perl6
22:28 raydiak oh nice psch++ fixed that jvm problem
22:29 timotimo japhb++ # doing very important work
22:29 timotimo and with that i'm off to sleep
22:29 japhb Thanks.  :-)
22:29 japhb Have a good night!
22:29 raydiak night timo o/
22:31 raydiak unfortunately now the make step for rakudo dies very early on for me
22:31 raydiak src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java:361: error: MethodContext() has protected access in MethodContext
22:31 timotimo may need to perl Configure.pl again?
22:31 raydiak blew the whole dir out of rakudobrew already, same result
22:32 timotimo OK
22:34 raydiak (and same error for line 477, s/Method/Class/, if anyone is looking at it)
22:42 Mouq joined #perl6
22:56 FROGGS joined #perl6
23:07 danaj joined #perl6
23:12 araujo joined #perl6
23:18 FROGGS joined #perl6
23:39 masak 'night, #perl6
23:43 denis_boyun joined #perl6
23:43 abraxxa joined #perl6
23:59 fwilson joined #perl6

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

Perl 6 | Reference Documentation | Rakudo