Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-12-03

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:08 lue joined #perl6
00:11 cognominal_ joined #perl6
00:12 rurban joined #perl6
00:24 tokuhiro_ joined #perl6
00:35 dalek nqp/gh67-threads: 2032137 | rurban++ | src/pmc/nqplexpad.pmc:
00:35 dalek nqp/gh67-threads: mark enum_class_Proxy sections with PARROT_THREAD_H_GUARD
00:35 dalek nqp/gh67-threads:
00:35 dalek nqp/gh67-threads: Provide an experimental fallback "static int enum_class_Proxy = 0" for non-threaded code.
00:35 dalek nqp/gh67-threads: review: https://github.com/perl6/nqp/commit/2032137cc0
00:40 diakopter anyone know how recent p6eval's nqp is?
00:44 kcwu joined #perl6
00:46 diakopter rurban: are any of parrot's data structures guaranteed threadsafe?
00:46 diakopter user-exposed pmcs, I mean
00:50 diakopter for instance, can two interleaved pop() operations on a RPMCA return the same value? or two interleaved push() operations place into the same slot?
00:50 rurban joined #perl6
00:51 diakopter rurban: you might've missed my last few messages directed at you (it says read error)
00:53 aloha joined #perl6
00:58 anuby joined #perl6
01:05 sorear diakopter: parrot objects are immutable except in the thread that created them; mutate operations become message sends (and are not immediately visible in the mutating thread!)
01:05 sorear diakopter: they are not at all like the threads you're used to from C# et al
01:10 diakopter interesting
01:10 diakopter I'm trying to imagine the usefulness of that
01:11 sorear me too tbh
01:13 diakopter without reliable memory sharing, the threads aren't any better than javascript's web workers
01:14 diakopter does parrot expose any kind of lock or CAS/increment operations?
01:14 sorear no
01:14 sorear doesn't even make sense in the model
01:15 sorear since objects can only be mutated by one thread
01:16 diakopter right, I was just imagining it might expose a way to subvert the protection if you want to do your own synchronization
01:16 sorear fwiw, I don't think "reliable memory sharing" is necessarily a prerequisite for multiprocessor languages of the future
01:16 sorear what we're seeing now in truly big systems is message passing, not shared memory
01:17 sorear I *do* think that an application VM that fancies itself able to support all the languages of the world ought to provide a thread model at least as flexible as pthreads
01:19 grondilu Guys, I wrote a module for modular integers.  It works fine if I test it inside the module (adding some tests in the file), but addition fails to call the proper candidate if I call it from an other file (with use Modular).  https://gist.github.com/4192002   Can you have a look please?
01:19 * diakopter is loving the colorful branch diff in Git Extensions
01:20 diakopter grondilu: just addition or the others too?
01:21 grondilu diakopter: I tested only addition
01:21 diakopter did you try 'is export'?
01:21 * grondilu tries
01:22 grondilu lol, works
01:22 grondilu I had no clue I had to export these
01:23 * diakopter didn't either
01:26 PCChris joined #perl6
01:27 japhb sorear, what branch are you developing on?
01:28 japhb Nevermind, it appears to be WTF on my end
01:34 RandalSchwartz left #perl6
01:35 jvd__ joined #perl6
01:35 tokuhiro_ joined #perl6
01:39 dayangkun joined #perl6
01:57 rurban joined #perl6
02:07 hypolin joined #perl6
02:08 FROGGS_ joined #perl6
02:09 dalek perl6-bench: cbca934 | (Geoffrey Broadwell)++ | bench:
02:09 dalek perl6-bench: Take advantage of heredoc outdents ignoring blank lines
02:09 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/cbca934334
02:09 dalek perl6-bench: c60ac8b | (Geoffrey Broadwell)++ | bench:
02:09 dalek perl6-bench: WIP: Update all checkouts after fetching bare repo; doesn't work quite right yet
02:09 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/c60ac8b9a8
02:09 dalek perl6-bench: 9d20b5f | (Geoffrey Broadwell)++ | bench:
02:09 dalek perl6-bench: It appears that the fix for the previous commit is to clone the bare repo with --mirror instead of --bare
02:09 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/9d20b5fe86
02:09 dalek perl6-bench: 90aa996 | (Geoffrey Broadwell)++ | bench:
02:09 dalek perl6-bench: Fix braino in extract command resulting in not being able to pull branches in a component that don't exist in perl6-bench
02:09 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/90aa996ba1
02:09 dalek perl6-bench: ac75337 | (Geoffrey Broadwell)++ | bench:
02:09 dalek perl6-bench: Don't try to 'git pull' a tag
02:09 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/ac75337612
02:14 rurban diakopter: yes, parrot pmc's are thread-safe. I tested them against threadsanitizer. There were some outstanding esoteric issues.
02:33 diakopter rurban: threadsanitizer?
02:33 diakopter ok, it's a thing.
02:35 diakopter um, just because it passed this thing doesn't mean it has no races
02:35 diakopter (I mean, if you fully understand the code, that's another thing...) :)
02:36 diakopter but anyway, based on what sorear said, I still don't see a use case for parrot threads
02:37 rurban well, I trust the thread-sanitizer alto, and it only found 3 races.
02:37 diakopter what might one use parrot threads for?
02:42 grondilu joined #perl6
03:06 noggle_ joined #perl6
03:12 grondilu rn: sub postfix:<+>(Int $n) { $n ... * }; say (1+)[^4];
03:12 p6eval rakudo e2f2dc, niecza v24-5-g599cbcb: OUTPUT«1 2 3 4␤»
03:13 grondilu rn: sub postfix:<+>(Int $n) { $n ... * }; say "big enough" is 4 > 3+;
03:13 p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤Confused␤at /tmp/uzr518o2r3:1␤»
03:13 p6eval ..niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0m��Confused at /tmp/Ko166XT_i8 line 1:�------> [32m(Int $n) { $n ... * }; say "big enough" [33m�[31mis 4 > 3+;[0m��Parse failed��»
03:14 grondilu rn: sub postfix:<+>(Int $n) { $n ... * }; say "big enough" is 4 ~~ 3+;
03:14 p6eval niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0m��Confused at /tmp/syiupVv9Cp line 1:�------> [32m(Int $n) { $n ... * }; say "big enough" [33m�[31mis 4 ~~ 3+;[0m��Parse failed��»
03:14 p6eval ..rakudo e2f2dc: OUTPUT«===SORRY!===␤Confused␤at /tmp/jxWyttqEZw:1␤»
03:14 mikemol joined #perl6
03:32 * [Coke] had to install a bunch of stuff to get 'wget' on his mac box, wow. (trying to build niecza after a re-image)
03:33 sorear [Coke]: there's a commented out line in the makefile to use "curl" instead
03:34 [Coke] sorear: that would have involved more work for me, even though it would have saved my box some effort. I'm not complaining, just bemused. (reinstalling mono...)
03:35 orafu joined #perl6
04:04 rurban_ joined #perl6
04:28 tm_ joined #perl6
04:29 tcpr1347 joined #perl6
04:36 Psyche^ joined #perl6
04:38 fgomez joined #perl6
04:45 dalek perl6-bench: e836e54 | (Geoffrey Broadwell)++ | timeall:
04:45 dalek perl6-bench: New tests for azawawi++'s '1 == any(1..1000)' test (and scaling thereof), and loops optimized by sorear++ for Niecza
04:45 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/e836e54793
04:46 sorear japhb: the any test is slightly problematic because IIUC implementations are allowed to short-circuit it
04:47 sorear most of the order of evaluation stuff with junctions is unconstrained
04:47 japhb sorear, ah, interesting
04:47 japhb sorear, latest results at https://gist.github.com/4146931
04:49 japhb Significant speedups for niecza in concat, for, reduce range, any equals, and (importantly) rc-forest-fire.  Which means the micro-opt is making a visible difference to real code.
04:50 japhb NQP seems to actually be hitting its "target market", performance-wise, as it is limited in what it can do (lots of skips) but almost always fastest (or close to the leader) in the things it can do.
04:53 japhb phenny, tell azawawi your 1 == any(range) benchmark is now in perl6-bench, with two range limits to show scaling; but note that sorear says it may be somewhat problematic against smart implementations (but at least it notices the difference between smart and not)
04:53 phenny japhb: I'll pass that on when azawawi is around.
04:53 sorear japhb++
04:53 sorear japhb: did you look at the concat test I sent?
04:55 dalek perl6-bench: 8bef0a2 | (Geoffrey Broadwell)++ | TODO:
04:55 dalek perl6-bench: Add a TODO for investigating sorear++'s rakudo concat performance question
04:55 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/8bef0a2c14
04:55 japhb ^^ Nope.  :-)
04:56 sorear japhb: I was just wondering how fast/slow it was because I'm lazy and I don't have a rakudo handy
04:56 japhb How would you initialize $x and $y to get the effect you're looking for
04:56 japhb sorear, I'd be happy to answer, I'm just trying to figure out the best code for the test
04:57 sorear my $x = 'a'; my $y = ''; for 1..10000 { $y ~= ($x ~ $x) }
04:57 sorear the important part being that $x ~ $x allocates a *new* string
04:58 sorear I think there might be special optimizations in Parrot for extending the last-allocated string
04:58 japhb Ah, your initial message had $acc ~= ($x ~ $y)
04:58 japhb interesting
04:58 japhb OK, I'll do the one you just posted now.
05:05 dalek perl6-bench: 361a917 | (Geoffrey Broadwell)++ | / (2 files):
05:05 dalek perl6-bench: Convert sorear++'s concat suggestion into a real test
05:05 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/361a917308
05:07 japhb OK, actual bench run proceeding now.  It will be a while, as I don't currently have a way to easily just run a subset of the tests and replace just those tests in the analysis.  (It's easy to run all tests against a subset of the built compilers, but not the converse)
05:07 sorear I'm not sure it makes sense as one, it's rather contrived :D
05:08 japhb All the microbenchmarks are contrived.  But they're still telling us useful info.  :-)
05:08 japhb As people make more suggestions, I'll add to those.  I think the next big thing to do though is add some more app benchmarks.
05:09 japhb rc-forest-fire is a good first one, but I would like a good half-dozen or so, doing different things.
05:09 japhb (More would be better, I just don't feel comfortable with fewer than that)
05:10 japhb And I need to bring the other compilers (Perlito* and maybe even Pugs) into the current design.  I was able to benchmark quite a few Perlito* variants in the old system, I just haven't ported the configs yet.
05:11 japhb s/configs/configs, build instructions, etc./
05:15 rurban joined #perl6
05:28 am0c joined #perl6
05:47 kaleem joined #perl6
05:48 birdwindupbird joined #perl6
06:19 rking joined #perl6
06:29 rindolf joined #perl6
06:32 japhb sorear, updated results at https://gist.github.com/4146931 ; the new test is for_concat_2_1e5
06:33 japhb Given that niecza takes twice as long, and rakudo barely budges, I'm thinking rakudo is optimizing $x ~ $x perhaps?
06:40 Khisanth joined #perl6
06:44 daniel__ joined #perl6
06:44 Daniel___ joined #perl6
06:45 SamuraiJack joined #perl6
06:45 sorear japhb: what is the full code of the test, including the looping harness?
06:46 sorear d'oh, you already linked it
06:46 jeffreykegler joined #perl6
06:46 tattochan joined #perl6
06:48 sorear japhb: the concat tests are odd because they are quadratic in the iteration count.  I am still trying to figure out what is being measured here.
07:14 FROGGS joined #perl6
07:18 * grondilu submitted https://github.com/grondilu/libdigest-perl6/blob/master/META.info to the ecosystem
07:18 grondilu ^ hope it's ok
07:29 dalek ecosystem: 8d2e1dc | grondilu++ | META.list:
07:29 dalek ecosystem: Update META.list
07:29 dalek ecosystem:
07:29 dalek ecosystem: Hopefully the simple name 'Digest' should not conflict too much with other digests implementations on the ecosystem.  Let me know otherwise.
07:29 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/8d2e1dc539
07:29 dalek ecosystem: 4e72037 | (Aliaksandr Zahatski)++ | META.list:
07:29 dalek ecosystem: Merge pull request #16 from grondilu/patch-2
07:29 dalek ecosystem:
07:29 dalek ecosystem: Update META.list
07:29 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/4e7203754c
07:39 mhi^ joined #perl6
07:57 rindolf joined #perl6
08:04 rindolf joined #perl6
08:05 rindolf joined #perl6
08:07 rindolf joined #perl6
08:19 moritz good morning
08:19 rindolf moritz: morning.
08:19 moritz grondilu: you now have direct write access to the ecosystem (and a few other repos :-)
08:30 Kharec joined #perl6
08:33 tadzik hm. Maybe I should write Bailador-something for the advent calendar
08:34 tadzik or maybe that doesn't quite belong there
08:36 tadzik "I promise I’ll wrap it up in some nice Audio::Tag module and release it on Github shortly." I'm a filthy liar :>
08:39 moritz why'd you think Bailador doesn't belong into the p6advent?
08:39 rindolf joined #perl6
08:40 tadzik not sure. It's not really a core Perl 6 idea, and a quick glance doesn't show many any prior posts which showed off modules
08:40 tadzik aside from stuff like NativeCall, but that's pretty core now
08:40 tadzik but I look at Perl 5 calendar now, and see stuff like Path::Class described
08:41 Teratogen joined #perl6
08:41 Teratogen can I write android apps in Perl 6 yet?
08:41 tadzik I don't think that's possible now
08:41 xinming joined #perl6
08:42 Teratogen What applications will be written in Perl 6?
08:44 moritz which roads will you walk down?
08:45 tadzik :)
08:46 Teratogen do we have an eta on Perl 6.0 yet?
08:47 wamba joined #perl6
08:49 dayangkun joined #perl6
08:50 mhi^ Teratogen: http://faq.perl6.org
08:54 Kharec joined #perl6
09:03 cxs joined #perl6
09:22 felher Who did the latest Perl6 Advent Blogpost?
09:24 kresike joined #perl6
09:24 kresike hello all you happy perl6 people
09:24 tadzik hey hey
09:24 tadzik felher: the name sounds familiar, but I'm not sure
09:25 tadzik it's quite cool tho :)
09:25 felher tadzik: indeed. :)
09:27 felher "In general this requires solving the halting problem, which even Perl 6 compiler writers have trouble with." Hihi :)
09:37 cedric_ joined #perl6
09:37 cedric_ hello #perl6
09:37 cedric_ felher: me
09:37 felher cedric++ # very nice post :)
09:38 cedrvint thanks :)
09:46 fhelmberger joined #perl6
09:54 dakkar joined #perl6
10:57 bowtie joined #perl6
11:05 Su-Shee_ joined #perl6
11:18 masak yo, #perl6
11:23 grondilu damn, the Digest module I added today works when I test it manually but tests fail during installation with panda.
11:24 grondilu Tell me, when rakudo sees Foo.pir and Foo.pm in the same directory, it uses Foo.pir, right?
11:25 moritz if the timestamp tells it that Foo.pir is newer than Foo.pm, yes
11:25 moritz export RAKUDO_MODULE_DEBUG=1
11:26 tadzik grondilu: what's the failure?
11:26 moritz then you'll know what it loads
11:26 grondilu tadzik: first there is a warning:  t/ripemd.t .. use of uninitialized variable $y of type Nil in numeric context  in sub infix:<m+> at lib/Digest/RIPEMD.pm:11
11:26 tadzik grondilu: fails with panda, or fails when precompiled?
11:26 tadzik did you try just ufo && make test?
11:26 grondilu I think it fails when precompiled.  I'm currently checking this
11:26 tadzik okay
11:27 grondilu yes, I did compiled it manually and it failed.
11:29 * grondilu tries to rewrite the problematic code in more idomatic way.
11:30 * grondilu failed
11:30 grondilu it seems to fail with custom infix operator :(
11:31 moritz gah, I thought that was fixed :(
11:31 grondilu well it does compile, but does not run properly.
11:33 pecastro_ joined #perl6
11:35 masak [backlog] I think the halting problem is utterly fascinating.
11:35 masak it's like the perfect metaphor for struggle between good and evil.
11:36 masak infinitely running programs are evil. so you want to detect them and flag them as such.
11:36 masak but in order to detect them, you have to inspect them and (to an increasing extent, as they get more subtle) simulate them.
11:37 masak and at some point, the table switches and you become evil yourself. :)
11:37 masak just like the moral issues Batman faces with respect to vigilantism.
11:38 moritz or as Tolkien would put it, it corrupts you if you learn too much about the arts of the enemy :-)
11:38 masak yes, exactly.
11:40 masak a possible solution is to restrict the target language until it can do no evil. then the halting problem is solvable, because you've eliminated the possibility of evil. quite useful in sublanguages.
11:41 masak in the main slang you probably want to retain enough-power-for-evil.
11:42 moritz though you don't need much for turing completeness
11:43 moritz like, arrays, while and if
11:43 masak indeed.
11:43 moritz or recursion
11:43 masak or source code rewriting :)
11:43 moritz so it's often useful for declarative stuff
11:43 moritz (like regexes)
11:43 masak in 'arrays, while and if', the 'if' part feels redundant for some reason.
11:44 masak moritz: yes, or other state machine stuff. like sagas.
11:46 moritz masak: are sagas and workflows related?
11:47 * moritz wonders if he throws a category error right now
11:47 masak moritz: they are.
11:48 masak moritz: if I'm reading the currents right, the term 'saga' is on the way out and being replaced by 'process manager'.
11:48 masak (because 'saga' was originally something very specific having to do with long-running db transactions)
11:50 masak in the world of CQRS, a 'command handler' transforms commands into events -- so it can execute things on the client side. a 'saga'/'process manager' transforms events into commands. so it can execute things on the server side.
11:50 masak ss:g/ on / from /
11:51 moritz std: macro m { die 1 }; m
11:52 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0m�No delimiter found at /tmp/BGk5KDK2Qy line 1 (EOF):�------> [32mmacro m { die 1 }; m[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 43m�»
11:52 moritz that's interesting
11:52 moritz it tries to parse it as a regex
11:53 * masak submits rakudobug
11:53 moritz wait
11:53 * masak waits
11:53 moritz I'm trying to fix Null regex error messages
11:53 masak szabgab thinks my advent post is "'just' interesting" :/
11:54 masak clearly I must aim higher to satisfy this man :)
11:54 moritz and the test now fails because of my patch
11:54 masak oh, that was std, not rakudo.
11:54 moritz I'm not sure it's a bug
11:55 masak ok.
11:55 moritz m does introduce a regex
11:55 moritz and if you want to call something callable, you write it as m()
11:55 masak oh!
11:55 dalek nqp: 39ab731 | moritz++ | src/pmc/ (2 files):
11:55 dalek nqp: move UNUSED macro call after declarations
11:55 dalek nqp:
11:55 dalek nqp: makes -Werror=declaration-after-statement happy
11:55 dalek nqp: review: https://github.com/perl6/nqp/commit/39ab731de2
11:55 masak right, it's the last 'm' that fails.
11:56 dalek roast: 35dca83 | moritz++ | S06-macros/errors.t:
11:56 dalek roast: fix macro test to not confuse regexes and calls
11:56 dalek roast: review: https://github.com/perl6/roast/commit/35dca8348b
11:58 edsiper joined #perl6
11:59 edsiper left #perl6
12:01 replore_ joined #perl6
12:01 dalek nqp: 124bf55 | moritz++ | src/QRegex/P6Regex/Grammar.nqp:
12:01 dalek nqp: improve Null pattern detection a bit
12:01 dalek nqp: review: https://github.com/perl6/nqp/commit/124bf553bb
12:02 SmokeMachine joined #perl6
12:04 wamba joined #perl6
12:11 * grondilu found the real source of the bug
12:11 kaleem joined #perl6
12:12 grondilu It was actually the 'constant'
12:12 grondilu I made '%s/constant /my \\/'  and it worked
12:13 grondilu so it was not about the custom operators after all.
12:13 moritz grondilu: what constant value did you use?
12:13 moritz I mean, what was the type of the left-hand side?
12:13 moritz erm, right-hand side
12:15 grondilu arrays  (including and array of closures)
12:15 moritz interesting
12:16 grondilu yeah: All tests successful.
12:16 grondilu Files=2, Tests=3, 22 wallclock secs ( 0.09 usr  0.02 sys + 20.78 cusr  0.40 csys = 21.29 CPU)
12:16 grondilu Result: PASS
12:16 grondilu ==> Installing Digest
12:16 grondilu ==> Successfully installed Digest
12:16 grondilu :)
12:18 grondilu moritz: you can see the code here:  https://raw.github.com/grondilu/libdigest-perl6/master/lib/Digest/RIPEMD.pm   Whenever you see a 'my \something', it as a 'constant something' when it failed.
12:22 sftp joined #perl6
12:33 cognominal joined #perl6
12:38 nyuszika7h joined #perl6
12:40 nyuszika7h joined #perl6
12:41 tokuhiro_ joined #perl6
12:59 Kharec_ joined #perl6
13:07 grondilu S11:  « Every "UNIT" gets a lexically scoped "EXPORT" package automatically »
13:07 grondilu What's UNIT?
13:07 masak compilation unit, I think.
13:07 masak usually means "file".
13:08 masak but I think technically the code in an eval is a compilation unit, too.
13:10 felher Yep, a UNIT is a compilation unit. jnthn++ explained that to me once :)
13:10 huf oh. "wanna C. my UNIT" suddenly makes more sense...
13:10 huf the C means compile
13:12 grondilu r: module Foo { sub talk { say "hello" } }; import Foo <talk>; talk;'
13:12 p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤Unable to parse expression in quote:sym<apos>; couldn't find final "'" at line 2, near ""␤»
13:12 grondilu r: module Foo { sub talk { say "hello" } }; import Foo <talk>; talk;
13:12 p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&talk' called (line 1)␤»
13:12 grondilu r: module Foo { sub talk is export { say "hello" } }; import Foo <talk>; talk;
13:12 p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤Error while importing from 'Foo': no EXPORT sub, but you provided positional argument in the 'use' statement␤»
13:12 grondilu n: module Foo { sub talk is export { say "hello" } }; import Foo <talk>; talk;
13:12 p6eval niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method statement_control:import not yet implemented at /tmp/rMXElqcnjq line 1:�------> [32mort { say "hello" } }; import Foo <talk>[33m�[31m; talk;[0m��Unhandled exception: Unable to resolve method statement_level …
13:12 moritz juse say   import Foo;
13:13 grondilu but if I want to import only talk??
13:13 moritz then you need to export it with a separate tag, for now
13:13 bbkr r: "f\u00e5r" # weird message
13:13 p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\u'␤at /tmp/nR5xl03Ad9:1␤»
13:13 bbkr hm, fixed :)
13:13 moritz :-)
13:13 grondilu moritz: can you show me please?
13:14 moritz r: module Foo { sub talk is export(:talk) { say 'hello' } }; import Foo :talk; talk;
13:14 p6eval rakudo e2f2dc: OUTPUT«hello␤»
13:14 grondilu ok, thanks
13:14 moritz currently we don't have a spec that would permit both   use lib 'lib';  and   use Foo <&talk>   to work as you want it to, out of the box
13:15 grondilu ok
13:15 moritz or at least my interpretation of the current spec doesn't allow that :-)
13:17 grondilu what about EXPORT?  How does this work?  (I found S11 quite obscure)
13:17 grondilu r: module Foo { sub EXPORT { warn @_ } }; import Foo <foo bar>;
13:17 p6eval rakudo e2f2dc:  ( no output )
13:18 moritz r: module Foo { our sub EXPORT { warn @_ } }; import Foo <foo bar>;
13:18 p6eval rakudo e2f2dc:  ( no output )
13:18 moritz oh
13:18 moritz currently rakudo looks for the EXPORT sub outside of the package
13:19 grondilu weird
13:19 moritz direcly in the compilation unit in which the package is
13:19 moritz r: our sub EXPORT { warn @_ }; module Foo { }; import Foo <bar bza>;
13:19 grondilu r: module Foo {}; sub EXPORT { warn @_ }; import Foo <foo bar>;
13:19 p6eval rakudo e2f2dc:  ( no output )
13:19 p6eval rakudo e2f2dc:  ( no output )
13:19 grondilu lol same time
13:19 moritz works for lib/lib.pm6
13:21 replore joined #perl6
13:22 SmokeMachine joined #perl6
13:23 PacoAir joined #perl6
13:24 GlitchMr joined #perl6
13:25 masak TimToady: I don't think it's very evident what the Cool is doing in http://rosettacode.org/wiki/Same_Fringe#Perl_6
13:25 masak TimToady: thinking of changing the code to declare a constant END_OF_FRINGE = Cool. that would make it immediate what's going on.
13:30 cognominal joined #perl6
13:31 SmokeMac_ joined #perl6
13:35 PacoAir joined #perl6
13:41 Kharec joined #perl6
13:42 * jnthn home :)
13:43 masak \o/
13:43 jnthn Whew...no more trips abroad/far away for a few weeks :)
13:43 moritz welcome ~
13:51 masak nyuszika7h: aye, make evil go *away*! Today!
13:51 masak (for example by restricting to a non-Turing-complete subset)
13:52 jnthn That makes good go away too :P
13:52 masak shhh!
13:52 jnthn "Let's kill everybody! Then there'll be no bad people left!"
13:52 * jnthn pulls latest rpos
13:52 masak no no, it's not killing everybody. it's making everybody a soulless facsimile.
13:52 jnthn *repos
13:52 kaleem joined #perl6
13:53 jnthn People still use facsimile machines?
13:53 moritz of course
13:53 moritz though often split into scanners and printers
13:53 atrodo joined #perl6
13:54 masak and email.
13:54 [Coke] I wonder if any of you younguns have used a mimeograph machine. Ah, those were the days. :)
13:54 masak [Coke]: do they smell and produce purple copies?
13:55 nyuszika7h joined #perl6
13:55 [Coke] masak++
13:57 masak I've seen such copies occasionally. never the machine itself.
13:57 masak it's all very mysterious, come to think of it. :)
13:58 jnthn Are they the ones where you get high if you sniff the copies they produce?
14:01 masak some jokes I've heard have as a punchline that the teacher made too many mimeograph copies, yes.
14:02 masak oh, that's why the Swedish word for "handout copy" is "stencil".
14:05 jnthn Time to find out how spectest is... :)
14:06 wamba joined #perl6
14:11 cognominal joined #perl6
14:11 xinming_ joined #perl6
14:14 jnthn Hm. Failed test 9 in socket.
14:15 mtk joined #perl6
14:17 dalek mu: 0b3fb2b | duff++ | misc/perl6advent-2012/schedule:
14:17 dalek mu: [advent] pick a topic for Dec 8
14:17 dalek mu: review: https://github.com/perl6/mu/commit/0b3fb2b3fd
14:21 rurban joined #perl6
14:23 roman joined #perl6
14:26 cognominal joined #perl6
14:37 GlitchMr is-prime. I seriously wonder what can be said about it.
14:38 GlitchMr Because it's one of those obvious functions. It does exactly what it says on the tin.
14:38 hash_table joined #perl6
14:38 moritz GlitchMr: you'll find out in a few days, I suppose :-)
14:38 GlitchMr :-)
14:38 masak it's probabilistic. that's rather interesting, I would say.
14:39 GlitchMr Perhaps it's interesting just because it exists.
14:39 moritz well, one can also talk about interesting use cases
14:39 FROGGS joined #perl6
14:39 moritz why it was added
14:39 moritz properties of the algorithm
14:39 moritz benchmarks
14:41 GlitchMr Even Mathematica which claims to have everything doesn't have is-prime function.
14:42 xinming joined #perl6
14:42 moritz oh sure it has
14:42 moritz PrimeQ
14:43 masak moritz++
14:43 jnthn OK, question.
14:44 jnthn I'm gonna be spending some of my Rakudo tuits in the next weeks on trying to improve our errors in an STD-wards direction.
14:44 masak moritz: is that "Q" like the "p" (for predicate) in some Lisp programs?
14:44 jnthn How STD-y do we want the output to look?
14:44 moritz masak: yes
14:44 jnthn (I'm thinking, colors, the indicator for where the problem was, etc.)
14:44 moritz jnthn: very :-)
14:45 moritz seems like a good use for X::Syntax :-)
14:45 jnthn moritz: I know "very" in terms of content, I'm trying to get a feel for "very" in terms of appearance. :)
14:45 masak I'm fine with colors and stuff.
14:45 masak thanks for checking :)
14:46 * moritz too
14:46 jnthn OK
14:46 jnthn Some terminals don't do those by default
14:46 jnthn s/do/support/
14:46 masak how does STD handle that?
14:46 jnthn s/by default// :/
14:46 jnthn masak: afaik it doesn't try to.
14:46 masak hm.
14:46 stopbit joined #perl6
14:47 jnthn Point being, if I just start spitting out ANSI color codes in Rakudo, a bunch of Windows users will have a sad.
14:47 jnthn Same with the eject symbol, fwiw.
14:48 jnthn moritz: I'm pondering the @*WORRIES, which are more warning-ish. Any thoughts on whether those should be typed, and if so how we might go about it?
14:49 nyuszika7h joined #perl6
14:49 FROGGS W:: ? I believe warnings should be typed too, so you might handle them in your script
14:49 moritz jnthn: yes, I think they should be typed too
14:49 FROGGS I do that in Perl 5 by checking the error messages
14:50 FROGGS (and hope they dont change)
14:50 moritz jnthn: and I kinda think Exception should be an attribute that distinguishes warnings and exceptions
14:51 jnthn OK
14:51 FROGGS what about 'Warning is Exception' so that you can smartmatch against 'Warning' ?
14:53 moritz FROGGS: well, you can either distinguish exceptions and warnings by type, or allow people to the same types for exceptions and warnings
14:53 moritz FROGGS: and I kinda think that same type for exception and warning is quite cute, because sometimes the same operation can be fatal, and sometimes not
14:54 moritz FROGGS: and warnings and exceptions already go through different channels (die/CATCH vs. warn/CONTROL), so the need to distinguish the two doesn't arise very often
14:54 FROGGS k
14:55 FROGGS ya, think you are right
14:56 jnthn On color...we could always just disable it when OS is Windows, and allow an environment variable to override either way.
14:57 masak sounds good.
14:57 moritz (I've pondered the question on how to best to warnings for at least a year now)
14:57 moritz I'm still not entirely sure, otherwise I would have done it already :-)
14:57 jnthn :)
15:00 * masak .oO( like an anthropic argument for non-trivial problems )
15:01 masak s/argument/principle/
15:02 moritz :-)
15:03 moritz though there are probably still lots of LHFs in the codebase
15:04 masak yeah, the principle doesn't really hold up.
15:08 skids joined #perl6
15:20 Kharec joined #perl6
15:23 pmurias joined #perl6
15:24 skids o/
15:25 masak skids! \o/
15:28 rurban joined #perl6
15:31 SmokeMachine joined #perl6
15:38 kaare_ joined #perl6
15:41 skids So over the weekend I think I have finally tamed the bigint bitops beast.  See RT115958 and RT115966.  Is there someplace I can see which tests in roast are normally failed, so I don't have to keep swapping installs?
15:41 tokuhiro_ joined #perl6
15:42 moritz http://smolder.parrot.org/app/projects/details/5
15:43 pmurias joined #perl6
15:44 skids Ah, so pretty much most fails are fudged.  Thanks moritz++.
15:44 brrt joined #perl6
15:45 confused joined #perl6
15:46 confused Hello there
15:46 masak hi, confused.
15:46 kaleem joined #perl6
15:46 bluescreen10 joined #perl6
15:47 confused Hi masak, glad someone's here to answer
15:47 masak oh, there's many of us.
15:47 masak just fire away.
15:47 confused ooh :D
15:47 * masak .oO( confused but intrigued )
15:48 confused :D
15:48 confused I was just searching about Perl 6
15:48 confused I like Perl but a lot of people just persue me to use python
15:48 hash_table joined #perl6
15:49 masak confused: Python is a nice language with a good community. so is Perl.
15:49 masak they have different strengths, and focus on slightly different things, language-wise.
15:50 masak people often put Python and Perl on different ends of a "strictness/freedom" spectrum.
15:50 masak but the truth is that you can be sloppy or structured in either language.
15:51 masak of course I could shout out "use Perl, because it's the *best* alternative". but I sincerely don't believe it's that simple.
15:51 masak I believe it's more about the people you meet who are willing to help you understand programming and grow as a developer.
15:51 masak and you're about as likely to do that on #python as here.
15:52 masak maybe the chemistry will click a little more in one of the channels. depends on who you are, and who's around to answer, I guess.
15:52 masak confused: does that start to answer your doubts?
15:53 masak I mean, I could shower you with awesome Perl 6 features, already implemented, that are a joy to use. (and I will, if you ask.)
15:53 masak but in the end, your use of a language will only be as good as the community you interact with.
15:54 confused Really Thank you masak, recently I had to work on some projects that couldn't be done easily in PHP
15:54 masak heh :)
15:55 huf ... must... resist... snark...
15:55 confused :D
15:55 masak yeah, I was wondering "how do I say this in a diplomatic way?" :)
15:55 confused Back in the past I hade a very little experience with Perl 5
15:55 huf "what, like use the ternary op in a sane way?"
15:55 huf .. i failed
15:55 rurban joined #perl6
15:55 masak PHP is a Turing-complete language. that's a compliment, right?
15:56 huf turing-completely-insane
15:56 masak seriously though, I believe you can make even badly designed languages do awesome things. it just takes more discipline.
15:56 masak and won't necessarily be as fun.
15:57 confused Right, but I believe some projects can be easily done in Perl or maybe python
15:57 masak aye.
15:57 confused I was wondering which one is easier to learn for a PHP programmer ?
15:58 masak oh, that's probably Perl, actually.
15:58 masak since PHP is partly based on Perl.
15:58 huf early bits of php sortof resemble perl
15:58 masak yeah.
15:58 masak PHP has sigils. well, sigil.
15:58 huf but leave out the usefulness, so you have to learn a lot to recognise it :)
15:58 confused aha, Right
15:58 huf eg: php has die(), but it shares nothing with perl's die
16:00 masak confused: make sure you find good Perl resources early. like perldoc. or the Camel book. it really helps to explain the language so you can use it well.
16:01 confused Thank you masak and huf
16:01 skids .oO(does python use context as much as Perl5/Pelr6?  Maybe that's one difference.)
16:01 confused umm
16:02 masak skids: I think list/scalar context is quite particular to Perl 1..5
16:02 confused Why you peaople stick with Perl ?
16:02 GlitchMr die() in PHP is alias for exit()
16:02 masak confused: I stick with Perl because it solves my problems well, and in ways that I like.
16:02 GlitchMr Because Rasmus was too lazy to actually implement exceptions
16:03 masak confused: this goes even more for Perl 6, which is why I stick around on this channel :)
16:03 skids I stick with it beause when I solve a new problem in Perl, generally I learn something about programming.  When I solve a problem in another language, I learn about that language's nuances, but not much about programming.
16:03 masak skids: that's a nice way to put it.
16:03 confused aha
16:04 GlitchMr I like Perl because you can declare variables in it
16:04 masak Perl generally exposes internal piping and mechanisms in such a way that you can use it when needed.
16:04 masak GlitchMr: wtf
16:04 huf masak: that's a pretty big PLUS in perls
16:04 masak GlitchMr: as opposed to... Brainfuck?
16:04 huf precious few languages have what i call actual scope :)
16:04 confused Thanks, but don't you think things can be done faster in  Python?
16:04 GlitchMr And unlike other dynamic languages, unknown variables can be catched at compile time.
16:04 masak confused: the question is too vague.
16:05 masak confused: *I* certainly can't do things faster in Python :P
16:05 confused :D
16:05 GlitchMr In other languages, program works... until it will notice... oops, you haven't declared that_vairable
16:05 confused I understand
16:05 masak confused: a competent Python programmer can do many things quickly, I guess. so can a competent Perl programmer.
16:06 masak really, there isn't a world of difference between the two languages on a deeper semantic level.
16:06 huf well, except for scoping rules i think
16:06 masak the differences are in syntax, philosophy, module availability, and what huf said :)
16:06 huf but it really only comes up in corner cases and during debugging
16:06 GlitchMr Actually, Python took certain features from Perl
16:06 huf so it's not too large
16:06 huf GlitchMr: who didnt :)
16:06 GlitchMr And both of those languages took features from AWK
16:06 masak ...among others.
16:07 masak it's not like awk is the only language Perl was inspired by :)
16:08 skids I still remember as a n00b extolling the virtues of awk to a not-n00b and being told "dude, learn Perl". :-)
16:08 GlitchMr Perl 6 seems to mainly take features from Perl 5 and functional languages.
16:08 GlitchMr Mostly Haskell
16:08 GlitchMr Oh, and Ruby
16:09 masak oh, and Smalltalk.
16:09 GlitchMr And of course one of most important languages: Smalltalk
16:09 cognominal joined #perl6
16:09 masak oh, and Lisp/Scheme.
16:09 felher What about LISP? Multi-Dispatch with nextsame seems similar to defgeneric. Not to forget about macros..
16:10 * felher was too slow.
16:10 masak :)
16:10 jnthn felher: CLOS has been something of an influence in MOP-space too :)
16:10 skids Ruby has some nice terse syntax that looks and feels right, e.g. pointies, so now we have here it too :-)
16:10 masak skids: Ruby does it with chutes, not pointies, though :)
16:10 GlitchMr Do you mean ->? I thought it was from CoffeeScript.
16:10 felher jnthn: yeah, and that :)
16:10 masak (syntax borrowed from Smalltalk, I think)
16:10 GlitchMr But CoffeeScript was HEAVILY inspired by Ruby
16:11 GlitchMr and Python
16:12 confused Guys I forget to mention Django that powers python in web development
16:12 GlitchMr Actually, I don't know what language had -> / => first.
16:12 confused Anything simillar to this for Perl?
16:12 hoelzro Catalyst
16:12 masak confused: Catalyst is the similar one.
16:13 TimToady um, we didn't borrow -> (as lambda) from anyone else
16:13 TimToady we picked it because it looks nice in a for loop
16:13 masak CoffeeScript is definitely newer than Perl 6's lambdas :)
16:13 GlitchMr C# had => in 2007.
16:14 masak confused: there's also Mojo and Dancer. all three worth looking into, I think.
16:14 TimToady => as "association' came from Ada a long time ago
16:14 confused umm Thanks a lot, I'll certainly give it a try
16:14 confused aha
16:14 masak confused: \o/
16:14 confused Thank you masak :D
16:14 masak confused: when you come back next time, will you still have that nick? :)
16:15 masak or will I recognize you as "no_longer_confused" or something? :)
16:15 confused I don't think so :))
16:15 masak great. :)
16:15 GlitchMr TimToady: C# uses => for lambdas
16:15 masak take care, confused. good luck on your quest.
16:15 TimToady masak: re Cool, I hope to get rid of the need for a sentinal entirely by providing a longest-list zip somehow
16:16 GlitchMr I'm talking about lambdas, not association.
16:16 TimToady gotcha
16:16 masak TimToady: yeah, that would also solve it.
16:16 confused Thanks masak, you too.
16:16 GlitchMr I wonder what language had used arrow for lambdas first.
16:17 hoelzro Haskell uses them, doesn't it?
16:17 TimToady well, a lof FP languages use something like that between the args and the definition rather than out front
16:17 hoelzro \x -> x + 1
16:17 GlitchMr oh wait, I was wrong
16:17 TimToady like that
16:18 GlitchMr C# had them in 2006
16:18 GlitchMr Haskell
16:18 GlitchMr Interesting
16:18 masak doesn't Prolog have arrows, kinda? something like :-
16:19 TimToady again, goes after the args
16:19 hoelzro that's a rule declaration
16:19 TimToady not before
16:19 TimToady "this is defined as that"
16:19 GlitchMr Today everybody wants arrows
16:19 GlitchMr Even Java
16:19 TimToady -> as P6 lambda was picked in 2001 or so
16:20 TimToady we didn't need a definitional "colon" since we already have curlies for that
16:20 masak hoelzro: there's at the very least an interesting isomorphism between anonymous functions and Prolog-y proof implications.
16:20 GlitchMr A04?
16:21 arnsholt masak: Yeah, that's an arrow pointing the other way
16:21 GlitchMr A04 has showed grep -> $x { $x eq 3 } @list syntax
16:21 masak hoelzro: see also https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence
16:21 TimToady GlitchMr: was really chosen before A04 came out
16:21 masak arnsholt: right.
16:21 GlitchMr That today needs one more comma.
16:22 * masak .oO( needs more cowbell )
16:22 hoelzro interesting
16:22 hoelzro I hadn't thought of it that way before
16:22 GlitchMr std: grep -> $x { $x eq 3 } @list
16:22 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/DJmFe5f8EP line 1:â�¤------> [32mgrep -> $x { $x eq 3 }[33mâ��[31m @list[0mâ�¤    expecting any of:â�¤      horizontal whitespaceâ�¤  infix or meta-infixâ�¤    infixed function…
16:22 masak hoelzro: especially interesting as the fields are separate but keep enriching each other.
16:22 GlitchMr std: grep -> $x { $x eq 3 }, @list
16:22 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable @list is not predeclared at /tmp/1WR7r5YX2a line 1:�------> [32mgrep -> $x { $x eq 3 }, [33m�[31m@list[0m�Check failed�FAILED 00:00 45m�»
16:24 arnsholt masak: Other way, since Prolog is built on (a limited subset of) FOL, and the LHS is implied by the RHS
16:25 alester joined #perl6
16:26 kresike bye folks
16:27 masak arnsholt: makes sense. still seems like the "right" way, compared to subroutines and their contents.
16:27 masak oh, by the way, my halfpoint grant report has been published by TPF: http://news.perlfoundation.org/2012/12/grant-report-implementation-of.html
16:30 [Coke] sadly, www.perlfoundation.org still nonresponsive.
16:30 [Coke] phenny: tell allison sadly, www.perlfoundation.org still nonresponsive.
16:30 phenny [Coke]: I'll pass that on when allison is around.
16:30 [Coke] (my only known board contact who is regularly on IRC)
16:32 tokuhiro_ joined #perl6
16:35 brrt left #perl6
16:35 cognominal joined #perl6
16:36 GlitchMr Weird. Perl Foundation works for me.
16:36 cognominal joined #perl6
16:37 pmurias japhb: how difficult would it be to add nqp-js to the benchmarks?
16:38 pmurias does passing the (stack of) contextuals as an argument to method calls seem like a sane way of implementing them in javascript?
16:39 dalek rakudo-js: 249e8b2 | (Paweł Murias)++ | / (3 files):
16:39 dalek rakudo-js: [nqp] work on code blocks in rules
16:39 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/249e8b2678
16:39 dalek rakudo-js: 590611b | (Paweł Murias)++ | / (3 files):
16:39 dalek rakudo-js: [nqp] implement simple ~~, pass test 45
16:39 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/590611b5ee
16:44 pmurias contextuals being nowdays called dynamic variables ;)
16:45 pjcj_ joined #perl6
16:46 Su-Shee_ joined #perl6
16:46 Woodi_ joined #perl6
16:48 jnthn pmurias: Or more generally, some object representing the context overall.
16:54 sizz_ joined #perl6
16:58 skids joined #perl6
16:58 Khisanth joined #perl6
17:00 cognominal joined #perl6
17:02 Woodi_ joined #perl6
17:03 Woodi joined #perl6
17:26 MayDaniel joined #perl6
17:29 spider-mario joined #perl6
17:32 japhb pmurias, probably not hard at all.
17:32 japhb I guess this is a good indication it's time to bring forward all the P6->JS compilers
17:38 japhb pmurias, Do you have a separate nqp-js, or just a rakudo-js that only compiles NQP so far?
17:45 japhb sorear, the concatenation tests need not be quadratic; a sufficiently ropey string implementation (or sufficiently lazy optimizer) could do better.  But even with a quadratic core implementation, there's the question of that pesky constant factor, and what the GC pattern is, and so on.
17:46 japhb Mind you, I certainly won't object to producing more microbenchmark variants that help to elucidate underlying problems more clearly, but right now I'm still in the "80% of the value for 20% of the work" phase.  ;-)
17:47 jnthn japhb: Any ideas on why Rakudo is so bad on foreset-fire?
17:47 diakopter japhb: does it concatenate randomlygenerated strings or substrings of the same string? or just the same string?
17:47 jnthn I guess I could go profiling for answers... :)
17:48 japhb jnthn: It's been a while since I looked, give me a sec ... or that, yes.
17:49 japhb diakopter, It's just concatenating constant strings onto an accumulator right now.  VERY optimizeable, but right now we were still getting past the opposite problem of it being nearly pessimized.  :-/
17:50 japhb jnthn, ISTR Rakudo being significantly faster running the NQP variant than the Perl 6 variant, but it's been quite a while since I did that comparison.
17:50 diakopter japhb: are you testing building an array then joining also?
17:50 japhb jnthn, but in any case, that might give a good indication of where the problem lies.
17:51 japhb diakopter, I do have a push test, but not a push-then-join test.
17:51 dalek Perlito: d604898 | (Flavio S. Glock)++ | / (4 files):
17:51 dalek Perlito: Perlito5 - js - fix an infinite recursion in the runtime
17:51 dalek Perlito: review: https://github.com/fglock/Perlito/commit/d6048988be
17:51 jnthn japhb: OK
17:51 * jnthn -> shopping
17:51 diakopter japhb: I'm curious how push-then-join does vs. concat
17:51 japhb diakopter, yes, that's a good test, definitely
17:51 SamuraiJack joined #perl6
17:52 diakopter I mean, presumably it'd be faster, but conceivably not
17:53 dalek perl6-bench: de30f37 | (Geoffrey Broadwell)++ | TODO:
17:53 dalek perl6-bench: Add high-priority TODO items for folding JS-targeting compilers into new component framework, and add pmurias++'s *-js compilers
17:53 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/de30f37095
17:53 dalek perl6-bench: 9438b6d | (Geoffrey Broadwell)++ | TODO:
17:53 dalek perl6-bench: Add a couple more top tasks to the TODO, thanks to jnthn++ and diakopter++
17:53 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/9438b6d31a
17:55 diakopter japhb: is there a "closure creation/invocation" test? also argument-passing (different numbers of arguments)? also lexical/dynamic lookup (vary depth?)
17:55 * japhb smiles with glee
17:56 japhb Nope, but adding them to the TODO!
17:56 diakopter also raw object (bare class) creation?
17:56 diakopter then class with various attributes
17:57 diakopter also, doing a single unicode property lookup in a regex a bunch of times
17:59 japhb diakopter, for the bare class creation, did you mean '(class :: {}).new()' ?
17:59 diakopter then a few more.. to see how much each one adds
17:59 diakopter no, just a class, then calling new on it a bunch of times
17:59 diakopter but yeah that too
18:00 diakopter are there multimethod dispatch benchmarks?
18:00 diakopter I can imagine that varying a lot across implementations
18:00 japhb Quite.
18:01 diakopter er, not just multimethod; multi too
18:01 japhb (And no, not yet, I've just started the job of filling out the benchmark suite, and I'm pretty much doing it as-requested, so I hit the things people care about first.)
18:02 japhb OK, any more, diakopter?
18:02 diakopter hrm
18:03 diakopter man-or-boy 1..20 }:>
18:03 Kharec joined #perl6
18:03 [Coke] japhb: is there a web site showing results?
18:03 diakopter some implementations will be so slow only the first few of 1..20 will be tolerable to run
18:03 [Coke] (or data file?)
18:03 diakopter some might get to 20 with ease
18:04 japhb [Coke], right now no site.  I've just been gist'ing the results I've gotten after each run.
18:05 japhb The analysis program can spit out raw text, ANSI-colored text, HTML snippets, HTML full pages, and JSON, so I'm happy to feed some place that wants to host.
18:06 dalek perl6-bench: e8cff27 | (Geoffrey Broadwell)++ | TODO:
18:06 dalek perl6-bench: Expand tagged test concept in TODO, add diakopter's test ideas
18:06 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/e8cff27340
18:06 diakopter man or boy tests extremely deep closure creation
18:06 japhb diakopter++ # all the good ideas
18:06 japhb And argument passing, as I recal
18:06 japhb er recall
18:07 diakopter string split would be good, both fixed string and regex
18:09 dalek perl6-bench: 0d9bfc1 | (Geoffrey Broadwell)++ | TODO:
18:09 dalek perl6-bench: More diakopter++ ideas, and clarify one of them
18:09 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/0d9bfc1f95
18:10 japhb I feel a tiny bit like Audrey right now.  Except she would actually implement features as people talked about them, rather than just adding them to the TODO.  :-)
18:11 diakopter attribute assignment and retrieval is very important, too. including int for those that support it
18:14 diakopter ok, I can't think of any more for now
18:16 dalek perl6-bench: c023c1f | (Geoffrey Broadwell)++ | TODO:
18:16 dalek perl6-bench: Yet another diakopter++ idea
18:16 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/c023c1fff5
18:16 japhb Thank you very much, diakopter!
18:16 diakopter yw
18:45 colomon r: sub foo($a) is cached { $a == 1 ?? 1 !! $a * foo($a - 1); }; say foo(10)
18:45 p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<is>'; none of these signatures match:␤:(Mu:U $child, Mu:U $parent)␤:(Attribute:D $attr, :rw(:$rw)!)␤:(Attribute:D $attr, :readonly(:$readonly)!)␤:(Attribute:D $attr, :box_target(:$box_target)!)␤:(Routine:D $r, :rw(:$rw)!)␤:(Rout…
18:45 GlitchMr .u Ǫ
18:45 phenny U+01EA LATIN CAPITAL LETTER O WITH OGONEK (Ǫ)
18:46 GlitchMr .u į
18:46 phenny U+012F LATIN SMALL LETTER I WITH OGONEK (į)
18:47 GlitchMr .u y̨
18:47 phenny U+0079 LATIN SMALL LETTER Y (y)
18:47 phenny U+0328 COMBINING OGONEK (◌̨)
18:49 GlitchMr perl6: 'y̨'.chars.say
18:49 p6eval rakudo e2f2dc, niecza v24-5-g599cbcb: OUTPUT«2␤»
18:49 awwaiid_ what does that mean? 'y'.chars.say
18:49 GlitchMr It should be 1, right?
18:49 GlitchMr awwaiid_: are you need to Perl 6?
18:50 awwaiid_ no
18:50 GlitchMr Well
18:50 awwaiid_ just don't know what .chars does
18:50 GlitchMr .chars is a method of string
18:50 GlitchMr It shows how many graphemes string has... or as in current implementations - characters.
18:50 ingy joined #perl6
18:50 awwaiid_ ah. and 'y̨' isn't 'y'
18:51 GlitchMr s/characters/Unicode characters/
18:51 GlitchMr No
18:51 awwaiid_ though they look awefully similar in my font :)
18:51 GlitchMr It's LATIN SMALL LETTER Y and COMBINING OGONEK
18:51 GlitchMr Unicode doesn't have LATIN SMALL LETTER Y WITH OGONEK, so COMBINING OGONEK has to be used
18:51 GlitchMr And yes, it's real letter
18:52 awwaiid_ ok, I getchya. Though I would have thought that .chars would return a list of the chars of a string (like split // in perl5)
18:52 GlitchMr It's used in Tutchone and Elfdalian
18:52 GlitchMr awwaiid_: That's .comb
18:52 awwaiid_ oh, I thought .comb was for hair
18:52 GlitchMr http://duckduckgo.com/?q=perl6+comb
18:55 GlitchMr https://perl6advent.wordpress.com/2009/12/08/day-8-comb-your-constraints/
18:56 tadzik parrot merged threads! Parrot merged threds!
18:56 GlitchMr :-)
18:57 GlitchMr Threads? In Parrot.
18:57 GlitchMr That's interesting.
18:57 GlitchMr Are those green threads or native threads?
18:58 GlitchMr (I guess those are green, but still)
18:58 diakopter no
18:58 diakopter native-ish
18:59 diakopter tadzik: but the threads aren't really useful by Perl 6 since they can't mutate shared data, afaict
19:00 diakopter so auto-parallelization doesn't seem like it could work
19:00 GlitchMr Well, I don't like threads.
19:00 GlitchMr It's hard to control them.
19:00 tadzik try Go
19:00 tadzik Go is easy to gontrol
19:00 GlitchMr coroutines?
19:00 tadzik yeah, they call it goroutines
19:00 larks threads aren't that hard...
19:01 GlitchMr I thought that it was named Issue 9.
19:01 GlitchMr Looks like they haven't changed the name ;-).
19:01 tadzik they aren't much different themselves, it's the philosophy of communicating with them that's interesting and sort of innovative
19:01 GlitchMr I like Node.js
19:02 GlitchMr https://en.wikipedia.org/w/index.php?title=Issue_9&amp;redirect=no
19:02 GlitchMr Or perhaps it's just an alternate name for Go language.
19:03 moritz fwiw the past three days of p6advent bloggging each had at least 750 views per day
19:04 GlitchMr :-)
19:04 masak GlitchMr: they're not going to change the name. that other guy's language may have been first, but it's not as well known as Google's language.
19:04 masak it wouldn't be the first time a more successful language uses a catchy name that a less successful language used first.
19:04 GlitchMr I would like Go more if it would be named Issue 9
19:04 masak that is duly noted.
19:05 tadzik it would be easier to Go-ogle
19:05 moritz and the post for tomorrow is already scheduled for publishing
19:05 moritz so far, so good
19:06 masak so, who wants slot #17? :) https://github.com/perl6/mu/blob/master/misc/perl6advent-2012/schedule
19:06 masak only two slots left, not counting the special Slot 24. grab them while they're free!
19:07 colomon ooo, 17 is a good number.
19:07 moritz nr: say 17.is-prime
19:07 p6eval rakudo e2f2dc, niecza v24-5-g599cbcb: OUTPUT«True␤»
19:07 colomon glad they agree on that one.
19:07 flussence if nobody's taken them by next week, I might think about it...
19:07 moritz same here :-)
19:08 * moritz takes a look into the topic-brainstorming file
19:08 tadzik hm
19:08 tadzik I could write something too :)
19:09 masak tadzik! you're not on the advent calendar yet!?
19:09 tadzik nope
19:09 tadzik must've missed it
19:09 GlitchMr Looks like he isn't
19:09 masak grab both slots, then.
19:09 tadzik gather and coroutines are equal in power
19:09 tadzik please please somebody grab thease
19:10 colomon have we had a post on Set, Bag, etc, yet?  If not I'll seriously consider that.
19:10 masak I've already grabbed too many subjects :)
19:10 masak colomon: I don't think we so.
19:10 masak do*
19:10 spider-mario_ joined #perl6
19:10 moritz gather and coroutines are equal in power -- maybe a topic for sorear++?
19:11 masak tadzik: it's fairly clear to me that gather and coroutines are equal in power. why are you eager to see that topic written up, ooc?
19:11 tadzik masak: because I don't know how to do this :)
19:12 tadzik I tried once or twice and failed, I need an a-ha moment :)
19:12 masak hm.
19:12 masak to a first approximation, what is spelled 'yield' in some languages is spelled 'take' in Perl 6.
19:13 skids FWIW if you look back in the git specs repo, for the copy of S07 from before that file was replaced, there is a writeup on turning feeds + gather/take into a lua-ish coroutine construct.
19:13 tadzik well, my usecase is/was: I wanted to have some MuEvent::HTTP thing, and didn't want to reimplement LWP::Simple
19:13 dalek mu: 0aa6073 | colomon++ | misc/perl6advent-2012/schedule:
19:13 dalek mu: Update misc/perl6advent-2012/schedule
19:13 dalek mu:
19:13 dalek mu: Claimed topics for my posts
19:13 dalek mu: review: https://github.com/perl6/mu/commit/0aa6073600
19:13 tadzik so, I probably want to inject my own Socket, which will not block on recv() or such
19:14 masak r: sub pausable { take 1; say "fee"; take 2; say "fie"; take 3; say "fum" }; my @a := pausable; say @a[$_] for ^4
19:14 p6eval rakudo e2f2dc: OUTPUT«take without gather␤  in block  at src/gen/CORE.setting:429␤  in block  at src/gen/CORE.setting:479␤  in sub pausable at /tmp/djUgVTdK_o:1␤  in block  at /tmp/djUgVTdK_o:1␤␤»
19:14 masak oh, hm. :)
19:14 masak r: sub pausable { take 1; say "fee"; take 2; say "fie"; take 3; say "fum" }; my @a := gather pausable; say @a[$_] for ^4
19:14 p6eval rakudo e2f2dc: OUTPUT«1␤fee␤2␤fie␤3␤fum␤Nil␤»
19:14 masak tadzik: there you go. equal in power.
19:14 dalek mu: 450f525 | GlitchMr++ | misc/perl6advent-2012/schedule:
19:14 dalek mu: <tadzik> please please somebody grab thease
19:14 dalek mu: review: https://github.com/perl6/mu/commit/450f525793
19:14 dalek mu: 125e942 | GlitchMr++ | misc/perl6advent-2012/schedule:
19:14 dalek mu: Revert "<tadzik> please please somebody grab thease"
19:14 dalek mu:
19:14 dalek mu: But really, I would like you to make post on Perl 6 advent :-).
19:14 dalek mu:
19:14 dalek mu: This reverts commit e4cbe765f80f9351e00cd24fab0fb8aeb03dd2a6.
19:14 dalek mu: review: https://github.com/perl6/mu/commit/125e942ef2
19:14 GlitchMr I've claimed those
19:15 tadzik hm
19:15 TimToady the second main difference is that 'gather' is not bound to a subroutine-like invocation
19:15 tadzik I'll have to experiment with that
19:15 TimToady one might say that gather/take are coroutines without the routines
19:16 masak GlitchMr: it strikes me that instead of pushing two commits that cancel each other, pushing zero commits is more efficient. :)
19:16 moritz they are simply co :-)
19:16 masak 'co' is my mental concept for the greenthreadish thing that's necessary to simulate gather/take style control flow.
19:16 cognominal joined #perl6
19:17 * TimToady finally has his email flowing again, after a week or so of network sidegrades
19:17 GlitchMr Hmmm... couldn't somebody implement coroutines in Brainfuck
19:17 TimToady well, the speed was an upgrade...
19:17 TimToady and wall.org now has a static address \o/
19:18 au ip-reuse for chart-reuse! \o/
19:19 masak au++ :P
19:19 masak GlitchMr: not without simulating much of the runtime.
19:20 GlitchMr But technically, Brainfuck is Turing complete.
19:20 mjreed joined #perl6
19:21 leont joined #perl6
19:25 masak not just technically. it *is* Turing complete.
19:25 masak but that doesn't mean that you get away cheaply when you want to emulate nonexistent functionality.
19:25 moritz it's just not Turing-fun-complete :-)
19:25 masak in fact, it means very little at all.
19:26 GlitchMr But it could be used to implement any algorithm
19:26 GlitchMr Even if it would be REALLY slow
19:26 masak yes. we already said that.
19:27 GlitchMr It even would be possible to let's say... make Python interpreter in Brainfuck... if somebody would be bored enough
19:27 masak the fact that we are repeating ourselves must mean that we, too, contain a looping construct. :)
19:27 cognominal joined #perl6
19:28 tadzik GlitchMr: it has about as much sense as writing it using 1s and 0s in x86 assembly
19:28 tadzik (or so I think:))
19:28 GlitchMr Except... assembly is better language, isn't it?
19:28 GlitchMr I even have done some short programs in assembly
19:30 masak given the choice, I'd pick x86 assembly language, yes.
19:35 fgomez joined #perl6
19:39 cognominal joined #perl6
19:43 flussence why's "when" allowed as a postfix, but not "default"?
19:45 GlitchMr Because default as postfix doesn't make sense.
19:45 GlitchMr What would it do?
19:46 GlitchMr And most importantly, you cannot put anything in default section
19:46 GlitchMr default 2 { } is wrong as default only takes code block
19:47 moritz well, that would just mean it'd have to be    say 42 default;
19:47 GlitchMr This is ugly
19:48 leont Wouldn't «say 42 » be the same?
19:48 GlitchMr If I would see 'say 42 default' in code, I would instantly convert it to block
19:48 masak yes :)
19:49 moritz nr: given 42 { default { .say }; say 'still here' };
19:49 p6eval rakudo e2f2dc, niecza v24-5-g599cbcb: OUTPUT«42␤»
19:49 fowe joined #perl6
19:50 moritz so, 'say 42' isn't the same as the hypothetical 'say 42 default;'
19:51 masak moritz: arguably, it is.
19:51 masak moritz: because statement-mod 'when' doesn't have that exit effect.
19:51 masak nr: given 42 { say "hep!" when 42; say "still here" }
19:51 p6eval rakudo e2f2dc, niecza v24-5-g599cbcb: OUTPUT«hep!␤still here␤»
19:51 masak moritz: see? :)
19:51 masak it would make sense for 'default' not to have it either.
19:51 masak which would make statement-mod 'default' a no-op.
19:52 TimToady it's equivalent to say 42 when *;
19:52 masak right.
19:52 masak (by the way, this is a semantic difference between Perl 5 and Perl 6, AFAIU. Perl 5 statement-modifying 'when' statements do exit the surrounding topicalizer block.)
19:54 TimToady yes, and I still think Perl 6 has the right end of that decision
19:54 * masak too
19:58 not_gerd joined #perl6
19:58 not_gerd hello, #perl6
20:01 masak not_gerd! \o/
20:01 fgomez joined #perl6
20:01 not_gerd apparently it's T-4h until the advent post goes live
20:02 whooguy joined #perl6
20:02 * not_gerd thinks it would be nice if wordpress showed what time it thinks it is right now...
20:02 GlitchMr http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3775
20:02 GlitchMr Seriously? Storing passwords using ROT-25?
20:03 jnthn ROT-25?!
20:03 tadzik safer than ROT-13, you know
20:03 tadzik bigger number
20:03 jnthn "It's securer than ROT-13 'cus it's obscurer"
20:03 GlitchMr It could be decoded using ROT-1
20:04 TimToady IBM -> HAL
20:04 tadzik "Folder Lock 5.9.5 and earlier uses weak encryption (ROT-25)"
20:04 * masak .oO( and if ROT-25 is not secure enough, just apply it, say, 13 times )
20:04 tadzik the new definition for "understatement"
20:04 GlitchMr No!
20:04 GlitchMr Apply it 26 times
20:04 GlitchMr It will be very safe
20:04 TimToady twice as good as 13
20:04 masak why not go the whole hog and apply it 52 times, then.
20:05 GlitchMr Good idea
20:05 masak we are agreed.
20:05 GlitchMr I should use it... wait... why it doesn't seem to work
20:05 TimToady you have to apply it once per week, all year long
20:05 GlitchMr It's probably a bug in my algorithm
20:05 GlitchMr I get exactly what I've put as input
20:05 TimToady that's how you get 52
20:05 TimToady you shouldn't get that till 52 weeks from now
20:06 TimToady you've heard of Sleep Sort...well, this is sort of Sleep Crypt
20:06 GlitchMr tr/B-ZA/A-Z/ for 1 .. 52; # I guess I'm doing it right
20:07 TimToady tr/B-ZA/A-Z/, sleep 7*24*3600 for 1..52
20:07 GlitchMr oops
20:07 GlitchMr I think I have bug in my algorithm
20:08 GlitchMr You see, it modifies $_, not my string
20:08 GlitchMr And $_ is in range of 1 .. 52
20:08 GlitchMr (except it should cause error in actual Perl)
20:09 TimToady also, you have to put it into a different thread if you want to do something else while this thread sleeps for a year
20:10 dalek perl6-roast-data: 87c2418 | coke++ | / (4 files):
20:10 dalek perl6-roast-data: today (automated commit)
20:10 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/87c2418490
20:10 dalek perl6-roast-data: 682cdd6 | coke++ | / (3 files):
20:10 dalek perl6-roast-data: today (automated commit)
20:10 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/682cdd6778
20:10 GlitchMr put aren't threads eval?
20:10 GlitchMr but*
20:10 skids .oO(encode 26*2 alpha as 52 playing cards?)
20:10 tadzik it's like saying "Considered Harmful"
20:11 GlitchMr ROT-26 Considered Harmful
20:11 tadzik I have an impression that these days, the "considered harmful" postfix is a label saying "don't treat the poster seriously"
20:11 TimToady "Considered Harmful" Considered Harmful
20:11 GlitchMr But well, I guess you could make ROT-26 function and call it identity function
20:11 jnthn std: say "foo\y";
20:12 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized backslash sequence: '\y' at /tmp/J3ASCM1zOB line 1:�------> [32msay "foo\y[33m�[31m";[0m�Check failed�FAILED 00:00 41m�»
20:12 GlitchMr The problem is that it only works on strings
20:12 TimToady it's an autoquine
20:12 huf i think it's just code for "i dont like it" :)
20:12 GlitchMr PHP Considered Harmful
20:12 skids considered harmful meme is considered harmful because considered harmful.
20:13 diakopter Considered Considered
20:13 GlitchMr ""Considered Harmful" Considered Harmful" Considered Harmful
20:13 huf kohn-cider
20:14 GlitchMr Perl 7 Considered Harmful
20:14 masak no, Perl 7 considered perfect.
20:14 masak read your apocalypses, young whippersnapper :)
20:14 TimToady Perfectly harmless, anyway...
20:14 masak :P
20:15 huf hmmm..... 6 feels a bit diabolical
20:15 huf if 7 is perfect
20:15 leont Chtulhu considered harmful
20:15 GlitchMr Perl 4 Considered Harmful
20:15 GlitchMr Ok, other version
20:15 GlitchMr Is it now fine?
20:15 TimToady well, 4 is the number of "death"
20:15 huf in japan?
20:15 GlitchMr in Japan?
20:16 huf havent heard it connected in western culture
20:16 tadzik Chi
20:16 TimToady who said anything about western culture?
20:16 tadzik or was it Shi?
20:16 tadzik it appeared in Usagi for sure :)
20:16 huf shin
20:16 huf oh wait, 4 is maybe shi
20:16 huf but wasnt "shin" the word for death?
20:16 skids shi schmi.
20:16 TimToady which is why they use 'yon' instead
20:17 TimToady and 'nana' instead of 'shichi'
20:17 huf yes, much like some people use 14 for 13
20:17 TimToady you need a hobbit for that though
20:17 huf is that like a nanobit?
20:18 TimToady hobbits aren't that small...
20:18 huf they're smaller than they used to be
20:18 huf we know that much from the books :)
20:18 TimToady sure, but Bilbo is hardly playing a bit part
20:18 tadzik ici, ni, san, shi. RIght, 4
20:19 diakopter Sam sure grew a lot
20:19 TimToady only sideways
20:19 TimToady it's Merry and Pippin that got taller
20:19 tokuhiro_ joined #perl6
20:19 huf grew up to join the aristocracy instead of leading the glorious hobbit's revolution against it
20:20 TimToady Sam never drank the Entwash, or whatever it was called
20:20 huf draught
20:20 kurahaupo joined #perl6
20:21 TimToady .oO(Ent Koolaid)
20:21 masak not unless the Ents were a death cult.
20:21 huf heh. even the ents drank the elven koolaid tho
20:21 * TimToady always thought it was the hobbits brainwashing the ents, but maybe it was the other way around
20:22 PerlJam they drank flavoraid in jonestown, so ... no worries.
20:22 SmokeMac_ joined #perl6
20:22 TimToady masak: I believe they thought they were marching their last march
20:22 huf PerlJam: i see you drank the "historical accuracy" koolaid
20:22 masak PerlJam: still, I wonder if the "drink the koolaid" expression would be as widely used if people knew about the massacre. :/
20:23 PerlJam huf++  :)
20:23 masak of course, people do get desensitized fairly quickly...
20:23 TimToady considering that's the origin of the expression, more people did used to know it
20:23 huf TimToady: well, it did happen around March 3
20:24 huf although i do not think the pun was deliberate on tolkien's part, since i think he wrote the ent bits before deciding to extend their stay in lothlorien from 0days to about 1 month
20:25 TimToady shoulda been called "Slothlorien"
20:26 huf it's named after a garden of dreams iirc. no wonder :)
20:30 jnthn moritz: about?
20:34 GlitchMr PHP 4.0 Considered More Harmful than Already Harmful PHP 5.0 that is Considered Harmful
20:34 tadzik stahp
20:35 Krunch PHP 4 Considered Most Harmful
20:35 flussence .oO( we need some sort of "considered harmful" shorthand, like up-arrow notation... )
20:36 GlitchMr Software patents Considered Harmful
20:38 leont Krunch: you obviously never touched PHP 3
20:39 huf the pit has no bottom
20:39 huf always remember that ;)
20:39 GlitchMr Turtles all way down Considered Harmful
20:40 moritz jnthn: yes, now :-)
20:40 huf GlitchMr: but how else would you draw the turtle, if not with another one?
20:41 jnthn moritz: My questionw as gonna be "do we override panic to always make a typed exception, even just an X::Comp::AdHoc".
20:41 jnthn *was
20:41 jnthn moritz: Now I've discovered the answer is "no", my question is "should we"? :)
20:41 GlitchMr http://php.net/goto
20:41 moritz jnthn: yes, we should
20:41 GlitchMr goto considered best PHP feature
20:41 GlitchMr It works!
20:42 jnthn moritz: Know of any blockers on that, or just "wasn't done"?
20:42 moritz jnthn: just wasn't done
20:42 jnthn moritz: OK, thanks
20:42 GlitchMr I want computed goto in PHP 5.5
20:43 jnthn .u ⏏
20:43 phenny U+23CF EJECT SYMBOL (⏏)
20:46 masak GlitchMr: you can emulate computed goto using anonymous functions.
20:46 masak ...and switch statements, I guess.
20:48 GlitchMr Also, Java 8 is going to have GOTO statement:
20:48 GlitchMr GotoFactory.getSharedInstance().getGoto().go(13);
20:48 GlitchMr (not really)
20:50 GlitchMr But somebody actually made a library that adds goto using this syntax.
20:50 GlitchMr It actually feels like something that should be part of Java.
20:51 GlitchMr http://www.steike.com/code/useless/java-goto/
20:52 jnthn Does anybody actually have a font with ⏏ in it? :P
20:53 GlitchMr I do
20:53 jnthn ah...me, just not in my terminal or putty...
20:53 GlitchMr jnthn: http://dl.dropbox.com/u/63913412/eject.png
20:53 * leont does too
20:54 tadzik I do too
20:54 tadzik so, I'm pink apparently
20:55 leont Indeed, you are
20:56 masak jnthn: works here on Arch Linux.
20:56 tadzik good that I'm not this darkblue that's completely invisible
20:56 masak you mean like jnthn?
20:56 tadzik jnthn is bold cyan to me
20:56 jnthn :P
20:57 tadzik Krunch on this screenshot is
20:57 GlitchMr I really don't care about colors my IRC client chooses for nicks
20:57 masak jnthn is bold? man, what an honor it would be to be bold.
20:57 masak how many nicks are bold?
20:57 GlitchMr At least it's colorful
20:57 tadzik masak: see http://dl.dropbox.com/u/63913412/eject.png
20:58 masak tadzik: looks like we're all bold.
20:58 tadzik you don't seem bold
20:58 masak oh, right.
20:58 masak except when I'm white on hot pink.
20:58 GlitchMr It's my terminal
20:58 PerlJam masak is the boldest one of us all!  ;)
20:58 GlitchMr It seems to render colors with light property as bold.
20:59 GlitchMr Oh, found option to disable that
20:59 GlitchMr http://dl.dropbox.com/u/63913412/nobold.png
20:59 GlitchMr Now nobody is bold
21:00 tadzik boaring
21:00 GlitchMr No idea why it is default
21:01 GlitchMr (also, quines FTW)
21:03 SmokeMachine joined #perl6
21:04 masak today's mini-challenge: shortest quine, on p6eval.
21:05 tadzik r:
21:05 tadzik p6eval: booo
21:05 masak nice try :P
21:06 diakopter r: ␤
21:06 p6eval Program empty
21:06 masak empty submissions are disallowed, because of a rule that I just made up.
21:06 masak r: ␤␤␤␤␤␤   ␤␤␤
21:06 p6eval Program empty
21:06 tadzik surely it won't print that many newlines :)
21:06 Juerd Does it have to PRINT itself, or evaluate to itself?
21:07 diakopter I'll empty your program
21:07 Juerd If the latter, 1
21:07 GlitchMr r: $_=Q[say "\$_=Q[$_];.eval];.eval
21:07 p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤Unable to parse expression in quote:sym<dblq>; couldn't find final '"' at line 2, near ""␤»
21:07 GlitchMr r: $_=Q[say "r: \$_=Q[$_];.eval"];.eval
21:07 p6eval rakudo e2f2dc: OUTPUT«use of uninitialized value of type Any in string context  in block  at eval_0:1␤␤r: $_=Q[];.eval␤»
21:08 GlitchMr r: my $c=Q[say "r: \$c=Q[$c];.eval"];.eval
21:08 p6eval rakudo e2f2dc: OUTPUT«No such method 'eval' for invocant of type 'Any'␤  in block  at /tmp/lxuAFtDbWN:1␤␤»
21:08 TimToady n: $?ORIG.say
21:08 p6eval niecza v24-5-g599cbcb: OUTPUT«$?ORIG.say␤»
21:08 GlitchMr r: $_=Q[say "r: \$_=Q[$_];.eval"];eval $_
21:08 p6eval rakudo e2f2dc: OUTPUT«use of uninitialized value of type Any in string context  in block  at eval_0:1␤␤r: $_=Q[];.eval␤»
21:08 sorear TimToady beat me to it
21:09 sorear good * #perl6
21:09 moritz n: say$?ORIG
21:09 p6eval niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/1LR3tQLsDV line 1:�------> [32msay[33m�[31m$?ORIG[0m��Two terms in a row (listop with args requires…
21:09 masak yeah, I think that's gonna be hard to beat :)
21:09 GlitchMr n: "n: $?ORIG"
21:09 p6eval niecza v24-5-g599cbcb:  ( no output )
21:09 GlitchMr n: "n: $?ORIG".say
21:09 p6eval niecza v24-5-g599cbcb: OUTPUT«n: "n: $?ORIG".say␤»
21:09 leont left #perl6
21:09 masak anyone care to add $?ORIG.say to http://rosettacode.org/wiki/Quine#Perl_6 ? :)
21:09 diakopter GlitchMr: !!
21:09 moritz r: BEGIN ~callframe(2).my<$/>
21:09 p6eval rakudo e2f2dc: OUTPUT«use of uninitialized value of type Any in string context  in code  at /tmp/9vyuzyoAf3:1␤␤»
21:09 GlitchMr n: "niecza v24-5-g599cbcb: OUTPUT«n: $?ORIG»".say
21:09 moritz r: BEGIN ~callframe(3).my<$/>
21:09 p6eval niecza v24-5-g599cbcb: OUTPUT«niecza v24-5-g599cbcb: OUTPUT«n: "niecza v24-5-g599cbcb: OUTPUT«n: $?ORIG»".say»␤»
21:09 p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤Nominal type check failed for parameter ''; expected Any but got NQPMatch instead␤»
21:10 moritz r: BEGIN ~callframe(4).my<$/>
21:10 p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤Nominal type check failed for parameter ''; expected Any but got NQPMatch instead␤»
21:10 moritz r: BEGIN ~callframe(4).my<$/>.Str
21:10 p6eval rakudo e2f2dc:  ( no output )
21:10 moritz r: BEGIN ~callframe(5).my<$/>.Str
21:10 p6eval rakudo e2f2dc: OUTPUT«use of uninitialized value of type Any in string context  in code  at /tmp/T7EDLJ0ZDs:1␤␤»
21:10 GlitchMr Bye
21:10 moritz r: BEGIN ~callframe(6).my<$/>.Str
21:10 p6eval rakudo e2f2dc: OUTPUT«use of uninitialized value of type Any in string context  in code  at /tmp/GSI6ww2hMT:1␤␤»
21:11 cognominal joined #perl6
21:15 cognominal_ joined #perl6
21:19 masak $?ORIG doesn't appear to be spec'd.
21:21 moritz it's a partisan extension :-)
21:26 cognominal_ joined #perl6
21:27 not_gerd joined #perl6
21:35 bbkr_ joined #perl6
21:36 bbkr_ is there an operator to swap 2 variables without using temporary one?
21:36 diakopter $a yourmom $b
21:36 skids ($a, $b) = $b, $a;
21:37 bbkr_ skids: thanks
21:38 masak diakopter: "yourmom", being more noun-y, is a misleading name for an operator.
21:39 diakopter but not an operative
21:39 skids $a varsexchange $b # has nothing to do with gender bending
21:40 jnthn r: sub infix:<varsexchange>($a is rw, $b is rw) { ($a, $b) = ($b, $a) }; my $a = 1; my $b = 2; $a varsexchange $b; say $a; say $b;
21:41 p6eval rakudo e2f2dc: OUTPUT«2␤1␤»
21:41 cognominal__ joined #perl6
21:41 * masak .oO( but does it have to do with an Italian firm by the name "PowerGen"...? )
21:41 huf or perhaps a certain island?
21:42 diakopter r: sub infix:<varsexchange>($a is rw, $b is rw) { ($a, $b) = ($b, $a) }; my $a = 1; my $b = 2; $a varsexchange $b for 1..100001; say $a; say $b;
21:42 p6eval rakudo e2f2dc: OUTPUT«(timeout)»
21:42 diakopter _._.
21:42 skids I think the plastic surgeon would probably shut that down after the first dozen times or so.
21:43 masak or find a way to optimize the procedure.
21:43 diakopter or timeout
21:44 colomon are there other p6 examples of an operator changing its arguments?  (other than the usual pre/post-fix ++, --)
21:44 dalek rakudo/stdier: 6b01881 | jnthn++ | src/ (2 files):
21:44 dalek rakudo/stdier: Start showing context, with eject marker.
21:44 dalek rakudo/stdier: review: https://github.com/rakudo/rakudo/commit/6b018814ed
21:44 dalek rakudo/stdier: a109e73 | jnthn++ | src/Perl6/Grammar.pm:
21:44 dalek rakudo/stdier: Make panic always throw X::Comp::AdHoc.
21:44 dalek rakudo/stdier:
21:44 dalek rakudo/stdier: This also means all the panics get the location included in the error.
21:44 dalek rakudo/stdier: review: https://github.com/rakudo/rakudo/commit/a109e738d7
21:46 skids hmmm.
21:47 skids r: my $a; my $b; ($a, $b) Z+= 2,3; $a.say; $b.say; # wonder what this does...
21:47 p6eval rakudo e2f2dc: OUTPUT«Any()␤Any()␤»
21:47 jnthn moritz: Seems to have worked out OK
21:47 diakopter r: my$a="\$a.eval";$a.eval
21:47 p6eval rakudo e2f2dc: OUTPUT«(timeout)»
21:48 diakopter I'm sure there's a shorter way of doing that
21:53 Moukeddar joined #perl6
21:53 masak Moukeddar! \o/
21:53 diakopter n: my $a='$a.eval';$a.eval
21:53 p6eval niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Variable $a is not predeclared␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) ␤  at /home/p6eval/niecza/src/STD.pm6 line 5633 (STD.sorry @ 7) ␤  at /home/p6eval/niecza/src/NieczaActions.pm6 line 2049 (ANON @ 41) ␤  a…
21:54 Moukeddar masak, o/
21:54 Moukeddar how are you doing, Sir ?
21:54 sorear Moukeddar!  masak!
21:54 masak sorear! \o/
21:54 masak Moukeddar: I'm fine, now that you are here ;)
21:55 Moukeddar sorear, o/ dude
21:55 Moukeddar it's always great to be here :)
21:56 masak duh, that's why we're here *all the time*. :P
21:56 wamba joined #perl6
21:56 masak wamba, welcome. :)
21:56 wamba hi
21:57 sorear moravecnet
21:57 pmurias japhb: I only have nqp-js ATM
21:58 Moukeddar the cold is killing me
21:58 pmurias I had a begining of rakudo-js but it was turning into a pile of hack so I decided to implement nqp-js first
21:59 masak Moukeddar: surely you can't have it as bad as we do. do you have snow?
22:00 jnthn Moukeddar: What is cold?
22:00 skids colomon: ~~ may alter its lhs operand when used with s///;
22:00 tadzik Baby don't hurt me
22:00 Moukeddar now, but for someone used to 40+°C ,  10°C can make is bad
22:00 colomon skids: good point
22:00 Moukeddar jnthn, the sickness and the temp, both
22:00 pmurias japhb: what other P6->JS compilers are there? Perlito6?
22:01 jnthn Moukeddar: yeah, guess it's the relative difference.
22:01 cognominal joined #perl6
22:01 jnthn By contrast, today there's -3C and snow and I'm not particularly bothered by it :)
22:01 masak jnthn: but you *like* cold weather!
22:01 jnthn masak: yeah. Today I thought...finally...winter!
22:02 masak :)
22:02 dalek rakudo/stdier: cff96f1 | jnthn++ | src/core/Exception.pm:
22:02 dalek rakudo/stdier: Color output of compile time errors.
22:02 dalek rakudo/stdier: review: https://github.com/rakudo/rakudo/commit/cff96f111d
22:02 pmurias jnthn: what other context besides contextual/dynamic variables do we want to pass to calls?
22:03 * Moukeddar doesn't like cold weather, it makes his jaws hurt
22:03 jnthn pmurias: It's more that contexts are first class thingies.
22:04 jnthn moritz, others: Feel free to give stdier a try. It should make things a bit better.
22:04 jnthn But maybe worse in some ways I didn't discover yet... :)
22:05 dalek rakudo/stdier: 8dbb9a8 | jnthn++ | src/core/Exception.pm:
22:05 dalek rakudo/stdier: Only show location if we have it.
22:05 dalek rakudo/stdier:
22:05 dalek rakudo/stdier: Just hardening for the case we don't for some reason.
22:05 dalek rakudo/stdier: review: https://github.com/rakudo/rakudo/commit/8dbb9a8f92
22:07 pmurias jnthn: there is a way to handle them in p6?
22:07 jnthn pmurias: Well, that's kinda what OUTER, CALLER etc are about.
22:08 jnthn r: sub your($what, $name) { say $what{$name} }; sub foo() { my $x = 42; your(MY::, '$x') }; foo
22:08 p6eval rakudo e2f2dc: OUTPUT«42␤»
22:09 jnthn Also eval needs access to what lexicals are in scope, and the REPL has similar wants.
22:09 jnthn These all hang off the same kinda thing.
22:10 pmurias jnthn: I can implement eval using eval
22:10 pmurias &caller seems to return a first class objec
22:10 pmurias t
22:11 pmurias jnthn: I plan to use as much native things from js as possible
22:11 pmurias as keeping variables in hash tables seems much slower then keeping them in registers
22:13 jnthn OK; well, I guess so long as you have a plan for supporting the nqp:: op set that relates to these things, I guess you should be fine.
22:14 pmurias jnthn: that's what I hope :)
22:15 pmurias jnthn: gather/take is the most difficult part to work around
22:15 cognominal joined #perl6
22:15 pmurias on server side v8 there are coroutines (fibers)
22:16 pmurias as a module
22:16 pmurias but on the client side I'm afraid I might be forced to use CPS
22:17 jnthn yeah, that bit is...fun
22:17 pmurias jnthn: re implementing things natively, I could port over parrot to js but I doubt it would be fast
22:18 jnthn No, but saying "I'm going to port NQP except X bits that are tricky to make fast" will just get you an NQP that'll not be able to compile itself or Rakudo.
22:19 jnthn If that's your goal, anyway.
22:19 jnthn If the goal is to always have it as a cross-compiler, you've a bit more space.
22:20 jnthn But then eval is kinda...hard :)
22:21 jnthn On lexical variables, there's no need to use a hash. You could keep them in an array, typically access them that way, and keep a single static hash mapping names to indexes which you only hit for late-bound lookups.
22:23 pmurias jnthn: that could be helpfull for dynamic lexicals
22:23 pmurias err contextuals
22:25 pmurias jnthn: as long as the server side nqp can compile rakudo, we might sacrifice some things on the browser side
22:25 pmurias I'm not sure eval is important enought to load rakudo on every web page
22:25 jnthn Well, there's always lazy loading :)
22:25 * sorear needs to get better at supressing the unconcious "jnthn is trying to obsolete niecza" reflex :|
22:26 jnthn sorear: jnthn is just trying to make Rakudo better
22:26 jnthn Same as for the last several years, but a bit further along than the "omg we can do hello world now" days :)
22:27 jnthn (OK, to be fair, Rakudo always could do that. But I think I did put in hashes...)
22:27 jnthn ("always could" as in, before I ever commat)
22:31 masak jnthn++ # hashes
22:31 jnthn masak: I'm pretty sure Pm re-did hashes at least once in the time between then and now :D
22:31 masak also, I'm not sure people in general are going to recognize "commat" as an ablut "commit" :P
22:36 jnthn phenny: ask moritz if perhaps a reasonable approach would be if our @*WORRIES contained typed things, that did X::Comp::Worry role or something, and for the time being we just .gist them at the appropriate point? Then should be quite refactorable when we figure out exactly what's right.
22:36 phenny jnthn: I'll pass that on when moritz is around.
22:36 jnthn phenny: tell moritz Thing is that we need to show them all together at the end, or pass them along with the compilation exception, if we want to be STDish anyway.
22:36 phenny jnthn: I'll pass that on when moritz is around.
22:47 bluescreen10 joined #perl6
22:53 cognominal joined #perl6
23:03 pmurias jnthn: how is LTM implemented in nqp?
23:05 jnthn pmurias: See src/QRegex/NFA.nqp
23:05 jnthn pmurias: And a couple of bits of Cursor call into it
23:07 * pmurias will read that tommorow when he's fresh
23:07 jnthn Advised. :D
23:08 jnthn Moze byt so vodkou... :P
23:11 masak what could possible go wrong? :)
23:11 jnthn typing "possibly", apparently :P
23:12 masak y*
23:13 masak 'night, #perl6
23:18 rurban parrot has now threads and you can introspect the dynpmc's. It would be nice if nqp would step up. I was working on nqplexpad in the gh67-threads branch, but I don't really understand the logic. The nqp-rx example for the failing test t/nqp/67-threads.t works fine.
23:19 jnthn rurban: Yeah, but nqp didn't have a custom lexpad PMC
23:20 rurban exactly :)
23:20 jnthn That's about zero chance of that going away.
23:21 jnthn So need to figure out how to make things work with it.
23:21 rurban Exactly
23:22 jnthn Thing is, *loads* of the dynops that relate to 6model also check for exact PMC type (since the SixModelObject PMC mostly just serves to hold a pointer off to the Interesting Stuff and maps various v-tables to do sensible things)
23:22 rurban That's why I gave you now dynpmc_class_<classname> in C
23:23 jnthn How does that help?
23:23 jnthn I can already tell if the thing is of the correct type.
23:23 rurban You can check for your types
23:23 rurban You can check it faster
23:23 jnthn I've been doing that in nqp for ages
23:23 jnthn Faster than comparing an integer stored in a static?
23:23 rurban Not in nqplexpad
23:23 cognominal joined #perl6
23:23 rurban no, the same speed
23:24 japhb_ joined #perl6
23:24 jnthn Right, that's what happens in nqp.ops
23:24 jnthn I mean, the constants are nice, but I don't see why the same approach couldn't have worked in the dynpmcs...
23:25 sorear jnthn: question: can nqp-nom support both parrot threads and JVM threads?
23:26 jnthn sorear: I'm not sure I really understand Parrot threads just yet.
23:26 jnthn I'm also rather worried that the design that exists expects that all operations take place through the Parrot v-table
23:27 jnthn So that the Proxy can shuffle stuff off as a task to the owning thread.
23:27 rurban And I don't understand JVM threads yet
23:27 japhb_ phenny, tell masak Regarding the halting problem intentionally avoiding Turing completeness, some years ago I administered a product called Lotus Notes, which was a groupware app with builtin scripting, databases, and replication (way ahead of its time, actually).  Anyway, scripts were executed on servers, not clients, so the scripting language intentionally disallowed any operation that could perform an explicit loop, but did have *implicit* loops (e.g
23:27 phenny japhb_: I'll pass that on when masak is around.
23:27 japhb_ . all rows in a DB table); it was all to avoid runaway scripts taking down servers.
23:28 japhb_ phenny, tell masak (sorry, cut off by IRC): (e.g. all rows in a DB table); it was all to avoid runaway scripts taking down servers.
23:28 phenny japhb_: I'll pass that on when masak is around.
23:28 diakopter japhb_: no recursion either?
23:28 japhb_ diakopter, not in unlimited fashion.
23:28 diakopter (but how could it detect whether it was limited?)
23:28 japhb_ Everything was designed to eventually bottom out.
23:29 japhb_ diakopter, by not allowing you to ever come back to the same place in the control flow graph
23:29 japhb_ meaning, you could try doing mutual recursion, but as soon as you came back to the first one, boom.
23:29 japhb_ (At least, that's my memory of it.)
23:30 jnthn rurban: If I solve things just by digging through the proxy to the underlying object, what happens?
23:30 japhb_ Been quite a long time since I had that job. :-)
23:30 sorear japhb_: mmm,  BLooP
23:30 jnthn rurban: That is, if the object is manipulated from another thread?
23:30 rurban read-only access should be fine.
23:31 rurban read-write forbidden
23:31 rurban for write we would need a mutex
23:31 japhb_ jnthn, I am glad you decided to do the colored error messages; I was going to vote strongly for it (on the principal that I am thankful for git colors most every day).
23:31 [Coke] jnthn: are you going to make unused variables warn as part of the STuDlification?
23:32 jnthn [Coke]: It's on the todo list
23:32 sorear has anyone here but me ever played with Coq?
23:32 jnthn [Coke]: Also because I need the tracking to fix That Bug in hash/block disambig, iirc
23:33 * jnthn tries REALLY hard not to make a terrible pun in reply to sorear's question
23:33 jnthn rurban: How's the GC handling the multiple threads?
23:33 sorear jnthn: I'm sure they've heard them all a million times
23:33 jnthn rurban: I mean, is the problem with writes mostly connected to that?
23:34 jnthn sorear: I'm sure :)
23:34 skids joined #perl6
23:34 [Coke] jnthn++
23:34 jnthn sorear: I at least know what it is, but never played with it.
23:34 [Coke] (for pun restraint)
23:35 rurban jnthn: exactly :) the proxy pmc is telling the GC that it is read-only only. The target owns it.
23:35 jnthn What if one thread ends up referencing an object in another?
23:36 rurban So we should really create convenience _ro _ wrappers in pmc2c to access some pmc data.
23:36 am0c joined #perl6
23:36 rurban referencing as ro is okay. rw is the problem, and we have no API for this yet
23:36 rurban whiteknight thought about adding these.
23:37 pmurias sorear: I took a Coq class at uni
23:37 Kharec joined #perl6
23:37 am0c joined #perl6
23:43 japhb_ pmurias, Some time back perl6-bench could benchmark both Perlito5 and Perlito6, in perl5 and JS backends, and a couple different VMs for the JS backend.
23:44 SHODAN joined #perl6
23:44 japhb_ To add nqp-js, I need clone URL, build instructions, compile/run script instructions, and how to call for both one-liners (-e) and full scripts
23:46 dalek nqp: 9808c64 | rurban++ | src/pmc/sixmodelobject.pmc:
23:46 dalek nqp: untabify src/pmc/sixmodelobject.pmc
23:46 dalek nqp:
23:46 dalek nqp: windows 4-char tabs made it hard to read on unix. Added coda
23:46 dalek nqp: review: https://github.com/perl6/nqp/commit/9808c648b0
23:46 imarcusthis joined #perl6
23:47 jnthn rurban: If you have thread A owning the object that has the only reference to an object owned by thread B
23:47 jnthn And thread A reads the reference into, say, a register and nulls it
23:47 jnthn And then thread B runs its GC
23:47 jnthn How does it know not to collect the object?
23:48 dalek nqp/gh67-threads: 98cc8bd | rurban++ | src/pmc/nqplexpad.pmc:
23:48 dalek nqp/gh67-threads: nqplexpad.pmc: add coda
23:48 dalek nqp/gh67-threads: review: https://github.com/perl6/nqp/commit/98cc8bde86
23:48 dalek nqp/gh67-threads: 35cff96 | rurban++ | t/nqp/67-threads.t:
23:48 dalek nqp/gh67-threads: t/nqp/67-threads.t: fix test - print ok 1
23:48 dalek nqp/gh67-threads: review: https://github.com/perl6/nqp/commit/35cff9611c
23:49 rurban jnthn: sorry, I have to go now. Can you ask on #parrot?
23:49 diakopter rurban: or if the only reference to the object is in the write value of one of Thread C's queued proxies
23:49 jnthn Well, sleep time here also...
23:50 rurban I'd like to have those questions answered in our pdd25
23:50 japhb_ g'night, jnthn
23:50 rurban Our docs are a bit sparse on howto's and shared data
23:50 jnthn 'night
23:52 cognominal joined #perl6

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

Perl 6 | Reference Documentation | Rakudo