Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-10-16

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:00 __ash__ well, i gotta go, i'll put my slides up about Perl 6 on something visible to the public when i am done with them, thanks for the help guys
00:02 quietfanatic so, is there a way to access memory locations by number in Perl 6 or Parrot?
00:03 quietfanatic This ability will make writing Link::C a lot easier.
00:17 kst joined #perl6
00:23 Chillance joined #perl6
00:29 rgrau joined #perl6
00:30 quietfanatic Never mind, if I want behavior, I can write it in C and link to it. :)
00:32 quietfanatic It's as easy as Link::C::link <libc.so.6 stdlib.h>;
00:35 quietfanatic (plus a little bit of trickery)
00:47 rhr joined #perl6
00:51 lumi joined #perl6
00:52 eternaleye joined #perl6
00:58 lichtkind joined #perl6
01:17 kst joined #perl6
01:26 KyleHa joined #perl6
01:36 orafu joined #perl6
01:39 agentzh joined #perl6
01:44 KyleHa joined #perl6
01:44 lumi joined #perl6
01:53 rhr joined #perl6
01:53 JimmyZ joined #perl6
02:04 envi^office joined #perl6
02:09 dukelet0 how does a lowly mage such as I convert foo.nqp into foo.pbc ?
02:10 lumi joined #perl6
02:15 lumi joined #perl6
02:22 rhr_ joined #perl6
02:25 tak11 joined #perl6
02:35 petdance joined #perl6
02:41 kst joined #perl6
03:09 am0c joined #perl6
03:18 dukelet0 a magic unicorn (also known as japhb) answered my question
03:22 xenoterracide joined #perl6
03:24 sparc joined #perl6
03:24 kst joined #perl6
03:28 lumi joined #perl6
03:39 Bzek joined #perl6
03:53 tak11 joined #perl6
03:55 tak11 joined #perl6
04:25 mikehh joined #perl6
04:39 Confield left #perl6
04:50 kst joined #perl6
05:24 pugs_svn r28800 | lwall++ | [type-based.t] supply missing Stone class, remove spurious semicolons
05:27 charsbar joined #perl6
05:30 zloyrusskiy joined #perl6
05:37 desertm4x joined #perl6
05:37 envi^home joined #perl6
05:47 kst joined #perl6
05:47 nbrown joined #perl6
05:51 quietfanatic joined #perl6
06:19 moritz_ \o/
06:23 justatheory joined #perl6
06:29 Su-Shee joined #perl6
06:29 Su-Shee good morning.
06:29 ShaneC1 joined #perl6
06:30 nbrown joined #perl6
06:33 moritz_ oh hai
06:34 flip214 joined #perl6
06:34 flip214 rakudo: say "r\rf\fg\gx"
06:34 p6eval rakudo d5a2ee: OUTPUT«r
06:36 flip214 rakudo: say "\rhello world\n"
06:36 p6eval rakudo d5a2ee: OUTPUT«
06:37 meppl joined #perl6
06:37 flip214 rakudo: say "\x0bHello"
06:37 p6eval rakudo d5a2ee: OUTPUT«Hello␤»
06:38 flip214 rakudo: say "\014Hello"
06:38 p6eval rakudo d5a2ee: OUTPUT«\123 form deprecated, use \o123 instead at line 2, near "\\014Hello\""␤in Main (file <unknown>, line <unknown>)␤»
06:38 flip214 rakudo: say "\o014Hello"
06:38 p6eval rakudo d5a2ee: OUTPUT«Hello␤»
06:39 flip214 hmmm ... IRC doesn't take readline's "kill-line"
06:39 flip214 rakudo: say "\r\nHello"
06:39 p6eval rakudo d5a2ee: OUTPUT«
06:39 kst joined #perl6
06:50 iblechbot joined #perl6
07:08 ihrd joined #perl6
07:09 ihrd left #perl6
07:11 mariuz joined #perl6
07:24 donaldh joined #perl6
07:25 _jaldhar joined #perl6
07:50 masak joined #perl6
07:52 masak morning, seekers of Perl 6!
07:52 kst joined #perl6
07:54 mariuz joined #perl6
07:55 mariuz joined #perl6
07:56 mikehh_ joined #perl6
07:57 mariuz joined #perl6
07:57 masak moritz_++ # http://perlgeek.de/blog-en/perl-6/an-entry-point-for-newcomers.html
07:59 lumi joined #perl6
08:01 Su-Shee masak: haven't we all found perl 6 already? :)
08:02 masak Su-Shee: that's a very deep question. :)
08:02 masak what does it mean to "find" Perl 6?
08:02 mathw If I achieve Perl enlightenment today, it's only because I'm too tired to realise it's an illusion
08:03 masak Perl 6 is already here, it's just unevenly distributed.
08:03 masak another day of Rakudo not building locally... I should really do something about that.
08:03 mathw yes
08:03 mathw yes you should
08:04 * mathw needs sleep
08:05 masak for the first time in ages, I actually slept well, and on a resonable set of hours, tonight.
08:05 masak I'm still tired, but in a warm, happy sort of way.
08:05 masak and this was after a 90 minute swimming session, and a quite successful debugging session with Rakudo. :)
08:09 mathw nice
08:09 mathw I'm not sleeping at all well at the moment
08:09 mathw Too worried
08:10 masak hugme: hug mathw
08:10 * hugme hugs mathw
08:17 mathw After Wednesday it'll all be over
08:19 masak it?
08:20 mathw My office has a band. I'm in it. We're doing a gig on Wednesday. I just want to close my eyes and have it all be done when I open them again
08:21 mathw It's getting really stressful, people worried about songs, personality clashes, my voice seems to be misbehaving worse every time I rehearse mine...
08:21 mathw Although I'm told I still sound the same, it doesn't *feel* the same, it's like hanging onto something by your fingernails
08:22 masak sounds less than ideal.
08:22 masak the situation, I mean.
08:24 mathw yes
08:24 mathw the band's got too many people in it
08:25 mathw I don't know if you have an equivalent proverb in Sweden to 'Too many cooks spoil the broth' but it's true...
08:25 mathw too many singers/guitarists/bass players spoil the band
08:25 mathw I want to be in a proper band
08:25 mathw really need to make more of an effort with that
08:26 mathw but it's not something you can just conjure up
08:26 moritz_ "Zu viele Köche verderben den Brei" ;-)
08:26 Su-Shee mathw: well in german cooks spoil the mash ;)
08:26 Su-Shee moritz_: :)
08:27 mathw But at the moment if I can get to Wednesday night without screaming at anybody I'll be doing very well
08:27 masak "För många kockar förstör soppan."
08:28 Su-Shee masak: soup?
08:28 moritz_ broth, mash and soup - nice
08:29 mathw the mash is the odd one out there really
08:29 mathw but you could probably use the mash to make some sort of dumpling and cook it in the broth
08:29 NorwayGeek joined #perl6
08:29 masak Su-Shee: aye, soup.
08:30 masak we don't really have broth in our collection of archetypical meals in Sweden.
08:30 masak I mean, I know what it is, but...
08:30 mathw It's more of an ingredient
08:30 masak something like that.
08:30 mathw But it's fundamental to a lot of good cookery
08:30 mathw So if you spoil it...
08:30 masak oh, yes.
08:30 mathw And sometimes 'broth' is the name for a particular kind of soup
08:32 Su-Shee well broth is broth and soup is just sometimes made with broth.
08:32 mathw yes
08:32 * mathw tries to figure out why a subprocess appears to be able to kill the perl interpreter which spawned it
08:33 mathw have to think in perl 5 again now :(
08:34 moritz_ $SIG{CHLD} = sub { dump }; # nice and easy
08:36 mathw IT doesn't help that one of my colleagues has tried to improve the structure of the script in question
08:36 mathw and has in the process made a confusing mess
08:36 mathw I think I'll deal with that first
08:44 NorwayGeek_ joined #perl6
08:44 dakkar joined #perl6
08:45 NorwayGeek_ joined #perl6
08:45 masak ahem.
08:46 masak may I present a new coding pattern.
08:46 masak I fittingly call it "The Ultimate Security Vulnerability"
08:46 masak rakudo: class A { has $.env is rw; method run($code) { $!env($code); } }; my A $a .= new; my $x = 42; $a.env = { eval($^code) }; $a.run('$x = 5'); $a.run('say $x')
08:46 p6eval rakudo d5a2ee: OUTPUT«5␤»
08:47 masak it's a way of making one environment say to another: "here, you can run any code you want in me".
08:47 moritz_ excuse me?
08:48 * moritz_ tries to wrap his head... and fails
08:48 * mathw sees nothing special
08:48 masak hm, the example above might not be 100% clear in showing that...
08:48 mathw you're just running a closure with eval in it
08:48 mathw which is of course dangerous
08:48 masak mathw: the important part is that the two statements in a string are executed within the class A.
08:49 masak but using the environment containing $x.
08:50 masak we're essentially making $x visible to the class A.
08:50 moritz_ so you work around the out-lexicals-not-visible bug?
08:51 masak hm, that wasn't my goal, but I guess it could be used for that.
08:51 rfordinal joined #perl6
08:53 masak rakudo: class A { has $.env is rw; method run($code) { $!env($code); }; method foo() { .run('say $x; $x = 5; say $x') } }; my A $a .= new; my $x = 42; $a.env = { eval($^code) }; $a.foo
08:53 p6eval rakudo d5a2ee: OUTPUT«Method 'run' not found for invocant of class 'Failure'␤in Main (file src/gen_setting.pm, line 206)␤»
08:53 masak rakudo: class A { has $.env is rw; method run($code) { $!env($code); }; method foo() { self.run('say $x; $x = 5; say $x') } }; my A $a .= new; my $x = 42; $a.env = { eval($^code) }; $a.foo
08:53 p6eval rakudo d5a2ee: OUTPUT«42␤5␤»
09:02 sjohnson morning!
09:02 sjohnson how's it going masak
09:02 masak sjohnson: morning! the goings are fine, as far as I can see.
09:02 masak sjohnson: how about you?
09:02 sjohnson well, hopefully i don't get in trouble for this
09:03 sjohnson but i lol'd a few times at some good internet meme parody's of the whole "balloon boy" thing yesterday
09:03 masak I am unfamiliar with that meme.
09:03 sjohnson it was the only frontpage news of cnn last night
09:04 sjohnson basically a kid was thought to have been in an airballoon floating 7000ft in the air
09:04 sjohnson for a few hours
09:04 sjohnson then found out to be that he wasn't in it
09:04 mathw It's a total hoax
09:04 sjohnson which result in panic that he jumped off
09:04 mathw Very irritating
09:04 sjohnson then they found him having taken a nap
09:04 sjohnson mathw: plz2explain
09:05 mathw Almost as irritating as my colleagues altering my script but leaving the comments all out of date
09:05 mathw And filling it with spelling mistakes
09:05 sjohnson ... was it really that bad?
09:05 mathw sjohnson: friend of mine has been reading sources who reckon it's a hoax. I've not looked into the details because I think it's quite boring, but apparently there's no way the thing had enough lift to pick a boy up
09:05 sjohnson that is definitely true
09:06 sjohnson a lot of plausible hoax facts are going around
09:06 sjohnson my belief is that the story caught fire, ppl didn't question the facts, cnn had coverage, and exploited it
09:06 sjohnson not so much a hoax, just that people will "tune in" to something interesting
09:07 sjohnson and see what the developments are, ignoring thoughts like "could it even happen?"
09:08 mathw I guess so
09:08 mathw In the mean time, they alter scripts in clumsy ways and don't update the comments
09:08 mathw The indentation isn't even consistent anymore!
09:08 sjohnson there might be great justice though
09:08 mathw It's like there's a conspiracy to make my Perl look bad and undermine all my advocacy
09:09 sjohnson the parents were probably stressed out enough with the media
09:09 sjohnson then their kid falcon hints with obscrubed that it might have been scripted
09:09 sjohnson sorry, obscured english
09:09 sjohnson either the kid wins the troll award for 2009 for trolling the entire world
09:10 sjohnson or the kid wins the failblog award for 2009 for saying that the dad said it was part of an act
09:11 mathw And lots of journalists get in trouble for wasting time on a non-story
09:11 mathw I like that thought
09:11 moritz_ mathw: never ascribe to malice what you can ascribe to incompetence (re: your perl advocacy)
09:12 masak moritz_: any sufficiently advanced incompetence is indistinguishable from malice. just sayin'.
09:12 mathw moritz_: true
09:12 mathw One of my colleagues even hast aht on his desk
09:12 moritz_ masak: :-)
09:12 mathw He has not had any involvement in this abomination though
09:13 masak that's an excellent idea. I'll make a little note and put that by my desk, too!
09:13 jnthn oh morning
09:13 mathw oh hai jnthn
09:14 masak jnthn!
09:14 moritz_ \o/
09:15 masak I'm still giddy with joy over jnthn being back from vacation. :)
09:17 jnthn :-P
09:17 mathw It is quite exciting isn't it
09:17 mathw Especially when the first thing he starts doing is the signature work
09:17 jnthn But...all I've done is made a branch that fails 10% of the test suites. :-P
09:17 moritz_ now we just have to make him fix RT #69798 with the new binder
09:18 * jnthn wonders which bug that one is
09:19 * mathw wishes his terminal could detect RT tickets and autolink them
09:19 moritz_ rakudo: multi sub a($, $) { 1 }; multi sub a(::T $, T $) { 2 }; say a([], {})
09:19 p6eval rakudo d5a2ee: OUTPUT«2␤»
09:19 moritz_ not quite
09:19 moritz_ mathw: make http://irclog.perlgeek.de/perl6/today your terminal :-)
09:19 mathw that's not quite as convenient
09:20 jnthn Just saw the ticket.
09:20 jnthn Not got a clue how on earth that is so messed up.
09:20 mathw it is pretty though
09:20 jnthn Not sure I want to find out either...
09:20 jnthn But I rather doubt the new binder will have that bug. :-)
09:21 moritz_ jnthn: maybe it tries to bind both arguments to the same lexical with name '$'
09:21 moritz_ or something like that :-)
09:21 jnthn moritz_: Oh
09:21 jnthn That'd make sense.
09:21 jnthn And be very silly too.
09:22 masak it's almost worse that it does it for e.g. two vars both named $a
09:22 jnthn Oh actually, really explains it.
09:22 jnthn It's doing that because today we bind into the lexpad and then type check, or something like that.
09:22 jnthn The new binder type checks without caring about what the name of the parameter is.
09:22 * sjohnson wishes the child in the balloon had pErl Vi spraypainted on it
09:23 jnthn sjohnson: Heh. I love how the media were like "lol awesome potential disaster let's give it prime time"
09:23 jnthn And then got owned.
09:24 sjohnson jnthn: they are probably discussing amonst themselves what "trolled" means, after many internet posts to their sites
09:24 jnthn haha
09:24 sjohnson and started reading about humanoids living under bridges
09:24 sjohnson with no answers
09:25 sjohnson this kid might actually win the world internet award for trolling Earth
09:25 sjohnson can't think of anyone that can beat him yet
09:26 moritz_ speaking of television and new media... one very popular (and usually quite good) germam TV station made a very embarresing mistake recently: they swapped "phishing" and "fisting"
09:26 jnthn :D
09:26 moritz_ "tens of thousands are victims of fisting attacs" or so
09:26 jnthn :D
09:26 jnthn lol!
09:28 Su-Shee moritz_: *haha* seriously? who? :)
09:28 moritz_ Su-Shee: tagesschau.de
09:28 moritz_ or was it ZDF? not sure...
09:28 sjohnson moritz_: http://www.youtube.com/watch?v=QMmG9TrYyAE  <--- weirdest german thing i saw today
09:29 moritz_ http://www.heute.de/ZDFheute/inhalt/31/0,3672,7910783,00.html
09:30 am0c joined #perl6
09:30 moritz_ ok, ZDF it was
09:30 jnthn lol
09:31 * jnthn is amused
09:31 * Su-Shee is highly amused :)
09:31 masak ...ouch...
09:35 lumi joined #perl6
09:37 * sjohnson passes a "thank you" chocolate to Su-Shee
09:37 sjohnson with orange flavouring
09:39 sjohnson (´ー` )
09:45 eMaX joined #perl6
09:47 sjohnson alright dudes
09:47 sjohnson my twin bro programs in C, hates perl5, likes ruby because of perl5 limitations
09:47 sjohnson and he is now at the short window of curiosity of why perl6 might kick ruby's ass
09:48 sjohnson not so start a flame war, but i've been trying to persuade him that perl 6 will "make him shit bricks"
09:48 sjohnson and he asked for like some sort of changelog-like text that might convince him
09:48 sjohnson ... plz2convert brother
09:49 sjohnson *meanwhile... brother has found http://perlcabal.org/syn/Differences.html*
09:50 Su-Shee why would you want convince him? either the perl 6 features speak to him or they don't...
09:50 masak sjohnson: people are free to like any language they choose. even PHP. :) Perl, or Perl 6 for that matter, isn't for everyone. that said, it does rock, and that can sometimes be explained to people.
09:50 Su-Shee (and what p5 limitions compared to ruby? speed? ;)
09:50 sjohnson Su-Shee: he is my brother
09:50 sjohnson not just some internet guy i'm trying to persuade
09:51 sjohnson his biggest gripe was the %${} type stuff with regards to trying to get data from a very complex hash
09:51 sjohnson and i know he saught ruby as the answer
09:52 sjohnson Su-Shee: my biggest gripe against p5 vs ruby
09:52 sjohnson is a built-in whitespace trimmer
09:52 sjohnson im sure anyone here knows how adamant i am about this, so i won't go on unless you ask
09:52 sjohnson he also hates it
09:52 sjohnson that makes 3 ppl who are on my perl5 crucade .... *depression dog face*
09:53 Su-Shee I don't see how to compare Ruby with Perl6. Ruby is a this-generation programming language. Perl 6 is the next, IMHO
09:54 sjohnson thats what i am saying
09:54 sjohnson just that he doesn't realize that perl 6 is going to be a big deal in his life
09:54 sjohnson and has switched to thinking Ruby is the best scripting language
09:54 sjohnson for good reasons, i might add
09:55 Su-Shee well as long there's litereally nothing of an environment to use with Perl 6, I wouldn't bother to convince him. it's not only the language itself, it's the tools and modules surrounding it.
09:55 sjohnson this constant ignorance of a whitespace trimmer in perl > 5 is a constant reminder of why people prefer python and ruby
09:56 Su-Shee which is something I found so unbelievable unimportant.. :))
09:56 sjohnson that's only because you have not had to use it as often as i do
09:56 sjohnson yet every other programming language supports it
09:56 Su-Shee probably. anyway. I don't like ruby or python, so I need no convincing of any kind. :)
09:56 masak .oO( talking at cross purposes detected )
09:57 sjohnson im just sick and tired of ppl telling em it's not "imporant"
09:57 sjohnson it would be better if they said "i don't use it. no comment"
09:57 Su-Shee sjohnson: which is what I said. I said "I found it" and not "it is."
09:57 sjohnson "unbelievable unimportant"
09:58 masak sjohnson: I think p5p-type people would be very wary of introducing new core functions, because they might clash with those in existing programs.
09:58 masak sjohnson: I mean, they use special flags to enable 'say'.
09:58 Su-Shee yes. properly declared as my personal opinion and not a fact. ;)
09:59 masak sjohnson: I believe Su-Shee was referring to a module environment, not to 'trim'.
09:59 sjohnson masak: i agree, it is not as simple as i hope it to be, but i am fighting for a chance that perl 5 might implement this in the hopes that it is considered "no time like the present"
09:59 masak sjohnson: good luck.
10:00 sjohnson masak: it is an uphill battle
10:00 sjohnson as i'm sure you know
10:00 masak it's very easy to imagine, yes.
10:00 masak don't let Perl 5 grind you down in the process. we need you jere.
10:00 masak s/jere/here/
10:00 sjohnson the only reason i came here
10:00 sjohnson was because perl 6 had a trim() method
10:00 sjohnson on the string stuff
10:01 sjohnson which in my opinion, was like God showing himself finally to me, with respect to a programming language
10:01 masak you really do find trim pretty important, do you?
10:01 sjohnson i even considered swithcing to python / ruby for my scripting needs, but perl is jsut too good, it is impossible to leave
10:01 masak it's not a binary choice.
10:01 sjohnson it's like trying to leave a wife that you always loved, and the hate was superficial and temporary
10:02 sjohnson but this lack of a simple whitespace trimmer in the core disturbs me to no end
10:02 sjohnson the only reason i gripe about it, is because p5 will be around for a while, prior to the p6 transition
10:03 sjohnson even PHP, which i consider a mickey mouse language, has the trim function
10:03 sjohnson python has it, even java has it
10:03 sjohnson yet ppl insist on declaring their own functions to achieve this universal result, or relying on downloading cpan packages
10:04 sjohnson i dont blame cpan, but this becomes a huge problem when you migrate systems
10:04 sjohnson and all of a sudden, in an emergency, you get an @INC error
10:04 sjohnson for something so simple
10:04 sjohnson that any other language has
10:04 sjohnson .. even p6 has it.  if the ppl that say "just write a sub { l33t regex } for it"...
10:05 sjohnson should those people not say that that the perl6 team should then remove this string mehtod
10:05 sjohnson becuase you can simple write a regex for it?
10:06 sjohnson i think perl is leaps and bounds beyond any other scripting languages, yet for some reason, something so simple to be implemented until perl6, with people telling me to write their own methods or rely on 3rd party code for something so simple
10:06 jferrero joined #perl6
10:06 sjohnson is like trying to tell someone in this year, to use a stone with a coathanger attached to it, to a modern cellphone
10:07 sjohnson because it encourages some sort of purist attitude
10:08 sjohnson this is like a tick my bed, constantly annoying me while i try to sleep, with someone saying "just use this remedy and follow these steps.." instead of them just removing the tick in the first place
10:08 sjohnson works for one bed, then i switch beds by life's randomness
10:08 sjohnson and the tick comes back
10:08 sjohnson and i keep having to apply the same remedy
10:09 mathw hugme: hug sjohnson
10:09 * hugme hugs sjohnson and blushes
10:09 sjohnson instead of @INC errors, it's having to remember to use a macro in my vi editor to always "be sure to include that trim function" in any little tiny script i write
10:10 mathw Which is odd, because I almost never need such a function
10:10 sjohnson mathw: i have logs saying you thought this was annoying
10:10 mathw But I agree that it should be part of the core library in any language with a wish for effective string handling
10:10 mathw because when I do need it, it's irksome
10:11 sjohnson hugme: hug mathw
10:11 * hugme hugs mathw
10:12 sjohnson mathw: i am going to carry that quote you just said, to my grave
10:12 mathw and there's now the 'use feature' provision in perl 5
10:12 mathw so it's not like there isn't precedent for adding new core functions
10:12 sjohnson perl is considered the master language of text handling, yet it doesn't have a whitespace trimmer
10:12 sjohnson it almost sounds like i should hit the canned laughter button
10:13 sjohnson http://members.shaw.ca/smujohnson/snd/garlaff.mp3
10:13 mathw Just remember
10:13 mathw The same people advocating notincluding trim in perl 5 are not the people who put trim in Perl 6...
10:13 mathw (probably)
10:13 sjohnson yes i realize that
10:13 sjohnson yet you are the only one that has EVER agreed with me on this point, at least slightly
10:14 sjohnson in my life on this planet Earth
10:14 sjohnson i get laughed at, teased, etc etc
10:14 sjohnson argued against
10:14 mathw I seem to be in this position a lot lately
10:15 sjohnson :)
10:16 sjohnson the position of defending the underdog, or defending yourself as the underdog?
10:17 sjohnson my message to people who never have to use trim:  butt out, please.  i have an uphill battle on my hands and i dont need more people to go against me who never need to trim whitespace off strings
10:17 masak One Man. One Battle. One Core Function.
10:17 mathw The position of having someone say to me you're the only person who seems to get it
10:18 sjohnson you told me yourself that you thought this was annoying
10:18 sjohnson like, a month ago
10:19 sjohnson masak: :)
10:19 mathw yes I believe I did
10:19 petdance joined #perl6
10:19 mathw trim(): The Movie?
10:20 sjohnson i have talked to a few agents, and they are intersted in the idea
10:20 sjohnson to jump on the "technology" bandwagon
10:21 sjohnson heres the deal.  the only programming language that is still somewhat used, that doesn't have this, is javascript
10:21 sjohnson i can't believe that i am alone in this
10:21 sjohnson python programmers use this one example as an argument to use python instead
10:21 mathw If Perl 5 strings were object-oriented it would probably be a lot easier
10:21 mathw Because adding a method is no problem compared to adding a core function
10:21 mathw but... use feature
10:21 sjohnson something HAS to be easier than having to bust out raw regex to do it
10:21 mathw anyway, I can't debate it, I can just agree with you, because I'm not a Perl 5 Porter
10:22 sjohnson and less of a pain in the butt
10:22 sjohnson well i have discussed the matter at length in p5p
10:22 sjohnson i was only arguing because ppl seemed to disagree
10:22 sjohnson and i felt i had to state my case
10:22 sjohnson unfortunately, someone has asked me to provide 1) a good case and 2) the patch code
10:23 sjohnson unfortunately, i wasn't born with a manual that explains how to provide patches to perl 5 devel
10:23 sjohnson i'm kinda worried
10:25 sjohnson i have no fucking clue what i am doing
10:25 sjohnson but would fight to death to get this included in p5, for the beautiful transition to perl6
10:27 masak sjohnson: I'd say learning how to provide a p5p patch should be pretty high on your agenda right now.
10:28 sjohnson i believe i could focus on perl 6 fully if i could tie up this one loose end
10:28 sjohnson plz2give me hintz
10:28 mathw I have no clue. I looked at the Perl 5 source code once and it took me a few weeks to recover
10:30 sjohnson i feel like tom cruise in jerry mcguire
10:41 avar So you just want to add trim() to p5 core?
10:41 avar is there a perl5-porters thread on this subject?
10:42 sjohnson avar: there is, yes.  are you wondering why i didnt just go there?  i am just debating
10:43 avar I just want to read it
10:43 avar What prototype would trim() have?
10:43 avar would it work in-place like chomp()?
10:43 avar could you do trim(@list) ?
10:45 sjohnson just as far as $var = trim($happy);
10:45 sjohnson or trim($happy);
10:46 sjohnson there is a cpan mod that does this already, i believe it is Text::Trim
10:46 sjohnson even provides ltrim and rtrim as PHP does
10:46 sjohnson if this was implemented in p5, i would die a happy man
10:46 sjohnson if my life meant something towards its inclusion
10:47 avar Why do you want it in core? Why not just use Text::Trim?
10:47 sjohnson because i migrate often
10:47 sjohnson and @INC errors plague me, especially in emergencies
10:47 sjohnson when code i use and reply upon, uses CPAN libs, for something goddamn simple
10:48 avar even if you spent lots of effort coding this it probably wouldn't get included. Things in core are either 1. stuff that really needs to be there 2. things larry added and we can't remove at this point
10:48 Bzek joined #perl6
10:48 sjohnson avar: answer me this.  why does every other programming language used today, expect Java, have this?
10:48 avar What sort of @INC errors?
10:49 sjohnson sorry, Javascript
10:49 sjohnson not Java
10:49 masak avar: sjohnson means, that when on a new computer, he doesn't have Text::Trim installed anymore.
10:49 BinGOs you probably meant 'except'
10:49 sjohnson i do mean except yes
10:49 BinGOs I have the same problem with POE >:)
10:49 masak I have the same problem when running Perl 5.10 :)
10:50 Su-Shee masak: there's no rakudo installed then? ;)
10:50 sjohnson Su-Shee: my point exactly.  no rakudo
10:50 moritz_ buubot: eval: use v6; say '\o/#
10:50 buubot moritz_: ERROR: Perl v6.0.0 required--this is only v5.10.0, stopped at (eval 35) line 1. BEGIN failed--compilation aborted at (eval 35) line 1.
10:50 sjohnson which is extremely common place in ppl's day to do working environments until the switch happens
10:52 kst joined #perl6
10:52 sjohnson avar: let me give an example of how annoying it is.  imagine that a programming language had an addInteger() function
10:52 sjohnson and you used 5+5
10:52 sjohnson on a system, then switched, forgetting to use cpan and install the addInteger package
10:52 sjohnson or intFuncs :) package
10:53 sjohnson and then the red alert signal happens
10:53 sjohnson and because of an emergency, you are forced to bust out cpan
10:53 avar haha
10:53 sjohnson instead of focussing on something more important
10:54 sjohnson when other shit is at stake
10:54 sjohnson in my opinion, for a text processing leader, that even other language users humbly admit is the winner.... it STILL (in p5) does not have a whitespace timmer
10:54 sjohnson trimmer, in its core basic install
10:55 avar Yes it does, it's just spelled s/^\s+|\s+$//g, that's fewer bytes than trim_whitespace()
10:55 sjohnson unless you bust out the appropriate permissions on our *nix install, bust out cpan, and download what you deemed off internet research (and hopefully frustration, in my case:) to be something agreeable
10:56 avar Perl 5 isn't interested in including everyone's pet peeve in core, that's what PHP does. Rather it's interested in core providing basic functionality and making it really easy to add to that.
10:56 BinGOs I was going to humourously suggest Bundle::Everything as the answer to your problems.
10:56 sjohnson avar: try including that regex in 80 scripts you right
10:56 avar Also it doesn't have OO strings like Ruby or Python so stuff like this can't be added in a pluggable and non-invasive way
10:57 sjohnson avar: we're not talking about financial calcuations, we're talking about a _whitespace_ trimmer
10:57 sjohnson avar: go join PHP, java, python, vb, ruby, and other languages
10:57 avar I know what you're suggesting. I'm just saying there's no reason to have it *in core*
10:57 sjohnson and go argue how they should take out their base whitespace trimmer, cause it isn't needed, instead of arguing against my proposla
10:58 avar And even if it was in core it would be pretty unusable for your purposes, it would take 15 years or something before you could depend on everyone running Perl 5.14 or later and perl -E 'say trim shift' just working
10:58 sjohnson avar: i am glad you brought this up.  why?  because it needs to fucking start SOMEWHERE
10:59 sjohnson i am willing to do an include in a core module on someone's new fresh ubuntu install
10:59 moritz_ masak: I've just learned that the Norwegians say "Jo flere kokker, dess mere søl."
10:59 sjohnson which i find myself using
10:59 masak moritz_: that's the most different so far. :)
10:59 sjohnson if it means it might be a step in the right direction
10:59 moritz_ which can be roughly translated to "more cooks => more mess"
10:59 masak moritz_: the others talked about the soup or broth, but this... yes.
11:00 masak it's about the side effects of the process, not the result.
11:00 moritz_ aye
11:01 moritz_ and it's why I'm glad that Perl 5 doesn't change all too much in user visible ways... because now we have many cooks, not just one
11:01 sjohnson avar: the say and given/when was backported... on.. *GUESS WHAT*.. an ubuntu install that i migrated to! it took me less than 1 month, instead 15 years, as you claimed
11:02 masak Perl 5 simply isn't agile any more, due to its wide deployment.
11:02 sjohnson so let's use realistic figures if you want to continue arguing against me
11:02 masak sjohnson: be nice. avar is. :)
11:02 avar I didn't say it would take 15 years for *you* to upgrad, but for the entire Perl userbase
11:03 avar FYI most users are still on Perl 5.8 (acc. to perl5-porters)
11:03 Su-Shee masak: I have to admire the immense flexibility and creativity due to that where people just put everything into a module.
11:03 sjohnson i'm just trying to set a starting point
11:03 Su-Shee avar: *hihi* we do, yes. :)
11:03 sjohnson it has to happen now or never, simply put
11:03 sjohnson i don't have a time machine
11:03 sjohnson but i can at least change what i believe to be a flaw in "function lacking"
11:04 sjohnson i'm not arguing stock calcuations, i'm not arguing calculus functions that are used once in a blue moon
11:04 BinGOs anyways, re: hacking perlhack and perlguts docs.
11:04 avar sjohnson: Anyway the point is not that trim() isn't useful. But that every time you introduce new function in core you put a maintencence burden on p5p, add to an already populated CORE:: namespace and unless you're careful will break everyone elses trim function.
11:04 sjohnson just somethign that is simply to anyone who has processed text on a unix platform, without having to reinvent the wheel, to write the regex function that is pasted to me every time i argue this point
11:05 avar sjohnson: If you compiled a list of every function someone wants in core because they're too lazy to type cpanp -i Text::Something on a new install you'd get thousands of functions.
11:06 sjohnson avar: how many of them are in the core of java, php, ruby, or python?
11:06 avar Perl shouldn't be everything to everybody, but a system to enable you to easily *build* systems that are everything to everybody
11:06 sjohnson let's not just use the term "any function that someone wanted"
11:06 sjohnson let's use something that is a bit outside the spectrum of something simple
11:06 avar sjohnson: php has around 4000 core functions, as I said ruby and python are *diffferent* because they have real OO, so you can add String.trim without it screwing everything up
11:06 sjohnson don't use PHP as the trump card
11:07 sjohnson like i said, be realistic
11:07 sjohnson everyone and their dog knows that PHP includes everything by default
11:07 masak lunch &
11:08 avar I am realistic, I happen to be familiar with p5 development and I'm explaining why the answer to this and hundreds of other proposed trivial functions hasn't been "Yes" when they've been proposed for core inclusion. That is all.
11:09 avar Perl core seeks to me modular and light, have a modest (and shrinking) colection of bundled modules + CPAN modules and make it really easy to install the rest
11:09 sjohnson if you could determine a percentage, how many of them are as simple as whitespace timmer, compared to the giant broat spectrum of proposed changes
11:10 sjohnson i am trying to 1) make perl 5 more usable to me in a VERY simple context, not specific.  ie, unix admin tasks which involve whitespace trimming.  and 2) make perl at least APPEAL to people
11:10 sjohnson i already got teasted on the internets for being excited about perl 6 having a whitespace trimmer
11:11 sjohnson whenever every other goddamn language used now already has it
11:11 sjohnson and yet i still stick with perl
11:12 moritz_ IMHO the best chances are to get it into Scalar::Util (but I said that already, and even there it's not very likely or easy)
11:13 sjohnson moritz_: i thought about this during the day
11:14 sjohnson problem is, i dont know quite how to "make a patch". there is no guide.  i can get the perl 5 git tree
11:14 moritz_ http://dev.perl.org/perl5/source.html
11:14 sjohnson after that, i am like a guy sorting through a bombwreck in his house, for a key to car
11:15 moritz_ on that site is a link to the perlrepository documentation
11:16 * sjohnson is earnest
11:16 sjohnson .. not Ernest Goes to Perl School
11:17 BinGOs sjohnson: I answered your there is no guide. question earlier.
11:17 BinGOs perlhack and perlguts documents.
11:18 sjohnson may i ask this one question: who can i talk to, an actual person, an irc name
11:18 sjohnson who might possibly consider my proposal, given a good (and emotional) case?
11:18 sjohnson being redirected to groups has led me worse than here
11:18 sjohnson x 5 people making fun of me
11:19 moritz_ sjohnson: inclusion of features into perl 5 is not decided by a single person
11:19 sjohnson i thought Mr. Wall had leadership role over this sort of thing
11:19 sjohnson or at least disciples / trustees
11:19 BinGOs I'm not sure there is a pumpkin at the moment.
11:19 moritz_ sjohnson: yes, but he's not all that involved with the perl 5 porters anymore
11:20 BinGOs but yeah, moritz_ is right, it is a consensus approach for features.
11:20 sjohnson i need to cut through the red tape, and get to the *core* (module) of this
11:20 sjohnson looks like i am little timmy at thanks giving on those Xmas programmes you see on tv
11:21 sjohnson moritz_: BinGOs : avar : masak : thanks for the tips
11:22 BinGOs it is easier to put a needle in the eye of a camel ....
11:22 BinGOs er
11:23 BinGOs >:)
11:23 moritz_ than to pull it out without being kicked?
11:23 sjohnson my final statement:  using a regex to trim whitespace is like your grandmother telling you that postal mail is a trusty way to get a letter across... instead of using irc/email to get something simple across
11:23 sjohnson moritz_: i understand if i should be kicked.  but hear me out.  this is a troll.  i will do whatever it takes to get this in, and will only give up if perl6 dominates an ubuntu perl install
11:24 sjohnson for reasons i don't think i need to explain
11:24 BinGOs I've been looking at where one would implement such a function in the perl5 source and I have managed to scare myself.
11:24 moritz_ sjohnson: I didn't talk about IRC kicking, but about the camel kicking you if it pokes you
11:24 Su-Shee sjohnson: actually I totally wouldn't get the comparision if I were porter.
11:24 sjohnson BinGOs: someone mentioned an argument to get Text::Trim included in the perl modules
11:25 BinGOs oh as a core module. Yeah, that would be way easier than hacking at perl internals.
11:25 BinGOs just drop Text-Trim distribution into cpan/ directory and there you go.
11:26 sjohnson that will make it a core module?
11:26 sjohnson p5p told em it wasn't that simple
11:26 BinGOs oh and other shit.
11:26 sjohnson i offered handjobs, and that still didn't succeed
11:26 sjohnson i don't know how moving it into a diff dir will do any good
11:26 icwiener joined #perl6
11:29 sjohnson let's put it this way folks.  imagine trying to set up an old computer with a mobo with SATA, and using Win XP.  it doesn't detect SCSI / SATA drivers by default
11:29 charsbar joined #perl6
11:29 sjohnson try to imagine the peace of mind that would occur if it simply recognized SATA drivers during the WinXP install.  this is what i'm trying to accomplish for p5 prior to p6 becoming mainsream
11:30 sjohnson you think i am the only one.  having worked with a few perl programmers who don't have time to argue here on irc or anywhere else, i am speaking on their behalf
11:30 sjohnson that perl5 without a white space trimmer is like using one of those cellphones that is a foot long, because it
11:30 sjohnson does the job
11:31 sjohnson instead of using something 1/16 the size
11:34 sjohnson if perl is considered by python users as the defacto text processing language, why i am i the only one on irc fighting for this?
11:37 sjohnson my only assumtion is people use Perl for different purposes.  that is fine.  i am simply defending its right to be labeled the swiss army of programming langauges
11:39 sjohnson for somethign that every other modern language (aside from javascript) already does, without having to use a purist attitude of re-inveting the wheel
11:40 sjohnson or have to explain my case
11:41 colomon joined #perl6
11:42 sjohnson or use a goddamn core module
11:42 sjohnson or depedency
11:42 jnthn o_O
11:42 sjohnson i'd start with one
11:42 sjohnson but i'm trying to envision an ideal case
11:42 moritz_ jnthn: how's the branch coming?
11:43 literal I'd like to see a trim() in Perl 5. But I don't think it's worth the effort because: a) Perl 6 will have it anyway, b) the Perl 5 porters are already burdened enough, introducing new core functions in Perl 5 has its problems, etc. And if they should be burdened further, there are a lot more important things to do than a trim() function, c) it can be accomplished with s/^\s+|\s+$//g, a 9 character regex, and regexes are very well integrated in Perl anyway, so the
11:43 literal that message might have been too long
11:43 moritz_ truncated after "so the"
11:44 literal "so the only reason to abhor that is if you're completely unfamiliar with regexes"
11:44 sjohnson literal: i saw it, and i appreciate it
11:44 jnthn moritz_: I took yesterday off to study Slovak and spend time with @people. And so far today I've hacked on some stuff for $other_client and worked with a friend to fix up a postfix/sasl problem. :-/
11:44 jnthn moritz_: So it's not gone far at all since Wednesday. I plan to change that later today. :-)
11:44 moritz_ sounds like "fun"
11:44 moritz_ speaking of plans...
11:45 jnthn moritz_: Well, apart from the postfix/sasl crap, it was great. :-)
11:45 moritz_ I have two ~1hr train travels this weekend
11:45 moritz_ and might spend them on book writing
11:45 sjohnson the only arguemnt i have with c), is that it is not only 9 chars, but you have to apply it to something, and it is 1) annoying to write the regex, or 2) use a macro to write it for you
11:45 jnthn Yay. :-)
11:45 moritz_ jnthn: are you planning to fill out details about the object system over the weekend?
11:45 sjohnson literal: it's not like were using tar with tape drives.  we should also abondon regex for simple reasons.. ?
11:46 moritz_ jnthn: just want to avoid duplicate work
11:46 jnthn moritz_: Yes, I really want to start on that.
11:46 moritz_ ok
11:46 jnthn And the weekend would seem a good time.
11:46 moritz_ so I'll focus more on MMD
11:46 jnthn Cool. :-)
11:46 sjohnson literal: following suit with other languages that use trim($var) or $var.trim?   why bust out the regex for something so simple
11:46 moritz_ and maybe start with explaining either grammars or ops/subs
11:47 sjohnson literal: and p6 won't be installed in ubuntu for the next while... :(  just trying to make the transititon easier, in something that everyone except me agrees with
11:47 moritz_ it seems weird, but I have a hard time coming up with a good use case for MMD with variable number of arguments
11:47 moritz_ that can't be better solved with default values instead
11:48 jnthn moritz_: We use that in Test.pm.
11:48 jnthn iir
11:48 jnthn c
11:48 literal sjohnson: yeah, the problem is backwards-compatibility, and Perl 5 code-unwieldiness, the same reason I believe they started the Perl 6 project
11:48 jnthn But maybe "default values would be better" applies there too.
11:48 moritz_ it does
11:48 literal sjohnson: so, in a way, this problem has already been "fixed"
11:49 sjohnson literal: thank you for that.  that i can understand.  but i was thinking that if they could get a given/when structure to p5 for the poor staps with old hardware
11:49 zamolxes joined #perl6
11:49 moritz_ we basically only use it for omitting descriptions
11:49 sjohnson surely they could could emulate the popular answer i have been given these last few weeks
11:49 sjohnson without having to use a macro, cpan, or complex regec
11:49 sjohnson x
11:49 literal sjohnson: I guess they consider those features to be general enough
11:50 literal there are lots of things similar to trim() that people would like to add to Perl 5 that would make it less maintainable
11:50 sjohnson other than a function that adds two integers, i can't imagine anything simpler
11:50 sjohnson and im not saying that to be a dick
11:51 literal see List::MoreUtils
11:51 * sjohnson is seeing
11:52 sjohnson i see the uniq thing being quite handy, as in p6
11:53 literal yeah, Perl 6 can do most of these, but I doubt they'll ever be put into Perl 5 core
11:53 sjohnson how many of these things are included in the other "gamut of languages" i mentioned?
11:53 sjohnson i'm not trying to argue against somethign specialized, just something simple that no one seems to agree with me on, that the other "rivals" have included
11:54 literal I bet Python and Ruby have some of these, but I don't know
11:54 BinGOs It's like the Irish joke that has the punchline "Well, I wouldn't start from here"
11:56 sjohnson │ arthur--
11:56 sjohnson 20.rizon.Urexis             │04:47:25      literal | sjohnson: yeah, the problem is backwards-compatibility, and Perl 5 code-unwieldiness, the same reason I believe     │ ascent_
11:56 sjohnson sorry
11:56 sjohnson accident paste
12:02 JimmyZ joined #perl6
12:09 kst joined #perl6
12:10 payload joined #perl6
12:21 takadonet joined #perl6
12:21 masak moritz_: re MMD on varying number of args: to me, the case of parameter defaults seems by far the dominant one. and perhaps that's not a coincidence.
12:23 takadonet morning all
12:23 masak takadonet: \o
12:27 moritz_ I do have one example though
12:27 moritz_ substr
12:27 moritz_ the four-arg form has to bind with 'is rw'
12:27 moritz_ so it needs a different candidate than the other forms
12:27 masak indeed.
12:28 masak that's a good example.
12:28 moritz_ but I don't know if it's a good example, because it's fairly involved
12:28 masak it's good in the sense that it actually describes the need for this.
12:28 masak but yes, it might be a bit involved.
12:29 moritz_ rakudo: sub a($x is rw) { $x = 5 }; my $z = 9; a($z); say $z;
12:29 p6eval rakudo d5a2ee: OUTPUT«5␤»
12:29 moritz_ rakudo: sub a($x is rw) { $x = 5 }; a(3)
12:29 p6eval rakudo d5a2ee:  ( no output )
12:31 moritz_ masak: bindability checks don't influence MMD yet, so right now it doesn't work in rakudo
12:31 masak but... soon...
12:31 desertm4x joined #perl6
12:31 * masak cheers jnthn on
12:35 jnthn The is rw checks probably needs us to do that rw refactor that pmichaud and I have talked about every now and then.
12:35 jnthn After that is done, though, yes, it's trivial to handle in the new binder.
12:36 * moritz_ heads off for the weekend
12:37 colomon joined #perl6
12:37 jnthn moritz_: have a good one. :-)
12:40 masak moritz_: haveagoodweekendseeyou!
12:44 Chillance joined #perl6
12:50 NorwayGeek joined #perl6
13:05 icwiener_ joined #perl6
13:06 payload joined #perl6
13:07 mzedeler joined #perl6
13:07 mzedeler Hi
13:09 mzedeler I started looking at the synopses in order to clean up all the number types. This lead me astray, and I am now considering whether to propose a meta-class called a Domain, that can be used to specify constraints on the values of a given base type along with various other things.
13:11 mzedeler No comments - alright - will post on mailing list.
13:23 PerlJam Hmm.
13:23 PerlJam mzedeler needs to calibrate his patience knob a little methinks.
13:23 PerlJam good morning all
13:24 NorwayGeek_ joined #perl6
13:26 arthur-- joined #perl6
13:32 ihrd joined #perl6
13:32 ihrd left #perl6
13:37 kst joined #perl6
13:47 eMaX joined #perl6
13:51 payload joined #perl6
13:52 masak nod.
13:53 masak PerlJam: morning!
13:55 jnthn OK, some fun with a HTTP debugger later...
13:55 jnthn Rakudo Time!
13:55 masak \o/
14:02 FOAD_ joined #perl6
14:03 * jnthn starts by trying to work out how on earth he's failing radix.t so epicly...
14:03 jnthn It's my last failure it all of the S02 tests.
14:05 masak not so strange, is it? radixes have the syntax of named arguments, no?
14:05 * masak likes pop science explanations
14:05 jnthn masak: Thing it's nothing to do with that.
14:06 masak oki.
14:06 jnthn *think
14:07 jnthn rakudo: for 2..4 { say +":{$_}<11>" == $_ + 1 }
14:07 p6eval rakudo d5a2ee: OUTPUT«1␤1␤1␤»
14:07 jnthn eww. It's something to do with $_ handling, I think.
14:08 jnthn rakudo: for 2..4 { say "{$_}"; }
14:08 p6eval rakudo d5a2ee: OUTPUT«2␤3␤4␤»
14:08 jnthn aha. Golfed.
14:09 Psyche^ joined #perl6
14:09 sandip joined #perl6
14:11 KyleHa joined #perl6
14:13 masak I like that phase where tests that used to pass fail after a refactor, and one has to iron out the slight remaining failures.
14:13 masak it's a very organized, delimited part of the process.
14:14 jnthn Well, apart from at the start of this process it was more than slight.
14:15 masak jnthn: I usually handle smaller test suites than you do. :)
14:15 KyleHa moritz++  # http://perlgeek.de/blog-en/perl-6/committing-crud.html
14:17 estrai joined #perl6
14:18 * jnthn commits crud occasionally
14:19 masak I try my best to write quality code. sometimes, I fail.
14:20 PerlJam Keep moving forward.
14:21 PerlJam (Have you guys seen "Meet the Robinsons"?  My kids and I are always telling each other "keep moving forward")
14:21 KyleHa Sometimes I commit crud in the hopes that it will be a good start for someone smarter than me to polish.
14:24 carlin I write crud and eventually see a way to do it better and think "so that's how that can be done in one line and not ten"
14:25 Juerd Is it confession time again? :)
14:26 Juerd I usually don't commit crud, because I'm to dumb to use revision control in the first place.
14:26 Juerd s/to/too/
14:27 JimmyZ joined #perl6
14:27 jnthn ;-)
14:29 masak I don't commit crud willingly, or by default. things such as deadlines or a wish to release early might change that default.
14:29 Juerd What a nice way of saying that you do also commit crud ;)
14:29 masak :)
14:29 jnthn I don't commit crud if I think pmichaud might read the commit log.
14:30 Juerd Fear the peer.
14:30 jnthn ;-)
14:31 * jnthn tries to golf a really bizzare bug
14:31 masak crud may also be a subjective thing. I've recently become very suspicious of deeply nested loops and conditionals. they tell me something can probably be abstracted out. a month ago I probably wouldn't have reacted to the with the same distaste.
14:36 Su-Shee I totally hate this. in code and in writing. it's like sentences with too many "but" and "so" and "that" and the like.
14:36 masak something like that, yes.
14:38 Su-Shee I have a vim syntax hilighting for "sentence too long" and "buzzword" and the like :)
14:38 jnthn Hmm.
14:38 jnthn Should named parameters factor into arity?
14:39 jnthn I hadn't thought so.
14:39 masak jnthn: you mean compulsory nameds?
14:39 jnthn arity.t, however, feels differently.
14:39 jnthn masak: compulsory ones for .arity, and optional ones for .count
14:39 jnthn masak: My question is, should nameds be accounted for when computing either?
14:39 jnthn It seems Rakudo does so today
14:40 * masak doesn't know
14:40 jnthn rakudo: sub o_two   ($x, :$y!, :$z) { }; say &o_two.arity
14:40 p6eval rakudo d5a2ee: OUTPUT«2␤»
14:40 jnthn rakudo: sub o_two   ($x, :$y!, :$z) { }; say &o_two.count
14:40 p6eval rakudo d5a2ee: OUTPUT«1␤»
14:40 jnthn oh hey
14:40 jnthn .arity *does* factor in nameds, and .count doesn't, today
14:40 jnthn Oh, and we have todo tests for that.
14:40 Woodi : delimits $self
14:41 jnthn Woodi: ...huh?
14:41 jnthn Woodi: Oh, I see what you mean. No, not here it's marking a named param.
14:41 Woodi looks .arity do not count $self - object value...
14:41 PerlJam ETOOMUCHCOLONOVERLOAD
14:42 jnthn That's what happens when Larry gets the colon.
14:42 jnthn ;-)
14:42 jnthn Woodi: Is this a separate thing or related to the current discussion?
14:42 jnthn Woodi: None of the examples I've posted have an invocant.
14:42 payload joined #perl6
14:44 Woodi jnthn: related but just my thinking. i mean: .arity do not work on object-like notations...
14:45 pjcj joined #perl6
14:45 jnthn rakudo: class A { method foo($x) { } }; say &A::foo.arity
14:45 p6eval rakudo d5a2ee: OUTPUT«2␤»
14:46 jnthn Woodi: Seems to count it.
14:46 jnthn (It does in resig too)
14:46 Woodi so nvm...
14:46 jnthn Eh, I'll make Rakudo do what the tests say, I can't find anything to suggest to me otherwise.
14:47 jnthn The number of required parameters a subroutine has can be determined by
14:47 jnthn calling its C<.arity> method:
14:47 jnthn $args_required = &foo.arity;
14:47 jnthn Is what the spec says.
14:47 jnthn It doesn't say only positionals.
14:47 jnthn oh hey, now we pass all of arity.t
14:47 jnthn Win.
14:48 Woodi and bug was ?
14:48 jnthn Woodi: .arity and .count in resig didn't account for named params.
14:48 jnthn Only positional.
14:48 jnthn Woodi: In master, .arity did account for them and .count (I guess wrongly) didn't.
14:49 jnthn Now they're at least consistent, and do what the tests expect. :-)
14:50 nihiliad joined #perl6
14:50 dukeleto moritz_: i like your idea of a 'newbie' channel.
14:51 iblechbot joined #perl6
14:52 kst joined #perl6
15:01 houghton joined #perl6
15:03 pugs_svn r28801 | jnthn++ | [t/spec] Remove a bogus test - it relied on something that should throw an exception not throwing one, and is followed by a correct test that makes sure we do die. Also tweak comment on test.
15:06 pugs_svn r28802 | jnthn++ | [t/spec] Correct a test that expected a positional parameter to get bound to the first named parameter (bug in master causes that to happen, but this causes the new signature binder to rightly complain).
15:20 SmokeMachine joined #perl6
15:23 TimToady I'm really tempted to remove .arity and .count from the language so that people won't try to use them
15:24 * masak is all for it
15:27 jnthn A few places in the setting use it to make decisions.
15:27 jnthn But we could probably make them differently (signature introspection).
15:28 masak it's probably not a bad idea to demote/de-huffmannize them to the .signature object, anyway.
15:28 masak then .count could simply be .elems
15:30 jnthn only if you want it to count the one or two slurpies also as contributing one each.
15:31 arthur-- joined #perl6
15:33 am0c joined #perl6
15:37 TimToady my point is that introspection of signatures is usually the wrong way to decide whether a signature will bind
15:37 TimToady for the same reason that testing for eof() is usually the wrong way to decide if there's more input
15:42 TimToady so, to my mind, merely moving .count and .arity to the signature is just moving the problem elsewhere
15:42 TimToady for loops should not be using them, for instance
15:42 jnthn Aye. Current Rakudo doesn't allow smart-matching against signatures to check bindability though.
15:42 jnthn Nor did it give a good way to implement it.
15:43 jnthn (Should be trivial after resig lands.)
15:43 TimToady sorry I'm grouchy, no coffee yet...
15:45 pugs_svn r28803 | jnthn++ | [t/spec] Correct another wrong signature that we were getting away with before.
15:46 * jnthn hands TimToady a good strong tripple-expresso
15:49 jnthn Is a slurpy meant to put each of the things slurped up into list context?
15:49 TimToady depends on what it's bound to
15:50 jnthn sub respect(*@a) { my @b; @b.push($_) for @a; say @b.elems }
15:50 jnthn respect(1,2,3)
15:50 jnthn respect([1,2,3])
15:50 jnthn What should output be for each of these?
15:51 arthur-- joined #perl6
15:51 TimToady 3 1
15:51 jnthn OK, that's what the test expects too.
15:52 jnthn I suspect calling .list on the [1,2,3] was the wrong thing to do then.
15:53 jnthn Ah
15:53 justatheory joined #perl6
15:53 jnthn The original calls .Array on the whole thing when it's been formed...
15:55 cdarroch joined #perl6
15:55 TimToady simply mentioning an array in a list doesn't interpolate it, so [1,2,3] is like $array
15:55 TimToady the @ does extra magic
15:56 jnthn ah, I think I see what I've messed up...
15:56 TimToady basically, @() means "return a list in list context, and an object in item context"
16:09 pmurias joined #perl6
16:10 infrared joined #perl6
16:11 payload joined #perl6
16:13 kst joined #perl6
16:26 rfordinal joined #perl6
16:37 cognominal joined #perl6
16:44 TimToady sjohnson: you wasted about 15 minutes of my time reading through your trim rants in the backlog, and a corresponding amount of time for anyone else who backlogs
16:44 TimToady please consider P5 trim to be OT in #perl6 now
16:45 sdvsdvsdv joined #perl6
16:50 lumi joined #perl6
17:07 cognominal Timtoady, why there is not a  fun keyword for  subs that are functions in the functionnal sense of the term?
17:07 Yubyub joined #perl6
17:08 Raugturi joined #perl6
17:09 TimToady because that would be redundant with the signature :)
17:10 TimToady or are you speaking of a lack of side effects?
17:10 cognominal yes
17:10 wtgee joined #perl6
17:11 cognominal *fonctional btw
17:11 TimToady I think most users would prefer the computer to figure that out for them
17:12 cognominal I would say, they expect it the computer to check it for them
17:12 cognominal s/it the/the/
17:13 TimToady pugs has an "is pure" trait, I believe
17:13 lumi joined #perl6
17:13 TimToady but I don't want to force mere mortals to learn about monads :)
17:13 cognominal I thought everythin impure were shoved in monads
17:17 cognominal I don't suggest that every sub must be a function, but that sub that don't have side effect could be marked as such
17:17 quietfanatic rakudo: class Q { method ^do () { say "done" } }; Q.do;
17:17 p6eval rakudo d5a2ee: OUTPUT«positional inside named args at position 2␤in Main (file src/gen_setting.pm, line 206)␤»
17:17 quietfanatic cognominal: A smart compiler ought to be able to tell which subs are pure and which are not.
17:17 jnthn Traits are the normal way to mark stuff. :-)
17:18 quietfanatic Well, maybe not pure, but at least side-effect-free
17:18 cognominal quietfanatic, that would be for the benefit of the reader and checked by the compiler
17:19 cognominal I don't mind it to be a trait
17:19 jnthn cognominal: Heh. Good luck writing the checker. :-)
17:19 cognominal I was about to say, jnthn could write that easily
17:19 jnthn :-P
17:20 jnthn Static analysis in a very dynamic language is probably pretty limited in what it can do.
17:20 jnthn At least, not without hints.
17:20 quietfanatic rakudo: class Q { method ^do { say "done" } }; Q.do;
17:20 p6eval rakudo d5a2ee: OUTPUT«positional inside named args at position 2␤in Main (file src/gen_setting.pm, line 206)␤»
17:20 wtgee left #perl6
17:20 jnthn That's why we design in ways to give hints.
17:20 kst joined #perl6
17:21 cognominal yea, but my point here was not to help the compiler but the reader
17:21 jnthn quietfanatic: If you're going to write a method on the meta-class, you really should also take a parameter holding the current instance.
17:21 jnthn quietfanatic: Q.^do is Q.HOW.do(Q)
17:21 jnthn And I think Q.do is calling a forwarder method that does self.HOW.do(self)
17:21 TimToady # this function isn't evil
17:22 quietfanatic jnthn: what do you mean?
17:22 jnthn quietfanatic: What I said. :-)
17:22 jnthn quietfanatic: I was comment on why Rakudo was complaing about your code.
17:22 jnthn *complaining
17:22 TimToady HOW returns a metaobject, but the metamethod needs to know the original object as well
17:22 jnthn quietfanatic: method ^do is putting a method into the meta-class instance.
17:23 jnthn And metamethods...yes, what TimToady said.
17:23 quietfanatic perl6: say 4
17:23 p6eval elf 28803, pugs, rakudo d5a2ee: OUTPUT«4␤»
17:23 quietfanatic rakudo: class Q { method ^do ($self:) {say "done"} } Q.do;
17:23 p6eval rakudo d5a2ee: OUTPUT«Confused at line 2, near "Q.do;"␤in Main (file <unknown>, line <unknown>)␤»
17:24 quietfanatic Sorry, my irc was being slow
17:24 jnthn quietfanatic: The invocant is the metaclass.
17:24 jnthn You need an extra, normal positional too.
17:24 pmichaud /lastlog pmichaud 5
17:24 pmichaud oops
17:24 quietfanatic Then the example in S12 is wrong?
17:25 quietfanatic rakudo: class Q { method ^do ($self:) {say "done"} } Q.^do;
17:25 p6eval rakudo d5a2ee: OUTPUT«Confused at line 2, near "Q.^do;"␤in Main (file <unknown>, line <unknown>)␤»
17:25 pmichaud calling a class 'Q' is likely dangerous :-)
17:25 quietfanatic oh
17:25 jnthn :-)
17:25 quietfanatic :|
17:25 jnthn quietfanatic: It's possible, yes.
17:26 quietfanatic rakudo: class X { method ^do ($self:) {say "done"} } X.do;
17:26 p6eval rakudo d5a2ee: OUTPUT«Method 'do' not found for invocant of class 'Failure'␤in Main (file src/gen_setting.pm, line 206)␤»
17:26 quietfanatic rakudo: class X { method ^do ($self:) {say "done"} } X.^do;
17:26 TimToady std: class Q { method ^do ($self:) {say "done"} } Q.^do;
17:26 p6eval rakudo d5a2ee: OUTPUT«Method 'do' not found for invocant of class 'ClassHOW'␤in Main (file src/gen_setting.pm, line 206)␤»
17:26 p6eval std 28803: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing semicolon or comma after block at /tmp/8suilCI6cM line 1:␤------> [32m Q { method ^do ($self:) {say "done"} } [33m⏏[31mQ.^do;[0m␤    expecting any of:␤     bracketed infix␤  infix stopper␤    standard stopper␤ statement␤      statement
17:26 p6eval ..modifier loop␤    t…
17:26 quietfanatic That's also a problem
17:26 TimToady std: class Q { method ^do ($self:) {say "done"} }; Q.^do;
17:26 quietfanatic class X { method ^do ($self:) {say "done"} }; X.^do;
17:26 p6eval std 28803: OUTPUT«[31m===[0mSORRY![31m===[0m␤(Possible runaway string from line 1)␤Couldn't find terminator . at /tmp/ZZRP1Huj7u line 1 (EOF):␤------> [32mthod ^do ($self:) {say "done"} }; Q.^do;[33m⏏[31m<EOL>[0m␤FAILED 00:03 110m␤»
17:27 quietfanatic rakudo: class X { method ^do ($self:) {say "done"} }; X.^do;
17:27 p6eval rakudo d5a2ee: OUTPUT«positional inside named args at position 2␤in Main (file src/gen_setting.pm, line 206)␤»
17:27 quietfanatic rakudo: class X { method ^do {say "done"} }; X.do;
17:27 p6eval rakudo d5a2ee: OUTPUT«positional inside named args at position 2␤in Main (file src/gen_setting.pm, line 206)␤»
17:28 quietfanatic I think this used to work in Rakudo.
17:28 jnthn quietfanatic: Me too...
17:28 jnthn I thought we had tests for it too.
17:28 quietfanatic Makes it a bit hard to write constructors :)
17:30 jnthn Hmmm....resig is looking a bit better in the tests now.
17:31 pmichaud hmmm, we have .do and .re already, and .mi is apparently spelled .im .  I wonder when we'll get the rest of the notes :-) :-)
17:31 jnthn Not like, we can merge real real soon better, but less horribly awful looking better.
17:31 payload joined #perl6
17:31 zloyrusskiy joined #perl6
17:32 jnthn lol. die.t...dies.
17:33 pmichaud I would guess that's a "pass", then?  ;-)
17:33 jnthn pmichaud: No, dies in the wrong way. :-/
17:33 jnthn ;-)
17:34 jnthn Ah well, we're getting closer.
17:37 jnthn And it won't be many more fixes where I'm at test result break-even. ;-)
17:38 jnthn (Gains from unexpected passes of todo'd tests exceeds losses from regressions.)
17:38 PZt joined #perl6
17:42 maschla joined #perl6
17:46 colomon jnthn: if you were willing to turn on currently skipped trig tests and count those, you could probably be there now.  ;)
17:47 jnthn colomon: Well, I'd rather my make spectest runs are fast. :-)
17:47 jnthn *faster
17:47 jnthn colomon: And I probably should try and fix all of these issues anyway.
17:48 colomon I suppose...
17:48 lumi joined #perl6
17:49 jnthn Here's current to-fix list: http://gist.github.com/211917
17:49 jnthn However, I'm pretty sure that there's not as many individual issues as there are failing tests.
17:49 stephenlb joined #perl6
17:50 jnthn OK, time to go to the store...
17:50 abra joined #perl6
17:50 stephenlb joined #perl6
18:01 carlin rakudo: my %h; %h .= push({foo => 'bar'});
18:01 p6eval rakudo d5a2ee: OUTPUT«Trailing item in Hash.push␤Null PMC access in isa()␤in Main (file src/gen_setting.pm, line 206)␤»
18:04 rdice joined #perl6
18:04 carlin Oh ... Hash .= push is just silly
18:05 rfordinal left #perl6
18:06 payload joined #perl6
18:14 colomon carlin: even so, it still shouldn't Null PMC.  :)
18:15 carlin Indeed, I wonder if it's known already
18:15 ruoso joined #perl6
18:18 colomon Well, you were trying to do something "just silly", so my guess is no.  :)
18:18 PerlJam what should that silly thing actually do though?  warn?  Do something magically correct?
18:19 PerlJam die horribly?
18:19 PerlJam (I think it already does that :)
18:20 colomon PerlJam: even if it is supposed to die horribly, it is a bug if it dies horribly with a Null PMC.
18:20 * jnthn back
18:20 PerlJam colomon: true.
18:21 carlin It's like saying
18:21 carlin rakudo: my %h; %h = %h.push: {foo => 'bar'};
18:21 p6eval rakudo d5a2ee: OUTPUT«Trailing item in Hash.push␤Null PMC access in isa()␤in Main (file src/gen_setting.pm, line 206)␤»
18:23 jnthn Wow, weird output.
18:23 jnthn (before the NPMCA)
18:25 PerlJam perhaps that's the "odd number of elements" error?
18:25 PerlJam rakudo: my %h; %h.push: { foo => 'bar' };
18:25 p6eval rakudo d5a2ee: OUTPUT«Trailing item in Hash.push␤»
18:25 PerlJam maybe not
18:26 PerlJam oh, it's because we didn't push a Pair
18:26 PerlJam rakudo: my %h; %h.push: foo => 'bar';
18:26 p6eval rakudo d5a2ee:  ( no output )
18:26 PerlJam rakudo: my %h; %h.push: { 'some other  thing' };
18:26 p6eval rakudo d5a2ee: OUTPUT«Trailing item in Hash.push␤»
18:26 PerlJam rakudo: my %h; %h.push: 'foo', 'bar';
18:26 p6eval rakudo d5a2ee:  ( no output )
18:27 kst joined #perl6
18:31 snearch joined #perl6
18:31 lumi joined #perl6
18:32 justatheory joined #perl6
18:34 Pnz joined #perl6
18:37 ShaneC joined #perl6
18:44 ruoso Hello!
18:44 ruoso as some of you might know, YAPC::Brasil::2009 is approaching
18:44 ruoso and edenc had an interesting idea of having a "welcome shout" session at the openning
18:45 * jnthn isn't sure he can shout loud enough to be heard in Brazil from Europe.
18:45 PerlJam heh
18:45 ruoso the idea is for Perl people around the world to send small video clips with "Hi I'm $myself, I work on $project. Welcome to YAPC::Brasil::2009"
18:46 jogla Brasil is faaar away
18:46 ruoso and send the videos to breno@yapcbrasil.org.br
18:47 PerlJam ruoso: sounds cool.
18:47 jnthn Cool idea.
18:48 PerlJam If there were monitors with audio around campus, you could play them randomly throughout the day too  :)
18:48 edenc and hopefully next year we can plan everything a bit better and have everyone show up for real ;)
18:48 PerlJam as people walk from talk to talk, they would be greeted by random perlers in the hall
18:55 ruoso I just received a suggestion of inlcuding "I'm from $location" in the shout
18:57 PerlJam ruoso: "Hi, I'm Jonathan and I'm from everywhere"  :)
18:57 ruoso heh
19:00 maschla left #perl6
19:00 Su-Shee "Hi, I'm Susan and I'm a Perl addict" ;)
19:03 Raugturi joined #perl6
19:04 NorwayGeek joined #perl6
19:05 sjohnson sorry TimToady
19:05 sjohnson wont happen agaain
19:05 sjohnson again*
19:06 lumi joined #perl6
19:09 rblasch joined #perl6
19:10 NorwayGeek_ joined #perl6
19:14 dr_df0 joined #perl6
19:14 dr_df0 hello
19:15 PerlJam hi
19:15 dr_df0 rakudo: {my @a=(); for 1..2000 -> $i { @a.push($i); } }
19:15 p6eval rakudo d5a2ee:  ( no output )
19:18 desertm4x joined #perl6
19:20 dr_df0 rakudo: {my @a=(); my $c=0; for 1..2000 -> $i { @a.push($i); $c++; } say $c; }
19:20 p6eval rakudo d5a2ee: OUTPUT«Confused at line 2, near "say $c; }"␤in Main (file <unknown>, line <unknown>)␤»
19:20 zamolxes joined #perl6
19:22 jnthn dr_df0: Think it needs a ; after the penultimate }
19:22 PerlJam heh ... that's the first time I've seen rakudo claim to be confused using that actual word
19:25 jnthn std: {my @a=(); my $c=0; for 1..2000 -> $i { @a.push($i); $c++; } say $c; } # just curious
19:25 p6eval std 28803: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing semicolon or comma after block at /tmp/qyOaATpsXm line 1:␤------> [32mor 1..2000 -> $i { @a.push($i); $c++; } [33m⏏[31msay $c; } # just curious[0m␤    expecting any of:␤   infix stopper␤    statement␤FAILED 00:02 115m␤»
19:25 mikehh joined #perl6
19:25 jnthn Ooh, shiny.
19:26 pmichaud I'll do a video clip, any preferred format?
19:26 dalek nqp-rx: 4741f3d | pmichaud++ | src/ (2 files):
19:26 dalek nqp-rx: Remove Regex::P6Regex::Grammar's dependency on PCT::Grammar.
19:26 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/4741f3dd0cac547ccfe6759e5741b2b9c5023338
19:26 dalek nqp-rx: 5d42e76 | pmichaud++ | src/Regex/P6Regex.pir:
19:26 dalek nqp-rx: Correct compiler class to be Regex::P6Regex::Compiler .
19:26 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/5d42e76abb9cedc98fdb0200cda318e13f48f2fa
19:26 dalek nqp-rx: 638b1b5 | pmichaud++ | src/ (4 files):
19:27 dalek nqp-rx: Add naive protoregexes (from PGE cheats) to Regex::Cursor for bootstrapping.
19:27 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/638b1b585360f5d85751835a0ba7d6b3d4c70857
19:27 pmichaud edenc: I'll do a video clip -- any preferred format?
19:28 edenc pmichaud: nope, whatever you can throw at us is ok
19:28 pmichaud any standard "script", or just make up our own?
19:29 edenc just make up your own
19:30 edenc don't want it to look like a Kraftwerk concert
19:30 Tene pmichaud: what are you recording?
19:30 PerlJam pmichaud: and wear a clown outfit complete with a red nose that honks when you squeeze it (which you should do at the end of your clip)
19:31 PerlJam :-)
19:31 pmichaud Tene:  from scrollback:  18:45 <ruoso> the idea is for Perl people around the world to send small video clips with "Hi I'm $myself, I work on $project. Welcome to YAPC::Brasil::2009"
19:33 PerlJam if anyone does do the the clown outfit, theirs would be a welcome not soon forgotten ;)
19:33 pmichaud I was thinking of something slightly different.  :)
19:33 * edenc just gets a marketing idea for next year
19:34 edenc "come to YAPC::Brasil::2010, you'll get to see PerlJam in a clown costume"
19:35 edenc PerlJam: we'll sponsor the outfit, of course
19:35 PerlJam I could juggle too, but somehow I don't think that would be much of a draw.
19:36 edenc juggle and write perl6 code with your right foot, that would be quite a draw
19:36 kst joined #perl6
19:36 krzys joined #perl6
19:37 krzys hello everybody
19:37 Tene Hi!
19:37 krzys I have a problem with rakudo
19:37 krzys maybe someone will help :O
19:37 PerlJam krzys: do tell
19:37 pmichaud Many of us do.
19:38 PerlJam krzys: is your problem that it is too slow?
19:38 PerlJam krzys: is your problem a "Null PMC Access"?
19:38 PerlJam krzys: is your problem that is doesn't support the full Perl 6 spec?
19:38 PerlJam :-)
19:39 PerlJam If so, these are problems people are working on.
19:40 krzys I tried to write small processing tool (I could do it in perl5, but I wanted to start using perl6)
19:40 krzys what it does is: read the file line by line, split the fields and push @fields[1] into global array
19:40 krzys after processing around 1500 lines i get "segmentation fault"
19:40 krzys i did some testing, and for example following code: {my @a=(); for 1..20000 -> $i { @a.push($i) } }
19:40 krzys works fine
19:42 krzys the only difference is that I'm reading using $fh.get(), then I'm doing chomp, then spliting to get the number on the second field (which is number)
19:42 PerlJam krzys: paste the code somewhere we can see
19:42 pmichaud you're using $fh.get() as part of a for loop?
19:42 pmichaud or a while loop?
19:43 krzys while loop
19:43 pmichaud yes, seeing the full code would help
19:43 krzys where can I paste the code?
19:43 * pmichaud suggests http://gist.github.com/
19:43 PerlJam krzys: or see the topic
19:43 Tene there's also a nopaste listed in the channel topic
19:43 Tene http://paste.lisp.org/new/perl6
19:44 KatrinaTheLamia joined #perl6
19:44 Tene hi KatrinaTheLamia
19:44 krzys git://gist.github.com/212010.git
19:44 KatrinaTheLamia hai Tene
19:46 PerlJam krzys: ITYM http://gist.github.com/212010
19:46 Tene PerlJam: you can 'git clone' the url he gave.
19:46 krzys The file consists of 43k line of the form "2009-10-01 02:00;712,24;35,11;1902;87,65
19:46 Tene krzys: any change you could get a backtrace of the segfault?
19:47 PerlJam Tene: yeah, but you mean you *have* to git clone it to see the code, at least with http, you just point a browser at it.
19:47 Tene PerlJam: Sure.
19:47 pmichaud rakudo might not like the (my $line = ...)  in the while statement
19:47 lisppaste3 krzys pasted "rakudo problem" at http://paste.lisp.org/display/88759
19:48 jnthn That shouldn't make it segv.
19:48 pmichaud also note that $fh.get() might return a value that returns false but isn't eof
19:48 pmichaud I agree, it shouldn't make it segv, but lexicals can be a bit weird (especially in loops)
19:48 Tene and if it did, it shouldn't be only after 1.5k lines
19:49 jnthn Tene: Right. There's a nasty bug somewhere.
19:49 jnthn gc? :-/
19:49 krzys I've spotted right now, that one of the problems is, that second field is not a numer ...
19:49 pmichaud shouldn't have to be a numeral, fwiw.
19:50 PZt joined #perl6
19:50 Tene obviously the solution is to work around it and just use lazy lists instead.  You've got a branch with working lazy lists, right jnthn? ;)
19:50 krzys it's a something like 712,24
19:50 pmichaud as far as rakudo is concerned, everything here is strings anyway
19:50 pmichaud i.e., there aren't any numbers in this program
19:50 pmichaud (except for $count, which isn't being used fully)
19:51 jnthn Tene: erm, er, right here next to the one where I implemented a solution to the halting problem so we can do multi-dispatch *and* want. :-)
19:51 Tene jnthn: you mean the one where you can do multiple-dispatch on the results signature?
19:51 krzys but for example, the following code: {my @a=(); for 1..20000 -> $i { @a.push("724,34"); } }
19:51 krzys works fine ..
19:51 jnthn Tene: no...not the "s" word! :-P
19:52 * jnthn won't want to hear the word "signature" again after this branch
19:52 jnthn Well, not for a day or two anyway.
19:53 krzys pmichaud: I tried to remove 'my $line' from the while loop, but the effect is the same
19:54 Tene krzys: try: instead of pushing into an array, just do something else with the value, and see if it still fails.
19:54 pmichaud maybe just print it
19:54 Tene krzys: of course, the ideal help that we'd love is a core dump.
19:54 PerlJam krzys: or just try calling $fh.get 45K times  :)
19:54 lumi joined #perl6
19:55 krzys just tell me how to do it? I'm on MacOSX
19:55 Tene any MacOS users in the channel?
19:56 pmichaud I think a core dump isn't going to yet be all that ideal.
19:56 pmichaud I'd prefer to work out what construct is leading to the segfault.
19:56 * Tene nods.
19:57 jnthn A backtrace may be helpful too or give a clue too.
19:57 jnthn Though it may also not.
19:57 pmichaud I'd prefer to narrow it down to the .get, the .push, or the .split first
19:57 * PerlJam bets on the .get
19:57 pmichaud backtraces just tell us where things blew up, but not necessarily what lit the fuse.
19:59 jnthn pmichaud: Not necessarily, but occasionally it's possible to get lucky. :-)
20:00 pugs_svn r28804 | jnthn++ | [t/spec] Correct signatures in man-or-boy.t. Rakudo resig is a main again. :-)
20:00 jnthn s/main/man/
20:00 Tene krzys: does it fail if you replace the loop body with just printing the value?
20:00 NorwayGeek joined #perl6
20:01 NorwayGeek joined #perl6
20:01 krzys when I changed '@samples.push(@fields[1])' to '@samples.push("asdf")' it works :)
20:02 Tene Okay, that's progress.
20:02 krzys no, sorry!!! to fast
20:02 TimToady er, no, you're not too fast, rakudo is too slow :)
20:02 pmichaud try changing the push line to be just    say @fields[1];
20:02 krzys it worked when I removed '@samples.push...'
20:02 krzys from the loop
20:03 krzys pmichaud: it's running with 'say ...'
20:04 pmichaud okay, looks like it might be a problem with .push then.
20:04 Tene pmichaud: he says it worked with .push("asdf"), yes?
20:04 pmichaud he then said "too fast"
20:04 pmichaud so I think it failed then.
20:05 Tene OK.
20:05 pmichaud does it fail with pushing a constant string?
20:05 pmichaud try the original program again, but use this as the command line:
20:06 pmichaud parrot_install/bin/parrot -G perl6.pbc yourprog.pl
20:06 pmichaud (replace "yourprog.pl" with the name of your test script)
20:09 krzys pushing the constant string works ... I tested till 5000 lines not to wait too long
20:10 pmichaud hmmm
20:10 NorwayGeek joined #perl6
20:10 colomon MacOS X user on-line now....
20:10 pmichaud this sounds suspicious
20:10 pmichaud try adding the following line near the top of your program
20:10 pmichaud Q:PIR { sweepoff };
20:10 pmichaud then run it.
20:10 Tene jnthn: what's your current approximate ETA for resig branch?
20:11 justatheory joined #perl6
20:12 jnthn Tene: I'm hoping to be down to a handful of fails during tomorrow.
20:12 jnthn Tene: Like, few test files.
20:12 jnthn Tene: Really depends how many problems are really at the bottom of a bunch of the current failures.
20:13 Tene jnthn: great.  I just wanted to make sure that it would be done before we wanted to work on merging pcc branch in parrot.
20:13 jnthn Like, often one fix has solved many issues.
20:13 krzys pmichaud: sorry again, it also fails ... I found one clue
20:13 Tene FSVO "done"
20:13 jnthn Tene: Oh, I'm hoping to have this in before the Rakudo release.
20:13 Tene Ah, great.
20:13 krzys doing @samples.push("751,10") fails at $count=3851
20:13 jnthn Unless it's obviously going to cause issues, but I'm hopeful not.
20:14 Tene jnthn: maybe I'll take a look at it this weekend.  I could use a break from pcc. ;)
20:15 jnthn Tene: If you want a not-so-fascinating-but-easy task, there's loads of XXX TODO in bind.c for error message generation.
20:15 jnthn That is, to spit out Awesome errors.
20:15 jnthn Rather than the current less than awesome ones.
20:15 jnthn It's on my "things to do before merge" list.
20:15 krzys but doing @samples.push("x" x 40) crashes at $count = 1637
20:16 jnthn Tene: Or just pick a spectest that fails and go hunting. :-)
20:16 pmichaud sounds like a parrot bug somewhere.
20:17 jnthn pmichaud: GC off makes no difference though?
20:18 krzys what's more .... it's undeterministic !!!
20:18 krzys running the same code twice, I get different results
20:18 pmichaud jnthn: not all parrot bugs go away with GC off :)
20:19 krzys running with  @samples.push("xxxxxxxxxxxxxx");
20:19 pmichaud I don't know if GC off makes a difference or not.
20:19 jnthn pmichaud: ;-)
20:19 jnthn If it's undeterministic it tends to hint at a GC issue.
20:19 krzys for the first time it stopped around 1800, second time around 2996
20:19 Tene running a loop, just pushing repeatedly, causes no failures for me.
20:20 Tene my @acc; loop { @acc.push("x" x 40); say @acc.elems }
20:20 Tene but you're saying that that does fail for you?
20:20 Tene trying to reproduce here...
20:21 krzys but third, and fourth time it crashed the same as in the first pass
20:22 krzys I dont get it ... it's stable with crashing now
20:22 krzys Tene: the example, that you'are running works for me too
20:22 pmichaud .oO(  I'm so happy git lets me stage commits locally before pushing to the repo. )
20:23 krzys Tene: but when i read from the BIG file with $fh.get, then chomp, then split ... it crashes
20:26 krzys Generally, this code: { my @a=(); my $fh = open "dcs.csv"; while (my $l = $fh.get) { chomp $l; my @f=$l.split(";"); @a.push(@f[1]); } }
20:27 krzys breaks in perl6, when dcs.csv is file with ~43k line
20:28 Tene krzys: but it persists if you remove any of those? tried dropping the chomp?
20:29 krzys dropping chomp fails even faster ...
20:32 krzys but:  my @a=(); my $fh = open "dcs.csv"; while (my $l = $fh.get) { @a.push("123"); } }
20:33 krzys works fine ... so maybe it's a split problem !!!
20:35 Tene krzys: can you print out the results of the string before splitting, and the results of the split?
20:38 krzys Tene: that's what I'm trying to do right now: find the place in file where it fails
20:39 Tene krzys: just add something like this after each line: say "got line: $line"; say "got from chomp: {@list.perl}";
20:39 Tene etc.
20:39 kst joined #perl6
20:45 bhuron joined #perl6
20:46 krzys ok, so I've found that it's not reading the file that is contributing to the bug...
20:47 krzys the following code fails in rakudo: { my @a=(); for 1..20000 { my $ll="123;123;123;123"; my @f=$ll.split(";"); @a.push(@f[1]); } }
20:47 dalek nqp-rx: 4506dba | pmichaud++ | src/Regex/P6Regex.pir:
20:47 dalek nqp-rx: Add a custom parse method to Regex::P6Regex::Compiler that understands cursors.
20:47 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/4506dba6853ff8a1a0a26a2d5b1820b3cab691bf
20:47 dalek nqp-rx: c9a4f85 | pmichaud++ |  (2 files):
20:47 dalek nqp-rx: Clean up parse and !reduce methods.
20:47 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/c9a4f85b93a943aa36589c26c3060f311b515793
20:47 PerlJam so much for my horse in that race.
20:48 PerlJam I'm now going to say it's the push, because I already did a for loop with just the split and it worked fine.
20:48 PerlJam :-)
20:48 PerlJam (My other test case died just like krzys)
20:49 jnthn PerlJam: Died as in segfault?
20:49 PerlJam aye
20:50 krzys the same for me
20:50 jnthn Ah, at least it's not just one person. :-)
20:50 justatheory joined #perl6
20:50 krzys PerlJam: it must be split, since the code without it works: { my @a=(); for 1..20000 { @a.push("123"); } }
20:50 Tene Every time I see justatheory join, I'm reminded of the Buffy musical.
20:51 diakopter pugs: say 1; class Foo { say 2; class Bar { say 3 }; say 4 }; say 5
20:51 p6eval pugs: OUTPUT«1␤2␤3␤4␤5␤»
20:51 diakopter rakudo: say 1; class Foo { say 2; class Bar { say 3 }; say 4 }; say 5
20:51 p6eval rakudo d5a2ee: OUTPUT«2␤4␤3␤1␤5␤»
20:51 Tene ♪I've got a theory♪
20:51 diakopter # someone help me; which is correcter
20:52 justatheory Sorry, network here seems flaky
20:54 diakopter jnthn: any ideas on the above? is that a known issue  in rakudo? or the new right thing?
20:54 jnthn diakopter: I think that class blocks may well run earlier.
20:54 jnthn e.g. when constructing the class
20:55 krzys jnthn: should I file the bug?
20:55 jnthn Since things like methods etc should, ideally, boil down to calls on the meta-class for each thingy in the class.
20:55 mikehh joined #perl6
20:55 diakopter jnthn: why does 3 happen after 2,4 then?
20:56 jnthn krzys: Yes, segfaults are always wrong, and it seems more than one person can reproducable this one, so I guess there's a decent chance of solving it.
20:56 jnthn diakopter: Because we don't start constructing Bar in the middle of constructing Foo (rightly or wrongly)
20:56 PerlJam wow, split takes a long time.  I just commented out the line that does the split and the code ran quite a bit faster.
20:57 krzys jnthn: generally the code: { my @a=(); for 1..20000 { my $ll="123;123;123;123"; my @f=$ll.split(";");
20:57 krzys +@a.push(@f[1]); } }
20:57 krzys jnthn: fails in rakudo without any external dependencies
20:57 jnthn krzys: OK, that'll make a good bug ticket then. :-)
20:57 justatheory joined #perl6
20:58 nihiliad joined #perl6
20:58 krzys jnthn: where can I report it?
20:59 jnthn krzys: mailto:rakudobug@perl.org
20:59 jnthn krzys: Good news. It segfaults here too.
20:59 diakopter jnthn: better way to ask the question I guess: would it be wrong/harmful for sprixel to follow pugs' order in the 12345 above
21:00 PerlJam jnthn: when I do the release, I want to be able to put in the release notes that krzys found a nasty seg fault and jnthn (or someone) fixed it  :)
21:00 diakopter I mean, could the class ever need 'constructed' earlier than its declaration
21:01 jnthn diakopter: Well, it needs to be constructed before runtime (e.g. when the "say 1" runs.
21:01 jnthn )
21:01 _jaldhar joined #perl6
21:01 jnthn diakopter: Otherwise you can't, for example, get compile time checking of role composition conflicts.
21:02 jnthn PerlJam: Ewwww. I just caught the segv in the debugger.
21:02 jnthn PerlJam: A Context PMC - or something claiming to be one - has a trash vtable pointer.
21:02 diakopter jnthn: ok. seems to me this needs a bit of specification in the specificulations
21:03 TimToady S10:88 requires 12345
21:04 jnthn TimToady: Rationale?
21:04 jnthn TimToady: This would seem to imply that the construction of classes and the running of the class body happen at different times?
21:04 TimToady the class is constructed of declarations
21:05 diakopter TimToady: owe heigh
21:06 TimToady declarations happen at BEGIN time, not run time
21:07 jnthn TimToady: aha, OK.
21:07 jnthn TimToady: The bit of S12 I was going on for the other interpretation seems to no longer be in S12.
21:08 jnthn (It said something to the effect that the keywords in the class body, e.g. has and method, were dispatches on the meta-class, or similarish.)
21:08 TimToady well, I only added that bit to S10 in September
21:08 jnthn Maybe the bit in S12 went away then too. :-)
21:09 jnthn Anyway, happy to have a clear answer on this one.
21:09 PerlJam wait ... why should it be 12345?  If declarations happen at BEGIN time, then I'd expect 23415
21:09 TimToady the bodies aren't declarations
21:09 TimToady they just get run
21:09 jnthn PerlJam: The declarations the class body makes and the other non-declarative items in the class body are treated differently.
21:10 TimToady all packages are equal this way
21:10 krzys jnthn, PerlJam: I've just created the ticket [perl #69840]
21:10 PerlJam krzys: excellent
21:10 jnthn krzys: OK, the segfault looks...odd. I can't deal with it easily. Thanks for the ticket.
21:11 TimToady lunch (belated) &
21:11 jnthn My first guess is a GC marking failure of contexts.
21:12 jnthn (e.g. something isn't getting marked live that should be.)
21:12 PerlJam TimToady: so, you're just saying that the "names" (and other associated meta info) gets created at BEGIN time, but the actual execution of the code in the bodies happens in the "lexical order" of execution?
21:13 krzys jnthn: thank You for your hard work on rakudo!! I'm big fan of perl6 and rakudo esp. so I will try to use it
21:13 krzys jnthn: that's the only way to find bugs ...
21:13 jnthn krzys++
21:13 jnthn krzys: Yes, real world use exposes lots of helpful bug reports.
21:14 Tene krzys: thank you so much for finding this and helping us reproduce it.
21:14 PerlJam krzys: don't you think there should be some award given to contributors to perl 6? Say a giant butterfly statue or something.   jnthn and pmichaud would be first in line for the award, but moritz_ and masak would be following on their heels for sure.
21:15 Tene now that we're getting some real use bug reports, it might be nice to keep a log of people who contribute bug reports, and maybe mention it in the release announcements?
21:15 PerlJam I guess I'm  thinking too rakudo-specific now though
21:15 krzys jnthn: on march next year i'll be probabely in Bratislava for one day (on my way to Bad Hofgastein) - so if you would have some time we could talk :)
21:15 pmurias joined #perl6
21:15 jnthn krzys: Sure!
21:15 PerlJam but, in any case, there should be some sort of Camelia award for contributions to Perl 6.
21:15 jnthn krzys: Drop me mail.
21:15 jnthn Or catch me on IRC.
21:16 jnthn You can see our pekny hrad. :-)
21:17 krzys jnthn: I've beed to Bratislava a few times already ... but I didn't know that You live there
21:17 jnthn rakudo: module A { sub foo($x) { $x }; say foo() }
21:17 p6eval rakudo d5a2ee: OUTPUT«too few arguments passed (0) - 1 param expected␤in Main (file src/gen_setting.pm, line 206)␤»
21:17 jnthn rakudo: module A { sub foo($x) { $x }; say foo(42) }
21:17 p6eval rakudo d5a2ee: OUTPUT«42␤»
21:17 jnthn krzys: I've only been here about 18 months so far.
21:21 * jnthn is rather baffled by one issue in resig
21:22 jnthn Seems a sub's signature can't be found if it's invoked from within the module that declare it, but from outside of said module, it works fine. :-/
21:22 justatheory joined #perl6
21:22 quietfanatic joined #perl6
21:22 krzys PerlJam: Yes, You're right. Fantastic Four is really fantastic :)
21:25 krzys PerlJam: @fantastic_four=<jnthn pmichaud moritz_ masak>
21:25 krzys PerlJam: maybe it should be predefined constant in perl6 :)
21:27 jnthn pmichaud: ping
21:27 dalek nqp-rx: c381a19 | pmichaud++ | src/Regex/P6Regex/Actions.pm:
21:27 dalek nqp-rx: Handle quantified aliases like $<var>=(subrule)* .
21:27 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/c381a19306ec221d17cabb2da927ca8de0756b25
21:27 dalek nqp-rx: 3095780 | pmichaud++ | src/Regex/Cursor.pir:
21:27 dalek nqp-rx: Fix Cursor.parse to return a Match object.
21:27 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/3095780751b7a99a0aef864fca7bf8d904859986
21:27 dalek nqp-rx: 7c2e928 | pmichaud++ | build/Makefile.in:
21:27 dalek nqp-rx: Temporary bootstrap helper target.
21:27 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/7c2e9283687b77655758395859759b2076303ad8
21:28 jnthn .oO( that wasn't the pong I was looking for... )
21:30 jnthn Oh, ouch...I know what's wrong.
21:30 jnthn Very ouch.
21:31 jnthn pmichaud: unping, don't worry...I'll do the worrying. :-)
21:31 lumi joined #perl6
21:33 kst joined #perl6
21:36 Su-Shee left #perl6
21:40 SmokeMachine joined #perl6
21:45 quietfanatic rakudo: class dest { method DESTROY {say "Destroying"} }; my $x = dest.new;
21:45 p6eval rakudo d5a2ee:  ( no output )
21:45 quietfanatic rakudo: class dest { submethod DESTROY {say "Destroying"} }; my $x = dest.new;
21:45 p6eval rakudo d5a2ee:  ( no output )
21:45 quietfanatic How does this work?
21:45 quietfanatic rakudo: class dest { submethod DESTROY {say "Destroying"} }; my $x = dest.new; Q:PIR { sweep }
21:45 p6eval rakudo d5a2ee: OUTPUT«The opcode 'sweep' (sweep<0>) was not found. Check the type and number of the arguments␤in Main (file src/gen_setting.pm, line 206)␤»
21:45 quietfanatic rakudo: class dest { submethod DESTROY {say "Destroying"} }; my $x = dest.new; Q:PIR { sweep 1 }
21:46 p6eval rakudo d5a2ee:  ( no output )
21:46 quietfanatic rakudo: class dest { submethod DESTROY {say "Destroying"} }; my $x = dest.new; Q:PIR { collect }
21:46 p6eval rakudo d5a2ee:  ( no output )
21:46 quietfanatic rakudo: class dest { submethod DESTROY {say "Destroying"} }; do {my $x = dest.new}; Q:PIR { collect }
21:46 p6eval rakudo d5a2ee:  ( no output )
21:46 quietfanatic rakudo: class dest { submethod DESTROY {say "Destroying"} }; sub x {my $x = dest.new}; x(); Q:PIR { collect }
21:46 p6eval rakudo d5a2ee:  ( no output )
21:47 jnthn quietfanatic: As far as I know, nyi
21:48 quietfanatic I thought it was implemented before, but maybe I was using Pugs
21:48 jnthn In theory, it shouldn't be too hard to implement.
21:49 quietfanatic I need to free some malloc()ed memory on an object's destruction.
21:51 jnthn quietfanatic: That'd be The Thing To Use then.
21:59 justatheory joined #perl6
22:01 houghton joined #perl6
22:16 pmichaud jnthn: (ping/unping)  -- sorry, I had closed the irc win so I could concentrate a bit.
22:16 jnthn pmichaud: It's OK. It's not something I feel like fixing tonight.
22:17 jnthn pmichaud: Basically, the reason module A { sub foo($x) { }; foo(42) } doesn't work...
22:17 Limbic_Region joined #perl6
22:17 jnthn ...is because now we foo to have had it's signature object attached
22:17 jnthn However, since we're evaluating the body of the module at loadinit time still, it's not attached yet.
22:18 mattastrophe joined #perl6
22:19 pmichaud I like that the bodies now run canonically instead of at BEGIN, though.
22:19 pmichaud that's very helpful.
22:19 jnthn pmichaud: Yes, that spec clarification earlier today means we can fix this...
22:19 pmichaud s/canonically/normally, as in immediate blocks/
22:20 pmichaud it means we can fix a lot of things.
22:20 jnthn It just means we need a good way to split out the declarational thingies.
22:20 jnthn And the other bits.
22:20 pmichaud that part can be figured out
22:20 jnthn Well
22:20 pmichaud but I'm glad to have learned this before this weekend, since NQP will want to follow the same approach
22:20 jnthn Issue is when.
22:21 jnthn If after resig, we're going to have to regress some tests.
22:21 pmichaud can we just update rakudo (trunk) so that it doesn't execute class bodies at BEGIN ?
22:21 jnthn Well, we still need to create the classes at BEGIN, though?
22:22 pmichaud we can immediate-invoke the part that creates the classes but not its body
22:22 jnthn Or are you thinking we might just get away with it?
22:22 pmichaud i.e., move the nodes that create the classes outside of the class block
22:22 lumi joined #perl6
22:22 jnthn pmichaud: Right.
22:22 jnthn pmichaud: I'm not sure how easy/hard that is. I can try tomorrow.
22:23 pmichaud I think it's easier than it might look at first.
22:23 pmichaud it's certainly more natural overall.
22:23 jnthn Wonder if this means we can fix the lexicals in classes bug. ;-)
22:23 pmichaud Yes, this will fix that.
22:23 jnthn \o/
22:23 jnthn Win.
22:23 pmichaud might be a challenge with parametric roles, though
22:24 pmichaud because of the lexical parameter
22:24 pmichaud anyway, I'm guessing solvable, without too much effort.  But more effort/thought than you probably want to put in place tonight.
22:24 jnthn Aye.
22:25 jnthn Yeah, it's the parametric roles bit that bothers me more here...
22:25 tann joined #perl6
22:25 pmichaud I could be wildly wrong on this point.  But I'm very happy for the spec change.
22:26 jnthn oh argh
22:27 jnthn I've just realized what's going horribly horribly wrong...
22:27 jnthn (on a different problem)
22:29 krzys goodnight
22:29 jnthn night, krzys
22:30 Whiteknight joined #perl6
22:31 envi^home joined #perl6
22:51 justatheory joined #perl6
22:53 Confield joined #perl6
23:00 kst joined #perl6
23:00 ihrd joined #perl6
23:05 ihrd joined #perl6
23:20 brunov joined #perl6
23:26 * jnthn -> sleep, o/
23:29 justatheory joined #perl6
23:37 kst joined #perl6
23:54 mtnviewmark joined #perl6
23:57 TiMBuS joined #perl6
23:58 kst joined #perl6

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

Perl 6 | Reference Documentation | Rakudo