»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moderator on 10 October 2009.
__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:00
quietfanatic so, is there a way to access memory locations by number in Perl 6 or Parrot? 00:02
This ability will make writing Link::C a lot easier. 00:03
00:17 kst joined 00:23 Chillance joined 00:29 rgrau joined
quietfanatic Never mind, if I want behavior, I can write it in C and link to it. :) 00:30
It's as easy as Link::C::link <libc.so.6 stdlib.h>; 00:32
(plus a little bit of trickery) 00:35
00:47 rhr joined 00:51 lumi joined 00:52 eternaleye joined 00:58 lichtkind joined 01:17 kst joined 01:26 KyleHa joined 01:36 orafu joined 01:39 agentzh joined 01:44 KyleHa joined, lumi joined 01:53 rhr joined, JimmyZ joined 02:04 envi^office joined
dukelet0 how does a lowly mage such as I convert foo.nqp into foo.pbc ? 02:09
02:10 lumi joined 02:15 lumi joined 02:22 rhr_ joined 02:25 tak11 joined 02:35 petdance joined 02:41 kst joined 03:09 am0c joined
dukelet0 a magic unicorn (also known as japhb) answered my question 03:18
03:22 xenoterracide joined 03:24 sparc joined, kst joined 03:28 lumi joined 03:39 Bzek joined 03:53 tak11 joined 03:55 tak11 joined 04:25 mikehh joined 04:39 Confield left 04:50 kst joined
pugs_svn r28800 | lwall++ | [type-based.t] supply missing Stone class, remove spurious semicolons 05:24
05:27 charsbar joined 05:30 zloyrusskiy joined 05:37 desertm4x joined, envi^home joined 05:47 kst joined, nbrown joined 05:51 quietfanatic joined
moritz_ \\o/ 06:19
06:23 justatheory joined 06:29 Su-Shee joined
Su-Shee good morning. 06:29
06:29 ShaneC1 joined 06:30 nbrown joined
moritz_ oh hai 06:33
06:34 flip214 joined
flip214 rakudo: say "r\\rf\\fg\\gx" 06:34
p6eval rakudo d5a2ee: OUTPUT«r
flip214 rakudo: say "\\rhello world\\n" 06:36
p6eval rakudo d5a2ee: OUTPUT«
06:37 meppl joined
flip214 rakudo: say "\\x0bHello" 06:37
p6eval rakudo d5a2ee: OUTPUT«
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>)␤»
flip214 rakudo: say "\\o014Hello"
p6eval rakudo d5a2ee: OUTPUT«
flip214 hmmm ... IRC doesn't take readline's "kill-line" 06:39
rakudo: say "\\r\\nHello"
p6eval rakudo d5a2ee: OUTPUT«
06:39 kst joined 06:50 iblechbot joined 07:08 ihrd joined 07:09 ihrd left 07:11 mariuz joined 07:24 donaldh joined 07:25 _jaldhar joined 07:50 masak joined
masak morning, seekers of Perl 6! 07:52
07:52 kst joined 07:54 mariuz joined 07:55 mariuz joined 07:56 mikehh_ joined 07:57 mariuz joined
masak moritz_++ # perlgeek.de/blog-en/perl-6/an-entry...omers.html 07:57
07:59 lumi joined
Su-Shee masak: haven't we all found perl 6 already? :) 08:01
masak Su-Shee: that's a very deep question. :) 08:02
what does it mean to "find" Perl 6?
mathw If I achieve Perl enlightenment today, it's only because I'm too tired to realise it's an illusion
masak Perl 6 is already here, it's just unevenly distributed. 08:03
another day of Rakudo not building locally... I should really do something about that.
mathw yes
yes you should
mathw needs sleep 08:04
masak for the first time in ages, I actually slept well, and on a resonable set of hours, tonight. 08:05
I'm still tired, but in a warm, happy sort of way.
and this was after a 90 minute swimming session, and a quite successful debugging session with Rakudo. :)
mathw nice 08:09
I'm not sleeping at all well at the moment
Too worried
masak hugme: hug mathw 08:10
hugme hugs mathw
mathw After Wednesday it'll all be over 08:17
masak it? 08:19
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:20
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
Although I'm told I still sound the same, it doesn't *feel* the same, it's like hanging onto something by your fingernails
masak sounds less than ideal. 08:22
the situation, I mean.
mathw yes 08:24
the band's got too many people in it
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
too many singers/guitarists/bass players spoil the band
I want to be in a proper band
really need to make more of an effort with that
but it's not something you can just conjure up 08:26
moritz_ "Zu viele Köche verderben den Brei" ;-)
Su-Shee mathw: well in german cooks spoil the mash ;)
moritz_: :)
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."
Su-Shee masak: soup? 08:28
moritz_ broth, mash and soup - nice
mathw the mash is the odd one out there really 08:29
but you could probably use the mash to make some sort of dumpling and cook it in the broth
08:29 NorwayGeek joined
masak Su-Shee: aye, soup. 08:29
we don't really have broth in our collection of archetypical meals in Sweden. 08:30
I mean, I know what it is, but...
mathw It's more of an ingredient
masak something like that.
mathw But it's fundamental to a lot of good cookery
So if you spoil it...
masak oh, yes.
mathw And sometimes 'broth' is the name for a particular kind of soup
Su-Shee well broth is broth and soup is just sometimes made with broth. 08:32
mathw yes
mathw tries to figure out why a subprocess appears to be able to kill the perl interpreter which spawned it
have to think in perl 5 again now :( 08:33
moritz_ $SIG{CHLD} = sub { dump }; # nice and easy 08:34
mathw IT doesn't help that one of my colleagues has tried to improve the structure of the script in question 08:36
and has in the process made a confusing mess
I think I'll deal with that first
08:44 NorwayGeek_ joined, dakkar joined 08:45 NorwayGeek_ joined
masak ahem. 08:45
may I present a new coding pattern. 08:46
I fittingly call it "The Ultimate Security Vulnerability"
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')
p6eval rakudo d5a2ee: OUTPUT«5␤»
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?
moritz_ tries to wrap his head... and fails 08:48
mathw sees nothing special
masak hm, the example above might not be 100% clear in showing that...
mathw you're just running a closure with eval in it
which is of course dangerous
masak mathw: the important part is that the two statements in a string are executed within the class A.
but using the environment containing $x. 08:49
we're essentially making $x visible to the class A. 08:50
moritz_ so you work around the out-lexicals-not-visible bug?
masak hm, that wasn't my goal, but I guess it could be used for that. 08:51
08:51 rfordinal joined
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)␤»
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
p6eval rakudo d5a2ee: OUTPUT«42␤5␤»
sjohnson morning! 09:02
how's it going masak
masak sjohnson: morning! the goings are fine, as far as I can see.
sjohnson: how about you?
sjohnson well, hopefully i don't get in trouble for this
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.
sjohnson it was the only frontpage news of cnn last night
basically a kid was thought to have been in an airballoon floating 7000ft in the air 09:04
for a few hours
then found out to be that he wasn't in it
mathw It's a total hoax
sjohnson which result in panic that he jumped off
mathw Very irritating
sjohnson then they found him having taken a nap
mathw: plz2explain
mathw Almost as irritating as my colleagues altering my script but leaving the comments all out of date 09:05
And filling it with spelling mistakes
sjohnson ... was it really that bad?
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
sjohnson that is definitely true
a lot of plausible hoax facts are going around 09:06
my belief is that the story caught fire, ppl didn't question the facts, cnn had coverage, and exploited it
not so much a hoax, just that people will "tune in" to something interesting
and see what the developments are, ignoring thoughts like "could it even happen?" 09:07
mathw I guess so 09:08
In the mean time, they alter scripts in clumsy ways and don't update the comments
The indentation isn't even consistent anymore!
sjohnson there might be great justice though
mathw It's like there's a conspiracy to make my Perl look bad and undermine all my advocacy
sjohnson the parents were probably stressed out enough with the media 09:09
then their kid falcon hints with obscrubed that it might have been scripted
sorry, obscured english
either the kid wins the troll award for 2009 for trolling the entire world
or the kid wins the failblog award for 2009 for saying that the dad said it was part of an act 09:10
mathw And lots of journalists get in trouble for wasting time on a non-story 09:11
I like that thought
moritz_ mathw: never ascribe to malice what you can ascribe to incompetence (re: your perl advocacy)
masak moritz_: any sufficiently advanced incompetence is indistinguishable from malice. just sayin'. 09:12
mathw moritz_: true
One of my colleagues even hast aht on his desk
moritz_ masak: :-)
mathw He has not had any involvement in this abomination though
masak that's an excellent idea. I'll make a little note and put that by my desk, too! 09:13
jnthn oh morning
mathw oh hai jnthn
masak jnthn! 09:14
moritz_ \\o/
masak I'm still giddy with joy over jnthn being back from vacation. :) 09:15
jnthn :-P 09:17
mathw It is quite exciting isn't it
Especially when the first thing he starts doing is the signature work
jnthn But...all I've done is made a branch that fails 10% of the test suites. :-P
moritz_ now we just have to make him fix RT #69798 with the new binder
jnthn wonders which bug that one is 09:18
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([], {})
p6eval rakudo d5a2ee: OUTPUT«2␤»
moritz_ not quite
mathw: make irclog.perlgeek.de/perl6/today your terminal :-)
mathw that's not quite as convenient
jnthn Just saw the ticket. 09:20
Not got a clue how on earth that is so messed up.
mathw it is pretty though
jnthn Not sure I want to find out either...
But I rather doubt the new binder will have that bug. :-)
moritz_ jnthn: maybe it tries to bind both arguments to the same lexical with name '$' 09:21
or something like that :-)
jnthn moritz_: Oh
That'd make sense.
And be very silly too.
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.
It's doing that because today we bind into the lexpad and then type check, or something like that.
The new binder type checks without caring about what the name of the parameter is.
sjohnson wishes the child in the balloon had pErl Vi spraypainted on it
jnthn sjohnson: Heh. I love how the media were like "lol awesome potential disaster let's give it prime time" 09:23
And then got owned.
sjohnson jnthn: they are probably discussing amonst themselves what "trolled" means, after many internet posts to their sites 09:24
jnthn haha
sjohnson and started reading about humanoids living under bridges
with no answers
this kid might actually win the world internet award for trolling Earth 09:25
can't think of anyone that can beat him yet
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
moritz_ "tens of thousands are victims of fisting attacs" or so
jnthn :D
lol!
Su-Shee moritz_: *haha* seriously? who? :) 09:28
moritz_ Su-Shee: tagesschau.de
or was it ZDF? not sure...
sjohnson moritz_: www.youtube.com/watch?v=QMmG9TrYyAE <--- weirdest german thing i saw today
moritz_ www.heute.de/ZDFheute/inhalt/31/0,3...83,00.html 09:29
09:30 am0c joined
moritz_ ok, ZDF it was 09:30
jnthn lol
jnthn is amused 09:31
Su-Shee is highly amused :)
masak ...ouch...
09:35 lumi joined
sjohnson passes a "thank you" chocolate to Su-Shee 09:37
with orange flavouring
(´ー` ) 09:39
09:45 eMaX joined
sjohnson alright dudes 09:47
my twin bro programs in C, hates perl5, likes ruby because of perl5 limitations
and he is now at the short window of curiosity of why perl6 might kick ruby's ass
not so start a flame war, but i've been trying to persuade him that perl 6 will "make him shit bricks" 09:48
and he asked for like some sort of changelog-like text that might convince him
... plz2convert brother
*meanwhile... brother has found perlcabal.org/syn/Differences.html* 09:49
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.
Su-Shee (and what p5 limitions compared to ruby? speed? ;)
sjohnson Su-Shee: he is my brother
not just some internet guy i'm trying to persuade
his biggest gripe was the %${} type stuff with regards to trying to get data from a very complex hash 09:51
and i know he saught ruby as the answer
Su-Shee: my biggest gripe against p5 vs ruby 09:52
is a built-in whitespace trimmer
im sure anyone here knows how adamant i am about this, so i won't go on unless you ask
he also hates it
that makes 3 ppl who are on my perl5 crucade .... *depression dog face*
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:53
sjohnson thats what i am saying 09:54
just that he doesn't realize that perl 6 is going to be a big deal in his life
and has switched to thinking Ruby is the best scripting language
for good reasons, i might add
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
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
yet every other programming language supports it
Su-Shee probably. anyway. I don't like ruby or python, so I need no convincing of any kind. :)
masak
.oO( talking at cross purposes detected )
sjohnson im just sick and tired of ppl telling em it's not "imporant" 09:57
it would be better if they said "i don't use it. no comment"
Su-Shee sjohnson: which is what I said. I said "I found it" and not "it is."
sjohnson "unbelievable unimportant"
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
sjohnson: I mean, they use special flags to enable 'say'.
Su-Shee yes. properly declared as my personal opinion and not a fact. ;)
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"
masak sjohnson: good luck.
sjohnson masak: it is an uphill battle 10:00
as i'm sure you know
masak it's very easy to imagine, yes.
don't let Perl 5 grind you down in the process. we need you jere.
s/jere/here/
sjohnson the only reason i came here
was because perl 6 had a trim() method
on the string stuff
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?
sjohnson i even considered swithcing to python / ruby for my scripting needs, but perl is jsut too good, it is impossible to leave
masak it's not a binary choice.
sjohnson it's like trying to leave a wife that you always loved, and the hate was superficial and temporary
but this lack of a simple whitespace trimmer in the core disturbs me to no end 10:02
the only reason i gripe about it, is because p5 will be around for a while, prior to the p6 transition
even PHP, which i consider a mickey mouse language, has the trim function 10:03
python has it, even java has it
yet ppl insist on declaring their own functions to achieve this universal result, or relying on downloading cpan packages
i dont blame cpan, but this becomes a huge problem when you migrate systems 10:04
and all of a sudden, in an emergency, you get an @INC error
for something so simple
that any other language has
.. even p6 has it. if the ppl that say "just write a sub { l33t regex } for it"...
should those people not say that that the perl6 team should then remove this string mehtod 10:05
becuase you can simple write a regex for it?
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
10:06 jferrero joined
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:06
because it encourages some sort of purist attitude 10:07
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
works for one bed, then i switch beds by life's randomness
and the tick comes back
and i keep having to apply the same remedy
mathw hugme: hug sjohnson 10:09
hugme hugs sjohnson and blushes
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
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
mathw But I agree that it should be part of the core library in any language with a wish for effective string handling
because when I do need it, it's irksome
sjohnson hugme: hug mathw 10:11
hugme hugs mathw
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
so it's not like there isn't precedent for adding new core functions
sjohnson perl is considered the master language of text handling, yet it doesn't have a whitespace trimmer
it almost sounds like i should hit the canned laughter button
members.shaw.ca/smujohnson/snd/garlaff.mp3 10:13
mathw Just remember
The same people advocating notincluding trim in perl 5 are not the people who put trim in Perl 6...
(probably)
sjohnson yes i realize that
yet you are the only one that has EVER agreed with me on this point, at least slightly
in my life on this planet Earth 10:14
i get laughed at, teased, etc etc
argued against
mathw I seem to be in this position a lot lately
sjohnson :) 10:15
the position of defending the underdog, or defending yourself as the underdog? 10:16
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.
mathw The position of having someone say to me you're the only person who seems to get it
sjohnson you told me yourself that you thought this was annoying 10:18
like, a month ago
masak: :) 10:19
mathw yes I believe I did
10:19 petdance joined
mathw trim(): The Movie? 10:19
sjohnson i have talked to a few agents, and they are intersted in the idea 10:20
to jump on the "technology" bandwagon
heres the deal. the only programming language that is still somewhat used, that doesn't have this, is javascript 10:21
i can't believe that i am alone in this
python programmers use this one example as an argument to use python instead
mathw If Perl 5 strings were object-oriented it would probably be a lot easier
Because adding a method is no problem compared to adding a core function
but... use feature
sjohnson something HAS to be easier than having to bust out raw regex to do it
mathw anyway, I can't debate it, I can just agree with you, because I'm not a Perl 5 Porter
sjohnson and less of a pain in the butt 10:22
well i have discussed the matter at length in p5p
i was only arguing because ppl seemed to disagree
and i felt i had to state my case
unfortunately, someone has asked me to provide 1) a good case and 2) the patch code
unfortunately, i wasn't born with a manual that explains how to provide patches to perl 5 devel 10:23
i'm kinda worried
i have no fucking clue what i am doing 10:25
but would fight to death to get this included in p5, for the beautiful transition to perl6
masak sjohnson: I'd say learning how to provide a p5p patch should be pretty high on your agenda right now. 10:27
sjohnson i believe i could focus on perl 6 fully if i could tie up this one loose end 10:28
plz2give me hintz
mathw I have no clue. I looked at the Perl 5 source code once and it took me a few weeks to recover
sjohnson i feel like tom cruise in jerry mcguire 10:30
avar So you just want to add trim() to p5 core? 10:41
is there a perl5-porters thread on this subject?
sjohnson avar: there is, yes. are you wondering why i didnt just go there? i am just debating 10:42
avar I just want to read it 10:43
What prototype would trim() have?
would it work in-place like chomp()?
could you do trim(@list) ?
sjohnson just as far as $var = trim($happy); 10:45
or trim($happy);
there is a cpan mod that does this already, i believe it is Text::Trim 10:46
even provides ltrim and rtrim as PHP does
if this was implemented in p5, i would die a happy man
if my life meant something towards its inclusion
avar Why do you want it in core? Why not just use Text::Trim? 10:47
sjohnson because i migrate often
and @INC errors plague me, especially in emergencies
when code i use and reply upon, uses CPAN libs, for something goddamn simple
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
10:48 Bzek joined
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?
sjohnson sorry, Javascript 10:49
not Java
masak avar: sjohnson means, that when on a new computer, he doesn't have Text::Trim installed anymore.
BinGOs you probably meant 'except'
sjohnson i do mean except yes
BinGOs I have the same problem with POE >:)
masak I have the same problem when running Perl 5.10 :)
Su-Shee masak: there's no rakudo installed then? ;) 10:50
sjohnson Su-Shee: my point exactly. no rakudo
moritz_ buubot: eval: use v6; say '\\o/#
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.
sjohnson which is extremely common place in ppl's day to do working environments until the switch happens
10:52 kst joined
sjohnson avar: let me give an example of how annoying it is. imagine that a programming language had an addInteger() function 10:52
and you used 5+5
on a system, then switched, forgetting to use cpan and install the addInteger package
or intFuncs :) package
and then the red alert signal happens 10:53
and because of an emergency, you are forced to bust out cpan
avar haha
sjohnson instead of focussing on something more important
when other shit is at stake 10:54
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
trimmer, in its core basic install
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
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.
sjohnson avar: try including that regex in 80 scripts you right
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
sjohnson avar: we're not talking about financial calcuations, we're talking about a _whitespace_ trimmer 10:57
avar: go join PHP, java, python, vb, ruby, and other languages
avar I know what you're suggesting. I'm just saying there's no reason to have it *in core*
sjohnson and go argue how they should take out their base whitespace trimmer, cause it isn't needed, instead of arguing against my proposla
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
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."
sjohnson which i find myself using
masak moritz_: that's the most different so far. :)
sjohnson if it means it might be a step in the right direction
moritz_ which can be roughly translated to "more cooks => more mess"
masak moritz_: the others talked about the soup or broth, but this... yes.
it's about the side effects of the process, not the result. 11:00
moritz_ aye
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
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
masak sjohnson: be nice. avar is. :)
avar I didn't say it would take 15 years for *you* to upgrad, but for the entire Perl userbase
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.
sjohnson i'm just trying to set a starting point
Su-Shee avar: *hihi* we do, yes. :)
sjohnson it has to happen now or never, simply put
i don't have a time machine
but i can at least change what i believe to be a flaw in "function lacking"
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.
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.
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
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:05
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
sjohnson let's not just use the term "any function that someone wanted"
let's use something that is a bit outside the spectrum of something simple
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
sjohnson don't use PHP as the trump card
like i said, be realistic 11:07
everyone and their dog knows that PHP includes everything by default
masak lunch &
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:08
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
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
i already got teasted on the internets for being excited about perl 6 having a whitespace trimmer
whenever every other goddamn language used now already has it 11:11
and yet i still stick with perl
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:12
sjohnson moritz_: i thought about this during the day 11:13
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_ dev.perl.org/perl5/source.html
sjohnson after that, i am like a guy sorting through a bombwreck in his house, for a key to car
moritz_ on that site is a link to the perlrepository documentation 11:15
sjohnson is earnest 11:16
.. not Ernest Goes to Perl School
BinGOs sjohnson: I answered your there is no guide. question earlier. 11:17
perlhack and perlguts documents.
sjohnson may i ask this one question: who can i talk to, an actual person, an irc name 11:18
who might possibly consider my proposal, given a good (and emotional) case?
being redirected to groups has led me worse than here
x 5 people making fun of me
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
or at least disciples / trustees
BinGOs I'm not sure there is a pumpkin at the moment.
moritz_ sjohnson: yes, but he's not all that involved with the perl 5 porters anymore
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
looks like i am little timmy at thanks giving on those Xmas programmes you see on tv
moritz_: BinGOs : avar : masak : thanks for the tips 11:21
BinGOs it is easier to put a needle in the eye of a camel .... 11:22
er
>:) 11:23
moritz_ than to pull it out without being kicked?
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
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
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.
moritz_ sjohnson: I didn't talk about IRC kicking, but about the camel kicking you if it pokes you
Su-Shee sjohnson: actually I totally wouldn't get the comparision if I were porter.
sjohnson BinGOs: someone mentioned an argument to get Text::Trim included in the perl modules
BinGOs oh as a core module. Yeah, that would be way easier than hacking at perl internals. 11:25
just drop Text-Trim distribution into cpan/ directory and there you go.
sjohnson that will make it a core module? 11:26
p5p told em it wasn't that simple
BinGOs oh and other shit.
sjohnson i offered handjobs, and that still didn't succeed
i don't know how moving it into a diff dir will do any good
11:26 icwiener joined
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
11:29 charsbar joined
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:29
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
that perl5 without a white space trimmer is like using one of those cellphones that is a foot long, because it
does the job
instead of using something 1/16 the size 11:31
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:34
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:37
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:39
or have to explain my case 11:40
11:41 colomon joined
sjohnson or use a goddamn core module 11:42
or depedency
jnthn o_O
sjohnson i'd start with one
but i'm trying to envision an ideal case
moritz_ jnthn: how's the branch coming?
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
that message might have been too long
moritz_ truncated after "so the"
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
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. :-/
moritz_: So it's not gone far at all since Wednesday. I plan to change that later today. :-)
moritz_ sounds like "fun"
speaking of plans...
jnthn moritz_: Well, apart from the postfix/sasl crap, it was great. :-) 11:45
moritz_ I have two ~1hr train travels this weekend
and might spend them on book writing
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
jnthn Yay. :-)
moritz_ jnthn: are you planning to fill out details about the object system over the weekend?
sjohnson literal: it's not like were using tar with tape drives. we should also abondon regex for simple reasons.. ?
moritz_ jnthn: just want to avoid duplicate work 11:46
jnthn moritz_: Yes, I really want to start on that.
moritz_ ok
jnthn And the weekend would seem a good time.
moritz_ so I'll focus more on MMD
jnthn Cool. :-)
sjohnson literal: following suit with other languages that use trim($var) or $var.trim? why bust out the regex for something so simple
moritz_ and maybe start with explaining either grammars or ops/subs
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
that can't be better solved with default values instead
jnthn moritz_: We use that in Test.pm. 11:48
iir
c
literal sjohnson: yeah, the problem is backwards-compatibility, and Perl 5 code-unwieldiness, the same reason I believe they started the Perl 6 project
jnthn But maybe "default values would be better" applies there too.
moritz_ it does
literal sjohnson: so, in a way, this problem has already been "fixed"
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
11:49 zamolxes joined
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
without having to use a macro, cpan, or complex regec
x
literal sjohnson: I guess they consider those features to be general enough
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
and im not saying that to be a dick
literal see List::MoreUtils 11:51
sjohnson is seeing
i see the uniq thing being quite handy, as in p6 11:52
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?
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
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"
sjohnson arthur-- 11:56
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_
sorry
accident paste
12:02 JimmyZ joined 12:09 kst joined 12:10 payload joined 12:21 takadonet joined
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:21
takadonet morning all 12:23
masak takadonet: \\o
moritz_ I do have one example though 12:27
substr
the four-arg form has to bind with 'is rw'
so it needs a different candidate than the other forms
masak indeed.
that's a good example. 12:28
moritz_ but I don't know if it's a good example, because it's fairly involved
masak it's good in the sense that it actually describes the need for this.
but yes, it might be a bit involved.
moritz_ rakudo: sub a($x is rw) { $x = 5 }; my $z = 9; a($z); say $z; 12:29
p6eval rakudo d5a2ee: OUTPUT«5␤»
moritz_ rakudo: sub a($x is rw) { $x = 5 }; a(3)
p6eval rakudo d5a2ee: ( no output )
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
masak cheers jnthn on 12:31
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
After that is done, though, yes, it's trivial to handle in the new binder.
moritz_ heads off for the weekend 12:36
12:37 colomon joined
jnthn moritz_: have a good one. :-) 12:37
masak moritz_: haveagoodweekendseeyou! 12:40
12:44 Chillance joined 12:50 NorwayGeek joined 13:05 icwiener_ joined 13:06 payload joined 13:07 mzedeler joined
mzedeler Hi 13:07
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:09
No comments - alright - will post on mailing list. 13:11
PerlJam Hmm. 13:23
mzedeler needs to calibrate his patience knob a little methinks.
good morning all
13:24 NorwayGeek_ joined 13:26 arthur-- joined 13:32 ihrd joined, ihrd left 13:37 kst joined 13:47 eMaX joined 13:51 payload joined
masak nod. 13:52
PerlJam: morning! 13:53
jnthn OK, some fun with a HTTP debugger later... 13:55
Rakudo Time!
masak \\o/
14:02 FOAD_ joined
jnthn starts by trying to work out how on earth he's failing radix.t so epicly... 14:03
It's my last failure it all of the S02 tests.
masak not so strange, is it? radixes have the syntax of named arguments, no? 14:05
masak likes pop science explanations
jnthn masak: Thing it's nothing to do with that.
masak oki. 14:06
jnthn *think
rakudo: for 2..4 { say +":{$_}<11>" == $_ + 1 } 14:07
p6eval rakudo d5a2ee: OUTPUT«1␤1␤1␤»
jnthn eww. It's something to do with $_ handling, I think.
rakudo: for 2..4 { say "{$_}"; } 14:08
p6eval rakudo d5a2ee: OUTPUT«2␤3␤4␤»
jnthn aha. Golfed.
14:09 Psyche^ joined, sandip joined 14:11 KyleHa joined
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
it's a very organized, delimited part of the process.
jnthn Well, apart from at the start of this process it was more than slight. 14:14
masak jnthn: I usually handle smaller test suites than you do. :) 14:15
KyleHa moritz++ # perlgeek.de/blog-en/perl-6/committing-crud.html
14:17 estrai joined
jnthn commits crud occasionally 14:18
masak I try my best to write quality code. sometimes, I fail. 14:19
PerlJam Keep moving forward. 14:20
(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.
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:24
Juerd Is it confession time again? :) 14:25
I usually don't commit crud, because I'm to dumb to use revision control in the first place. 14:26
s/to/too/
14:27 JimmyZ joined
jnthn ;-) 14:27
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 ;)
masak :)
jnthn I don't commit crud if I think pmichaud might read the commit log.
Juerd Fear the peer. 14:30
jnthn ;-)
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.
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.
Su-Shee I have a vim syntax hilighting for "sentence too long" and "buzzword" and the like :) 14:38
jnthn Hmm.
Should named parameters factor into arity?
I hadn't thought so. 14:39
masak jnthn: you mean compulsory nameds?
jnthn arity.t, however, feels differently.
masak: compulsory ones for .arity, and optional ones for .count
masak: My question is, should nameds be accounted for when computing either?
It seems Rakudo does so today
masak doesn't know 14:40
jnthn rakudo: sub o_two ($x, :$y!, :$z) { }; say &o_two.arity
p6eval rakudo d5a2ee: OUTPUT«2␤»
jnthn rakudo: sub o_two ($x, :$y!, :$z) { }; say &o_two.count
p6eval rakudo d5a2ee: OUTPUT«1␤»
jnthn oh hey
.arity *does* factor in nameds, and .count doesn't, today
Oh, and we have todo tests for that.
Woodi : delimits $self
jnthn Woodi: ...huh? 14:41
Woodi: Oh, I see what you mean. No, not here it's marking a named param.
Woodi looks .arity do not count $self - object value...
PerlJam ETOOMUCHCOLONOVERLOAD
jnthn That's what happens when Larry gets the colon. 14:42
;-)
Woodi: Is this a separate thing or related to the current discussion?
Woodi: None of the examples I've posted have an invocant.
14:42 payload joined
Woodi jnthn: related but just my thinking. i mean: .arity do not work on object-like notations... 14:44
14:45 pjcj joined
jnthn rakudo: class A { method foo($x) { } }; say &A::foo.arity 14:45
p6eval rakudo d5a2ee: OUTPUT«2␤»
jnthn Woodi: Seems to count it. 14:46
(It does in resig too)
Woodi so nvm...
jnthn Eh, I'll make Rakudo do what the tests say, I can't find anything to suggest to me otherwise.
The number of required parameters a subroutine has can be determined by 14:47
calling its C<.arity> method:
$args_required = &foo.arity;
Is what the spec says.
It doesn't say only positionals.
oh hey, now we pass all of arity.t
Win.
Woodi and bug was ? 14:48
jnthn Woodi: .arity and .count in resig didn't account for named params.
Only positional.
Woodi: In master, .arity did account for them and .count (I guess wrongly) didn't.
Now they're at least consistent, and do what the tests expect. :-) 14:49
14:50 nihiliad joined
dukeleto moritz_: i like your idea of a 'newbie' channel. 14:50
14:51 iblechbot joined 14:52 kst joined 15:01 houghton joined
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:03
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:06
15:20 SmokeMachine joined
TimToady I'm really tempted to remove .arity and .count from the language so that people won't try to use them 15:23
masak is all for it 15:24
jnthn A few places in the setting use it to make decisions. 15:27
But we could probably make them differently (signature introspection).
masak it's probably not a bad idea to demote/de-huffmannize them to the .signature object, anyway. 15:28
then .count could simply be .elems
jnthn only if you want it to count the one or two slurpies also as contributing one each. 15:30
15:31 arthur-- joined 15:33 am0c joined
TimToady my point is that introspection of signatures is usually the wrong way to decide whether a signature will bind 15:37
for the same reason that testing for eof() is usually the wrong way to decide if there's more input
so, to my mind, merely moving .count and .arity to the signature is just moving the problem elsewhere 15:42
for loops should not be using them, for instance
jnthn Aye. Current Rakudo doesn't allow smart-matching against signatures to check bindability though.
Nor did it give a good way to implement it.
(Should be trivial after resig lands.) 15:43
TimToady sorry I'm grouchy, no coffee yet...
pugs_svn r28803 | jnthn++ | [t/spec] Correct another wrong signature that we were getting away with before. 15:45
jnthn hands TimToady a good strong tripple-expresso 15:46
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
jnthn sub respect(*@a) { my @b; @b.push($_) for @a; say @b.elems } 15:50
respect(1,2,3)
respect([1,2,3])
What should output be for each of these?
15:51 arthur-- joined
TimToady 3 1 15:51
jnthn OK, that's what the test expects too.
I suspect calling .list on the [1,2,3] was the wrong thing to do then. 15:52
Ah 15:53
15:53 justatheory joined
jnthn The original calls .Array on the whole thing when it's been formed... 15:53
15:55 cdarroch joined
TimToady simply mentioning an array in a list doesn't interpolate it, so [1,2,3] is like $array 15:55
the @ does extra magic
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 16:10 infrared joined 16:11 payload joined 16:13 kst joined 16:26 rfordinal joined 16:37 cognominal joined
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
please consider P5 trim to be OT in #perl6 now
16:45 sdvsdvsdv joined 16:50 lumi joined
cognominal Timtoady, why there is not a fun keyword for subs that are functions in the functionnal sense of the term? 17:07
17:07 Yubyub joined 17:08 Raugturi joined
TimToady because that would be redundant with the signature :) 17:09
or are you speaking of a lack of side effects? 17:10
cognominal yes
17:10 wtgee joined
cognominal *fonctional btw 17:11
TimToady I think most users would prefer the computer to figure that out for them
cognominal I would say, they expect it the computer to check it for them 17:12
s/it the/the/
TimToady pugs has an "is pure" trait, I believe 17:13
17:13 lumi joined
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
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;
p6eval rakudo d5a2ee: OUTPUT«positional inside named args at position 2␤in Main (file src/gen_setting.pm, line 206)␤»
quietfanatic cognominal: A smart compiler ought to be able to tell which subs are pure and which are not.
jnthn Traits are the normal way to mark stuff. :-)
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
I don't mind it to be a trait 17:19
jnthn cognominal: Heh. Good luck writing the checker. :-)
cognominal I was about to say, jnthn could write that easily
jnthn :-P
Static analysis in a very dynamic language is probably pretty limited in what it can do. 17:20
At least, not without hints.
quietfanatic rakudo: class Q { method ^do { say "done" } }; Q.do;
p6eval rakudo d5a2ee: OUTPUT«positional inside named args at position 2␤in Main (file src/gen_setting.pm, line 206)␤»
17:20 wtgee left
jnthn That's why we design in ways to give hints. 17:20
17:20 kst joined
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.
quietfanatic: Q.^do is Q.HOW.do(Q)
And I think Q.do is calling a forwarder method that does self.HOW.do(self)
TimToady # this function isn't evil
quietfanatic jnthn: what do you mean? 17:22
jnthn quietfanatic: What I said. :-)
quietfanatic: I was comment on why Rakudo was complaing about your code.
*complaining
TimToady HOW returns a metaobject, but the metamethod needs to know the original object as well
jnthn quietfanatic: method ^do is putting a method into the meta-class instance.
And metamethods...yes, what TimToady said. 17:23
quietfanatic perl6: say 4
p6eval elf 28803, pugs, rakudo d5a2ee: OUTPUT«4␤»
quietfanatic rakudo: class Q { method ^do ($self:) {say "done"} } Q.do;
p6eval rakudo d5a2ee: OUTPUT«Confused at line 2, near "Q.do;"␤in Main (file <unknown>, line <unknown>)␤»
quietfanatic Sorry, my irc was being slow 17:24
jnthn quietfanatic: The invocant is the metaclass.
You need an extra, normal positional too.
pmichaud /lastlog pmichaud 5
oops
quietfanatic Then the example in S12 is wrong?
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>)␤»
pmichaud calling a class 'Q' is likely dangerous :-)
quietfanatic oh
jnthn :-)
quietfanatic :|
jnthn quietfanatic: It's possible, yes.
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)␤»
quietfanatic rakudo: class X { method ^do ($self:) {say "done"} } X.^do;
TimToady std: class Q { method ^do ($self:) {say "done"} } Q.^do;
p6eval rakudo d5a2ee: OUTPUT«Method 'do' not found for invocant of class 'ClassHOW'␤in Main (file src/gen_setting.pm, line 206)␤»
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
..modifier loop␤ t…
quietfanatic That's also a problem
TimToady std: class Q { method ^do ($self:) {say "done"} }; Q.^do;
quietfanatic class X { method ^do ($self:) {say "done"} }; X.^do;
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␤»
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)␤»
quietfanatic rakudo: class X { method ^do {say "done"} }; X.do;
p6eval rakudo d5a2ee: OUTPUT«positional inside named args at position 2␤in Main (file src/gen_setting.pm, line 206)␤»
quietfanatic I think this used to work in Rakudo. 17:28
jnthn quietfanatic: Me too...
I thought we had tests for it too.
quietfanatic Makes it a bit hard to write constructors :)
jnthn Hmmm....resig is looking a bit better in the tests now. 17:30
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, zloyrusskiy joined
jnthn lol. die.t...dies. 17:32
pmichaud I would guess that's a "pass", then? ;-) 17:33
jnthn pmichaud: No, dies in the wrong way. :-/
;-)
Ah well, we're getting closer. 17:34
And it won't be many more fixes where I'm at test result break-even. ;-) 17:37
(Gains from unexpected passes of todo'd tests exceeds losses from regressions.) 17:38
17:38 PZt joined 17:42 maschla joined
colomon jnthn: if you were willing to turn on currently skipped trig tests and count those, you could probably be there now. ;) 17:46
jnthn colomon: Well, I'd rather my make spectest runs are fast. :-) 17:47
*faster
colomon: And I probably should try and fix all of these issues anyway.
colomon I suppose... 17:48
17:48 lumi joined
jnthn Here's current to-fix list: gist.github.com/211917 17:49
However, I'm pretty sure that there's not as many individual issues as there are failing tests.
17:49 stephenlb joined
jnthn OK, time to go to the store... 17:50
17:50 abra joined, stephenlb joined
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
carlin Oh ... Hash .= push is just silly 18:04
18:05 rfordinal left 18:06 payload joined
colomon carlin: even so, it still shouldn't Null PMC. :) 18:14
carlin Indeed, I wonder if it's known already 18:15
18:15 ruoso joined
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?
die horribly? 18:19
(I think it already does that :)
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
PerlJam colomon: true.
carlin It's like saying 18:21
rakudo: my %h; %h = %h.push: {foo => 'bar'};
p6eval rakudo d5a2ee: OUTPUT«Trailing item in Hash.push␤Null PMC access in isa()␤in Main (file src/gen_setting.pm, line 206)␤»
jnthn Wow, weird output. 18:23
(before the NPMCA)
PerlJam perhaps that's the "odd number of elements" error? 18:25
rakudo: my %h; %h.push: { foo => 'bar' };
p6eval rakudo d5a2ee: OUTPUT«Trailing item in Hash.push␤»
PerlJam maybe not
oh, it's because we didn't push a Pair 18:26
rakudo: my %h; %h.push: foo => 'bar';
p6eval rakudo d5a2ee: ( no output )
PerlJam rakudo: my %h; %h.push: { 'some other thing' };
p6eval rakudo d5a2ee: OUTPUT«Trailing item in Hash.push␤»
PerlJam rakudo: my %h; %h.push: 'foo', 'bar';
p6eval rakudo d5a2ee: ( no output )
18:27 kst joined 18:31 snearch joined, lumi joined 18:32 justatheory joined 18:34 Pnz joined 18:37 ShaneC joined
ruoso Hello! 18:44
as some of you might know, YAPC::Brasil::2009 is approaching
and edenc had an interesting idea of having a "welcome shout" session at the openning
jnthn isn't sure he can shout loud enough to be heard in Brazil from Europe. 18:45
PerlJam heh
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"
jogla Brasil is faaar away 18:46
ruoso and send the videos to breno@yapcbrasil.org.br
PerlJam ruoso: sounds cool. 18:47
jnthn Cool idea.
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 ;)
PerlJam as people walk from talk to talk, they would be greeted by random perlers in the hall
ruoso I just received a suggestion of inlcuding "I'm from $location" in the shout 18:55
PerlJam ruoso: "Hi, I'm Jonathan and I'm from everywhere" :) 18:57
ruoso heh
19:00 maschla left
Su-Shee "Hi, I'm Susan and I'm a Perl addict" ;) 19:00
19:03 Raugturi joined 19:04 NorwayGeek joined
sjohnson sorry TimToady 19:05
wont happen agaain
again*
19:06 lumi joined 19:09 rblasch joined 19:10 NorwayGeek_ joined 19:14 dr_df0 joined
dr_df0 hello 19:14
PerlJam hi 19:15
dr_df0 rakudo: {my @a=(); for 1..2000 -> $i { @a.push($i); } }
p6eval rakudo d5a2ee: ( no output )
19:18 desertm4x joined
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
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
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
jnthn Ooh, shiny. 19:25
pmichaud I'll do a video clip, any preferred format? 19:26
dalek p-rx: 4741f3d | pmichaud++ | src/ (2 files):
Remove Regex::P6Regex::Grammar's dependency on PCT::Grammar.
p-rx: 5d42e76 | pmichaud++ | src/Regex/P6Regex.pir:
Correct compiler class to be Regex::P6Regex::Compiler .
p-rx: 638b1b5 | pmichaud++ | src/ (4 files):
Add naive protoregexes (from PGE cheats) to Regex::Cursor for bootstrapping.
pmichaud edenc: I'll do a video clip -- any preferred format?
edenc pmichaud: nope, whatever you can throw at us is ok 19:28
pmichaud any standard "script", or just make up our own?
edenc just make up your own 19:29
don't want it to look like a Kraftwerk concert 19:30
Tene pmichaud: what are you recording?
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
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"
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. :)
edenc just gets a marketing idea for next year
"come to YAPC::Brasil::2010, you'll get to see PerlJam in a clown costume" 19:34
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.
edenc juggle and write perl6 code with your right foot, that would be quite a draw 19:36
19:36 kst joined, krzys joined
krzys hello everybody 19:37
Tene Hi!
krzys I have a problem with rakudo
maybe someone will help :O
PerlJam krzys: do tell
pmichaud Many of us do.
PerlJam krzys: is your problem that it is too slow? 19:38
krzys: is your problem a "Null PMC Access"?
krzys: is your problem that is doesn't support the full Perl 6 spec?
:-)
If so, these are problems people are working on. 19:39
krzys I tried to write small processing tool (I could do it in perl5, but I wanted to start using perl6) 19:40
what it does is: read the file line by line, split the fields and push @fields[1] into global array
after processing around 1500 lines i get "segmentation fault"
i did some testing, and for example following code: {my @a=(); for 1..20000 -> $i { @a.push($i) } }
works fine
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
pmichaud you're using $fh.get() as part of a for loop?
or a while loop?
krzys while loop 19:43
pmichaud yes, seeing the full code would help
krzys where can I paste the code?
pmichaud suggests gist.github.com/
PerlJam krzys: or see the topic
Tene there's also a nopaste listed in the channel topic
paste.lisp.org/new/perl6
19:44 KatrinaTheLamia joined
Tene hi KatrinaTheLamia 19:44
krzys git://gist.github.com/212010.git
KatrinaTheLamia hai Tene
PerlJam krzys: ITYM gist.github.com/212010 19:46
Tene PerlJam: you can 'git clone' the url he gave.
krzys The file consists of 43k line of the form "2009-10-01 02:00;712,24;35,11;1902;87,65
Tene krzys: any change you could get a backtrace of the segfault?
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.
pmichaud rakudo might not like the (my $line = ...) in the while statement
lisppaste3 krzys pasted "rakudo problem" at paste.lisp.org/display/88759
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
I agree, it shouldn't make it segv, but lexicals can be a bit weird (especially in loops)
Tene and if it did, it shouldn't be only after 1.5k lines
jnthn Tene: Right. There's a nasty bug somewhere. 19:49
gc? :-/
krzys I've spotted right now, that one of the problems is, that second field is not a numer ...
pmichaud shouldn't have to be a numeral, fwiw.
19:50 PZt joined
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
pmichaud as far as rakudo is concerned, everything here is strings anyway
i.e., there aren't any numbers in this program
(except for $count, which isn't being used fully)
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?
krzys but for example, the following code: {my @a=(); for 1..20000 -> $i { @a.push("724,34"); } }
works fine ..
jnthn Tene: no...not the "s" word! :-P
jnthn won't want to hear the word "signature" again after this branch 19:52
Well, not for a day or two anyway.
krzys pmichaud: I tried to remove 'my $line' from the while loop, but the effect is the same 19:53
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
Tene krzys: of course, the ideal help that we'd love is a core dump.
PerlJam krzys: or just try calling $fh.get 45K times :)
19:54 lumi joined
krzys just tell me how to do it? I'm on MacOSX 19:55
Tene any MacOS users in the channel?
pmichaud I think a core dump isn't going to yet be all that ideal. 19:56
I'd prefer to work out what construct is leading to the segfault.
Tene nods.
jnthn A backtrace may be helpful too or give a clue too. 19:57
Though it may also not.
pmichaud I'd prefer to narrow it down to the .get, the .push, or the .split first
PerlJam bets on the .get
pmichaud backtraces just tell us where things blew up, but not necessarily what lit the fuse.
jnthn pmichaud: Not necessarily, but occasionally it's possible to get lucky. :-) 19:59
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/
Tene krzys: does it fail if you replace the loop body with just printing the value?
20:00 NorwayGeek joined 20:01 NorwayGeek joined
krzys when I changed '@samples.push(@fields[1])' to '@samples.push("asdf")' it works :) 20:01
Tene Okay, that's progress. 20:02
krzys no, sorry!!! to fast
TimToady er, no, you're not too fast, rakudo is too slow :)
pmichaud try changing the push line to be just say @fields[1];
krzys it worked when I removed '@samples.push...'
from the loop
pmichaud: it's running with 'say ...' 20:03
pmichaud okay, looks like it might be a problem with .push then. 20:04
Tene pmichaud: he says it worked with .push("asdf"), yes?
pmichaud he then said "too fast"
so I think it failed then.
Tene OK. 20:05
pmichaud does it fail with pushing a constant string?
try the original program again, but use this as the command line:
parrot_install/bin/parrot -G perl6.pbc yourprog.pl 20:06
(replace "yourprog.pl" with the name of your test script)
krzys pushing the constant string works ... I tested till 5000 lines not to wait too long 20:09
pmichaud hmmm 20:10
20:10 NorwayGeek joined
colomon MacOS X user on-line now.... 20:10
pmichaud this sounds suspicious
try adding the following line near the top of your program
Q:PIR { sweepoff };
then run it.
Tene jnthn: what's your current approximate ETA for resig branch?
20:11 justatheory joined
jnthn Tene: I'm hoping to be down to a handful of fails during tomorrow. 20:12
Tene: Like, few test files.
Tene: Really depends how many problems are really at the bottom of a bunch of the current failures.
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.
krzys pmichaud: sorry again, it also fails ... I found one clue
Tene FSVO "done"
jnthn Tene: Oh, I'm hoping to have this in before the Rakudo release.
Tene Ah, great.
krzys doing @samples.push("751,10") fails at $count=3851
jnthn Unless it's obviously going to cause issues, but I'm hopeful not.
Tene jnthn: maybe I'll take a look at it this weekend. I could use a break from pcc. ;) 20:14
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
That is, to spit out Awesome errors.
Rather than the current less than awesome ones.
It's on my "things to do before merge" list.
krzys but doing @samples.push("x" x 40) crashes at $count = 1637
jnthn Tene: Or just pick a spectest that fails and go hunting. :-) 20:16
pmichaud sounds like a parrot bug somewhere.
jnthn pmichaud: GC off makes no difference though? 20:17
krzys what's more .... it's undeterministic !!! 20:18
running the same code twice, I get different results
pmichaud jnthn: not all parrot bugs go away with GC off :)
krzys running with @samples.push("xxxxxxxxxxxxxx"); 20:19
pmichaud I don't know if GC off makes a difference or not.
jnthn pmichaud: ;-)
If it's undeterministic it tends to hint at a GC issue.
krzys for the first time it stopped around 1800, second time around 2996
Tene running a loop, just pushing repeatedly, causes no failures for me.
my @acc; loop { @acc.push("x" x 40); say @acc.elems } 20:20
but you're saying that that does fail for you?
trying to reproduce here...
krzys but third, and fourth time it crashed the same as in the first pass 20:21
I dont get it ... it's stable with crashing now 20:22
Tene: the example, that you'are running works for me too
pmichaud
.oO( I'm so happy git lets me stage commits locally before pushing to the repo. )
krzys Tene: but when i read from the BIG file with $fh.get, then chomp, then split ... it crashes 20:23
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:26
breaks in perl6, when dcs.csv is file with ~43k line 20:27
Tene krzys: but it persists if you remove any of those? tried dropping the chomp? 20:28
krzys dropping chomp fails even faster ... 20:29
but: my @a=(); my $fh = open "dcs.csv"; while (my $l = $fh.get) { @a.push("123"); } } 20:32
works fine ... so maybe it's a split problem !!! 20:33
Tene krzys: can you print out the results of the string before splitting, and the results of the split? 20:35
krzys Tene: that's what I'm trying to do right now: find the place in file where it fails 20:38
Tene krzys: just add something like this after each line: say "got line: $line"; say "got from chomp: {@list.perl}"; 20:39
etc.
20:39 kst joined 20:45 bhuron joined
krzys ok, so I've found that it's not reading the file that is contributing to the bug... 20:46
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 p-rx: 4506dba | pmichaud++ | src/Regex/P6Regex.pir:
Add a custom parse method to Regex::P6Regex::Compiler that understands cursors.
p-rx: c9a4f85 | pmichaud++ | (2 files):
Clean up parse and !reduce methods.
PerlJam so much for my horse in that race.
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
:-)
(My other test case died just like krzys)
jnthn PerlJam: Died as in segfault? 20:49
PerlJam aye
krzys the same for me 20:50
jnthn Ah, at least it's not just one person. :-)
20:50 justatheory joined
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.
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␤»
diakopter rakudo: say 1; class Foo { say 2; class Bar { say 3 }; say 4 }; say 5
p6eval rakudo d5a2ee: OUTPUT«2␤4␤3␤1␤5␤»
Tene ♪I've got a theory♪
diakopter # someone help me; which is correcter
justatheory Sorry, network here seems flaky 20:52
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.
e.g. when constructing the class
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
diakopter jnthn: why does 3 happen after 2,4 then? 20:55
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
diakopter: Because we don't start constructing Bar in the middle of constructing Foo (rightly or wrongly)
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.
krzys jnthn: generally the code: { my @a=(); for 1..20000 { my $ll="123;123;123;123"; my @f=$ll.split(";"); 20:57
+@a.push(@f[1]); } }
jnthn: fails in rakudo without any external dependencies
jnthn krzys: OK, that'll make a good bug ticket then. :-)
20:57 justatheory joined 20:58 nihiliad joined
krzys jnthn: where can I report it? 20:58
jnthn krzys: mailto:rakudobug@perl.org 20:59
krzys: Good news. It segfaults here too.
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
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
jnthn diakopter: Well, it needs to be constructed before runtime (e.g. when the "say 1" runs. 21:01
)
21:01 _jaldhar joined
jnthn diakopter: Otherwise you can't, for example, get compile time checking of role composition conflicts. 21:01
PerlJam: Ewwww. I just caught the segv in the debugger. 21:02
PerlJam: A Context PMC - or something claiming to be one - has a trash vtable pointer.
diakopter jnthn: ok. seems to me this needs a bit of specification in the specificulations
TimToady S10:88 requires 12345 21:03
jnthn TimToady: Rationale? 21:04
TimToady: This would seem to imply that the construction of classes and the running of the class body happen at different times?
TimToady the class is constructed of declarations
diakopter TimToady: owe heigh 21:05
TimToady declarations happen at BEGIN time, not run time 21:06
jnthn TimToady: aha, OK. 21:07
TimToady: The bit of S12 I was going on for the other interpretation seems to no longer be in S12.
(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
jnthn Maybe the bit in S12 went away then too. :-)
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
TimToady the bodies aren't declarations
they just get run
jnthn PerlJam: The declarations the class body makes and the other non-declarative items in the class body are treated differently.
TimToady all packages are equal this way 21:10
krzys jnthn, PerlJam: I've just created the ticket [perl #69840]
PerlJam krzys: excellent
jnthn krzys: OK, the segfault looks...odd. I can't deal with it easily. Thanks for the ticket.
TimToady lunch (belated) & 21:11
jnthn My first guess is a GC marking failure of contexts.
(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?
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
jnthn: that's the only way to find bugs ...
jnthn krzys++
krzys: Yes, real world use exposes lots of helpful bug reports.
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.
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
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
jnthn krzys: Sure! 21:15
PerlJam but, in any case, there should be some sort of Camelia award for contributions to Perl 6.
jnthn krzys: Drop me mail.
Or catch me on IRC.
You can see our pekny hrad. :-) 21:16
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() }
p6eval rakudo d5a2ee: OUTPUT«too few arguments passed (0) - 1 param expected␤in Main (file src/gen_setting.pm, line 206)␤»
jnthn rakudo: module A { sub foo($x) { $x }; say foo(42) }
p6eval rakudo d5a2ee: OUTPUT«42␤»
jnthn krzys: I've only been here about 18 months so far.
jnthn is rather baffled by one issue in resig 21:21
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
21:22 justatheory joined, quietfanatic joined
krzys PerlJam: Yes, You're right. Fantastic Four is really fantastic :) 21:22
PerlJam: @fantastic_four=<jnthn pmichaud moritz_ masak> 21:25
PerlJam: maybe it should be predefined constant in perl6 :)
jnthn pmichaud: ping 21:27
dalek p-rx: c381a19 | pmichaud++ | src/Regex/P6Regex/Actions.pm:
Handle quantified aliases like $<var>=(subrule)* .
p-rx: 3095780 | pmichaud++ | src/Regex/Cursor.pir:
Fix Cursor.parse to return a Match object.
p-rx: 7c2e928 | pmichaud++ | build/Makefile.in:
Temporary bootstrap helper target.
jnthn
.oO( that wasn't the pong I was looking for... )
21:28
Oh, ouch...I know what's wrong. 21:30
Very ouch.
pmichaud: unping, don't worry...I'll do the worrying. :-) 21:31
21:31 lumi joined 21:33 kst joined 21:36 Su-Shee left 21:40 SmokeMachine joined
quietfanatic rakudo: class dest { method DESTROY {say "Destroying"} }; my $x = dest.new; 21:45
p6eval rakudo d5a2ee: ( no output )
quietfanatic rakudo: class dest { submethod DESTROY {say "Destroying"} }; my $x = dest.new;
p6eval rakudo d5a2ee: ( no output )
quietfanatic How does this work?
rakudo: class dest { submethod DESTROY {say "Destroying"} }; my $x = dest.new; Q:PIR { sweep }
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)␤»
quietfanatic rakudo: class dest { submethod DESTROY {say "Destroying"} }; my $x = dest.new; Q:PIR { sweep 1 }
p6eval rakudo d5a2ee: ( no output ) 21:46
quietfanatic rakudo: class dest { submethod DESTROY {say "Destroying"} }; my $x = dest.new; Q:PIR { collect }
p6eval rakudo d5a2ee: ( no output )
quietfanatic rakudo: class dest { submethod DESTROY {say "Destroying"} }; do {my $x = dest.new}; Q:PIR { collect }
p6eval rakudo d5a2ee: ( no output )
quietfanatic rakudo: class dest { submethod DESTROY {say "Destroying"} }; sub x {my $x = dest.new}; x(); Q:PIR { collect }
p6eval rakudo d5a2ee: ( no output )
jnthn quietfanatic: As far as I know, nyi 21:47
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.
quietfanatic I need to free some malloc()ed memory on an object's destruction. 21:49
jnthn quietfanatic: That'd be The Thing To Use then. 21:51
21:59 justatheory joined 22:01 houghton joined
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.
pmichaud: Basically, the reason module A { sub foo($x) { }; foo(42) } doesn't work... 22:17
22:17 Limbic_Region joined
jnthn ...is because now we foo to have had it's signature object attached 22:17
However, since we're evaluating the body of the module at loadinit time still, it's not attached yet.
22:18 mattastrophe joined
pmichaud I like that the bodies now run canonically instead of at BEGIN, though. 22:19
that's very helpful.
jnthn pmichaud: Yes, that spec clarification earlier today means we can fix this...
pmichaud s/canonically/normally, as in immediate blocks/
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.
And the other bits.
pmichaud that part can be figured out
jnthn Well
pmichaud but I'm glad to have learned this before this weekend, since NQP will want to follow the same approach
jnthn Issue is when.
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 ?
jnthn Well, we still need to create the classes at BEGIN, though?
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?
pmichaud i.e., move the nodes that create the classes outside of the class block
22:22 lumi joined
jnthn pmichaud: Right. 22:22
pmichaud: I'm not sure how easy/hard that is. I can try tomorrow.
pmichaud I think it's easier than it might look at first. 22:23
it's certainly more natural overall.
jnthn Wonder if this means we can fix the lexicals in classes bug. ;-)
pmichaud Yes, this will fix that.
jnthn \\o/
Win.
pmichaud might be a challenge with parametric roles, though
because of the lexical parameter 22:24
anyway, I'm guessing solvable, without too much effort. But more effort/thought than you probably want to put in place tonight.
jnthn Aye.
Yeah, it's the parametric roles bit that bothers me more here... 22:25
22:25 tann joined
pmichaud I could be wildly wrong on this point. But I'm very happy for the spec change. 22:25
jnthn oh argh 22:26
I've just realized what's going horribly horribly wrong... 22:27
(on a different problem)
krzys goodnight 22:29
jnthn night, krzys
22:30 Whiteknight joined 22:31 envi^home joined 22:51 justatheory joined 22:53 Confield joined 23:00 kst joined, ihrd joined 23:05 ihrd joined 23:20 brunov joined
jnthn -> sleep, o/ 23:26
23:29 justatheory joined 23:37 kst joined 23:54 mtnviewmark joined 23:57 TiMBuS joined 23:58 kst joined