Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-05-26

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 colomon o/, lizmat
00:00 colomon timotimo: agreed
00:00 colomon timotimo: but there certainly are hints it is going to be awesome
00:00 timotimo aye
00:00 colomon unless, of course, it's just running quickly because it's broken.  :)
00:00 timotimo haha
00:01 colomon that's ha ha, only serious.
00:01 timotimo yes
00:02 colomon you can easily duplicate the moar issues with
00:02 colomon time perl6 bin/mandelbrot-parallel.pl --max-iter=50 101 >m.ppm
00:04 timotimo 17/43 of the 2014.05 release rakudo timing stuff
00:39 timotimo http://t.h8.lv/p6bench/2014​-05-26-without_startup.html   and   http://t.h8.lv/p6bench/201​4-05-26-with_startup.html
00:39 BenGoldberg rn: my $x = 1; print $x++, $x++, ++$x, ++$x, $x++, ++$x;
00:39 camelia rakudo-{parrot,jvm,moar} 501a70: OUTPUT«124557»
00:39 camelia ..niecza v24-109-g48a8de3: OUTPUT«127757»
00:41 timotimo i expected these for benchmarks to win much more
00:42 timotimo yeah, the optimization didn't trigger
00:42 hoverboard joined #perl6
00:42 timotimo strange.
00:46 timotimo there's a quasi-empty Stmts node where the code expects the infix:<..> to be
00:46 timotimo that's why it doesn't trigger
00:46 timotimo too tired to fix it now
00:49 timotimo interesting!
00:49 timotimo it's caused by parenthesis around the range
00:49 timotimo why are they in the benchmark in the first place and why don't we flatten out Stmts with less than 2 content nodes?
00:50 skids joined #perl6
00:53 pochi joined #perl6
00:54 timotimo modified the benchmarks and kicking off another run
01:02 klapperl joined #perl6
01:02 timotimo this may fix it
01:02 dalek rakudo/nom: 71bc63c | (Timo Paulssen)++ | src/Perl6/Optimizer.nqp:
01:02 dalek rakudo/nom: account for (1 .. 10) having surplus Stmt/Stmts nodes
01:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/71bc63cb9f
01:04 timotimo may be a better idea to go in earlier and turn Stmt/Stmts with a single child into nothing, but there's something that happens to local var lifetimes under that condition
01:07 dalek rakudo/nom: 166bf3e | (Timo Paulssen)++ | src/Perl6/Optimizer.nqp:
01:07 dalek rakudo/nom: remove a surplus )
01:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/166bf3efe1
01:15 dayangkun joined #perl6
01:21 timotimo half done ...
01:24 timotimo uh oh, my commits broke the build
01:25 * timotimo removed these commits
01:39 dj_goku so as a user of p6, what can we do to help? I am no where good enough to hack the internals.
01:39 hoverboard joined #perl6
01:40 timotimo write new modules, port existing modules, write documentation, test other people's stuff, report bugs (if possible, golf bugs down to smallest piece of code to reproduce), ...
01:40 timotimo lots of things you can do
01:40 timotimo it's also very good to just use p6 and hit problems, like unexpected performance characteristics, confusing/bad/missing documentation, ...
01:44 dj_goku hmm.
01:44 dj_goku I was thinking of writing a ftp client, but not sure how hard that would be.
01:44 timotimo sounds somewhat simple; exploring the socket support sounds like time well spent
01:44 timotimo i'm not sure how good our sockets are and i don't know if they are equally good on all three backends
01:44 dj_goku I haven't written any socket programming since college, and then it was very low level. We did something like netcat.
01:44 timotimo oh, okay
01:45 timotimo http://t.h8.lv/p6bench/2014​-05-26-without_startup.html http://t.h8.lv/p6bench/201​4-05-26-with_startup.html - now updated
01:46 thistuso- joined #perl6
01:46 timotimo definitely a decent improvement on the for-based tests
01:47 geekosaur ftp is actually not the easiest thing to do, because of old-passive and EPSV and etc.
01:47 timotimo i'm going to bed now
01:47 timotimo gnite #perl6 :)
01:50 Su-Shee joined #perl6
01:53 dj_goku geekosaur: hmm, maybe I'll look at learning channels/promises. :D
01:59 klapperl_ joined #perl6
02:29 dalek perl6-roast-data: a668780 | coke++ | / (6 files):
02:29 dalek perl6-roast-data: today (automated commit)
02:29 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/a66878086d
02:29 dalek perl6-roast-data: 9906aca | coke++ | / (5 files):
02:29 dalek perl6-roast-data: today (automated commit)
02:29 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/9906aca246
02:29 dalek perl6-roast-data: 175a66e | coke++ | / (3 files):
02:29 dalek perl6-roast-data: today (automated commit)
02:29 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/175a66e5fc
02:45 xiaomiao http://bpaste.net/show/299197/ # nqp-2014.05 test failure
02:48 Sqirrel joined #perl6
03:10 SamuraiJack__ joined #perl6
03:13 gtodd joined #perl6
03:15 BenGoldberg rn: sub primes( $largest? = Inf ) {my @s;my @p;my $p = 3;my $q = $p * $p;my $cnt = 0;++$largest unless $largest % 2;my $test = sqrt($largest);gather {take 2; take 3;for ( 5, 7 ... $largest ) -> $n {if ( my $stepsizes = shift @s ) {push @s[ $_ ], $_ for @$stepsizes;} elsif ( $n < $q ) {push @p, $n if $cnt++ <= $test;take $n;} else {--$p;push @s[ $p ], $p;$p = shift @p;$q = $p * $p;}}}}; say primes 999
03:15 camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to resolve method push in type Any␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/tmpfile line 1 (ANON @ 30) ␤  at <unknown> line 0 (KERNEL dogather @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2634 (Gat…»
03:15 camelia ..rakudo-{parrot,jvm,moar} 166bf3: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 …»
03:24 BenGoldberg p: grep { True }, 5, 7 ... 999
03:24 camelia rakudo-parrot 166bf3: ( no output )
03:25 BenGoldberg p: say grep { True }, 5, 7 ... 999
03:25 camelia rakudo-parrot 166bf3: OUTPUT«␤»
03:29 xragnar joined #perl6
03:36 Alula joined #perl6
04:01 kaare_ joined #perl6
04:19 zlurker joined #perl6
04:32 Pleiades` joined #perl6
04:35 kurahaupo joined #perl6
05:06 thou joined #perl6
05:14 kaare_ joined #perl6
05:14 SamuraiJack joined #perl6
05:28 kaare__ joined #perl6
05:33 xinming_ joined #perl6
05:42 anaeem1 joined #perl6
05:46 dayangkun joined #perl6
06:03 denis_boyun_ joined #perl6
06:13 kaleem joined #perl6
06:16 anaeem1_ joined #perl6
06:21 darutoko joined #perl6
06:27 dayangkun_ joined #perl6
06:38 FROGGS joined #perl6
06:49 Ven joined #perl6
06:50 markov left #perl6
06:53 wooden joined #perl6
06:53 wooden joined #perl6
07:09 lue joined #perl6
07:10 dmol joined #perl6
07:20 sergot morning! o/
07:21 ren1us 'evening
07:22 chenryn joined #perl6
07:22 denis_boyun___ joined #perl6
07:24 uon joined #perl6
07:34 dayangkun joined #perl6
07:37 uon left #perl6
07:40 salv0 joined #perl6
07:56 chenryn joined #perl6
07:58 broquaint joined #perl6
08:10 masak good antenoon, #perl6
08:10 masak gonna run some errands here, but after that, I should be all yours.
08:10 masak Perl 6 day today \o/
08:12 FROGGS \o/
08:12 FROGGS hi masak
08:16 jnthn timotimo: Why is forest fire missing from latest benchmarks? I had some improvements to that too... :S
08:24 Timbus part of our commitment to reducing carbon emissions
08:26 Timbus jnthn, i asked a few days ago rather vaguely, but i was wondering how i would go about setting up a 2 way binding for attributes. basically something like an INotify trait?
08:26 Timbus wrapping set_value appears to do nothing, so that wasn't right
08:30 jnthn Timbus: That's typically something you might do with Proxy.
08:30 jnthn And a Supply is the natural way in Perl 6 to send out notifications.
08:30 jnthn Probably there is a way to extract the detials into a module.
08:33 chenryn joined #perl6
08:38 krunen joined #perl6
08:38 Timbus well, i guess what i want is simply the ability to be notified when an attribute is changed, and to have that neatly abstracted away so I don't need to layer too much over the model
08:39 Timbus i did it in moose using 'triggers'
08:39 Timbus https://github.com/TiMBuS/G​TKBind/blob/master/test.pl
08:39 Timbus binding a model to a gtk GUI with named widgets, so you can keep the data in sync with the ui
09:10 Sqirrel joined #perl6
09:24 sqirrel_ joined #perl6
09:40 moritz I'm increasingly worried by p6's choice of making rw accessors that use assignment
09:40 moritz it makes it much harder to add validation logik later on
09:41 lizmat good *, #perl6
09:41 moritz one could argue that the validation logic should go into the (subset) type, but 1) that produces horribly un-informative error messages and 2) doesn't give the application a way to short-circuit the type check when it knows it's valid
09:41 lizmat Timbus made me think about a "my $a will trigger { ... }"
09:41 moritz \o lizmat
09:42 Timbus lizmat, something like that yes
09:44 denis_boyun_ joined #perl6
09:44 Timbus except possibly a way to add more triggers from outer classes, but yeah
09:52 SHODAN joined #perl6
09:55 thou joined #perl6
10:09 thistusooa joined #perl6
10:09 lizmat m: "foobar".IO.z  # everybody ok with this producing a Failure ?
10:09 camelia rakudo-moar 166bf3: OUTPUT«Unhandled exception: Failed to find 'foobar' while trying to do '.z'␤   at <unknown>:1  (/home/p6eval/rakudo-inst-2/languages/perl6/r​untime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:12909  (/home/p6eval/rakudo-inst-2/languages/…»
10:10 lizmat rather than just returning False ?
10:16 masak moritz: agree about validation logic.
10:16 masak moritz: at the very least there should be some nice sugar that handles all of the Proxy boilerplate.
10:17 timotimo Unhandled exception: failed to load library 'dynext/libperl6_ops_moar.so'
10:17 timotimo at <unknown>:1  (/home/timo/perl6/bench/components/ra​kudo-moar/d1b16a1/perl6.moarvm::303)
10:17 timotimo jnthn: this is what made forest fire fail
10:17 timotimo o_O
10:24 masak "SQLite4 is an alternative, not a replacement, for SQLite3. SQLite3 is not going away. SQLite3 and SQLite4 will be supported in parallel. The SQLite3 legacy will not be abandoned. SQLite3 will continue to be maintained and improved." -- http://sqlite.org/src4/doc/trunk/www/design.wiki
10:24 masak I dub this "the Perl 6 outcome".
10:25 masak the biggest difference with the Python world is that the Python core team seems to be a little bit in denial/wishful thinking about how much the Python 2 legacy will not be abandoned, and they're basically refusing to maintain and improve it.
10:25 xfix Python 2 is used a lot, but it's not officially supported.
10:26 xfix Python 2.7 is the end.
10:26 xfix There are security fixes, but that's it.
10:26 masak what I said.
10:26 moritz on an unrelated note, the new sqlite4 design sounds a bit similar to the berkeleydb design
10:26 masak moritz: is that good or bad? :) I used berkeleydb, but a long time ago.
10:26 xfix However, Perl 5 is still being worked on.
10:27 xfix They still add new features.
10:27 masak xfix: hence "the biggest difference".
10:27 xfix Also, Python 3 is somewhat compatible with Python 2. People actually write polyglots.
10:28 xfix I doubt that writing polyglots for Perl 5 and Perl 6 would catch on, as they are very different languages.
10:28 lizmat just write code without hash accesses  :-)
10:29 masak people write code using Python bridges (such as six), but the result is basically a variant of Python 2. since you can't very well use the core features from Python 3 without breaking py2 compatibility.
10:29 xfix Which is silly.
10:29 xfix Python 3 has nice features like nonlocal.
10:30 xfix Either way, official stance is at http://legacy.python.org/dev/peps/pep-0404/ - no Python 2.8.
10:30 masak I know. that's what I meant by "denial/wishful thinking".
10:30 masak but thanks for clarifying, xfix. :)
10:31 xfix I'm not sure if Python 3 was even needed.
10:31 masak besides six, there's also 2to3 and http://python-future.org/
10:31 xfix Yes, print shouldn't have been a function.
10:31 xfix But was it worth breaking the compatibility?
10:31 masak say what you want about the transition, but the Python people have invested a lot in the tooling for handling it.
10:32 xfix But I guess that if it wouldn't have been done, the language would be full of aliases.
10:32 xfix Like the range() and xrange() in Python 2 (which are actually not identical). In Python 3, xrange() replaces range().
10:33 masak xfix: the nice thing about open source is that if you *didn't* think it was worth breaking the compatibility, then Python 2.7 is still out there, for free, available for download. that's not just a theoretical opportunity -- lots of people are making use of that.
10:33 xfix Well, either way, Python community is different to Perl.
10:34 xfix Perl community wants stable language, where new revisions will be compatible with old code.
10:34 masak I've found it more similar than I first assumed.
10:34 xfix However, in Python, while compatibility with old code is important, it's not as important as in Perl.
10:35 xfix Yes, there is __future__, but usually features from future are implemented in a release after adding them to __future__.
10:35 masak xfix: do you have an example in Python of where backwards compatibility was ignored or down-prioritized?
10:36 xfix Well, adding new keywords ;-).
10:36 xfix The difference isn't huge.
10:36 masak do you have a concrete example?
10:36 xfix However, say in Perl is still in feature module. It's just a keyword, but perhaps someone used say somewhere.
10:36 masak of adding a new keyword breaking backwards compatibility.
10:38 xfix There is http://legacy.python.org/dev/peps/pep-0291/, but it's old PEP.
10:39 xfix Compatibility is hard.
10:39 xfix Even adding // to Perl 5.10 was difficult, because of edge cases.
10:40 masak xfix: I don't see that PEP as an example of Python people discounting backwards compatibility -- rather the reverse.
10:40 xfix In Perl, it was once allowed to write "$$0", and it meant "${$}0". Someone depended on that, so the change was delayed.
10:40 masak xfix: what makes you say that in Python, backwards compat is "less important" than in Perl?
10:40 masak seems to me they take it very seriously.
10:41 masak and that was one of the reasons py3 was needed, to be that one clean break.
10:41 masak note that "new keywords" are often not a problem from a backwards-compatibility standpoint.
10:42 masak in earlier versions you couldn't use that keyword... so you didn't.
10:42 xfix In Python, variables don't have sigils.
10:42 xfix So impact of new keywords is bigger.
10:43 xfix https://docs.python.org/2.7/whatsn​ew/2.7.html#porting-to-python-2-7
10:43 lizmat m: say "foobar".IO ~~ :z   # this seems wrong to me
10:43 camelia rakudo-moar 166bf3: OUTPUT«False␤»
10:43 xfix Also, there are things like Python once allowing strings as exceptions.
10:43 xfix But now, it's an error, even in Python 2.
10:44 lizmat m: say "foobar".IO.say
10:44 camelia rakudo-moar 166bf3: OUTPUT«write string requires an object with REPR MVMOSHandle␤  in method print at src/gen/m-CORE.setting:14055␤  in method say at src/gen/m-CORE.setting:14067␤  in block  at /tmp/RMQ18eUVnC:1␤␤»
10:44 xfix TypeError: exceptions must be old-style classes or derived from BaseException, not str
10:44 lizmat m: say "foobar".IO
10:44 camelia rakudo-moar 166bf3: OUTPUT«IO::Handle<foobar>(closed)␤»
10:44 xfix But I find it interesting that Python still has old-style classes.
10:45 masak Python 2, yes.
10:45 FROGGS if I could vote I'd toss smartmatching against a pair for IO...
10:45 lizmat FROGGS: I'm starting to agree...  but we need a way to chain them
10:46 xfix The difference between old-style and new-style is very minor.
10:46 lizmat FROGGS: and probably disallow matching on :s
10:46 xfix For old-style classes, type(something) is instance. For new it's the class itself.
10:48 masak FROGGS: +1
10:48 xfix New style classes also behave somewhat differently with multiple inheritance.
10:48 masak FROGGS: smartmatching against pairs is a big hairy special case. it doesn't blend in naturally with the rest of the language.
10:49 masak FROGGS: I think a compact DSL for filetests might be a promising thing to try.
10:49 masak maybe using the `` syntax? :)
10:49 masak ooh, we could simply resurrect the Perl 5 syntax that way, making it very familiar to p5 people.
10:49 lizmat I was more thinking along the lines of the IO.x methods returning a special version of Bool
10:50 moritz masak: neither good or bad; just recently read about bdb design
10:50 xfix Isn't `` intentionally left unused?
10:50 masak lizmat: why a special version of Bool?
10:50 lizmat that would contain the stat buffer to which it applies
10:50 masak xfix: yes. *for DSLs*.
10:50 lizmat to allow chaining
10:50 lizmat "foo".IO.r.w.x
10:50 lizmat would return True if .r and .w and .x
10:51 lizmat if any method already returned False, the next method call would become a noop more or less
10:51 xfix Still, I have seen lots of scripts (long time ago, when Python 2.7 was new) that claimed to work only on Python 2.6, not Python 2.7.
10:51 masak if we do it syntactically, we can keep the methods the way they are, ditch the explicit conversion to IO, and still get the chaining.
10:51 lizmat masak: ?
10:52 xfix But I may be misremembering something.
10:52 masak lizmat: your example above would be something like 'if `-r -w -x "foo"` { ... }'
10:52 masak hm, modulo syntax.
10:53 xfix I don't like it. It looks like subshell syntax in Perl 5.
10:53 FROGGS can't we have a method call syntax that allows chaining in general?
10:54 araujo joined #perl6
10:54 araujo joined #perl6
10:54 FROGGS I mean, we have .^foo, .?foo ...
10:55 virtualsue joined #perl6
10:56 lizmat I'm trying to make an alternative for S03:2761
10:56 synopsebot Link: http://perlcabal.org/syn/S03.html#line_2761
10:57 * FROGGS .oO( say 42.<( [&&] <defined Str> )>
11:01 * moritz doens't find .r & .w & .x too obscure
11:03 lizmat moritz: what about !.r ?
11:03 moritz lizmat: what about it?
11:04 lizmat obscurity wise ?
11:04 moritz rather obscure, IMHO
11:04 moritz ! stands either for "private" or "not"
11:05 lizmat m: given "foo" { say !.say } # stands for "not"
11:05 camelia rakudo-moar 166bf3: OUTPUT«foo␤False␤»
11:05 lizmat m: given "foo" { say .say }
11:05 camelia rakudo-moar 166bf3: OUTPUT«foo␤True␤»
11:06 bowtie joined #perl6
11:06 moritz lizmat: I thought you proposed ! as a chaining character
11:06 lizmat nonono
11:06 moritz anyway, I don't find  .r & .w & !.x  obscure
11:06 lizmat no specific chaining character
11:09 xfix .r && .w && !.x is not that bad.
11:09 xfix Way better than it would be in PHP. is_readable($_) && is_writable($_) && !is_executable($_).
11:09 lizmat the relevant spec seems t least 5 years old
11:10 xfix Should Perl 6 have short syntax for that however.
11:10 xfix Functions like -r in Perl cause race conditions.
11:11 lizmat indeed, that was my other point: we should also make sure tha
11:11 lizmat t all of these chained file ops actually refer to the same stat buffer
11:11 lizmat to get consistent results
11:12 xfix Why do you need to know whether file is writable, when it can change just after the check?
11:12 lizmat well, to avoid trying, I guess
11:12 xfix I'm personally for trying to read the file, instead of checking if it's writable.
11:13 xfix It's always possible to catch the exception if it's not possible.
11:13 lizmat don't bother an expensive calculation if it appears you will not be able to write the result
11:13 lizmat or fail early
11:14 dalek roast: 9127829 | (Elizabeth Mattijsen)++ | S32-io/file-tests.t:
11:14 dalek roast: Fix test failure after IO.* changes
11:14 dalek roast: review: https://github.com/perl6/roast/commit/9127829fc8
11:15 xfix There are valid uses of checking permissions, like `ls` command. But for most cases, trying to do something on the file works better than checking if you can do something.
11:19 moritz a compromise would be to first open the file handle, then do the calculation, then write
11:19 xfix This isn't just a recommendation. This avoids real security problems, like CVE-2014-2906 I lately had in a project I work on.
11:23 lizmat S03:2797 states: The stat buffer will automatically be reused if the same object has recently been queried, where "recently" is defined as less than a second or so
11:23 synopsebot Link: http://perlcabal.org/syn/S03.html#line_2797
11:24 lizmat I think this is unnecessarily complex
11:24 lizmat I would propose the following:
11:24 sqirrel_ joined #perl6
11:25 lizmat the first .IO.* call returns a StatBool object that contains the stat buffer for the given path
11:25 lizmat the StatBool object *also* has the same .* methods as .IO gives, but instead of creating a new stat buffer, will work on the one in the object
11:25 lizmat this would allow you to "foo".IO.r.w.x
11:27 moritz IMHO that sounds too obscure, and in the end you're only fixing one specific case of chaining, and only 'AND' chaining
11:28 moritz is 'foo'.IO ~~ :r & :w & :x really that obscure/too much to write?
11:28 xfix It seems somewhat strange from me to use ~~ for something that should have been a method but whatever works.
11:29 lizmat moritiz: not necessarily
11:29 lizmat m: my $a=42; given $a { $_++ }; say $a
11:29 camelia rakudo-moar 166bf3: OUTPUT«43␤»
11:29 lizmat so you should be able to do:
11:29 lizmat given "foo".IO { when .r & !.w }
11:30 politico joined #perl6
11:30 moritz is anything stopping one from doing that right now?
11:31 lizmat no, but it would not be using the same stat buffer
11:31 lizmat and / or we would need to build a stat buffer cache
11:31 lizmat with expiration logic
11:31 moritz .IO could do that
11:31 moritz or
11:31 moritz 'foo'.path.stat
11:32 moritz given 'foo'.path.stat { when .r & !.w } # only one stat call
11:32 lizmat I don't see how .IO could do that without creating a different object
11:32 moritz IO.r could autovivify the cache
11:33 lizmat my point is that we shouldn't need a cache
11:33 moritz but I think it's cleaner with an explicit .stat call
11:33 lizmat a cache is trouble
11:33 moritz then let the user say .stat when they mean to make only one
11:33 lizmat actually, a .stat method is specced in S32
11:34 lizmat S32/IO: 593
11:36 SamuraiJack joined #perl6
11:37 Ven Imho .IO ~~ :e doesn't fit in. What are the other parts where the language has something like that ?
11:38 Ven If  were to think about it "how you think this is in p6" I'd say something like .has(:r, :w) which I can all() or any(), dunno
11:40 bowtie joined #perl6
11:40 lizmat In any case, the ~~ syntax is currently eating the fail when trying to do things to non-existent files
11:41 moritz Ven: ~~ :e is a fossil, IMHO. It comes from wanting to do file tests with ~~
11:41 moritz we should simply say "no" to that
11:41 * Ven watches as moritz says no
11:42 moritz (the idea was that p5's  -e / -r would best translate to :e / :r, and the ~~ would suplly the topic)
11:42 moritz NO
11:42 moritz there you go
11:42 moritz anybody opposed to unspeccing file tests as smart matching adverbs?
11:42 * lizmat gets the message and starts the chainsaw for S03
11:43 moritz lizmat: wait until TimToady had the opportunity to comment
11:43 * lizmat switches the chainsaw off for now
11:43 FROGGS nononono, quick! edit the spec as long as he is sleeping!! :P
11:44 moritz FROGGS: we can always restart the chainsaw... :-)
11:44 thou joined #perl6
11:44 FROGGS :o)
11:48 Ven Then, how do you write .r.w ? With the given etc
11:48 Ven makes it hard to use inline, no ?
11:49 Ven m: say so given 1 { true if .succ == 2 }
11:49 camelia rakudo-moar 166bf3: OUTPUT«[31m===[0mSORRY![31m===[0m�Word 'given' interpreted as a listop; please use 'do given' to introduce the statement control word�at /tmp/ymJyRUO5aN:1�------> [32msay so given[33m�[31m 1 { true if .succ == 2 }[0m�Unexpected block in infix po…»
11:49 Ven m: say do given 1 { true if .succ == 2 }
11:49 camelia rakudo-moar 166bf3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/DZgMp9wbktâ�¤Undeclared routine:â�¤    true used at line 1â�¤â�¤Â»
11:49 lizmat Ven: True ?
11:49 Ven well, it works anyway.
11:49 Ven lizmat: I just switched to /msg camelia at that point :-)
11:50 Ven I try not to spam *too much*
12:13 masak +1
12:13 masak er, stale backlog.
12:13 masak I was +1'ing moritz++'s "no" to ~~ :e
12:14 lizmat fwiw, +1 from me (in case that wasn't clear)
12:22 Timbus ok im trying something here. i want to 'tag' methods in a class with a trait, so that when i compose a role into it, it filters the tagged methods and adds some magic.
12:23 Timbus so in terms of an 'X Y' question: X: how do i get methods with a specific trait.
12:23 Timbus Y: is it 'correct' to be marking methods with a trait for such a thing
12:26 masak Timbus: one nice trick I learned from quietfanatic: 'my_trait sub foo { ... }'
12:26 masak Timbus: where my_trait is just a sub that expects a sub.
12:27 masak I'm guessing it works fine for methods, too.
12:27 Timbus haha. oh wow i didnt think of that
12:27 masak \o/
12:27 masak m: class C { my_trait method foo {} }; sub my_trait($m) { say "oh look, it's a $m.^name!" }
12:27 camelia rakudo-moar 166bf3: OUTPUT«oh look, it's a foo.^name!␤»
12:28 masak m: class C { my_trait method foo {} }; sub my_trait($m) { say "oh look, it's a $m.^name()!" }
12:28 camelia rakudo-moar 166bf3: OUTPUT«oh look, it's a Method!␤»
12:28 masak m: class C { my_trait method foo {} }; sub my_trait(Method $m) { say "this method has id $m.WHICH()" }
12:28 camelia rakudo-moar 166bf3: OUTPUT«this method has id Method|139751622209096␤»
12:32 FROGGS quietfanatic++
12:36 Timbus yeah this should work
12:40 masak it's an example of a bigger pattern that I *really* believe in these days.
12:41 masak which is, usually something can be solved by passing exactly the right kind of thing (at the right moment) to a function.
12:41 masak in this light, annotations are just functions.
12:44 FROGGS[mobile] joined #perl6
12:46 Timbus well, im now trying to tie it into IRC::CommandHandler that japhb++ wrote, so this is a bit more messy than just a .wrap
12:56 FROGGS[mobile] joined #perl6
13:00 krunen joined #perl6
13:06 Ven m: my @a = (1,2,3); say 1 == any(@a); say (1,2,3) == any($(@a))
13:07 camelia rakudo-moar 166bf3: OUTPUT«any(True, False, False)␤any(True)␤»
13:07 Ven m: my @a = (1,2,3); say so 1 == any(@a); say so (1,2,3) == any($(@a))
13:07 camelia rakudo-moar 166bf3: OUTPUT«True␤True␤»
13:07 Ven Interesting
13:11 cognominal joined #perl6
13:12 FROGGS joined #perl6
13:12 FROGGS[mobile] left #perl6
13:13 FROGGS[mobile] joined #perl6
13:14 zakharyas joined #perl6
13:14 telex joined #perl6
13:27 Timbus m: class C { my_trait method foo {} }; sub my_trait(Method $m) { say "id1: $m.WHICH()" }; say "id2: {C.^methods[0].WHICH}"
13:27 camelia rakudo-moar 166bf3: OUTPUT«id1: Method|140127522782432␤id2: Method|140127521195008␤»
13:27 guru joined #perl6
13:28 Timbus well, ok
13:32 thou joined #perl6
13:34 spider-mario joined #perl6
13:35 itz joined #perl6
13:36 kaare_ joined #perl6
13:40 masak has Grammar::Debugger bitrotted? https://gist.github.com/masak/d9bd70d9f196a39d30bb
13:40 masak jnthn: ^
13:40 * masak attempts to diagnose that error
13:42 Ven has $!auto-continue = False;
13:43 masak shouldn't be immutable.
13:43 masak that error looks very bogus.
13:43 Ven m: class A { has $!h; method modify { $!h = 5; } }; A.new.modify
13:43 camelia rakudo-moar 166bf3: ( no output )
13:43 Ven m: class A { has $!h = 'foo'; method modify { $!h = 5; } }; A.new.modify
13:43 camelia rakudo-moar 166bf3: ( no output )
13:43 * masak updates his Rakudo
13:44 Ven m: class A { has $!h = True; method modify { $!h = False; } }; given True { when True { given False { A.new.modify } } };
13:44 camelia rakudo-moar 166bf3: ( no output )
13:44 masak I think you'll have better luck golfing it down from the original error.
13:44 masak after first reproducing it locally.
13:45 flussence .oO( &Int::r = anon method { self +& 0o444 ?? self !! 0 };)
13:45 lizmat masak: could this have to do with Pair.key becoming immutable ?
13:47 Ven masak: maybe it happens because of when it's happening, too
13:49 masak lizmat: seems unrelated to me...
13:49 masak lizmat: this is a Bool in an attribute, not a key in a Pair.
13:51 lizmat it's just that it is one of the things that recently got immutable
13:59 masak *nod*
13:59 masak let's see what I find during the golf after the update.
14:02 timotimo we're keeping ~~ :foobar though, right? to call methods?
14:03 lizmat timotimo: could you give a use case ?
14:04 masak I wouldn't mourn it if it went away.
14:04 masak I like .foobar to call methods :P
14:04 timotimo m: given "HELLO" { when :lc<hello> { say "yup" } }
14:04 camelia rakudo-moar 166bf3: OUTPUT«yup␤»
14:04 timotimo ^- i like that
14:04 timotimo especially since you can give smartmatchers to many things
14:05 timotimo m: say "hello you!" ~~ :words(2)
14:05 camelia rakudo-moar 166bf3: OUTPUT«True␤»
14:06 masak m: say "hello you!" ~~ *.words == 2
14:07 camelia rakudo-moar 166bf3: OUTPUT«True␤»
14:07 masak that... seems a lot clearer to me.
14:07 masak and doesn't clutter up Pairs with an unrelated behavior.
14:07 masak m: given "HELLO" { when *.lc eq 'hello' { say "yup" } }
14:07 camelia rakudo-moar 166bf3: OUTPUT«yup␤»
14:07 FROGGS when :lc<hello> { say "yup" } <-- this was a WAT for a second to me
14:08 masak `~~ :words(2)` is not much better than `10.times` of Ruby fame, if you ask me.
14:08 masak we usually keep ourselves to a higher standard.
14:09 masak just try saying it out loud. "when you smartmatch on a Pair, the key is used as a method name of the method called on topic, and the value is used to smartmatch on the return value of the method call".
14:09 masak that makes almost no logical sense at all.
14:11 lizmat it also feels like the method lookup must be runtime
14:11 lizmat which would be bad for performance
14:11 lizmat I guess it's not so bad if you specify it like :foo
14:13 masak method lookups tend to be runtime, but yes, I see what you mean.
14:14 masak it's hard to optimize (I guess) becuase it's one extra level of indirection.
14:14 masak something that's much better indicated by just doing *.words == 2 -- that's a thunk right there.
14:20 ilbot3 joined #perl6
14:20 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
14:20 lizmat also, it feels like from the :foo syntax, that the value would be used as the *right* side of the ~~
14:20 lizmat when in fact it is the *left* side
14:21 lizmat otherwise ~~ :foo would *always* match, no?
14:21 masak right.
14:21 lizmat so, this seems to be from the symmetrical smartmatch days to me
14:21 masak it's just a weird bit of syntax, which -- as moritz suggested -- is mostly a casualty of trying to get things working with filetests.
14:22 masak not sure it's from those days. but it's definitely weird.
14:22 lizmat like ":2nd" that only works in matches ?
14:22 lizmat being short for :nd(2)
14:22 masak oh, :2nd I find acceptable. it's just sugar for... right.
14:22 masak and it doesn't only work in matches.
14:22 masak m: say (:2nd).perl
14:22 camelia rakudo-moar 166bf3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7xYuakzAvKâ�¤Malformed radix numberâ�¤at /tmp/7xYuakzAvK:1â�¤------> [32msay (:2[33mâ��[31mnd).perl[0mâ�¤    expecting any of:â�¤        number in radix notationâ�¤Â»
14:22 masak hrm.
14:22 lizmat my point  :-)
14:22 masak or maybe it does.
14:23 masak std: say (:2nd).perl
14:23 camelia std ec3d853: OUTPUT«ok 00:01 124m␤»
14:23 * masak submits rakudobug
14:25 masak just upgraded my Rakudo. Grammar::Debugger error persists. going to golf it after I submit this rakudobug.
14:28 masak the sad/funny thing: I brought in Grammar::Debugger because I was trying to understand a grammar that I'm creating in a project I'm building.
14:28 masak so this is some kind of yak shaving, I guess.
14:29 timotimo so many yaks in perl6 land :|
14:29 FROGGS masak: my bet it will be just a one line fix
14:31 * masak enjoys golfing something again
14:33 masak oh, "interesting" :/
14:33 masak it's related to publish_method_cache
14:34 FROGGS uhh
14:35 FROGGS if I had a power socket in this train I could bisect it
14:36 nwc10 you don't have a shell account somewhere else that you can outsource the bisect to?
14:37 FROGGS nwc10: no, I do that on my laptop exclusively
14:37 moritz FROGGS: are you interested in such an account?
14:38 FROGGS moritz: I have a feather account in theory... but I like my laptop more :o)
14:38 moritz ok
14:40 masak I think I've uncovered a second error under the first error.
14:40 masak maybe this will be a bigger clue for someone else than it is for me.
14:41 masak https://gist.github.com/masak/d9bd70d9f196a39d30bb updated with the underlying error.
14:41 masak I think the original error is caused as part of reporting the second one.
14:45 lizmat ah, maybe it is related to jnthn optimization where $_, $/ and friends are only allocated when used
14:45 masak https://gist.github.com/masak/d9bd70d9f196a39d30bb updated with the golfiest version of Grammar::Debugger that still triggers the error.
14:45 lizmat and *that* may be related to the async $_ re-use issue
14:45 masak jnthn: ^ when you have time, you definitely should have a look at this.
14:46 masak jnthn: near as I can tell, at some point Grammar::Debugger is trying to call .TOP on the wrong object.
14:46 masak lizmat: optimization and $/ sounds eerily correct.
14:47 masak "the most important point about cheating is not to get caught" -- this seems to be a case of getting caught.
14:47 timotimo oh
14:48 FROGGS joined #perl6
14:48 timotimo grammar::debugger could be optimized quite a bit if that $name eq any(<...>) would be turned into '...' | '...' | '...' | ...
14:48 FROGGS m: say Promise.^methods
14:48 camelia rakudo-moar 166bf3: OUTPUT«BUILD vow keep break result Bool cause then start in anyof allof <anon> <anon>␤»
14:48 timotimo does find_method get called often or just once per method?
14:53 masak lizmat: since 8584dbea is now the prime suspect, I'm going to build with 8584dbea^ and see if the error goes away. then with 8584dbea and see if it comes back.
14:54 politico left #perl6
14:57 timotimo oooh, the optimizer can't know that the grammar module wants to look at $! all over the place
14:57 timotimo and grammar::debugger expects $! to be available everywhere
14:59 masak $!, the exception variable?
15:00 timotimo er
15:00 timotimo $/ of course
15:00 masak I don't think it's that simple.
15:01 masak there's no mention of $/ in Grammar::Debugger.
15:01 masak nor in the golfed version I produced.
15:01 timotimo OK
15:06 FROGGS joined #perl6
15:14 Pleiades` joined #perl6
15:20 thou joined #perl6
15:22 masak interesting data point: problem persists at 8584dbea^
15:24 gtodd FROGGS: good to know that if there's ever a need for more Promise methods there's still some names to choose from:   ... oath covenant bood_oath  ... etc.
15:24 masak trying to build something from the beginning of this year.
15:25 FROGGS gtodd: heh, had to translate oath first :o)
15:27 gtodd FROGGS: I like how some of the reserved words in perl have an olde tyme religion twang to them ....
15:27 gtodd FROGGS: reminds us that typing commands into a computer is still an act of faith ;-D
15:27 FROGGS *g*
15:28 masak p: my $d = Date.new(:year(2012), :day(1), :month(12)); say ++$d
15:28 camelia rakudo-parrot 166bf3: OUTPUT«2012-12-02␤»
15:29 masak seems https://rt.perl.org/Public/​Bug/Display.html?id=121909 is fixed?
15:40 timotimo https://p6weekly.wordpress.com/2014​/05/26/2014-21-nlpw2014-recordings-​release-optimization-gtk-and-cairo/ - published
15:42 masak another data point: problem persists in a Rakudo from 2014-01-31.
15:43 masak so jnthn++'s recent optimizations are cleared of suspicion.
15:43 gtodd :)
15:44 masak going back another year to try to build there.
15:44 masak (how long has Grammar::Debugger been busted without anyone noticing?)
15:45 daxim joined #perl6
15:45 gtodd masak: https://rt.perl.org/Public/​Bug/Display.html?id=121909  doesn't error for me
15:46 Rotwang joined #perl6
15:46 masak gtodd: nor for me, above.
15:46 * masak closes ticket
15:48 FROGGS timotimo++
15:48 hoverboard joined #perl6
15:48 masak timotimo++ # https://p6weekly.wordpress.com/2014​/05/26/2014-21-nlpw2014-recordings-​release-optimization-gtk-and-cairo/
15:49 timotimo you're welcome :)
15:51 masak timotimo: the combination of the pronoun "I" and the lack of information of who authored the post is kind of weird.
15:52 timotimo it says timotimo at the way bottom, but i agree
15:52 masak timotimo: now I see it. yeah, it's a bit hidden.
15:52 timotimo fixed that
15:53 timotimo if i wanted to modify the style of my blog any more, i'd have to either host my own or pay for premium
15:53 FROGGS timotimo: only $80 :P
15:54 dj_goku timotimo++ always like the p6 wordpress posts even though post of it is greek to me.
15:56 FROGGS what a nice typo :o)
15:56 masak dj_goku: hi, nice to meet you :)
15:57 masak dj_goku: there used to be a time when I liked pdcawley++'s weekly Perl 6 updates, but didn't grok half of what went on (mostly Parrot-related).
15:58 dj_goku s/post/most/
15:58 dj_goku masak: hey!
15:59 timotimo maybe i should link the benchmarks i did yesterday
16:00 masak dj_goku: we may be occasionally incomprehensible, but we're also very friendly. let us know if/how we can help.
16:00 dayangkun joined #perl6
16:00 timotimo there we go.
16:03 dj_goku masak: thanks! I have to think of something to write or some interesting place in p6 world to work on.
16:04 masak it appears I simply can't build a rakudo-moar that's old enough *not* to have the Grammar::Debugger problem.
16:04 masak quick poll: has *anyone* used Grammar::Debugger on Rakudo Moar, and it worked?
16:06 timotimo i always used either Rakudo::Debugger or Grammar::Tracer
16:08 masak huh.
16:14 masak star: use Grammar::Debugger; grammar G { regex TOP { hi } }; G.parse("hi")
16:14 camelia star-m 2014.04: OUTPUT«[1mTOP[0mâ�¤>     r              run (until breakpoint, if any)â�¤    <enter>        single stepâ�¤    rf             run until a match failsâ�¤    r <name>       run until rule <name> is reachedâ�¤    bp add <name>  add a rule name breakpointâ�¤    bp list …»
16:14 camelia ..star-p 2014.04: OUTPUT«[1mTOP[0mâ�¤>     r              run (until breakpoint, if any)â�¤    <enter>        single stepâ�¤    rf             run until a match failsâ�¤    r <name>       run until rule <name> is reachedâ�¤    bp add <name>  add a rule name breakpointâ�¤    bp list …»
16:15 masak oh, right. that's the unmodded version. it has a prompt in the way.
16:15 timotimo it gets fed the lines :)
16:15 timotimo m: say lines
16:15 camelia rakudo-moar 166bf3: OUTPUT«There were three men came out of the West Their fortunes for to try And these three men made a solemn vow John Barleycorn must die  They've ploughed, they've sewn, they've harrowed him in Threw clouds upon his head And these three men made a solemn vow Joh…»
16:18 thou joined #perl6
16:19 masak m: module Foo { my class C is Mu is Metamodel::GrammarHOW { has $!x; method find_method($obj, $name) { return callsame if $name eq any <parse CREATE BUILD Bool defined MATCH>; -> $c, |args { self.y($name) } }; method y($) { $!x = 1 }; method publish_method_cache($) {} }; my module EXPORTHOW { }; EXPORTHOW::<grammar> = C }; import Foo; grammar G { regex TOP { hi } }; G.parse("hi"); say "alive"
16:19 camelia rakudo-moar 166bf3: OUTPUT«alive␤»
16:19 masak hm.
16:19 timotimo hmm. was stage mast always this fast? 13 seconds compared to 34 seconds stage parse
16:19 timotimo that's pretty good
16:22 timotimo m: say "that's roughly {20551 / 34} lines per second parsed (as well as objects and ASTs created)"
16:22 camelia rakudo-moar 166bf3: OUTPUT«that's roughly 604.441176 lines per second parsed (as well as objects and ASTs created)␤»
16:23 dj_goku should make test on rakudo, jvm, nqp have any failures?
16:24 dj_goku I am building Bajor.
16:24 timotimo "make test" should usually not
16:24 masak am I importing things right above?
16:25 zakharyas joined #perl6
16:29 FROGGS dj_goku: there should be no failure on all backends for nqp's tests and rakudo's tests
16:30 FROGGS dj_goku: though, I've seen a fail for a file test on nqp@parrot today
16:34 dj_goku alright once it finishes I'll pastebin the output.
16:35 masak star: my $*IN = role { method get() { "" } }; use Grammar::Debugger; grammar G { regex TOP { hi } }; G.parse("hi")
16:35 camelia star-p 2014.04: OUTPUT«[1mTOP[0mâ�¤> Cannot modify an immutable valueâ�¤  in block  at /home/p6eval/star-2014.04/lib/parrot/6.1.0/l​anguages/perl6/lib/Grammar/Debugger.pm:77â�¤  in block  at /home/p6eval/star-2014.04/lib/parrot/6.1.0/l​anguages/perl6/lib/Grammar/Debugger.pm:75â�¤  i…»
16:35 camelia ..star-m 2014.04: OUTPUT«[1mTOP[0mâ�¤> No such method 'STORE' for invocant of type 'Bool'â�¤  in block  at /home/p6eval/star-2014.04/languages/​perl6/lib/Grammar/Debugger.pm:77â�¤  in block  at /home/p6eval/star-2014.04/languages/​perl6/lib/Grammar/Debugger.pm:75â�¤  in method interve…»
16:35 masak ha!
16:36 * masak submits rakudobug
16:37 FROGGS dj_goku++
16:39 masak interesting, I thought this was a moar-only problem. but that's the same issue manifesting slightly differently on two VMs.
16:40 masak ok, doing a bisect using parrot as a backend.
16:40 zakharyas joined #perl6
16:42 FROGGS :/
16:47 zakharyas joined #perl6
16:50 denis_boyun_ joined #perl6
16:59 masak heh. I had half-forgotten how slow Rakudo-Parrot is to build.
16:59 bjz joined #perl6
17:00 timotimo i feel your pain :\
17:01 gtodd slow but thorough :)
17:02 timotimo its feet have been nailed in place
17:03 kaleem joined #perl6
17:03 gtodd hmm wasn't there a project once upon a time called rakudo-nodejs ?  to make rakudo-perl6 run in or on ES/JS ?
17:04 gtodd oh maybe it was rakudo-js ...
17:04 masak gtodd: there is a project to give Rakudo a JavaScript backend. haven't heard from pmurias lately, though...
17:04 timotimo yes, pmurias has been working on that
17:04 gtodd yeah found it sorry I thought it was some kind of node thing
17:05 timotimo it currently does target node.js
17:05 gtodd :-)  I just wanna takke look at it  I don't care if it works :-)
17:06 timotimo there's also perlito that can translate (among others) perl6 to js
17:07 PerlJam joined #perl6
17:07 gtodd right ... I'm assuming eventually rakudo will become the main way to program for the jvm .net and JS  ;-)
17:09 gtodd oh and parrot moar   ...
17:09 timotimo haha
17:09 timotimo scala is sort of eating our lunch on the jvm side
17:09 FROGGS joined #perl6
17:10 masak how so?
17:10 FROGGS jnthn: in case you are there: I'd like to talk about v5 and the nqp-code/QAST mix and how well it copes with panda...
17:11 gtodd after the whole world is using it to simplify development and save neuronal/synaptic effort there will be the big reveal ... "you are all using perl"
17:11 FROGGS it is like a can of worms on its own
17:11 timotimo masak: it seems to me that scala is being marketed (and accepted) as a java substitute for the jvm
17:11 gtodd timotimo: scala makes it possible to use java without feeling like you're ... using java?
17:12 timotimo that's right
17:13 gtodd timotimo: so rakudo/perl6 can do the same  ... and second mouse gets the cheese :-)
17:15 timotimo i feel like rakudo will feel like a foreign body on the jvm ecosystem for a long time unless we integrate much deeper
17:15 timotimo our serialization context stuff is quite weird to the jvm, afaict
17:16 bjz joined #perl6
17:19 xenoterracide_ joined #perl6
17:27 hoverboard joined #perl6
17:37 masak *sigh*
17:37 masak Grammar::Debugger fails for a Rakudo Parrot built from 2012-08-31.
17:38 masak going back one more year, from when Grammar::Debugger was created.
17:43 FROGGS O.o
17:48 mr-foobar joined #perl6
17:49 * masak gives up the bisect, due to lack of a 'good' endpoint
17:50 mr-foobar just thinking out loud, does perl6 provide internal DSL's like ruby but with more syntax flexibility or does perl6 make external DSL's like make easier ?
17:53 masak both :)
17:53 colomon what masak said.
17:54 colomon since grammars can process entirely different files or how the current source code is parsed.
17:55 mr-foobar can the external dsl access perl6's compiler state like globals, lexicals, caller .... ?
17:56 mr-foobar basically I can have an external DSL for card games but access perl6's shuffle
17:59 FROGGS I'd answer yes
18:00 masak mr-foobar: mixing Perl 6 itself with external DSLs is basically the high goal of slangs.
18:00 masak mr-foobar: and yes, lexical access (both ways) is a really big part of that.
18:01 masak mr-foobar: for example, I'd like a SQL slang that allows me to interpolate variables from my program, but in such a way that it escapes them along the way, keeping me safe from injection attacks.
18:01 FROGGS and that it complains at compile time about typos in SQL
18:02 masak mr-foobar: similarly, I might want the SQL slang to contain callbacks into Perl 6 code, just like regexes can. in that case, I want the variables and values from the query itself to be visible from within the callback.
18:02 mr-foobar masak: neat ! I found this http://www.chrisseaton.com/katahdin/ while googling for peg grammars.
18:03 mr-foobar I hate the fact that I can't use perl6 grammar as a standalone like lex :(
18:05 mr-foobar FROGGS: you the perl6 to js guy ?
18:05 FROGGS mr-foobar: no, that was pmurias
18:05 FROGGS I'm doing a Perl 5 slang
18:07 masak mr-foobar: if you want Perl 6 to act like a tokenizer, create a big honking protoregex called token, and overload it with all the multis you can think of. and then `regex TOP { ^ <token>* $ }` -- done!
18:09 mr-foobar masak: err ... not exactly I'm using nodejs(I still write perl:) these days, and I wanted to write a flexible pre-processor of sorts. perl6 rule engine would have been a great alternate for peg (what most current implmns use)
18:10 * mr-foobar mentally does every $lang <-> perl translation to grok
18:10 FROGGS jnthn: does that seems sensible? I'd need it to bind to $*MAIN in sub EXPORT of a slang written in P6: https://gist.github.com/FR​OGGS/100079bd927d239e8ab2
18:11 dmol joined #perl6
18:11 mr-foobar masak: the parser thing can be a part of the build system, independent of any other stuff
18:12 FROGGS ... use COBOL; # P6opaque: no such attribute '$!from'
18:13 FROGGS so I am crossing the NQPCursor/Cursor+P6opaque barrier here
18:14 Rotwang joined #perl6
18:18 colomon timotimo: cairo bindings?  he said with great interest
18:18 timotimo colomon: i can already have filled rectangles outputted to a png file!
18:18 timotimo are you excite yet? ;)
18:20 FROGGS rectangles \o/
18:20 FROGGS stuffed delicious rectangles \o/
18:20 timotimo colomon: got a use case i could work towards?
18:24 FROGGS jnthn: I think we "just" need to high-/lowlevelize cursors when calling a foreign statementlist (its input and output)
18:27 FROGGS jnthn: so, is it just about a slightly modified method LANG?
18:28 zakharyas joined #perl6
18:31 colomon timotimo: not really
18:34 adu joined #perl6
18:35 timotimo in the future i may also want to bind GtkSourceView
18:35 xenoterracide__ joined #perl6
18:47 molaf joined #perl6
18:49 zakharyas joined #perl6
19:02 ivanshmakov joined #perl6
19:09 xfix r-p: my $var = 42; say $var[0];
19:09 camelia rakudo-parrot 166bf3: OUTPUT«42␤»
19:10 xfix r-p: say 42[0];
19:10 camelia rakudo-parrot 166bf3: OUTPUT«42␤»
19:10 lizmat r-p: my $var = 42; say $var[1];
19:10 camelia rakudo-parrot 166bf3: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in method gist at gen/parrot/CORE.setting:12836␤  in method gist at gen/parrot/CORE.setting:1062␤  in sub say at gen/parrot/CORE.setting:13758␤  in sub say at gen/parrot/CORE.setting:13755␤  in blo…»
19:10 lizmat any scalar can be considered a 1-element array (in simple terms)
19:11 lizmat m: my $a = 42; say $a.elems
19:11 camelia rakudo-moar 166bf3: OUTPUT«1␤»
19:11 xfix I'm reading thru PHP fractal page.
19:11 xfix Yes, I know that in Perl 6 everything is a list, but it's still interesting.
19:11 lizmat xfix: no, it is not a list, but can be accesses as a on-element one
19:11 lizmat *accessed
19:12 xfix Ok, more like tuple, but still.
19:15 masak more like it intentionally confuses items and one-element lists in some situations.
19:30 sftp_ joined #perl6
19:42 prevost joined #perl6
19:46 dwarring joined #perl6
19:52 dalek roast: bee77ec | (David Warring david.warring@gmail.com)++ | integration/advent2010-day22.t:
19:52 dalek roast: adding 2010 advent day 22
19:52 dalek roast: review: https://github.com/perl6/roast/commit/bee77ec487
20:09 lizmat masak: just looking at https://github.com/lizmat and noted that under "popular repositories" it says "rakudo\nRakudo Perl - Perl 6 on Parrot"
20:09 lizmat surely that is outdated?
20:13 aboutGod joined #perl6
20:18 aboutGod left #perl6
20:21 masak well, it's not wrong, but it's incomplete :)
20:21 masak it looks right on this page: https://github.com/rakudo/rakudo
20:24 woolfy joined #perl6
20:26 thou joined #perl6
20:27 FROGGS lizmat: just update/delete your fork: https://github.com/lizmat/rakudo
20:28 denis_boyun joined #perl6
20:29 lizmat FROGGS:  aha...  :-)  from the pre-commit bit days
20:30 FROGGS must be, yeah :o)
20:31 masak FROGGS++ # mystery resolved
20:31 FROGGS *g*
20:32 lizmat *phew* for a moment I thought I had removed myself completely: http://github.com//lizmat
20:32 FROGGS hehe
20:33 masak we would miss you terribly
20:33 masak <3
20:33 FROGGS we would :o)
20:34 * lizmat would miss you all too  :-)
20:34 FROGGS *g*
20:35 breinbaas joined #perl6
20:35 bjz joined #perl6
20:36 rindolf joined #perl6
20:43 dj_goku http://paste.scsys.co.uk/384379
20:43 dj_goku rakudo bajor failed make test
20:45 FROGGS I've never seen rakudo-jvm failing the sanity tests O.o
20:46 FROGGS dj_goku: can you have a look at the readme? there is something about the memory limit for the jvm backend
20:46 FROGGS "If you get an out of memory error building rakudo on the JVM, you may
20:46 FROGGS need to modify your NQP runner to limit memory use. e.g. edit the
20:46 FROGGS nqp-j / nqp-j.bat executable (found wherever you installed to, or in the
20:46 FROGGS `install/bin` directory) to include `-Xms500m -Xmx2g` as options passed to java."
20:46 dj_goku well it just says when building rakudo not testing.
20:47 FROGGS yeah, can you still test that?
20:47 FROGGS otherwise run such a test directly, so we see some sort of error message?
20:48 dj_goku so do I need to rebuild rakudo?
20:48 dj_goku or can I just run make test again?
20:48 FROGGS just edit the nqp-j file (the one from your install/bin/ directory), and run make test again
20:49 FROGGS no need to rebuild
20:49 dj_goku ok, I change exec java -Xm512m to exec java -Xmx2048m -Xms256m
20:49 dj_goku err
20:50 dj_goku exec java -Xmx512m
20:50 FROGGS k
20:51 dj_goku uhhh
20:51 FROGGS hmm?
20:51 dj_goku when I manually ran 02 it passed test...
20:51 FROGGS but fails under `make test`?
20:51 dj_goku same with 03..
20:51 dj_goku yes
20:52 dj_goku I copy and pasted the command
20:52 dj_goku /Users/dj_goku/perl5/perlbre​w/perls/perl-5.18.2/bin/perl t/harness --jvm t/01-sanity/03-op-logic.t
20:52 FROGGS ahh, it runs the eval-server
20:53 Alula joined #perl6
20:54 dj_goku sorry?
20:55 FROGGS for the jvm backend it starts a server, and then it evals the test files instead of starting a jvm instance every time
20:55 FROGGS it is meant to reduce the test time
20:55 timotimo reduces it to a fraction of the time it would take without
20:55 FROGGS and it seems as if th eval-server on your boxed crashed after the first test
20:56 timotimo the eval server is kinda fiddly :(
20:56 FROGGS spectests without the eval server take about 2.8 hours on my box
20:57 FROGGS and perhaps like 30 minutes with the eval server, dunno exactly how much
20:57 FROGGS timotimo: I know... I tried to debug it, but that is not very easy when it only crashes after S12 (after 20mins)
20:58 timotimo yes ;(
20:59 dj_goku so how can I help?
20:59 dj_goku so are sanity checks what does it do?
21:02 dj_goku passed all the tests when I ran it with a for loop: http://paste.scsys.co.uk/384398
21:03 xenoterracide joined #perl6
21:04 FROGGS dj_goku: I don't know how to debug that (if that was the question)
21:05 FROGGS I have not much experience with java/jvm
21:06 SevenWolf joined #perl6
21:06 dj_goku so should I stick with moar?
21:06 dj_goku file a bug?
21:07 FROGGS I stick to moar, yes
21:08 FROGGS you can file a bug, but I fear that the information we have are not enough that it would be helpful
21:08 FROGGS gnight
21:08 dj_goku night
21:11 guru joined #perl6
21:12 timotimo gnite froggs
21:12 timotimo dj_goku: what kind of programming stuff do you usually do?
21:13 timotimo it's generally nice just to have people explore different use cases for perl 6 that haven't been tried much in the past
21:13 timotimo for example, we only just got a very simple gui toolkit binding for gtk3
21:14 dj_goku well I just switched jobs, so am not just learning python. Was writing perl5 for 2 years.
21:14 dj_goku Most ETL type processes.
21:14 timotimo not familiar with that term
21:14 dj_goku But one thing that has peaked my interest as of late is web dev and threaded/event based programming.
21:15 dj_goku Extract, Transform and Load
21:15 timotimo oh?
21:15 dj_goku So take a spreadsheet, do some calculations and load to a database
21:16 dj_goku but spreadsheet can be a number of inputs.
21:16 berekuk joined #perl6
21:16 timotimo ah, okay
21:16 timotimo we're decent at that, though we do not have excel writing/reading libraries yet
21:17 dj_goku I wouldn't mind looking into writing something like (pandas) python tool for reading/writing excel.
21:18 dj_goku I don't think we will switch to a different language. Pandas is very awesome for ETL.
21:22 timotimo i heard good things about pandas, but i haven't done anything with it yet, or looked at the api itself
21:24 dj_goku having something like that in perl would be awesome!
21:25 dj_goku I have only been using python for around 2 months and still a few things I don't like and miss from perl.
21:26 dj_goku One thing super nice with Pandas is no need to have excel installed it can read it somehow.
21:26 timotimo yeah of course
21:26 timotimo the file format is pretty much understood
21:27 timotimo libreoffice can read and write MS office documents, too
21:27 dj_goku ahh didn't know that.
21:27 dj_goku when I looked at perl modules they seemed lacking.
21:27 dj_goku so I never really looked at them.
21:29 lizmat there are Perl 5 modules that can read/write Excel sheets
21:29 lizmat https://metacpan.org/search?q=Excel
21:34 dj_goku timotimo: but really I have no idea what I want to write in p6.
21:35 pippo joined #perl6
21:35 timotimo i feel that way sometimes, too
21:35 timotimo fortunately, there's so much to improve on both rakudo and moarvm that i can always find something to do
21:38 pippo p6: my @a; @a.push: $("one,two,three".split(',')); say @a[0];
21:38 camelia rakudo-parrot 166bf3, niecza v24-109-g48a8de3: OUTPUT«one two three␤»
21:38 camelia ..rakudo-{jvm,moar} 166bf3: OUTPUT«␤»
21:38 timotimo oh, that's not supposed to be that way!
21:38 timotimo p6: my @a; @a.push: $("one,two,three".split(',')); say @a.perl;
21:38 camelia niecza v24-109-g48a8de3: OUTPUT«[["one", "two", "three"]].list␤»
21:38 camelia ..rakudo-{jvm,moar} 166bf3: OUTPUT«Array.new(().list.item)␤»
21:38 camelia ..rakudo-parrot 166bf3: OUTPUT«Array.new(("one", "two", "three").list.item)␤»
21:39 timotimo is the single-parameter candidate for push b0rked and the spec tests didn't find it?
21:40 pippo timotimo: It was working some time ago but now not. FROGGS suggested to bissect. Are there any instructions on how to do bissection? I volunteer... :-)
21:42 jnthn evening, #perl6
21:42 pippo o/ jnthn
21:42 timotimo ohai jnthn
21:42 timotimo just at the right time :)
21:44 jnthn oh no
21:45 * jnthn warns timo that he the whole evening with nøgne
21:45 dj_goku hmm: http://paste.scsys.co.uk/384432 getting a make write error.
21:45 Ulti BTW there was some discussion about when Grammar Debug was last working I used it on MoarVM only a week ago
21:45 Ulti it worked well enough to debug :S
21:46 pippo p6: my @a; @a.push: $(<one two three>); say @a[0];
21:47 camelia rakudo-{parrot,jvm,moar} 166bf3, niecza v24-109-g48a8de3: OUTPUT«one two three␤»
21:52 dalek rakudo/nom: 8518112 | (Elizabeth Mattijsen)++ | / (11 files):
21:52 dalek rakudo/nom: Clean out terms.pm
21:52 dalek rakudo/nom:
21:52 dalek rakudo/nom: Basically, move code for %*ENV, @*INC, $*ARGFILES into separate file (as I
21:52 dalek rakudo/nom: feel these may become require a class of their own in the future).  Move
21:52 dalek rakudo/nom: other PROCESS::<*> variables into a separate file.  Adjust Makefiles
21:52 dalek rakudo/nom: accordingly.  This should make it easier to adapt things in the future.
21:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/85181128a0
22:00 pippo p6: my @a; @a.push: $(("one,two,three".split(',')).push()); say @a[0];
22:00 camelia rakudo-{parrot,jvm,moar} 166bf3, niecza v24-109-g48a8de3: OUTPUT«one two three␤»
22:01 pippo m: "one,two,three".split(',').WHAT
22:01 camelia rakudo-moar 166bf3: ( no output )
22:02 pippo m: say "one,two,three".split(',').WHAT
22:02 camelia rakudo-moar 166bf3: OUTPUT«(List)␤»
22:02 pippo m: say "one,two,three".split(',').push().WHAT
22:02 camelia rakudo-moar 166bf3: OUTPUT«(List)␤»
22:05 * jnthn sees he needs to look at Grammar::Debugger... :)
22:07 pippo jnthn: and perhaps also at this vv :-)
22:07 masak jnthn: I'm still not sure what happened there.
22:07 pippo p6: my @a; @a.push: $("one,two,three".split(',')); say @a[0];
22:07 camelia rakudo-parrot 166bf3, niecza v24-109-g48a8de3: OUTPUT«one two three␤»
22:07 camelia ..rakudo-{jvm,moar} 166bf3: OUTPUT«␤»
22:07 masak jnthn: note Ulti's assertion above that it worked only a week ago. and my data that it *never* worked.
22:08 jnthn masak: OK. Was a GitHub issue filed on it?
22:08 masak jnthn: I'm not sure what's going on, to be honest. but it's fairly consistent, even on camelia.
22:08 masak jnthn: no, I filed a rakudobug.
22:08 jnthn ah...
22:08 masak jnthn: https://rt.perl.org/Ticket/Display.html?id=121966
22:08 masak jnthn: because the error is so weird I figure it's not the module's fault.
22:08 jnthn Well, could equally be the module no longer following some MOP detail that changed...
22:09 jnthn It was one of the very first MOP modules ever.
22:09 jnthn Like, #2, after Grammar::Tracer.
22:09 jnthn it may be a Rakudo issue, but it may be I did an evil cheat in the module too :)
22:09 BenGoldberg joined #perl6
22:10 masak right.
22:10 jnthn I won't get to it tonight.
22:10 dalek rakudo/nom: 6f40972 | (Elizabeth Mattijsen)++ | src/core/ (38 files):
22:10 dalek rakudo/nom: Make sure we don't do TAB's in core files
22:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6f40972fae
22:11 pippo good night #perl6
22:11 pippo left #perl6
22:12 jnthn lizmat++ # tabocide
22:12 dj_goku so even though I got the make write error. I am still able to pop into repl mode and play with perl6
22:12 BenGoldberg What am I doing wrong here? :
22:12 BenGoldberg p: say grep { True }, 5, 7, 9
22:12 camelia rakudo-parrot 166bf3: OUTPUT«5 7 9␤»
22:12 BenGoldberg Hmm... nevermind
22:12 BenGoldberg p: say grep { True }, 5, 7 ... 9
22:12 camelia rakudo-parrot 166bf3: OUTPUT«␤»
22:12 BenGoldberg That was it...
22:12 masak BenGoldberg: precedence.
22:12 jnthn BenGoldberg: Precdence?
22:12 lizmat BenGoldberg: my guess is that somehow the code is eaten by ...
22:12 masak p: say grep { True }, (5, 7 ... 9)
22:12 camelia rakudo-parrot 166bf3: OUTPUT«5 7 9␤»
22:13 BenGoldberg Ahh, thanks.
22:13 masak BenGoldberg: ... is fairly low.
22:13 BenGoldberg Ok
22:13 jnthn ^^^ is high precedence, by contrast
22:13 masak *groan*
22:14 timotimo %)
22:16 Ulti ahhh might have been Grammar Tracer I used...
22:17 Ulti rather than the interactive debug
22:17 masak ah.
22:17 Ulti I dont recall
22:17 masak that would explain things, perhaps. and restore us to the same universe again.
22:17 Ulti heh
22:17 Ulti where we can both not be wrong :)
22:18 dj_goku should I be working about: make: write error
22:18 BenGoldberg m: sub primes( $largest? = Inf ) {my @s;my @p;my $p = 3;my $q = $p * $p;my $cnt = 0;++$largest unless $largest % 2;my $test = sqrt($largest);2, 3, grep -> $n {if ( shift @s ) -> @stepsizes {push @s[ $_ ], $_ for @stepsizes;False;} elsif ( $n < $q ) {push @p, $n if $cnt++ <= $test;True;} else {--$p;push @s[ $p ], $p;$p = shift @p;$q = $p * $p;False;}}, ( 5, 7 ... $largest );}; say primes 999;
22:18 camelia rakudo-moar 166bf3: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 3…»
22:19 lizmat dj_goku: if you are on OS X, don't worry
22:19 lizmat it appears to be a bug in gmake that is tickled by rakudo
22:20 * jnthn would really like to find a workaround for that
22:20 jnthn It keeps biting people
22:21 jnthn It's not our fault in any way, but still...it'll bite us until this versin of OS X with a fualty gmake goes away :/
22:26 lizmat this doesn't bode well: http://gnu-make.2324884.n4.nabble.com/Segfault-w​ith-make-3-81-on-OSX-Leopard-x86-64-td2409.html
22:26 lizmat I still have make 3.81
22:30 dalek rakudo/nom: 7e0673c | (Elizabeth Mattijsen)++ | / (5 files):
22:30 dalek rakudo/nom: Move time to Instant
22:30 dalek rakudo/nom:
22:30 dalek rakudo/nom: This concludes the existence of terms.pm
22:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7e0673c6b7
22:31 masak 'night, #perl6
22:31 lizmat gnight, masak
22:32 timotimo gnite masak
22:36 lizmat masak: https://medium.com/p/2a7af4788b10   (Python 3 can revive Python)
22:36 lizmat nice pointers for Perl 6 :-)
22:37 dalek rakudo/nom: aeb3194 | (Elizabeth Mattijsen)++ | src/core/VM.pm:
22:37 dalek rakudo/nom: Remove superfluous code
22:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aeb3194854
22:45 jnthn sleep...maybe some patches tomorrow :)
22:45 jnthn (after teaching)
22:45 jnthn 'night
22:48 dayangkun joined #perl6
22:48 lizmat night jnthn
22:48 timotimo gnite jnthn
22:49 dalek rakudo/nom: b62552d | (Elizabeth Mattijsen)++ | src/core/ (2 files):
22:49 dalek rakudo/nom: Change to more readable PROCESS::<$FOO> format
22:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b62552dc5b
22:49 lizmat also sleep, so gnight #perl6!
22:51 timotimo ginte lizmat :)
23:10 BenGoldberg joined #perl6
23:55 xragnar joined #perl6

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

Perl 6 | Reference Documentation | Rakudo