Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-02-12

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:12 Limbic_Region joined #perl6
00:34 r0bby joined #perl6
00:40 literal hm, + is no longer a sigil?
00:50 avar literal: twigil
00:50 literal yeah, meant that
00:53 FurnaceBoy joined #perl6
01:03 meppl good night
02:05 frew anyone here?
02:09 mikehh frew: a few I'm sure
02:14 frew I was curious if any of the developers here have opinions about quad core procs
02:14 frew I plan on doing lots of web dev, so would it even matter?  (database, web server, tests, firefox, editing files, etc)
02:15 frew it might make recompiling parrot and perl6 nicer of course :-)
02:16 japhb joined #perl6
02:17 mikehh Quad core works very well with multiple applications running (with plenty of memory)
02:17 frew Are you running linux?
02:17 mikehh How well it works with a single app depends on if it is threaded properly
02:18 frew yeah, I am not expecting most apps to written that way
02:18 mikehh Kubuntu Intrepid at the moment
02:18 frew have you noticed apps that aren't yet compiled for the64 bit?
02:20 mikehh I actually have separate root partitions for Ubuntu i386 & AMD64 and Kubuntu i386 & AMD64
02:21 frew uhh
02:21 frew so you have apt set up that way or something like that?
02:21 frew so that it will install 32 bit stuff in the other partition?
02:21 mikehh same /home partition with different logins but all accessible to each other
02:22 frew do you compile them yourself or what?
02:22 frew because if that's the case I was considering using gentoo for a while because of that
02:22 alc joined #perl6
02:23 mikehh depends - with parrot and Rakudo yes others mostly from the Ubuntu repositories
02:24 frew why do you have both available?  Just in case or something?
02:27 mikehh I originally set it up for testing things - used to have Suse too but could not get it to work with my wireless network
02:31 s1n joined #perl6
02:32 eternaleye joined #perl6
02:34 hercynium joined #perl6
02:34 frew ok, so in general though, you don't really have issues running apps compiled for 64 bit procs?
02:35 mikehh most are ok
02:35 frew cool
02:36 mikehh In general it depends on how much memory you have available
02:36 frew how much do you have?  I am planning on having 4 gigs
02:37 mikehh 32 bit apps are usually slightly faster for smaller mem requirements but have problems with more than 4 gigs
02:38 mikehh In fact Windozw 32 bit can't address mor than 3
02:38 frew right
02:39 frew but in general I think that I won't notice that speed since I am upgrading from 1.2 Ghz to at least 2.33 Ghz
02:39 mikehh In general with up to 4 gigs youare probably better off with 32 bit apps
02:39 frew so do you think I should get a dual core  with a higher clock speed for my usage?
02:40 frew DB + dev webserver + regular dev apps?
02:40 mikehh It is only with more than 4 gigs that 63bit really starts to shine
02:40 mikehh 64
02:41 frew well, I was planning on getting 4 gigs of ram
02:41 frew I just don't know if it's necesary
02:41 frew the only thing that will take up a ton of ram is KDE and firefox
02:41 frew ok
02:41 frew I take that back
02:41 frew when I help a friend do web dev it *is* with rails
02:42 frew which is kindav a hog
02:43 mikehh It probably won't make much difference although 64bit apps are usually a bit larger
02:43 pugs_svn r25301 | chrisdolan++ | Add tests for 'make' builtin using S05 examples
02:44 frew understandably
02:44 frew what is your clock speed?
02:45 mikehh this system is 3Ghz
02:45 frew wow
02:45 frew yeah, that was the max I was looking at
02:46 frew it adds ~$200 to the price of the computer as a whole
02:46 frew but I was thinking that it could be worth it
02:49 mikehh It doesn'make that much difference unless you are running a lot of processor intensive apps lije games and such and doing a serious amount of complies
02:50 frew ok
02:50 frew then I probably won't get the higher clock rate
02:50 frew If ubuntu works I won't do much compiling
02:50 frew and I won't do any games
02:52 mikehh I would suggest spending on memory and storage
02:52 frew well, I am planning on a 1T drive and 4G ram
02:53 mikehh that's good for most things - make sure of backup though
02:53 frew yeah
02:53 frew my roommate takes care of the backup at work and we were thinking we'd do some kind of weekly or monthly tape backup deal
02:54 mikehh you can get a USB hard drive for reasonable prices (or preferably two)
02:55 s1n frew: i've got a 64bit gentoo desktop with 4 gigs of memory and i've never noticed myself using more than maybe 1 gig at any given moment
02:55 frew s1n: your firefox doesn't go crazy after being open for a day or so?
02:55 s1n it's slightly helpful when compiling updates, but processor speed helps more
02:55 frew well, I think the tapes are way cheaper
02:55 s1n frew: i don't use firefox for that reason
02:55 s1n i use epiphany, which is still relatively lightweight
02:56 frew s1n: I believe it, but as a web developer I kinda need it
02:56 s1n i use xfce4 too
02:56 s1n no you don't just use a VM :)
02:56 frew on my desktop I use fvwm
02:56 frew ??
02:56 s1n i do everything that annoys me in a VM
02:57 frew oooooh
02:57 frew gotcha
02:57 s1n this way i can shut it down and return to reality
02:57 s1n break it? host the VM and start over :)
02:57 frew right
02:57 s1n i consider using firefox one of those annoying tasks
02:57 frew hahaha
03:00 s1n frew:
03:00 s1n bleh, stupid focus
03:02 frew s1n: I'm gonna try out using epiphany for a while
03:03 s1n frew: i recommend it
03:03 s1n i'm eager to try out the new webkit backend
03:04 frew It could use some UI work though...
03:04 s1n at least it's consistant with gtk desktops
03:05 frew well yeah, but I'm not on gnome or xfce
03:05 s1n well, sure on fvwm everything looks bad :)
03:05 frew it's true!
03:05 frew but I don't care!
03:06 s1n frew: even if you don't have the resources, at least switch to fluxbox
03:06 frew phone&
03:11 frew s1n: nope
03:11 frew I switched from FB
03:12 frew I went: afterstep->windommaker->BB->FB->OB->FVWM
03:12 frew can you set it up so that I can run an arbitrary command when I right click the desktop in fluxbox?
03:13 frew and make it so that maximization doesn't maximize the window entirely so that I can easily click said desktop?
03:13 eternaleye joined #perl6
03:13 frew because if so I'll switch, but otherwise I am happy with what I've got in FVWM
03:18 felipe joined #perl6
03:20 frew alright, enough of that.  Anyone in here have some tasks that I might be able to do in the tests?
03:20 frew I did a bunch of stuff last week but it was all pretty simple
03:23 frew rakudo: 5.rand
03:23 p6eval rakudo b2e7ac: OUTPUT«sh: ./parrot: No such file or directory␤»
03:23 frew rakudo: my $f = 5; $f.rand
03:23 p6eval rakudo b2e7ac: OUTPUT«sh: ./parrot: No such file or directory␤»
03:23 frew oh that's not good
03:23 frew pugs: 5.rand
03:23 p6eval pugs: RESULT«2.9161854240615352»
03:23 frew pugs: 5.rand
03:23 p6eval pugs: RESULT«4.604899697495834»
03:24 frew pugs: 5.rand
03:24 p6eval pugs: RESULT«0.6840856287591359»
03:24 frew pugs: 5.rand
03:24 p6eval pugs: RESULT«2.1694070460902077»
03:24 frew pugs: 5.rand.floor
03:24 p6eval pugs: RESULT«3»
03:24 frew pugs: 5.rand.floor
03:24 p6eval pugs: RESULT«0»
03:24 frew gnarly
03:27 frew pugs: for 0..3 { say $_.rand }
03:27 p6eval pugs: OUTPUT«0.3800120551325409␤0.293694691684491​64␤1.6751984159171578␤0.8486970053866266␤»
03:31 s1n frew: mouse clicks are for chumps :) i have hotkeys for the things i want
03:31 frew s1n: actually, I do to really
03:32 frew but when I am using my mouse I'd like to only use my mouse
03:32 frew and when I use my keyboard I want to only do that
03:32 frew that's all
03:33 frew I kinda want to do some kind of tiling, but I don't wanna do something that makes me tile, just something that will let me tile
03:33 frew so I can do something like, "Put X window in Y location in the grid I have predefined"
03:36 frew so I am doing an empirical test for $num.rand
03:36 frew I don't see any other way to do it with a test
03:36 frew if anyone has a better idea, let me know
03:44 frew anyone know why I shouldn't use chained operators in a test?
03:47 pugs_svn r25302 | frew++ | [t] Added .rand
04:20 s1n frew: what do you mean by "empirical test?
04:20 frew I mean that I just run it a bunch of times and test it every time
04:20 s1n for what? bounds?
04:20 frew yep
04:21 frew 10 times for each bound
04:21 s1n well, if rand works the way it's supposed to, you could run that indefinitely
04:21 frew yeah
04:21 s1n does 10 prove anything statistically sound? i'm guessing no
04:21 frew but no one wants to do make spectest and get an infinite loop...
04:21 frew well
04:21 frew it's 10 for each bound and 10 different bounds
04:22 frew should I do 100 per bound?
04:22 s1n heh okay, does 20 show anything statistically?
04:22 s1n does 100?
04:22 frew I don't know
04:22 frew I hate stats
04:22 s1n can you prove that >X tests will prove anything sound?
04:22 frew well
04:22 frew it's statistics
04:22 frew nothing is proven right?
04:23 frew it's all just probably probably valid
04:23 s1n these aren't discrete random variables (outside the sense that they are compute "numbers"), so nothing is ever really proven
04:23 s1n all 20 tests prove is 20 tests didn't find a problem, not that it works
04:24 frew yeah, but it's a random number generator
04:24 frew how can you prove anything with a test at all?
04:24 frew the only real way to is to look at the algorithm
04:24 s1n not true
04:24 s1n by doing a loop with a rand variable, you're taking a random sample
04:25 frew which is what I am doing
04:25 s1n the assumption is that random sample is independent
04:25 frew right...
04:25 s1n if you know your stats well enough, you'd have to take a significant number of samples enough before the test set can be assumed to be representative
04:26 s1n that means i might let you get away with doing.... (insert arbitrarily large number here) 1 million samples
04:26 frew hahaha
04:26 s1n otherwise, 20 tests only prove 20 tests worked
04:26 s1n not that rand works
04:27 frew I am talking to my stats friend who is planning on being one of those actuary guys
04:27 s1n i've studied stats for 3 years at the graduate level, it's called machine learning
04:28 frew haha
04:28 frew then why did *I* write the $num.rand test?
04:28 s1n because i'm busy enough as it is :)
04:29 frew haha
04:30 frew well, what if I just had it do 1 minute of sampling per range?
04:30 frew that way if the computer is fast enough it does more samples
04:30 frew but if someone has a bad computer it won't make the thing too slow
04:30 frew do we have a way to check the time in rakudo yet?
04:36 [particle] joined #perl6
04:37 s1n frew: my recommendation is to not try to statistically sample things and just see if you can invent a scenario that would give a bad rand number
04:37 frew s1n: I am not that good at perl6/rakudo
04:38 s1n frew: regardless, there should be a decent way to check the bounds in O(1)
04:39 frew this is going to give me weird dreams tonight
04:40 s1n my best dreams are in either numbers or code :)
04:40 frew my best dream was when I stayed up really late in college working on making a red black tree for data structures
04:40 frew and the smartest guy in class (in my dream) told me that everything would be ok and that I should just curl up with a data structure
04:41 frew s1n: What if I did a monte carlo-ish test
04:42 frew generate a bunch of random numbers, throw away the ones that aren't in this circle, figure out the area of the circle from the points, see if its within a certain range
04:42 frew is that ok?
04:42 frew er sufficient?
04:42 s1n sounds like that already is monte carlo
04:43 s1n i mean, what's the point of the circle?
04:43 s1n are you trying to estimate something, such as the seed?
04:43 frew I guess it doesn't help anything
04:43 frew no
04:43 frew we already have seed tests
04:43 s1n i would say, stick to an O(1) test
04:43 s1n its late though
04:43 s1n bedtime&
04:43 frew ok
04:44 frew thanks anyway :-)
04:44 frew night
04:47 * frew just decides to merge perl6 and excel and consider it good
06:01 simcop2387 joined #perl6
06:20 magnarjg joined #perl6
06:47 ashizawa joined #perl6
07:02 moritz_ rakudo: class A { }; say undef ~~ A;
07:02 p6eval rakudo b2e7ac: OUTPUT«sh: ./parrot: No such file or directory␤»
07:04 moritz_ rakudo: class A { }; say undef ~~ A;
07:04 p6eval rakudo b2e7ac: OUTPUT«sh: ./parrot: No such file or directory␤»
07:07 moritz_ rakudo: class A { }; say undef ~~ A;
07:07 p6eval rakudo b2e7ac: OUTPUT«sh: ./parrot: No such file or directory␤»
07:07 DemoFreak joined #perl6
07:10 magnarjg joined #perl6
07:13 magnarjg left #perl6
07:18 moritz_ working copy locked, some svn process hung up
07:21 moritz_ in cron jobs I should pass the --non-interactive option to svn...
07:42 iblechbot joined #perl6
07:44 magnarjg1 joined #perl6
07:45 magnarjg joined #perl6
07:47 moritz_ ar: compilers/imcc/imcparser.o: No such file or directory
07:47 moritz_ make: *** [blib/lib/libparrot.a] Error 1
08:24 mj41 joined #perl6
08:32 iblechbot_ joined #perl6
08:36 mberends joined #perl6
08:55 masak joined #perl6
08:57 mberends hi masak, I was offline for ever (~48 hours), must backlog before I say anything silly
08:57 masak mberends: aye
09:02 Ehtyar joined #perl6
09:56 jeremiah joined #perl6
09:56 masak 48 hours, that's like three internet months.
09:57 bacek perl6: my @a=<foo bar>; say @a[all(0,1)]
09:57 masak p6eval? hello?
09:58 mberends aye, and the nicest event: moritz_++ # http://www.perl6.ru/articles/5to6/
09:58 moritz_ my traceroute to p6eval shows too many stars :(
09:59 masak translation to Russian of anything Perl6-related is good news. translation of stuff moritz_++ wrote especially so.
09:59 bacek perl6: say "O HI"
09:59 * jnthn sees Rakudo translit'd into Russian for the first time
10:00 mberends transliterated?
10:00 jnthn aye
10:01 * jnthn isn't going to try spelling long words before his morning coffee
10:01 masak I only see it in its original form.
10:01 pugs_svn joined #perl6
10:01 jnthn http://www.perl6.ru/, second paragraph in first story
10:01 bacek yak.
10:02 p6eval joined #perl6
10:02 bacek How you pronounce "Michaud"?
10:02 p6eval ..elf 25302, pugs: OUTPUT«O HI␤»
10:02 masak ah. Ракудо. :)
10:03 mberends for non Russian readers like me: http://uk.babelfish.yahoo.com/translate_url?do​it=done&amp;tt=url&amp;intl=1&amp;fr=bf-home&a​mp;trurl=http%3A%2F%2Fwww.perl6.ru%2Farticles%​2F5to6%2F&amp;lp=ru_en&amp;btnTrUrl=Translate
10:03 masak so... faux Japanese transliterated to Cyrillic. :)
10:03 masak that's very 2009.
10:03 moritz_ mberends: for non-russion readers there's an English versioin on my blog :-)
10:04 mberends yes, this round trip trick sometimes drops a few stitches ;)
10:04 masak perl6.ru might actually be the nicest Perl 6 resource out there, in terms of design and up-to-date information.
10:05 jnthn Aye. Now I just need to learn more Russian. ;-)
10:05 masak it doesn't carry all the technical stuff about Parrot and Rakudo development.
10:05 masak but it does have a lot of good stuff.
10:06 bacek jnthn: (side question) What about lazylists in rakudo?
10:08 ejs joined #perl6
10:08 masak if I want to get a hierarchical structure representing a Perl 6 source file, I suppose I should start building from Syntax::Highlight::Perl6?
10:08 * bacek personally dislike http://github.com/rakudo/rakudo/commit/4​5cf3768ac4fa4119b55848c3236d324385ce3a1
10:09 moritz_ bacek: what's wrong with it?
10:10 bacek moritz_: it's not very optimal.
10:11 bacek postfix ops supposed to be in-place.
10:11 masak but it does correct #60380.
10:11 bacek And I like my version more :) http://github.com/bacek/rakudo/commit/0​b681ae7d7ee98fe49e448424538ab89e9029a5f
10:11 bacek Which corrects #60380 as well
10:12 masak aye.
10:12 masak I saw that one.
10:12 jnthn bacek: Your version doesn't solve the fact we need to also do type-checking on the result, e.g. there may be a refinement type.
10:12 bacek jnthn: when postfix:++ can change type?
10:13 jnthn my EvenInt $x = 2; $x++;
10:13 bacek oh. And what is expected result in this case?
10:13 jnthn Exception.
10:14 bacek good point...
10:15 bacek But in 99% cases cloning is very-very suboptimal.
10:15 bacek Especially when EvenInt.succ declared.
10:15 bacek About 4 "clone" calls
10:16 jnthn bacek: Let's get it correct, get good test coverage, *then* optimize.
10:16 bacek jnthn: premature pessimisation :)
10:18 * bacek got very strong C++ background...
10:18 masak I'm increasingly suffering from slow Rakudo and Parrot. but I agree with jnthn.
10:19 masak even though the danger might be that we paint ourselves into a corner, I believe that danger is small, from what I've seen of pmichaud++'s and jnthn++'s work so far.
10:19 moritz_ didn't the parrot folks decided to do something about that? killing PCCINVOKE or so?
10:21 jnthn moritz_: I think allison is looking at that, since there's a performance issue there.
10:23 bacek perl6: say +*
10:24 bacek std: say +*
10:24 p6eval elf 25302: OUTPUT«Undefined subroutine &GLOBAL::whatever called at (eval 120) line 3.␤ at ./elf_h line 4346␤␤»
10:24 p6eval ..rakudo b2e7ac: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
10:24 p6eval ..pugs: OUTPUT«Inf␤»
10:24 p6eval std 25302: OUTPUT«ok 00:02 33m␤»
10:24 iblechbot joined #perl6
10:37 kane_ joined #perl6
10:50 hanekomu joined #perl6
11:15 ejs joined #perl6
11:17 masak rakudo: 'still not there?'
11:17 p6eval rakudo b2e7ac: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
11:17 * masak fixes
11:24 jeremiah Hej masak!
11:25 jeremiah Still have the "Perl 6 bag O Candy" work in my head.
11:25 jeremiah Right now I have a blocker - writing an article for the Perl Review
11:25 jeremiah But I really want to do it, so maybe I can pick your brain later on what we should include?
11:27 Matt-W oooh an article
11:27 Matt-W (good morning)
11:27 masak jeremiah: sounds very good.
11:27 masak I'll be here all afternoon.
11:28 masak good luck with the article.
11:30 jnthn bag O candy?
11:31 jnthn Sounds...tasty.
11:34 Matt-W chocolate! chocolate!!!!!!
11:35 masak Perl 6 is sweet. Try Perl 6 today!
11:37 literal moritz_: I noticed this in ilbot's source: " mncharity aka putter has an IRC client that prepends some lines with a BOM"
11:37 literal which client does that?
11:38 meppl joined #perl6
11:41 jeremiah jnthn: The goal is to have a live debian CD with a perl 6 environment installed so you can just boot from the disk and start developing.
11:43 jnthn Sweet!
11:43 masak exactly.
11:44 jnthn ;-)
11:46 masak jnthn: p6eval b0rken because Parrot build b0rken. :(
11:46 Matt-W nooooo
11:47 Matt-W call the vet
11:47 masak already did, at #parrot.
11:47 masak haven't gotten any response yet.
11:51 * Matt-W warily watches the results of a giant branch merge land in one of the work SVN repositories
12:03 moritz_ literal: no idea, ask mncharity :/
12:04 masak moritz_: I'm struggling with getting Parrot to build on timtowtdi.org right now.
12:04 masak (see #parrot)
12:04 masak I guess downgrading and rebuilding is not a viable option?
12:05 * [particle] rebuilds parrot
12:05 moritz_ masak: I thought about keeping a working build around, and trigger the regular build in a different location
12:06 masak moritz_: that's a great idea.
12:06 moritz_ masak: problem is, we can't just move it, because parrot hard-codes some pathes I think
12:06 masak aye.
12:07 moritz_ maybe we need parrot1 and parrot2 dirs, and a file that tells us which one to us
12:07 moritz_ s/us/use
12:08 masak sounds sufficient.
12:08 moritz_ maybe I'll find some tuits tonight
12:15 [particle] build broken on win32, also
12:22 SamB joined #perl6
12:37 pmurias joined #perl6
12:41 s1n pmichaud: don't forget, tonight at 7
12:47 mberends joined #perl6
13:11 mikehh build broken on win32 also - as in what else
13:12 [particle] as well as on linux
13:12 masak today is obviously Sad Parrot Day.
13:12 mikehh I built on linux ok am spectesting now
13:12 [particle] seems the build breaks on windows only sometimes, working again now at same revision
13:13 [particle] i'm building from fresh checkout on feather now
13:13 masak Polly Does Not Want A Cookie.
13:13 jnthn Try a cracker.
13:15 masak nope, didn't work.
13:15 mberends parrot likes hackers more than crackers
13:15 Matt-W try threatening to wring polly's neck
13:19 c9s_mv joined #perl6
13:21 mikehh rakudo spectest passes on parrot r36628 - smolder - http://smolder.plusthree.com/app/pu​blic_projects/report_details/17955
13:24 kane__ joined #perl6
13:39 drbean_ joined #perl6
13:54 aindilis` joined #perl6
13:55 literal moritz_: I'm using your ilbot and I get an error when trying to search, indicating that the db table doesn't support fulltext search. I've googled it a bit and tried to create the index but mysql keeps telling me "RROR 1214 (HY000): The used table type doesn't support FULLTEXT indexes"
13:57 literal ah, had to do "ALTER TABLE irclog ENGINE = MYISAM;" first
14:00 masak history question: which perl version was the first one where 'my @a' meant the same as 'my @a = ()' ?
14:01 Matt-W I thought it meant the same as "my @a = undef"
14:03 masak in current Perl 5, you get an empty list, no?
14:03 masak s/empty list/empty array/
14:04 icwiener joined #perl6
14:04 mberends perl5 -e'my @a; print scalar @a;' # prints 0
14:05 masak indeed.
14:05 [particle] >perl -E "say length (my @a)"
14:05 [particle] 1
14:05 masak hunh?
14:05 [particle] oops
14:06 Matt-W but if @a was undef, it'd come out as 0 when you tried to print it too
14:06 [particle] >perl -E "say length (undef)"
14:06 [particle] 0
14:08 Matt-W interesting
14:08 Matt-W it seems that if you assign () to @a, it comes up as undefined
14:08 Matt-W I didn't know that
14:08 Matt-W I thought () and undef were distinct
14:08 [particle] it's about context
14:08 literal "@a = undef" makes it consist of one element
14:09 [particle] () is undef in scalar context
14:09 Matt-W but if you're assigning to @a, surely it's a defined list which has nothing in it
14:09 literal "undef @a" is more like @a = ()
14:09 Matt-W maybe my understanding of lists in perl 5 has always been wrong
14:09 [particle] right @a = () should be list context
14:10 literal @a is true in all contexts after you do "@a = undef" since it has an element
14:10 lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
14:10 masak lambdabot: <3
14:10 masak but has it always been like that?
14:10 masak was there a time when you had to explicitly initialize @a?
14:10 * literal is too young to know
14:10 Matt-W I've only used perl since 5.005
14:11 Matt-W and you didn't have to then
14:11 [particle] meetoo
14:11 Matt-W it would be a very unperlish requirement
14:11 Matt-W at least as the modern principles of perl stand
14:11 Matt-W they may have been different :)
14:37 rindolf joined #perl6
14:38 skids joined #perl6
14:57 literal moritz_: another thing, non-ascii chars get mangled when the logs are viewed as plain text (e.g. see http://irclog.perlgeek.de/text.p​l?channel=perl6;date=2009-02-12)
14:57 literal changing the browser's character encoding setting doesn't elp
14:57 literal help*
15:10 hercynium joined #perl6
15:15 avar literal: try to change the use line for IrcLog::WWW to use IrcLog::WWW qw(my_encode my_decode); and add my_decode() around $row->{line} on line 53
15:17 avar in text.pl
15:19 literal ah
15:19 literal so it's not actually plain text, but html with a <pre>
15:20 avar that doesn't matter as far as the encoding problems are concerned
15:21 Exodist joined #perl6
15:22 literal that does indeed fix it
15:23 pugs_svn r25303 | avar++ | The raw text log had broken UTF-8: Needed to call my_decode() like the HTML one
15:23 avar literal: *5*
15:23 mberends moritz_, did you know that the text version of irclog.perlgeek is *bigger* than the html? Every text line is right padded with spaces to 305 characters!
15:23 literal *5²*
15:26 masak those spaces have been known to annoy me when I'm cut-n-pasting.
15:26 avar mberends: it looks like it's actually padded to whatever the longest line is
15:27 avar or maybe not?
15:27 literal even longer than the longest line, it seems
15:27 literal no, wait, it's the same as the longest one
15:27 mberends It's terribly inefficient, whatever the reason. We're not on punched cards any more.
15:28 avar It's something Text::Table is doing automatically
15:28 literal silly
15:28 mberends Text::Table--
15:31 avar If anyone actually knew how to use format() that could be used instead:)
15:34 avar http://cpansearch.perl.org/src/ANNO​/Text-Table-1.114/lib/Text/Table.pm
15:34 avar can't find how to disable it
15:35 mberends avar: could it be patched in ilbot?
15:37 avar oh sure, you could just do $text =~ s/ +$/gm;
15:37 avar it's just nicer to use the interface for text::table if it exists
15:40 lisppaste3 joined #perl6
15:43 avar that's some of the ugliest code I've ever had the misfortune to debug
15:47 ruoso joined #perl6
15:47 ruoso Hello!
15:48 avar It's like reading damian's code
15:49 mberends which code are you debugging now?
15:52 szabgab joined #perl6
15:52 avar Text::Table, finding out where it adds trailing spaces
15:53 mberends there is no Text::Table in Debian system afaict
15:55 mberends adding spaces makes sense for vertical column alignment, except for the last column
15:58 avar yes
15:59 mberends could you nopaste Text/Table.pm ?
15:59 literal mberends: http://search.cpan.org/src/ANNO/T​ext-Table-1.114/lib/Text/Table.pm
15:59 mberends ah, thanks. wearing Debian blinkers here...
16:02 pugs_svn r25304 | ruoso++ | [mildew] removing unecessary list copy...
16:03 pugs_svn r25305 | avar++ | Text::Table will add trailing whitespace to pad messages to the longest message. I (avar) wasn't able to find out how to make it stop doing that so I'm hacking around it with regex!
16:03 avar meanwhile, a HACK
16:04 mberends yes!
16:04 avar It's probably Text::Align whith Text::Table calls
16:04 avar but fuckit, this works for me:)
16:06 mberends I get your drift about the code. The POD looked all right though.
16:06 avar until you read the contents:)
16:08 avar the pugs svn has never been one to shy away from a dirty hack:)
16:09 [particle] $fuck_it->just_hack is perl culture, for better or worse
16:11 mberends Text::Table: "$tb->width returns the width (in characters) of the table.  All table lines have this length." It's specced, so if you *did* improve it, you'd break someone's app.
16:13 mberends s/improve/trim/ # remove subjective bias
16:13 avar This is why modules are bad, you always end up dealing with someone's crazy CPAN shit
16:13 avar Rewrite everything, in every program you write
16:14 mberends I wrote my own VGA driver once. It's a bit time consuming.
16:16 stephenlb joined #perl6
16:21 icwiener_ joined #perl6
16:23 moritz_ mberends: uhm, that seems to be an artifact of Text::Table...
16:27 mberends yes, it's a standard behaviour of that module, so if you don't like it, you would have to alter it externally, the way avar++ is doing now.
16:38 moritz_ or just s/[ \t]*$//gm;
16:38 literal which is what he did, I believe
16:40 * masak misses h in Perl 5
16:41 moritz_ it's in 5.10.0 I believe
16:41 moritz_ buubot: eval: "\t" ~~ /\v/
16:42 moritz_ ENOBUUBOT
16:42 masak moritz_: \v ? did you really mean that?
16:45 moritz_ masak: both
16:45 moritz_ masak: both \v and \h, I meant
16:45 masak yes, naturally.
16:45 masak but \t won't match \v, right?
16:45 moritz_ of course not
16:46 masak *phew*
16:46 masak though the thought of a vertical tab character is strangely intriguing.
16:47 aindilis` joined #perl6
16:49 avar mberends: I did s/ +$//gm
16:52 mberends avar++ # it looks nicer in the browser too
16:53 avar has the pugs one been updated?
16:53 avar ah, yes
16:53 moritz_ the plain text view was a failed attempt to bring the logs to fglock++'s mobile
16:54 pmurias joined #perl6
16:54 moritz_ and that device wanted to download stuff sent as text/plain, which is why I currently still serve text/html and pre tags
16:54 avar doing a rss/atom feed for it:)
16:54 moritz_ avar: now you're exaggerating
16:59 moritz_ rakudo: say "alive"
17:00 p6eval rakudo b2e7ac: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
17:04 pugs_svn r25306 | lwall++ | [S10] updates to package policies
17:06 justatheory joined #perl6
17:24 hanekomu joined #perl6
17:30 Khisanth joined #perl6
17:47 pugs_svn r25307 | pmurias++ | [mildew] partialy updated to work with the newest STD.pm
17:47 ruoso joined #perl6
17:48 ruoso TimToady, I'm now unsure about one thing in package loading
17:49 ruoso one the file starts with a package declaration, it does not belong to GLOBAL or main anymore
17:49 ruoso but considerint it is still "our"
17:49 ruoso it seems to imply it will belong to the package that required it
17:50 ruoso but does that mean that it should be private to that package? I mean... if someone changes a symbol in that package, does it affect other places where that module was loaded?
17:50 pugs_svn r25308 | lwall++ | some cleanup suggested by Jonathan "Dataweaver" Lang++
17:50 pugs_svn r25308 | lwall++ | detangling of metaoperators from metatokens
17:50 pugs_svn r25308 | lwall++ |     "metatokens" are composed of metaoperators plus ordinary operators
17:50 pugs_svn r25308 | lwall++ |     we shouldn't use "metaoperator" to refer to the generated operator
17:53 TimToady no, everything starts in GLOBAL
17:53 ruoso hmm... I'll re-read your last commit
17:53 TimToady will be glad to clarify if something is misleading
17:54 ruoso TimToady, "but may switch to some other package scope depending on the first package-ish declaration."
17:54 pmurias ruoso: hi
17:55 ruoso this seems to imply that "first package-ish declaration" is handled specially
17:55 ruoso hi pmurias
17:55 TimToady every package-ish declaration switch packages, so it's not special in that way
17:55 TimToady *switches
17:56 ruoso maybe that entire paragraph could be written as "Perl 6 code begins being parsed in GLOBAL."
17:56 TimToady the only thing special about the first one is that we allow the semicolon form, and if you use the semicolon form on "package" itself you're in Perl 5
17:56 ruoso TimToady, maybe just write it that way then ;) it's clearer than that text
17:57 pmurias ruoso: we need the .variants in Multi to be an Array of Array because there might be a few variants of equal priority
17:57 TimToady well, but p5's main in special too
17:57 ruoso pmurias, "equal priority"
17:57 ruoso ?
17:57 TimToady but that's because it's p5
17:57 ruoso and it's up to the p5 parser,
17:57 ruoso not the P6 parser
17:58 ruoso in SMOP, for instance, I would simply hand the file to the p5 parser directly
17:58 TimToady well, it remains to be seen whether P6 will include a P5 parser :/
17:58 TimToady already has the p5 regex parser
17:58 ruoso TimToady, I think that should be implementation specific
17:58 TimToady and I don't know how to handle "use v5;" otherwise
17:58 ruoso because I doubt SMOP would reimplement it
17:59 pmurias multi foo($a,Foo $b) {say 1};multi foo(Bar $a,$b) {say 2}
17:59 ruoso pmurias, the compiler should be able to sort that out in a plain array
17:59 TimToady you doubt SMOP would implement what?
18:00 pmurias ruoso: if you pass foo Foo,Bar you get an ambiguity error
18:00 jnthn pmurias: Arrya of arrays would do it, or in Rakuod we have one array with nulls separating the bits
18:00 ruoso TimToady, a p5 parser... most probably I'll have p5 alongside with SMOP and just delegate that code to it...
18:01 TimToady yes, well, we'll have to have a version of the p5 parser that can interleave with the p6 parser somehow, if we don't want two-pass parsing, which is evil
18:01 ruoso pmurias, you can get that as compile-time error
18:01 ruoso TimToady, I guess it shouldn't be hard to make an optional "if you think code has ended, call this"
18:01 ruoso TimToady, I'm already considering a modified p5
18:01 pmurias ruoso: that foo declaration was legal
18:02 ruoso pmurias, it's ambiguous at compile-time already
18:02 pmurias TimToady: is the foo declaration legal?
18:03 TimToady the linkage will be tricky, if you want the p5 parser to see all the context it wants to see
18:03 TimToady what foo declaration?
18:03 ruoso multi foo($a,Foo $b) {say 1};multi foo(Bar $a,$b) {say 2}
18:04 TimToady std:  multi foo($a,Foo $b) {say 1};multi foo(Bar $a,$b) {say 2}
18:04 p6eval std 25308: OUTPUT«############# PARSE FAILED #############␤Malformed "multi" definition␤Malformed routine definition␤Unable to parse multisig; couldn't find final ')' at /tmp/XbR5VuMhCY line 1:␤------> [32mmulti foo($a,[31mFoo $b) {say 1};multi foo(Bar $a,$b) {sa[0m␤    expecting any of:␤
18:04 p6eval ..param...
18:05 TimToady hmm
18:05 TimToady I'd've called it legal
18:05 ruoso I'm aware that it is syntatically legal, the question is wether that should raise a compile-time error about ambiguity...
18:06 TimToady if it is known that something must throw an exception at run time, the compiler is allowed to complain
18:06 ruoso "you should provide a :(Bar $a, Foo $b) variant to disambiguate"
18:06 TimToady that is official policy
18:06 pmurias TimToady: it *might* throw an exception
18:07 TimToady in which case you could warn, but it should compile
18:07 jnthn It's only ambiguous for a given set of args.
18:07 TimToady maybe that combination is known never to occur for other reasons
18:08 ruoso so the compiler could warn "choosing ambiguous variant :(Bar $a, $b) to have a higher priority in multi foo"
18:09 ruoso and we get a flat list of variants
18:09 ruoso but then we won't get an runtime exception
18:09 pmurias calling with a Bar,Foo should result in a ambiguous dispatch exception
18:09 jnthn Ugh, no.
18:09 jnthn pmurias: Right, agree.
18:10 TimToady I think warping the run-time semantics like that would be evil
18:10 ruoso I'm trying to get the list of variants to be completely resolved at compile-time
18:10 pmurias ruoso: we could do it either with an Array of Array or way jnthn suggest only with undef/false instead of a nasty NULL
18:10 TimToady however, if there's some indication that missing generics should be autogenerated, that'd be different
18:11 ruoso the compiler could then "generating :(Bar $a, Foo $b) variant as Ambiguous Dispatch Exception"
18:11 ruoso s/could/could generate a warn/
18:11 TimToady ruoso: it is complete resolved--you know at compile time that some of them fail
18:11 ruoso so the compiler can generate the list of failing candidates
18:12 TimToady to get Lisp-like semantics, we could have "use multi :bias<left>" or some such
18:13 pugs_svn r25309 | pmurias++ | [mildew] unbroke mildew a bit more
18:13 jnthn pmurias: NULL is just a C representation of undef ;-)
18:13 TimToady but I'd rather the standard language keep multis symmetrical
18:13 TimToady NULL is not C.  C really only knows about 0
18:13 TimToady :)
18:13 pmurias ruoso: we might have to generate quite a lot of variants in the worst case
18:13 jnthn No, no, that was BCPL :-P
18:14 * jnthn votes to leave multi-dispatch as it is specified, at least for Perl 6.0.0.
18:14 jnthn It's quite enough.
18:14 jnthn And we know it's implementable. :-)
18:14 ruoso ok ok ok...
18:15 moritz_ jnthn: we know it's implementable without lazy lists. With lazyness we can't be sure yet :/
18:16 jnthn I don't see how lazy lists come into it?
18:16 ruoso I was actually just trying to make the multi dispatch as static as possible
18:16 moritz_ jnthn: you might have to dispatch not-yet-evaluated argument lists as lazy as possible
18:16 ruoso since almost everything is a multi in Perl 6
18:17 pmurias ruoso: most of the multiness should be optimised out
18:18 ruoso pmurias, so do you plan to have an AoA, and when find a viable candidate, check if this sub-section has another valid candidate, is it?
18:18 ruoso and in that case, it's an ambiguous dispatch
18:19 ruoso I think that might be static enough
18:19 literal http://www.lostechies.com/cfs-filesystem​file.ashx/__key/CommunityServer.Blogs.Co​mponents.WeblogFiles/derickbailey/Liskov​SubtitutionPrinciple_5F00_52BB5162.jpg
18:20 pmurias ruoso: yes
18:22 pmurias ruoso: and i'm thinking of using a c-style-for like loop instead of a destructive list iteration with .shift
18:22 ruoso does a c-style-for have the same semantics as the regular for?
18:23 pmurias for (int i=0;i<10;i++) {...}
18:23 pugs_svn r25310 | lwall++ | failure of parallelism in headings
18:23 pmurias loop (my $i=0;$i<@foo.elems;$i++) {...} in perl6
18:24 literal why not for (0..@foo.end) { } ?
18:25 pmurias infix:<..> is a multi
18:25 pmurias when implementing Multi we need to use lowlevel stuff
18:25 ruoso and for (...) has lazy semantics
18:25 literal I see
18:26 ruoso pmurias, oh... I wasn't aware of that... that should be absolutely fine
18:26 pugs_svn r25311 | lwall++ | [t] smartlink unbreakage
18:28 pmurias it would be loop (my $i=0;$i.infix:<< < >>(10);$i = $i.infix:<+>(1)) {...} actually
18:29 ruoso ugly, but not incorrect
18:29 aindilis joined #perl6
18:31 TimToady loop (my $i = 0; CORE::infix:«<»($i,10); $i = CORE::infix:<+>($i)) maybe
18:32 pmurias TimToady: int's don't have an .infix:<+> method?
18:33 moritz_ infix ops are subs
18:33 TimToady the method syntax would simply be translated to the sub call
18:33 TimToady you might want an explicit sig to select a particular multivar
18:34 Psyche^ joined #perl6
18:34 pmurias TimToady: how should selecting a particular multivar look like?
18:35 TimToady loop (my $i = 0; &CORE::infix:«<»:(Int,Int).($i,10); $i = &CORE::infix:<+>:(Int).($i)) maybe
18:35 legis joined #perl6
18:36 TimToady and, of course, for those you might just make handy aliases
18:36 TimToady loop (my $i = 0; intlt($i,10); $i = intinc($i)) or whatever
18:37 TimToady hmm, missing an arg in the previous infix:<+>...
18:39 ruoso TimToady, I was assuming infix:«<»(int, int) was defined as a multi method with is export
18:39 ruoso not as a plain sub
18:40 jan_ joined #perl6
18:41 schmalbe joined #perl6
18:42 TimToady well, an only sub is fundamentally faster to call than a method
18:42 ruoso not on SMOP ;)
18:44 ruoso is"&infix:«<»:(Int,Int)" the actual name of the variable in the
18:44 ruoso s/in the/
18:45 Casan joined #perl6
18:45 ruoso meaning... does declaring a multi variant always additionally declares this longer name "as string"?
18:46 * ruoso coffee&
18:47 ruoso std: multi foo(Int $i) {...}; foo:(Int).(1);
18:47 p6eval std 25311: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/4RLUlqlXoq line 1:␤------> [32mmulti foo(Int $i) {...}; foo:(Int)[31m.(1);[0m␤    expecting any of:␤  infix or meta-infix␤      infix stopper␤    standard stopper␤ statement modifier loop␤
18:47 p6eval ..terminator␤     w...
18:47 ruoso hmm... I guess this form requires the &
18:47 ruoso std: multi foo(Int $i) {...}; &foo:(Int).(1);
18:48 TimToady don't know why that would work any better :)
18:48 p6eval std 25311: OUTPUT«ok 00:03 45m␤»
18:48 TimToady I guess I don't know everything :)
18:49 ruoso std: multi foo(Int $i) {...}; foo:(Int)(1);
18:49 p6eval std 25311: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/xOCfcXJ8ug line 1:␤------> [32mmulti foo(Int $i) {...}; foo:(Int)[31m(1);[0m␤    expecting any of:␤   infix or meta-infix␤      infix stopper␤    standard stopper␤ statement modifier loop␤
18:49 p6eval ..terminator␤     wh...
18:49 diakopter not yet, anyway
18:49 TimToady std: multi foo(Int $i) {...}; &foo:(Int)(1);
18:49 p6eval std 25311: OUTPUT«ok 00:03 45m␤»
18:49 TimToady yeah, I think the :() sig modifier is only defined on &
18:49 ruoso is that expected?
18:50 TimToady it's modifying a routine name as a noun
18:50 ruoso I mean... is it expected for it to have it defined only in &
18:50 TimToady when the parser sees bare foo, it's already thinking of it more as a verb
18:50 ruoso oh right
18:50 ruoso makes sense
18:50 ruoso anyway...
18:51 ruoso is SomePackace:<&foo:(Int)> valid?
18:51 ruoso sorry
18:51 ruoso SomePackace::<&foo:(Int)>
18:51 ruoso meaning... id '&foo:(Int)' the string name of the variable containing the multi variant?
18:52 TimToady gotta have some name for the individual variant, so probably
18:52 TimToady otherwise it'd be a run-time operator
18:52 TimToady and that would really like to be static, I think
18:52 ruoso cool... that's an important bootstrapping mechanism
18:53 TimToady and a poor man's &foo just greps out the keys with the appropriate prefix
18:54 TimToady though there needs to be a <&foo> as a key too
18:54 ruoso sure, that is the Multi
18:54 TimToady well, something more to do to STD...
18:55 ruoso but while defining Multi, it's important to be able call an individual variant
18:55 TimToady ETOOMUCHCOFFEE &
18:55 ruoso so we can have '&infix:<+>:(int,int)' defined at very low level
18:55 araujo haha
18:56 araujo ETOOMUCHTEA &
18:56 ruoso and we can use them where we know we have ints
18:56 * ruoso coffee for real &
19:01 mikehh joined #perl6
19:06 pmurias ruoso: is t/return_function.t failing expected?
19:10 moritz_ rakudo: say 'alive?'
19:11 p6eval rakudo b2e7ac: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
19:11 moritz_ at least parrot built...
19:13 moritz_ rakudo: 1
19:13 p6eval rakudo b2e7ac: RESULT«1»
19:14 TimToady ruoso: an implementation can define &::('@#$!^%!#$%') if it wants to, so I don't see any problem with your (int,int) form living in the symbol table
19:14 TimToady the question of whether all implementations should do it that way is another matter
19:40 * araujo intimidated by that definition
19:40 pugs_svn r25312 | pmurias++ | [mildew] more fixes to work with HEAD STD.pm
19:46 rodi joined #perl6
20:17 zostay joined #perl6
20:41 bacek perl6: class List is also { method a {}; }; <a b c>.a;
20:42 p6eval pugs: No output (you need to produce output to STDOUT)
20:42 p6eval ..rakudo b2e7ac: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
20:42 p6eval ..elf 25312: RESULT«undef␤»
20:42 bacek perl6: class List is also { method a { say "HI" }; }; <a b c>.a;
20:42 p6eval pugs: No output (you need to produce output to STDOUT)
20:42 p6eval ..elf 25312: OUTPUT«HI␤»
20:42 p6eval ..rakudo b2e7ac: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
20:44 bacek rakudo: class List is also { method a { say "HI" }; }; <a b c>.a;
20:44 p6eval rakudo b2e7ac: OUTPUT«HI␤»
20:45 * moritz_ is amazed that elf does monkeypatching
21:05 DemoPhreak joined #perl6
21:10 rodi +
21:16 ruoso @tell pmurias return_function.t was supposed to be working...
21:16 lambdabot Consider it noted.
21:33 [particle]1 joined #perl6
21:33 ludan joined #perl6
21:34 wilx joined #perl6
21:38 mj41_ joined #perl6
21:48 pmichaud s1n: tonight at 7, see you there.
21:52 Whiteknight joined #perl6
22:05 ft joined #perl6
22:19 frobnitz joined #perl6
22:22 legis left #perl6
22:32 pugs_svn r25313 | moritz++ | [evalbot] change some paths
22:34 p6eval joined #perl6
22:35 moritz_ rakudo: say 'test'
22:35 p6eval rakudo b2e7ac: OUTPUT«test␤»
22:35 moritz_ @tell masak I've changed the evalbot setup a bit; parrot and rakudo are built in ~/parrot and is rsync'ed to ~/built-parrot if successful
22:35 lambdabot Consider it noted.
22:46 jnthn moritz_++
22:48 aindilis` joined #perl6
22:52 ejs1 joined #perl6
22:55 hanekomu_ joined #perl6
23:20 cognominal joined #perl6
23:21 idemal joined #perl6
23:25 Limbic_Region joined #perl6
23:30 mberends joined #perl6
23:46 Tene joined #perl6

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

Perl 6 | Reference Documentation | Rakudo