Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-05-04

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

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

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

Perl 6 | Reference Documentation | Rakudo