Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-07-26

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:00 hoelzro yes!
00:00 hoelzro I fixed up Perl6::Compiler so that you can work with an instance now
00:04 hoelzro oh wait, no I didn't =(
00:04 hoelzro that damn BUILD issue
00:18 hoelzro ok, "now" it's fixed =)
00:30 hoelzro is adding Any to the list of Perl6::Compiler's parents an acceptable solution to the BUILD problem, or do we need to come up with a better way to subclass Parrot classes into Perl6?
00:34 pugs_svn r27740 | lwall++ | [p6-proj] embolden intro text, tighten up writing a bit to fit
00:36 razzle joined #perl6
00:39 jauaor joined #perl6
00:42 jauaor joined #perl6
00:44 hoelzro is the Perl6 grammar available as a BNF somewhere?
00:47 dalek grok: 6242550 | (Hinrik Örn Sigurðsson)++ |  (3 files):
00:47 dalek grok: Add =encoding directives where needed
00:47 dalek grok: review: http://github.com/hinrik/grok/commit/62​42550062e14c519980c0f1c74197dc14d30b21
00:47 dalek grok: 36f0f99 | (Hinrik Örn Sigurðsson)++ |  (9 files):
00:47 dalek grok: Bump version to 0.17
00:47 dalek grok: review: http://github.com/hinrik/grok/commit/36​f0f9941dd6ff93664653a0c6e52564eb619b45
00:52 bpetering hoelzro: i'm no expert, but i doubt it... the spec isn't really "complete" yet, so the grammar, which is being written in Perl 6, isn't finished
00:53 hoelzro bpetering: mkay
00:53 bpetering ... so subsequest conversion to BNF (*if* that's even possible) isn't done
00:55 araujo hello all
00:55 * araujo wonders if anyone knows a decent and cheap domain registrant here
00:58 hoelzro pmichaud: ping
01:03 hoelzro so the Perl6 evalbot here...how safe is it?
01:09 bpetering http://svn.pugscode.org/pu​gs/misc/evalbot/evalbot.pl
01:10 TimToady Perl6 is not really parsable in pure BNF, but if yo uwant to see the current STD grammar that runs here as the std: bot, that is in pugs/src/perl6/STD.pm
01:11 orafu joined #perl6
01:11 bpetering TimToady: what do you mean by "not really parsable?"
01:11 TimToady Perl must know which identifiers are types in order to know whether to expect a term or an infix afterwards
01:12 TimToady std: say 42
01:12 p6eval std 27740: OUTPUT«ok 00:02 36m␤»
01:12 TimToady std: Int 42
01:12 p6eval std 27740: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused (two terms in a row?) at /tmp/Molly3AKJP line 1:␤------> [32mInt [33m⏏[31m42[0m␤    expecting any of:␤     bracketed infix␤  infix stopper␤    standard stopper␤ statement modifier loop␤  terminator␤FAILED 00:02 36m␤»
01:12 hoelzro TimToady: ah, ok
01:13 TimToady and some of those types may come via import, so it's not purely a syntactic decision
01:13 TimToady also, the STD grammar relies on an operator precedence parser sandwiched in the middle
01:14 TimToady it makes it easier for the user to extend the grammar without having to worry about left recursion
01:15 TimToady but other than that, it's top-down, not bottom-up
01:15 TimToady because that gives much better error messages
01:15 TimToady (in general)
01:18 bpetering so:
01:19 bpetering ident ~~ type -> infix
01:19 bpetering ident ~~ !type -> term
01:19 bpetering ?
01:19 TimToady type or other termish-value like pi
01:19 TimToady or self
01:19 bpetering (excuse the notation)
01:20 TimToady but basically, some thing expect more arguments, and some don't
01:20 TimToady std: 42 42
01:20 p6eval std 27740: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused (two terms in a row?) at /tmp/vB6EhwhCB6 line 1:␤------> [32m42 [33m⏏[31m42[0m␤    expecting any of:␤      bracketed infix␤  infix stopper␤    standard stopper␤ statement modifier loop␤  terminator␤FAILED 00:02 36m␤»
01:20 TimToady 42 doesn't expect an argument :)
01:21 bpetering so: 1. is that helpful "two terms in a row" errmsg not possible with a bottom-up parser?
01:23 nbrown joined #perl6
01:24 TimToady that's not necessarily one of the more helpful messages
01:24 TimToady but it's kind of a default
01:24 TimToady that's about the most confused that the parser can get
01:24 explorer joined #perl6
01:24 TimToady but it can be much more specific at times
01:25 TimToady std: 1,2,3 >>* 4,5,6
01:25 p6eval std 27740: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing << or >> at /tmp/OkMpRMJ5fu line 1:␤------> [32m1,2,3 >>*[33m⏏[31m 4,5,6[0m␤    expecting infix_circumfix_meta_opera​tor__S_291LtLt_GtGt␤FAILED 00:02 37m␤»
01:25 TimToady std: sub foo {
01:25 p6eval std 27740: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse block; couldn't find final '}' at /tmp/ZS3MPwof3v line 1 (EOF):␤------> [32msub foo {[33m⏏[31m<EOL>[0m␤FAILED 00:02 36m␤»
01:26 kane____ joined #perl6
01:28 bpetering those are helpful... good to say "need this, missing that" etc
01:29 TimToady std: sub ($a?, $b) {}
01:29 p6eval std 27740: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't put required parameter after optional parameters at /tmp/7ad6p5osf8 line 1:␤------> [32msub ($a?, $b[33m⏏[31m) {}[0m␤    expecting any of:␤   constraint␤       parameter␤       trait␤   whitespace␤FAILED 00:02 37m␤»
01:30 TimToady std: my $x; $x ?? $x = 42 !! $x = 43;
01:30 p6eval std 27740: OUTPUT«[31m===[0mSORRY![31m===[0m␤Assignment not allowed within ??!! at /tmp/l8fQORPobg line 1:␤------> [32mmy $x; $x ?? $x [33m⏏[31m= 42 !! $x = 43;[0m␤    expecting any of:␤       bracketed infix␤  infix or meta-infix (with precedence tighter than item assignment)␤       infix
01:30 p6eval ..stopper␤    stand…
01:31 TimToady are you getting the colors in those messages in your IRC client?
01:31 bpetering yeah
01:32 bpetering was just looking at how STD.pm does that, actually
01:32 M_o_C joined #perl6
01:33 TimToady they're just ansi colors
01:33 sjohnson how come i can't see them :(
01:33 TimToady pulled in from Cursor, which is currently implemented in Perl 5
01:34 sjohnson maybe not irc colours, that's why
01:34 TimToady what client are you using?
01:34 sjohnson weechat
01:34 TimToady you can see some of the colors at http://irclog.perlgeek.de/perl6/today
01:35 TimToady though for some reason it's missing the red on the === around SORRY!
01:35 sjohnson oh those are pretty
01:35 sjohnson 3colour 4technology
01:36 wolverian weechat does not support ansi colours, and I don't see a plugin for the dev version that would add that feature
01:36 wolverian oh well.
01:36 TimToady hmm, looks like the irc logger only knows about -----> lines
01:37 TimToady moritz_: ^^^
01:39 sjohnson wolverian: do you use or know much about weechat?
01:39 sjohnson i think it is better than irssi by a long shot
01:39 sjohnson do you use it too?
01:39 TimToady obviously not better in every respect :)
01:41 bpetering :)
01:43 sjohnson http://the-apps.org/wp-conten​t/uploads/2009/04/weechat.jpg
01:44 sjohnson well this guy doesnt have his putty utf-8 settings setup properly, but that's the idea
01:45 literal how can you tell?
01:45 literal I only see characters that fit into ASCII
01:45 sjohnson because the lines separating the nickname list and the channel speech
01:45 sjohnson have squares
01:45 sjohnson instead of utf-8 lines
01:45 literal oh
01:46 sjohnson here's half a screenshot of my irc client through putty
01:46 sjohnson http://members.shaw.ca/smujohnso​n/img/screenshots/wb_example.png
01:47 sjohnson the reason it's half, is because i was only trying to illustrate the red box i made with MSPAINT to someone
01:47 sjohnson ( `ー´)
01:48 literal now, I wonder why the same Unicode vertical line isn't used next to the nicknames
01:48 literal as in xchat
01:48 sjohnson ugh, i tried xchat a few years back
01:48 sjohnson maybe it's improved
01:49 sjohnson but there were a good handful of things i didn't like too much
01:51 sjohnson here, i'll take a screenshot for ye of this chat
01:51 sjohnson i like how weechat behaves like this by default
01:51 sjohnson instead of irssi, which would take me hours to configure to my liking
01:52 sjohnson literal: http://members.shaw.ca/smujohnson/img/s​creenshots/weechat-literal-example.png
01:55 sjohnson please acknowledge that you have indeed seen said photo
01:55 sjohnson so i can take it off
01:55 sjohnson ( `ー´)
02:16 pugs_svn r27741 | kyle++ | [t/spec] fudge the RT #67888 test
02:27 pugs_svn r27742 | kyle++ | [t/spec] Test for RT #67818
02:35 tann_ joined #perl6
02:44 kane___ joined #perl6
02:48 bpetering rakudo: my $c = eval 'say "foo"'; $c(); #!mk_sense probly
02:49 p6eval rakudo 240b98: OUTPUT«foo␤invoke() not implemented in class 'Integer'␤in Main (/tmp/9aEG1d0l7O:2)␤»
02:49 sjohnson rakudo: my $c = eval 'say "foo"'; say $c;
02:49 p6eval rakudo 240b98: OUTPUT«foo␤1␤»
02:50 sjohnson rakudo: my $c = 'eval("say \"foo\"");';  $c();
02:50 p6eval rakudo 240b98: OUTPUT«invoke() not implemented in class 'Perl6Str'␤in Main (/tmp/iZYWAkiF2O:2)␤»
02:50 bpetering ok, no bug, thanks sjohnson :)
02:51 sjohnson rakudo: my $c = 'eval("say \"foo\"");';  {$c()}.();
02:51 p6eval rakudo 240b98: OUTPUT«invoke() not implemented in class 'Perl6Str'␤in Main (/tmp/OAhBVgzbY9:2)␤»
02:51 sjohnson bpetering: :)
02:57 hoelzro it's not hooked up to Rakudo just yet, but I'd say it's coming along: http://hoelzro.net/try-rakudo/
02:59 hoelzro thoughts?
02:59 pugs_svn r27743 | kyle++ | [t/spec] more tests of subsets of collections
03:05 bpetering hoelzro: before looking, you'll have to think hard about security :)
03:05 hoelzro bpetering: oh, I know
03:05 hoelzro I've thought about it a lot already =)
03:05 bpetering care to share? i'm interested but haven't though about it:)
03:06 bpetering s/.../thought/
03:06 hoelzro I was thinking of running forked-off interpreters in a chroot environment, with an rlimit for CPU usage set and compiled from a modified Parrot/Rakudo with limited opcodes and objects.
03:06 hoelzro I'd also set up a memory limit
03:06 hoelzro how's that grab ya?
03:07 bpetering hoelzro: how do you limit the opcodes and objects?
03:07 hoelzro bpetering: by removing them from Parrot and Rakudo =P
03:08 bpetering what if it's possible to patch them back in?
03:08 bpetering i.e., when do you stop removing features? :)
03:08 hoelzro bpetering: how do you mean?
03:08 hoelzro ah
03:08 hoelzro I figured remove all I/O and OS interaction
03:08 hoelzro that's a start
03:09 bpetering keeping STDOUT would be nice :)
03:09 hoelzro the standard file handle opcodes will be implemented as in-memory streams, so their output can be channeled into the CGI's output
03:10 bpetering doing "Try Rakudo" might not be too hard, because it's impl on top of rakudo...
03:10 bpetering (for some defn of 'too hard' :-)
03:10 bpetering err, "top of Parrot"
03:11 bpetering ie, i'd imagine it'd be easier to remove functionality from Parrot than, say, Perl 5
03:11 hoelzro agreed
03:11 hoelzro how's my security model sound, though?
03:11 hoelzro pretty tight, or did I miss something?
03:12 bpetering gimme a few minutes ;)
03:12 hoelzro and also, how's the look and feel for the app?
03:12 bpetering similar to "Try Ruby" ;)
03:12 hoelzro I'm trying to nail that down first
03:12 bpetering but that's intentional, no?
03:12 hoelzro bpetering: strangely enough, I've never even used Try Ruby =P
03:13 hoelzro I was just thinking "hmm, command line + file-like + upload file...sounds like a job for a tabbed interface"
03:13 bpetering well, TR's not tabbed, but it looks strangely similar
03:13 bpetering http://tryruby.hobix.com/
03:14 hoelzro damn, I like that flashing cursor.
03:14 hoelzro ah, I see
03:14 hoelzro clever.
03:15 hoelzro I could definitely take some good hints from that
03:15 bpetering if the source for that's available it might give some hints, but making said source avail is a security nono
03:15 hoelzro just the UI stuff
03:16 hoelzro I've some experience with sandboxed apps
03:16 bpetering (somewhat security nono)
03:16 hoelzro ex. I like the reset/Ctrl+D for reseting the interpreter
03:16 hoelzro if you open too many braces or something
03:18 hoelzro well, that page + my work on the server side stuff = a good start, I think
03:18 bpetering yep
03:19 bpetering security for this type of thing is usually trickier than would be nice.
03:19 bpetering some thoughts:
03:20 bpetering rakudo can do embedded PIR... might want to check how that's implemented, and make sure to remove any relevant functionality in parrot
03:20 donaldh joined #perl6
03:21 bpetering in fact, it might be a good idea to remove all "drop to other language" type stuff
03:21 bpetering certainly run() et al
03:22 hoelzro bpetering: good point about embedded PIR
03:23 hoelzro it'd be nice to keep
03:23 hoelzro but maybe I'll remove it first, and then we can decide to add it back later
03:24 bpetering don't keep.
03:24 bpetering paranoia's the name of this game. :)
03:30 bpetering parrot opcodes that look removable: enternative, loadlib, load_bytecode, open, runinterp, spawnw
03:30 bpetering (modulo what rakudo needs, ofc)
03:31 bpetering parrot opcodes that could prove tricky: open. do you want to provide 'use Module;' functionality?
03:31 bpetering set_addr: this could be nasty if accessible, see the docs:
03:32 bpetering http://docs.parrot.org/parrot/latest/html/docs/bo​ok/draft/ch10_opcode_reference.pod.html#set_addr
03:32 bpetering stuff that could contribute to DoS: sleep, sweep, trace
03:33 bpetering (turns on various debugging type stuff, not sure but could slow down VM... DoS amplifying)
03:34 molaf joined #perl6
03:34 bpetering i'd guess rakudo needs some of the first list of opcodes, so you'd have to remove functionality at at least 2 points - Parrot ops, and somewhere in Rakudo
03:35 hoelzro bpetering: I say throw way 'use' for now
03:35 bpetering (right now I've learnt more about Parrot)
03:36 bpetering hoelzro: inclined to agree, ppl can download Rakudo if they want to play with modules
03:36 hoelzro for now, it's basics: looping, manipulation of basic objects
03:36 hoelzro what would be cool
03:36 hoelzro is a sort of object inspector on the right hand side of the page
03:36 bpetering i think you'd want to show off as many Perl6 features as possible, no?
03:36 hoelzro ex. if a user types 'Foo'
03:37 hoelzro it'll print 'Foo'
03:37 bpetering hmm, the frontend for that could be fun :)
03:37 hoelzro and a method/attr list (with docs?) would be populated on the right
03:37 hoelzro I can see it now =)
03:37 bpetering docs?
03:38 bpetering that might have to wait :(
03:38 hoelzro if we can fetch the POD associated with a method
03:38 bpetering see what u4x can come up with
03:38 hoelzro waiting's fine =)
03:38 bpetering what's your timeline for this?
03:39 bpetering ie, how mature will you accept rakudo being before you make it live?
03:40 hoelzro bpetering: as soon as I finish =P
03:40 hoelzro that way, people can track new features
03:40 hoelzro however, that's a downside of removing Parrot/Rakudo features for this
03:40 hoelzro having to merge in changes =(
03:40 bpetering yep.
03:41 bpetering i'd think ppl interested in new features wouldn't need a "try rakudo"
03:41 hoelzro I guess it'll be acceptable until Parrot impls PDD 18
03:41 hoelzro bpetering: good point
03:42 bpetering IMO, a "try rakudo" would be good for a) showcasing Perl6, b) showing it's not vaporware
03:42 hoelzro bpetering: yeah
03:42 bpetering and not really anything to do with a particular impl
03:42 hoelzro then we should write a Perl6 impl that compiles to Javascript =)
03:43 bpetering honestly, i think doing a backend, with all the security, update headaches that entails, would be easier :|
03:43 hoelzro agreed.
03:43 hoelzro although I was contemplating writing a Perl6 impl that compiles to Lua bytecode
03:44 hoelzro but then I came to my senses.
03:45 bpetering a JS impl might be an interesting prototype
03:46 bpetering isn't there one around somewhere?
03:46 hoelzro I remember hearing about one once
03:47 hoelzro what was it? k6 or something?
03:47 hoelzro some not-quite-perl6 impl from like 2 years ago
03:51 bpetering so how are you going on the backend for this?
03:51 hoelzro bpetering: well, I was thinking of subclassing Perl6::Compiler
03:51 hoelzro then I found out that my $repl = Perl6::Compiler.new; $repl.interactive; didn't work
03:51 hoelzro and neither would it work for subclasses.
03:51 hoelzro so I fixed that.
03:51 hoelzro and...that's where I am
03:52 hoelzro I was thinking of writing a CGI in Perl5 that forks off children in a chroot jail
03:52 hoelzro maybe using pipes to communicate the user input and receive output?
03:54 bpetering it looks like try-ruby does something similar with irb
03:54 hoelzro it'd be nice to preserve definitions between AJAX posts, so maybe I'll store a child PID in session, with some sort of reaper to clean up unused children?
03:54 hoelzro that sounds sketchy though
03:55 bpetering i think its more than nice, it's a must
03:55 hoelzro mkay
03:55 bpetering a repl that only gives you one line is highly annoying ... :(
03:56 hoelzro bpetering: hop on #lua and try luabot =P
03:56 bpetering that reminds me: look at the source for evalbot
03:56 bpetering (shoulda thought of that earlier)
03:57 bpetering http://svn.pugscode.org/pugs/misc/evalbot/
03:57 hoelzro I saw it
03:57 bpetering that impls this
03:57 bpetering ah, ok.
03:57 hoelzro but thanks =)
03:59 justatheory joined #perl6
04:03 bpetering if you don't have epilepsy, i found this: http://redhanded.hobix.com/​bits/theHeartOfTryRuby.html
04:03 hoelzro now I know why's he's called '_why'.
04:03 bpetering hmm :)
04:06 justatheory joined #perl6
04:09 Chillance joined #perl6
04:22 bpetering hoelzro: good work with "Try Rakudo", i think it's a good idea :)
04:22 bpetering biab
04:22 alester joined #perl6
04:28 hoelzro thanks
04:29 hoelzro also, it was pmichaud's idea =)
04:37 bpetering (stolen from ruby)
04:38 bpetering but pmichaud++ regardless, a stolen idea is still an idea :)
04:43 bpetering well, not stolen if not aware
04:49 fridim_ joined #perl6
04:50 mj41_ joined #perl6
04:56 bpetering (that last bit didn't make any sense, i need sleep, see you all later :)
04:56 bpetering hoelzro: i'd like to help if i can. :)
04:56 frew_ joined #perl6
05:07 lumi_ joined #perl6
05:15 edpratomo joined #perl6
05:20 tann_ std: class C:<cpan:GSP 1.2.4>;
05:21 p6eval std 27743: OUTPUT«ok 00:02 36m␤»
05:21 tann_ rakudo: class C:<cpan:GSP 1.2>;
05:21 p6eval rakudo 240b98:  ( no output )
05:23 hoelzro joined #perl6
05:24 tann_ rakudo: no strict; say 'ok'
05:24 p6eval rakudo 240b98: OUTPUT«ok␤»
05:26 jjore joined #perl6
05:47 hoelzro joined #perl6
05:52 lumi__ joined #perl6
06:06 payload joined #perl6
06:32 diakopter joined #perl6
06:32 Aisling joined #perl6
06:32 rhr joined #perl6
06:32 cls_bsd joined #perl6
06:32 arthur-_ joined #perl6
06:32 explorer joined #perl6
06:32 antiphase joined #perl6
06:32 c1sung joined #perl6
06:32 rjh joined #perl6
06:32 xomas_ joined #perl6
06:32 shachaf joined #perl6
06:32 eternaleye joined #perl6
06:32 arejay joined #perl6
06:32 nbrown joined #perl6
06:32 TimToady joined #perl6
06:32 xomas joined #perl6
06:57 sri_kraih joined #perl6
07:20 donaldh joined #perl6
07:22 jjore So is Perl 6 supposed to be in anything qualifying as unicode or something more specific like utf8?
07:31 tann_ rakudo: for 1..9 -> $x, $y { say $x }; # fake :by(2)
07:32 p6eval rakudo 240b98: OUTPUT«1␤3␤5␤7␤StopIteration␤in Main (/tmp/oiTDwLWwkn:2)␤»
07:34 jjore I ask because recently I found from testing 5.10.1-rc0 that there's no GNU diff yet that understands http://cpansearch.perl.org/src/ADAMK/Pars​e-CPAN-Meta-1.39/t/data/utf_16_le_bom.yml
07:35 john_blue joined #perl6
07:37 jjore It fills me with doubt that it's a good idea to have unicode source.
07:43 john_blue joined #perl6
07:52 Su-Shee joined #perl6
07:52 Su-Shee good morning, future. ;)
07:52 moritz_ good morning rice dish ;-)
07:53 Su-Shee of course. you are awake.
07:53 Su-Shee moritz_: you sleep from 01:00 to 07:00? ;)
07:55 moritz_ Su-Shee: uhm, I just got up.
07:56 Su-Shee this makes me feel a little better. ;)
08:11 cognominal joined #perl6
08:16 kcwu joined #perl6
08:16 sjohnson hi!
08:16 sjohnson i'm awake too, don't forget about me
08:18 moritz_ good localtime sjohnson ;-)
08:18 sjohnson it's 1:18am here
08:19 sjohnson had a few beers and wine, now i'm at a friend's place.. too drunk to drive home
08:19 sjohnson oopsies
08:19 Su-Shee sjohnson: whenever I go into the channel in the morning: moritz is already there. whenever I go to sleep in the evening: moritz is still there. ;)
08:20 moritz_ Su-Shee: my IRC client is open 24/7 - that doesn't really mean that I'm awake.
08:21 Su-Shee moritz_: I actually just count you really saying something. ;)
08:21 sjohnson moritz_: do you use GNU screen technoogy?
08:21 sjohnson technology*
08:21 moritz_ sjohnson: yes, screen + irssi
08:21 sjohnson moritz_: http://members.shaw.ca/smujohnson/img/s​creenshots/weechat-literal-example.png
08:21 sjohnson i use weechat
08:23 * sjohnson likes weechat more
08:24 moritz_ looks decent too
08:25 Su-Shee good lord, in how many channels are you chatting?! :)
08:25 sjohnson can you show me a screenshot moritz_ ?
08:25 sjohnson i tried irssi, but it looked like it would take hours for me to set it up the way i like it
08:26 moritz_ sjohnson: just a sec...
08:26 sjohnson thanks
08:27 moritz_ sjohnson: http://moritz.faui2k3.org/tmp/irssi.png
08:27 sjohnson thats not too bad
08:28 sjohnson though that's a really small window
08:28 sjohnson is that all you need to surf the ircs?
08:28 Su-Shee mine looks pretty much the same. just different colouring.
08:28 moritz_ sjohnson: yes, that's all
08:29 sjohnson nice
08:30 Su-Shee sjohnson: irssi is a nice nobrainer-irc client, if you don't need anything fancy and "just working". but: IF you really want to do super fine grained configuration, you can have that too. ;)
08:31 moritz_ right, you can write plugins in Perl. The API is not well documented, but there are tons of examples.
08:31 * jjore is currently enjoying erc, an emacs based irc. It's surprisingly nice.
08:32 sjohnson i use weechat cause the api is well documented, and supports 5 scripting languages + C
08:32 sjohnson obviously, i would choose Perl as the language to code in
08:32 sjohnson i am writing a plugin for it in Perl actually, which is kinda neet
08:33 jjore Thought I'd like to hear what flavor of unicode perl 6 is supposed to use. Iz it utf8 or just any thing unicode?
08:36 moritz_ jjore: it abstracts away the encoding; a Str is just a Unicode string, without paying attention to the byte representation
08:36 pmurias joined #perl6
08:36 moritz_ so supporting a specific encoding (UTF-8, UTF-16LE/BE, ...) is just a matter of adding an encoding and decoding step
08:37 moritz_ and I'm sure that all the UTF-*s (perhaps except UTF-7) and all major legacy encodings (ISO-8859-*, shift-jis, ...) will be supported too
08:45 jjore Oh sorry, I meant, what is the source code supposed to be in?
08:45 moritz_ probably UTF-8, unless specified otherwise
08:46 jjore Well... yes, but if it's allowed to be otherwise, that may be a problem because stuff like diff can't handle text like http://cpansearch.perl.org/src/ADAMK/Pars​e-CPAN-Meta-1.39/t/data/utf_16_le_bom.yml
08:47 jjore and it'd be a pain and forever to not get to use diff.
08:47 moritz_ maybe diff needs to be taught about other file encodings then?
08:48 jjore Oh, I'm sure.
08:48 moritz_ anyway, the fact that UTF-8 is the default will probably encourage most people to actually use it
08:48 jjore but that seems like it'd be years into the future before it's practical because the updated diff is available enough.
08:49 jjore So the answer I was looking for was "Perl 6 is in unicode", not "Perl 6 is in utf8"
08:49 payload joined #perl6
08:50 jjore I assume being in unicode implies that all the many funny things like this example UTF-16LE that doesn't pass difftools.
08:51 payload1 joined #perl6
08:53 moritz_ producing a working compiler won't be the only challenge that Perl 6 faces
08:56 tann joined #perl6
08:56 pmurias jjore: Perl 6 shouldn't force you to use a sensible encoding
08:57 pmurias (OTOH using iso-8859-1 might be serious enough for an warnning ;)
08:59 jjore *shrug* k
09:00 jjore So fwiw, diffutils circa 200[12] is the last prod release, dev continued on into gitland until early 2008 and there's no more commits though alegedly now the git version handles multibyte encodings
09:01 jjore but doesn't handle alias's example. doesn't matter incredibly much right now but could
09:02 moritz_ (Rakudo broke the 12k tests barrier, 12027 passing)
09:03 pmurias it shouldn't be impossible to write a unicode enabled diff in perl6
09:03 lumi_ joined #perl6
09:05 jjore Oh, I'm sure its fine.
09:45 charsbar joined #perl6
09:52 payload joined #perl6
09:53 zamolxes_ joined #perl6
09:55 Front_slash joined #perl6
10:09 charsbar joined #perl6
10:12 cognominal joined #perl6
10:16 wknight8111 joined #perl6
10:41 Su-Shee left #perl6
11:00 lumi_ joined #perl6
11:10 jnthn o/
11:12 moritz_ \o
11:14 moritz_ -o-
11:14 moritz_ \o-
11:14 moritz_ |o-
11:14 moritz_ |o/
11:14 moritz_ |o| <-- Christmas
11:20 donaldh joined #perl6
11:26 Su-Shee joined #perl6
11:37 colomon Hi all... I'm still looking at that match variable in range stuff from last night.  (RT #67882,  pugs r27729)
11:38 masak joined #perl6
11:38 masak greetings, adventurers!
11:38 colomon I'm wondering if anyone has a clear notion of what happens to numeric strings passed in to the range operator.
11:38 colomon I don't see any tests for it in range.t.
11:39 masak colomon: an excellent question!
11:39 masak my guess is that they're treated as strings.
11:39 colomon I tried to write one, but I fear I'm not subtle enough yet.
11:39 masak oh, but as a test writer you need to be blunt. not subtle :)
11:40 jnthn "treated as strings" feels like the clean answer.
11:40 colomon Yeah, but you need to be subtle to figure out a test case where you can tell the difference.
11:41 colomon (That's where I'm not subtle enough.)
11:42 colomon If you do treat them like strings, then my code yesterday was wrong -- because I was expecting the match vars to be treated as numbers -- but still represents a rakudobug (because they weren't treated as strings, either).
11:43 jnthn I guess maybe infix:<..>(Num, Num) makes a numeric range, infix:<..>(Str, Str) makes a string range, and then we could define an infix:<..>(Any $f, Any $t) { infix:<..>(~$f, ~$t) } or something.
11:43 masak rakudo: my $a = "100.00"; ++$a; say $a
11:43 p6eval rakudo 240b98: OUTPUT«101.00␤»
11:43 masak hm.
11:44 masak rakudo: my $a = "-100.00"; ++$a; say $a
11:44 p6eval rakudo 240b98: OUTPUT«-101.00␤»
11:44 masak there's a difference :)
11:44 jnthn o_O
11:44 masak not that strange, actually.
11:45 colomon wait, how does that -100.00 to -101.00 make sense?
11:45 masak :)
11:45 * masak watches hilarity ensue
11:47 colomon jnthn: Is ~$f $f stringified?
11:49 colomon rakudo: my $a = "AABF"; ++$a; say $a
11:49 p6eval rakudo 240b98: OUTPUT«AABG␤»
11:49 colomon rakudo: my $a = "100.B"; ++$a; say $a
11:49 p6eval rakudo 240b98: OUTPUT«101.B␤»
11:50 jnthn colomon: Yes.
11:50 colomon rakudo: my $a = "99.B"; ++$a; say $a
11:50 p6eval rakudo 240b98: OUTPUT«100.B␤»
11:51 colomon Okay, so maybe my code of yesterday wasn't wrong -- because incrementing a string with a leading number in it is like incrementing the number part of the string only?   (Still don't understand the -100.00 case.)
11:52 jnthn colomon: Seems it had a good chance of working, if Rakudo had stringified the match objects at the point of constructing the range, yes.
11:52 jnthn I'm not completely sure that's the right answer, but may be the way forward.
11:54 masak colomon: actually the '-100.00' case is one of those corner cases where people's expectations will vary depending on the situation. also known as a "you can't win" corner case. :/
11:55 masak colomon: vim treats the minus sign as part of the number. I'm often surprised by that when I use ^A and ^X and their effects are reversed.
11:55 masak especially in cases when the dash before the number was _not_ a minus sign!
11:56 colomon I guess what surprises me about that is I don't understand why the '-' is not incremented if it is not part of the number.
11:56 colomon rakudo: my $a ="A99B"; ++$a; say $a
11:56 p6eval rakudo 240b98: OUTPUT«A99C␤»
11:56 wolverian masak: use the correct dash characters then? :)
11:57 moritz_ colomon: only things that look like digits or word characters are incremented by ++
11:57 moritz_ rakudo: my $x = '#'; say ++$x
11:57 p6eval rakudo 240b98: OUTPUT«#␤»
11:57 masak wolverian: if it were only up to me, maybe. but often enough I'm editing other's files.
11:57 moritz_ IMHO that would warrant a warning
11:57 masak wolverian: vim will do wrong with something like this: 'Chapter 2- - - - - - - - - -76'
11:57 wolverian masak: everyone should have a personal bug tracker
11:58 wolverian ah.
11:58 colomon rakudo: my $x = "-A-A"; $x++; say $x
11:58 p6eval rakudo 240b98: OUTPUT«-A-B␤»
11:58 masak wolverian: the feature as it stands now makes more sense in programming languages than in ordinary text.
11:58 masak wolverian: but even in comments there might be misunderstandings.
11:59 moritz_ rakudo: my $x = 'foo.bar'; say ++$x
11:59 p6eval rakudo 240b98: OUTPUT«fop.bar␤»
11:59 colomon rakudo: my $x = "foo-bar"; say ++$x
11:59 p6eval rakudo 240b98: OUTPUT«foo-bas␤»
12:00 masak rakudo: my $x = 'foo.bar.baz'; say ++$x
12:00 p6eval rakudo 240b98: OUTPUT«fop.bar.baz␤»
12:01 masak KyleHa++ # yay, Austria got into the spectests! :D
12:02 jauaor joined #perl6
12:02 * moritz_ just did a sweep over the Perl 6 wikibook
12:02 moritz_ I did some of the changes anonymously (forgot to log in), so they need approval
12:02 jauaor morning
12:03 masak jauaor: oh hai
12:03 jauaor hi masak !
12:04 * masak really likes Ben Morrow's email to p6l
12:07 jnthn Aj, all good questions.
12:07 * jnthn would be curious to know the answers to those too
12:09 * moritz_ will write a mail with some proposals later
12:10 meppl joined #perl6
12:10 sri_kraih joined #perl6
12:11 * masak will re-read S04 to see if he's smart enough to guess the answers
12:15 * jnthn will just sip idly on his coffee
12:22 M_o_C joined #perl6
12:31 * jauaor trying to find a decent identifier for something like self->
12:32 masak jauaor: a 'decent identifier'? isn't 'self' itself a decent identifier?
12:33 jauaor masak: mm... it doesn't seem .... hackish to me
12:33 kimtaro joined #perl6
12:33 jauaor :P
12:33 jauaor i was wondering if such a word could just be replaced by some kind of sigil
12:33 masak jauaor: well, instead of self.attribute you can write $.attribute
12:34 jauaor mmm
12:34 jauaor that sounds good
12:34 jauaor masak: this is how perl6 does it?
12:34 masak jauaor: aye.
12:34 * jauaor is also writing a small language
12:35 jauaor i guess nobody will bother if i try this feature too right? :P
12:35 * jauaor "borrows" ideas from perl
12:36 jauaor but nah, $. won't make for it, i already use $ and . for other important things .......
12:36 jauaor though i a looking for some kind of sigil
12:38 masak rakudo: class Austria { has $.anthem; submethod BUILD() { $!anthem = $*IN.slurp }; method foo() { say $.anthem } }; Austria.new.foo
12:38 p6eval rakudo 240b98: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmitten,␤einem
12:38 p6eval ..stark…
12:38 masak Rakudo++
12:38 masak let's see a newcomer try and explain _that_ trick!
12:38 literal o_O
12:39 * jauaor figuring out
12:39 masak *lol*
12:41 * jauaor guesses BUILD() is run in instance creation time and slurp is some descriptor taking value from some mystic place? :P
12:42 masak so far, so good.
12:42 jauaor and the $! implies some kind of mutability?
12:42 jauaor not sure, it just seems at first like that to me
12:44 masak the '!' twigil indicates that I'm working directly on the attribute variable.
12:44 masak and not through some lvalue accessor which might have opinions about my changing the variable.
12:45 jauaor oh i see
12:46 jauaor so, this is like some 'safer' way of assigning a value to this attribute ?, or is it actually mandatory for in this case for some reason?
12:47 * jauaor probably has to read moritz_ tutorials
12:47 masak jauaor: no, I could have done either $! or $. here.
12:48 moritz_ $.?
12:48 masak jauaor: personally, I prefer $! because it feels less complicated.
12:48 ruoso joined #perl6
12:48 tuH_JoNaTAn_Shul joined #perl6
12:48 masak moritz_: well, the '.' non-twigil.
12:48 jauaor mm
12:49 jauaor ok, but they are actually different things right? ... just that would have the same effect here?
12:49 masak jauaor: I've seen people argue that it's more OO-ly pure to do $.attr
12:49 masak jauaor: there are two schools of thought there.
12:49 ruoso Hello
12:49 masak jauaor: yes, as long as you don't have a funky accessor they amount to the same thing.
12:49 jauaor I see
12:49 masak jauaor: but $.attr does a method call, and $!attr doesn't.
12:50 moritz_ rakudo: class A { has $!a = 5; method a() { $!a * 2 } }; say A.new.a
12:50 jauaor masak: well, as you speak to me, $! seems like more functional than OO
12:50 p6eval rakudo 240b98: OUTPUT«10␤»
12:50 jauaor to me
12:50 masak jauaor: oh! and I was wrong. assigning to $.anthem wouldn't have worked in my code.
12:50 ruoso masak, you forgot to mention Faz in your web stack... it's an alternative implementation for Routes based on regexes
12:50 masak jauaor: because I didn't make the attribute rw.
12:50 jauaor masak: aaaah
12:51 ruoso it just needs a syntax sugar on top of it
12:51 jauaor i get it, so there $! indeed works like some kind of mutability operation?
12:51 masak ruoso: oh, right. care to add it in a comment? or I can edit the post...
12:51 masak jauaor: no, $!anthem is the actual variable.
12:51 masak jauaor: some people call it 'the storage location'.
12:51 moritz_ jauaor: the $!foo thing is really the attribute. $.foo is just a way of accessing it, but by default it's ready-only
12:51 jauaor I see I see
12:51 moritz_ so it's another abstraction layer
12:52 jauaor oh, i see that
12:52 jauaor get it
12:52 masak jauaor: when you declare $.anthem, you get both the attribute $!anthem, plus a read accessor.
12:52 jauaor So $. is like a layer with more sugar on top?
12:52 masak (and a write accessor, if you make it rw)
12:52 masak jauaor: yes.
12:52 jauaor I get it
12:52 jauaor :)
12:52 masak jauaor: when declaring, it gives you accessor. when in code, it calls them.
12:53 jauaor I see
12:53 jauaor so, this is the way of getting magically getter/setters ?
12:54 masak yes.
12:54 masak also, as an added bonus: if you have a method foo in your class, you can do $.foo instead of self.foo, and that will work.
12:55 ruoso masak, I can add as a comment
12:55 jauaor masak: i see.. nice
12:56 masak ruoso: thank you. I do value the Faz effort -- it's exactly the point of Web.pm that people should be able to hook their own things onto it, and Faz makes for a good example of that.
12:56 ruoso basically $!a is resolved at compile time to the slot in the object
12:56 * jauaor likes what he has seen about OO in perl6
12:56 ruoso while $.a is *always* a method call
12:56 ruoso it's just that in Perl 6 there is no such thing as public attributes
12:56 jauaor ruoso: i see .. $!a is like the 'crude fish'
12:57 ruoso jauaor, yeah... it's a concrete reference to a known container
12:57 jauaor I se .. I like the notation $!
12:57 jauaor it really implies very well that to me
12:57 ruoso tipically it's called "private"
12:58 ruoso masak, er... i don't have a use.perl.org account... would you mind adding it to the post?
12:59 jauaor thanks masak , moritz_ , ruoso
12:59 ruoso jauaor, and $.a is the "public" access... but it's simply because "has $.a" is the same as "has $!a; method a is rw { $!a }
12:59 masak ruoso: I'll do that. any thoughts on what to write?
12:59 jauaor good explanation, i will go through docs better for further info
13:00 ruoso masak, just describe it as a regex-based uri-to-action dispatch system
13:00 masak ruoso: ok.
13:00 jauaor ruoso: yeah, i can see ... it gives some kind of layer on top
13:00 ruoso which supports chained actions
13:01 ruoso jauaor, the important aspect is that you can't access the data of the object from outside without calling a method
13:01 ruoso jauaor, unlike Java, for instance...
13:01 * masak still doesn't fully grok chained actions
13:01 jauaor ruoso: i see, so, you always need your getter
13:01 jauaor ?
13:02 ruoso masak, considering /blog/category/perl/post/abc it will invoke, in order, the action to initialize the blog, to find the category and at last to find the post abc in that category
13:02 ruoso jauaor, but in Perl 6 you don't need the f**king getAttribute and setAttribute... you simply access the value and the method will be called
13:03 jauaor I can see now :)
13:03 jauaor that's cool indeed
13:03 masak ruoso: yes, I get that part. I guess I haven't written enough web apps to try it out, that's all.
13:04 ruoso masak, think of it as "in order to get the post, I first need to get the category" and "in order to get the category, I first need to initialize the blog"
13:04 masak ruoso: yes, I get that part. :)
13:04 ruoso and you can re-use the inner actions
13:04 ruoso that's the most important part
13:04 masak but how, for example, is data passed between the actions in the chain?
13:05 masak because that has to be the advantage of it all, that data is passed down to later actions.
13:07 masak ruoso: there. http://use.perl.org/~masak/journal/39351
13:08 ruoso masak, that's what you use the stash for
13:08 masak ah, there's that word again.
13:09 ruoso and the stash is usually visible from the template in an easy way
13:09 masak ok.
13:09 ruoso stash is just a bag of data
13:09 masak that description is not helpful at all. :)
13:10 masak everything is just a bag of data.
13:11 ruoso i mean, the stash is the place you store the data that is going to be used in the next steps of the processing
13:11 masak ok.
13:11 ruoso i.e. passing the data to the other actions
13:11 masak right. sounds like the stash is indeed the answer to my question.
13:12 ruoso yes...
13:12 ruoso mst has some idea on how to do it without the stash, by using context variables... but I don't quite see how it works
13:13 masak nod.
13:14 rfordinal joined #perl6
13:15 pugs_svn r27744 | moritz++ | [t/spec] add test descriptions, and unfudge test for Rakudo
13:15 ruoso masak, http://github.com/ruoso/faz/blob/0456ff1fa56eecb04​ccd818a54031930a4504d96/examples/yarn/lib/Yarn.pm
13:16 ruoso masak, if you look at line 131, you'll see the stash in action, where the value was set in lin 83
13:17 masak thank you. that makes it clearer for me.
13:18 dalek rakudo: 4c31fb7 | moritz++ | build/PARROT_REVISION:
13:18 dalek rakudo: bump PARROT_REVISION to get better handling of lexical subs
13:18 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​c31fb77fbf5fb6f034b1f9612f1f53dd7ed6f00
13:21 tu_MoreNiKo_VaSi joined #perl6
13:22 tu_MoreNiKo_VaSi left #perl6
13:29 dalek grok: b04d463 | (Hinrik Örn Sigurðsson)++ |  (2 files):
13:29 dalek grok: Add some diagnostics to tests
13:29 dalek grok: review: http://github.com/hinrik/grok/commit/b0​4d463044eebb613b9a8215b680aa51fe2abe13
13:29 dalek grok: 899db73 | (Hinrik Örn Sigurðsson)++ |  (9 files):
13:29 dalek grok: Bump version to 0.18_01
13:29 dalek grok: review: http://github.com/hinrik/grok/commit/89​9db73bef2138ae0a0a7c36f9ab6a539496cbcd
13:53 colomon rakudo: my $x is Int; say $x.WHAT
13:53 p6eval rakudo 240b98: OUTPUT«sh: ./perl6: No such file or directory␤»
13:53 colomon Whoops.
13:53 moritz_ it's rebuild tiime
13:54 colomon Was that the right way of doing that?
13:54 moritz_ my Int $x;
13:54 colomon moritz_++
13:54 moritz_ '$x is Int' means that you want to replace the container type by Int (which is neither implemented yet, nor does it make sense in the case of Int)
13:54 masak std: my $x is Int;
13:54 p6eval std 27744: OUTPUT«ok 00:02 37m␤»
13:56 colomon Huh.  When I try my Int $x; say $x.WHAT using perl6 and -e, i get Malformed declaration.
13:56 colomon probably using -e incorrectly?
13:56 moritz_ rakudo: my Int $x; say $x.WHAT
13:57 p6eval rakudo 4c31fb: OUTPUT«Int()␤»
13:57 moritz_ colomon: maybe you didn't quote or escape the command line properly?
13:57 moritz_ on unix/linux you need perl6 -e 'my Int $x; say $x.WHAT' # note the ''
13:57 colomon ' instead of "
13:57 colomon ?
13:58 moritz_ right
13:58 colomon Ah, yup, that's it.
13:58 moritz_ $x is interpolated as an environment variable by the shell inside double quotes
13:58 colomon Bad habits left over from the long years of Windows being my primary operating system.
13:58 colomon Thanks!
14:08 colomon I've been playing around with additional tests in spec/S03-operators/range.t, half-trying to understand what range does and half trying to understand what it should do.
14:08 colomon Not sure if it makes sense to check these into the system -- worried they might be too obvious.  Or wrong.
14:10 moritz_ colomon: just nopaste them somewhere, so I can take a look
14:11 szabgab joined #perl6
14:11 colomon They are variations on the tests KyleHa did yesterday.
14:12 asciiville joined #perl6
14:12 lisppaste3 colomon pasted "Potential range.t tests" at http://paste.lisp.org/display/84225
14:13 moritz_ colomon: looks rather well... two things you can improve
14:13 moritz_ 1) make sure to mark tests which rakudo doesn't pass with #?rakudo todo 'reason'
14:13 colomon all ears
14:13 moritz_ 2) is $range, ("1","2","3"), 'range is correct';
14:14 moritz_ should really be
14:14 moritz_ is $range.list, ('1', '2' ...
14:14 moritz_ (you can abbreviate the list as <1 2 3>, but the important thing is that it's $range.list)
14:14 moritz_ that's it.
14:15 colomon Interesting....  I just did that the way KyleHa did.  Should I fix those tests as well, or is it a string-specific thing?
14:15 moritz_ it would be great if you could also fix the others
14:16 colomon rakudo passes all these tests now -- this was more an attempt to codify what it does now as a test.
14:16 moritz_ great
14:18 colomon Okay, I'll check these in in a minute.
14:18 colomon whoops, that's interesting.
14:19 colomon Switching that last test to your suggestion makes it fail.
14:19 colomon BRB
14:22 pmichaud good morning, #perl6
14:23 Su-Shee pmichaud: I read you said something like "rakudo 1.0" and "spring 2010"? :)
14:23 pmichaud Su-Shee: yes, that's corect.  :)
14:23 pmichaud *correct.
14:24 Su-Shee the easter edition. :)
14:24 pmichaud we're still working out details, but my expectation is that we'll have some sort of major release of Rakudo by then
14:24 * Su-Shee sees bunnies and pretty flowers in addition to the butterfly...
14:24 pmichaud (it's not only my expectation, it's my plan)
14:25 Su-Shee pmichaud: this would be so incredibly great I can't even put it in words. :)
14:25 pmichaud my goal for yapc::eu is to work with jnthn++ and others to lay out a detailed plan and timeline for making it happen
14:26 Su-Shee pmichaud: very cool.
14:29 Su-Shee I'll gladly hook the german IT press then.
14:35 colomon moritz_:  I see.  <1 2 3> is not the same as <1, 2, 3>.
14:36 hoelzro joined #perl6
14:37 pmichaud http://yapceurope2009.org/​ye2009/wiki?node=RakudoBOF
14:37 pugs_svn r27745 | colomon++ | Add another range test case around the match operator, and an equivalent test WRT string variables.
14:40 masak I think I could contribute by putting together a list of 1.0 blockers in RT :)
14:40 pmurias ruoso: hi
14:41 jnthn masak: Taht'd be interesting to see.
14:42 FurnaceBoy joined #perl6
14:42 masak how do I sign up for the BOF?
14:44 Su-Shee hm. a perl 6 bootcamp later next summer would be nice then.
14:45 masak huh, seems the right way was to edit the BOF page, and knowing what one's user ID was...
14:51 pmurias ruoso: i'm thinking of trying tracing gc, as i can't imagine solving all the wird leaks and memory errors
15:02 ruoso_ joined #perl6
15:11 moritz_ colomon++
15:13 hoelzro joined #perl6
15:14 hudnix rakudo: say <two things>.perl, " ", <onething>.perl
15:14 p6eval rakudo 4c31fb: OUTPUT«["two", "things"] "onething"␤»
15:15 masak hudnix: yes, because <> is sugar for () and quoting, and things without a comma aren't lists.
15:15 * moritz_ didn't even see a question ;-)
15:16 moritz_ but notice that typical list methods (like .join, .map etc.) will still work on <onething>
15:16 hudnix still, could perhaps cause some confusion
15:16 szabgab joined #perl6
15:17 moritz_ right
15:17 moritz_ but it could also cause confusion the other way round
15:18 szabgab I might just making noise here but I think the eval_dies_ok of Test.pm is always ok,   is that on purpose or am I misunderstanding something ?
15:19 moritz_ rakudo: use Test; plan 1; eval_dies_ok '1', 'something'
15:19 p6eval rakudo 4c31fb: OUTPUT«1..1␤not ok 1 - something␤# Looks like you failed 1 tests of 1␤»
15:19 moritz_ szabgab: not always ok... or did you mean something else?
15:19 szabgab hmm, strange, maybe I am using the wrong Test.pm ?
15:20 moritz_ i'm using the one in the rakudo repo
15:20 szabgab I thought the same, let me double check it
15:20 donaldh joined #perl6
15:27 pmichaud masak: (1.0 blockers)  I'm likely to create a page in the github wiki to maintain this.  But part of what we have to decide is what will be a blocker and what will not.
15:28 masak pmichaud: aye.
15:28 masak the first thing that comes to mind is the REPL.
15:28 pmichaud The biggest issue I see is figuring out what to call the release.  If we call it "1.0", we need to have some way to make it clear that "Rakudo 1.0" is not intended to be "all of Perl 6"
15:28 pmichaud Yes, the REPL is on my list of "must haves"
15:28 KyleHa joined #perl6
15:28 masak Rakudo currently does not have a 1.0 REPL.
15:29 masak pmichaud: to be honest, I don't see much need for a '1.0' label for Rakudo in 2010. but you might have some PR argument for it that I haven't seen yet.
15:29 pmichaud masak:  I'm writing a post, but here's the argument summary
15:30 pmichaud (1)  Many people will not seriously consider Rakudo as something to even experiment with before it has some sort of "major release"
15:30 pmichaud (2) Many parts of the Perl 6 specification are waiting on implementations to experiment with them before being solid
15:31 pmichaud (3) The primary mechanism for moving implementations forward is writing real programs using them
15:31 masak nod.
15:31 KyleHa If I find an open bug in RT that seems not to be a bug any longer, should I resolve it or note it for someone else to resolve, or what?
15:31 pmichaud ergo, in order to get resolution on some parts of Perl 6, we need a "major release" of some sort that pre-dates it.
15:32 pmichaud KyleHa: if there's a test for it and it's no longer a bug, resolve the ticket.
15:32 masak pmichaud: that was basically what I thought you'd say.
15:32 masak pmichaud: I'm not opposed to a 1.0 release, and I do hope it'll bring in more app devs.
15:32 pmichaud I also think that having a target with some very clear goals will be hugely beneficial.
15:33 masak aye, probably.
15:33 pmichaud so it's not so much PR, as I see it as being a necessary step on the path to getting to a full Perl 6 implementation
15:35 pmichaud (yes, it has PR benefits too, as long as we don't screw it up, but the need for more applications is the primary driver)
15:36 masak biggest risk I see is people looking at it, saying "Ten years later, _this_ is what you release?" I love Rakudo, but people on the outside don't always seem as tolerant.
15:36 masak (but I guess by my reasoning, one should never release any Perl 6 implementation.)
15:36 szabgab raludo: use Test; plan 1; class abc { method y() {} }; my $z = abc.new; $z.y; eval_dies_ok('$z.y')
15:37 pmichaud yes, that's why I'm not sure I want to call it "1.0"
15:37 szabgab rakudo: use Test; plan 1; class abc { method y() {} }; my $z = abc.new; $z.y; eval_dies_ok('$z.y')
15:37 p6eval rakudo 4c31fb: OUTPUT«1..1␤ok 1 - ␤»
15:37 pmichaud The real point of the BOF (and these discussions) is not just to plan the technical details, but also to discuss how we can best manage expectations
15:38 szabgab moritz_, why is that ok ?
15:38 pmichaud rakudo: use Test; plan 1; class abc { method y() {} }; my $z = abc.new; $z.y; eval('$z.y')
15:39 szabgab and btw if I try the above on the command line with -e it blows up on rakudo from 3 days ago
15:39 p6eval rakudo 4c31fb: OUTPUT«1..1␤# Looks like you planned 1 tests, but ran 0␤»
15:40 buubot joined #perl6
15:41 szabgab pmichaud, so I don't understand
15:41 pmichaud szabgab: I think I'm agreeing with you.
15:41 pmichaud (testing locally)
15:41 pmichaud oh, oh oh
15:42 pmichaud I know the problem.
15:42 pmichaud This is the same problem as before.  When eval_dies_ok runs, $z isn't in scope.
15:42 pmichaud (we had this discussion on #perl6 about a week or so ago)
15:42 szabgab I am always so proud when I find a bug :-)
15:42 pmichaud it's not really a bug.
15:42 szabgab even if I am not the first one :-)
15:42 szabgab :-(
15:43 pmichaud or if it is, we have to decide that eval_dies_ok somehow runs in the lexical scope of its caller.
15:43 pmichaud here's what is happening now
15:43 szabgab so how can I test that a method call blows up ?
15:43 edpratomo joined #perl6
15:44 pmichaud rakudo:  use Test; plan 1;  class abc { method y() {} };  eval_dies_ok('abc.new.y');
15:44 p6eval rakudo 4c31fb: OUTPUT«1..1␤not ok 1 - ␤# Looks like you failed 1 tests of 1␤»
15:45 szabgab yeah, but it is not really natural
15:45 szabgab what if I need lots of object prparaton to reach that case when it should blow up ?
15:45 pmurias pmichaud: how do you implement in Perl6 an eval_dies_ok that runs in the scope of the caller?
15:45 pmichaud well, we'll probably need to decide that "eval_dies_ok" runs in the lexical scope of its caller; (e.g., using "lift").  Rakudo doesn't implement "lift" yet.
15:46 szabgab so for now I have a solution, thanks
15:46 pmichaud pmurias: See S04:680
15:46 szabgab but I think it is better be able to handle this
15:48 pmurias pmichaud: is lift powerfull enough?
15:48 pmichaud pmurias: I think it should be.  This sort of thing is what I think lift is designed to solve.
15:48 pmurias my $x;lift eval("$x + $y");
15:49 pmurias pmichaud: eval would need to be specially built to recognise lift
15:49 pmichaud eval already has to recognize the lexical scope of its caller
15:49 szabgab pmichaud, and btw have you tried my example on the command line ?
15:49 szabgab it does not seem to parse it
15:49 pmichaud lift simply incorporates the caller's lexical scope into its own
15:49 LionMadeOfLions joined #perl6
15:50 pmichaud szabgab: how are you entering your example on the command line?  Are you using double-quotes?
15:50 pugs_svn r27746 | kyle++ | [t/spec] Test for RT #64668
15:50 pugs_svn r27747 | kyle++ | [t/spec] RT #63460 test: let the harness check the error message
15:50 pmurias yes, one could view it as mergeing the caller's and outer scope into one
15:51 szabgab oh yes, sorry
15:52 pmurias pmichaud: should "lift MY::<$variable_from_caller>" work?
15:52 pmichaud pmurias: I have no idea... hadn't thought about that much
15:54 moritz_ only if $variable_from_caller is declared as context, probably
15:59 jnthn dies_ok { $z.y }, ...; # fine here too
15:59 jnthn (since you're passing the closure...)
16:01 ruoso_ pmurias, lift MY::<$variable_from_caller> should work, but that isn't even nevessary... lift $variable_from_caller should work as well
16:02 ruoso_ unless there's a variable by the same name in the current scope
16:02 ruoso_ but... why would you use lift MY when you can just do CALLER::
16:02 ruoso_ ?
16:03 pmurias ruoso_: the point of the example was to determine if lift creates a new hybrid lexical scope or just lift the unknown variables
16:12 pmurias ruoso_: do you think it would be sensible if write a simple tracing gc for smop to see how it fits in/works?
16:13 ruoso_ pmurias, lift creates a lexical scope that intercepts the "outer" of the current routine to replace it by caller
16:14 ruoso_ pmurias, the problem with that is that it would not be compatible with p5
16:14 ruoso_ pmurias, the trace gc, I mean
16:15 pmurias you mean it will be incompatible with making SV* a SMOP object, or with normal p5 interop?
16:15 ruoso_ both
16:16 pugs_svn r27748 | kyle++ | [t/spec] Test for RT #64686
16:16 nihiliad joined #perl6
16:16 ruoso_ because when you send a smop object to a p5 function, it will be unreachable by other smop objects
16:16 ruoso_ and since p5 doesn't implement trace
16:16 ruoso_ the value will be destroyed...
16:17 pmurias when you REFERENCE a trace object it receives a reference counter
16:17 pmurias like $refcount{$obj}++
16:18 ruoso_ so you'll need both gc's at the same time
16:18 ruoso_ you'll always refcount
16:18 snearch joined #perl6
16:18 ruoso_ but you'll also trace them
16:18 pmurias when doing heavy interop yes
16:19 ruoso_ yeah... which is the plan...
16:19 ruoso_ which will happen when you use a module from CPAN
16:25 pmurias using both gc's at the same time would require extra storage of an int per object
16:26 pmurias we could implement the gc at first only as a debugging aid (it would be used to find which unreachable objects have a positive refcount)
16:28 ruoso_ that'd be helpfull, but i'm not sure it's worth the trouble
16:29 pmurias do you think we can manage to manually find all the leaks?
16:36 pmurias ruoso_: we might be even able to use one bit of the refcount for marking reachable objects (if a 31 bit refcount is enough)
16:43 szabgab joined #perl6
16:51 fridim_ joined #perl6
16:52 Psyche^ joined #perl6
16:58 lucs joined #perl6
17:14 tann joined #perl6
17:22 payload joined #perl6
17:28 hoelzro joined #perl6
17:28 hoelzro pmichaud: ping
17:29 moritz_ hoelzro: in r27733 you introduced Perl6::Compiler into the test suite, but I can't find any mention of that class in the specs. Care to explain?
17:30 hoelzro moritz_: isn't the Perl6::Compiler class the REPL?
17:30 moritz_ hoelzro: it might be in Rakudo, but the spectests are intended to be implementation agnostic
17:30 hoelzro ah, my mistake
17:31 hoelzro well, that's the class I got BUILD to break on
17:31 moritz_ (we do add regression tests because other implementations might make the same mistakes)
17:31 hoelzro I'm not sure which other classes (if any) break BUILD
17:32 moritz_ if it's something Rakudo specific, it should go in t/* somewhere in the rakudo repo
17:32 hoelzro also, the patches I sent in last night would fix the problem for Perl6::Compiler
17:32 hoelzro moritz_: alright
17:32 hoelzro thanks for the tip =)
17:32 hoelzro I'll move that over sometime tonight
17:32 moritz_ maybe we need t/02-rakudo/ or so
17:32 moritz_ but that's something we need to discuss with pmichaud
17:33 hoelzro ok
17:34 nbrown joined #perl6
17:38 moritz_ anyway, thanks for submitting patches and tests; I just don't know enough of these parts of the compiler to review and apply them
17:42 hoelzro moritz_: no problem, the more I think about it, the more Rakudo-specific that test feels =P
17:51 ruoso_ pmurias, I think as we move to mildew, less is the chance of new leaks... if smop is made leak-free, mildew will be leak-free as well... we just need more tests in smop to raise the points that mildew is currently causing leaks
17:56 Whiteknight joined #perl6
17:56 alester joined #perl6
18:13 fridim_ joined #perl6
18:25 iblechbot joined #perl6
18:26 stepnem joined #perl6
18:34 tomaw_ joined #perl6
19:10 hoelzro joined #perl6
19:20 donaldh joined #perl6
19:32 pmurias ruoso_: smop is leak free
19:32 pmurias the test suit is leak free
19:32 ruoso_ pmurias, so... if mildew has leaks, it's because we are missing tests in smop
19:33 ruoso_ we need to get tests that reproduce the situations where the leaks raise...
19:43 szabgab joined #perl6
19:43 dKingston joined #perl6
19:47 kane_ joined #perl6
20:07 donaldh_ joined #perl6
20:36 frew_ joined #perl6
20:47 szabgab joined #perl6
21:41 shinobi-cl joined #perl6
21:42 maja__ joined #perl6
21:43 shinobi-cl some guy asked me about how to make a program that understands "natural language"
21:44 shinobi-cl i told him that perl6 had a "grammar" construct, not really knowing if such construct is appropiate for natural language parsing...
21:45 shinobi-cl well, the thing is... it is really appropiate for such a task? he want to do some kind of "expert system" for medical diagnosis, so i'm sure roles would be really useful for him
21:45 shinobi-cl but, grammars for natural language? i hope i was right pointing him in the perl6 direction.
21:46 lumi_ joined #perl6
21:50 explorer joined #perl6
22:07 lumi__ joined #perl6
22:18 justatheory joined #perl6
22:34 nbrown joined #perl6
23:20 donaldh joined #perl6
23:58 shinobi-cl joined #perl6

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

Perl 6 | Reference Documentation | Rakudo