Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-12-27

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:01 xenoterracide http://privatepaste.com/6952e0c99d looking at starting to implement a DI framework for p6, any thoughts on my syntactic sugar?
00:05 xenoterracide
00:08 kaare_ joined #perl6
00:10 fribeiro joined #perl6
00:28 fribeiro just opened the ticket about the java interface types, let me know if I can help in any way. https://rt.perl.org/Ticket/Display.html?id=120879
00:36 vinian joined #perl6
00:40 hoverboard joined #perl6
00:50 PZt joined #perl6
00:54 fribeiro left #perl6
01:04 hoverboard joined #perl6
01:05 hoverboard joined #perl6
01:11 kurahaupo_mobile joined #perl6
01:16 BenGoldberg joined #perl6
01:17 rurban1 joined #perl6
01:49 Ben_Goldberg joined #perl6
01:51 jnap joined #perl6
01:56 hoverboard joined #perl6
02:10 xenoterracide joined #perl6
02:18 rurban1 joined #perl6
02:26 thou joined #perl6
02:28 kaare_ joined #perl6
02:31 kaare__ joined #perl6
02:35 kaare_ joined #perl6
02:41 xenoterracide method delete_key($a --> Int) # what is the behavior of $a --> Int here?
02:45 TimToady --> Int is just the return declaration
02:47 xenoterracide ah, as opposed to writing returns Int
02:48 TimToady --> looks cooler :)
02:49 TimToady and it's better to associate the return declaration with the signature, I think
02:49 TimToady especially if we get return declarations that can declare a variable
02:49 TimToady an "out" parameter as it were
02:49 TimToady these are specced but NYI
02:59 gfldex joined #perl6
03:01 kurahaupo_mobile joined #perl6
03:08 xenoterracide hmm
03:19 kaare_ joined #perl6
03:19 rurban1 joined #perl6
03:20 xenoterracide little less readable if you aren't yet familiar with it. otherwise it's 6 of 1 half dozen of another.
03:40 gfldex joined #perl6
03:54 lue Hey, I found an error in one of the backlinks :)
03:57 jeffreykegler_ joined #perl6
03:58 dalek roast: 053243e | lue++ | S02-names/is_default.t:
03:58 dalek roast: [S02-names] Add missing > to backlink.
03:58 dalek roast: review: https://github.com/perl6/roast/commit/053243ebb2
04:13 * lue wonders if he can use Perl 6's formatting code rules to avoid reinventing the mess of angle counting and the like.
04:20 lue nope :(
04:20 rurban1 joined #perl6
04:24 jnap joined #perl6
04:27 brother| joined #perl6
04:29 jeffreykegler_ joined #perl6
04:30 rurban joined #perl6
04:30 hoelzro joined #perl6
04:35 xenoterracide lue: angle counting?
04:37 lue xenoterracide: Not quitting early on L<The C<say> thing>
04:39 lue .oO(Come to think of it, I'm not sure that example's even allowed in normal Pod6 code...)
04:47 TimToady as long as you do one-pass parsing correctly, you don't have to count angles, the grammar counts them for you
04:51 preflex joined #perl6
04:57 lue TimToady: you might want to tell that to Rakudo's pod_formatting_code :P
05:04 rurban1 joined #perl6
05:05 xenoterracide is a Set @ or %? (also been poking for Set docs and can't find 'em)
05:09 dalek Pugs.hs: cbf5153 | (Yoshikuni Jujo)++ | pugs- (5 files):
05:09 dalek Pugs.hs: new exception system
05:09 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/cbf51534b9
05:09 dalek Pugs.hs: 9d8b59d | 唐鳳++ | pugs- (5 files):
05:09 dalek Pugs.hs: Merge pull request #28 from YoshikuniJujo/master
05:09 dalek Pugs.hs:
05:09 dalek Pugs.hs: new exception system
05:09 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/9d8b59d96b
05:25 jnap joined #perl6
05:30 xinming joined #perl6
05:38 SamuraiJack_ joined #perl6
05:48 xenoterracide pokes about trying to figure out how to have an attribute that's a set of type
05:56 xenoterracide what's := ? I believe it's some sort of assignment operator, but it's not documented in operators
06:02 Rotwang joined #perl6
06:03 sftp joined #perl6
06:05 cotto joined #perl6
06:20 lue xenoterracide: S03:2296
06:20 synopsebot Link: http://perlcabal.org/syn/S03.html#line_2296
06:26 jnap joined #perl6
06:33 japhb Timbus: Pull request for Net--IRC waiting for you.  :-)
06:47 moritz p: say Set.^roles
06:47 camelia rakudo-parrot 53c60c: OUTPUT«(Setty)␤»
06:47 moritz p: say Setty.^roles
06:47 camelia rakudo-parrot 53c60c: OUTPUT«(Setty)␤»
06:47 moritz r: say Set ~~ Positional
06:47 camelia rakudo-parrot 53c60c, rakudo-jvm 53c60c: OUTPUT«False␤»
06:47 moritz r: say Set ~~ Associative
06:47 camelia rakudo-parrot 53c60c, rakudo-jvm 53c60c: OUTPUT«True␤»
06:58 xenoterracide is there anything like Moose's handles? for method delegation, rather than hand writing each method?
06:58 darutoko joined #perl6
06:59 rurban1 joined #perl6
07:09 moritz yes, there is handles
07:09 moritz r: class A { has $.x handles <sqrt chr> }; say A.new(x => 4).sqrt
07:10 camelia rakudo-parrot 53c60c, rakudo-jvm 53c60c: OUTPUT«2␤»
07:13 erkan joined #perl6
07:16 sjn joined #perl6
07:17 telex joined #perl6
07:18 Timbus a command handler :o oh my, japhb
07:18 preflex Timbus: you have 1 new message. '/msg preflex messages' to read it.
07:21 dayangkun_ joined #perl6
07:21 araujo joined #perl6
07:22 xenoterracide_ joined #perl6
07:25 Timbus japhb, just went over the whole change list; love it. and no I would not mind at all if you tried adding concurrency to the bot
07:27 Timbus i was planning to make something where you would enqueue events into the main loop. but since perl6 has an exposed 'scheduler' now I'm sure something even better could be done
07:33 [Sno]_ joined #perl6
07:35 itz_ joined #perl6
07:36 cognominal joined #perl6
07:36 __rnddim__ joined #perl6
07:37 kaleem joined #perl6
07:38 japhb Timbus: Oh, excellent, thanks!
07:42 Timbus japhb, np. :)
07:42 Timbus my only requirement is 'make it as simple and cool as possible'
07:43 Timbus and make a twitter feed fetcher to prove it works
07:43 Timbus :3
07:44 xinming joined #perl6
07:47 japhb *chuckle*
07:47 japhb I'll get right on that.  ;-)
07:49 japhb *yawn*
07:50 japhb & # Time to trundle off to the land of slumber
08:05 Celelaptop joined #perl6
08:05 sftp joined #perl6
08:05 Celelibi joined #perl6
08:05 genehack joined #perl6
08:05 zamolxes joined #perl6
08:09 xenoterracide r: class A { has $.x handles get_sqrt => sqrt }; say A.new(x => 4).get_sqrt
08:09 camelia rakudo-parrot 53c60c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/P97eOJ0uzl�Not enough positional parameters passed; got 0 but expected 1�at /tmp/P97eOJ0uzl:1�------> �»
08:09 camelia ..rakudo-jvm 53c60c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/JN83YXtM4f�Not enough positional parameters passed; got 0 but expected 1�at /tmp/JN83YXtM4f:1�------> �»
08:10 xenoterracide r: class A { has $.x handles get_sqrt => 'sqrt' }; say A.new(x => 4).get_sqrt
08:10 camelia rakudo-parrot 53c60c, rakudo-jvm 53c60c: OUTPUT«2␤»
08:11 xenoterracide r: class A { has $.x handles get_sqrt => 'sqrt' = 4 }; say A.new.get_sqrt
08:11 camelia rakudo-jvm 53c60c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/aA_0DTKWW1�Cannot modify an immutable value�at /tmp/aA_0DTKWW1:1�------> �»
08:11 camelia ..rakudo-parrot 53c60c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7oDV0aHiO1�Cannot modify an immutable value�at /tmp/7oDV0aHiO1:1�------> �»
08:12 xenoterracide r: class A { has $.x handles ( get_sqrt => 'sqrt' ) = 4 }; say A.new.get_sqrt
08:12 camelia rakudo-parrot 53c60c, rakudo-jvm 53c60c: OUTPUT«2␤»
08:15 zaydon joined #perl6
08:18 Celelaptop joined #perl6
08:20 rurban1 joined #perl6
08:29 rindolf joined #perl6
08:29 mtk joined #perl6
08:31 zakharyas joined #perl6
08:57 zaydon joined #perl6
09:22 dayangkun_ joined #perl6
09:23 xinming_ joined #perl6
09:32 tadzik xenoterracide: you may want to look at the IoC module
09:49 dayangkun joined #perl6
09:53 immortal joined #perl6
09:53 immortal joined #perl6
10:03 kaare_ joined #perl6
10:22 rurban1 joined #perl6
10:23 vinian left #perl6
10:31 atroxaper joined #perl6
10:37 FROGGS my @lines = "TODO_core_modules.md".IO.slurp.lines.grep(/^'[ ] ' <!before 'todo'>/).map({ /^'[ ] ' (\S+)/; ~$0 }); # I love it :o)
10:38 FROGGS that will find all module names I am going to stub now, using this file: https://github.com/rakudo-p5/v5/​blob/master/TODO_core_modules.md
10:42 denis_boyun joined #perl6
10:50 dagurval FROGGS: Is the plan to port most of those modules to v6?
10:55 FROGGS dagurval: I need to make them available by either porting them, or make them compile
10:56 FROGGS dagurval: the pragma "if" for example will compile as it is, which is nice :o)
10:56 FROGGS but I don't know what will work out of the box and what now, since there are too many modules and pragmas
10:59 dagurval Neat. Is it preferrable to port them or compile them as is?
11:05 FROGGS I would prefer just to compile them...
11:09 dagurval Makes sense... I was thinking that that's a nice list of porting TODOs if one knew which modules *need* to be ported :).
11:10 FROGGS true :/
11:11 [Sno] joined #perl6
11:24 dagurval And by that, easy to help. I have no idea how to compile a v5 module ;).
11:24 rurban1 joined #perl6
11:30 FROGGS it is about trying to run it, and when it explodes you fix the issue :P
11:33 dagurval Ah :P
11:34 dagurval rp: grammar A { rule TOP { <b > }; token b { c } };
11:34 camelia rakudo-parrot 53c60c: OUTPUT«===SORRY!===␤No such method 'rxtype' for invocant of type 'NQPMu'␤»
11:35 dagurval LTA error, or something worse?
11:35 FROGGS dunno if it is supposed to work...
11:38 dagurval I'll go for LTA. I'm playing with the examples in the advent calendar. Took me a while to find my mistake of an extra space :).
11:51 spider-mario joined #perl6
11:59 denisboyun joined #perl6
12:15 REPLeffect joined #perl6
12:35 SamuraiJack_ joined #perl6
12:41 REPLeffect joined #perl6
12:58 zaydon joined #perl6
12:59 vinian joined #perl6
13:12 kaare_ joined #perl6
13:13 kurahaupo_mobile joined #perl6
13:20 kaleem joined #perl6
13:22 REPLeffect joined #perl6
13:27 FROGGS[mobile] joined #perl6
13:43 92AAALHNI joined #perl6
13:44 kaare_ joined #perl6
13:55 REPLeffect joined #perl6
13:58 ajr joined #perl6
14:21 gfldex joined #perl6
14:34 johnmilton joined #perl6
14:34 PacoAir joined #perl6
14:54 thou joined #perl6
15:01 fridim_ joined #perl6
15:03 jnap joined #perl6
15:06 logie joined #perl6
15:16 Celelibi joined #perl6
15:28 gfldex joined #perl6
15:45 jnap1 joined #perl6
15:53 treehug88 joined #perl6
15:59 Psyche^ joined #perl6
15:59 ajr joined #perl6
16:14 rurban1 joined #perl6
16:17 rurban2 joined #perl6
16:24 colomon joined #perl6
16:33 atroxaper joined #perl6
16:36 atroxape_ joined #perl6
16:52 atroxaper joined #perl6
16:59 dalek rakudo-star-daily: 38a7414 | coke++ | log/ (5 files):
16:59 dalek rakudo-star-daily: today (automated commit)
16:59 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/38a7414d18
16:59 dalek perl6-roast-data: 507ffd5 | coke++ | / (5 files):
16:59 dalek perl6-roast-data: today (automated commit)
16:59 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/507ffd5960
17:24 xenoterracide tadzik: oh yeah, I was looking for that... it really is a direct port of Bread::Board... which has been causing me frustration, I suspect due to design. So I'm trying to redesign a bit, and maybe I'll backport to p5 if it pans out
17:27 xenoterracide curious as to why this used exported subroutines when the reason that Moose, and Bread::Board do that is because they want it to /look/ like syntax
17:28 TimToady std: /<b >/
17:28 camelia std 4731beb: OUTPUT«[31m===[0mSORRY![31m===[0m�Null pattern not allowed at /tmp/FSRj79KNbH line 1:�------> [32m/<b [33m�[31m>/[0m�Parse failed�FAILED 00:01 122m�»
17:29 TimToady std has a better error message there
17:29 TimToady p: /<b >/
17:29 camelia rakudo-parrot 53c60c: OUTPUT«===SORRY!===␤No such method 'rxtype' for invocant of type 'NQPMu'␤»
17:29 xenoterracide tadzik: it'll make a nice code reference, even if it's not what I want functionality wise
17:30 TimToady so rakudo is still not detecting null regex as well as it could
17:38 dalek specs: e8781d0 | util++ | S32-setting-library/Str.pod:
17:38 dalek specs: [S32/Str] Fixed copy/paste error: s/codes/graphs/;
17:38 dalek specs: review: https://github.com/perl6/specs/commit/e8781d0e92
17:40 arnsholt nqp: /<b >/
17:40 camelia nqp-moarvm: OUTPUT«Null regex not allowed at line 2, near ">/"␤panic␤»
17:40 camelia ..nqp-parrot: OUTPUT«Null regex not allowed at line 2, near ">/"␤current instr.: 'panic' pc 15975 (gen/parrot/stage2/NQPHLL.pir:5955) (gen/parrot/stage2/NQPHLL.nqp:426)␤»
17:40 camelia ..nqp-jvm: OUTPUT«Null regex not allowed at line 2, near ">/"␤  in panic (gen/jvm/stage2/NQPHLL.nqp:379)␤  in throw_null_pattern (gen/jvm/stage2/NQPP6QRegex.nqp:59)␤  in termseq (gen/jvm/stage2/NQPP6QRegex.nqp)␤  in nibbler (gen/jvm/stage2/NQPP6QRegex.nqp:98)␤  in assertion:…»
17:41 arnsholt Well, that's weird...
17:42 TimToady I guess we should tell everyone to program in nqp instead of Perl 6...
17:43 arnsholt I just figured it'd be a bug in NQP that propagated to Rakudo
17:43 arnsholt But apparently not
17:44 TimToady heh, moar simply says "Cannot find method 'rxtype'"
17:44 [particle] joined #perl6
17:48 TimToady std: /b|/
17:48 camelia std 4731beb: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Null pattern not allowed at /tmp/pwAk7Cc1wz line 1:â�¤------> [32m/b|[33mâ��[31m/[0mâ�¤    expecting any of:â�¤  quantifierâ�¤     regex_infixâ�¤    sigmaybeâ�¤Parse failedâ�¤FAILED 00:01 122mâ�¤Â»
17:48 TimToady nqp: /b|/
17:48 camelia nqp-moarvm: OUTPUT«Unrecognized regex metacharacter | (must be quoted to match literally) at line 2, near "b|/"␤panic␤»
17:48 camelia ..nqp-parrot: OUTPUT«Unrecognized regex metacharacter | (must be quoted to match literally) at line 2, near "b|/"␤current instr.: 'panic' pc 15975 (gen/parrot/stage2/NQPHLL.pir:5955) (gen/parrot/stage2/NQPHLL.nqp:426)␤»
17:48 camelia ..nqp-jvm: OUTPUT«Unrecognized regex metacharacter | (must be quoted to match literally) at line 2, near "b|/"␤  in panic (gen/jvm/stage2/NQPHLL.nqp:379)␤  in throw_unrecognized_metachar (gen/jvm/stage2/NQPP6QRegex.nqp:55)␤  in  (gen/jvm/stage2/NQPP6QRegex.nqp:108)␤  in nibble…»
17:48 TimToady p: /b|/
17:48 camelia rakudo-parrot 53c60c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Ofi9YzzaRlâ�¤Unrecognized regex metacharacter | (must be quoted to match literally)â�¤at /tmp/Ofi9YzzaRl:1â�¤------> [32m/b|[33mâ��[31m/[0mâ�¤    expecting any of:â�¤        statement listâ�¤ …»
17:49 * TimToady wonders if we need a new category, WLTA
17:51 SamuraiJack_ joined #perl6
17:55 denisboyun joined #perl6
17:58 timotimo "way less than awesome"?
18:00 TimToady yeah :)
18:00 TimToady as in, positively misleading
18:00 ajr joined #perl6
18:00 TimToady or lying through its teeth, in this case
18:01 TimToady "whaddya mean, | isn't a regex metachar?!?"
18:25 ssutch joined #perl6
18:27 vinian left #perl6
18:45 gfldex joined #perl6
18:57 ajr_ joined #perl6
18:57 timotimo i just alerted the people who run the GSM network to the fact that the GSM network is currently not doing any calls apparently
18:58 timotimo after that i'll be reachable under the PRL6 vanity :P
18:58 Rotwang joined #perl6
19:29 japhb_ joined #perl6
19:37 denisboyun joined #perl6
19:39 timotimo hm. christmas is practically over, yet nobody is pushing loads of cool rakudo or moarvm commits? :(
19:40 tadzik I suppose everybody's christmasing :)
19:41 timotimo it would appear so
19:44 japhb timotimo: Visiting relatives mark it hard to get code written.  OTOH, I did manage to get some Net::IRC commits in, so that's something I suppose.  :-)
19:47 * TimToady has been writing pomes instead
19:49 japhb Odes to a pomegranate?
19:50 timotimo cool :)
19:50 timotimo i got tiny spec changes in during my train rides
19:52 Celelibi joined #perl6
19:52 hoverboard joined #perl6
19:53 segomos_ everyone is christmas'd out
19:53 segomos_ fat dumb happy
19:55 TimToady Christmas is going, the goose is getting flat; please take a penny from the old man's hat...
19:55 lue japhb: about your Net::IRC commits, do they fix the issue where /msg bot causes the bot to send the response to itself by default?
19:57 japhb I didn't explicitly work on that, but lemme check.
19:58 tadzik I was trying to port my C asteroids to Perl 6:)
19:58 tadzik our SDL modules is not in a best shape though :/
19:59 TimToady I'll pay you a ha'penny to fix 'em.
19:59 japhb lue: Yeah, looks still broken.  I'll add that to my list.
19:59 TimToady someone already took the penny from my hat...
20:00 telex joined #perl6
20:00 lue japhb: here's how I fixed it: https://github.com/lue/Net--IRC/commit/7​6ca7fc715d118acd77b88274060f5cbe35fb0aa
20:01 lue (don't know how different your changes have made fixing this though)
20:01 japhb lue: That toplace logic can be simplified.
20:02 lue japhb: I know the code's kinda terrible (I just realized now, for example, that I could've put the ?? !! inside the function too), I just wanted something that worked at the time :P
20:03 japhb Just: method foo($text, $to = $!default_to) ought to work (untested, though)
20:03 timotimo yeah, the right hand side of default values is thunked
20:04 japhb I'll clean it up and commit this afternoon.  (Must seek lunch soon. :-)
20:04 timotimo hm, do we automatically dethunk that? i think the optimizer should do that
20:06 Pleiades` joined #perl6
20:07 cognominal joined #perl6
20:10 dalek specs: 4db95fb | finanalyst++ | c (2 files):
20:10 dalek specs: revised intros and added content.pod
20:10 dalek specs: review: https://github.com/perl6/specs/commit/4db95fb2c8
20:10 dalek specs: d1322e9 | larry++ | c (2 files):
20:10 dalek specs: Merge pull request #62 from finanalyst/master
20:10 dalek specs:
20:10 dalek specs: revised intros and added content.pod
20:10 dalek specs: review: https://github.com/perl6/specs/commit/d1322e9299
20:10 moritz we automatically dethunk literals, or expressions with known compile-time values
20:16 lizmat joined #perl6
20:19 rurban1 joined #perl6
20:21 SamuraiJack_ joined #perl6
20:21 rurban2 joined #perl6
20:22 * TimToady suspects we should remove <prior> from the language
20:28 timotimo i just delivered a capsule manually
20:28 TimToady especially since it's implemented wrong anyway, from the standpoint of implementing the Perl 5 feature of //
20:29 TimToady in P5 that reuses the regex, not the literal string that was matched
20:30 TimToady but it's a really low-wattage feature, and adds an attribute to every P6 cursor
20:30 TimToady so I think it's doomed
20:31 xenoterracide joined #perl6
20:32 TimToady the only place R* uses it is in roast
20:33 TimToady the "low-wattage" metaphor is problematic, insofar as new, efficient LED lighting is low-wattage
20:33 TimToady I need to find a better metaphor for features that aren't worth the overhead
20:34 timotimo "low signal"?
20:34 TimToady wimpy features
20:35 TimToady overspecialized
20:35 TimToady too hard to remember for what you get
20:36 lue TimToady: I'll support <prior> only if <following> exists as well :P
20:37 TimToady blunderbusses
20:39 TimToady "Why do we even have that lever?"
20:40 TimToady trinket features
20:42 lue The closest to "low-wattage" would be "low-luminosity", though it's not as catchy.
20:43 TimToady nightlights :)
20:43 lue :D "I have to say I don't care for your proposed new features. Feels like a bunch of nightlights for core Perl 6."
20:44 TimToady Christmas tree lights :)
20:44 TimToady trinket features seems about the right level of disparagement :)
20:45 TimToady and kinda fits with the cargoculting meme :)
20:45 lue "trinket features" is way too literal though, not at all like "cargoculting" :)
20:45 FROGGS wth, rakudo's module loader preferred .pir files over .pbc files O.o
20:46 FROGGS which makes loading modules like 100 times slower
20:46 lue FROGGS: uhh... reverse alphabetical order?
20:46 TimToady low-flying aircraft--very, very, low
20:46 FROGGS lue: no
20:46 FROGGS lue: I'll commit in a minute (or two)
20:48 lue TimToady: going off the LHF metaphor, I can think of "squashed fruit", "inedible fruit", and "fruitless tree".
20:50 TimToady It's a dessert wax AND a floor topping!
20:51 kivutar joined #perl6
20:51 TimToady buggy whips
20:53 lue (I still kinda like nightlight, fwiw. It's somewhat of a process to get in place, offers little reward, and most people get on fine without it in the first place.)
20:54 timotimo FROGGS: we're getting a huge speed boost for loading modules? cool
20:54 TimToady dimglow features
20:54 FROGGS timotimo: only if .pir files are present too
20:57 lue .oO(Hopefully we can figure out a new metaphor soon; we need to make that remove <prior> commit! "[S05] <prior> removed\n\nRemoved because it's quite the {metaphor}")
20:58 lue low-lux has a nice ring to it methinks.
20:58 timotimo mhm
21:04 japhb .oO( Not enough soap )
21:12 hoverboard joined #perl6
21:12 Pleiades` joined #perl6
21:22 rurban1 joined #perl6
21:24 tgt joined #perl6
21:34 japhb Timbus: Cleaned up version of lue's Net--IRC patch sent to you in PR.
21:34 lue japhb++ for Net::IRC improvements :)
21:37 japhb Timbus: Also, in thinking about concurrency, I'm thinking $.conn.get is essentially unchanged, but the main loop {} just start{}s a task immediately upon receiving a new line.  Output gets fed through a channel, so as to safely serialize writes to the socket.  The sticking point is updates to state -- I'm thinking it's time to follow your conjecture comment and turn %.state into a simple class that serializes updates to the global bot state.
21:37 tomaw- joined #perl6
21:38 japhb lue: After we get Net::IRC rocking, then we just need some good email code, and we'll be rocking the 90's.  ;-)
21:38 lue :)
21:40 japhb lue: FWIW, I like 'low-lux feature'
21:40 lue 2/3 of each word alliterates with the other, I think that's why it sounds nice :)
21:41 japhb And concision FTW
21:49 FROGGS damn, my patch does break something... :/
21:49 japhb Timbus: Thinking more about concurrency, farther down the line it might also be useful to support multiple connections; turn each into a channel and select between them.  The tricky part will be clearing out the various places in the code that assume there is only one connection (and thus one active nick, and so on).
21:50 tomaw- joined #perl6
21:50 moritz or you could just instantiate Net::IRC::Bot twice
21:50 xenoterracide joined #perl6
21:50 tgt joined #perl6
21:50 japhb moritz: As long as you have some way to communicate between them.  You want a factbot to learn facts from both networks, for example.
21:52 moritz give them the same "db" handle *shrug*
21:53 japhb moritz: Sure, that may handle the easy cases.
21:53 * japhb wonders if DBIish is thread-safe (not thread-aware, mind you, just not thread-dangerous)
21:58 * moritz has no idea
22:04 denis_boyun_ joined #perl6
22:06 lue japhb: so far the general answer seems to be "pray it doesn't break" :)
22:11 * [Coke] ~~
22:23 rurban1 joined #perl6
22:33 [Coke] preflex: seen au?
22:33 preflex au was last seen on #perl6 307 days, 3 hours, 35 minutes and 19 seconds ago, saying: pity that Unicode terminals doesn't support strike-through very well :)
22:47 * xenoterracide wonders if the language could attempt auto importing... e.g. class Foo does Bar { # would attempt a use Bar; under the hood if it wasn't already loaded
22:47 FROGGS xenoterracide: that was discussed before...
22:48 FROGGS it ended with a "hmmm, maybe" or so :o)
22:49 xenoterracide seems like one of the most useful ends to boilerplate, esp with imports being lexically scoped... (shuts up since I'm unlikely to put up)
22:53 xenoterracide is a - illegal in perl5 sub names? (just noticed a - in a sub name in p5 and realizing that I'm not sure I've ever seen a - in a sub name)
22:54 geekosaur it's illegal in sub names, yes
22:54 FROGGS ./p5 'sub foo-bar { };'
22:54 FROGGS Perl5: Illegal declaration of subroutine main::foo at -e line 1.
23:03 BenGoldberg joined #perl6
23:04 xenoterracide huh, I wonder if having it allowed in p6 is an improvement over _
23:05 xenoterracide but core p6 still uses the _ if memory serves, which means that the _  as convention shall probably remain
23:07 colomon joined #perl6
23:07 cooper joined #perl6
23:07 cooper joined #perl6
23:08 lue xenoterracide: not sure there's much of a convention, except if you feel like holding shift to press that key on your keyboard :)
23:09 kaare_ joined #perl6
23:09 timotimo xenoterracide: don't forget to teach panda and ufo to recognize those auto-imports for ordering the build files by dependency? :P
23:21 timotimo actually
23:21 timotimo can we just get a mode for rakudo, like a compiler flag, that inspects the code for imports?
23:21 timotimo just something a bit more robust than grepping each line for "begins with whitespace, then use or require"
23:22 timotimo would be best if it could "not run BEGIN code from the given file", but that's possibly kind of hard
23:25 colomon joined #perl6
23:32 lue I personally think we need more reasons before implementing implicit loading.
23:40 lue feels like a nightlight/dimglow/low-lux feature to me :)
23:42 xenoterracide reduction of boilerplate is a good thing, IMO, why type a module name twice if you really don't need to
23:43 xenoterracide note: I tend to do a lot of things in p5 that are centered around me not typing class names twice
23:44 xenoterracide such as load_class('Foo::Bar')->new (or now use_module because Class::Load  will no longer be free Moose dep)
23:46 go|dfish joined #perl6
23:48 lue xenoterracide: I just don't see how enabling magic implicit loading for a subset of possible modules is all that helpful, esp. given the mess of loading issues I'm seeing in my head, such as:
23:48 lue 1) If someone has explicitly use'd a module, don't load it again.
23:49 xenoterracide is that what NC or whatever p6 has is for?
23:49 xenoterracide wtf
23:49 xenoterracide % INC
23:49 xenoterracide lol
23:49 lue 2) If module Foo::Bar defines a class Baz, how to prevent loading Baz.pm6
23:50 xenoterracide it should check if it's already loaded, which is what % INC (or the p6 equiv ) is for
23:50 xenoterracide I assume there's some way of keeping track
23:50 FROGGS I dont think 1) counts, because you never load a module twice (as long as you dont request another name/auth/ver)
23:50 lue 3) Local class Bar defined in same compilation unit, but after use (class Foo is Bar { ... }; class Bar { ... }). don't load Bar.pm6
23:51 lue FROGGS: with implicit loading,  use Foo; class Bar is Foo { }  *could* try to load the module twice
23:51 FROGGS lue: not according to our module loader :o)
23:51 xenoterracide what happens if I have 2 methods that try to require Foo?
23:51 xenoterracide different ones
23:52 xenoterracide because I don't know if it's yet loaded at that point
23:52 xenoterracide the behavior would be the same
23:52 FROGGS xenoterracide: it loads and compiles it only once
23:53 FROGGS the filename of the module is the key in a hash
23:53 lue %INC is listed in S28, but with a "maybe" attached to it.
23:53 FROGGS so if you do: require "./foo.pm"; require "././foo.pm", you would load it twice
23:54 lue FROGGS: alright, so twice-loading isn't an issue. Thanks for letting me know :)
23:54 lue But there's still the issue of wayward module loading. I don't like the sound of examining the entire compilation unit and everything it has access to just to see if we can try to implicitly load a module.
23:54 FROGGS for 3), I think you need to stub Bar { } anyway
23:55 lue r: class Foo is Bar { }; class Bar { }; say "alive!";
23:55 Ben_Goldberg joined #perl6
23:55 camelia rakudo-jvm 53c60c: OUTPUT«(timeout)»
23:55 camelia ..rakudo-parrot 53c60c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/9eyt2vsFrs�'Foo' cannot inherit from 'Bar' because it is unknown.�Did you mean 'Bag'?��at /tmp/9eyt2vsFrs:1�------> �»
23:55 lue ah, OK :)
23:55 FROGGS unless if you had a "use Bar" before :o)
23:56 baest joined #perl6
23:56 FROGGS but yeah, we can supply name/auth/ver to a use statement, but not to a trait... so it would not be that powerful when this feature might become important in future
23:57 lue My main point is that a very small number of modules will store a class Foo::Bar in Foo/Bar.pm6 , and that there's a high risk of some *other* module storing their stuff in Foo/Bar.pm6, and it's general bad practice to use stuff that doesn't exist and expect the compiler to fix it for you.
23:57 lue r: $a = 42; say $a;
23:57 camelia rakudo-jvm 53c60c: OUTPUT«(timeout)»
23:57 camelia ..rakudo-parrot 53c60c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ClYnGU625Kâ�¤Variable '$a' is not declaredâ�¤at /tmp/ClYnGU625K:1â�¤------> [32m$a[33mâ��[31m = 42; say $a;[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
23:58 lue i.e., a low-lux feature :)
23:58 FROGGS lue: I have a patch for your $a... https://gist.github.com/FR​OGGS/6f8989611659551dae1f
23:58 FROGGS :o)
23:58 xenoterracide lue: I'm not convinced that's true, in p5 I believe it's generally agreed that multiple packages per file is generally a bad idea... also one could create a loaded modules hash... so if it's htere...

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

Perl 6 | Reference Documentation | Rakudo