|
»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! | Rakudo Star Released! Set by moderator on 29 July 2010. |
|||
| Ken-Guru | i don't like installs ... | 00:00 | |
| :D | |||
| jnthn | Ken-Guru: huh... | ||
| Well, uninstall is just in Add/Remove programs. | |||
| pmichaud | exodist: if there is one, it'd be on perl6.org somewhere. | 00:01 | |
| gfldex | exodist: www.perlfoundation.org/perl6/index....dex_tablet | ||
| sorear | Why is it called Add/Remove programs if removing is the more important thing it does? | ||
| jnthn | sorear: Why do I have to click the "Start" button to shut down? :-) | ||
| Ken-Guru | 2(jnthn2): jupp. the linux way its ok. but having only used windows all life long its annoying ;-) ... you know this damn little thing called registry. uargh.... | 00:02 | |
| gfldex | little? :-> | ||
| Ken-Guru | japp, thats the problem. | ||
| exodist | gfldex, well there goes my plan to make one :-P thanks | 00:03 | |
| gfldex | exodist: you might want to extend it | ||
| Ken-Guru | never the less i'm a little win adict. don't ask me why, i don't know. | 00:04 | |
| pmichaud | exodist: we can always use more guides or improvements to existing ones. | ||
| exodist | What I really want to write is a perl5 equivilent in perl6 topic guide, example topic: *Other::Package = sub { ... }, then how to do it in perl 6. | 00:07 | |
| sorear | exodist: that's the hard way. The easy way, in perl 5 and perl 6, is our sub Other::Package { ... } | 00:09 | |
| the hard way in p6 is &Other::Package := sub { ... } btw | |||
| exodist | sorear, our sub Other::Package { ... }, does that really work in perl5? I have never seen it done.. | 00:10 | |
| sorear, that specific topic is because I want to write a module that exports subs from other modules into the module that usus it, like a bunile if you will. | 00:11 | ||
| use A; # like use B; use C; use D; | |||
| *budle | |||
| *bundle damnit | 00:12 | ||
| *and uses | |||
| masak | listen up, #perl6 -- I haz a challenge for you. | 00:18 | |
| I just pushed github.com/masak/yapsi/blob/master/...ce/2010.08 | |||
| waste | sorear: thank you | ||
| masak | please help fill in the blanks for tomorrow's realease. it's not hard. anyone can help. | 00:19 | |
| if you're unsure about the desired tone, look at previous announcements. | |||
| jnthn | masak: lol!! | ||
| masak | large amounts of silliness are encouraged. thank you. | ||
| jnthn | I never suspected there was a template! | ||
| masak | there wasn't until just now :) | ||
|
00:20
Axord joined
|
|||
| masak | I reserve the right to push things around a bit to keep people like jnthn on edge :P | 00:20 | |
| jnthn | Damm...only slightly inappropriate? I can only think of wildly inappropriate things. | 00:21 | |
| dalek | psi: 4051102 | masak++ | doc/announce/2010.08: [doc/announce/2010.08] added can help! |
00:22 | |
| masak | it should be somewhere between "nodnod, he's happy about announcing stuff" and "eeh, can you really say that... in a release announcement?" :) | ||
| jnthn | ooh, I wonder what satisfaction will be at those URLs! | 00:27 | |
| masak | nono, it's "Get Satisfied!". Mr Satisfied has escaped from the local prison, you see. | ||
| jnthn | Oh noes! | 00:28 | |
| dalek | psi: 2c149f4 | masak++ | doc/announce/2010.08: [doc/announce/2010.08] fixed petty typo |
||
| pmichaud | masak: are you giving a talk on yapsi? | 00:29 | |
| waste | rakudo: $:a; say "alive"; | ||
| p6eval | rakudo 9b6189: OUTPUT«Lexical '$a' not found in main program body at line 2:/tmp/jfcE3Mi3Tt» | ||
| jnthn | At YAPC? | 00:30 | |
| masak | pmichaud: no. maybe I should lightning-mention it. | ||
| pmichaud | yes, of course :) | ||
| I was thinking it deserves a lightning talk :) | |||
| jnthn | masak: I think you should dedicate these release to Europe. | ||
| masak | (because it's so blazingly fast) | ||
| jnthn | *this | 00:31 | |
| masak | jnthn: "this release is dedicated to Europe, because it was written, well, inside it" | ||
| pmichaud | I really should see if I can come up with a good hack talk for rakudo/nqp | ||
| masak | jnthn: "you're free to call this release 'Europe' if you want. of course, you're free to call this release 'Johann Sebastian Bach' too, if that floats your boat" | 00:32 | |
| pmichaud | can I call it "The Village People"? | ||
| jnthn | Not until it can run...the ASCII dance code... | ||
| pmichaud | "Culture Club"? | ||
| masak | you can call it "The Village People With a Pope Hat"... | ||
| pmichaud | "Wham!"? | 00:33 | |
| "The release formerly known as Yapsi"? | |||
| masak | "Wham Sebastian Bach" | ||
| jnthn: just for you, I can introduce a special SIC opcode that does the ASCII dance... :P | 00:34 | ||
| jnthn | "Run-time DMC" | ||
| avuserow | We can ASCII Dance if we want to. | 00:35 | |
| masak | It's my party and I ASCII Dance if I want to. | 00:36 | |
| jnthn: "this release is dedicated to Europa, the famous Jupiter moon, for its unyielding support of Perl 6" | 00:37 | ||
| see you at YAPC::Europa! | 00:41 | ||
| masak waves a translucent tentacle | 00:42 | ||
| masak decides to regenerate for a while | |||
| 'night, #perl6 | |||
|
00:51
linz joined
|
|||
| kthakore | moritz_: ping? | 00:53 | |
|
01:01
Axord joined
01:17
xinming joined
|
|||
| sorear | exodist: I don't think rakudo implements this yet, but you shound use be able to do use Other::Module :EXPORT<:ALL>; | 01:17 | |
|
01:20
LaVolta joined
|
|||
| jnthn | nqp: loop { } | 01:22 | |
| p6eval | nqp: OUTPUT«Confused at line 1, near "loop { }"current instr.: 'parrot;HLL;Grammar;panic' pc 552 (src/cheats/hll-grammar.pir:205)» | ||
| sorear | I guess the binder overhaul needs to be a priority. :( | 01:32 | |
|
01:44
hugme joined
01:47
orafu joined
01:57
flup joined
02:09
edgar joined
|
|||
| edgar | hi, is anybody still awake? | 02:09 | |
| sorear | "still"? | ||
| jnthn | Depends on your definition of awake. :-) | ||
| sorear | this is a global channel. | ||
| edgar | in the netherlands it is 4 o'clock in the morning | ||
| but you are probably in the VS. | 02:10 | ||
| jnthn | Yay stroopwafelland! | ||
| sorear | I'm in the US, jnthn is in Iceland | ||
| jnthn | sorear: Sweden! | ||
| :-) | |||
| sorear | well you move every two weeks | ||
| jnthn | Slight exaggeration. :P | ||
| edgar | Yeah, we have them here. The same timezone in Sweden probably. | ||
| jnthn | But you ahve a point. :-) | ||
| edgar: Yes. :-) | 02:11 | ||
| edgar: I visit NL now and then. :-) | |||
| edgar | It is a good country Sweden. Not too warm. I will move to there at one day. It is 27 degrees here. | 02:12 | |
|
02:12
TiMBuS joined
|
|||
| jnthn | Uff, that's too hot. | 02:12 | |
| edgar | I had a question about perl6. I try to implement some monads. I think Roles are suitable to replace typeclasses. But how do I access a simple attribute? | 02:13 | |
| It is too hot for this place. But we have a heat wave at the moment. | 02:14 | ||
| jnthn | As in, if you declare role Foo { has $!bar }, how do get at $!bar? | ||
| *to | |||
| Or maybe show me an example of what you're trying to do and how it's not working... | |||
| edgar | No, more like if you declare class Just is Maybe (which has role Monad) { has $.a ... } | 02:15 | |
| Maybe is a role too. Just is a class, and Nothing is a class | 02:16 | ||
| jnthn | If you're adding a role to a class, you'd normally use "does" rather than "is" | ||
| "is" is for inheritance rather than role composition. | 02:17 | ||
| flup | A thanks. I didn't know that. | ||
| edgar | The webclient didn't work very well, so I switched to irssi. But it seems to work. | 02:18 | |
| jnthn | You can do "is" with a role but really it means "I want to generate a class that does the role and inherit from that class". So it gives you rather different semantics (especially with regard to attribute visibility). | 02:19 | |
|
02:23
Italian_Plumber joined
|
|||
| flup | That sounds strange: I want to generate a class that does the role and inherit from that class. It is certainly not what I mean. Is there a good book on perl6 yet? | 02:24 | |
| jnthn | flup: Various of us are working on one, at github.com/perl6/book/ | 02:25 | |
| flup: The roles coverage ain't great yet though. :-( | |||
| flup: svn.pugscode.org/pugs/docs/Perl6/Sp...-types.pod is the spec on roles | 02:26 | ||
| It's a little terse in places, but has many of the details on how stuff works. | |||
| flup | Oh that is ok. I will figure it out. I am reading the apocolyps on that one. | ||
| tnx. I am from haskell, are Roles a bit similiar to type classes? | 02:27 | ||
| jnthn | I'm not familiar enough with Haskell to really know, sorry. | 02:28 | |
| I've heard people talk about them as having some similarities. | |||
| But I'm not sure how deep they go. | |||
| flup | They are. A typeclass is sort of a interface. | 02:29 | |
| jnthn | A role is sort of an interface too, but can carry a default implementation. | 02:30 | |
| But if those are all stubs, then they become requirements, so it degenerates to an interface (in the Java-y sense of interface) | |||
| flup | A typeclass can have a default implementation too, so I think they are quite similiar. | 02:31 | |
| One of the first implementations of perl6 was written in haskell, I think they used some of the ideas there | 02:32 | ||
| But haskell doesn't have the hyper oprators | 02:33 | ||
| I like those | |||
| Too drunk to program, time too sleep. Thanks for the links. I will be able to produce something now. | 02:34 | ||
| goodnight | 02:35 | ||
| cxreg | hvae you considered reading about Moose? | ||
| flup | Moose> | ||
| ? | |||
| cxreg | there's more docs on that, and the concepts are very similar | ||
| Moose is a project that implemented a good bit of perl 6's object model on perl 5 | |||
| jnthn | flup: Goodnight, and do return and let us know how you get on. :-) | ||
| flup: Oh, and hope you were drinking something good. :P | |||
| flup | I will look at it, i am using perl5 at work sometimes. So it maybe useful. I will post something, if I get somewhere. Lol, just beer. But not the alcoholic type of beer. So it was good. | 02:37 | |
| jnthn | :-) | 02:38 | |
| flup | bye, and have a nice night/day, where ever you are. | 02:39 | |
| jnthn | night o/ | 02:40 | |
|
03:00
mmmpork joined
|
|||
| jnthn -> sleep | 03:11 | ||
|
03:26
isBEKaml joined
|
|||
| isBEKaml | hi #perl6! :) | 03:26 | |
| whee | hola | 03:27 | |
|
03:30
Guest46026 joined
|
|||
| sorear | Hello! | 03:33 | |
| isBEKaml | (backlogging) offerkaye was probably confused by my message. I merely pointed him to another location for u4x docs (link is not shown on perl6.org, though) | 03:34 | |
|
03:51
araujo_ joined
03:52
jaldhar joined
|
|||
| frooh | hey guys, for some reason a coderef is saying I passed it too many arguments; | 03:52 | |
| I'm passing it a single string | |||
| but it says I passed it *two* things | |||
| I'm not even really sure how to debug this | 03:53 | ||
|
03:53
araujo joined
|
|||
| frooh | I'll nopaste the code to see if anyone has any ideas | 03:53 | |
|
03:53
snarkyboojum joined,
snarkyboojum left
|
|||
| frooh | paste.scsys.co.uk/47435 | 03:54 | |
|
03:55
snarkyboojum joined
03:59
snarkyboojum joined
04:00
gfx joined
04:02
snarkyboojum left,
snarkyboojum joined
04:05
snarkyboojum left
|
|||
| sorear | frooh: the error is occuring at $.coderef("...") | 04:05 | |
| frooh: this is short for self.coderef("...") | |||
|
04:06
snarkyboojum joined
|
|||
| sorear | frooh: which is short for (self.^!GET-METHOD("coderef"))(self, "...") | 04:06 | |
| frooh: the coderef method only wants one argument. you passed it two. | |||
| frooh: the correct code is $.coderef.("...") | |||
| TiMBuS | which causes another problem | 04:07 | |
| invoke() not implemented in class 'Any' | |||
| frooh | huh | ||
| ok then :-) | |||
| and yeah | |||
| TiMBuS: got the next error | |||
| sooo... is there soemthing else I can do? | 04:08 | ||
| TiMBuS | $.coderef.WHAT is Any. I have no idea | ||
| frooh | star: class Foo { has Code $.bar; method callbar { $.bar.() } }; my $x = Foo.new( bar => sub { say "lolz" } ); $x.callbar; | 04:10 | |
| p6eval | star 2010.07: OUTPUT«lolz» | ||
| frooh | fjdkls;a | ||
| TiMBuS | :| | ||
| frooh | star: class Foo { has Code $.bar; method callbar { $.bar.() } }; my $x = Foo.new( bar => sub { say "$^a" } ); $x.callbar('shucks howdy'); | ||
| p6eval | star 2010.07: OUTPUT«Too many positional parameters passed; got 2 but expected 1 in 'Foo::callbar' at line 22:/tmp/PTbpFFa8y_ in main program body at line 22:/tmp/PTbpFFa8y_» | 04:11 | |
| frooh | star: class Foo { has Code $.bar; method callbar($x) { $.bar.($x) } }; my $x = Foo.new( bar => sub { say "$^a" } ); $x.callbar('shucks howdy'); | ||
| p6eval | star 2010.07: OUTPUT«shucks howdy» | ||
|
04:11
masonkramer joined
|
|||
| frooh | well then. | 04:11 | |
| and I can't seem to be able to .perl.say coderefs | |||
| and I can't seem to be able to .perl.say coderefs | 04:12 | ||
| woops, sorry | |||
| waste | Any is not a coderef; | 04:16 | |
| frooh | waste: agreed. but sub {...} should be | 04:17 | |
| and that's what I passed in | |||
| waste | the assignment does not work for some reason | ||
| TiMBuS | passing in anything makes it an Any | ||
| setting it to a sub in BUILD does not set it | |||
| frooh | so I need to set it... after construction? | ||
| it worked above in the chat right? | |||
| TiMBuS | i guess so | 04:18 | |
| strange bug | |||
| frooh | now it says it's readonly | ||
| did I unknowingly make it ro? | |||
| TiMBuS | i think they're ro by default | 04:19 | |
| frooh | well then | ||
| bizarre | |||
| that fixes it indeed | |||
| TiMBuS | yep yep | 04:20 | |
| the bug might be triggered by your add_method use.. | |||
| frooh | I wonder.. | 04:21 | |
| ok | 04:22 | ||
| so it looks like it's my BUILD | |||
| when I leave coderef out of the signature, it doesn't get passed in | |||
| I thought that if you left something out it would automaticaly handle it | |||
| TiMBuS | but i set $.coderef inside BUILD and it still didnt work | 04:25 | |
| plus the default should still be set? | |||
| frooh | TiMBuS: no, I set it and it wroks | 04:27 | |
| well, yeah, something's wrong there for sure | |||
| but if I add :$coderef to BUILD and do $.coderef = $coderef it works | 04:28 | ||
| waste | rakudo: class X { has Code &.c = sub (*@_) { @_ }; submethod BUILD () {nextsame} }; say X.new.c.(1) | ||
| p6eval | rakudo 9b6189: OUTPUT«1» | ||
| frooh | so I neext to nextsame in build? | ||
| TiMBuS | .. oohhh | 04:29 | |
| waste | for the automatic behavior | ||
| frooh | hm. | ||
| I'm too used to Moose I guess | 04:30 | ||
| so now I am getting an arror about .is-debug not being a method on invocant Str | |||
| but when I do .perl.say to the object | 04:31 | ||
| it's clearly not a Str | |||
|
04:34
araujo joined
04:39
araujo joined
|
|||
| frooh | dangit | 04:39 | |
| invoke not implemented on resizable pmcarray | |||
| *facepalm* | 04:41 | ||
| frooh wonders why rakudo thinks that his object is a Str | 04:43 | ||
|
04:44
plobsing joined
|
|||
| frooh | man, I don't know what I changed, but now it works | 04:47 | |
| it's like those times when your pc won't work and you take it apart and put it back together and it works again | |||
| waste | for the record; S12:"Whether you write your own BUILD or not, at the end of the BUILD, any default attribute values are implicitly copied into any attributes that haven't otherwise been initialized." | 04:53 | |
|
04:54
adhoc left
|
|||
| frooh | so it *should* have worked then | 04:56 | |
| waste | frooh: i agree | ||
| frooh | I thought I read that | ||
|
04:57
alester joined
|
|||
| alester | My rakudo won't build and I am sad. | 04:58 | |
| the make wants to "cd rakudo" and there is no rakudo dir | 04:59 | ||
|
05:20
araujo joined
05:25
wooden joined
|
|||
| sorear | Given: sub foo($x, $y) { ... } | 05:37 | |
| Is this legal? : foo(:y(42), 24) | |||
| pmichaud | sorear: yes, it's legal. | 05:43 | |
| star: sub foo($x, $y) { say "$x, $y"; }; foo(:y(42), 24); | |||
| p6eval | star 2010.07: OUTPUT«24, 42» | ||
|
05:52
plol joined,
snarkyboojum joined
05:53
kevinspacey joined
05:54
snarkyboojum left
05:55
sawyer_ joined
|
|||
| sorear | star: sub foo($x, $y) { say "$x, $y"; }; foo(:y(42), 24, 12); | 05:55 | |
| p6eval | star 2010.07: OUTPUT«Too many positional parameters passed; got 2 but expected 2 in 'foo' at line 22:/tmp/y1CyhO3Lur in main program body at line 22:/tmp/y1CyhO3Lur» | ||
| frooh | star: sub foo($x, $y, $z) { say $z }; foo(1,2,3); my @bar = <a b c>; foo(@bar); | ||
| isBEKaml | rakudo: my $num = 2000; my $foo = ($num ~~ /^(\\d{2}+)/); $foo.say; | ||
| sorear | that is a lovely error message. | 05:56 | |
| p6eval | star 2010.07: OUTPUT«3Not enough positional parameters passed; got 1 but expected 3 in 'foo' at line 22:/tmp/VNveUUMpQJ in main program body at line 22:/tmp/VNveUUMpQJ» | ||
| rakudo 9b6189: ( no output ) | |||
| frooh | star: sub foo($x, $y, $z) { say $z }; my @bar = <a b c>; foo(*@bar); | ||
| p6eval | star 2010.07: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22» | ||
| frooh | how do I make @bar "explode" (as a rubyist would say) into three params? | ||
| sorear | isBEKaml: \\d{2}+ is a pretty useless pattern | ||
| frooh: |@bar | |||
| isBEKaml | gee, that went into a loop in my machine. :D | ||
| frooh | star: sub foo($x, $y, $z) { say $z }; my @bar = <a b c>; foo(|@bar); | 05:57 | |
| p6eval | star 2010.07: OUTPUT«c» | ||
| isBEKaml | sorear: I just wanted to see what happens when I throw it out to rakudo. :) | ||
| frooh | excallent | ||
| excellent* | |||
| sorear | isBEKaml: {2} is an embedded block, it matches the null string while evaluating 2 in void context | ||
|
05:57
snarkyboojum joined
|
|||
| sorear | isBEKaml: {2}+ matches the null string infinitely many times | 05:57 | |
| you know what | 05:58 | ||
| isBEKaml | sorear: right, yes. | ||
| sorear | this would be trivial to add a warning for | ||
| frooh thinks that this module is going to be less useful than it was in perl 5, due to the complexity of subroutine signatures | |||
| sorear does so | |||
| isBEKaml | sorear++ | 05:59 | |
| exactly what I wanted to see. | |||
|
06:00
snarkyboojum left
|
|||
| frooh | star: say 1 if <foo bar baz> ~~ <foo bar biff>; say 2 if <foo bar baz> ~~ <foo bar baz>; | 06:01 | |
| p6eval | star 2010.07: OUTPUT«2» | ||
| frooh | is there a more succinct way to do: | 06:02 | |
| oh wait | |||
| star: $f = sub { say @_[1] }; $f.(1,2,3); | 06:03 | ||
| p6eval | star 2010.07: OUTPUT«===SORRY!===Symbol '$f' not predeclared in <anonymous> (/tmp/bbMCfz3_Si:22)» | ||
| frooh | star: my $f = sub { say @_[1] }; $f.(1,2,3); | ||
| p6eval | star 2010.07: OUTPUT«2» | ||
| frooh | perfect | ||
|
06:04
Khisanth joined
06:09
snarkyboojum joined
|
|||
| frooh | star: my @foo = (sub { say wantarray })(); | 06:09 | |
| p6eval | star 2010.07: OUTPUT«Could not find sub &wantarray in <anon> at line 22:/tmp/YyBEPB9nms in main program body at line 22:/tmp/YyBEPB9nms» | ||
| frooh | is there a wantarray distinction in perl 6? | 06:10 | |
| sorear | no | 06:11 | |
| in Perl 6, functions are not context sensitive; the values themselves are | |||
| frooh | interesting.. | 06:14 | |
| but that means that *somewhere* down the line it has to get decided | 06:15 | ||
| isBEKaml | frooh: you can have a look at S08 | ||
| frooh pulls that up | |||
|
06:15
finanalyst joined,
Alias_ joined
|
|||
| frooh needs to just re-read all the Synopses | 06:17 | ||
| finanalyst | if I create a class XX, is there a way to associate a constant (eg 'a') with that class? eg., XX('a') or XX::'a', though neither of these seem to be right. | 06:18 | |
|
06:19
kevinspacey left
|
|||
| sorear | it's not working... | 06:21 | |
| finanalyst | or say I want a constant (eg. 1) to be explicitly Rat rather than Int? | ||
| sorear | <1/1> | ||
| I don't think there's a general mechanism | |||
| 1.Rat may work | |||
| pmichaud | eventually, Rat(1) | 06:23 | |
| 1.Rat ought to work | |||
| star: say 1.Rat.perl | |||
| p6eval | star 2010.07: OUTPUT«1/1» | ||
| pmichaud | 1.0 also produces a Rat, iirc | 06:24 | |
| star: say 1.0.WHAT | |||
| p6eval | star 2010.07: OUTPUT«Rat()» | ||
| melte | why is it called Rat | ||
| LaVolta | rational? | 06:26 | |
| pmichaud | rational, yes. | ||
| melte | ...that would make sense | ||
| pmichaud | and trying to preserve the 3-character names for many of the scalar builtins | 06:27 | |
| i.e., Any Int Str Num etc. | |||
|
06:37
goksie joined
|
|||
| finanalyst | can this be extended to subtypes, eg. odd integers? | 06:39 | |
|
06:39
snearch joined
|
|||
| avuserow | star: say 1.can(0) | 06:46 | |
| p6eval | star 2010.07: OUTPUT«» | ||
|
06:46
Guest23195 joined
07:01
goksie joined
07:02
drrho joined
07:07
redicaps joined,
goksie joined
07:21
Su-Shee joined
07:22
snarkyboojum left
|
|||
| isBEKaml | is there an equivalent of rounding to Int here? | 07:22 | |
| rakudo: (82/4).say | 07:23 | ||
| p6eval | rakudo 9b6189: OUTPUT«20.5» | ||
| isBEKaml | rakudo: (82/4).Int.say | ||
|
07:23
snarkyboojum joined
|
|||
| p6eval | rakudo 9b6189: OUTPUT«20» | 07:23 | |
| sorear | isBEKaml: your warning is in. | 07:27 | |
| std: /x{2}+/ # I wonder if p6eval has updated yet | |||
| p6eval | std 31883: OUTPUT«ok 00:01 115m» | ||
| isBEKaml | sorear: great! p6eval in the middle of build? | 07:31 | |
| rakudo: (200 ~~ /^\\d{2}+/).say | 07:32 | ||
| p6eval | rakudo 9b6189: ( no output ) | 07:33 | |
| isBEKaml | std: /\\d{2}+/ | ||
| p6eval | std 31883: OUTPUT«ok 00:01 115m» | ||
| sorear | isBEKaml: p6eval doesn't actually pay attention to pushes. It rebuilds once an hour regardless of activity. | ||
| isBEKaml | sorear: ok. | ||
|
07:35
jfried joined
07:36
Ross joined
|
|||
| isBEKaml | Can anyone tell me how I can speed this up ? gist.github.com/503068 | 07:38 | |
| sorear | lose the my Int | 07:43 | |
| type constraints require a run-time type check | 07:44 | ||
| on second thought, so does my == my Any | |||
| nevermind | |||
| lines 44 and 46 should use := to avoid duplicating the hash | 07:45 | ||
| 56 is quite ugly, Just do it incrementally | 07:46 | ||
| isBEKaml | I'm initialising the hash everytime in the block | ||
| incrementally as in? | |||
| sorear | $count++ if $days-so-far %% 7; $days-so-far += $days-this-month; | 07:47 | |
|
07:48
wamba joined
|
|||
| isBEKaml | we are just getting the first of every month in a given year. so I don't think the second statement is necessary. | 07:49 | |
| yeah, I could do include the first one. :) | |||
|
07:50
finanalyst left
|
|||
| sorear | isBEKaml: if you do the second one, then almost all of the rest of your code becomes unneccessary. | 07:51 | |
| isBEKaml | sorear: oh, boy... I was simply replicating the algorithm shown here: en.wikipedia.org/wiki/Calculating_t...f_the_week | 07:53 | |
| :/ | |||
| sorear: I think you're doing it based on every 7th day. in 100 years, there will be around 25 leap years. It doesn't seem to factor leap years. | 07:54 | ||
| sorear: if Sunday is taken to be 0, then every 7th day is a Sunday. On that cound, we could simply do 1200/7 and strike gold. :) | 07:55 | ||
| sorear: the above is because, this is exactly in the same century. if the 100 years were in different centuries, like say: 1905 - 2004, this would not work. | 07:56 | ||
|
07:56
kjeldahl joined,
kjeldahl_ joined
07:57
Mowah joined
|
|||
| sorear | pastie.org/1069380 is my solution | 07:58 | |
| outputs 170 after ~30 seconds | |||
| isBEKaml | sorear: mine shows 171 which is taken as the right answer. | 07:59 | |
| sorear | 18 seconds by time | ||
| isBEKaml | Infix !% is deprecated in favor of infix %% at line 9, near " 7) && ($y" | 08:01 | |
| this is what I get here when I run yours.. | |||
| sorear | I'm running a rakudo from before the spec change | 08:02 | |
| isBEKaml | oh.. | ||
|
08:04
molaf joined
08:06
tommyd joined
|
|||
| isBEKaml | std: /\\d{2}+/ | 08:09 | |
| p6eval | std 31884: OUTPUT«[31m===[0mSORRY![31m===[0mUnsupported use of {2} as general quantifier; in Perl 6 please use X**2 at /tmp/nNrb9w8G7c line 1:------> [32m/\\d{2}[33m⏏[31m+/[0mCheck failedFAILED 00:01 115m» | ||
| isBEKaml | sorear++ :) | ||
|
08:12
[1]Casan joined
08:15
avuserow joined
08:20
wamba left
08:21
wamba joined,
wamba left,
isBEKaml joined
08:24
wamba joined
08:28
envi^home joined
|
|||
| isBEKaml | sorear: I found an off-by-one error in your code: my $sofar = 0; # a Monday in Jan 1900 | 08:28 | |
| this works in producing 171 which is taken as the right answer on projecteuler. | |||
| sorear: thank you and I really need to go back to books to prevent myself from writing bloated code. :) | 08:31 | ||
|
08:32
Tom__ joined
08:35
maasj joined
08:37
maasj left,
masak joined
|
|||
| masak | oh hai, #perl6! | 08:37 | |
| isBEKaml | masak! :) | 08:38 | |
| masak: aren't you at yapc yet? | |||
| masak | isBEKaml: will be flying down there tomorrow. | 08:39 | |
| isBEKaml: I'm only at Yapsi so far :P | |||
| isBEKaml | masak: xD. So how's that coming through? | ||
| masak | well, I once again extend my challenge from yesterday; help me fill in the release announcement for today \\o/ | 08:40 | |
| isBEKaml | I just found that I can't write code. :| | 08:41 | |
| masak | github.com/masak/yapsi/blob/master/...ce/2010.08 | ||
| I haven't backlogged, so I don't know how many submissions I've reveived. | |||
| I got one via email so far. :) | 08:42 | ||
| isBEKaml | :) | ||
| masak | from someone I can't map to a nick -- exciting! | 08:43 | |
| isBEKaml | no pull requests. | ||
|
08:44
isBEKaml_ joined
08:48
avuserow joined
|
|||
| masak | re how it's going with the Yapsi refactor: the runtime is Mostly Done. I need to equip it with binding so we don't need to regress on a feature. I think I might be able to do binding better than last time. | 08:50 | |
| then I basically need to write a new parser. I should be able to take the old parser and write new action methods for it. | |||
| isBEKaml_ | are we still going through the lex scopes in a tree like pattern? [parent->child] | 08:51 | |
| masak | yes. | ||
| but the new runtime has a direct link to a scope and the correct variable in that scope. | |||
| so the lookup part has been pushed back to compile-time, which is a win. | 08:52 | ||
| isBEKaml_ | I see. | ||
|
08:54
avuserow joined
|
|||
| sorear | isBEKaml: um, what? 0 is sunday, how can 0 possibly be right | 08:58 | |
|
08:58
meppl joined
|
|||
| isBEKaml_ | sorear: that's what we want. count of all sundays. | 08:59 | |
| sorear | isBEKaml_: $sofar % 7 is the "current" day of the week. Before the big loop, it's 1 Jan 1900; didn't the comment say it was Monday? | ||
|
09:01
isBEKaml joined
|
|||
| sorear | isBEKaml_: $sofar % 7 is the "current" day of the week. Before the big loop, it's 1 Jan 1900; didn't the comment say it was Monday? | 09:02 | |
| hello masak! | |||
| masak | sorear: hi! | ||
| sorear: today is release day. :) | |||
| sorear | Anything new happen to yapsi? | ||
| masak | well, I wrote this new runtime in the beginning of July. | 09:03 | |
| its chief trait is that it handles `my $a = 2; while --$a { say my $b; $b = 42 }` correctly. | 09:04 | ||
| LaVolta | rakudo: my Int @nums = 1 .. 10; | ||
| masak | (the current runtime doesn't) | ||
| p6eval | rakudo 9b6189: ( no output ) | ||
| LaVolta | rakudo: my @nums = 1 .. 10; | 09:06 | |
| p6eval | rakudo 9b6189: ( no output ) | ||
| LaVolta | rakudo: my @nums = 1 .. 10; @nums.perl.say | ||
| p6eval | rakudo 9b6189: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]» | ||
| sorear | LaVolta: why do you torment our poor p6eval so | 09:07 | |
| LaVolta | sorear: sorry if I did something wrong | ||
| i got "maximum recursion depth exceeded" for my first paste | 09:08 | ||
|
09:08
avuserow joined
|
|||
| sorear | LaVolta: right. it's listed as the 3rd not working item in the rakudo star "don't even bother to try this" list | 09:09 | |
| LaVolta | oh my my my ... it's all my fault, my bad | 09:10 | |
| sorear | I know p6eval has resource limiters installed, but I'd still like to steer people away from running infinite loops on it | ||
| maybe this is pointless and it really does no harm. | |||
| LaVolta | sorry, I will stop doing those things... | ||
| masak | I'm more worried about people who try to get into the file system of the host computer. | 09:11 | |
| breakfast nom & | |||
| sorear | oops. I'm not *trying* to scare you | ||
|
09:12
alinbsp joined,
rurban joined,
rhebus joined
|
|||
| LaVolta | let's do that to our local copy... | 09:12 | |
| instead | |||
| rurban | The rakudo-star tests do nothing. prove -e ./perl6 -r modules/<name>/t eh? "for d in modules/*; do cd $d; test -d t && test -d lib && (cd lib; prove -e perl6 -r ../t); cd ${B}; done" comes close. How to add -Ilib to perl6? | ||
| isBEKaml | sorear: well, yeah. I have modified your code - the problem asked for number of sundays that fall on the first of the month in years 1901 to 2000. So... | ||
| rurban | @*INC is ~/.perl6/lib /usr/lib/parrot/2.6.0/languages/perl6/lib and ., but we need lib to be able to test a module before installing it... | ||
|
09:13
Ross joined
|
|||
| sorear | isBEKaml: yes, but the problem description doesn't give us the weekday for 1 Jan 1901 | 09:13 | |
| it gives us the weekday for 1 Jan 1900 | |||
| so I do the first year, but without updating $sundays | |||
| isBEKaml | sorear: right. so, I modified days-so-far to point to 1 Jan 1901 and iterated from 1901 to 2000. | 09:16 | |
| isBEKaml can't code.. :( | 09:17 | ||
| sorear | pugssvn, where art thou | 09:18 | |
| isBEKaml | lying dormant on feather. :D | 09:19 | |
.oO(sleeping under the feather) |
|||
|
09:21
ReiniUrban joined
|
|||
| rurban | rakudo-star test results nopaste.snit.ch/22503 | 09:24 | |
| szabgab | is there any %*ENV or similar in Rakudo? | 09:27 | |
| rurban | Well I would need a PERL6LIB env | 09:28 | |
|
09:36
tadzik joined
|
|||
| tadzik | morning #perl6 | 09:39 | |
| masak | szabgab: yes. it's spelled like you guessed -- %*ENV | 09:40 | |
| far as I know, it works. | |||
| rurban | Ok, PERL6LIB works okay, patch coming in my github star fork | 09:41 | |
| tadzik | hmm, what's so awesome about rakudo alpha that some thing still need it? | ||
| masak | tadzik: hardly anything nowadays. but that's changed in the last month or so. | 09:43 | |
| tadzik: two things are holding me back with certain projects: (a) inertia. (b) it's kinda nice to code against something that doesn't change all the time :) | 09:44 | ||
| tadzik | I see that YAPSI needs alpha, IIRC november too. | ||
| masak | correct. | ||
| tadzik | inertia? | ||
| masak | fixing the former omission today. :) | ||
| tadzik | oh, ok | ||
| masak | inertia is the property of large objects not to be easily moved. | 09:45 | |
| isBEKaml | masak: technically correct, but useless answer. :P | ||
| rurban | For pmichaud: github.com/rurban/star/commit/cdaf0...33eac97ea5 | ||
| masak | isBEKaml: no, it carries over as a metaphor for software, too :) | ||
| isBEKaml | masak: that's applicable only to MOP. ;) | 09:46 | |
| masak | moving a large-ish code base from alpha to ng/star is a mostly mechanical, but time-consuming task. | ||
| gfldex | masak: does that mean you can't stop perl6? | ||
| isBEKaml | (don't ask me what MOP is ;) | ||
| tadzik | meta-object protocol? | 09:47 | |
|
09:47
Ross joined
|
|||
| isBEKaml | tadzik: right. :) | 09:47 | |
| masak | gfldex: I was talking about code running Perl 6, but sure. you can't stop Perl 6. :) | ||
| gfldex | \\o/ | ||
| sorear out. | |||
|
09:49
hanekomu joined
|
|||
| masak | hanekomu! \\o/ | 09:50 | |
| hanekomu | hi | ||
|
09:50
goksie joined
|
|||
| masak | std: my $a = 0; loop while $a < 10 { say $a++ } | 09:50 | |
| p6eval | std 31885: OUTPUT«[31m===[0mSORRY![31m===[0mMissing block at /tmp/daks7PYql3 line 1:------> [32mmy $a = 0; loop [33m⏏[31mwhile $a < 10 { say $a++ }[0mParse failedFAILED 00:01 117m» | ||
| masak | I kinda wish STD'd say "no, it's 'repeat while'" or something. | 09:51 | |
| isBEKaml | std: /x{3}+/ | 09:53 | |
| p6eval | std 31885: OUTPUT«[31m===[0mSORRY![31m===[0mUnsupported use of {3} as general quantifier; in Perl 6 please use X**3 at /tmp/H9Mf4GgMog line 1:------> [32m/x{3}[33m⏏[31m+/[0mCheck failedFAILED 00:01 115m» | ||
| isBEKaml | std: /x{0,3}+/ | ||
| p6eval | std 31885: OUTPUT«[31m===[0mSORRY![31m===[0mUnsupported use of {0,3} as general quantifier; in Perl 6 please use X**0..3 at /tmp/VKMdXIsBJZ line 1:------> [32m/x{0,3}[33m⏏[31m+/[0mCheck failedFAILED 00:01 115m» | ||
| isBEKaml | std: /x**3{2}+/ | ||
| p6eval | std 31885: OUTPUT«[31m===[0mSORRY![31m===[0mUnsupported use of {2} as general quantifier; in Perl 6 please use X**2 at /tmp/fZe5MAFj8y line 1:------> [32m/x**3{2}[33m⏏[31m+/[0mCheck failedFAILED 00:01 117m» | ||
| isBEKaml | sorear++ :) | ||
| std: /x{0,3)/ | 09:54 | ||
| p6eval | std 31885: OUTPUT«[31m===[0mSORRY![31m===[0mUnable to parse statement list; couldn't find right brace at /tmp/0zwMjhRGgu line 1:------> [32m/x{0,3[33m⏏[31m)/[0m expecting any of: POST infix or meta-infix null term postfix postfix_prefix_meta_operator | ||
| ..statement modifier loopParse… | |||
| frettled | hanekomu: o/ | ||
| isBEKaml | uhh | ||
| hanekomu | hm? | ||
| rurban | Am I the first who packages rakudo-star? fedoraproject.org/wiki/Features/Rakudo_Star but nothing concrete | ||
| isBEKaml | rurban: me and tadzik++ have been at it, but stalled due to DESTDIR issue. :) | 09:55 | |
| rurban | Ok, DESTDIR is solved (and easy) | ||
| tadzik | rurban: I was trying to packagage it half an hour before it was released :) | ||
| rurban: is it? | |||
| rurban | testing is partially solved, see my github fork | 09:56 | |
| frettled | rurban++ | ||
| tadzik | rurban: got tarball? | ||
| frettled | std: /x{0,3}/ | ||
| rurban | Not yet, still testing | ||
| p6eval | std 31885: OUTPUT«[31m===[0mSORRY![31m===[0mUnsupported use of {0,3} as general quantifier; in Perl 6 please use X**0..3 at /tmp/SbwTxXyIZk line 1:------> [32m/x{0,3}[33m⏏[31m/[0mCheck failedFAILED 00:01 115m» | ||
| isBEKaml | rurban: the dist was tarballed? with all modules? | ||
| rurban | Just ufo and blizkost were misbehaving | ||
| I package as star just dependencies to an updated rakudo 2010.07-47 and the extras (libs, docs, tools) | 09:57 | ||
| isBEKaml | that reminds me. I still have to submit packages to slackbuilds.org. Su-Shee++ for raising this. | ||
| bbiab | 09:58 | ||
| rurban | my descr is "rakudo-star is parrot plus rakudo (a perl6 implemention on parrot) | ||
| plus some perl6 libraries, docs and libraries and blitzkost, a parrot | |||
| language which targets perl5. Contrary to the upstream rakudo-star release | |||
| for the masses, this does not include the external parrot or rakudo | |||
| releases. The external rakudo release matches the rakudo star release, | |||
| that's why it has the version 201007_47, not just 201007." | |||
| cxreg | blizkost (not blitzkost) is not a "parrot language" | 10:00 | |
| it's a perl 6 module which embeds libperl | 10:01 | ||
| rurban | it's in parrot languages, so its just another parrot language, just as perl6 | ||
| hanekomu | where does the name "blizkost" come from? It does indeed sound like "blitzkost", which would be a new German word for something like "lightning-fast food" | ||
| rurban | solvak | ||
| slovak,sorry | |||
| hanekomu | so it might have the same connotations | 10:02 | |
| rurban | "closeness", "contiguity" and "familiar" | ||
| hanekomu | oh | ||
| rurban | README - Oh, and why the name? | ||
| masak | hanekomu: it's Slovak, IIRC. | ||
| rurban: jnthn++ tends to give his projects unpronouncible Slavic names :P | 10:03 | ||
| rurban | isBEKaml: I'm just preparing a star distro for cygwin | ||
| cxreg | rurban: i guess technically it is implemented that way, but the way it's written it sounds more like Ponie than what it really is | ||
| (and i was wrong, it doesn't appear to depend on rakudo) | |||
| szabgab | rakudo: say %ENV.perl | 10:04 | |
| rakudo: say %*ENV.perl | |||
| p6eval | rakudo 9b6189: OUTPUT«===SORRY!===Symbol '%ENV' not predeclared in <anonymous> (/tmp/CSQ5kpJvxp:22)» | ||
| rakudo 9b6189: OUTPUT«Method 'key' not found for invocant of class 'String' in <anon> at line 4669:CORE.setting in 'Any::join' at line 1 in 'EnumMap::perl' at line 4675:CORE.setting in main program body at line 22:/tmp/apQGkcYZsb» | |||
|
10:04
briang joined
|
|||
| szabgab | masak: I was also hoping for that but it does not like me :-( | 10:04 | |
| masak | szabgab: small example? | 10:05 | |
| rurban | Ok. I wrote now "blizkost, a perl5 parrot language which embeds libperl5" | ||
| szabgab | rakudo: say %*ENV{HOME} | ||
| p6eval | rakudo 9b6189: OUTPUT«Could not find sub &HOME in main program body at line 22:/tmp/2QUMQvKuMZ» | ||
| szabgab | rakudo: say %*ENV.perl | ||
| p6eval | rakudo 9b6189: OUTPUT«Method 'key' not found for invocant of class 'String' in <anon> at line 4669:CORE.setting in 'Any::join' at line 1 in 'EnumMap::perl' at line 4675:CORE.setting in main program body at line 22:/tmp/C6nZQsbS5h» | ||
| masak | szabgab: .{HOME} is a p6ism. | ||
| szabgab: read the error message. | |||
| szabgab | rakudo: say .{HOME} | 10:06 | |
| p6eval | rakudo 9b6189: OUTPUT«Could not find sub &HOME in main program body at line 22:/tmp/XFtRAQc1_J» | ||
| masak | szabgab: I watched your hashes screencast. you know this! :) | ||
| szabgab | rakudo: say %*ENV{"HOME"} | ||
| p6eval | rakudo 9b6189: OUTPUT«/home/p6eval» | ||
| masak | right. | ||
| szabgab | crap | ||
| but still | |||
| rakudo: say %*ENV.perl | |||
| masak | no, just a literal string :) | ||
| p6eval | rakudo 9b6189: OUTPUT«Method 'key' not found for invocant of class 'String' in <anon> at line 4669:CORE.setting in 'Any::join' at line 1 in 'EnumMap::perl' at line 4675:CORE.setting in main program body at line 22:/tmp/VPjUwQ3k5M» | 10:07 | |
| masak | that looks like Parrot things leaking through. | ||
| rurban | code.google.com/p/cygwin-rurban/sou...tail?r=114 contains my star packaging (spec and patches) | ||
| masak submits rakudobug | |||
| szabgab hides | |||
|
10:08
redicaps joined
|
|||
| rurban | isBEKaml: are the slackware builds already accepted? | 10:10 | |
| masak | another small challenge to people here on the channel: if someone would go through Yapsi and list all of the Perl 6 features it uses, we make a roadmap for bootstrapping Yapsi out of that list. | ||
| I think if I were to give a lightning talk, I would show such a list, too. so this is a chance for fame and glory. | 10:11 | ||
| s/we/we can/ | |||
| rurban | I need some more rakudo-star distros so that it will be easier to get accepted at cygwin. Otherwise I need to go through voting | ||
| cxreg | cygwin depends on it being in other distros? | 10:12 | |
| masak | rakudo: say "a", "c" ... "m" | 10:13 | |
| p6eval | rakudo 9b6189: OUTPUT«acdefghijklm» | ||
| rurban | It is just faster | ||
| I was the first anyway who packaged parrot | |||
| (in an installable way) | |||
| cxreg | debian's rakudo is ancient | 10:14 | |
| cxreg wonders what Ryan Niebur is up to | 10:15 | ||
| that appears to be Ryan52 on irc | |||
| rurban: maybe bug him tomorrow :) | 10:16 | ||
| isBEKaml | rurban: not yet. I have yet to submit them. I'm currently running them through on my machine. (My own custom version works, though) | 10:21 | |
| masak | does an array my @a[100] somehow link to 100 scalar containers? | 10:23 | |
| isBEKaml | rurban: you can find my custom version here: github.com/svatsan/RakudoStar-Slackbuilds | 10:25 | |
| rurban: Note, when I submit them to slackbuilds, it won't be an R* dist version. It will be separate builds for parrot and rakudo each. | 10:27 | ||
| rurban | I'll have 3 seperate packages: parrot (plus parrot-devel), rakudo, and now rakudo-star where -star just has the additional files | 10:31 | |
|
10:31
whiteknight joined
|
|||
| isBEKaml | rurban: right. rakudo-star is just a custom version I'm making. It's currently unviable pushing for an install when they are actually two different packages/dependencies(however you see it) due to how slackware treats installs. | 10:32 | |
| has anyone noticed this is a trending repo on github today: github.com/kartick18/inception ? | 10:33 | ||
| due to the awesomely popular inception! :D | |||
| snarkyboojum | isBEKaml: linky no worky | 10:35 | |
| masak | snarkyboojum! \\o/ | ||
| isBEKaml: it's been trending for a few days at least. | 10:36 | ||
| snarkyboojum | masak: \\o/ | ||
| cxreg | rurban: maybe rakudo should be rakudo-compiler | ||
| masak | snarkyboojum: release day today! | ||
| snarkyboojum | masak: w00t! | ||
| cxreg | and rakudo could be a meta-package that does both? | ||
| isBEKaml | snarkyboojum: sorry, github.com/karthick18/inception | ||
| masak | snarkyboojum: I'm hard at work getting the new runtime to do all that the old one does. | ||
| rurban | nono, it's okay like that. It's a language interpreter | ||
| snarkyboojum | masak: sweet - ready for tardis soon I take it :) | 10:37 | |
| rurban | I need stable names downstream | ||
| masak | snarkyboojum: yes. there should be time (no pun intended) for that today as well. | ||
| snarkyboojum | masak: oh wow - productivity ahoy! | 10:38 | |
| masak | :) | ||
| isBEKaml | masak: :) | ||
| cxreg | isBEKaml: /kick Fischer | ||
| isBEKaml | cxreg: he never wakes up. :( | ||
| masak tries to make scalar containers invisible to '=' but visible to ':=' | 10:39 | ||
| snarkyboojum | isBEKaml: wow, the whole concept behind that project is way over my head. Looks like I'll have to do some googling :) | 10:40 | |
| cxreg | needs more ascii art | 10:42 | |
| isBEKaml | snarkyboojum: I found the code easier to understand than the movie. :P | ||
| isBEKaml hides | |||
| snarkyboojum hasn't seen it | 10:43 | ||
| cxreg | isBEKaml: i thought they were too forthcoming with explanation in the movie | ||
| snarkyboojum | would reading the code/running it count as a spoiler for the film? :) | 10:44 | |
| cxreg | probably | ||
| isBEKaml | cxreg: the talk about levels of sleep and drugs kept me thinking about how deep they were and how close they are to their goal. This was the first movie I found engaging. :) | ||
| masak | TimToady: it's too bad that $obj.?nosuchmethod returns Nil and that Nil is defined. it would be very convenient to do $obj.?nosuchmethod // $some-default | 10:45 | |
| rurban | I've not seen it yet, so please don'r spoiler! | ||
| isBEKaml | snarkyboojum: No, don't read it! Contains too many spoilers! :) | ||
| snarkyboojum | isBEKaml: I'll park it for another day then ;) | ||
| isBEKaml | snarkyboojum: :) | ||
| masak | snarkyboojum: good movie. I enjoyed it. | 10:46 | |
| definitely a movie for programmers. I can see why they created that github repo. | |||
| cxreg | masak: it's no Primer, but it was decent | 10:47 | |
| snarkyboojum | masak: excellent :) might go see it this week | ||
| masak | cxreg: oh, then I have to watch Primer, too :) | ||
|
10:47
molaf joined
|
|||
| cxreg | yes, do! | 10:47 | |
| isBEKaml | cxreg: I haven't seen Primer. Might watch it sometime. | ||
| masak | I think I just got binding to work again in the new runtime. | ||
| cxreg | primer is on netflix streaming, if you have that | 10:48 | |
| masak | yes, I did! \\o/ | ||
| rakudo: say 42.?nosuchmethod // "default never reached :(" | 10:49 | ||
| p6eval | rakudo 9b6189: OUTPUT«» | ||
| rurban | I see the rakudo-star package *MUCH* smaller than perl5 (where I already include a lot of vendor_modules) | ||
| rakudo: 2.1MB star: 387KB parrot 1.1MB perl5 10MB | |||
| p6eval | rakudo 9b6189: OUTPUT«===SORRY!===Confused at line 22, near "2.1MB star"» | ||
| masak | p6eval: :) | ||
| isBEKaml | rurban: star's just 387kB ? You're not packaging rakudo/parrot along with it but just the docs/extras? | 10:51 | |
|
10:53
avuserow joined
|
|||
| rurban | yes | 10:54 | |
| and the modules | 10:55 | ||
| and blizkost | |||
| using shared libs to libparrot | |||
| really tiny | |||
| masak | rakudo: my $a = "fool!"; $a ~~ / (foo) /; say $0 | 10:57 | |
| p6eval | rakudo 9b6189: OUTPUT«foo» | ||
| masak | rakudo: my $a = "fool!"; $a !~~ / (foo) /; say $0 | ||
| p6eval | rakudo 9b6189: OUTPUT«Any()» | ||
| masak submits rakudobug | 10:58 | ||
| just because I want it not to match doesn't mean I don't want it to capture. :) | |||
|
10:58
Italian_Plumber joined
|
|||
| masak | oh well, easy/obvious workaround. | 10:58 | |
| rakudo: my $a = "fool!"; $a ~~ / (foo) { say "OH HAI" } / | 10:59 | ||
| p6eval | rakudo 9b6189: OUTPUT«OH HAI» | ||
| masak | rakudo: my $a = "fool!"; $a !~~ / (foo) { say "OH HAI" } / | ||
| p6eval | rakudo 9b6189: OUTPUT«OH HAI» | ||
| masak | interesting. so the error seems to be in !~~ | 11:00 | |
| the lack of assigning to $/, that is. | |||
| rakudo: my $a = "fool!"; $a ~~ / (foo) { say $0 } / | 11:02 | ||
| p6eval | rakudo 9b6189: OUTPUT«foo» | ||
| masak | rakudo: my $a = "fool!"; $a !~~ / (foo) { say $0 } / | 11:03 | |
| isBEKaml | rurban: nice. packaging it everytime is why I kept star dist custom to my own version. | ||
| p6eval | rakudo 9b6189: OUTPUT«foo» | ||
| isBEKaml | masak: Interesting... | ||
| masak | interestinger and interestinger... | ||
| isBEKaml | rakudo: my $a = "boo FAAA"; $a !~~ / (FAA) { say $0 } / | 11:04 | |
| p6eval | rakudo 9b6189: OUTPUT«FAA» | ||
| isBEKaml | blah! | ||
| rakudo: my $a = "boo FAAA"; $a !~~ / (boo) (FAA) { say $1 } / | 11:05 | ||
| p6eval | rakudo 9b6189: ( no output ) | ||
| masak | that shouldn't match :) | ||
| (no matching on the space) | |||
| isBEKaml | $0 seems to be the default match for everything. | ||
|
11:05
redicaps joined
|
|||
| isBEKaml | rakudo: my $a = "boo FAAA"; $a !~~ / (boo) \\s (FAA) { say $1 } / | 11:05 | |
| p6eval | rakudo 9b6189: OUTPUT«FAA» | 11:06 | |
| isBEKaml | :) | ||
| masak | isBEKaml: 'default match for everything'. I didn't understand what you meant there. | ||
| isBEKaml | masak: never mind. | ||
| masak: I was thinking along the lines of awk's $0 | 11:07 | ||
| isBEKaml blinks. | |||
| masak | ah. | ||
| no, $0 desugars to $/[0] | |||
|
11:08
colomon joined
|
|||
| isBEKaml | masak: sometimes, I forget what I'm doing and see totally unrelated things. ;) | 11:08 | |
| colomon | o/ | ||
| masak | colomon: \\o | ||
| isBEKaml | masak: can you explain the last p6eval output. !~~ doesn't work right there.. | 11:09 | |
| masak | isBEKaml: the more you do Perl 6, the less that'll happen :) | ||
| isBEKaml: the last p6eval output looks right to me. | |||
| isBEKaml: what did you expect? | |||
| isBEKaml | masak: I didn't ask it to match. !~~ should not match what I ask to match, right? | ||
| masak | isBEKaml: there's a confusion of levels in that question. | 11:10 | |
| isBEKaml | masak: IOW, if $a doesn't match <this pattern> do this <blocK> | ||
| masak | isBEKaml: start by thinking of !~~ as 'not ~~' | ||
| isBEKaml: that is, do '~~' and then negate it. | |||
| isBEKaml: we still do exactly the same things inside the regex. | |||
| including binding to $0, $1 etc. | 11:11 | ||
| which was the point of my rakudobug submission. | |||
| isBEKaml | 16:38 < isBEKaml> masak: IOW, if $a doesn't match <this pattern> do this <blocK> | ||
| so this is wrong? | |||
| masak | yes. | ||
| it's a confusion of levels. | |||
| colomon | masak: did I miss any excitement yesterday? | 11:12 | |
| masak | the regex is like a subroutine. the insides of it are not negated, only the eventual result. | ||
| isBEKaml | masak: I see you speaking of Inception. ;) | ||
| "confusion of levels" | |||
| masak | isBEKaml: confusions of levels aren't restricted to Inception :P | ||
| isBEKaml | masak: so are they not restricted to dreams. :P | 11:13 | |
| masak | colomon: one always misses excitement by being absent from #perl6 :) | ||
| levels? dear me, no. | |||
|
11:13
snearch joined
|
|||
| isBEKaml | masak: I think I understand what you're trying to say, but I'll have to code some what better than the bloated piece I came up with this morning. :D | 11:14 | |
| to really understand it. | |||
| masak | isBEKaml: think of it like this: infix:<~~> means "match on this regex, return whether it matched". infix:<!~~> means "match on this regex, return whether it failed". apart from the return value, everything else remains the same. | 11:15 | |
| isBEKaml | rakudo: my $a = "Boo FAA"; if $a !~~ / (Boo)\\s(FA) { say $1 } / { say "I'm dead!"; }; | 11:17 | |
| p6eval | rakudo 9b6189: OUTPUT«FA» | ||
| isBEKaml | riiight! | ||
| masak++ | 11:18 | ||
| colomon | rakudo: say ("hello" ~~ /e/).WHAT | 11:19 | |
| masak | pmichaud: we don't have <?after ...> yet in nqp-rx? o.O | ||
| p6eval | rakudo 9b6189: OUTPUT«Match()» | ||
| isBEKaml | masak: I now see what you meant by "confusion of levels" - I'd say "confusion of blocks" :) | 11:20 | |
| masak | fair enuf. | ||
| colomon | can one of you try that last snippwt of mine with !~~ | 11:21 | |
| tt | |||
| isBEKaml | akudo: say ("hello" ~~ /e/).WHAT | 11:22 | |
| rakudo: say ("hello" !~~ /e/).WHAT | |||
| p6eval | rakudo 9b6189: OUTPUT«Bool()» | ||
| colomon | typing p6 on my phone is very hard | ||
| isBEKaml++ | |||
| masak | colomon: ah! | ||
| colomon++ | 11:23 | ||
| still doesn't explain why $/ doesn't get set. | |||
|
11:23
hudnix joined,
avuserow joined
|
|||
| colomon | when you use !~~ ? | 11:24 | |
| scope? | |||
| is !~~ using standard !op metaop? | |||
| masak | colomon: I just submitted a Rakudobug about it. rt.perl.org/rt3/Ticket/Display.html?id=76892 | 11:25 | |
| colomon: I don't know. 我不知到 | 11:26 | ||
| gah, wrong DAO. 道 | 11:27 | ||
| colomon | masak++ | ||
| rurban | This was my star packaging proposal for cygwin cygwin.com/ml/cygwin-apps/2010-08/msg00002.html | ||
| isBEKaml | DAO ? | 11:28 | |
| masak | isBEKaml: I'm typing phonetically. both 到 and 道 are pronounced 'dao'. | 11:29 | |
| isBEKaml: but it's the former that's used in the idiom "I don't know". it's the same character as the one in 'daoism', by the way. very fitting. | |||
| literally, 我不知道 translates to "I do not know the way". | 11:30 | ||
| but due to the way verb-object pairs work in Mandarin, no-one thinks "know the way" when they read that, only "know". | |||
| isBEKaml | masak: I don't know chinese/japanese. All I see are four ???? | 11:31 | |
|
11:31
gbacon joined
|
|||
| masak | isBEKaml: then you need more fonts. :) | 11:32 | |
| isBEKaml | mimo no comprende. :) | ||
| masak: Switching between X and console. ;) | |||
|
11:33
avuserow joined
|
|||
| masak | rakudo: my $s = "foo\\{foo\\}"; $s ~~ / <?{ $/.CURSOR.pos > 1 && $s.substr($/.CURSOR.pos - 1, 1) eq "\\{" }> foo /; say $/.from | 11:37 | |
| isBEKaml | masak: I'm not good with languages at all. | ||
| p6eval | rakudo 9b6189: OUTPUT«4» | ||
| masak | workaround for lack of <?after ...> :) | ||
| too bad the Cursor won't tell me what target string it's matching on. then I wouldn't have to save it into $s before. | 11:40 | ||
| cognominal | hum how I can get a MyGrammar.parse( "...", :target<parse>) to get the same effect (dumping parse tree) as perl6 --target=parse ? | 11:42 | |
|
11:44
rurban joined
|
|||
| masak | cognominal: augment the appropriate class with a new parse multi that requires :$target! = "parse" | 11:44 | |
| I guess that'd work, at least. | |||
|
11:44
barika joined
|
|||
| masak | hm, :$target! where "parse" | 11:45 | |
| cognominal | say (A.parse('ab', :target<parse> )).perl; # dumps but in a different format. | ||
| masak | rakudo: "foo" ~~ /<?after o> o/; say $/.from # should say 2 | 11:46 | |
| p6eval | rakudo 9b6189: OUTPUT«Method 'after' not found for invocant of class 'Cursor' in <anon> at line 22:/tmp/r91PDvy9VJ in 'Cool::match' at line 2377:CORE.setting in 'Regex::ACCEPTS' at line 5635:CORE.setting in main program body at line 10:/tmp/r91PDvy9VJ» | ||
|
11:55
azert0x joined
|
|||
| masak | ah, it's good to be back to coding again. | 11:56 | |
|
12:09
x3nU joined
|
|||
| x3nU | hi | 12:09 | |
| masak | x3nU: hi! | 12:11 | |
| x3nU | i've got problem with perl6 and/or SCGI module | 12:26 | |
| i'm trying to run script from SCGI readme | |||
| (github.com/supernovus/SCGI/blob/master/README) | |||
| and that's what i get: | 12:27 | ||
| Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 3 | |||
| i'm using latest rakudo perl version on win32 | |||
| masak | sounds like there's a ')' missing. | ||
| masak looks at the code in the README | |||
|
12:28
redicaps1 joined
|
|||
| masak | x3nU: example looks fine to me. did you type it in or copy it in? | 12:29 | |
| x3nU | i copied | ||
| masak | x3nU: what does line 3 contain in your script? | 12:31 | |
| oh! | |||
| there's a comma missing in the README script. | |||
| should be one right after :addr<localhost> | |||
| (not necessary by spec IIRC, but by current Rakudo) | 12:32 | ||
| x3nU | thanks, additionaly there was "return $return" and i changed this to "return $response" | 12:34 | |
| and it started working | |||
| masak | x3nU++ | 12:36 | |
| phenny: tell supernovus that in github.com/supernovus/SCGI/blob/master/README, you need a comma on line 3 and 'return $response' last. x3nU++ discovered this. | 12:37 | ||
| phenny | masak: I'll pass that on when supernovus is around. | ||
| snarkyboojum | rakudo: package A {}; say A.WHAT | 12:39 | |
| p6eval | rakudo 9b6189: OUTPUT«Method 'WHAT' not found for non-object in main program body at line 22:/tmp/QBY5vDgnzO» | ||
| snarkyboojum | rakudo: module A {}; say A.WHAT | ||
| p6eval | rakudo 9b6189: OUTPUT«Method 'WHAT' not found for non-object in main program body at line 22:/tmp/tfSUuUY7RF» | ||
| masak | snarkyboojum: that one is known and reported, IIRC. | 12:40 | |
| snarkyboojum | masak: ah cool - just trying to work it out - way over my head though :) | ||
|
12:40
isBEKaml joined
12:41
umphy joined
|
|||
| masak | snarkyboojum: well, the cause seems clear even if the fix isn't. | 12:41 | |
| snarkyboojum: modules and packages are probably Parrot-y things, so they're too different from ordinary Perl 6 objects. | |||
| rakudo: say Module.WHAT; say Package.WHAT | |||
| p6eval | rakudo 9b6189: OUTPUT«Could not find sub &Module in main program body at line 22:/tmp/dDgx8iRMBG» | ||
| masak | huh. | 12:42 | |
| std: Module; Package; | |||
| p6eval | std 31885: OUTPUT«ok 00:01 114m» | ||
| snarkyboojum | rakudo: say Perl6::Compiler::Module.WHAT | 12:43 | |
| p6eval | rakudo 9b6189: OUTPUT«Perl6::Compiler::Module()» | ||
| masak | snarkyboojum++ | ||
| isBEKaml | rakudo: module Foo; Foo.WHAT.say; | 12:45 | |
| p6eval | rakudo 9b6189: OUTPUT«Method 'WHAT' not found for non-object in main program body at line 22:/tmp/RaCKtT4B4h» | ||
| isBEKaml | rakudo: module Foo { ... }; Foo.WHAT.say; | ||
| p6eval | rakudo 9b6189: OUTPUT«Failure()» | 12:46 | |
| isBEKaml | uhh, Failure() ? | ||
| rakudo: module Foo { module Bar { } }; (Foo::Bar).WHAT.say; | 12:48 | ||
| p6eval | rakudo 9b6189: OUTPUT«Can not find sub Foo::Bar in main program body at line 1» | ||
|
12:49
colomon_ joined
|
|||
| isBEKaml | rakudo: module Foo {}; Foo.WHAT.say; | 12:50 | |
| p6eval | rakudo 9b6189: OUTPUT«Method 'WHAT' not found for non-object in main program body at line 22:/tmp/xmMm7ZJqLk» | ||
| isBEKaml | rurban: why does the fedora project wiki state Rakudo Star as the first production release of Rakudo? | 12:54 | |
| fedoraproject.org/wiki/Features/Rakudo_Star | 12:55 | ||
| masak | is S05:3939 inaccurate? should it say .parsefile instead of just .parse? | 12:58 | |
| by the way, what's so great about .parsefile that .IO.slurp.parse doesn't do? | |||
| oh well, maybe it's a reasonable shortcut. | 12:59 | ||
|
12:59
Ross joined,
Kodi joined
|
|||
| Kodi | Should numeric types have a .Duration method to cast them to a Duration? If not, what would be the right way to create an arbitrary Duration, short of DateTime.new(...).Instant - DateTime.new(...).Instant? | 13:01 | |
| masak | maybe one could also create a Duration from a DateTime::Duration (not spec'd yet) | 13:03 | |
| Kodi | masak: DateTime::Duration? I've never even heard of that. What's it supposed to do? | 13:04 | |
| masak | Kodi: it's supposed to be a port of the corresponding CPAN module. | ||
| Kodi: would allow adding and subtracting DateTimes. | |||
| feel free to author that part of the Temporal spec :) | 13:05 | ||
| Kodi | masak: Oh, yes, I've seen that module. I'm not sure that kind of thing belongs in the core. | ||
| masak: Then again, we didn't think leap seconds belonged in the core. :) | |||
| masak | I think people might miss it, since adding and subtracting Date objects already work. | 13:06 | |
| but yes, it's a slippery slope. | |||
|
13:06
HarryS joined
|
|||
| Kodi | We *could* get useful DateTime arithmetic much more easily by just making $dt - $dt equivalent to $dt.Instant - $dt.Instant, and so on. | 13:07 | |
| masak | I think autarch's CPAN module makes good arguments for why one doesn't want that. | ||
| specifically, when I say "one month later", I mean something context-dependent,, not a fixed time difference. | 13:09 | ||
|
13:09
kid51 joined
|
|||
| Kodi | masak: Yeah, there'll always be a place for fuzzy DateTime arithmetic like that. I guess the question is whether the built-in arithmetic should do that, or it should be provided in temporal-utils. | 13:10 | |
| masak | I'm fine with the latter. | 13:11 | |
| m6locks | omg i just noticed the OFFICIAL Rakudo Star release, building it now | ||
| Kodi | masak: Good. I like it better, I think. It means it can be developed independently of Rakudo, for one thing. | 13:12 | |
| m6locks | with all the delicious treats and modules and stuff that didn't work sometime ago | ||
| okay | |||
| some error | |||
| find rakudo-star-2010.07 -name '.*' -prune -o -type f -printf '%P\\n' >rakudo-star-2010.07/MANIFEST | |||
| masak | m6locks: yeah, it's pretty rad. | 13:13 | |
| m6locks | find: -printf: unknown option | ||
| make: *** [rakudo-star-2010.07/MANIFEST] Error 1 | |||
| wuts dat | |||
| masak | m6locks: you're on... Unix? | ||
| snarkyboojum | m6locks: ah yeah.. on OS X? | ||
| m6locks | mac os x | ||
| masak | m6locks: I think ingy got that one too. | ||
| m6locks | aye | ||
| snarkyboojum | -printf isn't understood by find on OS X | ||
| i.e. not an option | |||
| m6locks | its 10.6.4 | ||
| snarkyboojum | it's a GNUism or Linuxism I think | 13:14 | |
| m6locks | ok, so like can i hack that | ||
| edit it out | |||
| isBEKaml | aye, printf works on linux | ||
| Kodi | masak: Would you object to my adding Duration.new() to S02? | ||
| snarkyboojum | I was going to, but didn't get around to it - it just strips off the first directory in the listing I think | ||
| m6locks | MANIFEST as a file is zero lines, so can't do much about it :PP :PP | 13:15 | |
| masak | Kodi: insufficient data. a patch would help. | ||
| frettled | snarkyboojum: GNUism, yes. | ||
| masak | I probably won't object, though. | ||
| m6locks | so does this mean that I don't get to play with it >:/ | 13:16 | |
| isBEKaml | it gets all filenames and writes to MANIFEST | ||
| m6locks | hmph | ||
| masak | m6locks: not without manually tinkering a bit, at least. | ||
| snarkyboojum | m6locks: well not the star distro which *creates* star releases :), but shouldn't be too hard to work around :) | ||
| m6locks: you can still install and play with Star :) | 13:17 | ||
| frettled | m6locks: -printf '%P\\n' removes the initial ./ from the results of find | ||
| m6locks: that is, it removes the pathspec | |||
| Kodi | masak: A patch to the spec, you mean? It would be easy as adding the sentence "A C<Duration> can also be constructed with C<Duration.new>, which takes a number of seconds as its only argument." or so. | ||
| snarkyboojum | I think it removes 'rakudo-star-2010.07' doesn't it? | ||
| m6locks | thanks guys | 13:18 | |
| it's fetching it now, i'll see if it works by just removing the -fprint '' part | 13:20 | ||
|
13:20
colomon_ joined
|
|||
| masak | Kodi: doesn't sound like it belongs in S02, actually. more like S32. | 13:21 | |
| Kodi: and it's almost, but not quite, self-evident that it does have such a .new constructor. | 13:22 | ||
| Kodi | masak: In fact, probably most of the stuff about Instants and Durations belongs in S32. | ||
| masak | aye. | ||
| Kodi | masak: The reason it didn't strike me as anywhere near self-evident is that it's really just supposed to be a kind of number, and we don't have, e.g., Int.new. | ||
| snarkyboojum | m6locks: it'll create a manifest if you remove the -printf option, but the path to the files in the manifest will contain the name of the release directory, i.e. rakudo-star-2010.07/ | ||
| m6locks: so that's all that needs to be worked around on OS X :) | 13:23 | ||
| Kodi | (Or do we? It doesn't work in an obvious way in Rakudo, at least.) | ||
| m6locks | snarkyboojum: aye, it'd be nice to mention that one in the README file I guess for all the OS X users | 13:24 | |
|
13:24
LaVolta joined
|
|||
| snarkyboojum | m6locks: yeah - and/or find a command that works on all envs :) | 13:24 | |
| m6locks | aye ;P | ||
| isBEKaml | I think -print would work. | 13:25 | |
|
13:25
am0c joined
|
|||
| isBEKaml | but it doesn't remove the rakudo-star part, it would just write to MANIFEST along with it | 13:26 | |
| Kodi gets a phone call. | |||
| snarkyboojum | isBEKaml: works without -print as well, the problem is removing the release dir | ||
| "problem" | |||
|
13:27
tommyd joined
|
|||
| m6locks | hmm not working, getting lots of tar errors | 13:27 | |
| tar: rakudo-star-2010.07/rakudo-star-2010.07/skel/README: Cannot stat: No such file or directory | |||
| isBEKaml | snarkyboojum: yes, -print is _not_ needed in most cases. | ||
|
13:27
mjk joined
|
|||
| snarkyboojum | isBEKaml: yep | 13:27 | |
| isBEKaml | rakudo-star/rakudo-star? that doesn't seem right. what did you do? | ||
| frettled | run it on an untested system ;) | 13:28 | |
| (non-GNU) | |||
| isBEKaml | yeah, mac :) | ||
| m6locks | i removed the -fprint 'blah' part from the makefile | ||
| isBEKaml | :q | ||
| hugme hugs isBEKaml, good vi(m) user! | |||
| frettled | Wherever that find-line is, shoot the -printf '%P\\n' bit horribly, and pipe it through sed instead: | ||
| isBEKaml | blah! | ||
| m6locks | well that one above frettled just said | 13:29 | |
| frettled | | sed -e 's,^[^/]*/,,' | ||
| That ought to remove the first part of the path, up to and including the first slash | |||
| m6locks | hmm I'll add it | 13:30 | |
|
13:30
colomon_ joined
|
|||
| m6locks | bbl to report results, gotta run now | 13:31 | |
| snarkyboojum | I just piped it through perl and got it going, but yeah, sed or awk would be better :) | ||
|
13:31
amkrankruleuen joined
13:32
Ross joined
|
|||
| frettled | but you have to avoid gawking on a Mac ;) | 13:33 | |
| isBEKaml | macgawkin' | 13:34 | |
| :D | |||
|
13:41
colomon__ joined
|
|||
| snarkyboojum | find $(DISTDIR) -name '.*' -prune -o -type f | sed -e 's|^[^/]*/||' >$(DISTDIR)/MANIFEST seems to work a treat | 13:43 | |
| frettled++ # nicer than my perl incantation :) | |||
| err.. invocation ;) | |||
| frettled | You're very welcome! | 13:49 | |
| frettled prefers using commas rather than pipes, because a misplaced single quote can lead to, ahem, interesting side effects :) | 13:50 | ||
| isBEKaml prefers using + than , cos they aren't in english! ;) | 13:54 | ||
|
13:55
tadzik joined
13:56
amkrankr1leuen joined
|
|||
| moritz_ is at the YAPC::EU venue | 13:57 | ||
| frettled | moritz_: oooh. How is it? | 14:00 | |
| moritz_ | hm | 14:01 | |
| odd | |||
| expensive :-) | |||
| not enough perl programmers around yet | 14:02 | ||
| masak | moritz_: will the hackathon on Tuesday be at the venue somewhere? | ||
| moritz_ | masak: I suspect in the lobby | ||
| masak: there's free wifi here | 14:03 | ||
| masak | \\o/ | ||
| moritz_ | it's slow, and high ping times | ||
| but it works | |||
| masak | excellent. | ||
| I'm not sure when I'll show up in Pisa tomorrow. probably late. | |||
| I suspect we won't meet until on Tuesday. | 14:04 | ||
| snarkyboojum | potential patch for the rakudo star Makefile on OS X - gist.github.com/503392 (unless there is a better way of doing it) - I haven't tested it on linux ;) | 14:08 | |
| isBEKaml | snarkyboojum: that should work on linux. I haven't had the time to build it as I'm now looking to package for slackware. :) | 14:10 | |
| but yeah, I could just run a sample command. :) | 14:11 | ||
| snarkyboojum | isBEKaml: cheers - that's what I thought ;) but should be tested eh | ||
| isBEKaml++ :) | |||
| x3nU | if i create perl 6 module where should i submit it? (just asking, currently i'm learning perl6 ;)) | ||
| tadzik | x3nU: publish them on github | 14:12 | |
| isBEKaml | x3nU: github is the unofficial source repo for p6 (even rakudo is hosted on github) :) | ||
| x3nU: it's fine if you host it elsewhere too, just let us know! :) | 14:13 | ||
|
14:13
slavik joined
|
|||
| slavik | there is no more pugs? | 14:14 | |
| masak | slavik: it's there, as always. | 14:15 | |
| slavik | ahh | ||
| it's not mentioned in the subject :( | |||
| masak | pugs: say "OH HAI" | ||
| x3nU | well too bad that github uses git ;/ | ||
| p6eval | pugs: OUTPUT«OH HAI» | ||
| masak | x3nU: too bad? why? we think it's too good! :) | 14:16 | |
| 太好了! | |||
| isBEKaml | x3nU: what do you want to use? svn? | ||
| snarkyboojum: as said, the command works. | 14:17 | ||
| snarkyboojum++ | |||
| snarkyboojum | w00t! | ||
| tadzik | x3nU: github supports svn too ;) | ||
| snarkyboojum | :) | ||
| tadzik | (if you are a masochist) | 14:18 | |
| isBEKaml | tadzik: no, tell that to cvs folks. ;) | 14:19 | |
| x3nU | i was thinking about mercurial ;f | ||
| tadzik | isBEKaml: but they are extinct, aren't they? :) | 14:20 | |
| isBEKaml | tadzik: yes, folks are still around to use it. :D | 14:21 | |
|
14:21
Axius joined
|
|||
| Axius | hi | 14:22 | |
| masak | Axius: hi! | ||
| bye... | 14:23 | ||
|
14:23
Axius joined
|
|||
| isBEKaml | masak: no, wait. No Yapsi release today? | 14:23 | |
| masak | isBEKaml: yes Yapsi release today. I'm coding full speed here. :) | 14:24 | |
| isBEKaml | productivity++ | ||
| masak | isBEKaml: finishing up the refactor by providing the new runtime with a new compiler :) | ||
| essentially, Yapsi will get a whole new Yapsi this month. | |||
| Axius | rakudo: say 53 **2 | 14:25 | |
| isBEKaml | masak: great! happy hackin' :) | ||
| p6eval | rakudo 9b6189: OUTPUT«2809» | ||
| masak is very happy | |||
|
14:25
clintongormley joined
|
|||
| slavik | btw, will/does rakudo allow dynamic loading of modules? or would that have to be part of parrot? | 14:28 | |
|
14:28
synth joined
|
|||
| masak | it's the third time or so that I write a Match tree traverser. this time I'm really, really happy about it: gist.github.com/503417 | 14:28 | |
| I use it in the new Yapsi to find all the variable declarations in a given block. | 14:29 | ||
| slavik | pmichaud: if you're around. where can I read about benchmarks of parrot? | ||
| pmichaud | good morning, #perl6 | ||
| slavik | sweet :D | ||
| frettled | good moaning! | ||
| slavik | morning :) | ||
| masak | morning, pm! | ||
| pmichaud | ...benchmarks of parrot? | 14:30 | |
| slavik | pmichaud: www.pmichaud.com/2008/pres/oscon-pc...b.html#end | ||
| pmichaud: looking for some numbers or something :) (out of interest) | |||
| pmichaud | those were all hand generated pir versus p5 equivalents | 14:31 | |
| we didn't store them anywhere | |||
| frettled | ooh, nice comment on my blog: www.blogger.com/comment.g?blogID=7...0528415524 | ||
| slavik | pmichaud: I see. :( | 14:32 | |
|
14:33
dual joined
|
|||
| slavik | pmichaud: www.mail-archive.com/perl6-all@perl...27196.html | 14:34 | |
| jnthn | o/ (briefly) | 14:35 | |
| pmichaud | slavik: yeah, that's an example of one of the benchmarks that was used | ||
| masak | jnthn! \\o/ | ||
| slavik | pmichaud: do those numbers look fine to you? | ||
| pmichaud | jnthn: o/ | ||
| slavik: depends on what you're looking for. | |||
| 2003 was a long time ago. | |||
| slavik | pmichaud: just wondeirng about parrot's performance relative to C/python :P | 14:36 | |
| jnthn | masak: Don't panic! :-) | ||
| slavik | pmichaud: would you say parrot got faster? | ||
| masak panics a bit less | |||
| pmichaud | slavik: I wouldn't say much of anything regarding parrot's performance anymore. (more) | ||
| beyond that, the parrot of 2003 looks nothing like the parrot of today | |||
| masak | jnthn: actually, I'm having quite a good time with Yapsi today. for a little moment I've forgotten about GSoC and my slides... | 14:37 | |
| slavik | how come? | ||
| masak panics again | |||
| pmichaud | slavik: because a lot has changed since that early version (more) | ||
| frettled | Relax, everything is under full panic. | ||
| pmichaud | I suspect that the PIR versions that were benchmarked then were doing everything in I registers | ||
| and there probably wasn't any subroutine call overhead | 14:38 | ||
| or, if there was, it would've been using the old parrot calling conventions, which didn't involve any PMC creation for parameters or contexts | |||
| jnthn | masak: GSoC tormentor is tormented. | ||
| slavik | pmichaud: would you say that it's worth doing some benchmarks now? | ||
| pmichaud | slavik: sure, one could some benchmarks now. | 14:39 | |
| masak | jnthn: I'll make sure to get a bit of hacking and blogging in later today, when the Yapsi stuff feels stable. | ||
| slavik | pmichaud: I am kind of interested in how Perl6 can perform at the moment compared with Perl5 | ||
| jnthn | masak: :-) | ||
| slavik | pmichaud: according to that page, even though it is from 2003, parrot performance is very good for 'general' code | 14:40 | |
| jnthn | masak: I'm here for 5-10 mins more now, will be back later on though and around until I go to the airport, if you need any GSoC mentorization. :-) | ||
| slavik | anyone here ever program with MPI? | ||
| pmichaud | slavik: based on my experiences since then, I don't think I would agree with the 'general code' comment, at least not for Parrot of today | ||
| masak | jnthn: our latest privmsg session still sustains me, so I'm fine for now. | ||
| jnthn | masak: \\o/ | 14:41 | |
| pmichaud | at the time I think the parrot designers were making some extreme assumptions about the kind of code that could be produced from a dynamic language | ||
| slavik | pmichaud: how come? are you saying that parrot has gotten slower? | ||
| Khisanth | sounds more like assumptions have changed :) | ||
| jnthn | slavik: The issue was more that the things they were saying "oh hey, Parrot can do this real fast" were not the kind of things we needed to do to run Perl 6 code. | ||
| slavik | I see | 14:42 | |
| pmichaud | need an example? | ||
| slavik | jnthn: but parrot is not primarily built for rakudo, was it? | ||
| pmichaud: yes please. :) | |||
| pmichaud | okay | ||
| in a benchmark like the primes example, they likely make use of the 'mod' opcode | |||
| i.e., they can do $I0 = $I1 mod $I2 | |||
| slavik | right | ||
| pmichaud | which does a modulo operation between $I1 and $I2, storing the result into $I0 | 14:43 | |
| in Perl 6, the equivalent statement would be | |||
| my $remainder = $v % $div | |||
| slavik | remainder? | ||
| oh right | 14:44 | ||
| pmichaud | well, whatever | ||
| slavik | sorry | ||
| pmichaud | anyway, that code translates to the following | ||
| slavik | right | ||
| same as C | |||
| pmichaud | $P0 = find_lex '$v' | ||
| $P1 = find_lex '$div' | |||
| $P2 = '&infix:<%>'($P0, $P1) | |||
| $P3 = find_lex '$remainder' | |||
| '&infix:<=>'($P3, $P2) | 14:45 | ||
| slavik | even x86 is more efficient in modulo | ||
| what exactly is find_lex? (variable lookup?) | |||
| pmichaud | i.e., it involves three lexical lookups and two subroutine calls | ||
| slavik | should the 2 subroutine calls simply be assignments? | 14:46 | |
| or is it for overloading ... | |||
| it seems that parrot is more like writing java than writing the jvm | |||
| pmichaud | only if your compiler is smart enough to detect that overloading won't occur, and that type checking isn't in play, and that $remainder isn't readonly, and ... | ||
| slavik | pmichaud: is it safe to assume that rakudo will be able to figure such things out? | 14:47 | |
| pmichaud | slavik: no. | ||
| slavik | optimizer? | ||
| jnthn | Depends. | ||
| On how much info is available. | |||
| pmichaud | slavik: let's suppose that rakudo could figure it out | ||
| jnthn | (at compile time) | ||
| pmichaud | then we'd be down to | ||
|
14:48
pascal__ joined
|
|||
| pmichaud | and let's suppose that rakudo could avoid the extra fetches | 14:48 | |
| then at best we would be down to | |||
| slavik | my int $a = 5; my int $b = 3; my int $c = $a % $b; | ||
| that gives it more ifo | |||
| info* | |||
| jnthn | Gotta run - back later | ||
| pmichaud | in that limited case, rakudo might be able to optimize down | 14:49 | |
| but your original question was about 'general code' | 14:50 | ||
| 14:40 <slavik> pmichaud: according to that page, even though it is from 2003, parrot performance is very good for 'general' code | 14:51 | ||
| slavik | which would involve arithmetic operations :) | ||
| pmichaud | no, in this case it involves arithmethic operations of explicitly declared native types that aren't being passed or used in loops or subroutines | 14:52 | |
| I don't think that's "general code" | |||
| slavik | pmichaud: but from Larry's apocalypses, Perl6 allows specification of types for vars which should allow the compiler to optimize the code a bit. | 14:53 | |
| pmichaud | a bit, yes. | ||
| masak | phew -- I thought I had discovered another case of blocks not being cloned properly, but it was just me not cloning an array properly :) | ||
| pmichaud | all the way down to the primse.pasm example.... I'm doubtful. | ||
| *primes.pasm | |||
| masak | pmichaud: I missed <?after ...> today. filed a rakudobug about it. | 14:54 | |
| pmichaud | masak: okay. | ||
| masak | pmichaud: I found a workaround using $/.CURSOR.pos and the sacrifice of a chicken, though :) | ||
| slavik | pmichaud: there is always a trade off when using a higher level language. | 14:56 | |
| pmichaud | slavik: no argument there. :) | ||
| slavik | pmichaud: my next question. :) when rakudo compiled Perl6 code, does it go straight to parrot bytecode or to parrot assembly? | ||
| pmichaud: if Perl6 is 10% slower than parrot, then I'll take it :D | |||
| pmichaud | currently to PIR, then to bytecode. Parrot doesn't have a mechanism to go directly to bytecode for anything except PIR. | 14:57 | |
| masak | rakudo: my &foo = { next }; for 1..3 -> $n { foo if $n == 2; say $n } | 14:58 | |
| p6eval | rakudo 9b6189: OUTPUT«13» | ||
| masak | \\o/ | ||
| next from within a closure :) | |||
| sadly, I think I just found a legitimate use case for that... | 14:59 | ||
|
15:03
aCiD2 joined
|
|||
| aCiD2 | I'm hacking on adding "getprotobyname" to rakudo. I've added it to parrot as a dynop library, how do I get this into a perl 6 subroutine? | 15:03 | |
| (I've got src/core/socket.pm which is like src/core/system.pm) | 15:04 | ||
| pmichaud | pir::getprotobyname__<args> would seem to be easiest | ||
| aCiD2 | what is the args bit? I've seen "time__n" but I don't know what that means | ||
| and how do I load the library? In pir I'd have to do .loadlib "socket_ops" first | |||
| pmichaud | example: pir::xyz__PsPi | 15:05 | |
| the first character is the type of register to store the result in | |||
| the remaining characters are the types of values to use as arguments | |||
| P = PMC register, S = string register, I = int register, N = num register | |||
| aCiD2 | ah, that makes sense | ||
| pmichaud | s = string value or string register, i = int value or int register, n = num value or num register | 15:06 | |
| aCiD2 | So my op takes a single string, so I'd use getprotobyname__is (returns an int, takes a string) | ||
| pmichaud | uppercase I | ||
| aCiD2 | ok | ||
| pmichaud | because the result has to go into a register | ||
| aCiD2 | makse sense. lets see if this compiles | 15:07 | |
| pmichaud | you may be better off starting out by creating a separate module for sockets than trying to bundle it into rakudo | ||
| aCiD2 | why's that? | ||
| pmichaud | because I'm not sure what part of sockets will end up being 'core' | 15:08 | |
| aCiD2 | Hm, this was core perl 5, so I assumed it would be core perl 6 | ||
| it's also part of core python. but of course, maybe bad assumptions | |||
| pmichaud | at one time would've totally agreed with that, but enough things have changed between p5 and p6 that I'm no longer sure such assumptions are valid | 15:09 | |
|
15:09
cognominal joined
|
|||
| aCiD2 nods | 15:09 | ||
| pmichaud | anyway, if done as a module, it's easier to prototype and experiment | ||
| because you aren't constantly recompiling rakudo :) | |||
| aCiD2 | I implemented the getprotobyname as part of core parrot - do you think that was the right choice? | ||
| pmichaud | that'd have to be a question for the parrot folks (more) | 15:10 | |
| in general, they've been moving away from specialized opcodes and towards methods on objects | |||
| aCiD2 | yea, I've given patches for both :) | ||
| pmichaud | so they might want to see it as a PMC method instead of an opcode | ||
| aCiD2 | I did it once as a pmc method, and once as a dynamic op code | ||
| pmichaud | I'd think the PMC method would be more likely | ||
| aCiD2 | it seems wasteful as a pmc method though, because you end up creating a socket object then throwing it away straight away | 15:11 | |
| (well, that's how I'm assuming the generated perl 6 pir would look) | |||
| snarkyboojum | pmichaud: this gets star distribution building working on OS X gist.github.com/503392 - not sure if you want to use it or do something different for OS X | 15:14 | |
|
15:15
kiffin joined
|
|||
| pmichaud | snarkyboojum: that looks.... wrong. | 15:16 | |
| snarkyboojum | pmichaud: ok :) | ||
| pmichaud | is the 'sed' command stripping all of the leading path information? | ||
|
15:16
kiffin joined
|
|||
| snarkyboojum | yeah | 15:16 | |
| pmichaud | yeah, that's wrong. %P simply strips the leading directory prefix of whatever was passed to find | 15:17 | |
| not all paths | |||
| in this case, it simply removes the leading $(DISTDIR) from each filename | |||
| snarkyboojum | %P strips say 'rakudo-star-2010.07/' for example | ||
| pmichaud | right | 15:18 | |
| snarkyboojum | because it's used as the path to find | ||
| pmichaud | oh, wait, I misread | ||
| okay, that sed command might work | |||
| snarkyboojum | so using sed doesn't relate to two as nicely, but has the same effect | ||
| the* | |||
| pmichaud | it doesn't strip "all of the leading path information", it simply strips the first directory | ||
| snarkyboojum | sorry, yep | ||
| either way, that's the problem on OS X, which doesn't support the -printf option for it's find | 15:19 | ||
| pmichaud | right | ||
| patch looks good to me, I can apply it | 15:20 | ||
| snarkyboojum | sweet | ||
|
15:23
Axius joined
|
|||
| pmichaud | oh, I'll need a better patch or pull request -- what's in the gist is malformed (whitespaces/tabs) | 15:25 | |
|
15:25
kiffin left
|
|||
| pmichaud | afk for a bit | 15:26 | |
|
15:29
clintongormley joined
|
|||
| snarkyboojum | pmichaud: really? seems to apply cleanly here | 15:29 | |
| or perhaps not :| | 15:31 | ||
| pmichaud | snarkyboojum: the gist paste has characters like » in it | 15:32 | |
| snarkyboojum | yeah.. just fixing that :O | ||
| pmichaud | you can just email me the patch if you want <pmichaud at pobox.com> | 15:33 | |
| snarkyboojum | pmichaud: well I've updated the gist with the correct one, and it applies cleanly now | 15:37 | |
| pmichaud | snarkyboojum: Applied, thanks | 15:49 | |
| snarkyboojum | pmichaud: cheers | 15:50 | |
|
16:11
masonkramer joined
16:22
jaldhar joined
|
|||
| frettled | pmichaud: the bonus of fixing it that way, is that it will work with Solaris, AIX, HP-UX, FreeBSD, NetBSD and OpenBSD ;) | 16:25 | |
| well, it is more likely to, anyway | 16:26 | ||
| isBEKaml | frettled: GNUism doesn't work with *BSDs? | ||
| pardon my ignorance, I have never used any of the BSDs. | |||
| frettled | isBEKaml: if it did, it would have worked with MacOS X, which uses BSD tools. | 16:27 | |
| In general, you can assume that GNUisms work with Linux, period. | |||
| isBEKaml | frettled: yes, sure. But then, MacOSX forked BSD long ago and are into a separate stream with their own versions.The BSDs have changed a lot since, so I thought MacOSX were a different treat. | 16:28 | |
| aCiD2 | Is there a defined way in Perl 6 to have modules export constants? I'm hacking on my Sockets module and it'd be nice to be able to export things like PROTO_UDP and PROTO_TCP | ||
| isBEKaml | well, no issues. I'm just curious. | 16:29 | |
| frettled | isBEKaml: Apple is, if anything, rather slow on taking up new NIH-features, just like most large companies. | ||
| aCiD2 | I can get the constants through parrot, this just seems a little unfriendly | ||
| frettled | isBEKaml: besides, Unix ecology wise, the fork from BSD isn't that long ago. :) | 16:30 | |
| isBEKaml | frettled: that was my point. They don't seem to take in any new features in the *BSD lines. | ||
| s:2nd/in/from/ | |||
|
16:30
Kodi left
|
|||
| frettled | isBEKaml: and BSD folks are rather unhappy with the GNU license, so they don't seem to take in many new features from the GNU ecology. | 16:30 | |
| isBEKaml | well, they are an unhappy lot. :) | 16:31 | |
| frettled | Nah, not really. | ||
| isBEKaml | I got a question for ya all, I'm about to submit the slackbuild scripts to slackbuilds.org. What should I tell them so they can accept it? | 16:32 | |
| frettled | Assumption is the mother of all ...., but who's the father? | ||
| isBEKaml | vengeance? :P | ||
| frettled | heh | ||
| Well, enough OT babbling from me, I have to run. *idle* | 16:33 | ||
| isBEKaml | o/ | ||
| EDIT:the slackbuild scripts of Rakudo and parrot. | |||
|
16:35
tommyd joined
16:39
tylercurtis joined
|
|||
| tylercurtis | Good morning, #perl6. | 16:39 | |
| aCiD2 | GOOD MORRRRNNNNNNNING TYLERCURTISS!! </radio-voice> | 16:41 | |
| Revolve_ | mornin | ||
| wait, where are you, for it to be morning? | |||
| if ya dont mind me asking | 16:42 | ||
| tylercurtis | Tennessee, though 'tis only barely morning. | ||
| aCiD2 | west coast? | ||
| Revolve_ | cool | ||
| <-- manc, uk | |||
| 19:42 | |||
|
16:43
tadzik joined
|
|||
| aCiD2 | Revolve_: then why aren't you going to nw.pm meetups! | 16:43 | |
| snarkyboojum | 2:43 the next day here :) | ||
| aCiD2 | at least I never saw you there when I was in lancaster | ||
| Revolve_ | they have those here? | ||
| I was looking just the other day for stuff like linux user groups and perl users meetups in the area | |||
| aCiD2 | Revolve_: yes, nw.pm is fantastic in my opinion | ||
| Revolve_ | okay. that's in lancaster? | 16:44 | |
| aCiD2 | it's the north, i'll give you the link | ||
| Revolve_ | I don't drive but I've no problem using trains | ||
| thanks :D | |||
| aCiD2 | northwestengland.pm.org/ | ||
| Revolve_ | yeah man | ||
| aCiD2 | We had socials in Manchester, Lancaster and Liverpool while I was at uni there | ||
| Revolve_ | this is the one I was looking at | ||
| cool | |||
| can get to liverpool for a fiver, not including bus far to the station | |||
|
16:44
pheuter joined
|
|||
| Revolve_ | fare* | 16:45 | |
| aCiD2 | cool, well manchester seems to be most popular, so you're in luck there :) | ||
| are you at uni or working there? | |||
| Revolve_ | neither. 18, getting into college after my first placement ended up being too far. looking for work in the meantime :) | 16:46 | |
| aCiD2 | oh cool, would have been nice having someone my age there :P mst goes sometimes who is probably closest to my age, I think | ||
| aCiD2 needs to get his ass down to some birmingham meetups now | |||
| Revolve_ | how old are you guys? | ||
| lol | |||
| aCiD2 | well I'm 21 and 5 days :P the rest are between 25-40 I think | 16:47 | |
|
16:48
justatheory joined
|
|||
| aCiD2 | (if you meant nw.pm, i have no idea about this channel) | 16:48 | |
| Revolve_ | yeah, nw.pm | 16:49 | |
| ohwait | |||
| it's not 19:42. it is where my shell provider is. but that's two hours ahead of where I am. | 16:50 | ||
| squeeky | ooh. nobody has made a brew formula for rakudo? I might have a crack at this. | 16:51 | |
|
16:52
macroron joined
|
|||
| aCiD2 | squeeky++ | 16:53 | |
|
16:53
isBEKaml joined
|
|||
| squeeky | It'll be utter irony - writing Ruby that runs Perl 5 to install Perl 6. | 16:53 | |
| isBEKaml | slackbuilds.org/pending/ #slackbuild scripts submitted \\o/. Will have to wait until they(admins) come back. | 17:00 | |
| Su-Shee: ^^ | |||
| squeeky | could someone confirm the md5 of the tar.gz on github is 3be6d0f4f9d8d1143b6c25768e8a7342 ? | 17:02 | |
| isBEKaml | which one? | ||
| squeeky | cloud.github.com/downloads/rakudo/s....07.tar.gz | ||
| pmichaud | pmichaud@orange:~$ md5sum rakudo-star-2010.07.tar.gz | 17:03 | |
| 3be6d0f4f9d8d1143b6c25768e8a7342 rakudo-star-2010.07.tar.gz | |||
| squeeky | thanks. | ||
|
17:11
pheuter joined
17:12
pascal__ left,
wamba joined
|
|||
| drrho | g'arvo #perl6 ! | 17:19 | |
|
17:19
kid51 joined
|
|||
| drrho | quick question Re: blizkost: is there a list of things which work and which don't ? | 17:19 | |
|
17:20
Ross joined
|
|||
| drrho | amazingly enough, a large package of mine works out of the box with blizkost. | 17:20 | |
| these things make me always nervous ;-) | 17:21 | ||
| edgar | Hi all, I translated the state monad to perl6. But it is not very handy without do notation. Has anyone an idea how to implement such thing? | ||
| just a hint is fine. I am relative new to perl6 | 17:22 | ||
| so I haven't got a clue where to look. | |||
| Oh, this will help probably: en.wikibooks.org/wiki/Haskell/do_Notation | 17:24 | ||
|
17:26
supernovus joined,
Axius joined
|
|||
| supernovus | Is there a way to make Hashes interpolate in regexes? | 17:27 | |
| phenny | supernovus: 12:37Z <masak> tell supernovus that in github.com/supernovus/SCGI/blob/master/README, you need a comma on line 3 and 'return $response' last. x3nU++ discovered this. | ||
| supernovus | x3nU: Thanks for reporting the typos! Now fixed. | 17:31 | |
| ingy | greetings | 17:33 | |
| tadzik | drrho: I don't think so. Maybe it's time to create one? :) | ||
| ingy: o/ | |||
| drrho: is there any thing that you know that doesn't work with Blizkost? | 17:34 | ||
| lue | hello o/ | ||
| isBEKaml | hello, ingy! | ||
| drrho | tadzik: no, everything I tried seemed to work! | ||
| tadzik | drrho: so we can maybe assume that everything works, and anything that fails is considered a bug and must be vaporized :)\\ | 17:35 | |
| tylercurtis | tadzik: I know that "use Data::Dumper:from<perl5>; Dumper(1.5);" doesn't work. Same for arrays and hashes. Didn't try with non-builtin classes. | ||
| drrho | of course, I consider to move stuff into Perl6, so I am also looking for a migration path. | ||
| ;-) | |||
| tadzik | tylercurtis: maybe. But .perl is the way, Data::Dumper is obsolete I'd say | 17:36 | |
| we also have YAML::Dumper | |||
| ingy | star: use YAML; say dump [1..5] | 17:37 | |
| p6eval | star 2010.07: OUTPUT«---- 1- 2- 3- 4- 5...» | ||
| tadzik | : | ||
| :) | |||
| tylercurtis | tadzik: I know. That was just the most obvious Perl 5 core module I knew of to test marshalling to Perl 5. | ||
| x3nU | supernovus: np :) | ||
| drrho | From my first experiments, I have to say that this Rakudo thingie rocks. | 17:39 | |
| is there also a way to integrate C code? | 17:40 | ||
| gfldex | yes, but it's rather indirect | ||
| drrho | is it via parrot? | 17:41 | |
| supernovus | x3nU: I don't think anyone had noticed as prior to Rakudo Star, I don't think many people looked at the SCGI library. But if you're doing web apps with Perl 6, SCGI is much much faster than CGI. | ||
|
17:41
pheuter_ joined
|
|||
| gfldex | drrho: yes | 17:42 | |
| tylercurtis | drrho: check out Zavolaj. | ||
| drrho googling | 17:43 | ||
| tylercurtis | drrho: github.com/jnthn/zavolaj/ | ||
| drrho: it's included in Rakudo * iirc. | |||
| drrho | just found it, yes. | ||
| x3nU | supernovus: i wished to play with SCGI but mod_scgi doesn't work properly for me | 17:45 | |
| ;( | |||
| supernovus | x3nU: Hmm, that's not cool. There is also a proxy_scgi module that comes with Apache 2.2. I haven't tried that one yet, but plan to try it out shortly (once I get my CMS working under the latest Rakudo, which may take some time.) | 17:48 | |
| mod_proxy_scgi | |||
|
17:48
eternaleye joined
|
|||
| supernovus | httpd.apache.org/docs/2.2/mod/mod_p..._scgi.html | 17:49 | |
| drrho looking at NativeCall.pm: do I understand it correctly, that I can write PIR code inside Perl6? | 17:51 | ||
| tylercurtis | drrho: in Rakudo, yes, but please don't unless you really absolutely need to. Otherwise, your code will never be portable to other implementations. Also, PIR is ugly. :) | 17:52 | |
| drrho | I see. | 17:53 | |
| Still sexy :-) | 17:55 | ||
|
17:56
am0c joined
18:08
jedai joined
18:13
ambs joined
|
|||
| ambs bow | 18:13 | ||
|
18:25
justatheory joined
|
|||
| supernovus | So, anyone interested in a FastCGI library for Perl 6? It's a lot more complex than SCGI, but I was thinking of making it my next pet project. | 18:26 | |
| Su-Shee | WHAT QUESTION IS THAT? OF COURSE MAN. :) | 18:27 | |
| how else is going any web framework going to work? | |||
| supernovus | Su-Shee: Well, you could try using plain old CGI... but I'll tell ya, it's horrifically painful (which is why I wrote the SCGI library in the first place...) | 18:28 | |
| m6locks | ummm | ||
| Su-Shee | scgi and fastcgi are the way to go. web server like nginx doesn't even support cgi anymore. | ||
|
18:28
sekimura1 joined
|
|||
| m6locks | is that buildall.pl supposed to build the whole thing? | 18:28 | |
| jfried | supernovus, a fastcgi library would be very cool :) | 18:29 | |
| m6locks | it says | ||
| Installing to '/Users/thebbo/star/build/build' | |||
| Can't chdir to rakudo: No such file or directory at buildall.pl line 15. | |||
|
18:29
cbk joined
|
|||
| m6locks | so it's not working, but I think I got the makefile | 18:30 | |
| sorear | good * #perl6 | ||
| tadzik | o/ | 18:32 | |
|
18:35
Axius joined,
pheuter_ left
|
|||
| supernovus | Well, FCGI is officially my next personal project. After that, maybe PSGI support in masak++'s Web framework (yeah, I'm in a webish mood lately.) | 18:36 | |
| perigrin | you know if you did PSGI support first you could in theory get FCGI support for free | 18:38 | |
|
18:41
am0c joined
18:42
kiffin joined
|
|||
| tylercurtis | If I make a subset of OpaquePointer to make the signature of the functions clearer to read, will Zavolaj still generate the correct NCI signatures? | 18:44 | |
| e.g., "subset Foo of OpaquePointer; sub Something() returns Foo is native('libsomething') {...}"? | 18:45 | ||
| japhb | Who picks the content for the Rakudo CafePress store? | 18:47 | |
| squeeky | ..... cafepress? argh. | 18:50 | |
| x3nU | supernovus: ok i tested and it seems that mod_proxy_scgi works fine althrough i had to compile itself because there's no win32 version | ||
| it myself* | |||
| thanks for help | 18:51 | ||
| Tene | pmichaud: the can_handle method of an exception handler is what is used to determine if the EH wants to handle a given exception or not. | ||
| x3nU | hmm... i think that i should publish mod_proxy_scgi binaries on my site | ||
| supernovus | x3nU: Great to hear! I may change the README to suggest mod_proxy_scgi instead of mod_scgi. | 18:52 | |
|
18:55
KenGuru joined
18:56
kiffin left
18:58
snearch joined
|
|||
| Casan | supernovus: FCGI or indeed PSGI for Rakudo/Parrot/Perl6 would be xmas all over again. | 19:03 | |
|
19:06
cono joined
|
|||
| supernovus | Casan: Well, I'm going to work on FCGI first. Then if it works well, it can be one of the available backends for masak++'s Web framework, which intends to include a PSGI/Plack compatible interface (hopefully with CGI, SCGI, FCGI, mod_perl6 and HTTP::Daemon backends.) | 19:06 | |
| Casan | supernovus: bravo. will follow your work with great interest. | 19:08 | |
|
19:09
jaldhar joined
|
|||
| supernovus | Casan: If you're doing any web stuff with Perl 6 at the moment, I'd recommend trying the SCGI library available in proto/pls. It's WAY faster than standard CGI (mostly because your not loading a new rakudo on every page request...) | 19:10 | |
|
19:11
Ross joined,
melte joined
19:15
alanstorm joined
|
|||
| tadzik | supernovus: mberends++ is writing http::server::simple::psgi on github, you might be interested | 19:16 | |
| alanstorm | Hello all, I'm not sure if this is the right venue for this. I'm not involved in the perl6/raduko project. I'm just trying to download the recent raduko-star release and monkey around with perl6. I'm having trouble getting it to compile/install on my OS X 10.6 laptop. | 19:18 | |
| When I run "perl Configure.pl --gen-parrot", it chugs along for a bit, but then fails with | |||
| Reading configuration information from install/bin/parrot_config ... ===SORRY!=== Parrot revision r48225 required (currently r0) | 19:19 | ||
| Is there anyone here who could help me figure out what's going on, or point me towards somewhere where I could help myself? | |||
| moritz_ | alanstorm: want to come to the lobby? | ||
| alanstorm | moritz_: sure, which channel is that? | ||
| moritz_ | alanstorm: sorry, I misread - thought you meant the YAPC venue | 19:20 | |
| moritz_ confused | |||
| supernovus | tadzik: Awesome, I'm sure that will integrate with Web well. Perl 6 will make Web applications Fun again! :-) | ||
| moritz_ | alanstorm: do you have any parrot installed? | ||
| whee | moritz_: I want what you're on ;D | ||
| alanstorm | moritz_: I'm not sure? I downloaded the rakudo-star-2010.07-0-gac1dc94.tar.gz tar ball that was recently released | 19:21 | |
| moritz_ | alanstorm: did you ever install a parrot before? | 19:22 | |
| gfldex | :D | ||
| supernovus | --gen-parrot should install parrot automatically... | ||
| alanstorm | used that to make a distribution with make VERSION=2010.07 | ||
| and then tried to Configure.pl that distribution, and that's when I got teh above Sorry | |||
| moritz_: no, I've never installed "a parrot" before | 19:23 | ||
| whee | alanstorm: do you have svn? | ||
| alanstorm | I'm a little unclear on the terminology, my apologies for that | ||
| whee: yes, I have svn | |||
| m6locks | can't build the whole thing with buildall.pl, i was gonna ask if there was some sort of build all those modules and stuff type of command or script | ||
| gfldex | alanstorm: the error you get means that parrot wasnt build correctly | ||
| parrot is the runtime environment rakudo needs to do anything | 19:24 | ||
| alanstorm | gfldex: ok, that makes sense | ||
| gfldex | so that has to be build before | ||
| the real error message from the failed parrot build should be a few lines about the sorry | |||
| moritz_ | my internet connection is too slow to reasonably chat | 19:25 | |
| gfldex | o.0 | ||
| alanstorm | there's no error message above the sorry, just a | ||
| Finished install_dev_files.pl | 19:26 | ||
|
19:26
offerkaye joined
|
|||
| alanstorm | Reading configuration information from parrot-2.6.0/parrot_config ... | 19:26 | |
| ===SORRY!=== | |||
| and above that a listing of files | 19:27 | ||
| gfldex | are you afraid of git? | ||
| alanstorm | heh, not afraid, but a little wary. | ||
| offerkaye | Hi | ||
| moritz_ | hm, looks like the version compaarisn code is a bit fragile | 19:28 | |
| m6locks | can't build the whole thing with buildall.pl, i was gonna ask if there was some sort of build all those modules and stuff type of command or script | ||
| gfldex | lets put git aside for a bit then | ||
| have a look if you can find a parrot_install dir | |||
| and check if you can find the binary parrot_install/bin/parrot | 19:29 | ||
| if you dont, you aint got no parrot | |||
| moritz_ | not quite | ||
| R* installs parrot into build/ and not parrot_install | 19:30 | ||
| alanstorm | I've got a | ||
| ./install/bin/parrot | |||
| moritz_ | what do you get when you run ./install/bin/parrot_config revision ? | ||
| alanstorm | $ ./install/bin/parrot_config revision | 19:31 | |
| 0 | |||
| moritz_ | and if you query it for 'versino' instead of 'revision'? | ||
| sorry, version | 19:32 | ||
| alanstorm | moritz_: liks this? | ||
| ./install/bin/parrot_config version | |||
| no such key: 'version' | |||
| moritz_ | hm | ||
| try VERSIION please | 19:33 | ||
| moritz_ a bit unconcentrated, sorry | |||
| alanstorm | ah, that's better | ||
| ./install/bin/parrot_config VERSION 2.6.0 | |||
| ./install/bin/parrot_config VERSION | |||
| 2.6.0 | |||
| moritz_ | seems like your parrot built just fine | ||
| alanstorm | heh, no sorries mortiz_, I'm the newbie forcing myself on all of you | ||
| sorries=worries | 19:34 | ||
| if it's any help, I found this IRC log | |||
| irclog.perlgeek.de/parrot/2009-05-11 | |||
| around 13:51 someone seems to have a similar problem | |||
| gfldex | there where osx build problems discussed a few hours back | ||
| 2009-05-11 is quite some time ago | 19:35 | ||
| alanstorm | yeah, quite a long time ago, but it's one of the few things that came up | ||
| are there IRC logs I can checkout to review the discussion from a few hours ago you mentioned? | 19:36 | ||
| tylercurtis | alanstorm: did you download the rakudo-star-2010.07.tar.gz tarball from github.com/rakudo/star/downloads or the tgz under the 2010.07 tag on that page? If the latter, that may be causing you some problems, since, iiuc, that git repo holds the scripts used to create the distribution rather than the distribution itself. | ||
|
19:38
m`` joined
|
|||
| m`` | hello perlers | 19:38 | |
| offerkaye | Hi m`` | ||
| pmichaud | I'm thinking of getting rid of that tag. | ||
| alanstorm | tylercurtis: I downloaded a file from that gitrepo, I can't remember which link, but the file was named | ||
| rakudo-star-2010.07-0-gac1dc94.tar.gz | |||
| pmichaud | that's the wrong file. | 19:39 | |
| gfldex | alanstorm: if you dont get happy with the (all time first, not so well tested) R* release you can try to fetch rakudo via git, as described on www.rakudo.org/how-to-get-rakudo | ||
| alanstorm | then from that folder ran make VERSION=2010.07 | ||
| which made a distribution | |||
| pmichaud | right. that's not the star tarball. | ||
| alanstorm | ah ha, got it | 19:40 | |
| m`` | github.com/downloads/rakudo/star/ra....07.tar.gz | ||
| pmichaud | I'm going to delete that tag, it's just too confusing. | ||
| alanstorm | pmichaud: thanks, I'll give that a try | 19:41 | |
| gfldex: and thanks for the how to link, that should prove equally useful | |||
| one last question: Is there a document/resource that covers "Perl 6 for people who haven't been paying attention, but wrote perl programs five to six years ago and want to write perl6 programs" | 19:42 | ||
| m`` | five to six years ago?... | ||
| moritz_ | btw I think I found a specbug wrt smart matching | 19:43 | |
| m`` | I really dont think so | ||
| alanstorm | I get a little confused by what parrot, perl, raduko, etc. all are, which makes researching problems on my own difficult | ||
| m`` | alanstorm: but you might look at "Perl6 for perl5 programmer" | ||
| gfldex | alanstorm: perlgeek.de/en/article/5-to-6 | ||
| alanstorm: www.perl6.org/documentation/ | |||
| moritz_ | alanstorm: perlgeek.de/en/article/5-to-6 for the language | ||
| m`` | Parrot - virtual machinve build for perl6 but can run other languages | ||
| Rakudo - perl6 for parrot vm | |||
| "Perl 6 is anything that passes the official test suite." | 19:44 | ||
| tylercurtis | alanstorm: the book included in Rakudo * as doc/UsingPerl6-draft.pdf looks helpful, although I haven't gotten around to reading all of it yet. | ||
| gfldex | i have one too: Perl6 != Perl5+1 | ||
| m`` | So there is not "official" perl6 version | ||
| gfldex: same | |||
| unlike Perl5/Python/Ruby etc | |||
| gfldex | is UsingPerl6-draft.pdf somewhere on the interwebs? | 19:45 | |
| alanstorm | that all looks like a good starting point | 19:46 | |
| thanks again for all your help | |||
| gfldex | yw | ||
| m`` | github.com/rakudo/star/blob/master/...-draft.pdf | ||
| moritz_ | github.com/perl6/book/downloads the latest download is basically the same | ||
| pmichaud | tag deleted | 19:47 | |
| moritz_ | what should say 'foo' ~~ .uc print? | ||
| FOO or False? | |||
| tylercurtis | moritz_: what's in $_? | 19:48 | |
| offerkaye | star: say ('foo' ~~ .uc) | ||
| p6eval | star 2010.07: OUTPUT«0» | ||
| tylercurtis | or does ~~ topicalize? | ||
| m`` | perl6: say 'foo' ~~ .uc | ||
| pmichaud | ~~ topicalizes | ||
| moritz_ | it topicalizes | ||
| p6eval | pugs: OUTPUT«1» | ||
| ..rakudo 9b6189: OUTPUT«0» | |||
| moritz_ | let's extend the question | 19:49 | |
| what should say ('foo' ~~ /o/) print? | |||
| sorry | |||
| what should say ('foo' ~~ m/o/) print? | 19:50 | ||
| pmichaud | 'o' followed by a newline. | ||
| offerkaye | pmichaud: I just sent an email to perl6-lang about Perl6 user documentation. I mentioned you, hope you don't mind ;) | ||
| pmichaud | offerkaye: no problem | ||
| moritz_ | pmichaud: it can't, by current spec | ||
| pmichaud | moritz_: ....because? | 19:51 | |
| moritz_ | because m/o/ is an immediate call | ||
| so there's a Match object on the RHS | |||
| pmichaud | at one time, smart match overrode that particular item. | ||
| szabgab | rakudo: say %*{PATH} | ||
| p6eval | rakudo 9b6189: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at line 22, near "%*{PATH}"» | ||
| moritz_ | on which we call .ACCEPTS | ||
| szabgab | rakudo: say %*ENV{PATH} | ||
| moritz_ | (by spec, if I interpret it correctly) | ||
| p6eval | rakudo 9b6189: OUTPUT«Could not find sub &PATH in main program body at line 22:/tmp/dgotIgadbY» | ||
| pmichaud | i.e., there was a time when smart match would change the way that the rhs was interpreted. | ||
| still is, afaik. | |||
| szabgab | this thing tripped me in the morning to my emberassment | 19:52 | |
| moritz_ | it just topicalices | ||
| avuserow | rakudo: say %*ENV<PATH> | ||
| p6eval | rakudo 9b6189: OUTPUT«/bin:/usr/bin:/usr/local/bin» | ||
| szabgab | but I wonder if that case could have a better error message for the pure perl 5 programmers? | ||
| moritz_ | the syntactic cases seem to be gone | ||
| pmichaud | moritz_: it topicalizes before the immediate match occurs. | ||
| moritz_ | from the smart-match table | ||
| szabgab | so recognize when bare-word is used as a %hash{subscript} | ||
| moritz_ | pmichaud: yes, and then calls .ACCEPTS on the result | 19:53 | |
| szabgab | and tell the user s/he is not on perl 5 | ||
| pmichaud | moritz_: ah, I see. | ||
| moritz_: that's a question TimToady will have to answer. | |||
| moritz_ | there's no rule that preveneents that call | ||
| aye | |||
| pmichaud | at one point, it was very syntactic | 19:54 | |
| moritz_ | maybe "if $_ is used on the RHS" or so | ||
| I'm writing this up as an e-mail | |||
| pmichaud | fair enough | ||
| szabgab | pmichaud: pls look at my question above, about the error message | ||
| moritz_ | I discovered it when I implemented it correctly | 19:55 | |
| :-) | |||
| ie according to current spec | |||
| pmichaud | std: say %*ENV{PATH} | ||
| p6eval | std 31886: OUTPUT«[31m===[0mSORRY![31m===[0mUndeclared name: 'PATH' used at line 1Check failedFAILED 00:01 116m» | ||
| pmichaud | szabgab: that's about the best we'd ever be able to do.... in order to do that, we'll have to have a way at compile-time to know all of the lexically defined subs | ||
| (which we don't have in Rakudo yet) | 19:56 | ||
| I suppose we could say that barewords aren't allowed in {...} | |||
| tylercurtis | moritz_: I don't think "$foo ~~ m/o/" is your best example. After all, it's trivial to do that as "$foo ~~ /o/". "$foo ~~ .uc" is a much more interesting example. | ||
| szabgab | can't you catch that exception and then look at the code to see if came from such a contruct? | 19:57 | |
| pmichaud | szabgab: we don't have quite that much introspection available, no. | ||
| we might be able to do that someday. | |||
| moritz_ | tylercurtis: it's the one example that makes it obvious that, no matter how much bike-shedding you do it, it's not what we want | ||
| szabgab | ok, I was just hoping :) | ||
| moritz_ | even the spec uses $wtr ~~ m/.../ in quite many places all over S05 | 19:58 | |
| pmichaud | moritz_: at one point, the philosophy was that special cases were part of what made smart matching 'smart' | ||
| i.e., it didn't all involve .ACCEPTS | |||
| tylercurtis | moritz_: ah, true. | 19:59 | |
| pmichaud | I don't know what TimToady's current leanings are about ~~ | ||
| tadzik | star: say %*ENV<PATH> | ||
| p6eval | star 2010.07: OUTPUT«/bin:/usr/bin:/usr/local/bin» | ||
| pmichaud | szabgab: fwiw, I think it might be entirely reasonable to say that .{bareword} should always produce at least a compile-time warning, if not be an error outright. There are other ways to express the meaning of .{bareword} if that's what is intended | 20:00 | |
| one possible exception might be constants, however. | |||
| i.e., .{pi} probably should be allowed. | |||
| moritz_ | I think it's reasonable for .{not-a-symbol-in-scope} to eventually produce a customized error messages | 20:01 | |
| OTOH I don't want to clutter Perl 6 | |||
| with p5 backcompat error messages | |||
| for perfectly reasonable code | 20:02 | ||
| like sub a { 'x' }; %h{a} | |||
| pmichaud | yes, but %h<a> and %h{a} are so visually similar that I think it's reasonable to say the latter should be written as %h{a()} | 20:03 | |
| regardless of the p5 history | |||
| moritz_ finds the difference between <> and {} quite striking | |||
| much more than '...' and "..." | 20:04 | ||
| or () and {}, for that matter | |||
| gfldex | rakudo: say "foo {call_a_sub}"; say %h{call_a_sub()}; | ||
| p6eval | rakudo 9b6189: OUTPUT«===SORRY!===Symbol '%h' not predeclared in <anonymous> (/tmp/1iS_Yjl4TS:22)» | ||
| gfldex | i would prefere to have call_a_sub the same in both cases | 20:05 | |
| pmichaud | gfldex: fair point | ||
| afk for a bit | 20:06 | ||
| btw, I really wish I could figure out how to get the book.pdf to build on my system. it'd be nice to work on it on the plane. | |||
|
20:07
ashleydev joined
|
|||
| pmichaud | afk | 20:08 | |
| moritz_ | pmichaud: try to build the a4 version | 20:09 | |
| szabgab | moritz_: stackoverflow.com/questions/3383339...ll-on-os-x < typo "raduko" | ||
| moritz_ | szabgab: corrected (though not my typo) | 20:12 | |
| m6locks | hmm gotta read that one | 20:13 | |
| i've had some problems too | |||
|
20:15
masonkramer joined
|
|||
| jnthn back | 20:16 | ||
| szabgab | moritz_: I know, thanks | ||
| moritz_ | jnthn: when will you arrive in Pisa? | 20:17 | |
| jnthn | moritz_: You travelling to YAPC tomorrow too? :-) | ||
| moritz_ | no, I'm already there | ||
| szabgab | where it the perl 6 hackathon in pisa? | ||
| jnthn | moritz_: Oh! | ||
| moritz_: You at the hotel? | |||
| moritz_: er, the conference hotel? | |||
| szabgab | I'll arrive tomorrow night and would like to come by | ||
| jnthn | Or staying elsewhere? | ||
| moritz_ | jnthn: yes, at the venue | 20:18 | |
| szabgab | on tuesday | ||
| jnthn | moritz_: OK, I'm staying there too. | ||
| moritz_ | and tehre's free wifi in he lobby, so that's where you can find me most of the time :-) | ||
| jnthn | moritz_: Depending on how well I can do in terms of airport -> train, I hope to get to Pisa railway station at either 14:30 or 15:00 | ||
| moritz_: But before I move on from there, I want to buy my train tickets for leaving Italy on the Saturday (I'm going back home on train, via Switzerland) | 20:19 | ||
| moritz_ | jnthn: ah, i might be downtown with some other German pm folks at that time, but should be back in the evening, and available on the day after | ||
| jnthn | moritz_: OK | 20:20 | |
| moritz_: I think Pm expects to get to the hotel at 8pm on Mon | |||
| moritz_ | \\o/ | ||
| jnthn | moritz_: I plan to meet him there and then nom. | ||
| moritz_: Good to know there is free wifi in the lobby. | 20:21 | ||
| moritz_: Is it a hackathonable area, or do you think getting some meeting room would be better? | |||
| moritz_ | jnthn: should work | ||
| jnthn | moritz_: OK | 20:22 | |
| moritz_ -> gone | 20:24 | ||
| pmichaud | moritz_: I did try to build the A4 version -- same error. | ||
| phenny: tell moritz_ I did try to build the A4 version -- same error. | |||
| phenny | pmichaud: I'll pass that on when moritz_ is around. | ||
| pmichaud | (well, same error except with .A4 instead of .Letter) | 20:25 | |
| moritz_ | pmichaud: I fear I can't help much, I can build it only on my home computer, on my laptop the texlive installation is too old | ||
| phenny | moritz_: 20:24Z <pmichaud> tell moritz_ I did try to build the A4 version -- same error. | ||
| pmichaud | moritz_: okay. Maybe PerlJam++ can help out -- he's been able to get it to build on his systems. | ||
| wow, my flight to LHR tonight looks rather empty | |||
| I count about 35 empty seats at the moment | 20:26 | ||
| (based on the online checkin) | |||
| at least 6 rows with nobody in them | |||
| jnthn | Wow | ||
| Plenty of room to space out. :-) | |||
| pmichaud | well, they may get taken before then | 20:27 | |
| jnthn | Troo | ||
|
20:27
Ken-Guru joined
|
|||
| jnthn | No idea how mine will be | 20:27 | |
| But it's < 2 hour flight. | |||
| pmichaud | so far I'm not giving up my aisle seat. I'll check it again when I'm ready to check in (at the airpot) | ||
| *airport | |||
| been watching it since yesterday -- lots of seats moving around | |||
| jnthn | Probably about 7 - 7.5 horus until I leave for the airport from here. :-) | 20:28 | |
| Tene debates between working on exceptions and gaming. | |||
| pmichaud | work on exceptional gaming | ||
| jnthn | work on gaming exceptions | 20:29 | |
| gfldex | what game would it be? | ||
| jnthn | It's one where you throw stuff and people die. | ||
|
20:29
eternaleye joined
|
|||
| pmichaud | unless one of the people catch whatever is thrown. in that case, they can't die, or else we get a segmentation fault and the universe halts. | 20:31 | |
| cxreg | jnthn: would that be horseshoes, or handgrenades? | 20:32 | |
| gfldex | i think we lost Tene to the game already :) | 20:33 | |
| jnthn | cxreg: In the Perl 6 version, it's mugs. | ||
| gfldex | and the enemies are walls :-> | ||
| whereby the walls are tempted to throw some mugs too | 20:34 | ||
| Tene | rakudo: die Mug.new() for 1..20; | ||
| p6eval | rakudo 9b6189: OUTPUT«Could not find sub &Mug in main program body at line 22:/tmp/2mHmB483_j» | ||
| cxreg | heh | 20:35 | |
| class Mug does Motivation | 20:36 | ||
|
20:37
eternaleye_ joined
20:50
tommyd joined
|
|||
| x3nU | w/in 3 | 21:05 | |
| oops | |||
|
21:09
Italian_Plumber joined
21:10
synth joined
21:15
PhatEddy joined
21:17
KenGuru joined
|
|||
| PhatEddy | rakudo: class fee { has $.fie is rw; method fie { return $!fie ~ "x" } }; my $a = fee.new; $a.fie = "fum"; say $a.fie | 21:19 | |
| p6eval | rakudo 9b6189: OUTPUT«===SORRY!===A method named 'fie' already exists in class 'fee'. It may have been supplied by a role.» | ||
| PhatEddy | Can you override a method supplied by a role without subclassing/inheritance? | ||
|
21:21
plobsing joined
|
|||
| tylercurtis | PhatEddy: your issue there is that you declare an accessor fie for $!fie and then a method named fie. | 21:22 | |
|
21:22
masak joined
|
|||
| jnthn | panicitsmasak! | 21:23 | |
| masak | ahoy, #pe... | ||
| masak panics | |||
| tylercurtis | Although it seems like you should be able to override the accessor... | ||
| masak | actually, the Yapsi refactor is going well. I probably won't make it before midnight, but I expect to be finished not long after. | ||
| the new code is smaller, cuter, and generally more p6ish. :) | 21:24 | ||
| PhatEddy | From S12: You may write your own accessors to override any or all of the autogenerated ones. ?? | 21:25 | |
| masak | I think I've finally figured out how to profitably traverse the $/ structure. | ||
| jnthn | You figured out step 2?! | 21:26 | |
| tylercurtis | rakudo: class fee { has $.fie; method fie { $!fie ~ "x" } }; my $a = fee.new(:fie<fum>); say $a.fie; | ||
| jnthn | PhatEddy: For now, if you want to write your own accessor, declare just the attr, not an attr and an accessor. | ||
| p6eval | rakudo 9b6189: OUTPUT«===SORRY!===A method named 'fie' already exists in class 'fee'. It may have been supplied by a role.» | 21:27 | |
| jnthn | has in, has $!fie; method fie | ||
| tylercurtis | jnthn: If $.fie is rw, should one be able to the reading accessor but not the writing accessor when overriding accessors is implemented? | 21:29 | |
| jnthn | tylercurtis: I'm not sure how that'd work. How would the dispatcher differentiate between them? | 21:31 | |
| tylercurtis | jnthn: that's what I thought, but I wasn't sure. It would make sense with a attribute trait that generated chainable writers, but not with is rw. | 21:34 | |
| jnthn | tylercurtis: That'll be do-able in a module (soonish). | 21:35 | |
| tylercurtis | jnthn: ooh. custom attribute traits? | 21:37 | |
| jnthn | Yes. :-) | 21:39 | |
| tylercurtis | jnthn: on an unrelated note, does Zavolaj's signature introspection work properly if I use a subset of OpaquePointer/Int/Str/etc. in the signature. For example, "subset Foo of OpaquePointer; sub DoSomething(Foo $f) returns Int is native('libb') { ... }"? | ||
| jnthn | Probably not. | 21:40 | |
| Why'd you want to do that, ooc? | |||
| Oh, actually | |||
| Maybe it should | |||
| I think it smart-matches | |||
| And Foo ~~ OpaquePointer | |||
| tadzik | oh, by the way | ||
| tylercurtis | jnthn: to make it look prettier. | ||
| jnthn | So probably it does work. | ||
| Ah. :-) | |||
| tadzik | jnthn: in Zavolaj, the void* or struct pointers are represented by OpaquePointer, right? | ||
| jnthn | Right. | ||
| For now. | 21:41 | ||
| tadzik | any way to get some fields out of these structs | ||
| ? | |||
| tylercurtis | jnthn: although "subset Void of Mu;" wouldn't work since you have to use === for that. :) | ||
| jnthn | tadzik: No | ||
| tadzik | I was planning to write some nice OO interface to loudmouth, but I'll have to look into those GError structs for proper error handling | ||
| jnthn | tadzik: OpaquePointer will go away in the future. | ||
| tadzik: Well, it might not | |||
| tadzik | jnthn: being replaced by? | ||
| jnthn | tadzik: But most uses of it will be mappable to a compact struct. | 21:42 | |
| (as per S09) | |||
| PhatEddy | Sorry wasn't sure it was an issue but it's known - rt.perl.org/rt3/Ticket/Display.html?id=68996 - rakudo seems to behave better now though ... | ||
| masak | jnthn: step 2 isn't anything complicated. it's actually term:<...>, not something elided as people usually thing. as you execute the step, you get a warning, but it's catchable. :P | 21:43 | |
| jnthn | tadzik: And that will let you get at the various fields. | ||
| tadzik | cute | ||
| jnthn | masak: :P :P | ||
| Cute is what we aim for. | |||
| tylercurtis | jnthn: another couple of Zavolaj questions. Is there a way to tell if an OpaquePointer is NULL? As well, if I do "sub Something(Str $s) is native('blabla') {...}" is there a way to pass NULL as the C string? | 21:44 | |
| cxreg | pir::null__P() will give you a C null | 21:45 | |
|
21:45
xinming joined
|
|||
| masak | / 'if' <expression> <block> [ 'else' <else=block> ]? /; will $<block> contain a Match or an Array of Match? | 21:46 | |
| jnthn | tylercurtis: I think it just maps it to an undef | ||
| tylercurtis: Or an undef will do the right thing | |||
| tylercurtis: I'd have to check the code to be sure. | |||
| cxreg | (undef? Mu?) | ||
| jnthn | masak: Match | 21:47 | |
| masak | jnthn: then I have a rakudobug. | ||
| jnthn | masak: Oh, wait | ||
| cxreg: Maybe Mu yeah | |||
| masak: <else=block> is not the same as <else=.block> now | |||
| masak: Used to be. :-) | |||
| masak | which is which? | ||
| oh! | |||
| jnthn | masak: <else=.block> would not capture | ||
| masak | right. | 21:48 | |
| jnthn | well, it'd capture into else | ||
| not block | |||
| masak | so I should add the dot and then $<block> should contain a Match? | ||
| jnthn | That'd make sense to me. :-) | ||
| What the grammar engine thinks is another matter. :-) | |||
| masak | :) | ||
| jnthn | I'd pipe it through pmichaud to be sure. :-) | ||
| masak | no time... | 21:49 | |
| cxreg | it's odd asking questions about a programming language, for which nobody actually knows or has an answer | ||
| this truly is Perl Trek | |||
| tylercurtis | jnthn: I'll try that at some point. I've been diverted from the project that inspired these questions by realizing that even with Zavolaj, wrapping sizable libraries is tedious. So I need to write a C parser with which to parse header files and generate Zavolaj-based wrapper modules for the functions in the headers. :) | ||
| jnthn | cxreg: It's not that nobody has one, just nobody here right now. :-) | ||
| cxreg | :) | ||
|
21:49
PhatEddy left
|
|||
| masak | cxreg: what jnthn said. I'm not sure I'm too fond of the term 'Perl Trek'... | 21:49 | |
| jnthn | Keep in mind that when it comes to people knowledgable about grammars, I'm a little way down the list. :-) | 21:50 | |
| cxreg | masak: it's healthy to be able to laugh at onesself | ||
| Perl 6 Is Srs Bsns | 21:51 | ||
| gfldex | tylercurtis: it would be nice if you could shout if you got that working | ||
| pmichaud | 21:46 <masak> / 'if' <expression> <block> [ 'else' <else=block> ]? /; will $<block> contain a Match or an Array of Match? | ||
| masak | cxreg: sure, it's not that. I'm just not sure I agree that what we're doing is a 'trek'. | ||
| pmichaud | array of match | ||
| masak | pmichaud: and <else=.block> fixes it? | ||
| jnthn | pmichaud: and if it was <else=.block> ? | ||
| pmichaud | it'd be just a single match | ||
| jnthn | Answers! We all want them! | ||
| masak | \\o/ | ||
| jnthn | \\o/ | ||
| cxreg | this channel cracks me up | 21:52 | |
| pmichaud | it's a lot more cracked up than it used to be | 21:53 | |
| jnthn | <innocent look> | ||
| masak | keep cracking up, lurkers! | ||
| jnthn | heh heh | 21:54 | |
| From p6l: "I would like for what Carl said to be true, but TSa seems to be contradicting it." | |||
| gfldex | tylercurtis: trac.parrot.org/languages/browser/c...src/c99.pg might be helpful | ||
| jnthn | Can I reply, "I'd trust the guy who's writing Perl 6 code every day." :-) | ||
| pmichaud | I hate to say it, but I tend to simply skip TSa's messages. | 21:55 | |
| oops, forgot the :) | 21:56 | ||
| jnthn | I tend to simply skip much of p6l. :/ | ||
| I almost might as well unsubscribe for the distraction/information factor I get from it. | |||
| pmichaud | yes, I've been skipping p6l a fair bit also | ||
| jnthn | Apart from every so often there's something interesting. | ||
| masak | thanks for the vote of confidence. I'll read the messages after the Yapsi release. :P | ||
| tylercurtis | gfldex: thanks. I'd forgotten about that. | 22:05 | |
|
22:07
nimiezko joined
|
|||
| masak | while I finish up the last things, recall the challenge I posed last night: filling in the blanks of github.com/masak/yapsi/blob/master/...ce/2010.08 :) | 22:09 | |
| the problems I run into at this late hour of refactoring are exquisite. I only have time to glance at them quickly and then move on. | 22:17 | ||
| need to change location. will be back shortly. | 22:18 | ||
| shirtless | Are there any UI bindings for rakudo? | ||
| tadzik | blizkost has tk example :) | 22:19 | |
| maybe Gtk will work too | |||
| lue | hello o/ | ||
| tadzik | o/ | ||
| lue | .oO(For some reason, I feel like fixing broken dwimmery without knowing if there is any.) |
22:20 | |
| shirtless | thats kinda cool | ||
| for now I guess i'll stick to HTML | |||
| tadzik | what are you writing? | 22:21 | |
|
22:21
am0c joined
|
|||
| lue | once (rakudo|parrot) allows using foreign code, you can use GTK, Qt, etc. | 22:22 | |
| rakudo: use libc:from<C>; | 22:24 | ||
| p6eval | rakudo 9b6189: OUTPUT«===SORRY!==="load_language" couldn't find a compiler module for the language 'C'» | 22:25 | |
| lue | not yet :/ | ||
| tylercurtis | lue: there's some support for this already. Go look at Zavolaj. And smile. Then try to actually manually wrap any sizable library with it and realize that no matter how pretty an individual native function declaration is in, wrapping a whole library by hand is monstrous. Then help me write a C parser in order to generate wrappers for native libraries. :) | 22:26 | |
|
22:29
masak joined
|
|||
| lue | "How hard could that C parser possibly be?" | 22:29 | |
| masak | hard as diamond. | ||
| lue | .oO(cue jinx) |
||
| lue ponders a C -> P6 converter, but keeps these crazy thoughts to himself. Dang it. | 22:31 | ||
| tylercurtis | lue: trac.parrot.org/languages/browser/c99/trunk | 22:32 | |
| lue: not quite the same, but it is C99 on top of Parrot, though I don't know how complete it is. | |||
| avuserow | int main(int argc, char* argv<::>) <% printf("Yeah, how hard could it be?\\n"); %> | ||
| though I'd argue that any library using digraphs is not worth wrapping directly :) | 22:33 | ||
| jnthn | masak: gist.github.com/503838 | 22:34 | |
| lue | .oO(How hard can it be to turn your GameBoy Advance into an oscilloscope?) |
||
| avuserow | well, considering the distance between me and my GBA is bigger than walking distance, pretty difficult | 22:35 | |
| masak | jnthn: wow, cool. :) | ||
| jnthn | masak: ETOOSIC ;-) | ||
| masak | jnthn: bit of a wonky sentence close to 'a manure heap that I want to announce'... :) | ||
| jnthn | Oops. :-) | ||
| Maybe use a comma. :-) | 22:36 | ||
| masak | it's "Kama Sutra" without the 'r' :) | ||
| jnthn | I don't know about these things. :P | ||
| masak | 'ancient' -- heh :) | ||
| jnthn | Oh yeah, you didn't offer that para up for editing, did you... :P | ||
| masak | you'll be glad to know that this release will run under Rakudo Star :) | ||
| jnthn | Oh! | ||
| masak | I hadn't made up my mind when I drafter the announcement. | 22:37 | |
| jnthn | .oO( the announcements get drafter and drafter ) |
||
| lue | Karma Sutra? .oO(Very wacky announcement) | ||
| masak | jnthn: you win my total appreciation of the official/complete paragraph. congratulations. :) | 22:38 | |
| I find that paragraph increasingly difficult to write. this strikes the right tone. | |||
| I... I won't have puke in my release announcement. sorry. :P | 22:39 | ||
| jnthn | lue: Yapsi gets increasingly well positioned to penetrate the Perl 6 compiler market. | ||
| masak: Aww! | |||
| :P | |||
| masak: spew? | 22:40 | ||
| lue | .oO[ positive temperatures on which temperature scale? Hopefully you're not talking about Kelvin :) ] | ||
| masak | jnthn: you make me realize I'm a tad more conservative in my humour than I thought :) | ||
| jnthn | Bwahaha! | 22:41 | |
| masak: You called it SIC. :P | |||
| lue | .oO(can't…stop…pun…) Sounds like one sic compiler. |
||
| masak | jnthn: true. though until now I haven't related that to puking. | ||
| jnthn: I'm not a native. :) | |||
| jnthn | masak: Oh. I did the first time I saw it. | ||
| Lucky you. :P | 22:42 | ||
.oO( No SIC in .Net, it just gets IL ) |
|||
| masak | I have three failing tests and a strange heisenbug left. I say ship it. | ||
| during the refactor, Yapsi lots the ability to detect when variables are used before they're declared. | 22:43 | ||
| jnthn | I'm truely sorry for your lots. | ||
| masak | it's probably not difficult to add it back in. I just don't see it now. | ||
| jnthn: :) | |||
| jnthn | masak: skip is fine - the dugong is hungry again anyway. | 22:44 | |
|
22:45
sekimura1 joined
|
|||
| tylercurtis | Is there a magically concise way to say "I want to match this thing, that thing, and this other thing, but you can leave off either the first or last thing, but not both?" | 22:46 | |
| tylercurtis hopes no. | |||
| In regexes, rather. | |||
| masak | tylercurtis: match and then <?{ ... | ||
| }> | |||
| kthakore | wow | ||
| I thought perl6 was quite | |||
| then I scrolled down | |||
| hehe | |||
| doh' | |||
|
22:47
rbaumer joined
|
|||
| kthakore | How can I call a parrot pmc (SDL.pir) from perl6 | 22:47 | |
| jnthn | <first_thing> <middley> [<last_thing> || <?{ $<first_thing> }>] | ||
| kthakore | err rakudo | ||
| lue | I am continually amazed at all the little things P6 has easy support for. | ||
| kthakore | lue: me too! | ||
| jnthn | tylercurtis: ^^ something like that | ||
| There may be a neater way but I think that'll work | |||
| kthakore | can't wait till it gets optimized | ||
| lue | rakudo: say 0 nand 0; # just a hunch | 22:48 | |
| p6eval | rakudo 9b6189: OUTPUT«===SORRY!===Confused at line 22, near "say 0 nand"» | ||
| tylercurtis | jnthn: how would that get to "|| <?{ $<first_thing> }>" if <first_thing> didn't match? | ||
| lue | rakudo: say 0 !and 0; | ||
| jnthn | tylercurtis: oh | ||
| p6eval | rakudo 9b6189: OUTPUT«0» | ||
| jnthn | tylercurtis: sorry, meant a ? after <frist_thing> | ||
| tylercurtis | lue: rakudo: multi infix:<nand> (Mu $a, Mu $b) { $a !and $b }; say 0 nand 0; # lue | 22:49 | |
| rakudo: multi infix:<nand> (Mu $a, Mu $b) { $a !and $b }; say 0 nand 0; # lue | 22:50 | ||
| p6eval | rakudo 9b6189: OUTPUT«1» | ||
| kthakore | rbaumer: say 0.33333333333333 = 1/3 | ||
| ops | |||
| rakudo: say 0.33333333333333 = 1/3 | |||
| p6eval | rakudo 9b6189: OUTPUT«0.33333333333333Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/D2XFVcDwOp» | ||
| jnthn | Cannot assign to readonly variable | ||
| kthakore | rakudo: say 0.33333333333333 == 1/3 | ||
| p6eval | rakudo 9b6189: OUTPUT«0» | ||
| jnthn | damm, I was close! | ||
| kthakore | but why/ | ||
| oh ok | |||
| yayay! Floating point is super awesome! | |||
| jnthn | kthakore: Because they're not quite the same ;-) | 22:51 | |
| kthakore | I know | ||
| that is why I love you guys | |||
| first lang that did it that right | |||
| :D | |||
| tylercurtis | jnthn, masak: thanks. I think I'll just stick with the more obvious but slightly more repetitive explicit way, though. | ||
| kthakore: Common Lisp beat us to rationals by quite a while. | 22:52 | ||
| kthakore | tylercurtis: really? | ||
| kthakore has to try lisp | |||
| masak | tylercurtis: I probably would, too. | ||
| kthakore | tylercurtis: is it just common lisp? | ||
| tylercurtis: how does it compare in arithmetic calcs to C? | 22:53 | ||
| tylercurtis | kthakore: I'm not sure. Some other Lisps might, but I just know for sure that CL has rationals. | ||
| kthakore | cool | ||
| tylercurtis: but perl5 gets it wrong for sure | 22:54 | ||
| tylercurtis | Although they call them ratios(with rational being the supertype of ratio and integer). | ||
| kthakore | so does C if you are not careful | ||
| java too | |||
| This is the most sense ever made in a sentence"rational being the supertype of ratio and integer" | |||
| I really have to see common lisp | |||
| btw ... will perl6 have web REPL like learnhaskell.com or learnruby.com ? | 22:55 | ||
| that would be sweet | |||
| is anyone doing it? | |||
| I can try to halp | |||
| masak: jnthn ?? | |||
| masak | kthakore: people are on it, yes. | 22:56 | |
| tylercurtis | kthakore: github.com/moritz/try.rakudo.org | ||
| masak | it would indeed be sweet. | ||
| tylercurtis | kthakore: it's not complete yet, though, I don't think. | ||
| kthakore | moritz_++ | ||
| tylercurtis | kthakore: ash_++, he's done a significant chunk of the work. | ||
| kthakore | tylercurtis: I will go give it a shot and drop code where I can | ||
| tylercurtis: ah ok | |||
| masak | moritz_ has been instrumental in the project. other people have written the actual HTML/CSS/code. | ||
|
22:57
robjmj joined,
lue joined
|
|||
| kthakore | masak: ah ok | 22:57 | |
| masak: I will talk to one of them to see where to help | |||
| they have no tickets | 22:58 | ||
| lue | rakudo: my $a = 3*(1/3); my $b = 3/3; say "$a, $b, {$a == $b}" | ||
| p6eval | rakudo 9b6189: OUTPUT«1, 1, 1» | ||
| kthakore | back to SDL perl lair | 22:59 | |
| tylercurtis: masak jnthn thanks be back soon | |||
| we have release comming soo | |||
| soon | |||
| lue | $a should _technically_ be 0.999999…, but at least it equals $b :) | ||
| kthakore | lue: true! | 23:00 | |
| a != b | |||
| well in mathematical proofs | |||
| tylercurtis | lue: 0.9999... is also equivalent to 1. | ||
| kthakore | lue: actually 3 * 1/3 = 1 | 23:01 | |
| it is like 3/3 * 1 | 23:02 | ||
| cxreg | right, that's exactly why .999 repeating == 1. it's a number base issue. | ||
| masak | lue: en.wikipedia.org/wiki/0.999... | ||
| lue | 1/3 = 0.3…; 0.3… * 3 = 0.9…; there's why 3*(1/3) == 0.9… | 23:03 | |
| kthakore | what would be interesting to see is this: 3 * (1/3 - 1/10**10000 ) | ||
| masak: how do I do power in perl6 ^ or ** | |||
| rakudo: say 2**3 | |||
| p6eval | rakudo 9b6189: OUTPUT«8» | ||
| kthakore | cool | ||
| tylercurtis | kthakore: 1 / 10**10000 probably overflows to Num. | ||
| masak | rakudo: say 2 ^ 3 | ||
| p6eval | rakudo 9b6189: OUTPUT«one(2, 3)» | 23:04 | |
| kthakore | rakudo: say ( 3 * ( 1/3 - 1/10*100 ) ) | ||
| p6eval | rakudo 9b6189: OUTPUT«-29» | ||
| kthakore | rakudo: say ( 3 * ( 1/3 - 1/(10*100) ) ) | ||
| p6eval | rakudo 9b6189: OUTPUT«0.997» | ||
| kthakore | hehe | ||
| rakudo: say ( 3 * ( 1/3 - 1/(10**100) ) ) | |||
| p6eval | rakudo 9b6189: OUTPUT«1» | ||
| kthakore | there! | ||
| is that a bug or ... just too picky? | 23:05 | ||
| lue | .oO(It was just a test! I know this already) |
||
| kthakore | rakudo: my $a = ( 3 * ( 1/3 - 1/(10**100) ) ); say $a == 1 | ||
| jnthn | rakudo: sub postfix:<...>($n) { $n.ceiling }; say 0.999... | ||
| p6eval | rakudo 9b6189: OUTPUT«1» | ||
| lue | .oO[ I actually hope to someday prove the number 0.0…1 (point zero recurring one) exists and is equal to 0 ] | ||
| kthakore | rakudo: my $a = 1; say $a.ceiling; | 23:06 | |
| p6eval | rakudo 9b6189: OUTPUT«1» | ||
| kthakore | whut? | ||
| jnthn: what is limit of a number | |||
| lue | rakudo: say (1/3).fmt('%x') | 23:07 | |
| p6eval | rakudo 9b6189: OUTPUT«0» | ||
| lue | O.o | ||
| kthakore | lol what? | ||
| no way | |||
| rakudo: printf( "%x", (1/3) ); | 23:08 | ||
| p6eval | rakudo 9b6189: OUTPUT«0» | ||
| kthakore | rakudo: printf( "%x", (1/2) ); | ||
| p6eval | rakudo 9b6189: OUTPUT«0» | ||
| tylercurtis | lue: "Let 0.0...1 refer to the result of subtracting the real number represented as 0.999.. with the "9" repeating infinitely from 1. Since 0.999... is equivalent to 1, 0.0...1 is equivalent to 0. Q.E.D". | ||
| lue | rakudo: say (22).fmt('%x') # let's see if it's even working | ||
| p6eval | rakudo 9b6189: OUTPUT«16» | ||
| kthakore | rakudo: printf( "%x", (8) ); | ||
| p6eval | rakudo 9b6189: OUTPUT«8» | ||
| kthakore | let me see perl5 | 23:09 | |
| jnthn | kthakore: of the Num type? | ||
| Guess it's a double | |||
| kthakore | jnthn: yea | ||
| tylercurtis | "x an unsigned integer, in hexadecimal" | ||
| kthakore | tylercurtis: right! oops | ||
| hehe | |||
| 1/3 is 0 int | |||
| lue | Integers Only? that's lame :/ | ||
| kthakore | lue no that is how format is set | ||
| lue | rakudo: say :16<0.8> | 23:10 | |
| p6eval | rakudo 9b6189: OUTPUT«0.5» | ||
| kthakore | rakudo: printf( "%g", (8) ); | ||
| p6eval | rakudo 9b6189: OUTPUT«8» | ||
| kthakore | rakudo: printf( "%g", (1/3) ); | ||
| p6eval | rakudo 9b6189: OUTPUT«0.333333» | ||
| kthakore | cool | ||
| bah ... this is too much fun | 23:11 | ||
| tylercurtis | lue: wouldn't it be weird if sprintf had a totally different meaning for the same exact inputs in C, Perl 5, and Perl 6? | ||
| jnthn goes to cook some noms to keep him going until it's airport time. | |||
| kthakore | tylercurtis: that would be insanity ... please never ever change printf | ||
|
23:11
cognominal joined
|
|||
| tylercurtis | I'm not saying it wouldn't be worthwhile. Just that it would trip people up all the time. | 23:12 | |
| lue | tylercurtis: I know, that doesn't mean I have to like how it is :) | ||
| grr. "Just like Perl 5" doesn't mean you can !explain it. | 23:14 | ||
| rakudo: printf("%x", (16)); printf("%x", (22)); | 23:15 | ||
| p6eval | rakudo 9b6189: OUTPUT«1016» | ||
| dalek | psi: 62ff73d | masak++ | (4 files): [Yapsi] big compiler/runtime refactor Rakudo master for the first time. Three tests fail in t/compiler.t. Some odd effect cause t/runtime.t to fail when nothing is printed from Yapsi.pm. |
||
| psi: e8bd9d2 | masak++ | doc/ChangeLog: [doc/ChangeLog] updated |
|||
| kthakore | lue: the format for printf has been around for ages man | ||
| masak | \\o/ | ||
| kthakore | masak: \\o/ | ||
| lue | Now that printf does what I thought it did, why not implement a sayf ? | 23:16 | |
| masak++ \\o/ | |||
| kthakore | lue: make a module then and use format any which way you want to | ||
| tylercurtis | rakudo: sayf "%x", 16; | ||
| p6eval | rakudo 9b6189: OUTPUT«Could not find sub &sayf in main program body at line 22:/tmp/Q7BBOHtjJ2» | ||
| tylercurtis | .u frowning face | ||
| phenny | U+2639 WHITE FROWNING FACE (☹) | ||
| masak | I will now take comments on github.com/masak/yapsi/blob/master/...ce/2010.08 for a while. | 23:17 | |
| after that, I will go into release mode. | |||
| lue | I can't help but wonder why there's no easy way to convert from decimal like we can convert to decimal. (printf, as we found, is not good enough) | 23:18 | |
| masak | lue: the truth is probably that there's not a terribly big need. | 23:19 | |
| dalek | psi: e4c7930 | masak++ | doc/announce/2010.08: [doc/announce/2010.08] de-draftified |
23:21 | |
| psi: 895382b | masak++ | doc/announce/2010.08: [doc/announce/2010.08] commas comment |
|||
|
23:22
HarryS joined
|
|||
| lue | yeah, the dissymmetry is annoying me though :D | 23:22 | |
| masak | lue: any comments on the release announcement before it goes out? :) | ||
| lue | masak: good job, I, being me, happen to, of course, like it :) | 23:26 | |
| jnthn | masak: lol, the dugong made it in. :) | 23:27 | |
| masak | jnthn: twice! | ||
| jnthn | doublegong | 23:28 | |
| lue | .oO(darn. All our special ink was made from the diamonds of Midnight, and no-one will go there anymore.) |
23:29 | |
| masak | jnthn: I added it in a third time in lieu of being serious. :) | 23:30 | |
| tylercurtis | masak: please leave the comma comment in the announcment. | 23:31 | |
| announcement, rather. | |||
| masak | tylercurtis: I plan to. :) | ||
| tylercurtis | Is a negated character class in Perl 6 "<![abdkl r245]>"? | 23:32 | |
| masak | tylercurtis: or <-[...]> | ||
| tylercurtis: former is zero-width. | 23:33 | ||
| tylercurtis | masak++ yay! I don't want zero-width. | ||
| masak | that's what the pet dugong said! | ||
| dalek | psi: fa5237a | masak++ | doc/announce/2010.08: [doc/announce/2010.08] more dugong |
||
| masak | jnthn++ # dugong! | 23:34 | |
| masak switches into release mode | |||
| lue steps back | |||
| shirtless gasps | 23:36 | ||
| interesting list comprehension behavior | |||
| should I file this as a bug? say 'A'..'z'; | 23:37 | ||
| masak | shirtless: not before you've read S03 at least once. :) | ||
| shirtless | I will have to take alook | ||
| in the meanwhile try it, it might be good for generating entropy | |||
| tylercurtis | non integer Ranges make me do this | ||
| masak | shirtless: perlcabal.org/syn/ | ||
| tylercurtis | .u frowning face | ||
| phenny | U+2639 WHITE FROWNING FACE (☹) | ||
| shirtless | masak: thanks for th elink | 23:38 | |
| masak | you're quite welcome. | ||
| jnthn | dug\\o/ng! | ||
| masak | yes! I got the date 2010-08-01 at github.com/masak/yapsi/downloads \\o/ | 23:42 | |
| lue | rakudo: say 256 * .125 | ||
| p6eval | rakudo 9b6189: OUTPUT«32» | ||
| masak | mail sent to p6c. blog post coming up. | 23:45 | |
| frooh | if I want to add a method to a package, how do I do that exactly? | 23:49 | |
| I tried my &{"foo"} = sub (...) is export { ... }; | 23:50 | ||
| also our | |||
| but neither of them exported (and maybe they didn't get defined?) | |||
| masak | frooh: packages don't have methods. classes and roles do. | 23:51 | |
| frooh | sorry, I know | 23:52 | |
| I mean a sub anyway | |||
| and still used the sub keyword | |||
| masak | oh, ok. | ||
| the syntax you use looks p5-inspired. it doesn't work (and won't ever work) in p6. | 23:53 | ||
| frooh | yeah... | ||
| I thought patrick told me to try this | |||
| becuase I'd tried *"foo" = ... | |||
| because *that's* the p5 syntax | |||
| masak | but doing 'our &method-name = sub (...) { ... }' should work. | ||
| thing is, I suspect you want 'method-name' to vary with the contents of some string. | 23:54 | ||
| frooh | exactly | ||
| hence the &{"..."} :-) | |||
| masak | frooh: may I suggest eval? | 23:55 | |
| frooh | :-( | ||
| srsly? | |||
| masak | what you're trying to do is evil hackery anyway, so might as well :P | ||
| frooh | no it isn't | ||
| access to the symbol table? | |||
| that's like... perl | |||
| masak | I won't argue there. | 23:56 | |
| frooh | lemme try again with the our | ||
| I didn't get an error | |||
| masak | frooh: I have written a grammar engine in Perl 6, which extensively uses the "add a sub with some name only known at runtime" pattern, just like you do. I ended up using eval. I didn't regret it. | 23:57 | |
| frooh | masak: is that due to missing features or extra power? | 23:58 | |
|
23:58
Psyche^ joined
|
|||
| masak | I see it this way. the 'sub somename (...) { ... }' idiom is for when you know the name of your sub at authoring-time, which is like 99% of the cases. | 23:59 | |