»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:05 cognominal_ left 00:08 lue joined 00:11 cognominal_ joined 00:12 rurban joined 00:14 cognominal_ left 00:24 tokuhiro_ left, tokuhiro_ joined 00:29 pmurias left
dalek p/gh67-threads: 2032137 | rurban++ | src/pmc/nqplexpad.pmc:
mark enum_class_Proxy sections with PARROT_THREAD_H_GUARD

Provide an experimental fallback "static int enum_class_Proxy = 0" for non-threaded code.
00:35
diakopter anyone know how recent p6eval's nqp is? 00:40
00:44 kcwu joined
diakopter rurban: are any of parrot's data structures guaranteed threadsafe? 00:46
user-exposed pmcs, I mean
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
00:50 rurban left, rurban joined
diakopter rurban: you might've missed my last few messages directed at you (it says read error) 00:51
00:52 aloha left 00:53 rurban left, aloha joined 00:58 anuby joined
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
diakopter: they are not at all like the threads you're used to from C# et al
diakopter interesting 01:10
I'm trying to imagine the usefulness of that
sorear me too tbh 01:11
diakopter without reliable memory sharing, the threads aren't any better than javascript's web workers 01:13
does parrot expose any kind of lock or CAS/increment operations? 01:14
sorear no
doesn't even make sense in the model
since objects can only be mutated by one thread 01:15
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
what we're seeing now in truly big systems is message passing, not shared memory
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:17
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). gist.github.com/4192002 Can you have a look please? 01:19
diakopter is loving the colorful branch diff in Git Extensions
grondilu: just addition or the others too? 01:20
grondilu diakopter: I tested only addition 01:21
diakopter did you try 'is export'?
grondilu tries
lol, works 01:22
I had no clue I had to export these
diakopter didn't either 01:23
01:26 PCChris joined
japhb sorear, what branch are you developing on? 01:27
Nevermind, it appears to be WTF on my end 01:28
01:34 RandalSchwartz left 01:35 jvd__ joined, bowtie left, tokuhiro_ left, tokuhiro_ joined 01:37 grondilu left 01:39 dayangkun joined 01:57 rurban joined 02:07 hypolin joined 02:08 FROGGS_ joined
dalek rl6-bench: cbca934 | (Geoffrey Broadwell)++ | bench:
Take advantage of heredoc outdents ignoring blank lines
02:09
rl6-bench: c60ac8b | (Geoffrey Broadwell)++ | bench:
WIP: Update all checkouts after fetching bare repo; doesn't work quite right yet
rl6-bench: 9d20b5f | (Geoffrey Broadwell)++ | bench:
It appears that the fix for the previous commit is to clone the bare repo with --mirror instead of --bare
rl6-bench: 90aa996 | (Geoffrey Broadwell)++ | bench:
Fix braino in extract command resulting in not being able to pull branches in a component that don't exist in perl6-bench
rl6-bench: ac75337 | (Geoffrey Broadwell)++ | bench:
Don't try to 'git pull' a tag
02:12 FROGGS left 02:14 hash_table left
rurban diakopter: yes, parrot pmc's are thread-safe. I tested them against threadsanitizer. There were some outstanding esoteric issues. 02:14
diakopter rurban: threadsanitizer? 02:33
ok, it's a thing.
um, just because it passed this thing doesn't mean it has no races 02:35
(I mean, if you fully understand the code, that's another thing...) :)
but anyway, based on what sorear said, I still don't see a use case for parrot threads 02:36
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 02:54 wamba left 03:06 noggle_ joined 03:09 noggle left 03:11 mikemol left
grondilu rn: sub postfix:<+>(Int $n) { $n ... * }; say (1+)[^4]; 03:12
p6eval rakudo e2f2dc, niecza v24-5-g599cbcb: OUTPUT«1 2 3 4␤»
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␤»
..niecza v24-5-g599cbcb: OUTPUT«===SORRY!===␤␤Confused at /tmp/Ko166XT_i8 line 1:␤------> (Int $n) { $n ... * }; say "big enough" ⏏is 4 > 3+;␤␤Parse failed␤␤»
grondilu rn: sub postfix:<+>(Int $n) { $n ... * }; say "big enough" is 4 ~~ 3+; 03:14
p6eval niecza v24-5-g599cbcb: OUTPUT«===SORRY!===␤␤Confused at /tmp/syiupVv9Cp line 1:␤------> (Int $n) { $n ... * }; say "big enough" ⏏is 4 ~~ 3+;␤␤Parse failed␤␤»
..rakudo e2f2dc: OUTPUT«===SORRY!===␤Confused␤at /tmp/jxWyttqEZw:1␤»
03:14 mikemol joined
[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:32
sorear [Coke]: there's a commented out line in the makefile to use "curl" instead 03:33
[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:34
03:34 orafu left 03:35 orafu joined 03:36 sftp_ left 03:55 am0c left 04:04 rurban_ joined 04:08 rurban left, rurban_ is now known as rurban 04:11 fgomez left 04:15 edsiper left 04:19 rurban left 04:28 tm_ joined 04:29 sevin left, tm_ is now known as Guest26746, tcpr1347 joined, xilo_ left 04:30 Guest26746 left 04:36 Patterner left, Psyche^ joined, Psyche^ is now known as Patterner 04:38 fgomez joined
dalek rl6-bench: e836e54 | (Geoffrey Broadwell)++ | timeall:
New tests for azawawi++'s '1 == any(1..1000)' test (and scaling thereof), and loops optimized by sorear++ for Niecza
04:45
sorear japhb: the any test is slightly problematic because IIUC implementations are allowed to short-circuit it 04:46
most of the order of evaluation stuff with junctions is unconstrained 04:47
japhb sorear, ah, interesting
sorear, latest results at gist.github.com/4146931
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:49
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:50
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.
sorear japhb++
japhb: did you look at the concat test I sent?
dalek rl6-bench: 8bef0a2 | (Geoffrey Broadwell)++ | TODO:
Add a TODO for investigating sorear++'s rakudo concat performance question
04:55
japhb ^^ Nope. :-)
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
sorear, I'd be happy to answer, I'm just trying to figure out the best code for the test
sorear my $x = 'a'; my $y = ''; for 1..10000 { $y ~= ($x ~ $x) } 04:57
the important part being that $x ~ $x allocates a *new* string
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)
interesting
OK, I'll do the one you just posted now.
04:59 PacoAir left
dalek rl6-bench: 361a917 | (Geoffrey Broadwell)++ | / (2 files):
Convert sorear++'s concat suggestion into a real test
05:05
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
japhb All the microbenchmarks are contrived. But they're still telling us useful info. :-) 05:08
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.
rc-forest-fire is a good first one, but I would like a good half-dozen or so, doing different things. 05:09
(More would be better, I just don't feel comfortable with fewer than that)
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:10
s/configs/configs, build instructions, etc./ 05:11
05:15 rurban joined 05:28 am0c joined 05:30 ifim left 05:41 kurahaupo left 05:47 kaleem joined 05:48 birdwindupbird joined 05:50 rurban left 05:56 Chillance left 06:19 rking joined 06:24 Khisanth left 06:29 rindolf joined
japhb sorear, updated results at gist.github.com/4146931 ; the new test is for_concat_2_1e5 06:32
Given that niecza takes twice as long, and rakudo barely budges, I'm thinking rakudo is optimizing $x ~ $x perhaps? 06:33
06:40 Khisanth joined 06:44 daniel__ joined, Daniel___ joined, Daniel___ left 06:45 SamuraiJack joined
sorear japhb: what is the full code of the test, including the looping harness? 06:45
06:45 daniel__ left
sorear d'oh, you already linked it 06:46
06:46 jeffreykegler joined, tattochan joined 06:48 jeffreykegler left
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. 06:48
06:48 tattochan left 07:11 FROGGS_ left 07:14 FROGGS joined 07:18 popl left
grondilu submitted github.com/grondilu/libdigest-perl.../META.info to the ecosystem 07:18
^ hope it's ok
dalek osystem: 8d2e1dc | grondilu++ | META.list:
Update META.list

Hopefully the simple name 'Digest' should not conflict too much with other digests implementations on the ecosystem.  Let me know otherwise.
07:29
osystem: 4e72037 | (Aliaksandr Zahatski)++ | META.list:
Merge pull request #16 from grondilu/patch-2

Update META.list
07:39 mhi^ joined 07:42 dayangkun left 07:57 rindolf left, rindolf joined 08:03 rindolf left 08:04 rindolf joined 08:05 rindolf left, rindolf joined 08:06 rindolf left 08:07 rindolf joined
moritz good morning 08:19
rindolf moritz: morning.
moritz grondilu: you now have direct write access to the ecosystem (and a few other repos :-)
08:26 hoelzro|away is now known as hoelzro 08:30 Kharec joined
tadzik hm. Maybe I should write Bailador-something for the advent calendar 08:33
or maybe that doesn't quite belong there 08:34
"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:36
08:38 rindolf left
moritz why'd you think Bailador doesn't belong into the p6advent? 08:39
08:39 rindolf joined
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
aside from stuff like NativeCall, but that's pretty core now
but I look at Perl 5 calendar now, and see stuff like Path::Class described
08:41 Teratogen joined
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
Teratogen What applications will be written in Perl 6? 08:42
moritz which roads will you walk down? 08:44
tadzik :) 08:45
Teratogen do we have an eta on Perl 6.0 yet? 08:46
08:47 wamba joined 08:49 dayangkun joined
mhi^ Teratogen: faq.perl6.org 08:50
08:53 Kharec left 08:54 Kharec joined 09:00 tcpr1347 left 09:03 cxs joined 09:04 cxs left
felher Who did the latest Perl6 Advent Blogpost? 09:22
09:24 kresike joined
kresike hello all you happy perl6 people 09:24
tadzik hey hey
felher: the name sounds familiar, but I'm not sure
it's quite cool tho :) 09:25
felher tadzik: indeed. :)
"In general this requires solving the halting problem, which even Perl 6 compiler writers have trouble with." Hihi :) 09:27
09:36 Teratogen left 09:37 cedric_ joined
cedric_ hello #perl6 09:37
felher: me
09:37 cedric_ is now known as cedrvint
felher cedric++ # very nice post :) 09:37
cedrvint thanks :) 09:38
09:46 fhelmberger joined 09:54 dakkar joined 10:04 hypolin left 10:57 bowtie joined 11:05 Su-Shee_ joined 11:06 Su-Shee left, gootle left, Su-Shee_ is now known as Su-Shee 11:14 hoelzro is now known as hoelzro|away
masak yo, #perl6 11:18
grondilu damn, the Digest module I added today works when I test it manually but tests fail during installation with panda. 11:23
Tell me, when rakudo sees Foo.pir and Foo.pm in the same directory, it uses Foo.pir, right? 11:24
moritz if the timestamp tells it that Foo.pir is newer than Foo.pm, yes 11:25
export RAKUDO_MODULE_DEBUG=1
then you'll know what it loads 11:26
tadzik grondilu: what's the failure?
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
tadzik grondilu: fails with panda, or fails when precompiled?
did you try just ufo && make test?
grondilu I think it fails when precompiled. I'm currently checking this
tadzik okay
grondilu yes, I did compiled it manually and it failed. 11:27
grondilu tries to rewrite the problematic code in more idomatic way. 11:29
grondilu failed 11:30
it seems to fail with custom infix operator :(
moritz gah, I thought that was fixed :( 11:31
grondilu well it does compile, but does not run properly.
11:33 pecastro left, pecastro_ joined
masak [backlog] I think the halting problem is utterly fascinating. 11:35
it's like the perfect metaphor for struggle between good and evil.
infinitely running programs are evil. so you want to detect them and flag them as such. 11:36
11:36 bloonix left
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:36
11:36 wamba left
masak and at some point, the table switches and you become evil yourself. :) 11:37
just like the moral issues Batman faces with respect to vigilantism.
11:38 hoelzro|away is now known as hoelzro
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.
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:40
in the main slang you probably want to retain enough-power-for-evil. 11:41
moritz though you don't need much for turing completeness 11:42
like, arrays, while and if 11:43
masak indeed.
moritz or recursion
masak or source code rewriting :)
moritz so it's often useful for declarative stuff
(like regexes)
masak in 'arrays, while and if', the 'if' part feels redundant for some reason.
moritz: yes, or other state machine stuff. like sagas. 11:44
moritz masak: are sagas and workflows related? 11:46
moritz wonders if he throws a category error right now 11:47
11:47 anuby left
masak moritz: they are. 11:47
moritz: if I'm reading the currents right, the term 'saga' is on the way out and being replaced by 'process manager'. 11:48
(because 'saga' was originally something very specific having to do with long-running db transactions)
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
ss:g/ on / from /
moritz std: macro m { die 1 }; m 11:51
p6eval std a8bc48f: OUTPUT«===SORRY!===␤No delimiter found at /tmp/BGk5KDK2Qy line 1 (EOF):␤------> macro m { die 1 }; m⏏<EOL>␤Parse failed␤FAILED 00:00 43m␤» 11:52
moritz that's interesting
it tries to parse it as a regex
masak submits rakudobug 11:53
moritz wait
masak waits
moritz I'm trying to fix Null regex error messages
masak szabgab thinks my advent post is "'just' interesting" :/
11:54 PCChris left
masak clearly I must aim higher to satisfy this man :) 11:54
moritz and the test now fails because of my patch
masak oh, that was std, not rakudo.
moritz I'm not sure it's a bug
masak ok. 11:55
moritz m does introduce a regex
11:55 kaleem left
moritz and if you want to call something callable, you write it as m() 11:55
masak oh!
right, it's the last 'm' that fails.
dalek p: 39ab731 | moritz++ | src/pmc/ (2 files):
move UNUSED macro call after declarations

makes -Werror=declaration-after-statement happy
ast: 35dca83 | moritz++ | S06-macros/errors.t:
fix macro test to not confuse regexes and calls
11:56
11:58 edsiper joined 11:59 edsiper left 12:01 replore_ joined
dalek p: 124bf55 | moritz++ | src/QRegex/P6Regex/Grammar.nqp:
improve Null pattern detection a bit
12:01
12:02 SmokeMachine joined 12:04 wamba joined
grondilu found the real source of the bug 12:11
12:11 kaleem joined
grondilu It was actually the 'constant' 12:12
I made '%s/constant /my \\/' and it worked
so it was not about the custom operators after all. 12:13
moritz grondilu: what constant value did you use?
I mean, what was the type of the left-hand side?
erm, right-hand side
grondilu arrays (including and array of closures) 12:15
moritz interesting
grondilu yeah: All tests successful. 12:16
Files=2, Tests=3, 22 wallclock secs ( 0.09 usr 0.02 sys + 20.78 cusr 0.40 csys = 21.29 CPU)
Result: PASS
==> Installing Digest
==> Successfully installed Digest
:)
moritz: you can see the code here: raw.github.com/grondilu/libdigest-.../RIPEMD.pm Whenever you see a 'my \something', it as a 'constant something' when it failed. 12:18
12:22 sftp joined 12:27 SmokeMachine left 12:33 cognominal joined 12:35 nyuszika7h left 12:38 nyuszika7h joined, nyuszika7h left 12:40 nyuszika7h joined 12:41 tokuhiro_ left, tokuhiro_ joined 12:59 Kharec_ joined 13:01 Kharec left 13:04 SamuraiJack left
grondilu S11: « Every "UNIT" gets a lexically scoped "EXPORT" package automatically » 13:07
What's UNIT?
masak compilation unit, I think.
usually means "file".
but I think technically the code in an eval is a compilation unit, too. 13:08
13:08 replore_ left
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...
the C means compile
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 ""␤»
grondilu r: module Foo { sub talk { say "hello" } }; import Foo <talk>; talk;
p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&talk' called (line 1)␤»
grondilu r: module Foo { sub talk is export { say "hello" } }; import Foo <talk>; talk;
p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤Error while importing from 'Foo': no EXPORT sub, but you provided positional argument in the 'use' statement␤»
grondilu n: module Foo { sub talk is export { say "hello" } }; import Foo <talk>; talk;
p6eval niecza v24-5-g599cbcb: OUTPUT«===SORRY!===␤␤Action method statement_control:import not yet implemented at /tmp/rMXElqcnjq line 1:␤------> ort { say "hello" } }; import Foo <talk>⏏; talk;␤␤Unhandled exception: Unable to resolve method statement_level …
moritz juse say import Foo;
grondilu but if I want to import only talk?? 13:13
moritz then you need to export it with a separate tag, for now
bbkr r: "f\u00e5r" # weird message
p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\u'␤at /tmp/nR5xl03Ad9:1␤»
bbkr hm, fixed :)
moritz :-)
grondilu moritz: can you show me please?
moritz r: module Foo { sub talk is export(:talk) { say 'hello' } }; import Foo :talk; talk; 13:14
p6eval rakudo e2f2dc: OUTPUT«hello␤»
13:14 Kharec_ left
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
grondilu ok 13:15
moritz or at least my interpretation of the current spec doesn't allow that :-)
grondilu what about EXPORT? How does this work? (I found S11 quite obscure) 13:17
r: module Foo { sub EXPORT { warn @_ } }; import Foo <foo bar>;
p6eval rakudo e2f2dc: ( no output )
moritz r: module Foo { our sub EXPORT { warn @_ } }; import Foo <foo bar>; 13:18
p6eval rakudo e2f2dc: ( no output )
moritz oh
currently rakudo looks for the EXPORT sub outside of the package
grondilu weird 13:19
moritz direcly in the compilation unit in which the package is
r: our sub EXPORT { warn @_ }; module Foo { }; import Foo <bar bza>;
grondilu r: module Foo {}; sub EXPORT { warn @_ }; import Foo <foo bar>;
p6eval rakudo e2f2dc: ( no output )
grondilu lol same time
moritz works for lib/lib.pm6
13:20 cognominal left 13:21 replore joined 13:22 SmokeMachine joined 13:23 PacoAir joined 13:24 GlitchMr joined
masak TimToady: I don't think it's very evident what the Cool is doing in rosettacode.org/wiki/Same_Fringe#Perl_6 13:25
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 13:31 SmokeMac_ joined, skids left 13:32 SmokeMachine left 13:35 PacoAir left, PacoAir joined 13:41 Kharec joined
jnthn home :) 13:42
masak \o/ 13:43
jnthn Whew...no more trips abroad/far away for a few weeks :)
moritz welcome ~
13:47 nyuszika7h left
masak nyuszika7h: aye, make evil go *away*! Today! 13:51
(for example by restricting to a non-Turing-complete subset)
jnthn That makes good go away too :P 13:52
masak shhh!
jnthn "Let's kill everybody! Then there'll be no bad people left!"
13:52 kaleem left
jnthn pulls latest rpos 13:52
masak no no, it's not killing everybody. it's making everybody a soulless facsimile.
jnthn *repos
13:52 kaleem joined
jnthn People still use facsimile machines? 13:53
moritz of course
though often split into scanners and printers
13:53 atrodo joined
masak and email. 13:54
[Coke] I wonder if any of you younguns have used a mimeograph machine. Ah, those were the days. :)
masak [Coke]: do they smell and produce purple copies?
13:55 nyuszika7h joined
[Coke] masak++ 13:55
13:56 wamba left
masak I've seen such copies occasionally. never the machine itself. 13:57
it's all very mysterious, come to think of it. :)
jnthn Are they the ones where you get high if you sniff the copies they produce? 13:58
masak some jokes I've heard have as a punchline that the teacher made too many mimeograph copies, yes. 14:01
oh, that's why the Swedish word for "handout copy" is "stencil". 14:02
14:04 cognominal left
jnthn Time to find out how spectest is... :) 14:05
14:06 wamba joined 14:11 cognominal joined, jvd__ left, xinming_ joined
jnthn Hm. Failed test 9 in socket. 14:14
14:14 xinming left 14:15 mtk joined 14:16 noggle_ is now known as noggle
dalek : 0b3fb2b | duff++ | misc/perl6advent-2012/schedule:
[advent] pick a topic for Dec 8
14:17
14:18 FROGGS left 14:19 cognominal left 14:21 rurban joined 14:23 roman joined, roman is now known as Guest89841 14:24 Guest89841 left 14:26 cognominal joined
GlitchMr is-prime. I seriously wonder what can be said about it. 14:37
Because it's one of those obvious functions. It does exactly what it says on the tin. 14:38
14:38 hash_table joined
moritz GlitchMr: you'll find out in a few days, I suppose :-) 14:38
GlitchMr :-)
masak it's probabilistic. that's rather interesting, I would say.
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
moritz why it was added 14:39
properties of the algorithm
benchmarks
14:41 xinming_ left
GlitchMr Even Mathematica which claims to have everything doesn't have is-prime function. 14:41
14:42 xinming joined
moritz oh sure it has 14:42
PrimeQ
masak moritz++ 14:43
jnthn OK, question.
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?
jnthn How STD-y do we want the output to look?
14:44 hash_table left
moritz masak: yes 14:44
jnthn (I'm thinking, colors, the indicator for where the problem was, etc.)
moritz jnthn: very :-)
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. :)
masak I'm fine with colors and stuff.
thanks for checking :) 14:46
moritz too
jnthn OK
Some terminals don't do those by default
s/do/support/
masak how does STD handle that?
jnthn s/by default// :/
14:46 nyuszika7h left
jnthn masak: afaik it doesn't try to. 14:46
masak hm.
14:46 stopbit joined
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
Same with the eject symbol, fwiw.
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:48
14:49 nyuszika7h joined
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
FROGGS I do that in Perl 5 by checking the error messages
(and hope they dont change) 14:50
moritz jnthn: and I kinda think Exception should be an attribute that distinguishes warnings and exceptions
jnthn OK 14:51
FROGGS what about 'Warning is Exception' so that you can smartmatch against 'Warning' ?
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
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
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
ya, think you are right 14:55
jnthn On color...we could always just disable it when OS is Windows, and allow an environment variable to override either way. 14:56
masak sounds good. 14:57
moritz (I've pondered the question on how to best to warnings for at least a year now)
I'm still not entirely sure, otherwise I would have done it already :-)
jnthn :)
masak .oO( like an anthropic argument for non-trivial problems ) 15:00
s/argument/principle/ 15:01
moritz :-) 15:02
though there are probably still lots of LHFs in the codebase 15:03
masak yeah, the principle doesn't really hold up. 15:04
15:05 birdwindupbird left 15:08 skids joined 15:09 rurban left 15:19 Kharec left 15:20 Kharec joined 15:22 kaleem left 15:23 pmurias joined
skids o/ 15:24
masak skids! \o/ 15:25
15:28 rurban joined 15:30 SmokeMac_ left 15:31 SmokeMachine joined 15:38 kaare_ joined 15:40 pmurias left 15:41 tokuhiro_ left
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
15:41 tokuhiro_ joined
moritz smolder.parrot.org/app/projects/details/5 15:42
15:43 pmurias joined
skids Ah, so pretty much most fails are fudged. Thanks moritz++. 15:44
15:44 rurban left, brrt joined 15:45 confused joined
confused Hello there 15:46
masak hi, confused.
15:46 kaleem joined, bluescreen10 joined
confused Hi masak, glad someone's here to answer 15:47
masak oh, there's many of us.
just fire away.
confused ooh :D
masak .oO( confused but intrigued )
confused :D 15:48
I was just searching about Perl 6
I like Perl but a lot of people just persue me to use python
15:48 hash_table joined
masak confused: Python is a nice language with a good community. so is Perl. 15:49
they have different strengths, and focus on slightly different things, language-wise.
people often put Python and Perl on different ends of a "strictness/freedom" spectrum. 15:50
but the truth is that you can be sloppy or structured in either language.
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
15:51 kaleem left
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
and you're about as likely to do that on #python as here.
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
confused: does that start to answer your doubts?
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
but in the end, your use of a language will only be as good as the community you interact with.
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 :)
huf ... must... resist... snark... 15:55
confused :D
masak yeah, I was wondering "how do I say this in a diplomatic way?" :)
confused Back in the past I hade a very little experience with Perl 5
huf "what, like use the ternary op in a sane way?"
.. i failed
15:55 rurban joined
masak PHP is a Turing-complete language. that's a compliment, right? 15:55
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.
and won't necessarily be as fun.
confused Right, but I believe some projects can be easily done in Perl or maybe python 15:57
masak aye.
confused I was wondering which one is easier to learn for a PHP programmer ?
masak oh, that's probably Perl, actually. 15:58
since PHP is partly based on Perl.
huf early bits of php sortof resemble perl
masak yeah.
PHP has sigils. well, sigil.
huf but leave out the usefulness, so you have to learn a lot to recognise it :)
confused aha, Right
huf eg: php has die(), but it shares nothing with perl's die
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:00
confused Thank you masak and huf 16:01
skids
.oO(does python use context as much as Perl5/Pelr6? Maybe that's one difference.)
confused umm
masak skids: I think list/scalar context is quite particular to Perl 1..5 16:02
confused Why you peaople stick with Perl ?
GlitchMr die() in PHP is alias for exit()
masak confused: I stick with Perl because it solves my problems well, and in ways that I like.
GlitchMr Because Rasmus was too lazy to actually implement exceptions
16:02 cognominal left
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.
masak skids: that's a nice way to put it.
confused aha 16:04
GlitchMr I like Perl because you can declare variables in it
masak Perl generally exposes internal piping and mechanisms in such a way that you can use it when needed.
GlitchMr: wtf
huf masak: that's a pretty big PLUS in perls
masak GlitchMr: as opposed to... Brainfuck?
huf precious few languages have what i call actual scope :)
confused Thanks, but don't you think things can be done faster in Python?
GlitchMr And unlike other dynamic languages, unknown variables can be catched at compile time.
masak confused: the question is too vague.
confused: *I* certainly can't do things faster in Python :P 16:05
confused :D
GlitchMr In other languages, program works... until it will notice... oops, you haven't declared that_vairable
confused I understand
masak confused: a competent Python programmer can do many things quickly, I guess. so can a competent Perl programmer.
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
masak the differences are in syntax, philosophy, module availability, and what huf said :)
huf but it really only comes up in corner cases and during debugging
so it's not too large
GlitchMr Actually, Python took certain features from Perl
huf GlitchMr: who didnt :)
GlitchMr And both of those languages took features from AWK
masak ...among others.
it's not like awk is the only language Perl was inspired by :) 16:07
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.
Mostly Haskell
Oh, and Ruby
masak oh, and Smalltalk. 16:09
GlitchMr And of course one of most important languages: Smalltalk
16:09 cognominal joined
masak oh, and Lisp/Scheme. 16:09
felher What about LISP? Multi-Dispatch with nextsame seems similar to defgeneric. Not to forget about macros..
felher was too slow. 16:10
masak :)
jnthn felher: CLOS has been something of an influence in MOP-space too :)
skids Ruby has some nice terse syntax that looks and feels right, e.g. pointies, so now we have here it too :-)
masak skids: Ruby does it with chutes, not pointies, though :)
GlitchMr Do you mean ->? I thought it was from CoffeeScript.
felher jnthn: yeah, and that :)
masak (syntax borrowed from Smalltalk, I think)
GlitchMr But CoffeeScript was HEAVILY inspired by Ruby
and Python 16:11
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.
confused Anything simillar to this for Perl?
hoelzro Catalyst
masak confused: Catalyst is the similar one.
TimToady um, we didn't borrow -> (as lambda) from anyone else 16:13
we picked it because it looks nice in a for loop
masak CoffeeScript is definitely newer than Perl 6's lambdas :)
GlitchMr C# had => in 2007.
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
confused umm Thanks a lot, I'll certainly give it a try
aha
masak confused: \o/
confused Thank you masak :D
masak confused: when you come back next time, will you still have that nick? :)
or will I recognize you as "no_longer_confused" or something? :) 16:15
16:15 replore left
confused I don't think so :)) 16:15
masak great. :)
GlitchMr TimToady: C# uses => for lambdas
masak take care, confused. good luck on your quest.
TimToady masak: re Cool, I hope to get rid of the need for a sentinal entirely by providing a longest-list zip somehow
GlitchMr I'm talking about lambdas, not association. 16:16
TimToady gotcha
masak TimToady: yeah, that would also solve it.
confused Thanks masak, you too.
GlitchMr I wonder what language had used arrow for lambdas first.
16:17 [particle]1 is now known as [particle]
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
hoelzro \x -> x + 1
GlitchMr oh wait, I was wrong
TimToady like that
GlitchMr C# had them in 2006 16:18
Haskell
Interesting
masak doesn't Prolog have arrows, kinda? something like :-
TimToady again, goes after the args 16:19
hoelzro that's a rule declaration
TimToady not before
"this is defined as that"
GlitchMr Today everybody wants arrows
Even Java
TimToady -> as P6 lambda was picked in 2001 or so
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.
GlitchMr A04?
arnsholt masak: Yeah, that's an arrow pointing the other way 16:21
GlitchMr A04 has showed grep -> $x { $x eq 3 } @list syntax
masak hoelzro: see also en.wikipedia.org/wiki/Curry%E2%80%...espondence
TimToady GlitchMr: was really chosen before A04 came out
masak arnsholt: right.
GlitchMr That today needs one more comma.
masak .oO( needs more cowbell ) 16:22
hoelzro interesting
I hadn't thought of it that way before
GlitchMr std: grep -> $x { $x eq 3 } @list
p6eval std a8bc48f: OUTPUT«===SORRY!===␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/DJmFe5f8EP line 1:␤------> grep -> $x { $x eq 3 }⏏ @list␤ expecting any of:␤ horizontal whitespace␤ infix or meta-infix␤ infixed function…
masak hoelzro: especially interesting as the fields are separate but keep enriching each other.
GlitchMr std: grep -> $x { $x eq 3 }, @list
p6eval std a8bc48f: OUTPUT«===SORRY!===␤Variable @list is not predeclared at /tmp/1WR7r5YX2a line 1:␤------> grep -> $x { $x eq 3 }, ⏏@list␤Check failed␤FAILED 00:00 45m␤»
arnsholt masak: Other way, since Prolog is built on (a limited subset of) FOL, and the LHS is implied by the RHS 16:24
16:24 dayangkun left, am0c left 16:25 alester joined
kresike bye folks 16:26
16:27 kresike left
masak arnsholt: makes sense. still seems like the "right" way, compared to subroutines and their contents. 16:27
oh, by the way, my halfpoint grant report has been published by TPF: news.perlfoundation.org/2012/12/gra...on-of.html
16:29 cognominal left
[Coke] sadly, www.perlfoundation.org still nonresponsive. 16:30
phenny: tell allison sadly, www.perlfoundation.org still nonresponsive.
phenny [Coke]: I'll pass that on when allison is around.
[Coke] (my only known board contact who is regularly on IRC)
16:32 tokuhiro_ left, tokuhiro_ joined 16:35 brrt left, cognominal joined, cognominal left
GlitchMr Weird. Perl Foundation works for me. 16:36
16:36 hoelzro is now known as hoelzro|away, cognominal joined
pmurias japhb: how difficult would it be to add nqp-js to the benchmarks? 16:37
does passing the (stack of) contextuals as an argument to method calls seem like a sane way of implementing them in javascript? 16:38
dalek kudo-js: 249e8b2 | (Paweł Murias)++ | / (3 files):
[nqp] work on code blocks in rules
16:39
kudo-js: 590611b | (Paweł Murias)++ | / (3 files):
[nqp] implement simple ~~, pass test 45
pmurias contextuals being nowdays called dynamic variables ;) 16:44
16:45 pjcj_ joined 16:46 Su-Shee_ joined, Woodi_ joined
jnthn pmurias: Or more generally, some object representing the context overall. 16:48
16:50 skids left, Su-Shee left, Khisanth left, pjcj left, Woodi left 16:53 cognominal left 16:54 sizz_ joined, sizz left 16:56 Woodi_ left 16:58 skids joined, Khisanth joined 17:00 cognominal joined 17:02 Woodi_ joined 17:03 Woodi_ left, Woodi joined 17:16 cognominal left 17:26 MayDaniel joined 17:27 Kharec left 17:29 spider-mario joined
japhb pmurias, probably not hard at all. 17:32
I guess this is a good indication it's time to bring forward all the P6->JS compilers
pmurias, Do you have a separate nqp-js, or just a rakudo-js that only compiles NQP so far? 17:38
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:45
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:46
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?
jnthn I guess I could go profiling for answers... :)
japhb jnthn: It's been a while since I looked, give me a sec ... or that, yes. 17:48
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:49
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?
japhb jnthn, but in any case, that might give a good indication of where the problem lies.
diakopter, I do have a push test, but not a push-then-join test. 17:51
dalek rlito: d604898 | (Flavio S. Glock)++ | / (4 files):
Perlito5 - js - fix an infinite recursion in the runtime
jnthn japhb: OK
jnthn -> shopping
diakopter japhb: I'm curious how push-then-join does vs. concat
japhb diakopter, yes, that's a good test, definitely
17:52 SamuraiJack joined
diakopter I mean, presumably it'd be faster, but conceivably not 17:52
dalek rl6-bench: de30f37 | (Geoffrey Broadwell)++ | TODO:
Add high-priority TODO items for folding JS-targeting compilers into new component framework, and add pmurias++'s *-js compilers
17:53
rl6-bench: 9438b6d | (Geoffrey Broadwell)++ | TODO:
Add a couple more top tasks to the TODO, thanks to jnthn++ and diakopter++
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
Nope, but adding them to the TODO! 17:56
diakopter also raw object (bare class) creation?
then class with various attributes
also, doing a single unicode property lookup in a regex a bunch of times 17:57
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
no, just a class, then calling new on it a bunch of times
but yeah that too
are there multimethod dispatch benchmarks? 18:00
I can imagine that varying a lot across implementations
japhb Quite.
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.)
OK, any more, diakopter? 18:02
diakopter hrm
man-or-boy 1..20 }:> 18:03
18:03 Kharec joined
[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
[Coke] (or data file?)
diakopter some might get to 20 with ease
japhb [Coke], right now no site. I've just been gist'ing the results I've gotten after each run. 18:04
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:05
dalek rl6-bench: e8cff27 | (Geoffrey Broadwell)++ | TODO:
Expand tagged test concept in TODO, add diakopter's test ideas
18:06
diakopter man or boy tests extremely deep closure creation
japhb diakopter++ # all the good ideas
And argument passing, as I recal
er recall
diakopter string split would be good, both fixed string and regex 18:07
dalek rl6-bench: 0d9bfc1 | (Geoffrey Broadwell)++ | TODO:
More diakopter++ ideas, and clarify one of them
18:09
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:10
diakopter attribute assignment and retrieval is very important, too. including int for those that support it 18:11
18:11 dakkar left
diakopter ok, I can't think of any more for now 18:14
dalek rl6-bench: c023c1f | (Geoffrey Broadwell)++ | TODO:
Yet another diakopter++ idea
18:16
japhb Thank you very much, diakopter!
diakopter yw
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 fhelmberger left
GlitchMr .u Ǫ 18:45
phenny U+01EA LATIN CAPITAL LETTER O WITH OGONEK (Ǫ)
GlitchMr .u į 18:46
phenny U+012F LATIN SMALL LETTER I WITH OGONEK (į)
GlitchMr .u y̨ 18:47
phenny U+0079 LATIN SMALL LETTER Y (y)
U+0328 COMBINING OGONEK (◌̨)
GlitchMr perl6: 'y̨'.chars.say 18:49
p6eval rakudo e2f2dc, niecza v24-5-g599cbcb: OUTPUT«2␤»
awwaiid_ what does that mean? 'y'.chars.say
GlitchMr It should be 1, right?
awwaiid_: are you need to Perl 6?
awwaiid_ no 18:50
GlitchMr Well
awwaiid_ just don't know what .chars does
GlitchMr .chars is a method of string
It shows how many graphemes string has... or as in current implementations - characters.
18:50 ingy left, ingy joined
awwaiid_ ah. and 'y̨' isn't 'y' 18:50
GlitchMr s/characters/Unicode characters/ 18:51
No
awwaiid_ though they look awefully similar in my font :)
GlitchMr It's LATIN SMALL LETTER Y and COMBINING OGONEK
Unicode doesn't have LATIN SMALL LETTER Y WITH OGONEK, so COMBINING OGONEK has to be used
And yes, it's real letter
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
awwaiid_: That's .comb
awwaiid_ oh, I thought .comb was for hair
GlitchMr duckduckgo.com/?q=perl6+comb
perl6advent.wordpress.com/2009/12/...nstraints/ 18:55
tadzik parrot merged threads! Parrot merged threds! 18:56
GlitchMr :-)
Threads? In Parrot. 18:57
That's interesting.
Are those green threads or native threads?
(I guess those are green, but still) 18:58
diakopter no
native-ish
tadzik: but the threads aren't really useful by Perl 6 since they can't mutate shared data, afaict 18:59
so auto-parallelization doesn't seem like it could work 19:00
GlitchMr Well, I don't like threads.
It's hard to control them.
tadzik try Go
Go is easy to gontrol
GlitchMr coroutines?
tadzik yeah, they call it goroutines
larks threads aren't that hard...
GlitchMr I thought that it was named Issue 9. 19:01
Looks like they haven't changed the name ;-).
tadzik they aren't much different themselves, it's the philosophy of communicating with them that's interesting and sort of innovative
GlitchMr I like Node.js
en.wikipedia.org/w/index.php?title...edirect=no 19:02
Or perhaps it's just an alternate name for Go language.
19:03 hash_table left
moritz fwiw the past three days of p6advent bloggging each had at least 750 views per day 19:03
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.
it wouldn't be the first time a more successful language uses a catchy name that a less successful language used first.
GlitchMr I would like Go more if it would be named Issue 9
masak that is duly noted.
tadzik it would be easier to Go-ogle 19:05
moritz and the post for tomorrow is already scheduled for publishing
so far, so good
masak so, who wants slot #17? :) github.com/perl6/mu/blob/master/mi...2/schedule 19:06
only two slots left, not counting the special Slot 24. grab them while they're free!
colomon ooo, 17 is a good number. 19:07
moritz nr: say 17.is-prime
p6eval rakudo e2f2dc, niecza v24-5-g599cbcb: OUTPUT«True␤»
colomon glad they agree on that one.
flussence if nobody's taken them by next week, I might think about it...
moritz same here :-)
moritz takes a look into the topic-brainstorming file 19:08
tadzik hm
I could write something too :)
masak tadzik! you're not on the advent calendar yet!? 19:09
tadzik nope
must've missed it
GlitchMr Looks like he isn't
masak grab both slots, then.
tadzik gather and coroutines are equal in power
please please somebody grab thease
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 :)
colomon: I don't think we so.
do*
19:10 spider-mario_ joined
moritz gather and coroutines are equal in power -- maybe a topic for sorear++? 19:10
19:10 spider-mario left
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 :)
I tried once or twice and failed, I need an a-ha moment :) 19:12
masak hm.
to a first approximation, what is spelled 'yield' in some languages is spelled 'take' in Perl 6.
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
dalek : 0aa6073 | colomon++ | misc/perl6advent-2012/schedule:
Update misc/perl6advent-2012/schedule

Claimed topics for my posts
19:13 REPLeffect left
tadzik so, I probably want to inject my own Socket, which will not block on recv() or such 19:13
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␤␤»
masak oh, hm. :)
r: sub pausable { take 1; say "fee"; take 2; say "fie"; take 3; say "fum" }; my @a := gather pausable; say @a[$_] for ^4
p6eval rakudo e2f2dc: OUTPUT«1␤fee␤2␤fie␤3␤fum␤Nil␤»
masak tadzik: there you go. equal in power.
dalek : 450f525 | GlitchMr++ | misc/perl6advent-2012/schedule:
<tadzik> please please somebody grab thease
: 125e942 | GlitchMr++ | misc/perl6advent-2012/schedule:
Revert "<tadzik> please please somebody grab thease"

But really, I would like you to make post on Perl 6 advent :-).
This reverts commit e4cbe765f80f9351e00cd24fab0fb8aeb03dd2a6.
GlitchMr I've claimed those
tadzik hm 19:15
TimToady the second main difference is that 'gather' is not bound to a subroutine-like invocation
tadzik I'll have to experiment with that
TimToady one might say that gather/take are coroutines without the routines
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 :-)
masak 'co' is my mental concept for the greenthreadish thing that's necessary to simulate gather/take style control flow.
19:16 cognominal joined
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
TimToady well, the speed was an upgrade...
and wall.org now has a static address \o/
au ip-reuse for chart-reuse! \o/ 19:18
19:18 fgomez left
masak au++ :P 19:19
GlitchMr: not without simulating much of the runtime.
GlitchMr But technically, Brainfuck is Turing complete. 19:20
19:20 mjreed joined 19:21 leont joined
masak not just technically. it *is* Turing complete. 19:25
19:25 cognominal left
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 :-)
masak in fact, it means very little at all.
GlitchMr But it could be used to implement any algorithm 19:26
Even if it would be REALLY slow
masak yes. we already said that.
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
tadzik GlitchMr: it has about as much sense as writing it using 1s and 0s in x86 assembly 19:28
(or so I think:))
GlitchMr Except... assembly is better language, isn't it?
I even have done some short programs in assembly
masak given the choice, I'd pick x86 assembly language, yes. 19:30
19:33 cognominal left 19:35 fgomez joined 19:39 cognominal joined 19:41 fgomez left
flussence why's "when" allowed as a postfix, but not "default"? 19:43
GlitchMr Because default as postfix doesn't make sense. 19:45
What would it do?
And most importantly, you cannot put anything in default section 19:46
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;
GlitchMr This is ugly
leont Wouldn't 􏿽xABsay 42 􏿽xBB be the same? 19:48
masak yes :)
GlitchMr If I would see 'say 42 default' in code, I would instantly convert it to block
moritz nr: given 42 { default { .say }; say 'still here' }; 19:49
p6eval rakudo e2f2dc, niecza v24-5-g599cbcb: OUTPUT«42␤»
19:49 fowe joined
moritz so, 'say 42' isn't the same as the hypothetical 'say 42 default;' 19:50
masak moritz: arguably, it is. 19:51
moritz: because statement-mod 'when' doesn't have that exit effect.
nr: given 42 { say "hep!" when 42; say "still here" }
p6eval rakudo e2f2dc, niecza v24-5-g599cbcb: OUTPUT«hep!␤still here␤»
masak moritz: see? :)
it would make sense for 'default' not to have it either.
which would make statement-mod 'default' a no-op.
TimToady it's equivalent to say 42 when *; 19:52
masak right.
(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:53 SamuraiJack left
TimToady yes, and I still think Perl 6 has the right end of that decision 19:54
masak too
19:58 not_gerd joined
not_gerd hello, #perl6 19:58
masak not_gerd! \o/ 20:01
20:01 fgomez joined
not_gerd apparently it's T-4h until the advent post goes live 20:01
20:02 whooguy joined
not_gerd thinks it would be nice if wordpress showed what time it thinks it is right now... 20:02
GlitchMr cve.mitre.org/cgi-bin/cvename.cgi?n...-2008-3775
Seriously? Storing passwords using ROT-25?
jnthn ROT-25?! 20:03
tadzik safer than ROT-13, you know
bigger number
jnthn "It's securer than ROT-13 'cus it's obscurer"
GlitchMr It could be decoded using ROT-1
TimToady IBM -> HAL 20:04
tadzik "Folder Lock 5.9.5 and earlier uses weak encryption (ROT-25)"
masak .oO( and if ROT-25 is not secure enough, just apply it, say, 13 times )
tadzik the new definition for "understatement"
GlitchMr No!
Apply it 26 times
It will be very safe
TimToady twice as good as 13
masak why not go the whole hog and apply it 52 times, then.
GlitchMr Good idea 20:05
masak we are agreed.
GlitchMr I should use it... wait... why it doesn't seem to work
TimToady you have to apply it once per week, all year long
GlitchMr It's probably a bug in my algorithm
TimToady that's how you get 52
GlitchMr I get exactly what I've put as input
TimToady you shouldn't get that till 52 weeks from now
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
TimToady tr/B-ZA/A-Z/, sleep 7*24*3600 for 1..52 20:07
GlitchMr oops
I think I have bug in my algorithm
You see, it modifies $_, not my string 20:08
And $_ is in range of 1 .. 52
(except it should cause error in actual Perl)
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:09
dalek rl6-roast-data: 87c2418 | coke++ | / (4 files):
today (automated commit)
20:10
rl6-roast-data: 682cdd6 | coke++ | / (3 files):
today (automated commit)
GlitchMr put aren't threads eval?
but*
skids
.oO(encode 26*2 alpha as 52 playing cards?)
tadzik it's like saying "Considered Harmful"
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"
TimToady "Considered Harmful" Considered Harmful
GlitchMr But well, I guess you could make ROT-26 function and call it identity function
jnthn std: say "foo\y";
p6eval std a8bc48f: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\y' at /tmp/J3ASCM1zOB line 1:␤------> say "foo\y⏏";␤Check failed␤FAILED 00:00 41m␤» 20:12
GlitchMr The problem is that it only works on strings
TimToady it's an autoquine
huf i think it's just code for "i dont like it" :)
GlitchMr PHP Considered Harmful
skids considered harmful meme is considered harmful because considered harmful.
diakopter Considered Considered 20:13
GlitchMr ""Considered Harmful" Considered Harmful" Considered Harmful
huf kohn-cider
GlitchMr Perl 7 Considered Harmful 20:14
masak no, Perl 7 considered perfect.
read your apocalypses, young whippersnapper :)
TimToady Perfectly harmless, anyway...
masak :P
huf hmmm..... 6 feels a bit diabolical 20:15
if 7 is perfect
leont Chtulhu considered harmful
GlitchMr Perl 4 Considered Harmful
Ok, other version
Is it now fine?
TimToady well, 4 is the number of "death"
20:15 whooguy left
huf in japan? 20:15
GlitchMr in Japan?
huf havent heard it connected in western culture 20:16
tadzik Chi
TimToady who said anything about western culture?
tadzik or was it Shi?
it appeared in Usagi for sure :)
huf shin
oh wait, 4 is maybe shi
but wasnt "shin" the word for death?
skids shi schmi.
TimToady which is why they use 'yon' instead
and 'nana' instead of 'shichi' 20:17
huf yes, much like some people use 14 for 13
TimToady you need a hobbit for that though
huf is that like a nanobit?
TimToady hobbits aren't that small... 20:18
huf they're smaller than they used to be
we know that much from the books :)
TimToady sure, but Bilbo is hardly playing a bit part
20:18 tokuhiro_ left
tadzik ici, ni, san, shi. RIght, 4 20:19
diakopter Sam sure grew a lot
TimToady only sideways
it's Merry and Pippin that got taller
20:19 tokuhiro_ joined
huf grew up to join the aristocracy instead of leading the glorious hobbit's revolution against it 20:19
TimToady Sam never drank the Entwash, or whatever it was called 20:20
huf draught
20:20 kurahaupo joined
TimToady
.oO(Ent Koolaid)
20:21
masak not unless the Ents were a death cult.
huf heh. even the ents drank the elven koolaid tho
TimToady always thought it was the hobbits brainwashing the ents, but maybe it was the other way around
PerlJam they drank flavoraid in jonestown, so ... no worries. 20:22
20:22 SmokeMac_ joined
TimToady masak: I believe they thought they were marching their last march 20:22
huf PerlJam: i see you drank the "historical accuracy" koolaid
masak PerlJam: still, I wonder if the "drink the koolaid" expression would be as widely used if people knew about the massacre. :/
PerlJam huf++ :) 20:23
masak of course, people do get desensitized fairly quickly...
TimToady considering that's the origin of the expression, more people did used to know it
huf TimToady: well, it did happen around March 3
20:24 SmokeMachine left
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:24
TimToady shoulda been called "Slothlorien" 20:25
huf it's named after a garden of dreams iirc. no wonder :) 20:26
20:29 Kharec left, wamba left, SmokeMac_ left
jnthn moritz: about? 20:30
GlitchMr PHP 4.0 Considered More Harmful than Already Harmful PHP 5.0 that is Considered Harmful 20:34
tadzik stahp
Krunch PHP 4 Considered Most Harmful 20:35
flussence
.oO( we need some sort of "considered harmful" shorthand, like up-arrow notation... )
GlitchMr Software patents Considered Harmful 20:36
leont Krunch: you obviously never touched PHP 3 20:38
huf the pit has no bottom 20:39
always remember that ;)
GlitchMr Turtles all way down Considered Harmful
moritz jnthn: yes, now :-) 20:40
huf GlitchMr: but how else would you draw the turtle, if not with another one?
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
*was
moritz: Now I've discovered the answer is "no", my question is "should we"? :)
GlitchMr php.net/goto
moritz jnthn: yes, we should
GlitchMr goto considered best PHP feature
It works!
jnthn moritz: Know of any blockers on that, or just "wasn't done"? 20:42
20:42 cognominal left
moritz jnthn: just wasn't done 20:42
jnthn moritz: OK, thanks
GlitchMr I want computed goto in PHP 5.5
jnthn .u ⏏ 20:43
phenny U+23CF EJECT SYMBOL (⏏)
masak GlitchMr: you can emulate computed goto using anonymous functions. 20:46
...and switch statements, I guess.
GlitchMr Also, Java 8 is going to have GOTO statement: 20:48
GotoFactory.getSharedInstance().getGoto().go(13);
(not really)
But somebody actually made a library that adds goto using this syntax. 20:50
It actually feels like something that should be part of Java.
www.steike.com/code/useless/java-goto/ 20:51
jnthn Does anybody actually have a font with ⏏ in it? :P 20:52
GlitchMr I do 20:53
jnthn ah...me, just not in my terminal or putty...
GlitchMr jnthn: dl.dropbox.com/u/63913412/eject.png
leont does too
tadzik I do too 20:54
so, I'm pink apparently
leont Indeed, you are 20:55
masak jnthn: works here on Arch Linux. 20:56
tadzik good that I'm not this darkblue that's completely invisible
masak you mean like jnthn?
tadzik jnthn is bold cyan to me
jnthn :P
tadzik Krunch on this screenshot is 20:57
masak jnthn is bold? man, what an honor it would be to be bold.
GlitchMr I really don't care about colors my IRC client chooses for nicks
masak how many nicks are bold?
GlitchMr At least it's colorful
tadzik masak: see dl.dropbox.com/u/63913412/eject.png
masak tadzik: looks like we're all bold. 20:58
tadzik you don't seem bold
masak oh, right.
except when I'm white on hot pink.
GlitchMr It's my terminal
PerlJam masak is the boldest one of us all! ;)
GlitchMr It seems to render colors with light property as bold.
Oh, found option to disable that 20:59
dl.dropbox.com/u/63913412/nobold.png
Now nobody is bold
tadzik boaring 21:00
GlitchMr No idea why it is default
(also, quines FTW) 21:01
21:03 SmokeMachine joined
masak today's mini-challenge: shortest quine, on p6eval. 21:04
tadzik r: 21:05
p6eval: booo
masak nice try :P
diakopter r: ␤ 21:06
p6eval Program empty
masak empty submissions are disallowed, because of a rule that I just made up.
r: ␤␤␤␤␤␤ ␤␤␤
p6eval Program empty
tadzik surely it won't print that many newlines :)
Juerd Does it have to PRINT itself, or evaluate to itself?
diakopter I'll empty your program 21:07
Juerd If the latter, 1
GlitchMr r: $_=Q[say "\$_=Q[$_];.eval];.eval
p6eval rakudo e2f2dc: OUTPUT«===SORRY!===␤Unable to parse expression in quote:sym<dblq>; couldn't find final '"' at line 2, near ""␤»
GlitchMr r: $_=Q[say "r: \$_=Q[$_];.eval"];.eval
p6eval rakudo e2f2dc: OUTPUT«use of uninitialized value of type Any in string context in block at eval_0:1␤␤r: $_=Q[];.eval␤»
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␤␤»
TimToady n: $?ORIG.say
p6eval niecza v24-5-g599cbcb: OUTPUT«$?ORIG.say␤»
GlitchMr r: $_=Q[say "r: \$_=Q[$_];.eval"];eval $_
p6eval rakudo e2f2dc: OUTPUT«use of uninitialized value of type Any in string context in block at eval_0:1␤␤r: $_=Q[];.eval␤»
sorear TimToady beat me to it
good * #perl6 21:09
moritz n: say$?ORIG
p6eval niecza v24-5-g599cbcb: OUTPUT«===SORRY!===␤␤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:␤------> say⏏$?ORIG␤␤Two terms in a row (listop with args requires…
masak yeah, I think that's gonna be hard to beat :)
GlitchMr n: "n: $?ORIG"
p6eval niecza v24-5-g599cbcb: ( no output )
GlitchMr n: "n: $?ORIG".say
p6eval niecza v24-5-g599cbcb: OUTPUT«n: "n: $?ORIG".say␤»
21:09 leont left
masak anyone care to add $?ORIG.say to rosettacode.org/wiki/Quine#Perl_6 ? :) 21:09
diakopter GlitchMr: !!
moritz r: BEGIN ~callframe(2).my<$/>
p6eval rakudo e2f2dc: OUTPUT«use of uninitialized value of type Any in string context in code at /tmp/9vyuzyoAf3:1␤␤»
GlitchMr n: "niecza v24-5-g599cbcb: OUTPUT«n: $?ORIG»".say
moritz r: BEGIN ~callframe(3).my<$/>
p6eval niecza v24-5-g599cbcb: OUTPUT«niecza v24-5-g599cbcb: OUTPUT«n: "niecza v24-5-g599cbcb: OUTPUT«n: $?ORIG»".say»␤»
rakudo e2f2dc: OUTPUT«===SORRY!===␤Nominal type check failed for parameter ''; expected Any but got NQPMatch instead␤»
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 kaare_ left
moritz r: BEGIN ~callframe(4).my<$/>.Str 21:10
p6eval rakudo e2f2dc: ( no output )
moritz r: BEGIN ~callframe(5).my<$/>.Str
p6eval rakudo e2f2dc: OUTPUT«use of uninitialized value of type Any in string context in code at /tmp/T7EDLJ0ZDs:1␤␤»
GlitchMr Bye
21:10 GlitchMr left
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 21:15 cognominal_ joined 21:16 cognominal left
masak $?ORIG doesn't appear to be spec'd. 21:19
21:20 cognominal_ left
moritz it's a partisan extension :-) 21:21
21:24 not_gerd left 21:26 cognominal_ joined 21:27 fowe left, not_gerd joined 21:35 bbkr_ joined
bbkr_ is there an operator to swap 2 variables without using temporary one? 21:36
diakopter $a yourmom $b
skids ($a, $b) = $b, $a;
bbkr_ skids: thanks 21:37
masak diakopter: "yourmom", being more noun-y, is a misleading name for an operator. 21:38
diakopter but not an operative 21:39
skids $a varsexchange $b # has nothing to do with gender bending
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:40
p6eval rakudo e2f2dc: OUTPUT«2␤1␤» 21:41
21:41 cognominal__ joined, cognominal_ left
masak .oO( but does it have to do with an Italian firm by the name "PowerGen"...? ) 21:41
huf or perhaps a certain island?
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)»
diakopter _._.
skids I think the plastic surgeon would probably shut that down after the first dozen times or so.
masak or find a way to optimize the procedure. 21:43
diakopter or timeout
colomon are there other p6 examples of an operator changing its arguments? (other than the usual pre/post-fix ++, --) 21:44
dalek kudo/stdier: 6b01881 | jnthn++ | src/ (2 files):
Start showing context, with eject marker.
kudo/stdier: a109e73 | jnthn++ | src/Perl6/Grammar.pm:
Make panic always throw X::Comp::AdHoc.

This also means all the panics get the location included in the error.
skids hmmm. 21:46
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()␤»
jnthn moritz: Seems to have worked out OK
diakopter r: my$a="\$a.eval";$a.eval
p6eval rakudo e2f2dc: OUTPUT«(timeout)»
diakopter I'm sure there's a shorter way of doing that 21:48
21:53 Moukeddar joined
masak Moukeddar! \o/ 21:53
diakopter n: my $a='$a.eval';$a.eval
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…
Moukeddar masak, o/ 21:54
how are you doing, Sir ?
sorear Moukeddar! masak!
masak sorear! \o/
Moukeddar: I'm fine, now that you are here ;)
Moukeddar sorear, o/ dude 21:55
it's always great to be here :)
masak duh, that's why we're here *all the time*. :P 21:56
21:56 wamba joined
masak wamba, welcome. :) 21:56
wamba hi
sorear moravecnet 21:57
pmurias japhb: I only have nqp-js ATM
21:58 cognominal__ left
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
masak Moukeddar: surely you can't have it as bad as we do. do you have snow? 21:59
jnthn Moukeddar: What is cold? 22:00
skids colomon: ~~ may alter its lhs operand when used with s///;
tadzik Baby don't hurt me
Moukeddar now, but for someone used to 40+􏿽xB0C , 10􏿽xB0C can make is bad
colomon skids: good point
Moukeddar jnthn, the sickness and the temp, both
pmurias japhb: what other P6->JS compilers are there? Perlito6?
jnthn Moukeddar: yeah, guess it's the relative difference. 22:01
22:01 cognominal joined
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!
jnthn masak: yeah. Today I thought...finally...winter!
masak :) 22:02
dalek kudo/stdier: cff96f1 | jnthn++ | src/core/Exception.pm:
Color output of compile time errors.
pmurias jnthn: what other context besides contextual/dynamic variables do we want to pass to calls?
Moukeddar doesn't like cold weather, it makes his jaws hurt 22:03
jnthn pmurias: It's more that contexts are first class thingies.
moritz, others: Feel free to give stdier a try. It should make things a bit better. 22:04
But maybe worse in some ways I didn't discover yet... :)
dalek kudo/stdier: 8dbb9a8 | jnthn++ | src/core/Exception.pm:
Only show location if we have it.

Just hardening for the case we don't for some reason.
22:05
pmurias jnthn: there is a way to handle them in p6? 22:07
22:07 skids left
jnthn pmurias: Well, that's kinda what OUTER, CALLER etc are about. 22:07
r: sub your($what, $name) { say $what{$name} }; sub foo() { my $x = 42; your(MY::, '$x') }; foo 22:08
p6eval rakudo e2f2dc: OUTPUT«42␤»
jnthn Also eval needs access to what lexicals are in scope, and the REPL has similar wants. 22:09
These all hang off the same kinda thing.
pmurias jnthn: I can implement eval using eval 22:10
&caller seems to return a first class objec
t
jnthn: I plan to use as much native things from js as possible 22:11
as keeping variables in hash tables seems much slower then keeping them in registers
22:13 cognominal left
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:13
22:14 spider-mario_ left
pmurias jnthn: that's what I hope :) 22:15
jnthn: gather/take is the most difficult part to work around
22:15 cognominal joined
pmurias on server side v8 there are coroutines (fibers) 22:15
as a module 22:16
but on the client side I'm afraid I might be forced to use CPS
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
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:18
If that's your goal, anyway. 22:19
If the goal is to always have it as a cross-compiler, you've a bit more space.
But then eval is kinda...hard :) 22:20
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:21
pmurias jnthn: that could be helpfull for dynamic lexicals 22:23
err contextuals
jnthn: as long as the server side nqp can compile rakudo, we might sacrifice some things on the browser side 22:25
I'm not sure eval is important enought to load rakudo on every web page
jnthn Well, there's always lazy loading :)
sorear needs to get better at supressing the unconcious "jnthn is trying to obsolete niecza" reflex :|
jnthn sorear: jnthn is just trying to make Rakudo better 22:26
Same as for the last several years, but a bit further along than the "omg we can do hello world now" days :)
(OK, to be fair, Rakudo always could do that. But I think I did put in hashes...) 22:27
("always could" as in, before I ever commat)
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
masak also, I'm not sure people in general are going to recognize "commat" as an ablut "commit" :P
22:33 bluescreen10 left
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.
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.
phenny jnthn: I'll pass that on when moritz is around.
22:37 Moukeddar left 22:47 bluescreen10 joined 22:48 wamba left 22:49 cognominal left 22:53 cognominal joined 23:02 mjreed left, MayDaniel left
pmurias jnthn: how is LTM implemented in nqp? 23:03
jnthn pmurias: See src/QRegex/NFA.nqp 23:05
pmurias: And a couple of bits of Cursor call into it
pmurias will read that tommorow when he's fresh 23:07
jnthn Advised. :D
Moze byt so vodkou... :P 23:08
masak what could possible go wrong? :) 23:11
jnthn typing "possibly", apparently :P
masak y* 23:12
23:13 fgomez left
masak 'night, #perl6 23:13
23:15 stopbit left 23:17 cognominal left
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:18
jnthn rurban: Yeah, but nqp didn't have a custom lexpad PMC 23:19
rurban exactly :) 23:20
jnthn That's about zero chance of that going away.
So need to figure out how to make things work with it. 23:21
rurban Exactly
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
jnthn How does that help? 23:23
I can already tell if the thing is of the correct type.
rurban You can check for your types
You can check it faster
jnthn I've been doing that in nqp for ages
Faster than comparing an integer stored in a static?
rurban Not in nqplexpad
23:23 cognominal joined
rurban no, the same speed 23:23
23:24 japhb_ joined
jnthn Right, that's what happens in nqp.ops 23:24
I mean, the constants are nice, but I don't see why the same approach couldn't have worked in the dynpmcs...
sorear jnthn: question: can nqp-nom support both parrot threads and JVM threads? 23:25
jnthn sorear: I'm not sure I really understand Parrot threads just yet. 23:26
I'm also rather worried that the design that exists expects that all operations take place through the Parrot v-table
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
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
phenny japhb_: I'll pass that on when masak is around.
japhb_ . all rows in a DB table); it was all to avoid runaway scripts taking down servers.
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.
diakopter japhb_: no recursion either?
japhb_ diakopter, not in unlimited fashion.
diakopter (but how could it detect whether it was limited?)
japhb_ Everything was designed to eventually bottom out.
diakopter, by not allowing you to ever come back to the same place in the control flow graph 23:29
meaning, you could try doing mutual recursion, but as soon as you came back to the first one, boom.
(At least, that's my memory of it.)
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. :-)
sorear japhb_: mmm, BLooP
jnthn rurban: That is, if the object is manipulated from another thread?
rurban read-only access should be fine.
read-write forbidden 23:31
for write we would need a mutex
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).
[Coke] jnthn: are you going to make unused variables warn as part of the STuDlification?
jnthn [Coke]: It's on the todo list 23:32
sorear has anyone here but me ever played with Coq?
jnthn [Coke]: Also because I need the tracking to fix That Bug in hash/block disambig, iirc
jnthn tries REALLY hard not to make a terrible pun in reply to sorear's question 23:33
rurban: How's the GC handling the multiple threads?
sorear jnthn: I'm sure they've heard them all a million times
jnthn rurban: I mean, is the problem with writes mostly connected to that?
sorear: I'm sure :) 23:34
23:34 skids joined
[Coke] jnthn++ 23:34
jnthn sorear: I at least know what it is, but never played with it.
[Coke] (for pun restraint)
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?
rurban So we should really create convenience _ro _ wrappers in pmc2c to access some pmc data. 23:36
23:36 am0c joined
rurban referencing as ro is okay. rw is the problem, and we have no API for this yet 23:36
whiteknight thought about adding these.
pmurias sorear: I took a Coq class at uni 23:37
23:37 Kharec joined, am0c left, am0c joined 23:42 rindolf left
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:43
23:43 SHODAN left 23:44 SHODAN joined
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:44
23:45 cognominal left, imarcusthis- left
dalek p: 9808c64 | rurban++ | src/pmc/sixmodelobject.pmc:
untabify src/pmc/sixmodelobject.pmc

windows 4-char tabs made it hard to read on unix. Added coda
23:46
23:46 imarcusthis joined
jnthn rurban: If you have thread A owning the object that has the only reference to an object owned by thread B 23:47
And thread A reads the reference into, say, a register and nulls it
And then thread B runs its GC
How does it know not to collect the object?
dalek p/gh67-threads: 98cc8bd | rurban++ | src/pmc/nqplexpad.pmc:
nqplexpad.pmc: add coda
23:48
p/gh67-threads: 35cff96 | rurban++ | t/nqp/67-threads.t:
t/nqp/67-threads.t: fix test - print ok 1
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
jnthn Well, sleep time here also...
rurban I'd like to have those questions answered in our pdd25 23:50
japhb_ g'night, jnthn
rurban Our docs are a bit sparse on howto's and shared data
jnthn 'night
23:52 cognominal joined 23:58 cognominal left 23:59 bluescreen10 left