Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-11-06

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 tri left #perl6
00:04 ashleydev is now known as fud
00:04 fud is now known as FUD
00:04 FUD is now known as __FUD__
00:05 dalek joined #perl6
00:08 __FUD__ is now known as ashleydev
00:08 BooK_ left #perl6
00:10 dalek left #perl6
00:10 whiteknight joined #perl6
00:14 hercynium joined #perl6
00:17 lue ohai o/
00:17 masak greetings, lue.
00:18 lue I saw that pun-fest earlier. [ I would come up with a pun, but it would have everybody hopping, and I don't think anyone could beer it :) ]
00:22 diakopter somehow I missed a punfest in theh backlog
00:22 jnthn lue: So you bottled out? Couldn't tap into the punfest? Can't pump them out fast enough?
00:23 masak jnthn: my, you're just overflowing with liquid-related material.
00:24 jnthn It wasn't too pour an effort.
00:24 jnthn (OK, *that* one was...)
00:25 lue Will anyone &slurpy that liquid?
00:26 envi left #perl6
00:26 jnthn Sure, when it comes through the ==>
00:26 masak down the hatch!
00:27 jnthn down the batch! ;)
00:28 jnthn Actually I shouldn't do that. Tomorrow it's a socialist^Wred day here in Sweden, so the systemka won't be open for me to acquire a replacement batch for the rest of the weekend. :)
00:29 lue Make sure it's decaf. We wouldn't want «jnthn», now do we?
00:30 jnthn Probably not. I've already had at least one person give me the "you must be one of the most nuts people I ever met" look already today. :)
00:31 masak a look most often given to geeks by non-geeks, by the way.
00:32 jnthn Yes, I think that probably sums it up.
00:32 lue masak: did you see that gist I linked to in my blog post? https://gist.github.com/662027
00:33 masak lue: no, but now that I do, I'm happy you're experimenting with Tardis.
00:34 masak I see you have added line-by-line editing of the program.
00:35 lue That feature Works™*   (*only works in certain situation)
00:35 bgoggin joined #perl6
00:35 bgoggin left #perl6
00:36 masak rakudo: say (my @a).end
00:36 p6eval rakudo 142d22: OUTPUT«-1␤»
00:36 masak S32 says: "Returns the final subscript of the first dimension; for a one-dimensional array this simply the index of the final element."
00:36 * masak submits rakudobug
00:37 masak huh. I didn't even see the missing "is" in that second sentence before :)
00:37 patspam left #perl6
00:37 jnthn masak: huh. If there's nothing in there, what do you want it to return?
00:37 lue .oO(It must be the effect of re-reading what you put in IRC)
00:37 jnthn 0 would be wrong because that'd imply there's one thing in there.
00:38 lue rakudo: say Nil.end
00:38 p6eval rakudo 142d22: OUTPUT«-1␤»
00:38 lue but -1 could be in a list as well.
00:38 masak jnthn: I don't know. but it's not to spec right now.
00:38 masak jnthn: maybe Failure.
00:39 masak lue: if you say that, you've misunderstood the purpose of .end (just like I did first time I saw it)
00:39 jnthn masak: I think you maybe need to explain it then. :)
00:40 jnthn masak: 'cus I suspect I'm missing something also...
00:40 masak well, first off, let's agree on what S32 actually *says*.
00:40 masak it says "returns the final *subscript*.
00:40 masak an empty array has no final subscript.
00:40 masak hence -1 is *wrong*.
00:40 jnthn Hm
00:40 jnthn True
00:40 jnthn It may be a handy sentinel if you planeed to do some math on it.
00:41 masak if S32 said "returns less than the length of the array", -1 would have been fine.
00:41 jnthn But yeah, I can see flagging it up as a Failure is probably better.
00:41 masak but it doesn't.
00:41 masak so it isn't.
00:41 masak this is why we have a spec, for precision and clarity.
00:41 masak in this case, it's precise and clear. hence, bug.
00:42 masak if you want -1, please use C<+@a - 1> :)
00:42 jnthn fairy nuff.
00:45 masak I even have a use case for this being wrong: Tardis.
00:45 colomon masak++ # just read blog post
00:45 masak \o/
00:46 masak this line: https://github.com/masak/tardis/blob/master/bin/tardis#L37
00:47 masak when I was restoring Tardis, at one point @ticks was empty (but shouldn't be). @ticks.end returned -1, and the line sais "# Finished. Ticks: 0..-1"
00:47 masak which looked... wrong.
00:47 masak it certainly wasn't something I expected ever to get putting that line in.
00:47 sorear You think a crash would look more correct?
00:47 masak maybe.
00:48 masak but a Failure would only generate a warning, I think.
00:48 sorear 0..-1 looks like an empty list to me
00:48 colomon 0..0 is not empty
00:48 colomon and Failure becomes 0 in this context, no?
00:48 masak dunno.
00:48 sorear S04:1220
00:49 sorear any use of a Failure other than .defined or .Bool causes an exception to be thrown
00:49 masak right.
00:49 masak booby-trap.
00:54 icwiener left #perl6
00:54 masak so, it will die, not just warn.
00:55 masak that's fine by me.
00:55 masak because @ticks.end was used here in a way never intended.
00:55 lue masak: alright if I fork Tardis to hack on it? [I remember cases where forking caused issues]
00:56 icwiener_ joined #perl6
00:56 masak lue: you have my permission.
00:56 diakopter forking leads to spooning
00:56 colomon huh.  Haven't there been repeated complaints that something like 4 + Failure returned the no Bridge method error rather than 4?
00:56 masak diakopter: but never to sporking?
00:57 masak colomon: I'm still a wee bit uneasy about the whole Bridge thing.
00:57 colomon masak: can you explain?
00:57 masak in my mental model of Math, there are the equivalents of Num and Rat and Int... but not of Bridge.
00:58 masak that's the extent of my complaint about the elected model.
00:58 masak I realize it's addressing a real problem. I don't have a better solution.
00:58 jnthn .oO( a Real problem... )
00:58 masak if I did, I would complain louder :)
00:59 masak jnthn: your punnery is Continuous!
00:59 jnthn An Integral part of #perlt!
00:59 colomon your mental model of Math isn't going to have Bridge, because Bridge isn't an actual type.
00:59 jnthn *#perl6
00:59 lue you would be able to get changes I make when I fork, right? (Or am I thinking of the wrong thing?)
01:00 masak colomon: that isn't much of a consolation. so it's a conversion method to something that isn't an actual type; so what?
01:00 colomon Bridge is more-or-less "the most accurate Real type available in this Perl 6 that everyone knows about."
01:00 masak lue: there's something called a fork queue in github. it allows changes to flow back.
01:00 colomon If you have a better one-word term for that, I'll be happy to change it.
01:00 jnthn Coercomatic
01:01 colomon ooooo
01:01 masak all I know right now is that it's not "really" called Bridge. :)
01:01 diakopter I spun a pun for the pundits, and I was expunged.
01:01 masak jnthn: by the pronunciation rules of English, the second 'c' in that word is pronounced 'k'.
01:02 lue Coerce-o-matic?
01:02 jnthn masak: English doesn't have pronunciation rules. :P
01:02 masak right. needs to be what lue said.
01:02 lue .oO(or the coerceinator)
01:02 masak jnthn: a fayre poynte.
01:04 sorear I imagine colomon is cognate to Solomon, and has a soft c
01:04 masak huh.
01:04 sorear I'm uneasy about Failure in general.
01:04 colomon sorear: actually not.
01:04 sorear Very uneasy.
01:05 masak sorear: for optimization reasons?
01:05 colomon My name is Solomon, but my id is colomon with a hard c sound.
01:05 colomon but back to Failure
01:06 sorear masak: semantics, mostly
01:06 sorear I have a very clever implementation of delayed throw waiting
01:06 sorear which I would hate as a Perl 6 user, but at the same time it would be a shame to throw it away as an implementer
01:07 masak :)
01:07 masak I haven't really been the victim of a lot of delayed throws in my Perl 6 adventures.
01:08 masak either that, or they're so natural that I don't think of them as such.
01:08 masak I have been worried about Freaky Action at a Distance.
01:08 masak but practice hasn't confirmed this worry (yet).
01:11 sorear masak: the reason you haven't been the victim of any delayed throws is because nobody implements them.
01:12 masak oh.
01:12 sorear S04 has other consequences
01:13 sorear the most disturbing for me is that try { function(); CATCH { } }; can still throw exceptions
01:14 sorear delayed exceptions require the ability to throw more than one exception at once; CATCH only skims off the top exception
01:14 jnthn try { function(); } OTOH...
01:14 sorear the rest will sail through, unless you have a for @$! { .handled = True } in your catch
01:15 * sorear goes off and reads the GHC-on-LLVM thesis
01:24 dnl- joined #perl6
01:28 dnl left #perl6
01:30 cdarroch left #perl6
01:37 ggoebel left #perl6
01:45 sftp left #perl6
01:46 ggoebel joined #perl6
01:49 jnthn goodnight, #perl6
01:53 icwiener_ left #perl6
01:58 masak 'night, jnthn.
02:00 lue masak: I think Tardis will end up being a really fun project for me. [ gee, a program that dabbles in time travel, I wonder why I like it :) ]
02:00 masak :)
02:01 lue .oO[ BTW, I think smashing random bits with a rubber mallet is fun as well :) ]
02:12 sorear the GHC/LLVM integration does something so simple I could never have thought of it
02:12 masak do tell.
02:12 sorear GHC requires a very specific format of stack frames...
02:12 sorear so I was wondering how it conveyed that to the backend.
02:13 sorear nope, it just uses a program-managed stack pointer; the compiler's own call stack is unused
02:13 sorear GHC-generated LLVM code consists of zero-argument functions that tail call each other
02:13 masak sweet.
02:14 masak sounds a lot like CPS.
02:14 sorear this does mean that esp goes unused, which is not pretty on a CPU with only 8 integer registers, though
02:15 masak time for me to sleep as well.
02:15 masak 'night, #perl6.
02:15 lue g'night o/
02:15 masak left #perl6
02:15 whiteknight left #perl6
02:15 * sorear wonders if lue will apply to GCI
02:19 lue I'm considering it.
02:26 ggoebel left #perl6
02:40 xinming_ joined #perl6
02:42 xinming left #perl6
02:44 hercynium left #perl6
02:44 patspam joined #perl6
02:57 hercynium joined #perl6
03:08 risou joined #perl6
03:11 jlaire left #perl6
03:12 risou_ joined #perl6
03:15 risou left #perl6
03:16 jlaire joined #perl6
03:17 ggoebel joined #perl6
03:19 ggoebel left #perl6
03:43 Chillance left #perl6
04:00 plobsing joined #perl6
04:10 risou_ left #perl6
04:19 wooden left #perl6
04:20 sorear niecza: for ("x", "\xFFFE") -> $ch { say ?($ch ~~ /<-[ f ]>/) }
04:20 p6eval niecza f730971: OUTPUT«Unicode character 0xfffe is illegal at /home/p6eval/niecza/src/Niecza/Actions.pm line 907.␤Unicode character 0xfffe is illegal at /home/p6eval/niecza/src/Niecza/Actions.pm line 907.␤Bool::True␤Bool::False␤»
04:20 hercynium left #perl6
04:21 lidden left #perl6
04:22 sorear niecza: for ("x", "\x2FFF") -> $ch { say ?($ch ~~ /<-[ f ]>/) }
04:22 p6eval niecza f730971: OUTPUT«Bool::True␤Bool::False␤»
04:23 sorear it looks like I accidentally coded 'All' to exclude Cn
04:29 dnl- left #perl6
04:33 sorear fixed
04:42 araujo left #perl6
04:52 justatheory left #perl6
05:00 chitragupt left #perl6
05:12 Axius joined #perl6
05:26 Axius left #perl6
05:31 sorear fixed q[foo]... it wasn't an LTM issue, it was » being broken and only matching on the left side of actual whitespace
06:11 Lorn left #perl6
06:12 Lorn joined #perl6
06:15 risou joined #perl6
06:22 patspam left #perl6
06:32 Lorn left #perl6
06:53 Bucciarati left #perl6
06:54 dukeleto left #perl6
06:54 dukeleto joined #perl6
06:55 jhuni joined #perl6
07:02 risou left #perl6
07:06 risou joined #perl6
07:16 aesop_ left #perl6
07:19 aesop joined #perl6
07:22 _kaare joined #perl6
07:41 Lorn joined #perl6
07:44 mberends left #perl6
08:04 risou left #perl6
08:08 PZt left #perl6
08:11 PZt joined #perl6
08:28 Lorn left #perl6
08:38 nymacro joined #perl6
08:50 Lorn joined #perl6
08:52 sorear yay, got <foo> working at last
08:57 meppl joined #perl6
09:03 nymacro left #perl6
09:05 Ross joined #perl6
09:08 envi joined #perl6
09:29 dalek joined #perl6
09:30 dalek left #perl6
09:36 xinming_ left #perl6
09:43 constant left #perl6
09:45 constant joined #perl6
09:45 constant left #perl6
09:45 constant joined #perl6
09:48 mavrc joined #perl6
09:55 dalek joined #perl6
09:57 sftp joined #perl6
09:59 MayDaniel joined #perl6
10:07 wamba joined #perl6
10:10 dalek left #perl6
10:17 dalek joined #perl6
10:19 dalek left #perl6
10:21 dalek joined #perl6
10:24 dalek left #perl6
10:24 dalek joined #perl6
10:27 dalek left #perl6
10:28 masonkramer left #perl6
10:28 masonkramer joined #perl6
10:29 dalek joined #perl6
10:29 dalek left #perl6
10:30 dalek joined #perl6
10:31 dalek mu: 21ceeb2 | sorear++ | misc/dalek-conf.json:
10:31 dalek mu: dalek test commit
10:31 dalek mu: review: /perl6/mu/commit/21ceeb29a06d3c980eb51070c70d1fce9025645b
10:31 dalek left #perl6
10:34 dalek joined #perl6
10:35 sorear dalek should now be working for repos
10:35 * sorear out
11:18 tadzik o/
11:18 wallberg joined #perl6
11:20 wallberg left #perl6
11:20 wamba left #perl6
11:21 wamba joined #perl6
11:21 wamba left #perl6
11:21 wamba joined #perl6
11:21 kensanata joined #perl6
11:22 M_o_C joined #perl6
11:22 ggoebel joined #perl6
11:24 tadzik oh, I see IO::Stat in use
11:31 jhuni left #perl6
11:34 mberends joined #perl6
11:41 mberends left #perl6
11:41 mberends joined #perl6
11:44 kanishka left #perl6
11:49 kanishka joined #perl6
11:52 M_o_C left #perl6
12:09 araujo joined #perl6
12:09 araujo left #perl6
12:09 araujo joined #perl6
12:16 mberends left #perl6
12:16 mberends joined #perl6
12:17 mberends the Perl booth (and the other booths) here at http://t-dose.org is well attended. We are staffed by at least 7 people :)
12:18 mberends (wifi still goes up and down a bit, the network experts are working on that)
12:21 jnthn o/ mberends
12:21 jnthn Are you handing out round tuits? ;-)
12:23 lidden joined #perl6
12:23 mberends left #perl6
12:25 mberends joined #perl6
12:26 mberends jnthn: I hadn't got a round tuit yet, but I really should ;)
12:33 mberends test 6model/dotnet on Mono/Ubuntu netbook: All tests successful. Files=24, Tests=167, 195 wallclock secs
12:36 jnthn ah, cool...the library loading primitives didn't break the Mono build. :-)
12:37 vdrab joined #perl6
12:38 wallberg joined #perl6
12:38 mberends jnthn: several tests are reporting: warning CS0169: The private method `NQPOutput_1289046623.Load(Rakudo.Runtime.ThreadContext, Rakudo.Runtime.Context)' is never used
12:38 mberends not serious, but perhaps an avoidable distraction
12:39 mberends jnthn: Wendy sends @greetings
12:39 araujo http://pastie.org/1276960
12:46 phenny left #perl6
12:47 phenny joined #perl6
12:49 phenny left #perl6
12:49 phenny joined #perl6
12:50 jnthn mberends: Oh, it shoulda been marked public.
12:50 jnthn mberends: Thanks, will fix.
12:50 jnthn mberends: Greetings to Wendy too :)
12:51 jnthn oh huh, the Main is private too.
13:03 kanishka left #perl6
13:04 pmurias joined #perl6
13:14 whiteknight joined #perl6
13:18 Patterner left #perl6
13:33 Psyche^ joined #perl6
13:33 Psyche^ is now known as Patterner
13:37 icwiener joined #perl6
13:47 colomon left #perl6
13:51 MayDaniel left #perl6
13:52 colomon joined #perl6
13:54 xinming joined #perl6
13:57 colomon left #perl6
13:57 phenny left #perl6
13:58 phenny joined #perl6
14:00 * moritz_ just had a p6advent brainstorm
14:01 moritz_ result soon to be seen on p6u
14:02 Ross left #perl6
14:10 icwiener left #perl6
14:24 phenny left #perl6
14:24 phenny joined #perl6
14:26 phenny left #perl6
14:26 phenny joined #perl6
14:28 takadonet joined #perl6
14:28 takadonet yo
14:42 wamba left #perl6
14:46 jnthn o/ takadonet
14:49 takadonet jnthn: how are u sir?
14:52 jnthn takadonet: Fine, thanks. Busily preparing for a course I'm teaching next week, but hoping to get some Perl 6 hacking in later on today too. :-) And you?
14:52 countley joined #perl6
14:53 takadonet jnthn:  going to do some chores around the house but hacking now around a rakudo bug/NYI and I may have a solution
14:53 jnthn Nice :-)
14:54 takadonet well my solution just went boom....
14:55 mberends left #perl6
14:55 jnthn Rakudo may yet find applications in the demolition industry. ;-)
14:56 mberends joined #perl6
14:58 takadonet jnthn: maybe
15:00 mberends left #perl6
15:08 patspam joined #perl6
15:12 sftp left #perl6
15:12 wallberg left #perl6
15:13 MayDaniel joined #perl6
15:21 xinming left #perl6
15:22 sftp joined #perl6
15:23 xinming joined #perl6
15:27 countley left #perl6
15:30 justatheory joined #perl6
15:36 kensanata left #perl6
15:40 masak joined #perl6
15:40 masak \o/
15:42 masak I see you've had a quiet day here.
15:44 jnthn There goes the peace and quiet... :P
15:44 masak mwhaha
15:44 jnthn masak++ # managed to get two spec commits out of TimToady++
15:45 jnthn masak: Did you see 'em?
15:45 masak yes. one parallel and one antiparallel :)
15:45 jnthn :)
15:45 jnthn For the BUILD one, I'm wondering if we want a deprecation cycle (more)
15:45 masak possibly.
15:46 jnthn Instead of just changing Rakudo to only care about publics and ignore privates, it still works with the privates but warns for one release that this ain't going to work in the future
15:46 jnthn Then after that we drop it
15:46 masak great idea.
15:46 jnthn So there's a release's grace.
15:46 masak jnthn++
15:46 jnthn Well, it's quite easy to do too.
15:46 masak then we get to test things a bit.
15:46 jnthn Right.
15:46 jnthn I think it's going to break a lot of people's code.
15:47 masak quite possibly.
15:47 jnthn I've got plenty of slides out there with examples that rely on the existing behavior.
15:47 jnthn One of us (or someone else) should write a good blog post explaining the change too, which we can reference in the next release.
15:48 jnthn We've got a good 2-3 weeks beofre the next release anyways.
15:48 jnthn So no immediate hurry.
15:48 jnthn I may patch Rakudo this weekend though.
15:48 Bucciarati joined #perl6
15:50 masak aye.
15:50 jnthn Cruiously, I think I may reach the point of writing NQP.Net's BUILD this weekend also :)
15:50 masak yay
15:53 jnthn Depends how long it takes me to decontaminate^Wdejava-ize this course material...
15:53 masak actually, I think Java is a pretty OK language. my main complaint is its lack of closures.
15:54 masak but otherwise, it's fine. I like TDD-ing in it.
15:56 jnthn masak: I'm actually "translating" a TDD course
15:57 jnthn masak: And keep seeing things and thinking, "gee, I like the way we do it in C# better"
15:57 masak would be nice to hear about some of those things at some point.
15:57 masak I'm sure C# got some things righter than Java.
15:57 jnthn It'd be silly if they hadn't.
15:57 jnthn Coming five years later.
15:58 masak right.
15:59 kanishka joined #perl6
16:01 masak since Wien, I'm rediscovering sour cabbage. turns out I had a big hunger for it that I wasn't aware of.
16:02 masak so today I went to the store and bought a big jar of it.
16:03 jnthn Om nom nom kysla kapusta
16:04 jnthn I ate loads of that when I was on vacation in Germany/Austria/Slovenia earlier this year. :)
16:04 jnthn In Ljubljana I had one night blutwurst with sour cabbage struddel.
16:04 masak om nom nom 酸菜 :) om nom nom kimchi :)
16:05 tadzik ~~
16:05 masak tadzik! \o/
16:05 jnthn happy smartmatch, tadzik
16:05 masak hope you get ACCEPTed.
16:05 tadzik moritz_++ # p6advent support
16:06 jnthn Well, we removed the possibility to REJECT...
16:06 masak felt too negative.
16:06 tadzik I'm also thinking about something targeted for P5ers, but more like "you no longer need getopt, moose, autobox, everything's here, wee!"
16:07 masak those posts are often good, yes.
16:08 tadzik so, am I to create a repo for ideas, or one will be created in perl6/?
16:09 tadzik ah, there is it, in mu
16:09 tadzik I'll create a new dir
16:12 PZt left #perl6
16:14 kanishka left #perl6
16:24 wamba joined #perl6
16:32 colomon joined #perl6
16:33 tadzik moritz_: SYN
16:35 tadzik moritz_: one of your points is: what is a term, what is an operator? why is the distinction import? I assume you mean "important"
16:36 tadzik ideas gitpushed to mu
16:36 dalek mu: 4d192cc | tadzik++ | misc/perl6advent-2010/topic-brainstorming:
16:36 dalek mu: Added topic-brainstorming for 2010 Advent Calendar
16:36 dalek mu: review: /perl6/mu/commit/4d192cc7a8fbf819c499536a4aaf36a6782a106d
16:37 tadzik bah, review is no longer a clickable link
16:40 colomon tadzik++
16:40 masak tadzik: alternatively, "why is the distinction of import?" :)
16:44 jferrero joined #perl6
16:44 jnthn Because it's not of export?
16:45 masak you can't export things from Perl 6, because Perl 6 is all-encompassing.
16:45 jnthn I think "of importance" would be the right thing there :)
16:45 jnthn "of import"...read weird to me.
16:45 masak are you seriously going to question my knowledge of English? :P :P
16:46 tadzik masak: :)
16:46 jnthn Probably not, given I'm only a native speaker. :P
16:46 masak I do agree that "of import" sounds... a little bit stiff.
16:46 masak but it's not incorrect.
16:47 tadzik gee, mu is huge!
16:47 masak tadzik: it was *the* repo for many years.
16:47 jnthn masak: Aye, it's correct.
16:47 jnthn masak: I'd just never, ever say it like that.
16:48 tadzik masak: yeah, half of the size is the .git files
16:48 masak tadzik: er :)
16:48 masak oh, because of the history.
16:48 masak that's not too bad.
16:49 jnthn If the whole history only takes as much space as the current version, I'd say the history is stored pretty efficienlty. :)
16:49 masak there's git's nice design for you. designing things right from scratch is... of import. :)
16:50 jnthn :P
16:50 masak you're right, it does sound odd.
16:56 PZt joined #perl6
17:00 colomon "import" in that sense makes me think of 70s comic book writers.
17:00 masak why?
17:01 dnl joined #perl6
17:01 colomon it's the sort of psuedo-grandiose language they loved to use.
17:01 dnl m�insen
17:01 colomon the same way the writers a decade before just stuck exclamation points after every single sentence.
17:06 colomon nothing at all wrong with it, mind you, it's just not the way people normally talk.
17:07 masak dnl: hi. you might want to switch your client to utf8. seems you have latin-1 right now.
17:08 dnl masak: ok, thx
17:08 dnl left #perl6
17:08 dnl joined #perl6
17:08 masak dnl: Wir alle benutzen Unicode hier. :)
17:09 dnl ja ich eig. auch
17:09 masak \o/
17:09 dnl hope it lööks better now :>
17:09 jnthn Ja, we be nutz about Unicode!
17:09 xabbu42 left #perl6
17:09 masak dnl: it lööks greät!
17:09 dnl hehe, thx
17:10 masak rakudo: say "hi dnl! »ö«"
17:10 p6eval rakudo 142d22: OUTPUT«hi dnl! »ö«␤»
17:12 masak rakudo: sub foo { say "like our" }; &foo.wrap: { say "how do you"; callsame; say "evalbot? :)" }; foo
17:12 p6eval rakudo 142d22: OUTPUT«how do you␤like our␤evalbot? :)␤»
17:13 jnthn I'd do that with protos and a multi if only we had an nqpnet evalbot here. :)
17:13 masak rakudo: class A { method foo { say "ourselves" } }; class B is A { method foo { say "proud of it" } }; class C is B { method foo { say "we're pretty" } }; C.new.*foo
17:13 p6eval rakudo 142d22: OUTPUT«we're pretty␤proud of it␤ourselves␤»
17:15 masak rakudo: class A { method foo { say "if this" } }; class B { method foo { say "works?" } }; class C is A is B { method foo { say "hm, wonder" } }; C.new.*foo
17:15 p6eval rakudo 142d22: OUTPUT«hm, wonder␤if this␤works?␤»
17:15 masak \o/
17:16 jnthn :)
17:16 jnthn Yeah, it works MRO.
17:16 jnthn *walks
17:16 masak C3, even.
17:17 jnthn I tried upgrading 6model to use C4 at one point, but it got explodey.
17:17 masak *groan*
17:17 jnthn Ooh, thanks to diakopter++'s hacking I suspect it's possible to get the C3 code running on NQP.Net now. :)
17:19 Ross joined #perl6
17:19 Ross left #perl6
17:19 Ross joined #perl6
17:21 Ross left #perl6
17:24 xinming left #perl6
17:33 masak rakudo: class A { method foo { say "A" } }; class B is A { method foo { say "B"; nextsame } }; B.new.foo
17:33 p6eval rakudo 142d22: OUTPUT«B␤A␤»
17:33 masak rakudo: class A { method foo { say "A" } }; class B is A { method foo { say "B"; nextsame } }; my &x = B.WALK(:name<foo>)[0]; &x.wrap: { say "wrap"; nextsame }; x(B.new)
17:33 p6eval rakudo 142d22: OUTPUT«wrap␤B␤»
17:33 * masak submits rakudobug
17:34 masak at least I suppose it is one.
17:34 masak I love my job. :)
17:35 masak why doesn't the last evaluation print "wrap␤B␤A␤"?
17:36 tadzik did we have wrapping at our last advent calendar? Maybe we could explain Test::Mock btw
17:36 masak I think jnthn should do a Test::Mock instalment.
17:36 jnthn Oh yeah, I heard that's a nice module.
17:36 * masak remembers he has promised to write a review of it
17:36 jnthn :P
17:37 tadzik maybe for advent calendar?
17:37 masak if that's deemed the right medium, sure.
17:37 jnthn I'd be happy to write an article on it for the advent calendar.
17:37 tadzik jnthn: care to add yourself to the file?
17:37 jnthn Can take it from various angles I guess.
17:37 jnthn tadzik: Where is The File?
17:37 tadzik jnthn: mu/misc/perl6advent2010 I think
17:38 masak tadzik++ # Making Stuff Happen
17:38 tadzik it's to start on Decembet the first?
17:38 colomon yes
17:39 tadzik advent is 23 days?
17:39 masak 24.
17:39 jnthn 24.
17:39 tadzik So eve's included, ok
17:39 tadzik so 24 topics to choose
17:39 masak rakudo: say [*] 1..4
17:39 p6eval rakudo 142d22: OUTPUT«24␤»
17:40 tadzik I think those will have to be chosen and assigned to writers by 20th of November
17:40 masak tadzik: it would be *really* helpful to have a file with 24 slots in it.
17:40 tadzik hmm
17:40 masak tadzik: last year we filled in the blanks a couple days before at the latest.
17:41 tadzik ah, ok
17:41 masak and on the day in question we made sure that the person was available and ready.
17:41 masak worked out pretty well. we never missed a day, at least.
17:41 colomon I had to go with emergency posts twice.
17:41 colomon (I think.)
17:41 masak some people wrote drafts in advance.
17:41 tadzik so maybe let's just create a 24-slot arra^Wfile, and people will volunteer for the days?
17:41 colomon So it pays for at least one or two of us to have stuff done in advance.
17:42 masak tadzik: yes.
17:42 tadzik But I think it'd be nice to make a list of a must-have posts from what we have brainstormed
17:42 masak tadzik: maybe put that at the head of such a file?
17:42 masak that way, when people are choosing a slot, they have some inspiration as well.
17:43 masak jnthn: no comments on the wrap-B-A bug above?
17:43 tadzik masak: good idea. But I'd wait few days for the ideas to clarify, and stuff
17:43 masak nod
17:44 tadzik I wonder what can I write about
17:46 masak what do you want to write about?
17:46 tadzik oh, everything, it's fun :)
17:47 tadzik I remember promising to extend a grammar chapter in The Book
17:47 tadzik maybe the module system
17:48 dukeleto tadzik++ # adventy stuff
17:48 masak do people remember which articles resonated best with people last year?
17:49 jnthn I think it was mostly the frequency of published material.
17:49 jnthn masak: looking at the wrap one
17:50 colomon good grief, my mandelbrot set post has gotten 40 views this week!?
17:50 masak :)
17:50 masak (long tail)++
17:50 jnthn masak: hmm
17:51 jnthn masak: I can kinda see why it's happening.
17:51 jnthn masak: It feels wrong.
17:51 masak what feels wrong?
17:51 jnthn That wrapping it breaks the deferal up the MRO
17:51 colomon #1 Metaoperators
17:51 colomon #2 Getting Rakudo
17:51 colomon #3 The beauty of formatting
17:52 colomon #4 Static Types and Multi Subs
17:52 colomon #5 Grammars and Actions
17:52 colomon that's all time.
17:52 colomon http://perl6advent.wordpress.com/wp-admin/index.php?page=stats&amp;blog=10740073&amp;view=postviews&amp;numdays=-1&amp;summarize
17:52 masak colomon: looks about right.
17:52 colomon probably have to be logged in to see that.
17:52 masak jnthn: yes -- that's the title of my bug report :)
17:53 colomon (logged into wordpress as a Advent contributor, I mean)
17:53 jnthn masak: To make it work, the current candidate list kinda needs to get "collected" or something.
17:53 jnthn When it gets to the ponit of being fully iterated.
17:54 jnthn So we fall to the otuer dispatcher's idea of current candidate list.
17:54 masak jnthn: ok.
17:54 jnthn e.g. empty = implicit pop
17:54 * masak adds all this to the ticket
17:55 jnthn Not sure if we get ourselves into trouble in exciting new ways by doing that though :)
17:55 masak conceptually, I don't see any problem.
17:55 jnthn No, I don't have an immediate example of a problem we'd cause or some extra fragility it'd introduce.
17:56 jnthn Tend to be a little knee-jerky against implicit magic, that's all. :-)
17:57 masak what's magic about it?
17:57 masak I think I'm still missing the hard part.
17:57 masak wrapping, to me, is a very "clean" operation.
17:57 masak no much magic about it.
17:57 jnthn masak: Remember that when you wrap something you're adding a new dispatcher.
17:58 jnthn So now what happens is not .foo => method dispatcher
17:58 jnthn But .foo => method dispatcher => wrap dispatcher
17:58 masak right.
17:58 jnthn Each dispatcher implies the existence of a candidate list.
17:58 masak the wrapping dispatcher is nested inside the method dispatcher.
17:58 jnthn nextsame and friends look for the candidate list on the top of the stack, essentially.
17:58 simon__ joined #perl6
17:59 jasonmay could I achieve async IO by writing something lower-level within a perl6 module?
17:59 jnthn Right, but that's the issue. The method just becomes the last thing in the candidate list.
17:59 jasonmay like I think parrot has something like poll() ?
17:59 masak jnthn: yes, but 'nextsame' inside the original unwrapped method shouldn't change receiver.
17:59 jnthn What's a receiver?
17:59 jasonmay in rakudo I mean
17:59 masak jnthn: one of the dispatchers.
17:59 jnthn YOu seem to be implying that nextsame is boudn in some way at compile time.
17:59 jnthn It's not.
17:59 jnthn It's just a sub call.
17:59 masak jasonmay: I've never seen anyone do that. but maybe there's a way.
18:00 masak jasonmay: you might want to ask the #parrot people over at irc.perl.org
18:00 jasonmay is there a better way?
18:00 jnthn jasonmay: All Rakudo's IO is wrapping around Parrot IO objects really.
18:00 masak jasonmay: async IO isn't really there yet, as far as I know.
18:00 jnthn jasonmay: So if Parrot has bits we're not providing yet, there'll be ways to do it. It's mostly dependent on what Parrot offers so far though.
18:01 jasonmay ok cool
18:01 jasonmay thanks
18:01 masak jnthn: I can't put my finger on it. the model you describe doesn't sound right. let me think about this for a day or two.
18:01 jnthn Oh, I think mberends++ and I maybe managed to work out how to call select using Zavolaj once.
18:01 jnthn masak: I alluded to a lot of this in that dispatch blog post a few weeks ago.
18:01 tadzik . o O ( FakeAsyncIO.pm )
18:02 jnthn masak: The one that led to the multi-dispatch changes.
18:02 masak right.
18:02 jnthn The multi-dispatch changes addressed most of it.
18:02 jnthn But I still think we may have some lingering more general dispatch issues.
18:02 jnthn Particularly around dispatcher interaction.
18:03 masak I'm getting increasingly interested in dispatcher interaction.
18:03 masak I mentioned it the other day as well.
18:03 jnthn Aye, it's (one of many mnay things) on my mind too.
18:04 jnthn Anyway, under the current model you'd need the now-empty wrap candidate list's dispatcher frame to vanish or be ignored by the nextsame in the method to resume walking the outer candidate list.
18:04 jnthn Which is do-able, but just makes me that tiny bit uncomfy. :)
18:05 * masak just stumbled over http://perl6training.net/
18:05 masak jnthn: I think you should mention Rakudo on there, not just Pugs :P
18:05 jnthn sheesh
18:05 jnthn how old is *that*
18:05 masak 3 years?
18:05 jnthn Given the picture of me on there...not recent.
18:06 masak :)
18:06 * jnthn pushes updating it onto his "things to do" list
18:06 jnthn Not sure the market for Perl 6 training is quite there yet though. :)
18:07 masak won't be long now. we just need to release Perl 6, and then... oh wait. :/
18:07 jnthn :P
18:07 jnthn I should update the referenced slides and point to Rakudo, at least. :)
18:07 jnthn masak++ # reminding me to take care of stuff I forgot I even had :)
18:07 masak strangely, living in a post-"Christmas" climate feels just like living in a pre-"Christmas" climate. anyone else notice that?
18:08 masak except, of course, that Rakudo is awesomer than two years ago. I shouldn't forget that.
18:09 masak Rakudo is in many ways more at this point than Pugs was at its peak. it's just gotten there with less fanfare.
18:15 sorear good * #perl6
18:16 tadzik hello sorear
18:16 tadzik jnthn: I read your 2005 talk about Parrot, it mentions JIT, Threads, why are they no more, what has happened?
18:16 masak greetings, sorear.
18:17 sorear jasonmay: you may find this useful, it's a cooperative thread scheduler in pure Perl 6: http://www.nntp.perl.org/group/perl.perl6.language/2010/10/msg34249.html
18:17 masak tadzik: JIT has always been a problem child in Parrot. as far as I understand, one is still at square 1 with it. threads are there, but so untested as to be virtually not there.
18:17 jnthn tadzik: Nobody wanted to maintain the JIT so it got ripped out instead, under the assumption that it would be replaced soon thereafter.
18:18 jnthn Guess what didn't happen.
18:18 sorear tadzik: the link change was not intentional.  It broke last night when I was busy making dalek work at all again after recent github changes
18:19 sorear I'm suprised nobody noticed dalek is working...
18:20 tadzik Parrot folks noticed. I didn't notice it was broken
18:24 jnthn noms &
18:25 cxreg jnthn: isn't that why they're now doing lorito?
18:25 colomon sorear++
18:26 tadzik cxreg: Lorito has more reasons to be than to enable easier JIT compilation
18:27 jasonmay sorear: thanks, I'll take a look in a bit
18:27 jhuni joined #perl6
18:30 simon__ left #perl6
18:30 dalek left #perl6
18:31 sorear tadzik: the URLs should be fixed now
18:31 dalek joined #perl6
18:36 takadonet left #perl6
18:46 hercynium joined #perl6
18:47 tadzik sorear++
18:59 wamba left #perl6
19:00 bluescreen joined #perl6
19:00 diakopter post-Christmas? really?
19:01 bluescreen is now known as Guest22875
19:02 masak diakopter: so says the current Perl 5 pumpking, obra.
19:02 masak diakopter: according to obra, Christmas was the Rakudo Star release.
19:06 diakopter that's utter bull****. the [para]phrase was "when [a] Perl 6 is released, every day will be like Christmas, [so we can refer to its release date as Christmas]".  Until every day is like Christmas [in terms of using Perl 6], Perl 6 hasn't been released.
19:07 diakopter I'm disappointed he said that.
19:07 dalek left #perl6
19:07 masak the "every day will be Christmas" is not part of the original quote/joke about Christmas, though.
19:07 masak diakopter: you want the URL to the talk?
19:07 diakopter what was the original quote/joke
19:08 arnsholt I think it was just "Perl 6 will be released for Christmas"
19:08 masak "When will Perl 6 be released? -- By Christmas. [We're just not saying which one.]"
19:08 masak Larry used to say that to interviewers.
19:08 dalek joined #perl6
19:08 dalek left #perl6
19:09 arnsholt It was audreyt that made the extension, no?
19:09 masak not originally.
19:09 masak she used it a lot in talks, though.
19:09 masak I'm trying to recall the name of the (likely) originator.
19:09 masak I traced it back through the IRC logs once.
19:09 arnsholt Cool
19:10 dalek joined #perl6
19:10 icwiener joined #perl6
19:10 diakopter I never said I was referring to the "original" use of "Christmas"... but if obra made that comment about Rakudo Star, that's contrary to what S01 says
19:10 diakopter (now referring to Larry's use of "Christmas")
19:11 masak ok.
19:11 diakopter (when "Perl 6" will be released)
19:11 diakopter 6.0.0
19:12 diakopter so don't see how we're post-Christmas in any sense
19:12 tadzik It's rather "it has alredy started snowing"
19:13 diakopter (snowing N years before Christmas?)
19:13 masak anyway, I'm using Perl 6 every day. and it's at least November :)
19:14 tadzik masak: are you releaseing psyde?
19:14 masak tadzik: soon, soon.
19:14 tadzik before christmas?
19:15 masak yes. I give my word.
19:15 masak probably early December some time.
19:15 masak (and no, psyde is not the Big Announcement)
19:17 masak ah. it was fglock++ who coined the "every day will be Christmas" variation.
19:18 masak or was it putter++?
19:18 masak dang.
19:19 tadzik rakudo: role something {}; multi trait_auxiliary:<is>(something $trait, $block, $arg) { .WHAT.say for $trait, $block, $arg} # what's wrong?
19:19 p6eval rakudo 142d22: OUTPUT«===SORRY!===␤Null PMC access in get_string()␤»
19:19 * masak submits rakudobug
19:19 tadzik right :)
19:22 masak rakudo: sub trait_auxiliary:<a>() {}
19:22 p6eval rakudo 142d22: OUTPUT«===SORRY!===␤Null PMC access in get_string()␤»
19:22 masak that's what's wrong.
19:22 hercynium left #perl6
19:22 jnthn huh :S
19:23 jnthn You wanted trait_mod anyway, if you're trying to write a trait, though. But yes, something's wrong there.
19:23 masak something that seems to have evaded the spectests.
19:26 patspam left #perl6
19:27 tadzik LolDispatch uses trait_auxiliary
19:27 tadzik why would I want trait_mod?
19:27 masak isn't LolDispatch alpha code?
19:27 tadzik dunno
19:28 tadzik probably. But it contains a funny and easy example for traits, and I wanted to understand those
19:29 au|irc left #perl6
19:29 lue ohayo
19:30 masak lue: \o
19:30 masak tadzik: we definitely need more such examples.
19:31 tadzik masak: that was my intention
19:32 masak tadzik: why don't you badger jnthn a bit more, and maybe he'll show you a working example.
19:32 masak either that, or look in the Rakudo source code.
19:32 tadzik masak: there is a working example in Zavolaj, but LolDispatch was easier to read
19:33 tadzik rakudo doesn't use mod_auxiliary anyway :/
19:34 jnthn tadzik: A while back, the various different types of trait handler were unified.
19:34 jnthn Everything is trait_mod now
19:35 jnthn So the code will need an update for that.
19:35 tadzik ah, that explains a lot
19:37 masak blog post! http://strangelyconsistent.org/blog/november-6-2010-ideals-separation-and-pragmatism
19:37 masak 24 days to go. I'm not even breaking a sweat so far. :)
19:37 tadzik https://gist.github.com/665650 -- out of ideas again :/
19:38 tadzik oh wait, that's wrong
19:38 tadzik fixed a gist
19:38 lue What would the best way be to allow quoting on a commandline? [things like    rewrite "say $a;"] I'm hoping there's some tricky regex thing
19:39 tadzik jnthn: how do I use these? :/
19:39 masak lue: I don't understand what you're asking.
19:40 lue I want to force people to use quotation marks for clarity's sake, but I don't need them when I'm processing the info.
19:41 lue (in my example above I need just    say $a;    ]
19:41 namer joined #perl6
19:41 Steppenwolf joined #perl6
19:43 namer left #perl6
19:44 lue I wonder, is it still possible to add tasks to GCI, or is that finalized?
19:44 tadzik they are still being added I think
19:44 tadzik but ask #parrot
19:45 masak lue: I don't understand the context of your commandline problem.
19:46 masak lue: you probably explained it well, given that one has some piece of extra information that I don't have.
19:46 masak either that, or I need coffee.
19:48 lue Right now, in my fork of Tardis, I have the rewrite command. All I want is to be able to detect some sort of quotation so Tardis doesn't disappear.
19:48 masak ok, so the context is your rewrite command.
19:48 masak and you want to detect quote marks.
19:48 masak I'm with you so far.
19:50 lue with input    -e "my $a = 3; say $a;"    and rewriting the first line of code (tick 1) using    rewrite "my $a = 2;"     produces this as the program:
19:51 lue "\"my \$a = 2;\"; say \$a;"
19:52 lue [ sorry, imagine \ in front of every $ in the input ]
19:55 masak well, the regex /^ \" (.*:) \" $/ will tell you whether the string starts and ends with quotes.
19:55 masak and if it matches, you can just replace that string with $0.
19:55 lue all that looks familiar except the colon.
19:56 masak though I must confess that allowing both the quote and non-quote form sounds like the Wrong kind of user-friendliness.
19:56 masak lue: the colon is a ratchet, preventing backtracking. it allows the regex to fail faster when it fails.
19:56 jnthn tadzik: May need to be "our" scoped for the moment.
19:56 masak it has the same effect as using 'token' rather than 'regex'.
19:57 lue I know. I think I'll leave it at not-quoting, considering it doesn't do that much harm.
19:57 lue (although trying to rewrite anything that uses some sort of quotation (i.e.  say "hello";) fails miserably right now)
19:58 lue rakudo: my $a = "Well; hello; there;" say $a.split(';').perl
19:58 p6eval rakudo 142d22: OUTPUT«===SORRY!===␤Confused at line 22, near "my $a = \"W"␤»
19:58 tadzik jnthn: what, the role?
19:58 masak lue: missing semicolon.
19:58 lue rakudo: my $a = "Well; hello; there;"; say $a.split(';').perl
19:58 p6eval rakudo 142d22: OUTPUT«("Well", " hello", " there", "")␤»
19:59 lue rakudo: my $a = "Well; hello; there;"; my @b = $a.split(';').perl; @b[1] = "hi;"; say @b.join(';')
19:59 p6eval rakudo 142d22: OUTPUT«("Well", " hello", " there", "");hi;␤»
20:00 masak lue: .perl makes it into one element.
20:00 lue rakudo: my $a = "Well; hello; there;"; my @b = $a.split(';'); @b[1] = "hi;"; say @b.join(';')
20:00 p6eval rakudo 142d22: OUTPUT«Well;hi;; there;␤»
20:00 jnthn tadzik: No, those are our-scoped by default.
20:00 jnthn tadzik: the multi
20:01 masak multi subs are our-scoped by default?
20:01 masak ah; roles are.
20:01 masak *phew*
20:01 tadzik jnthn: but it is
20:01 lue rakudo: my $a = "hi;"; $a.chop; say $a;
20:01 p6eval rakudo 142d22: OUTPUT«hi;␤»
20:02 lue .oO(that explains my double-semicolon issue.)
20:02 tadzik masak: is 'before' just fancy '<'?
20:02 jnthn tadzik: oh, yes...
20:02 masak tadzik: yeah, it's the general one, not just numeric.
20:02 jnthn Your candidate also shows up in the list.
20:03 tadzik yeah
20:04 jnthn rakudo: our multi trait_mod:<is>($block, $arg, :$foo!) { say "ok" }; sub bar() is foo(42) { }
20:04 p6eval rakudo 142d22: OUTPUT«===SORRY!===␤Could not find sub &say␤»
20:04 jnthn ...
20:04 tadzik that's... cool
20:04 jnthn rakudo: our multi trait_mod:<is>($block, $arg, :$foo!) { "ok".say }; sub bar() is foo(42) { }
20:05 p6eval rakudo 142d22: OUTPUT«ok␤»
20:05 jnthn That way works.
20:05 tadzik hmm
20:05 tadzik but what with this say?
20:05 jnthn oh, maybe the trait subject comes first...
20:05 * sorear needs to hurry up
20:05 jnthn It's just the usual outer-and-BEGIN bug.
20:05 tadzik mhm
20:05 masak it's in RT, but probably not in that form.
20:06 tadzik yay, it works
20:06 jnthn I think when pmichaud++ and I discussed the set of bugs at YAPC earlier int he year, we concluded that we needed lexpad changes to do it, but doing that implied a bunch of other changes.
20:07 jnthn Or at least, doing it properly did.
20:10 lue masak: is it known that Yapsi::Compiler can't accept any input with quotation marks in it? Both ' and escaped " fail.
20:10 masak lue: Yapsi doesn't have strings yet.
20:11 masak only Ints.
20:12 jnthn Well, that did for BCPL... :-)
20:12 masak it just hasn't been a priority.
20:13 lue Hm, it bugs me. [maybe I should go fix it. /me goes to try to fix it]
20:13 jnthn Can't believe the official Perl 6 doesn't have strings!
20:13 masak it's a disgrace!
20:13 tadzik jnthn: well volunteered!
20:13 sorear I have strings working in niecza-compiled STD btw
20:14 jnthn Dissapoinstring.
20:16 lue jnthn: We ought to stringle you for all those puns...
20:18 jnthn Using a rope? :-)
20:19 risou joined #perl6
20:19 lue your murder would be a titlecase for any lawyer :)
20:22 dFlamingR joined #perl6
20:24 dFlamingR left #perl6
20:26 FlamingRed joined #perl6
20:31 Steppenwolf left #perl6
20:32 masak nice post by draegtun++ that I hadn't seen before: http://transfixedbutnotdead.com/2010/10/31/perl6-metaprogramming-update/
20:32 tadzik https://gist.github.com/665696 what am I doing wrong now? :)
20:32 sorear masak: Have you read your blog lately?
20:32 masak sorear: why, is there something wrong with it?
20:32 * tadzik was so hoping this would work, so he could present a working example
20:32 sorear masak: http://strangelyconsistent.org/blog/feed.atom
20:32 sorear see for yourself
20:32 * masak looks
20:33 masak ouch.
20:33 * masak fixes
20:33 masak sorear++: thanks.
20:33 phenny left #perl6
20:34 phenny joined #perl6
20:35 sorear was it related to the shell code in your last blog post?
20:35 masak yes.
20:35 masak seems to be a missing quote.
20:37 tadzik jnthn: might taking a look at the gist? You seem to be the one knowing stuff about traits
20:38 masak sorear: should work now.
20:41 * lue is currently break— er, fixing yapsi.
20:42 tadzik jnthn: oh, I'm stupid, nevermind
20:43 masak someone picked up on my roman-numeral experimentation from a few days ago: http://perlenespanol.com/foro/numeros-romanos-en-perl-6-t5499.html
20:46 MayDaniel left #perl6
20:50 jdd joined #perl6
20:53 jdd left #perl6
20:54 y3llow_ joined #perl6
20:54 pothos_ joined #perl6
20:54 lue masak: I start to see why strings aren't available yet.
20:56 y3llow left #perl6
20:56 pothos left #perl6
20:56 y3llow_ is now known as y3llow
20:57 pothos_ left #perl6
20:57 pothos joined #perl6
21:02 * sorear waits for somebody to commit something
21:02 masak lue: no, it's not particularly hard, I don't think. it just hasn't been prioritized so far.
21:04 flussence I'm probably misunderstanding something here, but why doesn't "rule { '/*' ~ '*/' .* }" parse C++-style comments? I couldn't get it to work in my CSS grammar thing.
21:04 masak that .* looks a bit too greedy to me.
21:05 tadzik yep. What about /* */ */?
21:05 masak that doesn't parse.
21:06 sorear .* in a rule takes everything up to the end of the file and doesn't give anything back
21:06 flussence .*? doesn't work for me either, though.
21:06 sorear also, you want to use token, not rule
21:06 flussence oh. I suddenly remember making that mistake last time...
21:06 sorear Try '/*' .*? '*/'
21:07 sorear I'm wary of ~ / quantifier parsing interactions
21:07 masak me too.
21:07 flussence yep, that's the one I changed it to and it worked with that, hence the confusion.
21:07 masak I'm skeptical of ~ in general.
21:07 masak it's still slightly slushy, IMO.
21:08 sorear ~ carries a fair performance cost in niecza because it has to set $*GOAL
21:08 sorear STD.pm6 relies extensively on being able to check what the current goal is
21:10 flussence I think I might avoid using it entirely for the time being, writing test cases is awkward when ~ throws up a fatal error...
21:11 kjeldahl joined #perl6
21:11 lue Funny enough, that's probably the same reason    \" .* \"    won't DWIM :)
21:12 whiteknight left #perl6
21:12 * sorear starts hacking on JSYNC::XS for Niecza
21:13 risou_ joined #perl6
21:13 masak someone should write a "what everyone who would even consider using a quantifier needs to know about greedy quantifiers" blog post.
21:13 masak feels like this is a FAQ.
21:14 risou left #perl6
21:14 lue .oO(I like working on grammars, because I don't deal with regexes often in anything else I do)
21:15 tadzik https://gist.github.com/665696 -- looks like the trait can't set/modify any variables
21:15 masak lue: the reason Str hasn't made it into Yapsi yet is that they're not on the the path of things I'm interested in exploring: control flow, exceptions, phasers, etc.
21:16 masak tadzik: looks that way, yes :/
21:17 tadzik dang. If it won't work before advent calendar, there is no reason to write about traits imho
21:17 * sorear wonders if I should be blogging or anything like that
21:18 masak sorear: yes, please.
21:18 lue Yes! I got it to parse :D , but:    Unknown instruction: $0 = "hello"    (I've already got an idea on the answer)
21:18 lue masak: It's fine, I'm working on it for you :)
21:19 masak lue: that means you've made it into the runtime. but the runtime also only knows about integers.
21:19 masak it doesn't know what to do when it sees an instruction assigning a string to a register.
21:22 lue Well, I found the resting place of the error, so I know the general area.
21:24 * lue wonders if using Tardis on Yapsi is a good idea...
21:28 masak unfortunately, Yapsi can not parse itself yet.
21:28 masak for example, the Yapsi source code contains strings, and Yapsi doesn't handle strings. but that's just the beginning of it.
21:28 masak it'd be really cool to have it self-host. some ways to go to get there, though.
21:30 lue It looks like there would have to be a string version for everything (lib/Yapsi.pm:523 about).
21:30 jhuni left #perl6
21:31 masak depends how the runtime chooses to handle strings.
21:32 myname_ joined #perl6
21:34 masak rakudo: sub tall { $^guy ~~ /tall/ }; sub dark { $^guy ~~ /d }; sub handsome { $^guy ~~ /handsome/ }; my &ideal := &tall & &dark & &handsome; my $date = "tall, dark and handsome"; if ideal($date) { say "swoon!" } # from E06
21:34 p6eval rakudo 142d22: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
21:35 masak hm. worked locally.
21:35 masak rakudo: sub tall { $^guy ~~ /tall/ }; sub dark { $^guy ~~ /dark/ }; sub handsome { $^guy ~~ /handsome/ }; my &ideal := &tall & &dark & &handsome; my $date = "tall, dark and handsome"; if ideal($date) { say "swoon!" } # from E06
21:35 p6eval rakudo 142d22: OUTPUT«swoon!␤»
21:35 masak there we go.
21:35 masak that's... awesome.
21:36 lue I'm probably breaking Yapsi with every edit, but its fun :)
21:36 masak lue: are you running the tests?
21:37 lue $ bin/yapsi -e 'my $a = "hello"; say $a;'
21:37 lue "hello"
21:37 lue (initiate Kirby Dance)
21:38 lue _Now_ I'll run the tests.
21:38 mavrc left #perl6
21:38 masak lue++
21:39 lue ...how do I run the tests? (make test fails because this server's copy of  prove  doesn't have -e)
21:39 tadzik with mbuild! :)
21:40 tadzik (unless it uses prove too :F)
21:40 tadzik (it does)
21:40 risou_ left #perl6
21:41 * tadzik thinks about how trans could be sped up
21:41 masak lue: I suggest you update Test::Harness from CPAN.
21:42 tadzik masak: how bad does it sound to make trans run regex substitutions for every pair of array elements?
21:42 masak tadzik: it doesn't work, for reasons explained in today's post.
21:42 tadzik hmm, must've missed that
21:42 masak the nice thing about .trans is that it doesn't double-substitute.
21:42 masak regexes would.
21:43 rindolf joined #perl6
21:43 rindolf Hi all.
21:43 masak rindolf! \o/
21:43 tadzik ah, I see
21:43 tadzik hey rindolf
21:43 rindolf Hi masak , tadzik
21:43 rindolf tadzik: your nick reminds me of the Hebrew letter/word Tzadiq.
21:44 masak rakudo: say "Hello rindolf, the IRC user formerly known as another Perl 5 successor."
21:44 rindolf Tzadiq means "righteous" in Hebrew.
21:44 p6eval rakudo 142d22: OUTPUT«Hello rindolf, the IRC user formerly known as another Perl 5 successor.␤»
21:44 tadzik rindolf: nice. I think the original name, Tadeusz, is also Herbew. IIRC
21:44 tadzik ah, it's aramic
21:44 tadzik (aramaic)
21:45 rindolf tadzik: ah.
21:45 jhuni joined #perl6
21:45 masak jhuni: aloha!
21:45 masak aloha: jhuni!
21:45 rindolf masak, tadzik : what's up?
21:46 tadzik rindolf: oh cool. I was having fun with traits, but they're sadly to broken to be fun atm :(
21:46 masak rindolf: it's *not* Christmas yet. but we're pretty productive, and things are looking good.
21:46 rindolf masak: cool.
21:46 tadzik rindolf: https://gist.github.com/665696
21:47 lue how do I get cpan working on a machine I don't have root priveleges on?
21:47 tadzik use local::lib
21:48 masak lue: you can also run the test files directly: `perl6 t/compiler.t ; perl6 t/runtime.t`
21:48 masak lue: but then you probably need to set PERL6LIB explicitly.
21:48 masak PERL6LIB=`pwd`/lib
21:48 sorear curl -L http://cpanmin.us | perl - -i App::cpanminus
21:49 rindolf Hmmm... I may need to package the new Rakudo for Mandriva Cooker.
21:49 rindolf Or should I wait for the next one?
21:49 sorear it'll spit out a big chunk of warnings saying it's auto,matically doing soemthing with local::lib
21:49 tadzik Star is not old yet
21:49 lue I think I got it.
21:49 tadzik btw, any C++ers around?
21:50 sorear yes
21:50 sorear unfortunately
21:50 rindolf tadzik: I know some C++.
21:50 rindolf tadzik: not a lot.
21:50 rindolf tadzik: I know C better.
21:50 tadzik I have a Uni project in C++ to write, so I prototyped it in Perl 6 and now I need to translate it :)
21:50 flussence I don't know C++, but I can pretend to if needed!
21:50 tadzik rindolf: same here. I try to avoid C++ if I can
21:51 sorear I know quite a lot of C++
21:52 lue perl6 t/* seems to work just fine.
21:52 tadzik http://pastie.org/1277857 -- here. It is supposed to be an app encrypting its input, having different algorithms, easily addable. That's what I thought about, and I'm not sure how to express myself in C++
21:53 sorear use inheritence
21:53 tadzik first thing that discouraged me was that I can't easily use :: in class names in C++, they're operators
21:53 tadzik well, I do. So the role would turn into a class with virtual methods, yes?
21:53 masak rakudo: sub foo($x) { say $x }; my &x = &foo.assuming("assumed!"); &foo.wrap({ say "wrapped!"; nextsame }); x
21:53 sorear the :: in Perl6 class names actually came from C++
21:53 p6eval rakudo 142d22: OUTPUT«wrapped!␤assumed!␤»
21:53 masak wow.
21:53 sorear but you need to use package Foo { class Bar { } }
21:54 sorear not class Foo::Bar
21:54 sorear *usage* syntax is the same
21:54 tadzik I see
21:54 tadzik so I'd be doing namespace Foo { class Bar {} } in C++?
21:54 sorear yes
21:55 mavrc joined #perl6
21:55 tadzik hmm, I'll do some trials
21:57 tadzik oh, I made it compile. Yet I'm not sure it makes sense
21:57 lue masak: tests 29..46 of compiler.t fail, every other test in t/ is fine. Is that expected?
21:58 masak lue: no, 100% tests pass is expected.
21:58 * masak runs the Yapsi tests
21:59 REPLeffect left #perl6
22:00 REPLeffect joined #perl6
22:00 tadzik http://pastie.org/1277872 -- am I doing this right? Sorry for polluting the channel with C++, but only Perl 6 people will understand what was I going to do :)
22:00 MayDaniel joined #perl6
22:02 masak lue: all tests pass here.
22:02 myname_ left #perl6
22:04 sorear tadzik: virtual ... const = 0;
22:04 sorear if you don't put in the = 0 C++ will assume there's a definition somewhere, and you might get link errors
22:04 lue .oO(I'm going to spend a while finding the error, aren't I?)
22:05 Chillance joined #perl6
22:05 tadzik sorear: tanks. The rest is fine?
22:05 sorear (Bjarne Stroustrop thinks NULL is spelled 0 and publically hates the macro.)
22:05 sorear yes
22:05 tadzik s/tanks/thanks/
22:06 tadzik well, the guy who I give projects to said to use 0L instead of NULL, because it's a macro and blah blah
22:06 masak lue: I don't know. but if you do find it, make all the tests pass, and add at least one new test for your new functionality for good measure, you might want to consider sending me the patch. :)
22:06 REPLeffect left #perl6
22:09 lue I only changed two things, so it shouldn't be that hard to find the issue.
22:09 M_o_C joined #perl6
22:09 M_o_C left #perl6
22:09 M_o_C joined #perl6
22:11 masak http://dev.perl.org/perl6/doc/design/exe/E06.html contains some of the most fearless Perl 6 macro usage I've seen so far. I know the text is old, but it's both refreshing and scary at the same time to see them used like that. something within me screams "that will NEVER work!"
22:12 masak (I don't mean that macros won't ever get implemented. I mean that E06 assumes that it's easier and less of a hassle that it'll turn out to be)
22:13 tadzik return (\@sheep, \@goats); -- that looks Perl5ish
22:13 masak well, it's legal Perl 6.
22:13 masak but yes, Perl 6 was a lot closer to Perl 5 at that time. perhaps not too surprising.
22:13 masonkramer rakudo: sub bag ( *@items --> Bag ) is export { }
22:13 p6eval rakudo 142d22: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
22:14 masak masonkramer: I'd guess --> isn't implemented yet.
22:14 masak rakudo: sub foo( --> Int ) {}
22:14 tadzik that int should've been Int, no?
22:14 p6eval rakudo 142d22:  ( no output )
22:15 masak masonkramer: ah. Bag isn't implemented yet.
22:15 tadzik rakudo: Int foo() { "bar" }
22:15 p6eval rakudo 142d22: OUTPUT«===SORRY!===␤Confused at line 22, near "Int foo() "␤»
22:15 tadzik rakudo: Int sub foo() { "bar" }
22:15 p6eval rakudo 142d22: OUTPUT«===SORRY!===␤Confused at line 22, near "Int sub fo"␤»
22:15 masonkramer Oh, right.
22:15 tadzik no C-style available?
22:15 masonkramer Yeah, I'm trying to implement Bag right now
22:15 jnthn tadzik: not without a scope deccy
22:15 masonkramer but that line isn't working for me either
22:15 tadzik jnthn: hm?
22:15 jnthn rakudo: my Int sub foo() { "bar" }
22:15 p6eval rakudo 142d22:  ( no output )
22:15 tadzik cool
22:16 masak tadzik: what jnthn said. you have to "forewarn" Perl 6 that something declaratory is coming.
22:16 tadzik cooler if sub could be ommited :>
22:16 jnthn It's forbidden (TTIAR) without it though.
22:16 tadzik ah, I see
22:16 masak jnthn: ah yes. that's why.
22:16 jnthn "BEWARE! Upcoming declaration!"
22:17 masak or rather, the forewarning is necessary due to TTIAR.
22:17 lue TTIAR?
22:17 tadzik Two Terms In A Row
22:19 dalek niecza: 45f6aeb | sorear++ | lib/JSON/JSDOM.cs:
22:19 dalek niecza: Add a DOM for the JSON/JSYNC/YAML interface
22:19 dalek niecza: review: https://github.com/sorear/niecza/commit/45f6aebba2d641be7c9d602f7f42a3fc319ee23d
22:19 lue .oO(dang it, even commenting out everything I added, those failing tests still fail)
22:19 REPLeffect joined #perl6
22:20 tadzik yay, paths work
22:20 masak lue: wnat about running the tests on a clean checkout?
22:21 lue would I lose all 2 lines I added? (I can add them in again, not that difficult)
22:22 masak not if you do a new checkout somewhere else.
22:22 tadzik or git stash your changes
22:22 masak either that, or 'git stash' your what tadzik said :)
22:23 icwiener left #perl6
22:23 masonkramer how can I declare my implementation of postfix<{}> for objects that do Associative?
22:24 jnthn method postcircumfix:<{ }>($key) { ... }
22:24 lue too late :) [if it were more than 2 little things (kindly indicated to me by git diff beforehand) I would've stashed]
22:24 masonkramer thanks
22:27 lue still won't compile 29..46 of compiler.t with clean checkout of lib/Yapsi.pm hm :/
22:27 masak lue: and you don't have any old .pir files littering about?
22:27 lue (I just realized I probably need to update Rakudo)
22:28 masak no, I don't think so.
22:28 masak unless it predates Rakudo Star.
22:28 masonkramer_ joined #perl6
22:28 masonkramer left #perl6
22:28 lue I think it does. In any case, good idea to update!
22:28 masonkramer_ is now known as masonkramer
22:31 * masak calls it an early night
22:31 masak see you tomorrow, #perl6.
22:31 masak left #perl6
22:31 masonkramer goodnight
22:40 patspam joined #perl6
22:50 mberends joined #perl6
22:50 starcoder left #perl6
22:51 REPLeffect left #perl6
22:53 M_o_C left #perl6
22:55 dalek 6model: 28e9882 | jnthn++ | dotnet/compiler/PAST2DNSTCompiler.pm:
22:55 dalek 6model: [dotnet] Fix a little bug in PAST2DNST when compiling some package variable binds.
22:55 dalek 6model: review: https://github.com/jnthn/6model/commit/28e988233c1cb53b0c15e0535e590171317c7b7b
22:55 dalek 6model: 3682233 | jnthn++ | dotnet/compiler/ (2 files):
22:55 dalek 6model: [dotnet] Twiddle JnthnNQP a bit to make packages live in the package by default, but also allow my to be used to say it's a lexical package.
22:55 dalek 6model: review: https://github.com/jnthn/6model/commit/36822333eb9664e73040cec1c7c27983a399c4f1
22:55 dalek 6model: 2348cc1 | jnthn++ | common/NQP/NQPSetting.pm:
22:55 dalek 6model: [common] Mark the various packages in the setting as lexical ones.
22:55 dalek 6model: review: https://github.com/jnthn/6model/commit/2348cc10fe52dfdcecd2a9c4d2f8eda74d9df8b0
22:55 starcoder joined #perl6
23:03 dalek left #perl6
23:03 dalek joined #perl6
23:05 pmurias left #perl6
23:06 REPLeffect joined #perl6
23:17 masonkramer can I set a default value for hashes?
23:17 tadzik what do you mean?
23:18 masonkramer the value to which a hash value autovivs
23:18 tadzik hmm, you'll have to setup your subset of Hash I think
23:22 rindolf left #perl6
23:24 meppl left #perl6
23:26 mavrc left #perl6
23:26 MayDaniel left #perl6
23:27 dalek left #perl6
23:28 dalek joined #perl6
23:35 _kaare left #perl6
23:35 Axius joined #perl6
23:36 dalek left #perl6
23:39 dalek joined #perl6
23:40 FlamingRed left #perl6
23:44 REPLeffect left #perl6
23:48 REPLeffect joined #perl6
23:59 dalek 6model: de688fe | jnthn++ | dotnet/compiler/PAST2DNSTCompiler.pm:
23:59 dalek 6model: [dotnet] Fix code-gen bug that caused problems with && and || and probably other things that cared about what a failed if/unless evaluated to.
23:59 dalek 6model: review: https://github.com/jnthn/6model/commit/de688fe67b3670909aa357e5b7e47afd85e66f88
23:59 dalek 6model: f7efbd5 | jnthn++ | t/nqp/25-class.t:
23:59 dalek 6model: [t] We now pass 25-class.t.
23:59 dalek 6model: review: https://github.com/jnthn/6model/commit/f7efbd5351ccff2c75958a04004d4efecb7b0413

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

Perl 6 | Reference Documentation | Rakudo