Upgrade to YAML::Syck 0.85 before smoking | moritz.faui2k3.org/irclog/ | pugscode.org | sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse (show (scanl (*) 1 [1..] !! 4)) | "Perl 6 Today" video from YAPC::Asia: xrl.us/v6op
Set by agentzh on 1 May 2007.
TimToady @tell agentzh something seems to be wrong with the SYN links on the smokeserver. it's ending up in a directory with only S04.html and no index 00:03
lambdabot Consider it noted.
Khisanth perl6 implemented with markov chains? o_O
TimToady yeah, it's a real travesty 00:04
geoffb TimToady: did your children inherit your punning?
TimToady no, they just inherited the ability to amused by things that aren't terribly amusing. :) 00:06
s/to/to be/
wolverian does Perl6::Perldoc tell perldoc(1) how to read perl6docs?
I guess not. :)
TimToady unlikely
00:40 justatheory joined 00:45 dmpk2k joined 00:51 geoffb joined
avar wolverian: no 01:04
01:18 [particle] joined 01:36 revdiablo joined 01:37 SubStack joined 01:44 DarkWolf84 is now known as DW-Chidori, DW-Chidori is now known as DarkWolf84
DarkWolf84 oops wrong server 01:45
rhr TimToady: proposal for EntangledIO objects: .getc/.iterate use the read side, .print/.say/.printf use the write side, .shutdown unentangles, .fileno returns a disjunction 02:08
does that cover all the important stuff?
it still seems to me that whatever Pipe.fork returns needs to bool-ify in the expected way for parent/child 02:09
I guess the question is whether it should return a Proc obj for the child, or if there's another way to get that if you really need it 02:17
hmm, I see in p5 the child's read side is hooked up to stdin, I assume $*DEFIN could be used for that? 02:19
another crazy idea: instead of ungetc, how about Str IO.peek(Int $nchars = 1) 02:34
dduncan what does $nchars mean in this case? what is a char? 03:00
rhr current unicode level etc. 03:02
dduncan from what I understand, it doesn't make sense to talk about individual chars in Perl 6, it only makes sense to talk about character strings
rhr graphemes by default, I believe 03:03
a "char" can be a byte, codepoint, grapheme or lang-dependent char 03:05
dduncan yes, so saying "get a single char" doesn't make sense by itself 03:06
03:06 mako132_ joined
dduncan you need to say "get 1 graph or one codepoint or whatever 03:06
if that is possible
rhr sure it does, it's defined by the program's current unicode abstraction level
which defaults to graphs 03:07
dduncan but on the other hand there is no routine to just get the length of a string at the current abstraction level, one must say .graphs or whatever ... or maybe that's not true?
looking ... 03:08
rhr I'm assuming it picks n of whatever the current unicode level specifies
dduncan looking at synopsis 3, there is a .chars in an example 03:09
rhr getc has to do the same thing
dduncan well, if get/put can do a character at a time, I would expect a .chars to exist for parity, and it does
no matter, on to other things ... 03:10
rhr getc and peek should probably take an option to do something other than the current default char, though 03:21
in fact, it would be cool if getc took an $nchars arg, it would remove much of the need for sysread 03:22
03:36 drupek12 joined 03:53 amnesiac joined 04:07 torz joined 04:11 obvio171 joined 04:25 CindyLin1 joined, scw_ joined 04:29 autin joined 04:41 dolmans joined
svnbot6 r16181 | Darren_Duncan++ | ext/QDRDBMS/ : added or large-updated docs sections in SeeAlso.pod, README, Copying.pod 04:46
04:56 drupek12 joined 05:33 rfordinal joined 05:40 agentzh joined
agentzh feather is so slooooow :( 05:45
lambdabot agentzh: You have 1 new message. '/msg lambdabot @messages' to read it.
agentzh TimToady: fixing
05:47 devogon joined 05:57 marmic joined
svnbot6 r16182 | Darren_Duncan++ | ext/QDRDBMS/ : added QDRDBMS::Engine::Role* roles to QDRDBMS.pm, updated Example.pm to compose them 06:07
06:11 buetow joined
svnbot6 r16183 | agentz++ | smartlinks.pl - made Perl6::Perldoc a soft dependency so as to fix the SYN links on the smokeserv (diakopter++ didn't do it quite right :)) 06:11
r16184 | agentz++ | docs/feather/script/contab.txt - now autosmoke starts at 22:32 (feather localtime) 06:17
06:17 ozo joined 06:18 Alias_ joined 06:19 Psyche^ joined, Psyche^ is now known as Patterner 06:23 devogon joined, Phocean_ joined
agentzh Hmm, i think only iblech++ can actually fix the SYN links on the smoke server. I don't have shell access :( 06:32
already fire off an email to him. 06:33
*fired
& 06:34
06:34 agentzh left 06:41 polettix joined 06:44 SubStack joined
svnbot6 r16185 | moritz++ | [irclog] added simple recognition of anchors in URLs, minor template change 06:50
06:57 elmex joined 07:05 geoffb joined 07:14 theorb joined 07:16 iblechbot joined 07:22 jisom joined 07:26 pbuetow joined
rhr @tell TimToady was thinking out loud about IO stuff moritz.faui2k3.org/irclog/out.pl?ch...-04#id_l21 07:29
lambdabot Consider it noted.
07:30 BooK joined 07:44 demq joined 07:50 REPLeffect joined 07:56 dduncan left 08:21 Phocean_ joined
svnbot6 r16186 | moritz++ | [irclog] now spaces are inserted into long URLs. This should fix most problems 08:33
r16186 | moritz++ | with too long lines.
08:35 dolmans joined 08:37 offby1` joined 08:56 andara joined 09:03 toshinori joined 09:12 obvio171 joined 09:19 the_dormant joined 09:25 rindolf joined 09:30 obvio171 joined 09:46 IllvilJa joined
rindolf Hi all. 09:47
moritz hi rindolf ;)
09:47 IllvilJa joined
rindolf moritz: hi. 09:47
moritz: I'm about to lunch.
moritz: and am listening to "The Ultimate Showdown of Ultimate Destiny"
moritz rindolf: sounds... final ;) 09:48
or umltimate ;)
rindolf moritz: it's very funny.
09:49 obvio171 joined
rindolf moritz: www.flashportal.com/movies/the_ulti...wdown.html and www.albinoblacksheep.com/audio/showdown 09:50
lambdabot Title: The Ultimate Showdown
moritz rindolf: *downloading* 09:52
09:53 ruoso joined 09:57 penk joined
rindolf moritz: OK. :-) 09:57
09:59 riffraff joined
riffraff mh.. logs are unreadable at the moment: an't read configuration in cgi.conf: No such file or directory 10:01
at /data/www/moritz.faui2k3.org/irclog/out.pl line 22
10:01 obvio171 joined
moritz damned 10:02
riffraff: thanks
riffraff thank _you_
moritz works again 10:03
10:08 franck__ joined 10:09 obvio171 joined
riffraff yep, abusing it :) 10:10
moritz
.oO(riffraff abuses websites ;)
10:12
riffraff ehe 10:13
is there some intelligent web interface to svn.pugscode? Basically I'm thinking of trac, but in general anything that would allow me to see what where the commits would be cool, withoith the need to fire up svn 10:14
moritz riffraff: there should be a track interface, but it seems to be disabled :( 10:15
s/track/Trac/
riffraff: that's where the r\d+ link to 10:16
riffraff the what? 10:17
10:18 obvio171 joined
riffraff I can0't see the link to revisions 10:18
moritz I'm talking about links like this: moritz.faui2k3.org/irclog/out.pl?ch...rl6#id_l55 10:19
lambdabot Title: IRC log for #perl6
moritz the r16181 should be a link 10:20
and for me it is ;)
but apparently feather has problems with load, and therefore trac was disabled - or something
riffraff ah ok 10:21
I was thinking of the one in svn.pugscode.org
10:30 obvio171 joined 10:35 obvio171 joined 10:36 lichtkind joined 10:40 obvio171 joined 10:44 rfordinal_ joined, obvio171 joined
rindolf Hi moritz, riffraff 10:47
moritz hi rindolf ;)
10:48 obvio171 joined
riffraff hei rindolf 10:48
rindolf moritz: what's up?
moritz: have you listened to the "Ultimate Showdown" song? 10:49
moritz rindolf: yes I did, but not very intently
rindolf moritz: ah OK. 10:50
riffraff "this is the ultimate showdown/of ultimate destiny" ?
rindolf moritz: I'm now listening to www.youtube.com/watch?v=JdxkVQy7QLM
moritz: it's hilarious.
riffraff: yes, I love it.
riffraff it is very funny :)
moritz starts clive
rindolf moritz: you can use youtube-dl 10:51
riffraff it is in my top 3 videos found on internet otgether with "everyone else has had more sex then me" & "the internet is for porn"
rindolf riffraff: "more sex than me" rather than "more sex then me" 10:52
riffraff yep, of course
rindolf riffraff: common mistake.
10:53 obvio171 joined
moritz rindolf: that's quite cool ;) 10:53
that youtube video
rindolf moritz: yes. :-)
riffraff: see the "Pachelbel's Rant" 10:54
riffraff: have you seen the "Writing Perl using Vista's Voice Recognition"?
riffraff no. I want it 10:55
please :)
rindolf riffraff: www.youtube.com/watch?v=KyLqUf4cdwc
10:58 obvio171 joined 11:01 chris2 joined 11:04 obvio171 joined
moritz rindolf: nice ;) 11:09
11:09 IllvilJa is now known as IllvilJaLunch
rindolf moritz: I'm glad you like it. 11:10
11:10 fglock joined
rindolf moritz: some other funny videos are the Klein-Four Group: www.kleinfour.com/ 11:10
lambdabot Title: The Klein Four Group 11:11
rindolf I like "Finite Simple Group of Order Two" and "Just the Four Us".
moritz _hates_ flash 11:13
rindolf moritz: they also have a plain-HTML site.
moritz: but I share your sentiments regarding Flash. 11:14
moritz: although I like it on Flickr.
moritz rindolf: ... which is not updated anymore, since 2005 or something...
rindolf moritz: it's still OK.
moritz: for getting the videos.
moritz rindolf: ok, I'll try that one 11:15
rindolf moritz: www.youtube.com/watch?v=CCThtUg2zBc 11:16
Hmmm... there seems to be a problem with my connection lately.
moritz rindolf: together we are incredible in hijacking irc channels ;) 11:21
rindolf moritz: yes.
Welcome to #funny-videos
Hmmm... #humour is not taken yet. 11:22
Maybe #humor
11:22 TimToady joined
moritz maybe #perl6 11:22
rindolf Hi TimToady 11:23
fglock I've got a problem with PERL6LIB x PERL5LIB, 11:26
PCR-in-p6 needs a perl5 file,
how do I organize the distro in order to have p5 code installed in the right place? 11:27
assuming I'm using ext/
moritz fglock: perl5/ ? 11:28
fglock do I have to split the module in two?
s/module/distro/
otoh, I think I'll upload it all to perl5/ 11:29
11:30 renormalist joined
fglock hmm - this would be ok for v6.pm, but not for pugs 11:30
renormalist fglock: I'm a bit behind in understanding the mp6/kp6 projects but I want to write some words about it as part of a pugs article. Can u suggest some docs or readme or else, which explains the project? 11:43
damn :) 11:44
moritz renormalist: you are german, right? 11:46
renormalist: as a start I wrote something here: perl-6.de/kp6
lambdabot Title: Perl 6 - kp6 - Perl 6-Compiler in Perl 6
renormalist yes 11:47
ah, nice, I will have a look
ok, I've read it 11:50
when mp6 is written in mp6, does it need another perl6, eg. the haskell based pugs for a first biitstrap step? 11:51
bootstrap
avar it's self-hosting 11:52
moritz no, therese a perl5 version as well
avar which means that you have a p6 compiler parse it and it emits p5 code that can parse itself again
p5 can then be replaced by whatever, pir, python, ..
moritz so atm only p5 really works (at least that's the last thing fglock said on that topic) 11:53
s/so/though/
avar yep 11:54
but if you look at the emitter for p5 and compare it to say pir you'll see that it's very easy-ish to write a new emitter
moritz looks 11:55
renormalist so, is the p5 variant of mp6 the omnipresent v6-alpha? or do I intermix yet another thing here? 11:56
moritz renormalist: that's something different....
renormalist: if you use 'use v6;' in a perl5 program a source filter will be called... 11:57
renormalist: and that one tries to execute perl6 code
renormalist: that's this module: search.cpan.org/~fglock/v6-alpha-0.016/lib/v6.pm
lambdabot Title: v6 - An experimental Perl 6 implementation - search.cpan.org
renormalist moritz: But it's also from fglock and looks similar in what it doesm therefore I thought it
moritz renormalist: it's from fglock, sure... but afaict it's rather an interepreter than a compiler 11:58
renormalist moritz: is the v6-alpha still also a relevant project or is it some kind of deprecated experiment 11:59
?
rindolf Hi avar
avar: still in Iceland?
moritz renormalist: afaict it's still maintained and a bit developed, but it's not aimed to be a full featured p6 implementation
renormalist ok, I understand a bit more. so back to mp6 :-), if mp6 is selfhosting, how is the bootstrap chain started? with the p5 variant? so is the chain mp6-in-p5 ... mp6 ... kp6 ? 12:03
moritz right 12:04
renormalist ok 12:05
and what's each projects goal? mp6 seems "only" to be the helper for kp6. right so far? 12:06
kp6 doesn't want to be a full perl6 (at least it's name implies this), so what's it's goal? a bootstrap step for yet another perl6 implementation? the final one? 12:07
moritz I think so, yes 12:08
but last I heard fglock was still unsure what to do with kp6 12:09
another option would be to incorporate STD.pm in kp6's parsing
12:13 do7 joined
renormalist ok, thx so far, I understand a bit more about it 12:16
12:21 obvio171 joined
moritz yw 12:21
avar rindolf: yes 12:37
12:38 obvio171 joined 12:40 franck__ joined 12:41 polettix joined, obvio171 joined 12:44 yumiko joined 12:51 IllvilJaLunch is now known as IllvilJa, dolmans joined, iblechbot joined 12:52 obvio171 joined
rindolf avar: what's up? 12:53
avar: I saw your email to p5p about %+ and %-
avar ook
rindolf: and? 12:58
12:58 the_dormant joined
riffraff someone knows the number of people with commit bit for pugs? 13:01
moritz looking up... 13:02
integral 314 accoridng to the htpasswd
moritz but less than 220 in AUTHORS 13:03
riffraff thanks
moritz which means that many are probably inactive
integral either way, it's pretty impressive
moritz yes ;)
riffraff or that people are shy and don't add themselve to AUTHORS 13:04
integral likes using AUTHORS as a UTF-8 test
riffraff lol 13:08
btw I should add myself to AUTHORS now, yay 13:09
moritz of course you should ;) 13:10
13:10 obvio171 joined 13:12 Khisanth joined
svnbot6 r16187 | gabriele++ | I'm an AUTHOR too 13:12
moritz all('riffraff'|'gabriele')++ 13:14
riffraff :) 13:19
13:24 offby1` is now known as offby1 13:46 [particle] joined, yves joined 13:53 vel joined 13:59 rlb3_work joined, zamolxes joined 14:00 turrepurre joined 14:06 rfordinal_ is now known as rfordinal 14:17 bonesss joined 14:27 amnesiac joined 14:30 the_dormant joined 14:41 jerrylee joined, IllvilJa joined 15:06 bonesss is now known as bonesss`out 15:10 dmq joined, scsibug` joined, audreyt joined, toshinori joined 15:15 catch23 joined, CindyLinz joined, zamolxes joined, rhr joined, spinclad joined, BooK joined, revdiablo joined
yumiko /msg nickserv set unfiltered on 15:30
space included :(
moritz Spaces kill ;) 15:33
TimToady space, the final frontier
lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
TimToady rhr: I still don't think it makes much sense to put .fork under Pipe 15:50
but yes, fork should return a Proc object
as for getc, it's a bit problematic
most people want it for single character input from the terminal, but it historically doesn't do that
and, in fact, it won't work well for single character input if we have to wait to see whether we have a complete grapheme 15:51
just because we see an 'a' doesn't mean the next codepoint won't put an accent on it.
the current length of a string under the default unicode level is always .chars 15:52
which always means the most abstract chars allowed in the current scope
peek is not as powerful an interface as unget 15:53
because you can unget things that were never there in the first place
and a peek interface forces you to keep the "next token" in the IO stream rather than in a conveniently typed variable
reading N bytes is not the same as sysread, because sysread explicitly has no buffering, while normal input tends to use stdio buffers 15:55
if we did unify the ideas, we'd have to attach the buffering to the handle as an attribute; but that's probably a good idea anyway, and then we can throw out the sysread/syswrite variants entirely 15:56
basically, to the first approximation, a binary handle works only with Buf and uses "sys" semantics, while a text handle always works in terms of Str, and assumes buffering 16:01
the upshot of which is that you really can't do character-by-character input from the terminal with Str, you have to use Buf and be ready to modify the previously input character. 16:02
otherwise you can't recognize a keypress till the next one comes in 16:03
16:06 kanru joined
TimToady j 16:12
j, the final frontier
bbl &
16:22 justatheory joined 16:31 torz joined 16:35 bernhard joined 16:37 VanilleBert joined 16:45 bonesss`out is now known as bonesss 16:49 franck__ joined
TimToady @tell agentzh the other problem I noticed is that the build_info line is excessively long, with embedded \n sequences that could probably be turned into <br> at some point 17:13
lambdabot Consider it noted.
17:13 rindolf joined 17:14 VanilleBert left 17:18 IllvilJa joined, SubStack joined 17:22 fglock joined 17:23 andara left 17:31 ircmiks joined 17:35 Psyche^ joined 17:36 buetow joined 17:43 Psyche^ is now known as Patterner 17:52 ircmiks left 17:57 veritos joined 18:11 dakkar joined 18:34 dduncan joined 18:39 tewk joined 18:52 qmole joined 18:55 pack|pizza joined 18:57 jisom joined 18:58 theorbtwo joined 19:04 franck__ joined
rhr TimToady: re: Pipe.fork, I wasn't suggesting it as a replacement for the general fork, just p5's open "|-" 19:31
maybe a better way would be the ability to hand an async closure to an IO object and have it installed as a filter 19:32
$io.filter(async { for =<> { s/foo/bar/; .print; } }) 19:33
and if you need something else, DIY a la C
qmole hah that's beautiful
i love async in perl6 19:34
rhr :)
[particle] async io is like continuations, yes? 19:36
rhr re: getc etc. I only ever used p5 sysread to process files on disk in fixed-size chunks, the lack of buffering is more an annoyance than a feature
and the partial graph problem doesn't arise there. but for tty/pipes/sockets... io is hard, let's go shopping 19:37
[particle] couldn't you use read with $/ = \some_integer_constant to get fixed-size with buffering? 19:38
PerlJam [particle]: still can in perl5
[particle] yeah, that's what i meant.... no reason to use sysread in that case
rhr didn't think of that
[particle] it might be worth looking at parrot's io pdd, but for the most part it's mum on async stuff still 19:39
...presumably it's waiting for a perl 6 spec :) 19:40
rhr I never knew $/ could do that, that's interesting 19:41
[particle] i've used it more than a few times
rhr still not sure how that should work in p6
[particle] here's parrot's docs: www.parrotcode.org/docs/pdd/pdd22_io.html 19:43
lambdabot Title: Document parrot's I/O subsystem - parrotcode:
rindolf Hi all.
Can you guys help fill this - perl.net.au/wiki/List_of_all_known_Perl_Wikis 19:44
lambdabot Title: List of all known Perl Wikis - PerlNet
qmole woah. i didnt know that about $/ either
rhr was it always like that? It was several years ago that I used sysread for that 19:46
PerlJam great! we're teaching people about perl5 just in time for its obsolescence ;-)
[particle] since 5.005_03 as far as i knew
PerlJam rhr: not *always*, but for many years now.
19:46 araujo joined
qmole heh 19:46
rhr I just missed it then
19:53 benny joined
dduncan question: does Pugs currently support macros, or certain kinds of lexical aliasing that can make a constructor look like a function? ... I'll give a specific example of what I desire ... 20:20
essentially, I have a class named Foo::Bar::Baz , and I want to have something that looks like an exportable subroutine named Baz with identical parameters which simply invokes the constructor 20:21
eg, sub Baz { return Foo::Bar::Baz(); } 20:22
geoffb dduncan: Text replacement macros currently work in pugs
dduncan the only reason for the sub to exist is to allow user code more brevity
geoffb Or at least, they did a couple hundred revs ago. :-)
dduncan but I'd prefer to save that performance hit of an extra routine call, when this is really just syntactic sugar 20:23
geoffb ?eval macro blurg { 'say' } blurg "foo";
20:23 evalbot_r16171 is now known as evalbot_r16187
evalbot_r16187 OUTPUT[ā¤] Bool::True 20:23
geoffb hmm, I clearly have forgotten the right syntax
dduncan the key thing is that we need to be able to pass arbitrary arguments, and I get the impression the existing version won't work for that
mind you, this request is purely performance oriented, and it could be substituted in later 20:24
meanwhile I'll just do actual subs, or have done that
geoffb ?eval macro smurf($bar) { say $bar } smurf("smurfy!")
evalbot_r16187 OUTPUT[smurfy!ā¤] Error: ā¤Unexpected end of inputā¤expecting ":"ā¤Macro did not return an AST, a Str or a Code!
geoffb ?eval macro smurf($bar) { 'say $bar' } smurf("smurfy!") 20:25
dduncan see ext/QDRDBMS/lib/QDRDBMS/AST.pm as an example of where I'd want to do this
evalbot_r16187 OUTPUT[ā¤] Bool::True
geoffb ?eval macro smurf($bar) { 'say "$bar"' } smurf("smurfy!")
evalbot_r16187 OUTPUT[ā¤] Bool::True
geoffb grrr
?eval macro smurf($bar) { return 'say "$bar"' } smurf("smurfy!")
evalbot_r16187 OUTPUT[ā¤] Bool::True
theorbtwo ?eval macro thundercat($foo) { "say '$foo'" } thundercat("roar!")
evalbot_r16187 OUTPUT[roar!ā¤] Bool::True
dduncan in fact, I don't necessarily even need a macro, just an alias ... 20:26
geoffb OK, what the heck did I have wrong
Tene ?eval macro bleh($bar) { return q:code { say $bar } }; bleh('foo')
evalbot_r16187 OUTPUT[ā¤] Bool::True
[particle] you need to evaluate it, right?
theorbtwo You returned 'say "$bar"'. I don't know why it didn't complaign that $bar isn't defined later.
dduncan eg, if it were possible to say Baz ::= Foo::Bar::Baz.new
then that's all I really need, as the params are identical 20:27
geoffb theorbtwo: oh, duh. Sigh.
But yes, it would have been obvious what was wrong with a proper error message
20:44 Aankhen`` joined 20:47 larsen_ joined
fglock ?eval macro smurf($bar) { 'say "\$bar"' } smurf("smurfy!") # interpolate at run-time 20:48
evalbot_r16187 OUTPUT[$barā¤] Bool::True
fglock oops :) 20:49
?eval macro smurf($bar) { 'say "' ~ $bar ~ '"' } smurf("smurfy!") 20:50
evalbot_r16187 OUTPUT[smurfy!ā¤] Bool::True
svnbot6 r16188 | Darren_Duncan++ | ext/QDRDBMS/ : updated the INTERFACE pod of AST.pm, QDRDBMS.pm 21:02
21:13 qmole joined
svnbot6 r16189 | rhr++ | Add fdopen to IO.pod (stolen from parrot) 21:13
21:26 namenlos joined 21:29 franck__ joined, kanru joined, dduncan joined 21:32 stevan_ joined 21:34 stevan_ joined 21:47 SubStack joined 21:49 nperez joined 21:57 scsibug`` joined, rhr joined, JarJarBinks joined, Psyche^ joined, audreyt joined, Psyche^ is now known as Patterner, nperez joined, cognominal joined, toshinori joined, mj41 joined, amnesiac joined, catch23 joined 21:58 geoffb joined, edenc joined, ofer joined, bonesss joined 22:17 Grrrr joined, clkao joined, lidden joined, idiotmax joined, bas joined, wilx joined 22:22 electrogeek joined, larsen_ joined 22:25 lichtkind joined 22:26 CindyLin1 joined, dmq joined, catch23_ joined, rhr joined, autark joined, cognominal joined, toshinori joined, ofer joined, scsibug`` joined, geoffb joined, charsbar joined, bonesss joined, araujo joined, kanru joined, penk joined 22:41 polettix joined 22:45 explorer joined 22:48 lumi joined 22:54 edenc joined 22:58 SubStack joined 23:18 geoffb joined 23:19 geoffb joined
dduncan question: which is a preferred routine signature format: "foo of Bar (...)" or "foo (... --> Bar)" ? 23:19
[particle] i prefer 'of', but maybe grep t/ ? 23:20
Tene prefers 'of', but both are valid.
dduncan I have been using 'of' so far, but am considering changing all my code to use the --> form instead 23:22
[particle] --> seems too haskelly to me
dduncan do you know if they have the same semantics? 23:23
[particle] i believe they're equivalent
i can't think of a case offhand where they're different 23:24
dduncan from what I got out of S02, that is so
23:24 geoffb_ joined
dduncan that --> is another way of saying 'of', and that the caller pays attention to it 23:24
TimToady --> is the "of" type, but I prefer "my Bar foo (...)"
[particle] will the real geoffb please stand up?
geoffb_ raises his hand
dduncan oh yes, there is that option too
TimToady sort of the C option...
dduncan I notice that the Synopsis use a variety of forms, but in my scanning, the --> seems to be the most commonly used there 23:25
TimToady actually, I like the --> too
[particle] i think it should point the other way
TimToady I don't like my foo of Bar (...), in fact I didn't realize it was legal. :)
geoffb_ [particle]: were you trying to reach me?
dduncan so it sounds like 'of' is the least of the 3 favorites
TimToady but maybe I'm just not used to it.
[particle] geoffb_: the signoff message said nick collision
geoffb_ Sigh 23:26
TimToady I like the fact that --> inside the (...) implies it's officially part of the sig
[particle] i like my Bar foo better than foo of Bar
geoffb_ I need to come up with a new nick
dduncan that's why I'm thinking of movint to -->
geoffb_ I just like my nick to be short but transparent
[particle] i_am_geoff
:) 23:27
geoffb_ chuckles
Yaakov begoff?
23:27 geoffb_ is now known as i_am_geoffb_here
i_am_geoffb_here awww, it truncated it 23:28
23:28 i_am_geoffb_here is now known as effeff
dduncan separately, I'm having trouble finding the part in the synopsis where it says how to make a method signature that says an argument or return type is the same type as the invocant object ... eg, something like $?CLASS but not that 23:28
[particle] timtoady (Bar <-- Int $foo) looks better to me... it looks more like returns 23:29
23:29 effeff is now known as geoff_japh
dduncan personally, I like having the return type next to the routine name 23:30
[particle] but that's probably my c bias: Bar my_sub(int foo)
geoff_japh hmm, this might work
dduncan as I prefer to name conversion functions as foo_from_bar rather than bar_from_to
then the 'from' and 'to' ends are next to what they describe
if <-- could be made to work in signatures, or does work, as an alternative to -->, I would probably use it 23:31
23:31 geoff_japh is now known as geoffb_japh
geoffb_japh or heck, just extend the old nick ... 23:31
[particle] it doesn't work now
geoffb_japh: :)
Yaakov geoffb_japh: geophb?
geoffb_japh japhb? 23:32
[particle] jageoffb
geoffb_japh LOL
dduncan eg, I think it is easy to understand if we say: sub Foo Foo_from_Bar (Bar $arg) { ... }
[particle] how do you do anon subs returning Foo?
dduncan sub Foo {...} 23:33
[particle] ...and taking args
dduncan or sub Foo (...) {...}
[particle] yeah, hrmm
dduncan or you can use -> rather than sub
[particle] it means Foo_from_Bar must be next to (...) though, no ws
Foo_from_Bar(...) # legal
geoffb_japh [particle]: I think that works best with the in-signature syntax: sub (Int $a, Int $b --> Int) { ... }
[particle] but that's true now
dduncan that's for invocation
I'm referring to how to declare 23:34
[particle] i don't think you can declare a sub foo (...) {...}, i think you must have foo(...)
but maybe i'm wrong
dduncan so to invoke, it looks easy to understand to have my Foo $foo = Foo_from_Bar( $bar ); 23:35
geoffb_japh OK, it's down to geoffb_japh, japhb, and ja_geoffb ... anyone care to vote (not that the vote is binding, I'm just curious)?
[particle] i'm biased toward the third
geoffb_japh I kinda like the punniness of the second one, myself 23:36
[particle] go for it! 23:37
23:37 geoffb_japh is now known as japhb 23:40 mr_ank joined
TimToady dduncan: sub (::T $a, T $b --> T) is how you capture a type 'en passant' 23:43
dduncan yes, but that isn't what I wanted to know in this case 23:44
I will give an example ...
23:45 explorer left, kunwon joined
TimToady S06:1170 is the spot 23:46
dduncan instead of "class Foo { method equal (Foo $other --> Bool) {...} }", I want to say something like "class Foo { method equal (::T $other --> Bool) {...} }"
then I can use that same method unchanged in a varieity of classes 23:47
the question is what to say instead of ::T
TimToady method equal (::T $self, T $other --> Bool)
method equal (::T $self: T $other --> Bool)
rather
dduncan oh, so the ::T is like capturing the current type?
TimToady yes, that is the current notation for that within a sig 23:48
dduncan okay, and actually that looks more generic than what I asked for, which is useful
thank you
then it works for subroutines too where there is no current class
TimToady see S06:1170 23:49
dduncan doing that ...
23:52 zzz_reaper joined 23:59 awwaiid joined