»ö« | perl6-projects.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by moritz_ on 30 July 2009. |
|||
00:08
jferrero left
00:10
qp_pq joined
|
|||
qp_pq | hi moritz_ | 00:10 | |
I need to write something that parses logs and spits out some nice graphs | 00:11 | ||
er..charts | |||
and I saw you guys were making some progress on some modules... | |||
for charting using SVG | |||
they look really cool and I get the feeling of jumping in and using them | 00:12 | ||
TimToady | moritz_ is probably asleep at the moment | 00:13 | |
qp_pq | TimToady: he has an email maybe ? | 00:16 | |
TimToady | dunno offhand | 00:18 | |
presumably, or he wouldn't have a pugs commit bit | |||
00:22
japhb left
|
|||
qp_pq | is there some special namespace on cpan for p6 modules ? | 00:25 | |
wayland76 | qp_pq: Not at the moment. The whole "What we're doing with CPAN" thing is still not well defined | 00:26 | |
sent moritz_'s address to qp_pq privately | 00:27 | ||
So as to avoid spam for moritz -- please don't post it on the channel :) | |||
But probably just ask questions on the channel instead of e-mailing moritz. There's also a perl6-users mailing list: dev.perl.org/perl6/lists/ | 00:29 | ||
00:30
PZt joined
|
|||
qp_pq | what should I look on for some quick svg docs , tutorial or something | 00:31 | |
I want to jump in , read the module and add some functionality to what he wrote | |||
00:31
youwin joined
|
|||
qp_pq | svg-plot that is | 00:31 | |
wayland76 | You mean perl6 specific, or just in general? | 00:34 | |
00:38
ruoso joined
00:43
nErVe joined
|
|||
sjohnson | howdy wayland76 | 00:50 | |
wayland76 | sjohnson: g'day :) | ||
Hmm, I think we've discovered two more entries for the parametric roles example that greets people in their language :) | 00:51 | ||
sjohnson | there's a whole whack of them to use for later | 00:53 | |
rakudo: given "text" { when m/ex/ { print "found ex"} when m/(t$)/ { print "found $1"} } | 00:55 | ||
p6eval | rakudo 0d4fe0: OUTPUT«found ex» | ||
sjohnson | rakudo: given "1" { when '1' { print "A"; } when '1' { print "B"; } } | 00:57 | |
p6eval | rakudo 0d4fe0: OUTPUT«A» | ||
sjohnson | is there a way for the given/when structure to go through all the when's in the statement? | 00:58 | |
or is it called a "do" statement | |||
01:00
Whiteknight left
|
|||
sjohnson | oh, i think it's "continue" | 01:00 | |
could a name like, "do" be used in place of "when" for if you want it to just continue; at the end of the block? or am i losing my mind | 01:02 | ||
01:08
nErVe left
|
|||
sjohnson | or maybe "try" | 01:08 | |
01:09
frew joined
|
|||
colomon | I've been assuming (without checking it out in detail), that each when triggered automatically jumps to the end of the block. | 01:12 | |
01:13
tak11 joined
|
|||
colomon | Time to check the spec... | 01:13 | |
sjohnson | rakudo: given "text" { when m/ex/ { print "found ex "; continue} when m/(t$)/ { print "found $1 "} } | 01:16 | |
p6eval | rakudo 0d4fe0: OUTPUT«found ex Use of uninitialized valuefound » | ||
colomon | where do you want the continue to go? | ||
sjohnson | after the first check | ||
rakudo: given "text" { when m/(t$)/ { print "found $1 "} } | |||
p6eval | rakudo 0d4fe0: OUTPUT«Use of uninitialized valuefound » | ||
sjohnson | perhaps they don't use $1 anymore | 01:17 | |
colomon | $0 | ||
sjohnson codes in too much Perl 5 | |||
colomon | is the first match. | ||
sjohnson | rakudo: given "text" { when m/(t$)/ { print "found $0 "} } | ||
p6eval | rakudo 0d4fe0: OUTPUT«found t » | ||
sjohnson | thanks mate | ||
rakudo: given "text" { when m/ex/ { print "found ex "; continue} when m/(t$)/ { print "found $0 "} } | |||
p6eval | rakudo 0d4fe0: OUTPUT«found ex found t » | ||
sjohnson | perfect | ||
colomon | I'll be darned. Didn't know that was possible. | ||
sjohnson | i'm wondering if it can be done easier... with a different word than "when" | 01:18 | |
run, try, do would be good keywords | |||
colomon | Well, "if" would do it, right? | 01:19 | |
sjohnson | if i could use if and it uses $_ as the switch var, probably could be done | ||
let's see if it breaks the compiler | |||
colomon | good plan. | 01:20 | |
(Bet it doesn't.) | |||
sjohnson | rakudo: given "text" { if (m/ex/) { print "found ex "; } when m/(t$)/ { print "found $1 "} } | ||
p6eval | rakudo 0d4fe0: OUTPUT«found ex Use of uninitialized valuefound » | ||
sjohnson | oops | ||
rakudo: given "text" { if (m/ex/) { print "found ex "; } when m/(t$)/ { print "found $0 "} } | |||
p6eval | rakudo 0d4fe0: OUTPUT«found ex found t » | ||
sjohnson pats colomon on the back | 01:21 | ||
colomon | rakudo: given "text" { if m/ex/ { print "found ex "; } when m/(t$)/ { print "found $0 "} } | ||
p6eval | rakudo 0d4fe0: OUTPUT«found ex found t » | ||
sjohnson | ya that was going to be my next text | ||
colomon | I think we're figuring this thing out. | ||
01:21
shinobi-cl joined
|
|||
sjohnson | i think it's kind of a big deal this given/when thing | 01:21 | |
01:21
reppie left
|
|||
sjohnson | the core module in Perl 5 (switch) is very fragile | 01:21 | |
and buggy, and doesn't support regex matching in case statements | 01:22 | ||
colomon | I suspect the Perl 5.10 version is better? (Or is that what you're talking about? I remember the module being a disappointment.) | ||
sjohnson | yep that is the one i mean | ||
colomon | Ah. I've never really used 5.10. | ||
sjohnson | i am surprised it made it into the core module packages | ||
well, i am using 5.8.8 but i think it might be unlikely that it is any different in the newer perl 5's | 01:23 | ||
oh well, i can hold off until Perl 6 | |||
colomon | I think when, in particular, is fantastic. It doesn't have to work with given, which allows a lot of pretty code. | ||
rakudo: for <text test tex> { if m/ex/ { print "found ex "; } when m/(t$)/ { print "found $0 "} } | |||
p6eval | rakudo 0d4fe0: OUTPUT«found ex found t found t found ex » | ||
colomon | I think a lot of the classic file parsing idioms will be more elegant this way... | 01:24 | |
sjohnson | rakudo: for <text test tex> { if m/ex/ { print "found ex in $_"; } when m/(t$)/ { print "found $0 in $_"} } | 01:25 | |
p6eval | rakudo 0d4fe0: OUTPUT«found ex in textfound t in textfound t in testfound ex in tex» | ||
sjohnson | man i can't wait for perl 6 | ||
this simple example will make my life a lot easier | |||
i suppose i could just start using it now | |||
colomon | I have. | ||
sjohnson | and try to break it | ||
colomon | Speed is a big issue, alas. | ||
but for a lot of things it is already quite usable. | 01:26 | ||
sjohnson | my needs are quite simple, so it should be okay | ||
i mostly just write shell utils to make my life at work easier | |||
colomon | I mostly do simple stuff as well, but simple stuff that processes a lot of data fairs badly still in Rakudo. | 01:27 | |
One piece of code I tried to write in p6, only to find that the p5 version was 5000 times faster. | 01:28 | ||
01:28
shinobi-cl left
|
|||
colomon | Loops that repeat a lot are bad news in current Rakudo. | 01:30 | |
Other than that, I'm finding it perfectly usable. | |||
And in lots of cases, very nice. | 01:31 | ||
sjohnson | cool | 01:33 | |
thanks for the tips on that given/when structure | 01:34 | ||
i was trying the examples from this page: blogs.gurulabs.com/stephen/2008/12/...nwhen.html | 01:36 | ||
i suppose i could write to the author and let him know that you can also use the 'if m/.../' technology | 01:37 | ||
01:38
frew left
01:43
dukeleto joined
02:03
KyleHa joined,
alester joined
02:05
japhb joined
02:07
cdarroch left
|
|||
japhb | (flaky net connection)-- | 02:08 | |
Man, sometimes it can be so cathartic to just decrement something in the presence of others. ;-) | 02:09 | ||
KyleHa | We're here to witness your pain, japhb. | 02:10 | |
02:12
alester left
|
|||
sjohnson | japhb: use GNU screen technology for your irc usage | 02:12 | |
if you don't already | |||
japhb | sjohnson, that only works if you have a box not behind said flaky net connection with which to screen. | 02:13 | |
:-) | |||
sjohnson | indeed it does | 02:14 | |
i had to ask around for a while before someone had a stable shell i could use | |||
02:14
alester joined
|
|||
Tene | japhb: I have a box you can use. | 02:15 | |
japhb: ask me later tonight. AFK shopping now. | |||
japhb | Tene, thx | ||
02:15
sjohnson sets mode: +oo japhb Tene
|
|||
japhb | what happened to the opbot? | 02:16 | |
sjohnson | was there ever one? | 02:17 | |
japhb | I thought so ... | ||
sjohnson | i've never seen any bot-like characteristics | ||
japhb | hum. may have been years ago | 02:18 | |
02:31
hercynium_ joined
02:40
meppl left
02:46
hercynium left
02:49
molaf joined
02:50
tann left
03:16
hercynium_ left
03:19
Limbic_Region left
03:20
sri_kraih left,
sri_kraih joined
03:25
molaf left
03:48
carlin joined
|
|||
qp_pq | are the grammars capable of modifying the input at run-time ? | 03:53 | |
the very text they're parsing... | 03:54 | ||
03:54
mikehh_ joined,
frew joined
03:59
xomas_ left
04:10
mikehh left
|
|||
zetta | I'm interested in that question as well | 04:11 | |
so I looked it up in S05 | |||
:rw modifier | |||
the way the doc reads suggests maybe no implementation has :rw yet, but I don't know | 04:13 | ||
04:14
Chillance left
|
|||
zetta | ah, but you said grammars... not regexes... anyway... yeah. | 04:15 | |
04:26
mikehh_ is now known as mikehh
|
|||
qp_pq | zetta: so why are you interested ? | 04:39 | |
zetta | just seemed like an interesting question, I've read up on the grammars/rules system, but I hadn't thought of using it that way. | 04:40 | |
I can sling around Perl5 s/// with the best of 'em but rules >> regexes. imo anyway. | 04:42 | ||
anyway, maybe a perl6 guru can weigh in. | 04:45 | ||
04:46
frew left
05:04
justatheory left
05:05
KyleHa_ joined,
KyleHa left
05:06
tann joined
05:09
ruoso left
05:12
ruoso joined
05:13
Zloyrusskiy joined
05:17
ruoso left
05:20
drbean joined
05:24
hah joined,
abra joined
05:39
RonOreck left
05:41
alester left
|
|||
wayland76 | I suspect that the intent is that they could modify the input, but just how may not yet have been specified | 05:41 | |
05:45
zamolxes left,
orafu left,
szabgab left,
orafu joined
05:57
jaldhar left
|
|||
moritz_ | good morning | 06:10 | |
sjohnson | morning to you, night to me :) | 06:13 | |
perl6: say 3; | 06:14 | ||
p6eval | elf 28016, pugs, rakudo 0d4fe0: OUTPUT«3» | ||
sjohnson | ahh there it goes | ||
pmichaud | good morning, #perl6 | 06:18 | |
moritz_ | pmichaud: isn't it *very* early morning for you? :) | 06:19 | |
sjohnson | pugs: say 'good morning, #perl6'; | 06:20 | |
p6eval | pugs: OUTPUT«good morning, #perl6» | ||
pmichaud | moritz_: yes. 01h20 here :-) | 06:21 | |
06:21
rfordinal joined
|
|||
pmichaud | but I mainly came online to pass the word that the 'testcommitted' tag is now available in rt :-) | 06:21 | |
moritz_ | cool | 06:22 | |
and is there a moniker in the subject that will set it automatically? | |||
pmichaud | not yet. | ||
Robrt++ says that he can do it but doesn't have time at the moment. He's left it on his to-do list, however. | |||
anyway, I'm off to bed -- be back in a few hours | 06:24 | ||
moritz_ | good night | ||
wayland76 | Does anyone ( moritz_? ) have any thoughts about how Path objects should be compared? | 06:26 | |
moritz_ not | |||
wayland76 | Ie. if I want to test if two Paths are the same inode, I'd hope to do it with something like $path1 === $path2 | ||
And I was wondering if === was the right operator here | |||
moritz_ | no | ||
eqv is, probably | 06:27 | ||
wayland76 | Hmm | ||
moritz_ | === asks "are these two the same object", in terms of "at the same memory location" | ||
wayland76 | Right | ||
But isn't eqv still about comparing objects? | 06:28 | ||
moritz_ | eqv doesn't fit fully as well | ||
wayland76 | Ok | ||
moritz_ | it's roughly the same as $a.perl eq $b.perl | ||
wayland76 | So does that mean that nothing fits? :) | ||
06:29
rfordinal left
|
|||
moritz_ | well, in Perl 6 (at least notionally) the operator determmines the operation, not the type of the arguments | 06:29 | |
so if you introduce a new type, you also need to introduce another operator | |||
unless you re-use smartmatch, of course | |||
wayland76 | Hmm. Well, that's all very painful then :) | 06:30 | |
APL, here we come :) | |||
moritz_ | well, you *can* reuse smartmatch, no? | ||
wayland76 | Hmm, maybe we can. | ||
Because, it will do different things for Str ~~ Path and Path ~~ Path, right? | 06:31 | ||
moritz_ | that's entirely up to Path.ACCEPTS to decide | ||
wayland76 | Ah, cool :) | 06:32 | |
See, I was pretty sure you could answer that question :) | 06:33 | ||
moritz_ | ah well, when you first asked I thought you were talking about semantics | 06:34 | |
a la "how do I determine if two paths point to the same file?" | |||
that's something I can't answer ;-) | |||
wayland76 | No, I'm rewriting parts of S32/IO to reflect some good ideas that have come through :) | 06:35 | |
06:36
unitxt left,
unitxt joined
|
|||
wayland76 | That new guy, in particular -- I pasted parts of his e-mail, and replaced "should" with "does" :) | 06:36 | |
One more smartmatch question -- if I want the two things I mentioned above, I put a multi method .ACCEPTS on the Path object, so that it can do Str and Path, right? | 06:37 | ||
Wait, the doco implies .ACCEPTS is single dispatch | 06:39 | ||
Oh, I found the bit where it says I can do multi | |||
Don't worry :) | |||
moritz_ doesn't worry :) | 06:41 | ||
wayland76 | Has another question | 06:59 | |
wayland76 has another question (sorry ) :) | |||
Is there some way I can say "functionA() also takes all the parameters of functionB() in addition to its own"? :) | 07:00 | ||
dalek | kudo: 5a2aeaf | moritz++ | (17 files): remove some trailing whitespaces |
07:01 | |
moritz_ doesn't think so | 07:02 | ||
XY problem? | |||
wayland76 | What does XY problem mean? | ||
07:03
rfordinal joined
|
|||
wayland76 | Ok, finding google info :) | 07:03 | |
Found Google info | 07:04 | ||
Will continue thinking. Thanks :) | |||
07:11
krakan joined
07:21
frederico joined
07:23
qp_pq left
|
|||
pugs_svn | r28017 | wayland++ | [S02] Changed :io to :p and :path | 07:24 | |
r28017 | wayland++ | [S16] Documented p{/path/to/file} | |||
r28017 | wayland++ | [S28] Made $*CWD have type Path instead of Str | |||
r28017 | wayland++ | [S32/IO] Many changes, including: | |||
r28017 | wayland++ | * Changed IO::FSNode into Path | |||
r28017 | wayland++ | * Merged most of IO::DirectoryNode and all of IO::LinkNode into Path (but still need to | |||
r28017 | wayland++ | merge IO::FileNode) | |||
r28017 | wayland++ | * Moved remnants of IO::DirectoryNode to IO::Directory | |||
r28017 | wayland++ | It's not finished yet, but I thought I'd commit anyway. I'll keep working on it. | |||
wayland76 | @karma wayland | ||
lambdabot | wayland has a karma of 106 | ||
wayland76 | Ooh :) | ||
07:31
abra left
|
|||
frettled | wayland76++ :) | 07:34 | |
07:35
tak__ joined
07:37
abra joined
07:40
tak11 left
|
|||
wayland76 | The one I referred to as "the new guy" is "Troels Liebe Bentsen". Can we ++ him yet? | 07:40 | |
@karma we | |||
lambdabot | we has a karma of 1 | ||
moritz_ | (Troels Liebe Bentsen)++ | ||
wayland76 | lambdabot: No, that should be "we have a karma of 1", unless you're a lolcat :) | 07:41 | |
frettled | haha | ||
wayland76 | moritz_: Yes, but the () is not recognised | ||
@karma Lenz) | |||
lambdabot | Lenz) has a karma of 64 | ||
wayland76 | See? | ||
frettled | @karma Bentsen) | ||
lambdabot | Bentsen) has a karma of 1 | ||
frettled | \o/ | ||
Whose is lambdabot anyway? | |||
moritz_ | Troels Liebe Bentsen++ | 07:42 | |
@karma Troels Liebe Bentsen | |||
lambdabot | TroelsxC2 has a karma of 0 | ||
moritz_ | bah | ||
it doesn't even speak UTF-8 | |||
wayland76 | Well, I'll wait for him to choose a nick, and then do it. | ||
07:42
leedo left
|
|||
wayland76 | Hmm. From my limited knowledge of German, it looks like "Troll-loving Bentsen" :) | 07:43 | |
Would someone like to fix my German? :) | |||
carlin | @karma c/c | ||
lambdabot | c/c has a karma of 144 | ||
carlin | heh | ||
frettled | Troels is similar to Truls. | ||
wayland76 | Yeah, I c/c-- every chance I get | ||
moritz_ | Liebe = Love, but Troels is not a German word | ||
frettled | wayland76: c/c-- is sensible | ||
I would like to see a c/c-- languag. | 07:44 | ||
+e | |||
wayland76 | Wouldn't that be a lang-gulag? :) | 07:45 | |
frettled | oooh | 07:47 | |
carlin | So there is no chdir function now? | 07:51 | |
moritz_ | rakudo: chdir '/' | 07:55 | |
p6eval | rakudo 0d4fe0: ( no output ) | ||
moritz_ | rakudo: chdir '/'; say "alive" | ||
p6eval | rakudo 0d4fe0: OUTPUT«alive» | ||
moritz_ | it seems to work just fine locally | 07:56 | |
p6eval restricts file I/O, so you probably can't easily tell if it worked here on IRC | |||
carlin | Latest S32/IO says; "chdir FILENAME - Gone, just set $*CWD" | ||
moritz_ doesn't trust S32::IO | 07:57 | ||
07:59
mj41_ joined
08:00
mikehh_ joined
08:01
abra left,
tak__ left,
rfordinal left,
mikehh left,
PacoLinux left,
synth left,
elmex left,
KatrinaTheLamia left,
s1n left,
mattp_ left,
cxreg left,
gabiruh left,
sbp left,
nsh left,
mj41 left,
lisppaste3 left,
mj41_ is now known as mj41
|
|||
carlin doesn't like the idea of manually setting $*CWD | 08:01 | ||
08:01
[sbp] joined
|
|||
Matt-W | Morning | 08:01 | |
08:02
nsh joined
|
|||
moritz_ | oh hai Matt-W | 08:02 | |
08:02
mattp joined,
gabiruh joined
|
|||
Matt-W | carlin: I think you can take that as fairly provisional | 08:02 | |
hai moritz_ | |||
08:02
cxreg joined
|
|||
Matt-W | can haz christmas? | 08:02 | |
08:03
elmex joined,
rfordinal joined
|
|||
moritz_ | not quite. Bug svg bar charts with clikable bars and neatly aligned labels (thanks to masak++) | 08:04 | |
Matt-W | I saw your blog entry about that | 08:06 | |
Interesting stuff | |||
It's just a shame that SVG.pm currently is just an XML maker | |||
08:07
elmex left,
mj41 left,
gabiruh left,
s1n joined,
abra joined,
tak__ joined,
mikehh joined,
PacoLinux joined,
synth joined,
elmex joined,
KatrinaTheLamia joined,
lisppaste3 joined,
gabiruh joined,
sbp joined,
mj41 joined,
mattp_ joined,
irc.freenode.net sets mode: +o s1n,
mattp_ left,
gabiruh left,
gabiruh joined,
abra left,
elmex_ joined,
KatrinaTheLamia left
|
|||
moritz_ | the blog post didn't include the linking stuff :-) | 08:07 | |
well, I talked to masak about that | |||
and we agreed to make the current SVG.pm into a general XML::Writer | |||
08:07
mj41_ joined
|
|||
Matt-W | good, I was thinking I might suggest that | 08:07 | |
Making XML is fairly straightforward after all | 08:08 | ||
It's parsing the bloody stuff that's hard | |||
moritz_ | and add SVG specific behavior to SVG.pm | ||
08:08
abra joined,
sbp left,
KatrinaTheLamia joined
|
|||
Matt-W | yes and SVG.pm should use XML::Writer | 08:08 | |
moritz_ | exactly | 08:09 | |
Matt-W | that's probably the most straightforward thought I'm going to have all day | 08:10 | |
moritz_ | that sounds really depressing | ||
Matt-W | so's the work I'm doing at the moment | 08:11 | |
trying to get stuff done with the most overengineered library in the history of library writing | |||
08:12
TimToady left,
kolibrie left,
kcwu left,
cono left,
buu left,
ewilhelm left,
yahooooo left,
dmpk2k left,
moritz_ left,
ewilhelm_ joined,
buu_ joined,
elmex left,
kolibrie_ joined,
elmex_ is now known as elmex,
yahooooo joined
08:13
buu_ is now known as buu
08:14
buu is now known as buu_
08:15
buu_ is now known as buu__,
kcwu joined,
buu__ is now known as buu
08:16
mikehh left,
mj41 left
08:17
moritz_ joined
|
|||
moritz_ | (net flakyness)-- | 08:17 | |
I remember reading up on a linear algebra library - to solve an equation system you'd first have to create a factory, which then instantiates a solver - at that point I stopped reading :-) | |||
Matt-W | oh dear | ||
well this is an incredibly elaborate layered comms library | 08:18 | ||
in some ways it's amazing | |||
wonderfully flexible | |||
but it's far more complicated than we actually need | |||
all we needed was a set of fairly barebones classes for simulating our own network protocols for automated testing | |||
and instead we've got this enormous timesink | 08:19 | ||
08:25
dmpk2k joined
08:27
tak__ left
08:30
tak11 joined
08:31
zamolxes joined
08:33
terje_ joined,
terje_ is now known as bionoid
08:36
rfordinal left
08:41
dakkar joined
08:42
kcwu left
08:51
[sbp] is now known as sbp
|
|||
wayland76 | carlin / carlin_ What's wrong with setting $*CWD instead of using chdir? | 08:57 | |
moritz_ | wayland76: for example not being able to use relativ paths? or at least not in an intuitive way? | ||
wayland76 | And keep in mind that S32/IO is only a draft -- it will keep changing based on feedback | ||
Matt-W | The core functionality of just changing the working directory is nearly useless anyway | 08:58 | |
Have to have some framework for tracking it and moving around | |||
moritz_ | Matt-W: why? | ||
Matt-W ponders some sort of module for that | |||
moritz_ | $*CWD tracks it, chdir() changes it | ||
Matt-W | no, $*CWD tells you where you are now | ||
it has no idea how you got there or where you started | |||
if you're crawling around a directory tree you might want to know that | |||
moritz_ | that doesn't have to be a problem | ||
if you want to know it, you can still store it at the beginning | 08:59 | ||
Matt-W | admittedly all you need for implementing such a mechanism is $*CWD | ||
08:59
masak joined
|
|||
wayland76 | Hmm. $*CWD = "../foo/path" | 08:59 | |
...relative to current path :) | 09:00 | ||
masak | no please no. | ||
wayland76 | Ok, it's a bad idea. | ||
:) | |||
moritz_ | wayland76: so what's $*CWD after that/ | ||
? | |||
Matt-W | the canonical form of "$*CWD/../foo/path"? | ||
need to sort out this path literals thing really | |||
wayland76 | Well, lets say we start with $*CWD = "/home/wayland" | ||
moritz_ | so you assign something to a variable, but after it has a different value than you assigned to it? | 09:01 | |
that's less than intuitive. | |||
wayland76 | My thought was that $*CWD = "../foo/path" would change it to "/home/wayland/foo/path" | ||
Or maybe.... | |||
moritz_ | and silently drop the '../' part? | ||
wayland76 | It could have a $*CWD.path() returns "../foo/path", and $*CWD.realpath() returns "/home/foo/path" | ||
Oops, that comment above should've said "/home/foo/path", sorry :( | 09:02 | ||
moritz_ | but why the magic? | ||
wayland76 | I think my fingers know "/home/wayland" too well :) | ||
moritz_ | what's wrong with good ol' chdir()? | ||
wayland76 | As I implied above, I realised during the course of this conversation that it's probably a bad idea | 09:03 | |
moritz_ | good :-) | ||
wayland76 | But I don't know where to put chdir | ||
Ah, I know :) | |||
On the IO::Filesystems object | |||
(IO::Filesystems is the whole file tree -- maybe it needs a better name, though) | 09:04 | ||
moritz_ | I mean I was asking because there might have been a real benefit to handling it all in a variable | ||
jnthn | lolhai | ||
moritz_ | ohlolitsjnthn | ||
jnthn | :-) | 09:05 | |
09:05
tann left
|
|||
wayland76 | moritz_: I just thought it didn't belong where it used to be, and so I needed somewhere else to put it, and I thought "I know, we can just hide it under the hood" | 09:06 | |
But it seems not to have worked out, so maybe IO::Filesystems.chdir is the way to go | |||
09:08
missingthepoint joined
|
|||
masak | jnthn: o/ | 09:09 | |
wayland76: ...is export | |||
wayland76 | Yeah, IO::Filesystems.chdir isn't how you'd use it, I'm just saying where it should live | 09:10 | |
09:11
guest_007 left
09:15
missingthepoint is now known as bpetering
|
|||
masak | frettled++ # that email reply was essentially "you think it's cute today..." :) | 09:17 | |
frettled | masak: :D | ||
For once, I was reading my mail more frequently than IRC. Woot. | 09:19 | ||
09:20
frettled sets mode: +o moritz_,
frettled sets mode: +o masak
09:22
DanielC joined
|
|||
DanielC | Hi all. | 09:23 | |
phenny | DanielC: 04 Jul 07:46Z <mberends> tell DanielC gitorious.org/parrot-module-lib/main updated | ||
DanielC | *click* | ||
masak | DanielC: you're back! | ||
\o/ | |||
DanielC | yeah | ||
That was a long trip. | 09:24 | ||
(honey moon) | |||
masak | so I seem to recall. | ||
moritz_ | DanielC: belated congratulations! | ||
DanielC | thanks :-) | ||
masak | oh, and from me too. :) | ||
DanielC | :-) | ||
Anything new and exiting happening in Rakudo world? | 09:25 | ||
masak | nah. :) | ||
moritz_ | yes, lots of introspection | ||
and custom traits | |||
masak | and a promised release for April. | ||
moritz_ | jnthn++ I might add | ||
DanielC | Stable release for April? Stable? | ||
moritz_ | pmichaud didn't use "stable" | 09:26 | |
wayland76 | No, unstable :) | ||
masak | DanielC: um, the word 'stable' has been declared too fluffy. | ||
09:26
dukeleto left
|
|||
moritz_ | he said a "usable and useful subset of Perl 6" | 09:26 | |
DanielC | I guess it is... | ||
Ok. | |||
masak | all software is less than stable, with the possible exception of TeX and some space probe software. | ||
moritz_ | the biologists have a special word for stable. | 09:27 | |
wayland76 | ...and any software small enough to be provably correct :) | ||
masak | promising 'stable' is essentially promising to have a multi-billion budget, or to be Donald Knuth. | ||
wayland76 | moritz_: Not *all* stable things are called that :) | ||
moritz_ | wayland76: only stable software, right :-) | ||
09:28
dukeleto joined
|
|||
wayland76 | moritz_: C'mon now, I bet some people call Perl 6 stable, if that's the case :) | 09:28 | |
DanielC can't figure out how to explain to someone what makes the April release different from every other monthly release | |||
wayland76 | (for those missing the joke, the biologists word for stable is "dead") | ||
DanielC: We're hyping it more :) | |||
DanielC | Can't call it "production" because I'm sure someone is using the current Rakudo in production somewhere. | ||
stable = dead... he he he | 09:29 | ||
wayland76 | But if you look for "Rakudo Star", then you'll see what it's about :) | ||
masak | DanielC: I don't think there has to be a difference. | ||
DanielC: what we have _now_ is pretty neat. | |||
DanielC: but in April it'll be even neater. | |||
DanielC | What Rakudo had back in July was already very neat. | 09:30 | |
masak | and outsiders know next to nothing about Rakudo. | ||
therefore, it's a good idea to pretend that April will have a 'special' release, and then to a PR dance. | |||
DanielC | Sure. | ||
wayland76 | Like I said, we're hyping it more :) | ||
frettled | stable - a place where you put your horses when they're not currently being flogged. | ||
masak | frettled: and the horses are dead, yes? | 09:31 | |
frettled | masak: a stable is essentially a black box when seen from afar, we cannot know. ;) | ||
masak | but we can make probably deductions... :) | ||
s/ly/le/ | |||
Matt-W | DanielC! | 09:32 | |
wayland76 | I'd prefer a red box with shite stripes :) | ||
s/shite/white/ | 09:33 | ||
DanielC | o/ Matt-W | ||
wayland76 | That was certainly unintention -- my apologies :) | ||
DanielC | Can someone remind me of the git command to update the repository? I want to get the latest Rakudo... | ||
Ah... git pull | |||
wayland76 | Flogging dead horses: www.sucs.swan.ac.uk/~cmckenna/humou...horse.html | 09:34 | |
frettled | If it's the piece I think it is, then it is excellent. | ||
masak | DanielC: by the way: new build instructions for Rakudo. | ||
DanielC: it (and Parrot) are now meant to be installed. | |||
DanielC | masak: The instructions on the website look the same... | ||
$ perl Configure.pl --gen-parrot && make | 09:35 | ||
frettled | DanielC: read the README as well. You will also need to use «make install» to remain reasonably sane. | ||
DanielC | "meant to be installed" - that's good rogress | ||
masak | aye. | 09:36 | |
many people were blocking on that, it seems. | |||
DanielC | Website: "there is no make install target" | ||
masak | then the website is outdated. | ||
DanielC | ok | ||
09:36
jrtayloriv joined
|
|||
wayland76 | DanielC: Which page on the website? | 09:36 | |
DanielC | $ perl Configure.pl --gen-parrot && make && make install -- is this correct? | ||
wayland76: rakudo.org/how-to-get-rakudo | 09:37 | ||
wayland76: "Get Rakudo" | |||
wayland76 | DanielC: Thanks | ||
masak | DanielC: yes; probably with 'sudo ' on the last step. | 09:39 | |
DanielC | y | ||
09:39
jrtayloriv left
|
|||
wayland76 | DanielC: You can build RPMs too | 09:39 | |
If you prefer | |||
09:39
jrtayloriv joined
|
|||
DanielC | Debian rulez! | 09:39 | |
wayland76 | With no Rakudo package? I don't think so :) | ||
09:39
jrtayloriv left
|
|||
wayland76 | Hey, everyone, what would you think of the idea of the Path object supporting named paths? | 09:41 | |
DanielC | I wonder if you can use alien to make a .deb or Rakudo. | ||
wayland76 | ie. $HOME | 09:42 | |
09:42
Gothmog_ left,
Gothmog_ joined
|
|||
wayland76 | DanielC: Probably, but the .spec file isn't very complex, and should be able to be ported to Rakudo | 09:42 | |
But not just $HOME, also things like $bindir ="Program Files" == "/usr/bin", etc | 09:43 | ||
jnthn has a shiny new 64-bit multi-core server. | 09:45 | ||
frettled | Yay or something. | 09:46 | |
I hope you don't get in too much pain from faulty drivers etc. | |||
masak | jnthn: does it feel like a Rakudo day today? | ||
jnthn | masak: No, it'll be tomorrow. | ||
masak | oki | ||
jnthn | masak: Today I need to do some things that I probably shoulda done yesterday. | ||
masak | yay, Rakudo day tomorrow \o/ | 09:47 | |
wayland76 | jnthn: My new desktop that should be hardware-ready tomorrow has two multi-core CPUs :) | ||
pugs_svn | r28018 | wayland++ | [S32/IO] A few changes, including: | ||
r28018 | wayland++ | * Revived .chdir() due to popular demand | |||
r28018 | wayland++ | * IO::FileNode merged into Path | |||
carlin | wayland++ # for bringing back chdir | 09:48 | |
wayland76 | carlin++ for pointing out that it was stupid :) | 09:49 | |
09:52
guest_007 joined,
tlb joined
|
|||
sjohnson | nice one | 09:56 | |
sjohnson pats wayland76 on the back | 09:57 | ||
i use chdir in p5 often | |||
wayland76 | Well, yes, but setting $*CWD would've been fine without the relative path issue :) | ||
Matt-W wraps his own stuff around chdir for ease | |||
masak | "Second system syndrome done right" :D | 09:58 | |
sjohnson | ahh i think $*CWD is too ugly for me | ||
i suppose i could always say i'd like the timtowtdi way that looks more like a function call | |||
10:00
ejs joined
|
|||
carlin | unless there's a benefit to changing it, better to stick with the familiar | 10:00 | |
frettled | And the benefit needs to outweigh the disadvantages. | 10:02 | |
wayland76 | Well, like I said, I couldn't figure out where to put it. | ||
And I thought one less thing to remember would be good :). | |||
10:03
meppl joined
|
|||
jnthn | Hmmm... | 10:07 | |
make: *** [src/gen_actions.pir] Killed | |||
Anyone know what might be killing this? | |||
(ulimit claims "unlimited"...) | |||
pugs_svn | r28019 | wayland++ | S32/IO: Mention that Path can be used as an array of path elements | 10:16 | |
r28019 | wayland++ | S16: Restrict filenames to POSIX | |||
10:19
naruto joined
|
|||
naruto | hi | 10:19 | |
10:19
naruto is now known as Guest63713
|
|||
Guest63713 | hi | 10:20 | |
10:20
Guest63713 left
|
|||
DanielC | hi | 10:20 | |
wayland76 | I guess he didn't like it here :) | 10:21 | |
Maybe we should've all gone HEYMATEYWASSUPDUDE!!!!!1!!1!!1! | 10:22 | ||
DanielC | heh | ||
jnthn gives up trying to build Rakudo on his new server for now, figuring he can't procrastinate debugging that 1,000 line stored procedure forever... :-/ | 10:31 | ||
Matt-W | wayland76: but OH HAI is much more in keeping with the channel's culture | ||
jnthn wishes they hadn't used "temp" in the name of a table that stores very non-temporary data...that should not go away. | 10:37 | ||
Man, people do some funny things when writing software. :-/ | |||
wayland76 | Maybe he left because of no hai :) | ||
Matt-W | jnthn: yes they do, I've been pondering this today | ||
10:38
jdv79 left
|
|||
Matt-W | sometimes they do strange things when managing people who are writing software, too | 10:38 | |
Matt-W has wasted a week on a pile of software that has no distinctly useful purpose | |||
moritz_ wonders what people do who manage software that writes people | |||
jnthn | Heh, the only thing that bothers me about this particular system is that it *is* used for stuff... :-) | ||
Matt-W | that bothers me about a lot of things... | 10:40 | |
ever played with a database which has three tables with >400 columns each? | 10:41 | ||
something strikes me as wrong about that | |||
moritz_ | well, having "no distinctly useful purpose" is quite different from "not being used" :-) | ||
Matt-W | indeed it is | 10:43 | |
what really bugs me is that I already had some Perl scripts which did what this stuff does (more or less) in about 5% of the code | |||
jnthn | Matt-W: Not encountred anything quite *that* extreme in terms of database design fail. | ||
Matt-W | could've done all its functionality with only the same code again | ||
but *someone* got hooked on the idea of unit tests | 10:44 | ||
despite knowing that we will never, ever be able to refactor to the point where true unit tests are possible | |||
but somehow that meant the testing system had to be written in C++ | |||
despite this being the perfect use case for Perl or another language operating at the same level | |||
And oh look, who's on the team, the office's go-to guy for Perl | 10:45 | ||
(i.e. me) | |||
Don't know enough Perl to understand this? Give me two afternoons and I'll teach it to you | |||
Matt-W bangs his head on the desk | |||
Sorry, this has nothing to do with perl 6 | 10:46 | ||
It just all bubbles over sometimes | |||
moritz_ knows that feeling very well | |||
Matt-W | try and do anything in anything other than C++ or Java here and everyone looks at you very oddly | ||
almost like they'd never heard of using the right tool for the right job... | 10:47 | ||
10:48
xomas_ joined
|
|||
Matt-W | argh and someone's mucked up the underlying structural library I wrote | 10:51 | |
aaaaaaargh | |||
why are all the template parameter names now different and meaningless? | |||
they used to have scriptive names, now they're 'T' | 10:52 | ||
moritz_ gives Matt-W a big punching bag to channel his aggressions | |||
Matt-W | if only I could pop up to my aikido school for their lunchtime session and work it off by throwing people around | 10:54 | |
and rolling back and forth until I'm dizzy | |||
always takes my mind off things | |||
huf | Matt-W: oh, i've seen mysql tables where you couldnt add more columns even if you wanted to | 11:00 | |
moritz_ | speaking of horror stories - I read that ebay moved avoid from C++ for its midlleware because they hit maximum number of methods on a class | 11:02 | |
tlb | Hey, how does mixins work in Perl 6 and how its it handle with build in types. Fx. the new Path object will need to have some utility IO functions, like splice and lines, but in a sense the object it self should not care IO as it only handles path information. | 11:08 | |
moritz_ | splice is not an IO function | 11:09 | |
tlb | sorry not splice, slurp | ||
moritz_ | mixins work like '$object does Role', but I don't think you need them here | ||
delegation seems much better | 11:10 | ||
class Path { has $!io handles <slurp lines get>; ... } | |||
or something along these lines | |||
pugs_svn | r28020 | jani++ | Rephrasing for clarity, also changed "POSIX" to "portable POSIX" where appropriate | 11:18 | |
frettled | Hrm, I should find a sensible way to automagically include the name of the synopsis I altered without engaging in manual typing hell. | 11:19 | |
moritz_ | frettled: how often do you do that? | ||
frettled | moritz_: good question, I haven't done it often enough to have a decent data set yet. :D | 11:21 | |
But I imagine that I might spend a bit of time trying to clarify synopses, so making a svn commit wrapper for that purpose wouldn't be too bad. | 11:22 | ||
I could make it in Perl 6! | |||
…and make it depend on a feature that's not yet implemented in Rakudo, semi-automatically updating it to depend on another unimplemented feature everytime the former gets implemented by pmichaud. ;) | 11:23 | ||
I don't have a gun, is it okay if I stab my foot instead? | |||
moritz_ | that sounds like cool meta programming | ||
11:24
tak11 left
|
|||
wayland76 | frettled: Not even a water pistol? | 11:38 | |
You could fill it with tequila :) [NB: I don't drink :) ] | 11:39 | ||
moritz_ | in Perl 6 we expect you to shoot yourself with rope. | ||
masak | "enough rope to shoot yourself in the foot" | 11:41 | |
11:41
mdxi left
|
|||
frettled | wayland76: hee-hee | 11:41 | |
11:47
Whiteknight joined
|
|||
jnthn | In my experience, tequila is probably far better used for water fights than for drinking... ;-) | 11:48 | |
carlin | because you'll be able to remember the water fight? | 11:49 | |
wayland76 | ...and because it evaporates more quickly than water, and cools you faster :) | 11:51 | |
jnthn | And won't have the taste of tequila in your mouth. :-) | ||
Nor a tequila hangover the next day. | 11:52 | ||
11:52
KyleHa_ left,
KyleHa joined
|
|||
moritz_ | just your cloths stink | 11:52 | |
frettled | Tequila is good for getting other people drunk in bars or other people's apartments. | 11:55 | |
masak | frettled: your emails today are a joy to read. now you're backing up your claims with real shell runs! frettled++ | 11:58 | |
12:01
jauaor joined
|
|||
frettled | masak: thank you :) | 12:02 | |
masak | and I learned something. :) | 12:03 | |
so $PWD isn't strictly equal to the current directory? | |||
12:03
jaldhar joined
|
|||
carlin | if you manually set PWD to a dir that doesn't exist the current dir doesn't change | 12:05 | |
masak | ah, only in the case when the dir doesn't exist? | 12:06 | |
12:09
qp_pq joined
|
|||
carlin | I think that's the only time | 12:09 | |
12:09
sri_kraih left
|
|||
frettled | nopes. | 12:09 | |
carlin | but "doesn't exist" includes PWD=.. | ||
moritz_ | anyway, we convinced wayland76 that assigning to $*CWD is a bad way to change the directory | ||
frettled | In the examples I cited, I could have also done «cd» to get back to the homedir, then «PWD=test», and «pwd» and «echo $PWD» will still be different. | 12:10 | |
wayland76 | moritz_: No, just that it was bad to get rid of chdir() :) | 12:11 | |
But, what about TMTOWTDI? :) | |||
moritz_ | wayland76: ah well, that's a start :-) | ||
frettled | But note that the \w (working dir substitution thingy) in $PS1 uses $PWD instead of checking. | ||
moritz_ | wayland76: we must not exaggerate with TIMTOWTDI :-) | 12:12 | |
wayland76 | moritz_: No, but I think that 2 ways to do something is not too many. So the idea should be evaluated on its merits :) | ||
moritz_ imagines all kind of weird problems with a writable $*CWD | |||
carlin | I really don't like the idea of $*CWD = '../foo' mimicing chdir ... | 12:13 | |
moritz_ | $*CWD ~~ m:rw/<some_regex>/ | ||
does every change to $/ also try to change the current directory? | |||
masak | I think if an idea is 50% good and 50% queasy, it should not be specced. | 12:14 | |
12:14
sri_kraih joined
|
|||
Matt-W | I don't like it | 12:14 | |
masak | me neither. | ||
Matt-W | I think directory changing should involve something that looks like calling an action | ||
masak | a sub call. | ||
Matt-W | no problem with $*CWD having methods | ||
carlin | except it looks ugly ;) | ||
Matt-W | but assignment - and especially these strange string concat overloads that have been floating around - seem completely wrong | ||
masak | I have no problem with $*CWD being a vanilla Str. and chdir working as always. | 12:15 | |
Matt-W doesn't like things in the global namespace :P | |||
masak | modules can do any leet trickery. | ||
moritz_ would even be fine with $*CWD being a Buf | |||
masak | whatever. | ||
rakudo: ((Temporal::DateTime.new(:date(Temporal::Date.new(:year(2010), :month(4))), :time(Temporal::Time.new)).epoch - time) / 86400).ceiling.fmt("%d days left until April!").say | 12:16 | ||
p6eval | rakudo 0d4fe0: OUTPUT«226 days left until April!» | 12:17 | |
Matt-W | I think if we do have a special type for filesystem paths, $*CWD should be one of them | ||
masak | sure. | ||
carlin | rakudo: $*CWD.say; | ||
p6eval | rakudo 0d4fe0: OUTPUT«/home/evalenv/rakudo» | ||
frettled | ahaha | ||
rakudo: chdir(".."); $*CWD.say; | 12:18 | ||
p6eval | rakudo 0d4fe0: OUTPUT«/home/evalenv» | ||
moritz_ wonders if there's any harm in allowing chdir in p6eval | |||
Matt-W | depends if there are any holes left in what it can do when it gets there | 12:19 | |
frettled | Only if it naïvely allows shell meta characters through. | ||
carlin | we could always manually set CWD | ||
frettled | …to a shell | ||
12:19
takadonet joined
|
|||
takadonet | hey all | 12:19 | |
masak | takadonet: o/ | ||
frettled | rakudo: chdir(".."); $*CWD.say; $*CWD="/home"; $*CWD.say; | ||
moritz_ | \o | ||
p6eval | rakudo 0d4fe0: OUTPUT«/home/evalenv/home» | 12:20 | |
frettled | rakudo: $*CWD="/home"; $*CWD.say; chdir(".."); $*CWD.say; | ||
Matt-W | Actually in a way | ||
p6eval | rakudo 0d4fe0: OUTPUT«/home/home/evalenv» | ||
moritz_ | frettled: just wanted to write the same :-) | ||
Matt-W | $*CWD = absolute path isn't all that bvad... | ||
it does have a nice symmetry to it | 12:21 | ||
$*CWD ~ subdir though... uck | |||
Matt-W oscillates through opinions as he eats lunch | |||
wayland76 | moritz_: regarding $*CWD ~~ m:rw/<some_regex>/ | ||
12:21
payload joined
|
|||
moritz_ | if $CWD is declared as Path where { $CWD.io ~~ :d } you'd get a type mismatch when trying to enter a non-existent directory :-) | 12:22 | |
wayland76 | I don't understand it, but I would expect it to check if that was a legitimate path, and then assign | ||
What's $CWD.io ? | |||
frettled | That would be kindof cool. | 12:23 | |
moritz_ | well, m:rw does a binding, not an assignment | ||
wayland76: $foo.io ~~ :d is the (new) way to do file tests | |||
or was it .IO? | |||
don't remember | |||
Matt-W | .IO | ||
wayland76 | Where $foo is what type? | 12:24 | |
moritz_ | Str | ||
or Any | |||
wayland76 | And .io is what? | ||
moritz_ | don't know for sure | ||
Matt-W | this is one of the source of the debate on a file path type | ||
moritz_ | .io is .IO | ||
wayland76 | Ok, different question -- where do I read. | ||
wait, I'll find it | |||
moritz_ | ack -wQ .IO | ||
12:25
szabgab joined
|
|||
wayland76 | Ok, but with this new Path quoting idea, the .IO should die | 12:26 | |
moritz_ | not all path names are literals. | ||
wayland76 | Because Path should do that now | ||
moritz_: example? | |||
moritz_ | my $filename = $handle.get; | 12:27 | |
$filename is a Str (or maybe Buf) | |||
not a Path | |||
wayland76 | Hmm. If we did my Path $filename = $handle.get; would that coerce it? | ||
moritz_ | no | 12:28 | |
it would throw a "type mismatch" exception | |||
wayland76 | Ok, what about my $filename = p:qq{{$handle.get}} | ||
Note double {{}} :) | |||
moritz_ screams in pain | 12:29 | ||
wayland76 | Sorry, that was rather evil :-} | 12:30 | |
But it works, right? | |||
:) | |||
moritz_ | the multiplicity of delimters doesn't carry any semantics (except tripple braces in quasi quotes) | ||
wayland76 | But this is a code block embedded in a path string | ||
masak | wayland76: nope. | ||
wayland76 | No? | 12:31 | |
masak | wayland76: re-read S02 :) | ||
wayland76 | Whereabouts? | ||
moritz_ | wayland76: $str.Path ~~ :e might be made to work | ||
but .IO is shorter. | |||
masak | rakudo: say qq{{special? I don't think so!}} | ||
p6eval | rakudo 0d4fe0: OUTPUT«special? I don't think so!» | ||
wayland76 | Ok, but if we assume that .IO returns a Path? | ||
frettled | And $foo.Io would tell us whether it was a daughter who was also a priestess. | ||
…having been seduced by Zeus. | |||
moritz_ slaps frettled | 12:32 | ||
wayland76 protects frettled | |||
After all, he didn't mention moons, by Jupiter! :) | |||
Matt-W | umm | 12:34 | |
if we had Path, wouldn't $handle.get return Path anyway? | |||
moritz_ | Matt-W: and how would you read non-paths from a file, then? | 12:35 | |
wayland76 | Argh, you're right | ||
Matt-W | oh | ||
sorry | |||
.get's for reading from it | |||
wayland76 | (well, right about the {{ }} business) | ||
Matt-W bangs head on desk | |||
teach Path how to be assigned to from strings | |||
masak | Matt-W: please don't do that. I get concerned. :/ | 12:36 | |
moritz_ | aye, poor desk | ||
Matt-W | around here nobody notices | ||
we're all doing it | |||
masak | :P | ||
wayland76 | Well, I vote for $str.Path ~~ :e | ||
:) | |||
IO is admittedly shorter, but still | 12:37 | ||
Matt-W | I've never liked that | ||
wayland76 | Never liked which? .IO ? | ||
carlin | $str.IO.e is shortest | ||
frettled | Couldn't $str be a pipe, socket or somesuch? | 12:38 | |
wayland76 | frettled: ??? | ||
moritz_ | wayland76: I think you have to ask for permission from larry before changing file test operations | ||
Matt-W | no the ~~ :e business | ||
moritz_ | frettled: it would be evil to store a socket in a variable named $str | ||
but certainly possible | 12:39 | ||
frettled | moritz_: yes :D | ||
Matt-W | yah someone's bound to do it | ||
but that's their problem | |||
frettled | mm | ||
wayland76 | moritz_: Yeah, I figured that. But if we can get $str.IO or $str.Path to return a Path, it will all work out. | ||
moritz_ | .oO( semantics bound to variable names would be a cool, evil idea) |
||
wayland76 | moritz_: FORTRAN does that | 12:40 | |
frettled | $luke.force is always true? | ||
wayland76 | ...well, type based on name, anyway :) | ||
frettled | while $luke.warm checks weather.com for your locale first? | ||
moritz_ | wayland76: only in F77 or older, I think | ||
wayland76 | Well, F77 is what I know :) | ||
After all, my choice of languages when I was young was a) BASIC, b) F77, c) x86 assembler | 12:41 | ||
So I dabbled in all of them, but FORTRAN the least | |||
But my Dad started using FORTRAN in the punched card days | 12:42 | ||
12:43
KyleHa left
12:45
finanalyst joined,
Zloyrusskiy left
12:58
szabgab left
|
|||
carlin | I wonder what they argued about in the punch card days, with no tabs vs spaces and emacs vs vim to get worked up about | 13:01 | |
omega | carlin: round vs square holes | ||
lambdabot | omega: You have 1 new message. '/msg lambdabot @messages' to read it. | 13:02 | |
qp_pq | is there some GUI framework I can use with p6 ? | ||
like wx/qt/gtk2 ? | |||
Matt-W | not yet | ||
moritz_ | Tene had some working binding to e17 or something similar | ||
DanielC | What is e17? | ||
moritz_ | a window manager, long name "enlightenment" | 13:03 | |
it also comes with a GUI toolkit | |||
which Tene used | |||
DanielC | Why is enlightenment called e17? | ||
moritz_ | because it's shorter to type | ||
rakudo: say chars('enlightenment') | 13:04 | ||
Matt-W | because it's different to e16 | ||
DanielC | Is it version 17? | ||
Matt-W | e17 is the fabled new version | ||
p6eval | rakudo 0d4fe0: OUTPUT«13» | ||
DanielC | ah | ||
Matt-W | which has been in development for longer than perl 6, I believe | ||
moritz_ | it should be called e11t :-) | ||
Matt-W | no | 13:05 | |
no it shouldn't | |||
eiro | Matt-W, the core lib was reimplemented lot of times afaik | ||
so it should :) | |||
e17 is the window manager by default on hurd ... coming with a "duke nukem forever" theme | 13:06 | ||
frettled | moritz_: what Matt-W said; e11t ≠ e17 ;) | ||
eiro++ | |||
Matt-W | eiro: coming with duke nukem forever | ||
oh wait it was cancelled | 13:07 | ||
oh dear | |||
moritz_ | nobody in the Perl 6 community should make fun of other projects' release schedules. | ||
mkelly32 | at least there's publicly visible code for e17.. | ||
compared to dnf | |||
eiro | yeah .. canceled ... that's very sad | ||
Matt-W | yeah but duke nukem forever was just insane | ||
at least we've been making progress | |||
they seemed to keep throwing it all away and starting again | |||
PerlJam | moritz++ | 13:08 | |
eiro | moritz_, what about auto derision ? | 13:09 | |
masak | (Leon Timmermans)++ # p6l email | 13:10 | |
moritz_ | eiro: well, irony is hard to tell on IRC | ||
eiro | sure ... | ||
moritz_ | masak: indeed | 13:11 | |
13:11
Front_slash joined
|
|||
masak | I think I'll side with the people who propose sanity and lack of magic in the field of files, filesystems, IO and paths from now on. | 13:12 | |
I don't grok much of the different standards, but I think being as simple as possible is the best way not to get very old very quickly. | 13:13 | ||
13:13
zloyrusskiy joined
|
|||
PerlJam | To quote Kernighan and Pike: Simplicity. Clarity. Generality. | 13:13 | |
moritz_ | I agree. | ||
Matt-W | magic can always be added with module goodness | 13:14 | |
masak: please post an astonishingly elegant argument which will convince everyone else | |||
PerlJam | I haven't really been reading the discussions ... just skimming to a get to something that makes me go "ick!" and then skip to the next message. | ||
moritz_ | the difference between multi volume systems (Windows, VMS) and single root systems (unix) alone makes it really hard to come up with a unificaton | ||
masak | Matt-W: you're overestimating me. :) | ||
DanielC | Sedulously eschew obfuscatory hyperverbosity and prolixity. | ||
Matt-W | it's an inherent problem with a cross-platform language core | 13:15 | |
moritz_ | to the point where it's good to ask if you even want a unification | ||
Matt-W | yeah | ||
local directory navigation is more or less the same | |||
but then you get syumlinks | |||
moritz_ | AFAICT no perl 5 module (or module system) has been invented so far that deals well with all of those | ||
Matt-W | and roots | ||
and all the different rules about what can be in a filename | 13:16 | ||
moritz_ | and *that* should make us think | ||
Matt-W | it's tempting to say it's all microsoft's fault, but then... VMS | ||
I have no idea at all what VMS's filenames mean | |||
moritz_ | not allowing a file named 'COM1' sure looks like a wierd restriction :-) | 13:17 | |
wayland76 | Can I just point out to everyone that I've been using E17 for months, and it appears to have fewer problems than Rakudo? :) | 13:18 | |
Matt-W | aaaah the days of COM1 | ||
and PRN1 | 13:19 | ||
and in the early days of USB you used to get USB devices pretending to be COM5 etc. | |||
DanielC | I'm a bit lost... in Windows you can't have a file named COM1 ?? | ||
moritz_ | DanielC: no, you can't | ||
PerlJam | copy con foo.txt # What happens when I have a filenamed "con"? | ||
DanielC hasn't used Windows in more than a decade | |||
moritz_ | copy foo com1 # copies to a com port, not to a file named com1 | 13:20 | |
DanielC | That seems like a very stupid restriction. | ||
13:20
jaldhar left
|
|||
Matt-W | yeah it's crazy | 13:20 | |
wayland76 | If you try to write to a file called COM1 it sends your output to the Serial port. I'll tell you the rest later, though -- it's a serial story. | ||
Matt-W | you used to be able to say | ||
copy con prn1 | 13:21 | ||
and it'd send what you typed straight to the printer | |||
wayland76 | Yah, I remember that :) | ||
Well, I'd forgotten it, but I remember doing it now that you mention it :) | |||
DanielC | I much prefer the Unix /dev/ directory. | ||
wayland76 | Well, it does have certain advantages :) | 13:22 | |
moritz_ | DanielC: well, that requires a root directory, which windows doesn't have :) | ||
wayland76 | moritz_: No, you could've had a DEV: drive :) | ||
DanielC | Oh, that's right... Windows has those stupid letters like C: | ||
wayland76 | DEV:\COM1 ...but they didn't do that | ||
Matt-W | no because drive letters can only be 1 letter | 13:23 | |
moritz_ | aye | ||
Matt-W: sure? | |||
Matt-W | and even in windows 7, your main partition is still C: | ||
wayland76 | Matt-W: I'm talking about what they *could* have done :) | ||
Matt-W | because A and B are still reserved for the floppy drives you probably haven't got | ||
PerlJam | This whole filepath discussion kind of reminds me of string encoding. Where it's assumed that we can have some canonical path representation and ways to transform it into something appropriate on a per filesystem basis. | ||
wayland76 | No, you can have two-letter drives under certain conditions -- I read it today | ||
jnthn | I've not seen anything suggesting you can have anything beyond A..Z. :-/ | ||
Matt-W | PerlJam: I think it requires us to know too much about file systems | ||
PerlJam: maybe a module :) | |||
wayland76 | jnthn: Yes you can :) | 13:24 | |
moritz_ | very windows-like would be use a special letter: |:\COM1 | ||
jnthn | wayland76: Heh, curious. | ||
wayland76 | p:unix{/usr/local/bin/!!!} | ||
Or whatever :) | |||
Matt-W | o fcousre these days they try to present a single root | ||
they try to make it look like everything stems from Desktop | |||
or maybe from Computer | |||
or maybe from... | |||
it's all illusory and confusing | |||
jnthn | Yeah, but it all falls apart as soon as you dig. | ||
Matt-W | goodness knows what newbies think | 13:25 | |
Unix filesystems are bad enough | |||
jnthn | Well, newbies probably don't have to think too much about it. :-) | ||
moritz_ | yes, and Desktop itself lives under C:\Windows\UserBla\...\Desktop\ | ||
Matt-W | Depends which version of Windows | 13:26 | |
since Vista it's been c:\Users\Username\Desktop | |||
moritz_ | so you have a nice circularity, which reminds me of meta object protocols | ||
Matt-W | they actually have a 'home directory' now | ||
moritz_ | please tell me that everything outside the home directory is not writeable by default | 13:27 | |
(except /tmp/ maybe) | |||
wayland76 | OTOH, Unix would've been nicer if users had a /user/<username> directory that mirrored /usr in directory structure, but had /user/<username>/data as their default directory when logging in | ||
moritz_ | wayland76: aye | ||
that would remove the need for hiding the dotfiles | 13:28 | ||
Matt-W | unix's way is far from perfect | ||
i rather like mac os x's way, with application bundles | |||
wayland76 | moritz_: I don't know if they've gone that far, but they're working on locking things down. They have to lock things down a bit at a time, and then wait for all the software to catch up. Otherwise they get a flop like W2K | ||
Matt-W | none of this mixing everythign together in /usr/bin | ||
moritz_: there's some write protection, but it's nowhere near complete at this stage | |||
wayland76 | Or even having /home/<username>/.local/etc for config files :) | 13:29 | |
Matt-W | too many apps depend on being able to write to their own directories and things | ||
wayland76 | Matt-W: There are advantages to app bundles, but they make the $PATH a lot longer | ||
Unless you're using links from /usr/bin anyway :) | 13:30 | ||
In which case, it should all come back to the package manager :) | |||
Matt-W | mmm | ||
frettled | masak++ for an elegant argument which puts things in the right perspective. | ||
Matt-W | or you have a different method for locating a binary to run... | ||
masak | frettled: I'm amazed by people's ability to bikeshed. I generally try not to disturb them, but this time, after Matt-W encouraged me, I fell for the temptation. | 13:31 | |
Matt-W | :) | ||
well eventually someone just has to cut through it and make a decision | |||
which is what we really need in the band at work... | 13:32 | ||
frettled | yup | ||
Matt-W | it's not just programmers who bikeshed | ||
wannabe musicians do it too | |||
frettled | I'm still stunned by David Green's claim that the behaviour of environment variables is unexpected, i.e. he thinks that changing an environment variable should affect the semantics of some function that normally updates the variable, and that if it doesn't, it's a bug. Or he's joking. | 13:33 | |
(and I'm just not Getting It) | 13:34 | ||
I hope I'm not being too crass, though. | |||
Matt-W | I think it is a bit unexpected | ||
because chdir() changes CWD | |||
changing CWD should... what | |||
dunno | |||
probably be forbidden | |||
since changing it manually just can't be a good idea | 13:35 | ||
moritz_ | agreed | ||
I'm still unclear about another thing... | 13:36 | ||
13:36
Front_slash left
|
|||
Matt-W | so by extension, if it goes that assigning to $*CWD doesn't change the current directory, it should cause an error | 13:36 | |
frettled | Matt-W: what about $USER, $LANG, $LC_COLLATE, …? | ||
moritz_ | that is, the specification allows an interpreter/server/whatever to execute multiple perl scripts | ||
Matt-W | changing $LANG actually has an effect immediately which is useful | ||
moritz_ | and has a separate PROCESS namespace for that | ||
Matt-W | changing $USER... bad | 13:37 | |
frettled | Matt-W: it has an effect on new programs that are started, because new programs inherit ENV | ||
That is expected. | |||
moritz_ | but in unix the current directory is stored per process | ||
so, what will chdir() do in such a situation? | |||
Matt-W | DanielC++ # for brevity | 13:38 | |
moritz_ | if it just calls the chdir syscall it violates encapsulation of the separate perl scripts | ||
should it die? | |||
wayland76 | moritz_: Well, if you pass in the "party" option, then it changes them all, but if you pass in the "solo-woodland-trek" option, it just changes itself | ||
Matt-W | moritz_: you shouldn't run perl scripts in that situation which use chdir | ||
it's just the same as calling chdir in a thread | 13:39 | ||
while your other threads are making assumptions about the CWD being constant | |||
you just don't do it | |||
or at least, if you do you're going to suffer for it | |||
frettled | You just don't make assumptions like that. | ||
moritz_ | Matt-W: ok, that was what I thought | ||
Matt-W | unfortunately issues of in-process concurrency are the kind of nasty problem it's very hard to insulate people from | 13:40 | |
frettled | yep | ||
Matt-W | I suppose the interpreter *could* pretend to have multiple working directories for each subprocess | ||
but that'd be rather unpleasant | |||
frettled | It's quite feasible, but then the memory gains are fewer. | ||
13:42
azawawi joined
|
|||
azawawi | hi | 13:42 | |
moritz_: ping | 13:43 | ||
masak | awwaiid: oh hai | ||
moritz_ | azawawi: pong. | ||
masak | argh, sorry awwaiid. mistab. | ||
azawawi: oh hai. | |||
moritz_ | a<tab> :-) | ||
azawawi | :) | 13:44 | |
masak | moritz_: actually, I did aw<tab> for some reason. :/ | ||
azawawi | we're removing .p6 extension for .pl in Padre Perl support | ||
masak | good. | ||
azawawi | so we need to reliably detect whether this is Perl 6 or Perl 5 | ||
'use v6;' alone? | |||
masak | azawawi: that's your safest bet, I think. | 13:45 | |
moritz_ | use v6;, class, grammar, role or module declarations | ||
all indicate Perl 6 | |||
masak | azawawi: but not all scripts in the wild do that. | ||
azawawi | since 'class/role' in MooseX::Declare... | ||
masak | azawawi: Rakudo is very lax and treats everything as Perl 6. | ||
13:45
ejs left
|
|||
jnthn | That's unfortunate...given the Perl 6 spec said "package is the way we'll know it's Perl 5". :-) | 13:46 | |
Or a way... | |||
13:46
Front_slash joined
|
|||
azawawi | hmm 'use v6;' is the safest bet... i'll make Padre warn the programmer when use v6; is not found... | 13:46 | |
moritz_ | azawawi: well, the class/role/grammar/module/v6 thing is what the spec says - you'll have to find out what works best in the wild, I guess | ||
jnthn | You may be able to take use of MooseX::Declare as a heuristic. | 13:47 | |
azawawi | interesting | ||
13:49
frew joined
|
|||
jnthn | That is, class/keyword/grammar/role package declaration without MooseX::Declare implies Perl 6. | 13:51 | |
Assuming MooseX::Declare is in wide enough use that it's worth making an exception for. | |||
13:53
unitxt left
|
|||
colomon | rakudo: class X { has $.y is ro; multi method new ($a) { self.bless(*, y => $a); } method foo() { $.y = 10; } }; my $a = X.new(2); say $a.y; $a.foo; say $a.y; | 13:54 | |
p6eval | rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near "method foo"in Main (src/gen_setting.pm:3390)» | 13:55 | |
moritz_ | colomon: you need a ; after the } | ||
azawawi | some thing like this is used to detect right now ... gist.github.com/169722 | ||
moritz_ | rakudo: class X { has $.y is ro; multi method new ($a) { self.bless(*, y => $a); }; method foo() { $.y = 10; } }; my $a = X.new(2); say $a.y; $a.foo; say $a.y; | ||
p6eval | rakudo 0d4fe0: OUTPUT«2Cannot assign to readonly variable.in method X::foo (/tmp/81VA8o8316:2)called from Main (/tmp/81VA8o8316:2)» | ||
colomon | rakudo: class X { has $.y is ro; multi method new ($a) { self.bless(*, y => $a); } method foo() { $.y = 10; }; }; my $a = X.new(2); say $a.y; $a.foo; say $a.y; | 13:56 | |
p6eval | rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near "method foo"in Main (src/gen_setting.pm:3390)» | ||
azawawi | jnthn: any comments on this one gist.github.com/169722? | ||
moritz_ | rakudo: class X { has $.y is ro; multi method new ($a) { self.bless(*, y => $a); }; method foo() { $!y = 10; } }; my $a = X.new(2); say $a.y; $a.foo; say $a.y; | 13:57 | |
p6eval | rakudo 0d4fe0: OUTPUT«210» | ||
13:57
frew left
|
|||
moritz_ | we *really* need to teach people that ro accessors are also or within the class | 13:57 | |
13:58
unitxt joined
|
|||
colomon | moritz_: ??? | 13:59 | |
moritz_ | you can't assign to $.y unless $.y is declared as 'is rw' | ||
because it's just a method call | |||
it's short for $( self.y() ) | |||
jnthn | azawawi: Looks like a good start. | ||
# Perl 6 'use v6;' | 14:00 | ||
return 1 if $text =~ /^\s*use\s+v6;/msx; | |||
Any reason not to try that first? Is it not fairly sure-fire? | |||
colomon | moritz_: Errr... isn't that what you just did with that code? Assign to $.y? | ||
moritz_ confused by return if $text =~ /^=head[12]/msx | |||
colomon | (I was trying to see if "is ro" was actually implemented yet....) | ||
moritz_ | colomon: 'is ro' is the default | 14:01 | |
azawawi | jnthn: embedded Perl 6... in Perl 5 | ||
jnthn | azawawi: Heh, true. | ||
moritz_ | azawawi: maybe another approach would be useful... | ||
azawawi: iterate over all lines | |||
azawawi: and use the first successful check | |||
then when something is identified as Perl 5 somewhere, you can ignore embedded Perl 6 later on | 14:02 | ||
azawawi | moritz_: will think about for sure... | ||
moritz_: will think about it for sure... :) | 14:03 | ||
14:03
masak left
|
|||
azawawi | thanks guys | 14:03 | |
moritz_ | azawawi: oh, and ^=cut is a sure sign of Perl 5 | ||
azawawi adds it... | 14:05 | ||
wayland76 is almost bikeshedded out :) | |||
carlin | We need Bikeshed.pm which implements every behaviour anyone has ever asked for :) | 14:06 | |
frettled | wonderful :D | ||
wayland76 | what, like class Bikeshed { foo() handles *; method foo() { say "It is done, O master" } } | 14:08 | |
moritz_ | use Bikeshed :from<p6l@2009-08-08> :auth<moritz@faui2k3.org>; | ||
wayland76 | (Ok, you can't have that handles part -- how would I do that?) | ||
14:08
bpetering left
14:09
Front_slash left
|
|||
pmichaud | good morning #perl6 | 14:09 | |
wayland76 | How do I shoot Google for finding "text" when I asked for "TeX"? :) | ||
14:10
masak joined
|
|||
PerlJam | bonus nachos pm | 14:10 | |
moritz_ | oh hai pmichaud | ||
wayland76 | hail to one of our Rakudo leaders! | ||
pmichaud | wayland76: Shooting Google would be like firing nukes at the Sun. :-) | ||
moritz_ | wayland76: I suggest ICBMs | ||
jnthn | morning pmichaud | ||
wayland76 | Can't afford ICBMs. How about IBMs? :) | 14:11 | |
moritz_ | is IBM so much cheaper? :=) | ||
masak | pmichaud: oh hai. ROADMAP says PGE 'will be undergoing some significant refactoring in summer 2009'. is that deliberate? | ||
Matt-W | o/ pmichaud | ||
pmichaud | masak: yes. | ||
wayland76 | Well, I'm sure I can find a secondhand IBM mouse or something on eBay :) | 14:12 | |
Matt-W | masak: there will be refactoring! | ||
wayland76 | masak: It's so we get LTM, etc | ||
colomon | moritz_: If 'is ro' is default, and still lets you reassign $.y in the above, what does 'is ro' actually do? | ||
moritz_ | proto regexes! | ||
masak | wayland76: oh, I know what it is. I'm just querying about the timing. | ||
wayland76 | I've been following it as closely as I can without hassling pmichaud | ||
masak | wayland76: same here. | ||
moritz_ | colomon: where did it allow it? | 14:13 | |
wayland76 | Well, when pmichaud said summer 2009, I said "Nah, February 2010" :) | ||
moritz_ | colomon: note that assignment to $!y is allowed within the class, to $.y not | ||
colomon: if you find an instance where assignment to $.y is allowed and it's not declared as 'is rw', please submit a bug report | 14:14 | ||
pmichaud | note that "significant refactoring in summer 2009" does not necessarily imply "ltm/protoregexes in summer 2009" | ||
wayland76 | But that was only based on how much progress had been made at that point | ||
Ah, ok :) | |||
I guess I knew that | |||
But the sig. refact. has to be finished before you start LTM and protoregexes? | 14:15 | ||
pmichaud | there's a fair bit of refactoring that has to take place even before we get to protoregexes and ltm | ||
right. | |||
the deadline (and it is really a deadline of sorts for Rakudo *) is january 2010 for protoregexes/ltm | |||
although I hope to be finished much sooner than that, because my grant income depends on it | 14:16 | ||
wayland76 | That would be nice :) | ||
PerlJam | refactor mercilessly. | ||
pmichaud | this refactor will indeed be merciless. | ||
PerlJam | (I have that written on one of the whiteboards in my office :) | ||
pmichaud | For one, when I started PGE I had no notion of Cursor objects | ||
wayland76 | Ooh, motivation. I like that for us, even if it's hard on you :) | ||
pmichaud | and apparently STD is completely based around the notion of Cursors (which is fundamentally more correct, imo) | ||
moritz_ | so you'll pass around cob's instead of mob's? :-) | 14:17 | |
masak | pmichaud: I've been skimming PGE lately. it's deliciously small, for what it does. | ||
wayland76 | Hmm. Well, I can see that making a refactor useful :) | ||
pmichaud | masak: thank you. I'm shocked about PGE also for two reasons | 14:18 | |
(1) that it is as small as it is | |||
wayland76 | moritz_ et. al: Just for the amusement value, a "cobber" in Australia is somewhat like "mate", or "buddy", or "friend" or whatever | ||
pmichaud | (2) that it runs with any sort of usable speed at all. Granted, it's horribly slow, but it's about 100x faster than I would've predicted at this point | ||
wayland76 | So cobs are more friendly than mobs :) | 14:19 | |
14:19
szabgab joined
|
|||
moritz_ | :-) | 14:19 | |
moritz_ has to take a leave, TTFN folks | |||
masak | moritz_: o/ | ||
Matt-W | wayland76: given what 'mob' usually means in an MMO, yes :) | ||
colomon | moritz_: (Sorry for the delay -- taking care of an 11-month-old here at the moment.) That little code sample you got to work had the method foo change the value of the 'is ro' variable. That was the point of the test, to see if it was possible. | 14:20 | |
14:24
yath joined
|
|||
wayland76 | Hey, everyone, I'd just like you all to note the subject line of David Green's recent tongue-in-cheek message | 14:24 | |
I think it's past my bedtime too :) | |||
Anyway, as it's after midnight, I'm going to bed | 14:25 | ||
night all o/ | |||
14:26
ruoso joined
|
|||
PerlJam | colomon: I'd call that a bug. | 14:27 | |
colomon | I thought it might be a NYI, which is why I was checking. | 14:29 | |
PerlJam | colomon: oh, it may be NYI | ||
"is ro" may be only parsed. | 14:30 | ||
What does this mean? $value := PAST::Op.new( :pirop('new PsP'), 'ObjectRef', $value); ?? what is PsP ? | 14:39 | ||
14:41
azawawi left,
jferrero joined
|
|||
[particle] | the pir op new has a sig of PsP | 14:41 | |
returns a pmc, takes a string, and a pmc | 14:42 | ||
lowercase s may mean 'string or string constant' | |||
i forget, but it should be in the past pdd iirc | 14:43 | ||
PerlJam | Thanks. | ||
14:43
__ash__ joined,
Psyche^ joined
|
|||
PerlJam | parrot can still use strings for class names? I thought there was movement towards using keys everywhere | 14:44 | |
I mean, doesn't that turn into something like $P0 = new 'ObjectRef', $P1 ? Am I wrong about the keys? | 14:47 | ||
PerlJam goes with "must be wrong" for now | 14:48 | ||
14:50
leedo joined
|
|||
tlb | Hey a little question when we read from prompt() what's encoding is set on the string and what does we look at? | 14:52 | |
and what about readdir? | 14:54 | ||
14:58
KyleHa joined
|
|||
KyleHa | Howdy doody, #perl6. | 14:59 | |
14:59
nihiliad joined
15:01
Patterner left,
Psyche^ is now known as Patterner
|
|||
carlin | Night everyone | 15:01 | |
15:01
carlin left,
cdarroch joined
|
|||
__ash__ | what are the perl6 --target= options again? or where is it documented? I cant find it again | 15:07 | |
PerlJam | I don't know that they are documented anywhere in particular. | 15:09 | |
pir, past, post, and parse I think are the options. | 15:10 | ||
(I mean, I think they are the only options) | |||
15:15
alester joined
|
|||
masak | __ash__: it's "documented" in the Parrot repo, in compilers/pct/src/PCT/HLLCompiler.pir | 15:15 | |
PerlJam | gutentag alester | ||
alester | hey | ||
__ash__ | thanks PerlJam and masak, i was looking in the wrong documents then, oops | 15:16 | |
15:17
tann joined
|
|||
PerlJam | __ash__: oh, it's also in the parrot repo in docs/pct/gettingstarted.pod | 15:17 | |
and that doc only mentions the ones I know about, so we'll go with that's all there is :) | 15:19 | ||
15:21
tlb left
|
|||
ruoso just typed our &foo := something_that_returns_a_coderef() in Perl 5 | 15:25 | ||
15:26
justatheory joined
15:31
TimToady joined
15:37
szabgab left
|
|||
takadonet | What method name do you need to use to create your own constructor ? Is it BUILD? | 15:38 | |
TimToady | you should call .bless | ||
mikehh_ | t/spec/S12-enums/thorough.rakudo ............................... Failed 1/71 subtests | 15:39 | |
15:39
mikehh_ is now known as mikehh
|
|||
ruoso | takadonet, there isn't a special "constructor" method in Perl 6, as there is in Java, for instance... | 15:39 | |
TimToady | unless you know more about object's layout that lets you bypass bless/BUILDALL/BUILD | 15:40 | |
ruoso | takadonet, constructing an object is a matter of blessing a candidate (as it is in Perl 5), but Perl 6 has some *default* implementations in place | ||
TimToady | note that the fact that BUILDALL and BUILD are in all caps is indicative that you shouldn't generally call them directly | ||
ruoso | or override unless it really makes sense | ||
takadonet | i thought you just wanted to shout it at people.... | 15:41 | |
TimToady | it generally indicates something that is called automatically | ||
masak | ruoso: funny, I feel more ready to override BUILD than to create my own 'new' method. | 15:42 | |
takadonet | masak: me too but I was not sure if it was the right thing to do | ||
TimToady | overriding BUILD is fine, just like writing your own END block is fine | 15:43 | |
it'll just get called at the appropriate moment | |||
ruoso | masak, if it really makes sense | ||
masak | it feels like a smaller change than overriding .new | ||
ruoso | masak, my point is that people usually override the constructor to do things that could be solved with default values and other stuff | ||
mikehh | rakudo (5a2aeaf) builds on parrot r40624 - make test PASS, make spectest (up to 28020) FAILs 1 test - t/spec/S12-enums/thorough.rakudo - Failed test: 2 | 15:44 | |
masak | ruoso: aye. | ||
ruoso | masak, my point wasn't in favor of overriding new instead ;) | ||
masak | I see. :) | ||
takadonet | Well not sure if this 'issue' can be solved without overriding BUILD | 15:45 | |
ruoso | and the issue is? | ||
PerlJam | ... always simpler than people think it is ;) | 15:46 | |
ruoso lunch & | |||
takadonet | I'm rewriting bioperl libraries so I'm pretty much taking what's already written in perl5 to perl6. One object has two 'attributes' called 'description' and 'desc'. One is just a short hand for the other and they just point to the same thing. | 15:47 | |
mikehh | btw the test was on Ubuntu (.04 amd64 (gcc) | 15:48 | |
9.04 | |||
takadonet | The problem is on creating the object. I need to populate both 'description' and 'desc'. | ||
TimToady | if you change one, does the other change? | 15:49 | |
takadonet | correct | ||
TimToady | that is, do you just want an extra accessor to a single attribute? | 15:50 | |
if so, then just write the extra accessor | |||
takadonet | .... and mutator | ||
TimToady | method desc is rw { $!descriptor } | ||
tion | |||
PerlJam | takadonet: Just make sure you initialize the attr consistently in your constructor. | ||
takadonet | PerlJam: I do, but others may not | 15:51 | |
TimToady | ah, but yes, you'll need a BUILD if they might initialize with either name | ||
takadonet | You got it | ||
also going to be the same with 'seq' and 'sequence' | |||
15:52
frettled sets mode: +oo masak TimToady
|
|||
PerlJam | this feels like something perl could do for you though. | 15:52 | |
TimToady | the accessor would work if BUILD set $.desc instead of $!desc, but it doesn't generally | ||
however, this would actually be a decent place to define new instead | 15:53 | ||
PerlJam | class Foo { has $.desc is aliased('description') ... } or something | ||
TimToady | to canonicalize the attribute names before calling bless | ||
15:55
nihiliad left
|
|||
s1n | @seen masak | 15:56 | |
lambdabot | masak is in #perl6. I last heard masak speak 11m 29s ago. | ||
masak | s1n: I'm right here. | ||
s1n | yay | ||
TimToady | possibly $!desc ::= $!description could be forced to work somehow | ||
PerlJam | ah, even better. | ||
s1n | masak: the sources listed in the Makefile.in of web are the only installed sources?? | ||
masak: what about the drafts, smartlinks, and hitomi stuff? | |||
masak | s1n: well, those don't need to be compiled. | 15:57 | |
s1n: Makefile.in contains things that need to be compiled. | |||
s1n | masak: ah, but the others are still installed? | ||
TimToady | oh, wait, it's just alternately named args | ||
s1n | masak: i ask because i can't seem to run the Configure | ||
15:58
nihiliad joined
|
|||
TimToady | so you can write the BUILD, but canonicalize with :desc($!descriptor) and such | 15:58 | |
masak | s1n: I'm not sure what you mean by 'installed' here. | ||
TimToady | or other way around, depending on which one is the real one | ||
masak | s1n: at this stage, Perl 6 project don't get installed. | ||
s1n | masak: well, you know what i mean | 15:59 | |
masak | s1n: no, and that's my point. I don't. | ||
s1n: what error does Configure give you? | |||
s1n | masak: okay, what do you do with the smartlinks and hitomi files? are they referred to from other modules in the project? | ||
masak | s1n: no. | ||
TimToady | likewise, a parameter for :seq($!sequence) | ||
s1n | masak: (keep in mind i haven't looked at Web in a few months) Can't find ./Configure in @*INC | 16:00 | |
masak | s1n: ah. try doing `export PERL6LIB=`pwd`/lib` | ||
argh, quote fail. 'export PERL6LIB=`pwd`/lib' | 16:01 | ||
s1n | masak: okay, so how should Web be "installed"? what files are necessary for an installation? | ||
takadonet | I think I understand TimToady | 16:02 | |
16:02
justatheory left
|
|||
TimToady | I'd still probably just write a new | 16:02 | |
with a *%_ parameter | 16:03 | ||
masak | s1n: Web.pm is generally not installed. neither is it 'installed'. | ||
takadonet | Any good example of new constructor in the spec? | ||
masak | s1n: but if you manage to compile it, and then grab all the *.pir files in lib/, you should be off to a good start. | ||
s1n | masak: not just Web.pm, your web.git project | ||
TimToady | then do %_<seq> ||= (%_<sequence>:delete) or some such before calling .bless | 16:04 | |
masak | s1n: I think I still would be more helped by knowing what it is you're trying to do, not step 5 or so of your thought process. | ||
16:04
tann left
|
|||
s1n | masak: pm | 16:04 | |
16:05
rfordinal joined
|
|||
TimToady | takadonet: no full examples, but use of .bless is discussed in S12/Construction and Initialization | 16:05 | |
takadonet | TimToady: Already reading it :) | 16:06 | |
16:07
__ash__ left
|
|||
TimToady | actually, since the last change to adverbial precedence, you don't need the parens on the :delete example above | 16:08 | |
not that rakudo implements :delete yet... | |||
16:09
payload left
16:17
kent\n left
16:18
qp_pq left
16:19
kent\n joined,
nihiliad left
|
|||
takadonet | hmmmm I just realized that this has to be done on a role..... | 16:21 | |
takadonet hits head against the wall | |||
masak | careful!... | ||
TimToady | a role's BUILD is supposed to be integrated into the class's BUILD, so maybe that's the way to go eventually | 16:22 | |
16:22
nihiliad joined
|
|||
TimToady | dunno if rakudo does that right though | 16:22 | |
masak | I think it does. | ||
TimToady | fortunately, I'm hard headed | ||
16:23
mj41_ left
|
|||
TimToady | people think I have a swelled head, but it's all thick skull | 16:23 | |
16:24
masak left
|
|||
TimToady | wayland76: the point of using $*CWD would be (and would *have* to be, given how context vars work) to give each thread its own working directory, independent of the process as a whole | 16:25 | |
jnthn | It'll bring the BUILD method into the class, but if the class has one of it's own then it'll clobber the one from the role. At the moment, BUILD just has normal composition semantics (and I don't recall seeing anything in the spec saying otherwise). | 16:26 | |
takadonet | nuts.... | 16:27 | |
So much work just to have some attribute with aliases. | 16:28 | ||
16:28
mj41 joined
|
|||
jnthn | Why is that harder than just method the_alias() { $!the_attr } | 16:35 | |
TimToady | because build sets $!the_alias rather than $.the_alias | 16:36 | |
(or should) | |||
jnthn | Ah. | ||
TimToady | posibbly defining method !the_alias could be made to dtrt | ||
jnthn | :-S | 16:37 | |
Unlikely. | |||
takadonet | Just ignore this for now. Only thing that this limits is when creating the object, you need to use 'desc' | ||
TimToady | goes against what we decided about $!the_alias before | ||
you can still write your own new, can't you? | |||
16:37
molaf joined
|
|||
TimToady | and do the key renaming trick on %_? | 16:38 | |
16:39
__ash__ joined
|
|||
TimToady | or method new (:seq($sequence), :desc($description), *%_) or some such | 16:39 | |
then $class.bless(*, :$sequence, :$description, |%_) | |||
'course, if there's lots of different classes, that could get old | 16:40 | ||
16:41
finanalyst left
|
|||
takadonet | There is going to be LOTS of different classes in the range of 100 or so | 16:41 | |
I have only one written so far..... | |||
TimToady | well, it's an interesting problem, for which we thank you :/ | 16:42 | |
16:43
payload joined
|
|||
TimToady | jnthn: I remember discussing role BUILD with someone somewhere, and how they should compose, but I don't see it offhand in the specs | 16:43 | |
16:44
smash_ joined
|
|||
jnthn | TimToady: It's an interesting problem, but I've read the role specs in quite some detail and don't recall seeing anything along those lines. | 16:44 | |
TimToady: Question. | |||
takadonet | TimToady: Your welcome but I rather just have an answer hehe | 16:45 | |
TimToady | it's possible that it's submethods in general that should just merge under composition rather than conflict | ||
jnthn | class Foo { has $.attr is my_custom_trait; } | ||
What does the trait_mod get passed here? | 16:46 | ||
16:46
DanielC left,
nErVe joined
|
|||
jnthn | The underlying storage unit, e.g. what's in $!attr? | 16:46 | |
That is, is it the same as in my $foo is custom_trait; | |||
TimToady | hmm, well, is rw has to be able to trigger method generation | 16:47 | |
or rather | |||
jnthn | Well, we handle that in the compiler. | ||
TimToady | transfer its affections to the generated method | ||
ruoso | has $.the_alias is DynamicAlias<the_attr>; | ||
where DynamicAlias would reference the proper attribute when used | |||
jnthn | ruoso: DynamicAlias? nah, is aliased<the_attr> :-) | 16:48 | |
;-) | |||
But anyway, it's writable as a mdoule _provided_ there's some way of getting at the current metaclass. | |||
ruoso | jnthn, right... that should work... I was thinking about storage type | ||
but trait should work as well | |||
jnthn | TimToady: Which is my real question. A trait on an attribute probably should be able to get at the metaclass... | 16:49 | |
TimToady | well, basic principle is that if you're throwing away info too soon that you need later, then you're probably passing the wrong object to the trait | ||
ruoso thinks at $*CLASS | |||
TimToady | or there needs to be a link somewhere | ||
jnthn | Aye. | ||
TimToady | but links don't always work under one-to-many conditions | ||
jnthn | Custom traits on attributes don't work in Rakudo yet (is rw is compiler handled...) | 16:50 | |
ruoso | isn't CALLER::<$?CLASS> enough? | ||
TimToady | which often means you have to pass the other object and link many-to-one | ||
don't know if that principle applies here though | |||
jnthn | ruoso: Probably yes. | ||
I'm just fine with that being the answer. | |||
TimToady | well, "has" is in some sense declaring a slot, not any particular piece of that slot | 16:51 | |
so maybe we need to make the slot abstraction a bit more official | |||
and the slot delegates to the $!name or $.method as appropriate | |||
ruoso | you mean the trait routine receives the "declaration" and not just the "declared" | 16:52 | |
? | |||
TimToady | it's still a declared, but a wrapper of sorts around other declareds | ||
ruoso | I think that's what I meant by "declaration" ;) | ||
TimToady | I like my way of thinking about it better :) | 16:53 | |
jnthn | A kind of Slot object that lets you get at the declaration, but has other properties too? | ||
erm | |||
The declarand I mean | |||
:-) | |||
TimToady | to me a declaration is a syntax/semantics thing | ||
yes, a synthetic declarand | |||
ruoso points at semantics | |||
jnthn | TimToady: So what might this look like, more concretely? | 16:54 | |
TimToady | semantics isn't an object like a declarand is | ||
semantics is a mass noun | |||
would you please fill that jar with some semantics, please, dear? | |||
ruoso | ahehaeaehaehae | ||
TimToady | 'course, you can point at water too | 16:55 | |
but computers don't like pointers to mass nouns | |||
ruoso .oO( void* ) | |||
anyway... jokes aside, I think we agree on the practical side | 16:56 | ||
jnthn | Aye. | ||
So you think that a declaration will invoke a trait mod with something like a Slot object, with properties like .declarand, .name, etc? | 16:57 | ||
[particle] | padre is a mass noun | ||
__ash__ | @a.length is the number of items in the array right> | ||
lambdabot | Unknown command, try @list | ||
TimToady | jnthn: I would guess that we really just want to take one of the existing components such as $!foo and make it smart enough to act like the synthetic declarand by giving it suitable links | ||
whichever of our components is most-instantiated already | |||
so you end up with many-to-one links | |||
jnthn | Are you thinking this applies to just attributes, or variable declarations in general? | 16:58 | |
ruoso .oO( Is it just me or TimToady just ported Class::InsideOut to Perl 6? ) | |||
TimToady | well, attributes are generic variables, basically | ||
jnthn | Right, so this is something more general. | ||
TimToady | but we're likely to run into other kinds of generic variable declarations, especially if TheDamian starts to write new talks | 16:59 | |
logic programming, constraint programming | |||
these tend to have names that represent concepts, not just storage | |||
jnthn | Hmm, true. | ||
ruoso wishes TheDamian had his talks available to the public in continents he doesn't visit | |||
jnthn | TimToady: Is this an area you want to be left alone to think about for a while? | 17:00 | |
Or do you think there's something I can implement now-ish? | |||
jnthn was going to try and wrap some of this up today... | 17:01 | ||
ruoso is still confused... | |||
jnthn | ruoso: Me too. :-) | ||
TimToady | for now just do the simplest thing that works :) | ||
jnthn goes to the pub | |||
TimToady | that works | ||
jnthn | ;-) | ||
ruoso | simplest thing that works seems to be "have an abstract Slot that refers to each part of the declaration" | ||
jnthn | ruoso: What do you mean by abstract Slot here? | 17:02 | |
__ash__ | jnthn: i have a question if you have a sec, about PAST's and actions.pm, well 2 really | ||
jnthn | I mean, let's take an example declaration. | ||
ruoso | an object that wraps all participants in the declaration | ||
jnthn | my $x is custom_trait; | ||
17:03
riffraff joined
|
|||
jnthn | At one point, we're going to call trait_mod:<is>(XXX, :custom_trait) | 17:03 | |
ruoso thinks that Slot might be a bad name... | |||
jnthn | What is the XXX going to look like? | ||
TimToady | declarand is better | ||
ruoso can't think of something much different than Declaration | |||
jnthn | __ash__: Sure. | ||
ruoso | right... declarand is find | ||
so... a Declarand object, in this case a ScopeVariableDeclarand | 17:04 | ||
jnthn | On the one hand, the XXX could just be a Scalar. Or in the case of my @x, it's be Array, etc. | ||
But I'm guessing instead we want something that wraps around that. | |||
TimToady | it's often just a container | ||
ruoso | that has $.visibility = 'my'; has $.name = '$x'; has $.storage_type = 'Scalar' | ||
jnthn | OK. | ||
__ash__ | jnthn: when you do --target=past, i have seen <pasttype> => "callmethod" and <pasttype> => "call" what is the difference between those? is that how it's translated into a method call at the next level down? | ||
TimToady | but it can be a container factory | ||
ruoso | container factory++ | 17:05 | |
jnthn | __ash__: Difference is in the PIR that is generated. | ||
ruoso | TimToady, but not every declaration specifies a container | ||
jnthn | __ash__: call makes a 'foo'(c1, c2, c3,...), callmethod makes a c1.'foo'(c2, c3) | 17:06 | |
ruoso | I think we would have an abstract Declarand type, that would have several specialized subtypes | ||
TimToady | ruoso: some containers are more abstract than others :) | ||
17:06
nErVe left
|
|||
ruoso | AttributeDeclarand | 17:06 | |
MethodDeclarand | |||
ScopeDeclarand | |||
17:07
jhorwitz joined
|
|||
ruoso | using specialized subtypes will even allow you to multi-dispatch on the declaration type | 17:07 | |
jnthn | Well, of routines passing the Routine itself is fine, since it contains a whole bunch of traits we can examine. | 17:08 | |
ruoso | s/tion/nd/ | ||
jnthn | *for routines... | ||
TimToady | a routine is a container of an indirection, which is why a routine is wrappable | ||
jnthn | Right. | ||
ruoso | jnthn, except if the trait is a modifier to the way the routine is stored, not the routine itself | ||
yath | mhm. say, if i just want to play around a bit with perl6, what would i use? rakudo? pugs? or what's the "most complete" implementation? | 17:09 | |
TimToady | at the point of the declaration at least, we generally still know where it is going to be stored | ||
jnthn | Well, that's quite probably already happened before the traits get run. | ||
17:09
justatheory joined
|
|||
TimToady | jnthn: yes, which is why "is also" changed to "augment" | 17:10 | |
ruoso | TimToady, but the "how" it is stored is that can modfiied | ||
jnthn | yath: Rakudo is actively developed and pretty feature rich. | ||
yath | jnthn: okay, i'll check that out, thanks :) | ||
TimToady | .oO( :carefully ) |
||
jnthn | ruoso: I'd think not so much by a trait, unless it's going to retroactively go and fiddle. | ||
pmichaud | (should that be a FAQ somewhere useful? ) | ||
yath | are there any "fundamental" changes between the different implementations, or is it just that one has less features than the other? | ||
ruoso | jnthn, is aliased<foo> is a good example | 17:11 | |
jnthn | yath: Pugs still does a few things that Rakudo does not (e.g. laziness). | ||
yath | jnthn: but there's nothing in either pugs or rakudo that's not spec'd? | ||
jnthn: like, say, some magic compile-specific things as in C | 17:12 | ||
s/compile/&r/ | |||
pmichaud | I think that by definition different implementations are likely to offer at least some items that "aren't specced". | ||
TimToady | they both provide ways of getting at lower-level primitives that aren't going to be specced | ||
yath | pmichaud: hm :( | ||
ruoso | yath, you should have a lot of fun with rakudo already... | ||
yath | TimToady: what primitives? like extending STD.pm? | 17:13 | |
TimToady | yath: an implementation *must* do that, or there's no way to write Perl 6 code to implement the non-primitive bits | ||
ruoso | yath, daniel.ruoso.com/categoria/perl/dice-game-perl-6 for an example of fun | ||
yath | TimToady: maybe i don't get what you mean with "primitives" :) the NQP thing? | ||
jnthn | yath: The places where implementations do have such things is not something you're likely to run into by accident. | ||
TimToady | I mean things like inline PIR | 17:14 | |
pmichaud | yath: Rakudo is built on the Parrot virtual machine. Some people will want to get access to features that are only available in Parrot, and Rakudo isn't going to forbid that from happening. | ||
yath | ruoso: ah, nice | ||
TimToady, pmichaud: ah | |||
so like, er, say, asm() in C ;) | |||
TimToady | that will never be in the p6 spec | ||
precisely | |||
pmichaud | but pretty clearly we aren't going to specify that all Perl 6 implementations require Parrot. | ||
jnthn | yath: Along those lines. | ||
__ash__ | jnthn: also, what is contained in $/ ? and is there a reason why some methods have a space after ( and some done? (ie. $past.name('call') vs $past.unshift( $<variable>.ast ); ? | ||
jnthn | __ash__: $/ contains the match object | 17:15 | |
TimToady | that's just formatting | ||
jnthn | __ash__: The other difference is just different people's coding preferences. | ||
yath | but if the "average" perl6 programmer writes a program, what's the chance that he accidentally uses a compiler-specific feature? | ||
pmichaud | yath: very small. | ||
[particle] | __ash__: some believe that when a simple item is contained in quotes, it should not have spaces around it | ||
TimToady | one tends to put more whitespace when it's harder to find the other end visually | ||
__ash__ | I was just wondering if there is a 'standard' i should be following since i am messing around in the core stuff | 17:16 | |
yath | pmichaud: ah, good to hear | ||
pmichaud | yath: and in Rakudo's case we may add pragmas that are required in order to make use of the special features | ||
(we just haven't done that yet) | |||
yath | that was *that* nice in perl5. if something worked in, say, perl 5.8, it worked in perl 5.8. | ||
TimToady | yath we tend to go on a forgiveness-rather-than-permission basis here | ||
[particle] | we've permitted that for quite some time | 17:17 | |
yath | and i'm very concerned that in perl6 one writes code for rakudo, one for pugs, and so on | ||
TimToady: forgiveness on what? | |||
ruoso tries to pull back the trait issue... | |||
jnthn | yath: Unless you're doing something obscure, that's unlikely. | ||
TimToady | on where you put your optional spaces :) | ||
yath | my spaces? | ||
jnthn | __ash__: Just do what you think looks pretty. ;-) | 17:18 | |
yath | am i doing python? :P | ||
jnthn: fine :) | |||
TimToady | only in the spots where p6 requires spaces | ||
[particle] | ...perl 6 is closer to python spacing rules than you may know... | ||
17:18
jferrero left
|
|||
pmichaud | peoplewhothinkthatwhitespaceisinsignificantneedtorethinkthatabit.:-) | 17:18 | |
__ash__ | jnthn: alright, time to name my variables a, b, c /sarcasm | ||
[particle] | latin++ | 17:19 | |
TimToady | but we don't use indentation for syntax | ||
jnthn | __ash__: That'd be an odd definition of pretty, but I guess beauty is in the eye of the beerholder. | ||
erm, beholder. | |||
:-) | |||
pmichaud | beerholder++ | ||
I'll have to remember that phraselet. | |||
jnthn | So anyway, getting back to traits on variable/attribute decls... | 17:20 | |
ruoso | I think we have a generic Declarand type | 17:21 | |
__ash__ | well, thanks for your time jnthn: i have something that almost works... it makes method calls like $a.Foo::bar() translate into a nearly identical Foo::bar($a) call, its not working (mainly i left it as callmethod rather than call) but when i do i'll try to send you a git-patch, gotta run | ||
ruoso | and specific sub-types | ||
for attribute, method, variable etc | |||
jnthn | (This is like about the last thing I need to do before I can call my current Hague grant complete...thus my eagerness ;-)) | ||
TimToady | roles, perhaps | ||
17:21
__ash__ left
|
|||
jnthn | ruoso: OK, and would that have a way of actually getting at the container? | 17:22 | |
That is, the real declarand? | |||
ruoso | yeah... | ||
something like .container | |||
if it's a ContainerDeclarand maybe | |||
the cool thing is that you can easily restrict where a trait can be used | 17:23 | ||
jnthn | So my $foo is bar; multi trait_mod:<is>(Declarand $d, :$bar!) { $d.container does bar; } | ||
ruoso | simply by setting that specific declarand subtype in the signature of the trait routine | ||
yeah... | |||
jnthn | Right, just as you can already do now e.g. multi trait_mod:<is>(Method $m, :$thingy!) { ... } already in Rakudo will do the right thing (that is, only be applicable to methods, not routines in general). | 17:24 | |
ruoso | jnthn, right... indeed... it carries just a bit more information than "Method" | 17:25 | |
jnthn | TimToady: When you said roles, are you thinking we'd set this up as more like class Scalar does ContainerDeclarand { has $.name; method container { self }; ... }, but it's possible other declarations could have a completely separate object? | 17:26 | |
yath | hm, won't corrent rakudo svn build against parrot 1.0.0? | ||
err, rakudo git | |||
jnthn | yath: No. | ||
yath | hm, damn | ||
pmichaud | it's very rare that rakudo git will build against any given parrot release. Rakudo evolves too quickly for that. | 17:27 | |
jnthn | yath: If you grab Rakudo from git (which I guess you've already done...) | ||
And then just do | |||
perl Configure.pl --gen-parrot | |||
TimToady | jnthn: I have no idea what people will want to declare 100 years from now :) | ||
yath | jnthn: yeah, but i thought i could use debian's parrot instead | ||
jnthn | It will get the right Parrot, make an install in your build directory, build Rakudo against it and make you something that Just Works. :-) | ||
yath: Ah, OK. No, 'fraid not. | |||
yath | jnthn: but i didn't know if chaning build/PARROT_REVISION is a good idea %-) | ||
jnthn | yath: Changing it to an earlier version number? No, that'd count as a bad idea. :-) | 17:28 | |
yath | well then, we're in 2009. doesn't take too much time to build parrot, i hope :) | ||
jnthn | No | ||
yath | jnthn: i changed it to 0 :P | ||
jnthn | TimToady: Heh. That isn't much help to me now. :-P | 17:29 | |
TimToady: Anyway, I can come up with something that works, that is along the lines of what ruoso++ is saying too, and I guess we can iterate from there. | |||
yath | uah, svn is *that* slow compared to git | 17:30 | |
*wait* | |||
TimToady | jnthn++ | ||
jnthn | yath: Heh, the checkout will probably take almost as long as the build. ;-) | ||
yath | hehe | ||
jnthn | Thanks all. | 17:31 | |
TimToady | Do you realize they can't even do karma in Haskell without a *monad*!?! :) | ||
karma is a side effect... | |||
szbalint | Rakudo probably builds against Parrot 1.5 though, as it was just released :) | 17:35 | |
but I haven't tested it... | |||
yath | hm, i should have passed -j to make... | 17:37 | |
$ ./perl6 -e 'say "foo"' | 17:43 | ||
foo | |||
\o/ | |||
hm, is there no qw in perl6 anymore? | 17:53 | ||
ruoso | yath, just < > | ||
yath | ah, <> | ||
yeah | |||
thanks :) | |||
yath just found Perl6::Perl5::Differences | 17:54 | ||
17:56
riffraff left,
Infinoid left
|
|||
yath | is there any difference between «» and »«? | 17:57 | |
as meta-operator | |||
jnthn | Yes. | ||
dwimminess. | |||
yath | both DWIM :P | ||
jnthn | You point the sharp end at a side to have it auto-upgrade. | ||
That is, if it's too short. | |||
yath | yes, in the case of «« or »» | ||
but if i do «+» or »+«? | |||
jnthn | <<+>> means "upgrade the shorter side, it doesn't matter which is shorter" | 17:58 | |
>>+<< means "explode if they're different lenghts" | |||
yath | ah | ||
thanks | |||
jnthn | rakudo: say (1,2,3) >>+<< 1; | ||
p6eval | rakudo 0d4fe0: OUTPUT«Non-dwimmy hyperoperator cannot be used on arrays of different sizes or dimensions.in Main (/tmp/dhw1sHVOKM:2)» | ||
jnthn | rakudo: say (1,2,3) >>+>> 1; | ||
p6eval | rakudo 0d4fe0: OUTPUT«234» | ||
yath | rakudo: say (1,2,3) <<+>> 1; | 17:59 | |
p6eval | rakudo 0d4fe0: OUTPUT«234» | ||
jnthn | (just checking I got it the right way around :-)) | ||
yath | hm | ||
jnthn | Right. But if you have @a and @b and you don't know which is shorter, then <<+>> becomes more useful. :-) | ||
yath | cool, even >>+<<< works :) | 18:00 | |
jnthn | phenny: tell masak you wrote github.com/masak/csv in your blog but it gives me 404? | 18:03 | |
phenny | jnthn: I'll pass that on when masak is around. | ||
yath | isn't [] used for array refs anymore? <foo bar>.perl gives ["foo", "bar"], althought it's an array. or a list. or whatever. | ||
pmichaud | that's a piece that is needing some upgrading | ||
we're waiting for some spec revisions to land | 18:04 | ||
18:04
eMaX_ left
|
|||
pmichaud | older versions of the spec indicated that lists would .perl as arrays. That's no longer true, but the new spec is incomplete on the subject. | 18:04 | |
yath | ah, so the "traditional" [] and {} still stand? | ||
pmichaud | ['foo', 'bar'] is an array | ||
('foo', 'bar') is a list | |||
<foo bar> is also a list | 18:05 | ||
yath | but how would i do an array ref then? | ||
pmichaud | ['foo', 'bar'] acts like an array ref | ||
but references are somewhat "hidden" | |||
i.e., my $a = ['foo', 'bar']; say $a.WHAT # Array | |||
rakudo: my $a = ['foo', 'bar']; say $a.WHAT; | |||
p6eval | rakudo 0d4fe0: OUTPUT«Array()» | 18:06 | |
pmichaud | rakudo: my $a = ['foo', 'bar']; say $a[1]; | ||
p6eval | rakudo 0d4fe0: OUTPUT«bar» | ||
pmichaud | note that it's _not' $a->[1] | ||
yath | hmmmmm | ||
jnthn | In general, you just don't have to think about references in Perl 6. | 18:07 | |
yath | just wonderes because @a = <a b c>; @b = <d e f>; both look like array refs, but @c=(@a,@b) works as i'd expect it from perl5 | ||
s/wonderes/wondered/ | |||
pmichaud | neither of those are array refs | ||
jnthn | rakudo: my $foo = [1, { x => 42 }, 3]; say $foo[1]<x>; | ||
p6eval | rakudo 0d4fe0: OUTPUT«42» | ||
pmichaud | @a = <a b c> is the same as @a = ('a', 'b', 'c') | ||
lambdabot | Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v | ||
KyleHa | pmichaud: Good to see you! | 18:08 | |
pmichaud | KyleHa: glad to be "back" | ||
18:09
barney joined
|
|||
zloyrusskiy | i wanna ask lame question: why in interactive mode i can't declare variables, i'm getting error: Symbol '@a' not predeclared in <anonymous> | 18:09 | |
in Main (src\gen_setting.pm:3343) | |||
KyleHa | Any objection to me moving the PARROT_REVISION up to today's release version? | 18:10 | |
jnthn | KyleHa: I already have a patch here to do it... | ||
KyleHa | I ran the spectest with it, and it has the same failures I've come to expect. | ||
jnthn | KyleHa: Ah, I was just waiting for my run to finish. | ||
KyleHa | jnthn: In that case, I'll leave it. | ||
jnthn | zloyrusskiy: At the moment, the interactive mode treats each line as its own lexical scope. | 18:11 | |
zloyrusskiy: Which, yes, sucks. | |||
zloyrusskiy | =) | ||
jnthn | zloyrusskiy: my $a = 42; say $a; # all on one line is fine | ||
zloyrusskiy | jnthn: ok, thanks | ||
jnthn: yeah, works | 18:12 | ||
jnthn | :-) | ||
We have plans to improve it...hopefully in the not too distant future that'll get done. :-) | |||
18:13
jferrero joined
|
|||
pmichaud | jnthn: I get one failure in thorough.t after bumping PARROT_REVISION | 18:16 | |
18:16
zamolxes left
|
|||
jnthn | pmichaud: That's my fault, don't worry about it. | 18:17 | |
pmichaud | other than that, bumping PARROT_REVISION looks okay to me | ||
pugs_svn | r28021 | jnthn++ | [t/spec] Fudge a test that is failing in Rakudo. | 18:18 | |
jnthn | That's thorough.t taken care of. | ||
OK, pushed the bump. | 18:19 | ||
Who's release manager this month for Rakudo? | |||
pmichaud | KyleHa++ | ||
KyleHa | *bow* | 18:20 | |
I'm looking for a namer. | |||
smash_ | pmichaud: did you add me to the pool ? | ||
pmichaud | smash_: Hadn't heard from you yet for August, and KyleHa++ came up so he got August. Next available slot is December or January, if you want them | ||
smash_ | pmichaud: i can take december | 18:21 | |
dalek | kudo: 6c7b8b3 | jnthn++ | build/PARROT_REVISION: Bump us up the the current Parrot release, in preparation for the next Rakudo release. |
18:22 | |
pmichaud | smash_: okay, I'll give you december and move chromatic to january (he and I had already discussed this possibility) | ||
note that PARROT_REVISION is now frozen until the Rakudo release on Thu | |||
smash_ | pmichaud: i can do january too, it's the same for me | ||
pmichaud | smash_: I'm trying to make sure we don't have two months in a row with the same release manager | 18:23 | |
oh, you mean instead of december. Either one, choice is yours :) | |||
smash_ | pmichaud: either way is fine with me, just schedule it as you see fir | ||
pmichaud | smash_: okay, will do, and thanks! | ||
smash_ | (s/fir/fit/) | 18:24 | |
KyleHa | I'm shooting to have the release all but done in about 24 + 10 hours. | ||
18:24
molaf left
|
|||
KyleHa | ...because my free time may be more restricted after that. | 18:24 | |
pmichaud | KyleHa: that sounds fine | ||
jnthn | pmichaud: I'm rakudo-daying tomorrow, will mostly do bug triage. | 18:25 | |
pmichaud | jnthn: works for me. I may do the same -- depends on how other events play out. I might also review/update the "make install" target a bit more tomorrow. | ||
Of course, all bets are off if I don't have $otherjob server woes taken care of first. | |||
jnthn | nod | 18:27 | |
18:27
payload left
|
|||
pmichaud | (but I think that's likely to be taken care of by then) | 18:27 | |
18:27
payload joined
18:33
payload left
18:35
xomas_ left
18:42
zamolxes joined
18:50
icwiener joined
19:00
abra left
19:10
masak joined
|
|||
masak | TEH PARROTZ! | 19:10 | |
phenny | masak: 18:03Z <jnthn> tell masak you wrote github.com/masak/csv in your blog but it gives me 404? | ||
masak | hm. | 19:11 | |
PerlJam | s/csv/cvs/ | ||
you typo'ed | |||
masak | yes... in creating the repo :/ | 19:12 | |
19:12
payload joined
|
|||
masak | anyway, I've renamed it now. github says it'll take a couple minutes to go through. | 19:12 | |
jnthn: thanks. | |||
PerlJam | masak++ | 19:13 | |
masak | apparently, getting things done/right is an iterative process. :) | ||
19:23
cono joined
|
|||
masak | rakudo: role Self[Self] {} | 19:27 | |
p6eval | rakudo 0d4fe0: OUTPUT«set_pmc_keyed() not implemented in class 'Integer'in Main (src/gen_setting.pm:1538)» | ||
masak | expected behaviour? discuss. | ||
std: role Self[Self] {} | 19:28 | ||
p6eval | std 28021: OUTPUT«===SORRY!===Invalid typename Self at /tmp/1OlrJQaA7X line 1:------> role Self[Self⏏] {}FAILED 00:03 41m» | ||
PerlJam | it's hard to tell if they're making any progress on #parrot. | ||
jnthn | PerlJam: We are, don't worry. | ||
masak | progress with what? | ||
jnthn | Trying to prevent a Parrot clusterfuck that would cause Rakudo development problems. | 19:29 | |
TimToady | translation: we now have jnthn and pmichaud worrying about it, so you don't have to :) | ||
19:29
hah left
|
|||
PerlJam | jnthn: but do you, pmichuad, TimToady, allison and chromatic all agree? :) | 19:29 | |
masak | oh, a clusterfuck, no less? | ||
pmichaud | PerlJam: I think that I, jnthn, and TimToady agree. | ||
TimToady | I don't think chromatic agrees yet, but he's in snark mode at the moment | 19:30 | |
he'll come around eventually | |||
masak backlogs | |||
masak submits rakudobug | |||
jnthn | chromatic's points are whines about language design, which ain't really applicable to the discussion right now. | ||
pmichaud | this question came up 10 months ago :-) irclog.perlgeek.de/parrot/2008-10-22#i_638371 | ||
jnthn | .oO( seems I'm in snark mode too ;-) ) |
||
pmichaud: Depressing. | 19:31 | ||
pmichaud: Anyway, from what allison has said, there's only one real issue now. | |||
Basically, yes, the CallSignature will have the invocant as the first positional. | |||
TimToady | I think it was shortly after that that we melted ruoso's brane with the same issue and made him rewrite smop :) | ||
pmichaud | TimToady: actually, that came about 4 months later, iirc | 19:32 | |
I think we melted ruoso's brane in the february time frame | |||
TimToady | that's shortly, in Perl years :) | ||
jnthn | Parrot will record something that lets us know whether the invocation has a a.$P0(b, c) | ||
Or a $P0(a, b, c) | |||
pmichaud | jnthn: that's not how I read it. | ||
jnthn | And allison proposes that a :method will, by default, care about that. | ||
PerlJam | so much for agreement :) | ||
19:32
jantore joined
|
|||
pmichaud | I read that $P0(a, b, c) throws an exception. | 19:32 | |
jnthn | Yes, but separate out the issues. | 19:33 | |
That's _not_ because a is not the first positional in CallSignature. | |||
pmichaud | PerlJam: oh, looks like we agree. :) | ||
jnthn | It's because the two CallSignature's carry different extra metadata. | ||
ruoso | TimToady, pmichaud, you bet... thankfully my brain got back in place already | ||
pmichaud | jnthn: right, it's because a sub flagged as :method will carp if the first argument isn't flagged as invocant | ||
ruoso | at least I thikn it did | ||
jnthn | pmichaud: Right, which means basically the issue is making sure we have a way to say to Parrot, please don't carp about it. | ||
TimToady | well, parrotfolk are going through the branemelt now :) | ||
jnthn | pmichaud: fwiw, I think very likely is that we are going to take the CallSignature and unpack and bind it ourselves. | 19:34 | |
pmichaud | jnthn: yes, I had come to that conclusion as well. | ||
jnthn: which means I don't really care much about :lookahead | 19:35 | ||
jnthn | But I'm reluctant to suggest that the only way to surpress it is " .param pmc args :call_sig" | ||
pmichaud: Right. | |||
Me either. | |||
pmichaud | (and no, :lookahead was not my choice of name, despite what allison++ has said :) | ||
jnthn | Now that I've kinda confirmed to myself that we need to go on the self-unpacking route. | ||
(I was quite open to both at one point. "inter_call.c refactors come later" just changed that...) | |||
pmichaud | the hard part is going to be getting PGE to conform to both the Rakudo and P6 worldviews. | ||
jnthn | ...Rakudo and P6? | 19:36 | |
pmichaud | sorry, Parrot and P6 worldviews | ||
jnthn | You mean Rakudo and Parrot? | ||
pmichaud | (typo) | ||
19:36
jhorwitz left
|
|||
jnthn | Right, well that's why we need to try and push for a way other than just saying "I'll unpack myself" to surpress the warning. | 19:36 | |
erm, | |||
the exception | |||
not warning, exception | |||
Knowing our luck, it'll probably end up being called :submethod ;-) | 19:37 | ||
TimToady | just flip the resumable bit on it and resume it. :) | ||
then feed parrot to the optimizer, and it notices that the exception is always resumed, and deletes it entirely :) | 19:38 | ||
(I wish) | |||
19:41
tann joined
|
|||
masak | rakudo: role Self[Foo] {} | 19:42 | |
p6eval | rakudo 0d4fe0: OUTPUT«set_pmc_keyed() not implemented in class 'Integer'in Main (src/gen_setting.pm:1538)» | ||
jnthn | where the heck does the integer come from? | ||
masak | don't ask me. :) | 19:44 | |
jnthn | Yeah. I should ask the fool that implemented the thing. | ||
masak | there's now an RT ticket reminding you to find out, however. :P | ||
19:44
zloyrusskiy left
|
|||
masak | jnthn: I'm pretty sure 'fool' isn't very collocational with 'type system implementor'... | 19:45 | |
besides, I'm only investigating corner case failure modes, as usual. | 19:46 | ||
TimToady | there's a joke to be made there about the former checkoslovakia, but I'm still trying to figure out what it is | ||
czech, bah | 19:47 | ||
can't spell this week | |||
masak | looking forward to that joke, anyway. :) | ||
jnthn will czech back later for it | |||
19:50
barney left
|
|||
masak | *rimshot* | 19:50 | |
I'm glad you seem to be reaching consensus on #parrot. | 19:52 | ||
19:53
payload left
19:54
xomas_ joined
19:57
hercynium joined
|
|||
jnthn | ...well, I almost thought we had... :-) | 19:57 | |
masak | :/ | 20:01 | |
sjohnson | i have a question for everyone: I want to become able to use Perl very well, and I was thinking of mastering the Camel book. But should I instead just master the Perl 6 specifications? | 20:04 | |
masak | sjohnson: depends on what your short-term goals are, I'd say. | 20:05 | |
20:06
kane__ joined
|
|||
masak | Perl 5 is one nice really language. and it has lots of good libraries. | 20:06 | |
sjohnson | i want to be able to weild perl like some of the more creative guys around here | ||
20:06
nErVe joined
|
|||
TimToady | buying a Camel book puts a few cents into my bank account, while the P6 specs are a net drain... :) | 20:06 | |
takadonet | hehe | ||
masak | :D | ||
sjohnson | my boss paid for the Camel Book :) | ||
the only thing about it can't figure out for the life of it, is the difference between "my $goose" and "our $goose" | 20:07 | ||
takadonet | so does mine :) Any book I need, we get for free | ||
20:07
nErVe left
|
|||
PerlJam | sjohnson: do you understand lexicals? | 20:07 | |
sjohnson: do you understand package vars? | |||
sjohnson | i understand the "my" scope and the exporter things from packages | ||
PerlJam | our $foo; makes the name $foo lexically available and it maps to $SomePackage::foo | 20:09 | |
20:09
evilmight joined,
evilmight left
|
|||
sjohnson | must the $foo be declared in SomePackage/foo.pm? | 20:10 | |
Tene | sjohnson: no, it's just a variable... | ||
sjohnson | back to the drawing board for me -_- | 20:13 | |
masak | sjohnson: my suggestion to you is to start writing code. preferably lots of it. | 20:14 | |
discussing theory is good, but it only gets you so far. | |||
rakudo: say <-> $n, $l = 3 { join ",", reverse gather while $n { my $s = sprintf "%03d", $n % 10**$l; $n = truncate($n / 10**$l); take $n ?? $s !! $s.subst(/^0+/, "") } }.(65536) | 20:19 | ||
p6eval | rakudo 0d4fe0: OUTPUT«65,536» | ||
20:19
payload joined
|
|||
jnthn glances at #parrot again and bangs his head against the wall | 20:20 | ||
OK, it's high time for me to get dinner...be back in a bit. | |||
masak | this day has had a record amount of people banging their heads against hard, flat surfaces. | ||
KyleHa | What are the Parrot folks trying to solve? | 20:22 | |
masak | also, who would have thought in 2000 that nine years later, a group of Perl 6 developers would have a hard time reaching consensus with a group of Parrot developers? from the point of view of nine years ago, the thought staggers. | 20:23 | |
takadonet | cya all later | 20:24 | |
masak | takadonet: o/ | ||
takadonet | hopefully tomorrow I could show you guys a fasta parser! | ||
PerlJam | masak: 9 years ago it would have been "What's Parrot?" and "What's Rakudo?" :) | ||
masak | PerlJam: oh! which year was the Parrot April's Fools joke? | 20:25 | |
20:25
takadonet left
|
|||
PerlJam | might have been 2000, but I think it was 2001 or 2003 | 20:25 | |
er, 2002 | |||
masak | it was no later than 2001. oreilly.com/news/parrotstory_0401.html | ||
20:25
Whiteknight left
|
|||
masak | aye, 2001, it seems. | 20:26 | |
by the way, it would still be kinda funny to make such a hybrid language. | |||
20:30
tak11 joined,
perletc joined
|
|||
perletc | im here, coolness | 20:30 | |
20:30
payload left
|
|||
perletc | perl6 looks awesome | 20:30 | |
20:30
payload1 joined
|
|||
masak | perletc: welcome! | 20:30 | |
rakudo: say 'perletc: so, have you tried Rakudo yet?' | |||
p6eval | rakudo 0d4fe0: OUTPUT«perletc: so, have you tried Rakudo yet?» | 20:31 | |
20:31
icwiener left
|
|||
sjohnson | wow, perletc is a cyborg | 20:32 | |
perl6 truly can accomplish anything | |||
masak | sjohnson: what makes you think perletc is a cyborg? he looks perfectly human to me. | ||
sjohnson | oh | 20:33 | |
i didn't see your "rakudo:" part | |||
i just saw the perletc: part | |||
thought you were executing code with him | |||
masak | sjohnson: :) | 20:34 | |
perletc: even the residents here can't tell the difference between droids and humans. that's how advanced Perl 6 is. :) | |||
TimToady | I should turn TimToady into a bot that also lets me type through... | ||
sjohnson | timtoady: print Dumper Advice.life; | 20:35 | |
masak | TimToady: there's prior art. buu has a buubot... | ||
TimToady | Out of Memory | ||
mofino | haha | 20:36 | |
sjohnson | BotToady | ||
masak | rakudo: my ($a is readonly) = 5; say $a; $a = 7; say $a | 20:38 | |
p6eval | rakudo 0d4fe0: OUTPUT«57» | 20:39 | |
PerlJam | sjohnson: and together they are ... the Toadys :) | 20:40 | |
cono | TimBot - There is more beautiful onions there :D | ||
perletc | sorry guys, im back | ||
no havent tried Rakudo yet, im scared | 20:41 | ||
masak | no need to be scared. | ||
just type 'rakudo: ' and then your first program. | |||
rakudo: say 2 + 2 | |||
p6eval | rakudo 0d4fe0: OUTPUT«4» | ||
perletc | why does the output look like that? | 20:42 | |
20:42
ruoso left
|
|||
perletc | xAB4»? | 20:42 | |
masak | perletc: those are french quotes on my screen. | ||
perletc | maybe its my client, im using hydrairc | ||
cono | rakudo: .say for 1..3 | ||
masak | probably an encoding issue, yes. | 20:43 | |
p6eval | rakudo 0d4fe0: OUTPUT«123» | ||
20:43
RonOreck joined
|
|||
mkelly32 | so. sub MAIN basically works like: run script like perl5 would. then, if there is a &main::MAIN, call main::MAIN(|@*ARGV)? or, is it fancier than that? | 20:43 | |
masak | rakudo: say ("OH HAI", "try me,") X~X " perletc" | ||
p6eval | rakudo 0d4fe0: OUTPUT«Could not find non-existent sub X» | ||
masak | oops. | 20:44 | |
rakudo: say ("OH HAI", "try me,") X~ " perletc" | |||
p6eval | rakudo 0d4fe0: OUTPUT«OH HAI perletctry me, perletc» | ||
perletc | what so great about perl6 (that a cool title for a blog article) | ||
TimToady | mkelly32: it also translate normal switch syntax to named args | ||
masak | rakudo: .say for ("OH HAI", "try me,") X~ " perletc" | ||
p6eval | rakudo 0d4fe0: OUTPUT«OH HAI perletctry me, perletc» | ||
perletc | does it have dot syntax now? | ||
masak | perletc: yep. | ||
20:44
dbrock joined
|
|||
masak | perletc: and it's better than ever. | 20:44 | |
perletc | niceness | 20:45 | |
masak | perletc: look at this, for example: | ||
rakudo: for "niceness" { .=flip; .say } | |||
p6eval | rakudo 0d4fe0: OUTPUT«ssenecin» | ||
mkelly32 | hrm, neat. so, is it able to be a complete replacement for Getopt::Long? or are there still a few things that Getopt does that a sub signature can't? | ||
masak | mkelly32: I think it'll be a pretty complete replacement. | 20:46 | |
perletc | rakudo: package foo; sub new { return bless {}, class; } sub moo { return 'blah'; } 1; say foo.new.moo; | ||
p6eval | rakudo 0d4fe0: OUTPUT«Unable to parse class definition at line 2, near "; } sub mo"in Main (src/gen_setting.pm:1525)» | ||
perletc | im pretty sure i F'd that up | 20:47 | |
masak | perletc: whoa! one step at a time. :) | ||
perletc | :) | ||
masak | perletc: you need semicolons after blocks now, if you continue writing code on the same line. | ||
perletc | ah | ||
masak | also, you generally don't need to declare your 'new' methods. | ||
watch: | |||
perletc | niceness | 20:48 | |
masak | rakudo: class A { method moo { return 'blah' } }; say A.new.moo | ||
p6eval | rakudo 0d4fe0: OUTPUT«blah» | ||
sjohnson | moo is a cute var name | ||
perletc | auto-instansiation | ||
cewl | |||
masak | this also works: | 20:49 | |
perletc | wait wait, dont tell me it supports prototyping too | ||
masak | rakudo: class A { method moo { return 'blah' } }; my A $a = A.new; $a.moo | ||
p6eval | rakudo 0d4fe0: ( no output ) | ||
masak | oops. | ||
rakudo: class A { method moo { return 'blah' } }; my A $a = A.new; say $a.moo | |||
p6eval | rakudo 0d4fe0: OUTPUT«blah» | ||
masak | perletc: it's prototype-based, yes. | ||
the above ('my A $a = A.new') can also be shortened to just 'my A $a .= new' | 20:50 | ||
perletc | fa sho | ||
so, what about method moo (my $foo, $barr) { ... } | |||
limiting the parameters? | 20:51 | ||
masak | there are parameter declarations, yes. | ||
but you don't need a 'my' there. | |||
perletc | very cewl | ||
very very cewl | 20:52 | ||
masak | rakudo: sub foo($a, $b, $c = 5) { .say for $a, $b, $c }; foo(1,2) | ||
p6eval | rakudo 0d4fe0: OUTPUT«125» | ||
perletc | damn Perl is back | ||
ok how can I help | |||
masak | :) | ||
perletc: ok, so here's our current problem: | |||
we need people who write applications. | |||
perletc | me | 20:53 | |
masak | you guessed it. | ||
doesn't have to be ambitious stuff. | |||
just try things out with Rakudo and see if they work like you think. | |||
pmichaud | we could also use updates to rakudo.org/how-to-help :) | ||
20:53
dakkar left
|
|||
pmichaud | I can give out edit bits for those who need them | 20:53 | |
masak | blog about it, tweet about it, tell your friends. re-visit us here at #perl6 and ask all manner of questions. | ||
perletc | k | 20:54 | |
mkelly32 | are heredocs still NYI? | ||
masak | perletc: we simply love people who use Rakudo for new, interesting things! | ||
pmichaud | still NYI, sadly. | ||
mkelly32: but qq{...} and q{...} are often reasonable substitutes | |||
mkelly32 | true. | ||
masak | mkelly32: heredocs are blocking on docking with STD. | ||
reasonable substitutes, but still worthy of an expectant 'RAKUDO: ' comment. | 20:55 | ||
mkelly32 | though, aren't perl6 heredocs supposed to support being indented and such? | ||
pmichaud | yes. | ||
TimToady | STD already implements that | ||
perletc | can rakudo be installed parrallel to current installation, is it backwards compatible, is there a win32 distro yet? | ||
mkelly32 | ah, ok. | ||
masak | STD++ | ||
perletc: parallel: yes. back-compatible: no. win32: yes. | |||
pmichaud | if by "backwards compatible" you mean "does it execute Perl 5 code", the answer is "not yet" | ||
mkelly32 | is there a target timeframe for using STD? (which, iirc, is the perl6 grammer written in perl6?) | 20:56 | |
pmichaud | mkelly32: December 2009 | ||
mkelly32: could be sooner than that | |||
but that's the likely target | |||
masak | wow, it's like a Christmas gift! \o/ | ||
mkelly32 | is the idea that all the different perl6 implementations would use STD? | ||
perletc | is rakudo the official name? | ||
masak | perletc: Rakudo is one of the most lively Perl 6 implementations. | ||
pmichaud | mkelly32: STD will be the reference grammar | 20:57 | |
masak | perletc: the long name is, I believe "Rakudo Perl 6". | ||
pmichaud | mkelly32: I don't know how many of them will use STD exactly as-is | ||
mkelly32 | ok | ||
20:57
alester left
|
|||
TimToady | commuting & | 20:58 | |
perletc | lastly, probably dumb, if perl6 can't execute perl5 code, are the modules from perl5 standard in perl6 distro? | ||
does, CGI, DBI, etc work | 20:59 | ||
masak | perletc: you put your finger on another burning issue. | ||
not at all a dumb question. | |||
for the most part, we get by without those. | |||
some modules, we ported. | |||
pmichaud | there's also not a single "perl6 distro" | ||
(*not going to be...) | |||
perletc | ah, ok. | ||
masak | others, we'd like to see ports of. | ||
PerlJam | perl6 is a multi-headed hydra ;) | ||
perletc | :) | 21:00 | |
masak | perletc: there's a project called November, a wiki engine written in Perl 6. it uses its own very simple CGI.pm. | ||
perletc: then there's the Web.pm project, which tries to do things better than CGI.pm. | |||
we're still waiting for some heroic figure to grab DBI by the horns. | 21:01 | ||
cdarroch | on this subject, btw, is it anticipated that modules would mostly be written in perl6, or would some be written for parrot, say? | ||
PerlJam | masak: better? I think Web.pm and November are apples and oranges. | ||
cdarroch | with the goal of making them run in any parrot-driven HLL? | ||
masak | PerlJam: I meant better than the CGI.pm of Perl 5. sorry, I wasn't too clear. | ||
PerlJam | ah. | ||
masak | PerlJam: but yes, Web.pm will also replace the CGI.pm of November eventually. | 21:02 | |
I've promised that, and it still seems like a good idea. dogfooding and all. | |||
21:03
payload1 left
|
|||
jnthn back | 21:03 | ||
perletc | rakudo: method doit ($id, $user) { say for $id $user; }; doit(1, 'guy', 'failed'); | ||
p6eval | rakudo 0d4fe0: OUTPUT«say requires an argument at line 2, near "for $id $u"in Main (src/gen_setting.pm:2510)» | 21:04 | |
mkelly32 | i've noticed that november seems pretty darn slow. is that just a product of there not being much optimization work done yet for parrot/rakudo? (since i figure it's more important to have it complete than do premature optimizations) | ||
PerlJam | cdarroch: it doesn't really matter as long as we can turn Perl 6 into PIR (we can) and coerce a Perl 6 compiler to run PIR (I'm fairly sure we can there too :) | ||
mkelly32 | or, is it a potential for improvement in november itself? | ||
masak | perletc: you need '.say' and a comma between $id and $user. | ||
cdarroch | so you could create a p6 DBI module, compile it down to PIR, then use in ParTcl, say? | 21:05 | |
masak | perletc: also, you should probably use 'sub' outside of class declarations for now. | ||
PerlJam | cdarroch: I don't know about you though, but I'm planning on writing in Perl 6 as much as possible :) | ||
cdarroch | (or at least, that's the vision ...) | ||
masak | cdarroch: oh, definitely. | ||
perletc | ok | ||
rakudo: sub doit ($id, $user) { .say for $id, $user; }; doit(1, 'guy', 'failed'); | |||
p6eval | rakudo 0d4fe0: OUTPUT«too many arguments passed (3) - 2 params expectedin sub doit (/tmp/S36wawvDeg:1)called from Main (/tmp/S36wawvDeg:2)» | ||
perletc | cewl, very very nice | 21:06 | |
cdarroch | ok ... this is how I came to be interested in the concurrency stuff, because I studied DBI's XS when I wrote net::zookeeper recently, | ||
which uses a C library that kicks of several pthreads to handle heartbeat msgs to the server | |||
21:06
M_o_C joined
|
|||
cdarroch | it seemed like a p6 version wouldn't need to C lib at all, say -- if it could kick off real threads in p6 | 21:07 | |
PerlJam | cdarroch: ah, perhaps you want to look at java2perl6.googlecode.com/svn/trunk | ||
cdarroch | down the road a way, obviously :-/ | ||
masak | perletc: do you want to see something I drew with Perl 6? :) | 21:08 | |
perletc | would be nice to have a truely unified self-sufficient perl | 21:09 | |
* requirements for such an acheivement r ovver my head | |||
PerlJam | cdarroch: DBDI is the database driver interface. Tim Bunce seems to think that we should just use the same interface that JDBC does, so we're (loosely speaking) writing code to translate the JDBC stuff to perl 6 | ||
masak | well, there will be Perl 6 distributions that come pre-packaged with different useful modules, I'm sure. | ||
21:15
payload joined
|
|||
masak | PerlJam: do you know if there'll be something that people can test-drive within the next few time units? | 21:19 | |
PerlJam | masak: I do not know, but it feels like there could be something useful soonish. | 21:21 | |
masak | soonish++ | ||
PerlJam | It would be awesome if Rakudo* could have some sort of DBI-like thing, some sort of web framework, some sort of graphics library, and a few popular parsers (HTML, XML, CSV ;) | 21:22 | |
(I mean all useable at release) | 21:23 | ||
We could even make a few of the first Perl 6 dists from there (simple, but useful) | |||
masak | PerlJam: yes, I agree fully. it would be awesome. we have 226 days to realize such a vision. | 21:26 | |
and to package it nicely. | |||
PerlJam | I hope that isn't 226 until Apr 1 ;) | 21:27 | |
masak | it is. | ||
sjohnson | extend the deadline to xmas | 21:28 | |
PerlJam | oh no! that's an unfortunate release date. Better go with March 20 (first day of Spring) | ||
masak | PerlJam: I'm not saying Rakudo Star'll be released on April 1. | ||
PerlJam: in fact, April is only an estimate right now. | |||
jnthn | Plus Rakudo releases are on the third Thursday of the month. ;-) | 21:29 | |
Which had better not be the 1st. ;-) | |||
PerlJam | jnthn++ | ||
masak | PerlJam: but I need *some* hard figure, so I'm picking days-left-until-April. | ||
jnthn | Days left until April is a nice enough measure. | ||
It gives an order of magnitude. | |||
226 feels like a nice big number. Lots of time to get stuff done. ;-) | |||
PerlJam | masak++ | ||
masak | (it also turns out to be a pretty nice use case for improving the Temporal spec) | ||
jnthn | oh my... | 21:31 | |
How in git can I list my pending commits? | |||
that is, stuff I comitted but did not yet push? | |||
masak | 'git log master..origin/master', perhaps? | 21:32 | |
uh, no. the other way around. :/ | |||
'git log origin/master..master' | |||
should work. | |||
jnthn | Thanks, that shows we the commit... | ||
jnthn wonders if he can get a diff | |||
masak | sure, just replace 'log' with 'diff' :) | ||
jnthn wonders if he can undo having comitted it. <embarrased look> | 21:33 | ||
masak | sure, is it just one commit? | ||
jnthn | yeah | ||
PerlJam | as long as you haven't pushed, it's relatively easy | ||
masak | 'git reset --hard HEAD^' in that case. | ||
jnthn | ok, thanks. | ||
:-) | |||
Yeah, I haven't done anything insanely stupid. Phew. :-) | |||
masak | git++ | ||
jnthn | git++ is great when you know how to use it. | ||
masak ♥ git | 21:34 | ||
21:35
kane__ left
|
|||
sjohnson | heh | 21:35 | |
that's cute | |||
jnthn | gah, today hasn't had enough hours in it. | ||
bbiab | |||
masak | my problem with days nowadays is that they have too many hours at the end and too few at the beginning. | 21:36 | |
21:36
Whiteknight joined
|
|||
dalek | kudo: b9c79c2 | jnthn++ | (3 files): Stub in AttributeDeclarand and ContainerDeclarand, as a start to getting something in place for trait application to container declarations. Based on discussion on #perl6, and not spec yet. |
21:38 | |
masak | jnthn: also, if there was just some little thing about the commit you wanted to fix, there's always 'git commit --amend', an awesome flag. | 21:39 | |
21:55
M_o_C left
22:02
ruoso joined
22:04
kst` is now known as kst
|
|||
jnthn | masak: Aye, --amend is one trick I did learn. ;-) | 22:06 | |
masak | jnthn: what about 'git rebase'? :D | 22:08 | |
jnthn | masak: I know to try git pull --rebase ;-) | 22:09 | |
Which as I understands it removes my patches, applies the upstram ones, then re-applies mine on top of those. | |||
22:09
cdarroch left
|
|||
jnthn | Or something. | 22:09 | |
masak | 对. | 22:10 | |
KyleHa | The spectest just said to me, "OH NOES OUT OF CHEEZBURGER". | ||
masak | :) | ||
KyleHa | I reckon my autounfudge was a wee bit too aggressive. | ||
jnthn | ETOOLITTLECHINESESKILLZ | 22:11 | |
masak | jnthn: but 'git rebase' can do that for you when you've finishing a branch you started four days ago, and you want to remove the commits in your branch, catch up with master, and then re-apply the commits. | ||
jnthn | masak: OK, that sounds kinda good. | ||
masak: So it's a good thing to do before merging a branch? | |||
masak | a very good thing. | ||
TimToady | @seen KyleHa | ||
lambdabot | KyleHa is in #perl6. I last heard KyleHa speak 1m 5s ago. | 22:12 | |
masak | it makes merges much easier. | ||
TimToady | gah, I'm blind | ||
KyleHa: in this: dies_ok { RT66886::c }, 'accessing non-value of enum dies proper-like'; | |||
that's a compile-time error, not run-time | |||
jnthn | The test is geordie like! | ||
TimToady | so would need eval_dies_okay | ||
KyleHa | TimToady: Oh, good catch. Thanks. I'll fix that. | 22:13 | |
masak | jnthn: (in Mandarin, 对 is pronounced DUI4. it's a preposition ('opposite', 'towards'), but alone in a phrase it means 'correct'.) | ||
jnthn | masak: Ah, OK. | ||
TimToady | hmm "opposite" as in "facing", I imagine | ||
jnthn | Learning Mandarin would be really cool. | 22:14 | |
TimToady | since facing can mean both of those things, more or less | ||
jnthn | I'd like to learn one(Mandarin, Korean, Japanese)...all have their attractions, but there's no way I can manage more than one of them and get anywhere beyond very basics... | ||
TimToady | how one gets from "facing" to "correct" is anyone's guess | 22:15 | |
masak | TimToady: yes, as in 'facing'. | ||
TimToady | maybe "correct" as in "facing the right way" | ||
pugs_svn | r28022 | kyle++ | fix RT #66886 test, thanks to TimToady++ | 22:16 | |
masak | possibly... | ||
TimToady | ah, more like "corresponds to" | 22:17 | |
as in "that answer corresponds to the question" | |||
masak | ah, of course. | ||
I should have known that. :) | |||
TimToady | tit for tat, this answers that | ||
masak | also, this is a good time to say "对了" :) | ||
meaning 'yes, now you got it right' :) | 22:18 | ||
TimToady | I first read that as "oppositional child", but it's not child | ||
masak | no, it's a statement-ending particle. | ||
jnthn | lol | 22:19 | |
Gah, I'm going to do the traits on containers refactor...another day. | |||
masak should sleep | 22:20 | ||
jnthn | Actually it's probably best left until after the release anyway. | 22:21 | |
night masak | 22:23 | ||
TimToady | hmm, maybe there should be a WRONG statement prefix that tells the compiler not to complain about something it knows will blow up at run time | 22:25 | |
dies_okay WRONG { 1/0 }, ... | 22:26 | ||
masak | jnthn: 'night | ||
KyleHa | The test suite seems to have had a much greater focus on death lately. | ||
masak | TimToady: sounds like something better suited for a module. | 22:27 | |
22:27
masak left
|
|||
TimToady | well, it has to instruct the compiler at compile time somehow; run time is too late | 22:28 | |
and there are lots of spots that assume 1/0 won't complain till run time | |||
(I suspect) | |||
oh good, looks like they're in eval_dies_ok | 22:29 | ||
22:30
frew joined
|
|||
jnthn | The compiler can only blow up at compile time on that one, if it knows nobody has lexically defined their own infix:</> ;-) | 22:30 | |
TimToady | which is purportedly does | ||
22:30
japhb left
|
|||
KyleHa | I was going to say maybe '1' or '0' got redefined. | 22:30 | |
TimToady | *it | ||
jnthn | TimToady: Sure, if it's bothering to keep track of such things. ;-) | ||
TimToady | fact is, the constant folder should blow up | ||
pugs_svn | r28023 | lwall++ | [STD] parse #=[...] comments | 22:33 | |
22:34
nihiliad left
22:35
KyleHa left
22:36
kane__ joined
22:37
jferrero left
22:50
frederico left
22:52
frederico joined
22:56
kane__ left
|
|||
ruoso | @tell pmurias have you manage to include the smop tests in the p5 build as well? | 22:59 | |
lambdabot | Consider it noted. | ||
23:05
ihrd joined
23:06
Limbic_Region joined
|
|||
Limbic_Region | jnthn ping | 23:07 | |
23:10
drbean left
23:11
frew__ joined
23:16
aindilis joined
|
|||
TimToady | wayland76: why did you change all your :$foo parameters to $:foo? that's just wrong... | 23:20 | |
std: sub foo ($:bar) {...} | 23:21 | ||
p6eval | std 28023: OUTPUT«Potential difficulties: Illegal to use : twigil in signature at /tmp/ra5xxhLGIi line 1:------> sub foo (⏏$:bar) {...}ok 00:02 38m» | ||
jnthn | Limbic_Region: pong | 23:28 | |
23:30
bpetering joined
|
|||
sjohnson | is that buffer datatype technology? | 23:31 | |
bpetering | gooood morning #perl6! :D | 23:32 | |
sjohnson | hi | 23:33 | |
23:38
xomas_ left
23:44
perletc left
|
|||
sjohnson | how does one cope with the unhappiness of having to program 80% PHP, 15% Javascript, and 5% Perl everyday | 23:46 | |
for their job | |||
bpetering | sjohnson: i was about to ask "how goes it", but now i know. | ||
sjohnson | heheh | ||
anyone's advice would be greatly appreciated | 23:47 | ||
bpetering | sjohnson: well... | 23:48 | |
i am in a similar situation. as to how i "deal with it"... | |||
First off, I'm grateful to have a job :) | |||
Second, use libraries when possible - jQuery can make life a whole lot easier :) | 23:49 | ||
Third, PHP may not have the Tao, but it is Turing complete, so if you learn how to abstract well, you can make your own life a lot easier | 23:50 | ||
Fourth: Test. | 23:51 | ||
Early, and often. | |||
I wish I'd been exposed to Perl's testing culture before I started my current job :( | 23:52 | ||
Does that help? | 23:53 | ||
Attitude goes a long way... it took me a while to learn that. | 23:55 | ||
... and five: sneak in Perl wherever you can ;) | 23:59 | ||
23:59
payload left
|