Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-05-16

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:02 nothingmuch joined #perl6
00:10 Kisu joined #perl6
00:18 japhb joined #perl6
00:21 justatheory joined #perl6
00:23 jnthn http://use.perl.org/~JonathanWorthington/journal/38983 # hopefully less typos that last week's write-up
00:23 fridim_ joined #perl6
00:27 kidd joined #perl6
01:17 charsbar joined #perl6
01:20 nbrown joined #perl6
01:33 kimtaro joined #perl6
01:37 meppl good night
01:41 kimtaro joined #perl6
01:42 kimtaro joined #perl6
01:49 hercynium joined #perl6
01:50 eternaleye joined #perl6
01:59 kimtaro_ joined #perl6
02:05 nbrown joined #perl6
02:09 kimtaro joined #perl6
02:28 sri_kraih_ joined #perl6
02:58 alanhaggai joined #perl6
03:21 donaldh joined #perl6
03:22 [particle] joined #perl6
03:43 orafu joined #perl6
04:09 frew joined #perl6
04:20 xinming_ joined #perl6
04:30 kimtaro joined #perl6
05:00 kimtaro joined #perl6
05:18 kimtaro joined #perl6
05:19 wormphlegm joined #perl6
05:35 dalek joined #perl6
05:38 wayland76 joined #perl6
06:03 Kisu joined #perl6
06:13 JRowe joined #perl6
06:20 LadyLunacy joined #perl6
06:29 kate21de joined #perl6
07:02 finanalyst joined #perl6
07:02 finanalyst good morning from Moscow.
07:03 finanalyst anyone here able to tell me what I can set --trace to when running perl6?
07:14 DemoFreak joined #perl6
07:14 jun__ joined #perl6
07:20 cotto If you're running Rakudo, it's a Parrot option.
07:20 donaldh joined #perl6
07:30 finanalyst what are the option?
07:30 finanalyst s/option/options/
07:32 PZt joined #perl6
07:39 iblechbot joined #perl6
07:42 cotto 1 is opcodes, 2 is find_method, 4 is function calls
07:42 cotto I need to look around some to see if the documentation is accurate and/or if there's anything else.
07:42 cotto care to join #parrot?
07:48 cotto yeah, it looks like that's all there is
07:50 barney joined #perl6
07:55 integral joined #perl6
07:58 ejs joined #perl6
08:01 ihrd joined #perl6
08:01 ihrd hi there
08:01 ihrd I have question about attr initialization
08:02 ihrd if I have two attr with same name
08:02 ihrd like @.args and %.args
08:03 ihrd and instance object, like .new(args => {foo => 1}), rakudo init both attr
08:04 ihrd and question is, how this is should work in perl6?
08:10 ihrd rakudo: class B { has $.a; has %.a; has @.a; method foo { say $!a; say %!a; say @!a; } }; B.new(a => {foo => 1}).foo;
08:10 p6eval rakudo ec55f1: OUTPUT«foo        1␤␤foo     1␤foo    1␤␤»
08:19 eternaleye joined #perl6
08:23 ihrd left #perl6
08:29 jun__ When does Perl6 release?
08:30 wayland76 Christmas
08:30 lambdabot wayland76: You have 3 new messages. '/msg lambdabot @messages' to read them.
08:30 wayland76 But we're not saying which year :)
08:33 cotto It'll be closer this Christmas than it was last Christmas.
08:33 jun__ haw-haw
08:36 jun__ perl is funny...
08:39 jun__ i am a perl newbies
08:40 wayland76 jun__: The real answer is "We'll release it when it's ready".  We don't yet know when that is, but if you want to play with what we have now, then get a piece of software called "Rakudo"
08:41 wayland76 It works moderately well, but has no libraries yet.
08:41 japhb wayland76: well, not so much *no* libraries, as just a limited set, since work only recently began on them,
08:42 wayland76 Perl 6 is a document that describes the language, not a program that runs the language.  Rakudo is one program that tries to run the Perl 6 language.
08:43 jun__ THS.
08:43 wayland76 japhb: good point -- I've got to update the inside of my brain again :)
08:43 japhb heh
09:03 yahooooo joined #perl6
09:08 mberends joined #perl6
09:09 finanalyst rakudo: my %x=<a b c d e f g> Z 7,4,3,6,2,1,5; say %x.sort(*.values).perl
09:09 p6eval rakudo ec55f1: OUTPUT«["a" => 7, "b" => 4, "c" => 3, "d" => 6, "e" => 2, "f" => 1, "g" => 5]␤»
09:10 finanalyst has something changed for sort?
09:11 finanalyst mortiz_: ping
09:31 meppl joined #perl6
09:44 iblechbot joined #perl6
09:51 finanalyst rakudo: my %x=<a b c d e f g> Z 7,4,3,6,2,1,5; say %x.sort(*.value).perl
09:51 p6eval rakudo ec55f1: OUTPUT«["f" => 1, "e" => 2, "c" => 3, "b" => 4, "g" => 5, "d" => 6, "a" => 7]␤»
09:53 icwiener joined #perl6
10:13 H1N1[A][Again] joined #Perl6
10:15 Chillance joined #perl6
10:26 fridim_ joined #perl6
10:33 alanhaggai joined #perl6
10:35 fridim_ joined #perl6
10:49 pugs_svn r26847 | pmurias++ | [re-smop] ported over OutOfItemsException but the t/throw_inside_catch.t
10:49 pugs_svn r26847 | pmurias++ | segfault due to a double free issue
10:49 fridim_ joined #perl6
10:54 fridim_ joined #perl6
10:57 jferrero joined #perl6
10:58 fridim_ joined #perl6
11:04 fridim_ joined #perl6
11:04 jnthn hej hej
11:06 jnthn @tell ihrd I think declaring two attributes of the same name even with different sigils is an error, though Rakudo doesn't moan about it yet.
11:06 lambdabot Consider it noted.
11:08 masak joined #perl6
11:11 masak bon samedi, mes papillons.
11:12 masak jnthn: I now see the parallel between 'ako sa mas?' and Borat's 'jak sie masz?'.
11:13 jnthn masak: Yes. I'm pretty sure that is _not_ an example of Khazakh.
11:14 masak doesn't surprise me.
11:14 jnthn I'm not sure accuracy was ever a goal of the film though. ;-)
11:14 masak :)
11:14 masak phonotactically, it looks a bit like Polish, but that doesn't mean it is.
11:16 jnthn It may be; I know next to nothing about Polish yet.
11:17 masak the 'ie' and 'sz' digraphs look indicative to me.
11:17 jnthn The "masz" does indeed look feasibly like how the Slovak maš would be written in Polish though.
11:18 masak 'masz' must be 2nd person sg 'have'.
11:18 jnthn Yes, that's what maš is.
11:18 masak oh, there's a little happy mouth on top of it!
11:18 jnthn Apparently Slovak natives can kinda follow Polish.
11:19 masak this is what I like about the slavic part of Eastern Europe.
11:19 jnthn I don't find such though. Czech is close enough, but Polish feels just that little too bit different.
11:19 jnthn *bit too
11:20 jnthn But then, I'm anything but native. I'm not even good. :-)
11:20 donaldh joined #perl6
11:22 masak hm, both Polish and Czech are in the West Slavic group. but they might of course be a bit far apart...
11:22 jnthn rakudo: class SquareHash does Positional { method postcircumfix:<{ }> ($val) { $val ** 2 } }; my SquareVal $x .= new; say $x<4>;
11:22 p6eval rakudo ec55f1: OUTPUT«Malformed declaration at line 1, near "SquareVal "␤in Main (src/gen_setting.pm:0)␤»
11:23 jnthn rakudo: class SquareHash does Positional { method postcircumfix:<{ }> ($val) { $val ** 2 } }; my SquareHash $x .= new; say $x<4>;
11:23 p6eval rakudo ec55f1: OUTPUT«16␤»
11:23 jnthn rakudo: class SquareHash does Positional { method postcircumfix:<{ }> (Int $val) { $val ** 2 } }; my SquareHash $x .= new; say $x<4>;
11:23 p6eval rakudo ec55f1: OUTPUT«Parameter type check failed; expected something matching Int() but got something of type Str() for $val in call to postcircumfix:{ }␤in method SquareHash::postcircumfix:{ } (/tmp/lWedfElKgV:1)␤called from Main (/tmp/lWedfElKgV:1)␤»
11:23 jnthn rakudo: class SquareHash does Positional { method postcircumfix:<{ }> (Int $val) { $val ** 2 } }; my SquareHash $x .= new; say $x{4};
11:23 p6eval rakudo ec55f1: OUTPUT«16␤»
11:23 jnthn win
11:24 jnthn oh, but s/Positional/Associative/. Oops. :-)
11:24 masak still. quite nice.
11:25 jnthn rakudo: class SquareList does Positional { method postcircumfix:<[ ]> (Int $val) { $val ** 2 } }; my SquareList $x .= new; say $x[4];
11:25 p6eval rakudo ec55f1: OUTPUT«elements() not implemented in class 'SquareList'␤»
11:25 jnthn :-(
11:26 jnthn rakudo: class SquareList does Positional { method postcircumfix:<[ ]> (Int $val) { $val ** 2 }; method elems() { Inf } }; my SquareList $x .= new; say $x[4];
11:26 p6eval rakudo ec55f1: OUTPUT«elements() not implemented in class 'SquareList'␤»
11:26 jnthn Aww.
11:27 masak what does elements() have to do with anything?
11:28 jnthn masak: Consider a @foo[*-1]
11:28 jnthn The * needs the number of elements.
11:29 patmat jnthn i still cant build rakudo on mac os x, i installed gcc successfully
11:29 patmat i paste it one moment
11:29 jnthn patmat: OK; unfortunately, I know nothing about OS X though...
11:29 jnthn masak: Though we may be going looking for an element count too early.
11:30 masak jnthn: seems so to me.
11:33 masak if I compile a Perl 6 script to .pir, should I be able to run the PIR file with parrot after that?
11:34 patmat http://pastie.org/private/g0dn4plgnuxt1oxfgtdlbg
11:34 patmat that's it :)
11:35 masak I have a case when I get a Null PMC access in get_string() when running a precompiled PIR file, but not when running the Perl 6 script directly.
11:35 masak patmat: how did you acquire gcc?
11:35 jnthn masak: You should be able to yes.
11:39 patmat masak i search the site, one moment.. i didnt install xcode
11:39 alanhaggai joined #perl6
11:41 patmat http://hpc.sourceforge.net/index.php that's it masak, the leopard thinhg
11:45 patmat at the last line you see, that gcc is installed
11:50 masak patmat: I'm using XCode. it works well.
11:53 jnthn masak: Is there a longer-term plan for Proto that sees it moving away from being shell scripts?
11:54 jnthn masak: Oh, I see proto itself is
11:54 * jnthn wsa looking at the create_new_project script
11:54 masak jnthn: 'proto' is a Perl 5 script, 'installer' is a small Perl 6 script.
11:54 patmat masak ok i install XCode then :)
11:56 jnthn masak: Does the create_new_project script to much other than just set up a makefile and some sensible directory structure?
11:56 masak jnthn: in trying to track down why wizard.pl in examples/games/ in the Pugs repo doesn't work, I tried precompiling it and running the PIR. then I got a Null PMC access.
11:56 masak jnthn: no, that's pretty much what it does.
11:57 masak jnthn: it prints what it's about to do, so read that if you're curious.
11:57 jnthn masak: I was pondering some module hacking, and figured I might try out the create_new_project script, that's all.
11:58 masak yes, sounds nice. :)
11:58 masak jnthn: easiest way to understand what create-new-script does is to try it out, I think.
11:58 masak it doesn't do anything irreversible.
11:59 jnthn masak: One problem. It's a shell script. ;-)
11:59 masak oh. :/
11:59 masak mberends: maybe we should have made it a Perl 5 script?
11:59 jnthn Thus my question about proto in general, but happily the rest is written in Perl, which means thre's a good chance of making them work on Windows too.
12:00 masak jnthn: I would translate it to a .BAT file, but I'm afraid I don't have the patience or the expertise.
12:00 jnthn masak: imho you'd be better spending the time translating to Perl.
12:00 masak I used to be a .BAT master, but that was in the 90s.
12:00 masak jnthn: aye.
12:01 jnthn Yeah, I'd really not want to convert it to a BAT.
12:01 jnthn Most of the BAT scripts I've ever written do a couple of little things and if there's hard stuff they run a Perl script to do it. ;-)
12:02 * masak once wrote an adventure game with only .BAT files.
12:02 jnthn Did you get any less masochistic since? :-)
12:02 mberends oh hai. yes, but the same as with the 'proto' script, it was easier to start 'create-new-project' in bash, believe it or not
12:02 jnthn masak: When I run wizzard.pl I get a type mis-match error.
12:03 jnthn With a Perl 6 line number though. \o/
12:03 masak jnthn: yes. me too.
12:03 patmat is Perl6 going to be a good language for "real" Applications on an OS? Or is it recommended mostly for web apps?
12:03 masak oh, I don't think I got the line number...
12:03 * masak pulls
12:03 patmat I'm just asking because of languages like Java and C# for example
12:03 jnthn Number, output doesn't handle anonymous subs as well as I'd like yet.
12:04 jnthn s/Number/Hmm/
12:04 jnthn patmat: There's no reason why not, though it's for sure missing libraries so far that'd make it good for that.
12:05 mberends masak: translating from bash to Perl 5 is left as an exercise for the reader ;)
12:05 patmat _at the moment_ you mean, right?
12:06 Whiteknight joined #perl6
12:06 jnthn patmat: Right, at the moment it's lacking libraries to do GUI apps. But if they were written, I think you could do that kind of thing nicely in Perl 6.
12:06 patmat masak: installed Xcode before, tried to build rakudo again, another error, i'm going to paste it
12:07 masak I'd be willing to collaborate with someone to make Druid work under Tk.
12:07 mberends patmat: web apps are just convenient and fun, it's definitely far more general purpose.
12:07 patmat jnthn great :) i asked because i think there should be a nice concurrency from the Open Source world to C#
12:07 patmat OK there is Python at the moment...
12:08 patmat http://pastie.org/private/qmqjxviyccegjpwqy4tig with XCode installed, masak
12:09 masak patmat: well, it's an improvement. :)
12:09 pmurias joined #perl6
12:09 masak I recognize that error, but don't remember what caused it.
12:10 masak patmat: you could try following the instructions in the last paragraph, though. :)
12:10 jnthn masak: I just got wizzard.pl to run.
12:10 masak jnthn++
12:10 masak jnthn: what was the problem?
12:10 jnthn masak: It gets much easier when you ahve the Perl 6 line numbers.
12:10 jnthn masak: It's actually an issue that we've hit and discussed before:
12:10 * masak isn't surprised
12:10 jnthn rakudo: sub foo(Int $x) { }; foo((20..30).pick)
12:10 p6eval rakudo ec55f1: OUTPUT«Parameter type check failed; expected something matching Int() but got something of type List() for $x in call to foo␤in sub foo (/tmp/jW36LVoPG6:1)␤called from Main (/tmp/jW36LVoPG6:1)␤»
12:11 jnthn rakudo: sub foo(Int $x) { }; foo((20..30).pick[0])
12:11 p6eval rakudo ec55f1:  ( no output )
12:11 jnthn masak: Line 184 or thereabouts.
12:11 jnthn And a similar issue a bit below.
12:11 * masak looks
12:11 jnthn I guess patching .pick would maybe help.
12:11 jnthn (So that it doesn't return a list when only asked for one item)
12:12 jnthn Of course, if we do that somebody will later complain about the inconsistency...
12:12 patmat masak it doesn't work if i do that from the error message :/
12:12 masak yes.
12:12 masak jnthn: it's tricky.
12:13 jnthn masak: Aye, I'm not sure what the answer is.
12:13 patmat for parrot-config, which location should i give with that option?
12:13 patmat because he can't find a parrot-config :P
12:13 masak patmat: ok, I think that your problem is easy to solve, but I don't have the knowhow. I would ask you to have patience until a more knowledgeable person comes along to help you.
12:13 masak patmat: it'll be worth it. Rakudo is way cool.
12:13 jnthn masak: We've sometimes gone with splitting up methods that return different things so they have different names.
12:14 patmat hehe masak i know, it works fine here on Ubuntu :)
12:14 jnthn If .pick only ever pack one and you had some other way to get many...
12:14 jnthn Or maybe if argumentless .pick gets one and .pick($val) always gives a list.
12:14 masak patmat: it works fine here on Darwin too. I don't understand why it doesn't for you...
12:14 jnthn So .pick(1) => list, .pick(2) => list, ... but .pick => one thingy.
12:14 patmat don't know ://
12:14 mberends patmat: try the suggestion after "ld: absolute addressing (perhaps -mdynamic-no-pic) used"
12:15 mberends "Use '-read_only_relocs suppress' to enable text relocs"
12:15 masak jnthn: that does make a lot of sense.
12:17 alanhaggai_ joined #perl6
12:17 jnthn awww
12:17 jnthn What is your name: Jonathan
12:17 jnthn Greetings, Jonathan
12:17 jnthn Jonathaniscurrently in theLobby
12:17 jnthn Lexical '$DEBUG' not found
12:17 patmat mberends hmm thats over my know-how :P
12:19 mberends patmat: me too, just sifting the error messages. It affects 'libgmp', which is the Multiple Precision arithmetic library, and some kind of add function inside that.
12:19 patmat hmm ok thanks :/ i will google around
12:20 mberends 'ld' is generally run as a subprocess of 'cc' just before cc exits
12:21 mberends you make be able to add '-read_only_relocs suppress' to a the appropriate 'cc' line in a Makefile
12:22 mberends *may
12:22 mberends actually, c++ line according to your output
12:23 masak mberends: a friend of mine was very pleased with the way proto 'Just Worked' when he wanted to have Rakudo/Parrot downloaded and built. now, he wants bleeding Rakudo, and proto can actually do this for you. just edit config.proto, delete projects/rakudo, and re-run proto.
12:23 masak mberends: he thought it was too complicated. :/
12:24 masak mberends: maybe we should think of a way to update Rakudo from proto itself.
12:24 mberends so cool!
12:26 masak mberends: he actually expected proto to do this already because, as he put it, "proto won the Nobel prize"
12:26 mberends sure, rakudo is a bootstrap type of project also
12:26 masak aye.
12:27 masak it feels great having a plan for this. :)
12:28 masak wow, seeing proto Just Work on someone else's box is intoxicating.
12:34 mberends masak: I'll soon translate 'create-new-project' to Perl 5.
12:34 masak nice.
12:34 mberends for jnthn++
12:34 masak yes, I think the same arguments that applied for proto also apply for create-new-project.
12:35 mberends was there a problem with .pir precompile somewhere?
12:36 masak rakudo: foo()
12:36 p6eval rakudo ec55f1: OUTPUT«Could not find non-existent sub foo␤»
12:37 masak mberends: yes and no. precompilation worked, but running the PIR afterwards didn't.
12:38 mberends masak: on your system? can the fault be reproduced?
12:39 masak mberends: update Pugs, precompile examples/games/wizard.pl, run parrot on it from the Rakudo dir -- presto, error.
12:40 masak what does the '1' mean in 'perl6_s1.pbc' ?
12:40 mberends stage 1
12:42 mberends wizard.pl does not work anyway. "Type mismatch in assignment; expected something matching type Int but got something of type Array()"
12:42 masak mberends: that's right.
12:42 masak but I get a Null PMC access when running the PIR.
12:50 mberends method damage looks dodgy, wizard.pl:64, because the implied return has the 'if' modifier
12:51 masak I haz a Parrot build failure.
12:52 masak http://gist.github.com/112669
12:53 mberends libintl : i18n?
12:53 masak likely.
12:54 mberends see if ports can help
12:54 * masak mumbles irritatedly
12:54 masak ...not supposed to get Parrot build failures...
12:55 amoc joined #perl6
12:58 masak this all happens in an ifdef PARROT_HAS_GETTEXT in parrot.h
13:00 mberends possibly related to adding Unicode support to I/O?
13:00 masak might be.
13:01 pmurias joined #perl6
13:01 * mberends tries the 'delete projects/rakudo' trick in /tmp to investigate
13:08 * masak -> store &
13:27 szabgab joined #perl6
13:30 mberends szabgab: hello
13:30 szabgab rehi
13:49 ruoso joined #perl6
13:50 ruoso Hello!
13:50 * ruoso still has some rakudo corner cases to isolate
13:51 Gothmog_ joined #perl6
13:51 rDM joined #perl6
13:52 rDM sdas
13:52 ruoso jnthn, your journal post has an issue... Foo.new<abc> had the <abc> part hidden... you probably need to use &lt;abc&gt;
13:52 skids_ joined #perl6
13:53 ruoso pmurias, hi
13:54 ruoso jnthn, btw... I still get backtraceless Null PMC access in can()...
13:55 masak` joined #perl6
13:56 jnthn ruoso: ah shit...when will use.perl.org just die...
13:56 ruoso hey masak`
13:56 mberends jnthn, spello Rakuod in blog post
13:57 broquaint joined #perl6
13:57 jnthn mberends: fixed, thanks...
13:57 * ruoso rebuilt rakudo... but forgot to git pull...
13:57 * ruoso --
13:58 jnthn ruoso: (backtraces missing for some exceptions) Yeah, I think I worked out why. I didn't figure out how to fix it yet...
13:58 mberends jnthn: missing version number in perl6 -v
13:59 ruoso hmmm... it's kinda bad, because it takes a whole 20 seconds to run it... debugging that with warnings is hard
14:00 jnthn ruoso: Patches welcome. :-P
14:00 jnthn I'll get to it soon.
14:00 * ruoso is just an annoying user...
14:00 ruoso ;)
14:01 jnthn It appears that exceptions thrown from C lack a resume continuation...but the comments in the code seems to suggest that they are resumable...so...confused.
14:14 abra joined #perl6
14:15 nbrown_ joined #perl6
14:16 mib_v669xf joined #perl6
14:17 pmurias ruoso: hi
14:17 ruoso it seems that we need to fix the memory issues
14:18 pmurias yes, unexplainable segfault are annoying
14:19 ruoso pmurias, I think one leak is being caused by the root m0ld code in the .c files (both executable and so)
14:19 ruoso I think we're not releasing the main code after running it
14:20 pugs_svn r26848 | ruoso++ | [re-mildew] run tests with valgrind. We need no leaks!
14:20 LadyLuna1y joined #perl6
14:22 TimToady blurg
14:22 pmurias ruoso: you have seen the leak in make test in re-smop?
14:22 ruoso no
14:23 lichtkind joined #perl6
14:23 * ruoso looking
14:23 lichtkind hallo
14:24 * pmurias fixing warnings cause by make in re-smop
14:24 pmurias lichtkind: hi
14:26 patmat is there a perl6.vim for auto completion and colors? i use gvim, it would be nice
14:28 LadyLuna1y http://www.pastie.org/480081 can anyone tell me, why he skips the elsif?
14:28 ruoso pmurias, hmmm... interesting that only the inner hash leaks which means that the outer hash is being destroyed...
14:30 skids_ joined #perl6
14:32 ruoso aha! pmurias we were running valgrind without the --show-reachable=yes
14:32 TimToady LadyLunacy: ich weiss nicht was sol es bedeutet
14:32 LadyLunacy uh
14:32 TimToady I don't know what it means
14:32 nihiliad joined #perl6
14:32 LadyLunacy i think i got it ^^^
14:32 LadyLunacy forgot the prompt
14:32 LadyLunacy sry for bothering :D
14:33 TimToady that's okay, brought back fond memories of studying German 35 years ago
14:34 TimToady well, closer to 40 now...
14:35 mberends patmat: there is pugs/util/perl6.vim
14:35 pugs_svn r26849 | ruoso++ | [re-smop] --show-reachable=yes in valgrind so we dont fool ourselves
14:35 mberends patmat: I'd like to try it too, how do you tell gvim to use it?
14:35 pugs_svn r26850 | ruoso++ | [re-smop] oops... forgot to commit only one file instead of also committing the debug messages
14:37 pugs_svn r26851 | pmurias++ | [re-smop] fix some warnings
14:37 patmat mberends i think the problem is, that perl5 and perl6 both use a .pl ending
14:38 patmat gvim knows which plugin it should use because of the ending,right?
14:38 pmurias you can mark it explicitly too
14:39 pmurias ruoso: the valgrind error messages are a lot more sane now
14:39 ruoso yeah...
14:41 LadyLunacy TimToady, well your german respond was quite well :)
14:43 fridim_ joined #perl6
14:43 DemoPhreak joined #perl6
14:44 ruoso valgrind could have an option to created a directed graph on the reachable pointers
14:54 pmurias ruoso: it should, but do you think it's worth for us to write a tool which creates one?
14:55 masak (syntax colouring based on file ending)--
14:55 ruoso hmm... not sure... but maybe we should get the old SMOP_LOWLEVEL_MEM_TRACE on
14:59 TimToady jnthn: re pick, see S32-setting-library/Containers.pod:215
14:59 ruoso pmurias, I'm getting convinced the problem is in the outer m0ld being run....
14:59 lichtkind TimToady: howdy, will there be substitute for prefix:<=> ?
14:59 ruoso pmurias, the leaks in adhoc_signature.t are mostly related to the items used in the outer mold
14:59 TimToady get
15:00 TimToady or lines, if you want 'em all
15:00 TimToady rakudo: say +$*IN.lines
15:00 pmurias ruoso: the problem = ?
15:01 p6eval rakudo ec55f1: OUTPUT«24␤»
15:01 * ruoso thinks "lines" is too string-specific... Iterator is something more generic then that
15:01 TimToady rakudo: say +$*IN.lines.reverse
15:01 p6eval rakudo ec55f1: OUTPUT«24␤»
15:01 TimToady rakudo: say +$*IN.lines.flip
15:01 p6eval rakudo ec55f1:  ( no output )
15:01 TimToady o_O
15:01 ruoso pmurias, the leaks
15:02 TimToady rakudo: say (+$*IN.lines).flip
15:02 p6eval rakudo ec55f1: OUTPUT«42␤»
15:02 TimToady ruoso: lines is documentation, we can certainly provide owtdi
15:03 lichtkind TimToady: yes that i know but i mean a real iconographic operator will not reemerge?
15:03 TimToady not in standard p6
15:03 ruoso while I miss the iconographic operator... prefix:<=> was really visually disturbing
15:03 ruoso $a = =$b
15:04 TimToady it was too huffmanized, actually
15:04 ruoso yeah... in fact most people should be using <== and ==> most of the time
15:04 lichtkind TimToady: what you mean by that?
15:04 TimToady we don't actually want to encourage people to process their iterators one element at a time if there's a way to do it as a list
15:04 ruoso the Iterator API is not supposed to be used directly
15:05 ruoso it's just how you provide your custom Iterator
15:05 TimToady lazy lists for lazy people :)
15:05 ruoso or when it's not really a list... but just a stream
15:06 ruoso caching the earlier results of a stream would be the role of a lazy list connected to your iterator
15:09 ruoso pmurias, the leak is probably being caused by the boilerplate... all leaks in the re-smop tests look the same...
15:09 nbrown_ joined #perl6
15:09 ruoso the leaks in different tests are the same, I mean
15:10 pmurias i'm currently fighting the lostframe.t leak
15:10 ruoso pmurias, oops... I've fixed that already
15:10 ruoso pmurias, forgot to commit... sorry
15:11 pugs_svn r26852 | ruoso++ | [re-smop] fix lost.t leak
15:14 pugs_svn r26853 | pmurias++ | [re-smop] fixed some more warnings
15:17 nbrown_ joined #perl6
15:19 pmurias ruoso: i broke mildew... fixing
15:20 donaldh joined #perl6
15:21 jferrero joined #perl6
15:22 ruoso pmurias, going for lunch... I realized the leaks are caused by init and destr themselves...
15:22 ruoso if you just init and destr every module as the boilerplate does, it already shows the leaks
15:23 pugs_svn r26854 | pmurias++ | [re-smop] undo mildew breakage in last commit
15:24 lichtkind TimToady: was the R meta op forced upon you ?
15:24 ruoso pmurias, s1p_init and s1p_destr are causing 10 leaks
15:24 ruoso and p6opaque is causing another
15:24 ruoso just the init and destr code by themselves
15:24 * ruoso lunch &
15:24 lichtkind btw is there a reversed R in unicode? :)
15:37 pugs_svn r26855 | pmurias++ | [re-smop] fix too small leaks
15:38 s1n ruoso: is there a good page explaining how the whole smop system is set up?
15:38 s1n i always kinda wanted to play with it, but it was kinda difficult to know what was current and what each of the modules did
15:39 mberends lichtkind: Ǝᴚ∩S ;) http://www.fileformat.info/convert/text/upside-down.htm
15:39 icwiener_ joined #perl6
15:40 lichtkind mberends: danke, but looked for just mirrored not upside down
15:41 Psyche^ joined #perl6
15:46 mberends lichtkind: ᴙ (U+1D19 LATIN LETTER SMALL CAPITAL REVERSED R)
15:46 mberends and ʁ to complete the set
15:48 pmurias s1n: you can look at re-smop/README which has an rought explanation of what the different parts are
15:49 mberends rakudo: say "\c[LATIN LETTER SMALL CAPITAL REVERSED R]"
15:49 p6eval rakudo ec55f1: OUTPUT«ᴙ␤»
15:50 mberends rakudo: print "\c[LATIN LETTER CAPITAL REVERSED R]"
15:50 p6eval rakudo ec55f1: OUTPUT«perl6regex parse error: Unrecognized character name LATIN LETTER CAPITAL REVERSED R at offset 10, found 'L'␤in Main (src/gen_setting.pm:0)␤»
15:50 mberends rakudo: print "\c[LATIN LETTER SMALL CAPITAL REVERSED R]"
15:50 p6eval rakudo ec55f1: OUTPUT«ᴙ»
16:04 s1n doh, i just missed pmurias
16:09 patmat do you recommend Padre for Perl6? Or doesn't it work well?
16:10 mberends I recommend Padre, szabgab++ showed it working very well at NPW
16:11 patmat i have Ubuntu and there isnt a package yet? :(
16:12 mberends :( building it yourself is quite hard. Debian Testing (sid) has a package.
16:12 patmat yes i know :( even FC i think, but no Ubuntu grrr
16:12 patmat http://www.perlmonks.org/?node_id=704052 that would do it?
16:13 frew|work joined #perl6
16:14 mberends It looks promising. Padre depends on many other recent libraries, getting those right often hinders people.
16:15 mberends that Perlmonks one is seriously out of date by Padre standards
16:16 patmat oh? ok i wont use it then
16:16 patmat try to build it myself maybe :/
16:16 TimToady lichtkind: why would you think that R was forced?  it was just an obvious generalization of some specific things we were struggling with earlier
16:17 TimToady and thus chosen willingly
16:18 patmat mberends: i try to build it with cpan, lets see!!
16:18 mberends patmat: is may not be easy, I gave up on Debian Stable :(
16:19 szabgab patmat, jump over to #padre if you need help ( irc.perl.org )
16:19 mberends *it
16:19 mberends szabgab++
16:19 szabgab mberends, you too :-)
16:19 mberends yes, sir!
16:20 szabgab Alias and tsee are over there now and can help you
16:20 szabgab I am off to dinner&
16:20 vx64z joined #perl6
16:22 patmat great i will join the channel if cpan doesnt work
16:23 aindilis joined #perl6
16:38 justatheory joined #perl6
16:41 dukeleto joined #perl6
16:41 dukeleto_ joined #perl6
16:46 lichtkind TimToady: it looked like the idea was not from your head
16:57 masak` joined #perl6
16:59 payload joined #perl6
17:02 jnthn masak`: ping
17:03 masak` jnthn: pong.
17:04 masak` rakudo: for 1..3 { LAST { say $_ } }
17:04 p6eval rakudo ec55f1: OUTPUT«Could not find non-existent sub LAST␤»
17:04 jnthn masak`: If I'm hacking on some modules, is it gets to create a separate git repo per module, or is it OK to have one repo with directories for each module?
17:05 jnthn That is, will I upset proto by having one repo with many modules?
17:05 jnthn I notice you seem to have a repo for each module / project, but wondered if that was convenience/how you like it, or because that's what works.
17:05 masak` jnthn: well...
17:06 jnthn erm, is it *better* to...
17:06 masak` jnthn: I tend to start with all modules in one repo.
17:06 jnthn Ah, OK.
17:06 masak` and then, when I need to, I separate them out.
17:07 jnthn OK, but if I have one repo with a few modules in, that I think should be separately installable, will proto handle them as individual modules?
17:07 masak` defined 'installable'.
17:07 mberends jnthn: git retrieves a whole repo together, such as perl6-examples, resulting in too much clutter.
17:07 masak` s/ed/e/
17:07 jnthn mberends: Oh, that's a very good point...
17:08 jnthn masak`: Well, I'm not sure I can - I never played with the installer. :-)
17:08 jnthn masak`: I'm just asking you as someone who wrote quite a few already, what the Best Practice is.
17:08 masak` jnthn: you'll get a project, all-or-nothing.
17:08 masak` jnthn: we don't have Best Practices, just Well-Thought-Out practices. :P
17:08 mberends gitorious has just begun a 2-tier hierarchy, project then repository, and you download a repository only. proto does not support that yet.
17:09 jnthn masak`: OK, I think best is I put unrelated things in their own repo.
17:09 jnthn And maybe have another repo for things I'm playing with that I don't expect to go far.
17:09 jnthn A public dumping place. :-)
17:10 masak` sounds like a plan.
17:10 masak` I have a number of small local repos with toy ideas, and which I don't know if I'll ever push.
17:10 * jnthn thinks it's time that he started using Rakudo to see how it feels from a user perspective.
17:11 masak` jnthn: on a scale from easy to hard, how hard would it be to implement LAST {} ?
17:11 masak` jnthn: I'm thinking of having a go.
17:11 * jnthn checks the spec...
17:11 jnthn s04 yes?
17:11 masak` aye.
17:12 M_o_C joined #perl6
17:12 jnthn Ah, so it just runs at the end of the loop overall?
17:13 masak` there's a bit of ambiguity there, actually.
17:13 jnthn Yeah
17:13 jnthn Hmm. It looks like it should be control-exception-y.
17:13 masak` does it only run upon normal termination, or also when things like 'last' and 'return' are called?
17:13 jnthn Yeah, that was what I was wondering.
17:14 * masak` wishes there were a NONLAST { ... } block
17:15 jnthn masak: I'm not quite sure how that'd be done...it may be as simple as installing a typed exception handler to catch explicit "last"s, but making sure it happens in other cases if it needs to as well as in non-exceptional loop termination, not quite so sure.
17:16 jnthn I'm pretty weak on the whole control flow stuff - Tene++ is the guy in the know in this area.
17:16 Tene I am!
17:16 Tene jnthn is exactly right here.
17:17 jnthn Tene: On the typed exception handler bit?
17:17 mberends jnthn: S04 LAST suggests it's called under all circumstances.
17:17 masak mberends: it says 'loop termination'. which might be ambiguous.
17:17 Tene jnthn: if it happens on all loop exits, it doesn't need to catch 'last' specifically, depending on how it's written.
17:18 sri_kraih joined #perl6
17:18 Tene but it certainly could be a typed EH, with a label that is jump'd to on normal loop termination, oslt
17:18 masak so this prints "OH HAI"? sub foo { for 1..1e3 { LAST { say "OH HAI"; } return } }
17:20 jnthn masak: It depends what your definition of "is"^W"loop termination" is.
17:20 mberends jnthn: no-one will blame you for assuming the most likely interpretation
17:20 masak jnthn: "yes".
17:20 masak mberends: which is the most likely interpretation?
17:20 jnthn I guess if you return from a loop then the loop is terminated.
17:21 masak one could argue it is, yes. :)
17:22 jnthn mberends: It's very clear on the semantics of NEXT and abnormal termination.
17:22 jnthn But it seems less clear on LAST.
17:22 mberends masak: "my" interpretation ;) [every exit]
17:22 masak on the other hand, a 'take' in a loop does not interrupt the loop, it just pauses it.
17:22 masak mberends: :)
17:22 jnthn I'm not sure take is relevant here.
17:22 masak maybe not.
17:22 jnthn LAST {...}       at loop termination time, after any LEAVE
17:23 masak depends on how it will do the lazy thing.
17:23 jnthn "after any LEAVE" is the key here I think.
17:23 jnthn And I am pretty sure we run the LEAVE no matter how we leave the block.
17:23 masak why?
17:23 masak well, 'any' can have different meanings here... :P
17:23 jnthn Yeah, I was just realizing that after I wrote it...
17:23 Tene jnthn: even leave() ?
17:23 Tene ;)
17:24 jnthn Tene: I've pretty sure explicitly leaving a block *should* run LEAVE. :-)
17:24 * masak 's head swims slightly
17:24 jnthn Tene: S04 could just be implying an ordering rather than a promise of execution here though. Hmm.
17:24 masak exactly.
17:24 masak well put.
17:25 masak so the quantum wave is still uncollapsed.
17:25 jnthn There's always a chance it'll collapse when it interacts with a TimToady.
17:26 masak our own Schrodinger's kitten herder. :)
17:26 masak LOL, I CAN HAZ... *collapse*
17:27 jnthn Surely that's after the collapse, and before kitteh knows not if it can haz? ;-)
17:28 jnthn .oO( the places trying to understand the Perl 6 spec leads us... )
17:29 masak http://abstrusegoose.com/7 # I might have shown this one before. :)
17:29 ejs joined #perl6
17:29 jnthn :D
17:30 ruoso s1n, hi
17:31 mib_y5l561 joined #perl6
17:31 s1n ruoso: hi
17:32 mib_y5l561 MAC ATICAK TEAM SERVER ON
17:32 s1n ruoso: i read the README as per pmurias' recommendation, there are _tons_ of parts to re-smop
17:33 ruoso s1n, it has been a long way
17:35 ruoso s1n, the lowdoc is an interesting source for catching up
17:36 Chillance joined #perl6
17:36 * s1n goes off reading
17:38 mib_nozrjs joined #perl6
17:42 harig joined #perl6
17:43 s1n ruoso: this is all probably over my head :/
17:44 s1n ruoso: this responderinterface sounds like smalltalk's message passing...
17:45 ruoso s1n, smalltalk was indeed one of the influences
17:45 FurnaceBoy joined #perl6
17:49 s1n ruoso: there seems to be a heavy dependence on macros, has that been a PITA to debug?
17:49 payload1 joined #perl6
17:50 ruoso the refcount gc is the worse part to debug... the macros are sometimes actually helpfull, so you can place the debug in the macro itself
17:50 ruoso but the macros are very lightweight
17:51 ruoso but keeping a refcount gc will be a key aspect to support p5 integration
17:51 ZuLuuuuuu joined #perl6
17:54 mikehh_ joined #perl6
17:54 araujo joined #perl6
17:55 rhr joined #perl6
17:56 finanalyst left #perl6
17:59 pmurias joined #perl6
18:01 s1n ruoso, pmurias: if i wanted to hack on smop, where would you recommend?
18:04 ruoso s1n, I think the part that would be easier to mess with would be mildew
18:04 ruoso which is the compiler that uses STD as parser and targets smop as backends
18:05 TimToady jnthn: S04:1122 discusses the semantics of LAST
18:06 TimToady grep is your friend
18:06 TimToady groceries &
18:06 mikehh_ /nick mikehh
18:14 s1n ruoso: what needs to be done there?
18:15 ruoso there's no much support for lists yet
18:15 ruoso s1n, start by creating a test in the ROADMAP DIR
18:16 ruoso like for @a := 1,2,3
18:16 ruoso s1n, in the re-mildew dir
18:17 ungluecksfee joined #perl6
18:17 s1n ruoso: okay, not really sure where to begin adding lists....
18:18 s1n i.e. where is scalar defined so i can see how that works?
18:20 pmurias perl6: say "1"
18:20 p6eval elf 26855, pugs, rakudo ec55f1: OUTPUT«1␤»
18:20 eMaX moin
18:20 eMaX kurzte frage
18:20 eMaX anyone knows how to get Term::ReadKey to work on windows?
18:21 eMaX I've got a small app (mytop) that I want to run in a windows env
18:21 masak eMaX: hello, this is #perl6.
18:21 ruoso s1n, take a look at the re-mildew/src/VAST/*.pm
18:21 masak eMaX: we are very happy to answer question on Perl 6.
18:21 masak eMaX: your question sounds like a Perl 5 question.
18:21 masak eMaX: there are other fora for that.
18:21 ruoso s1n, you'll see how the parse tree is turned into mildew AST
18:22 ruoso mildew: say "Hello from mildew!"
18:22 p6eval mildew: OUTPUT«Bareword found where operator expected at perl6-snapshot/STD.pm line 4, near "$LANG is"␤  (Missing operator before is?)␤Bareword found where operator expected at perl6-snapshot/STD.pm line 5, near "$PKGDECL is"␤   (Missing operator before is?)␤Bareword found where operator expected
18:22 p6eval .....
18:22 ruoso pmurias, it seems that a "make" is missing in the evalbot
18:22 pmurias ruoso: the Scalar itself is defined in re-smop/s1p/src/scalar.ri
18:22 ruoso s1n, ^
18:24 s1n pmurias: looks like some macro magic :)
18:24 pmurias it's written in the RI DSL as defined in tool/ri
18:25 pmurias we use it to avoid copy & paste and hardcoded bytecode magic
18:25 s1n mildew: my $a;
18:25 p6eval mildew: OUTPUT«Bareword found where operator expected at perl6-snapshot/STD.pm line 4, near "$LANG is"␤  (Missing operator before is?)␤Bareword found where operator expected at perl6-snapshot/STD.pm line 5, near "$PKGDECL is"␤   (Missing operator before is?)␤Bareword found where operator expected
18:25 p6eval .....
18:25 s1n oh yeah heh
18:27 s1n RI's DSL looks like C with some shortcuts
18:27 * pmurias is fixing the evalbot atm
18:27 pmurias s1n: that's basicly what it is
18:27 s1n this is interesting but kinda tough to make heads from tails
18:28 pmurias looking at the the post proccesed code in build/s1p/src/scalar.c can help figuring out what it does
18:30 s1n pmurias: ooo, it re-smop needs ghc? i don't have that...
18:30 ruoso s1n, are you in a linux machine?
18:30 s1n ruoso: yup
18:30 ruoso which linux?
18:30 s1n gentoo, bout 3 month old portage
18:31 ruoso hmm
18:31 s1n last i checked, ghc was having problems so i removed it
18:31 PacoLinux joined #perl6
18:31 ruoso getting ghc in gentoo will be a challenge
18:31 s1n yes, it was, that's why i removed it
18:31 ruoso s1n, are you familiar with Parse::RecDescent?
18:31 s1n ruoso: barely, i know of it
18:31 ruoso s1n, well... you could drop the dependency of haskelll
18:31 ruoso you just need to write the m0ld compiler in p5
18:32 masak jnthn: ping
18:32 s1n ruoso: is m0ld supposed to be ebnf?
18:32 s1n ruoso: and if i rewrite the compiler, what is it supposed to output? perl5?
18:33 ruoso the C code to initialize the mold bytecode
18:33 s1n ruoso: hmm, interesting, can you gist some built C code?
18:33 ruoso yes
18:35 ruoso http://gist.github.com/112765
18:35 ruoso first you have the constants
18:35 ruoso then you have the bytecode
18:35 s1n so it really generates bytecode?
18:36 ruoso yes
18:36 ruoso http://gist.github.com/112766
18:36 ruoso ^ the m0ld code that generated the bytecode above
18:37 ruoso if you understand a bit of haskell you can see the m0ld source in haskell today
18:37 s1n i don't know (or really care to) know haskell
18:37 pmurias haskell is way cool :)
18:38 ruoso haskell is cool, but I can't really understand its synta
18:38 s1n but the bytecode is converted into m0ld in that gist?
18:38 ruoso the m0ld is converted into bytecoe
18:38 ruoso (the second is the first to the first gist)
18:38 ruoso gah
18:38 ruoso (the second is the source to the first gist)
18:39 s1n so the second gist is turned into the first gist?
18:41 ruoso yes
18:41 ruoso s1n, you probably want to look at re-smop/mold/src/mold.c
18:41 ruoso which is the interpreter code
18:42 s1n all these terms and parts to the system... head is swimming in clever names
18:42 ruoso s1n, around line 285
18:43 s1n smop_mold_frame_message i assume is basically going to pass a message ala smalltalk
18:43 pmurias it handles the message
18:45 s1n ruoso, pmurias: do you guys have a hard time attracting new developers?
18:46 Whiteknight joined #perl6
18:46 pmurias i haven't really tried that yet
18:47 s1n i ask because i had always wanted to help with a c/c++ compiler/interpreter but smop looks like it has a sufficiently steep learning curve
18:57 ruoso every compiler has...
18:59 s1n ruoso: you're probably right, i've never worked on one :/
19:05 pmurias the learning curve to smop isn't very long OTOH, most of what the runtime does is defining and running methods
19:14 lichtkind how long is moritz chief of test suite?
19:20 donaldh joined #perl6
19:34 eMaX thanks
19:41 Whiteknight joined #perl6
19:48 patmat joined #perl6
20:10 jdlugosz joined #perl6
20:10 jdlugosz Hello y'all
20:12 mberends hi!
20:13 jdlugosz Anyone around here listening?  I see a huge list, but I'm guessing they just stay logged in.
20:14 patmat not true!
20:14 patmat here is a lot going on!
20:15 mberends :) too many people watching Eurovision song contest?
20:15 jdlugosz something with my connection then?  I see only 5 lines since I came in.
20:15 TimToady jdlugosz: welcome!
20:15 jdlugosz Thanks, @Tim.
20:16 jdlugosz Anyone here using Windows?  I think I could do with a better IRC client, or at least some configuration advice for mIRC.
20:16 mberends jdlugosz: http://irclog.perlgeek.de/perl6/today
20:16 TimToady I believe jnthn is doing most of his rakudo devel on windows
20:16 jnthn Aye, I am.
20:16 jnthn But I have an account on feather
20:17 jnthn And use PuTTY (SSH client) to connect to that, and connect from there to IRC.
20:17 jnthn So I'm not actually using a Windows IRC client...
20:17 TimToady many of us with flakey connections tend to use ssh to some more stable machine
20:17 jnthn Aye, + screen.
20:18 TimToady then you can detach and reattach to the same session
20:18 jnthn jdlugosz: I did use XChat at one point. It was ugly, but kinda worked...
20:18 jdlugosz mIRC appears to be not free after all, and is cutting off the decenders of my input line, making me keep thinking I have typos and backspacing to retype the same thing.  Most annoying.
20:19 jnthn failsoft.
20:19 jnthn I don't remember XChat being quite that annoying
20:19 jnthn Even if it wasn't perfect.
20:19 jnthn http://www.xchat.org/
20:20 jdlugosz Anyway, I just (or rather, Anuwau. I iust !) finished doing a DIFF on S02 from a copy 1 year ago.
20:21 jdlugosz Can someone help me catch up on "what became of prefix = and iterators"?  Or is that just for IO?
20:23 mberends .get and .lines
20:23 TimToady prefix:<=> was deemed too ugly to teach to newbies, and dehuffmanized to .get
20:23 jnthn prefix:<=>'s behavior in different contexts was also causing some issues.
20:24 jdlugosz I suppose you could still use term:<?> as an alias.  Does unicode work on this IRC thing?
20:25 jdlugosz I guess not.
20:25 TimToady term:<?> would cause parsing ambiguity with prefix:<?>
20:25 jdlugosz See my page on <http://www.dlugosz.com/Perl6/web/APL.html>
20:25 TimToady yes, if you're client is set to utf-8
20:26 TimToady ☺ should be a smiley
20:26 jdlugosz @Tim: the ? is a encoding munge.  I really typed a U+235E.
20:26 TimToady ⍞, that would be in utf-8
20:27 TimToady but we're trying to avoid things outside Latin-1 range for standard p6
20:27 TimToady it's fine if libraries bring those in though
20:27 jdlugosz I'm joking, mostly.  I wrote a page on APL-izing Perl 6.
20:27 TimToady "use Set" is likely to bring in set ops, for instance
20:28 TimToady oh we never joke here... ;)
20:28 jdlugosz Joke idea, but goes over custom operators and terms, and functions to modify other functions.
20:28 TimToady have you seen the periodic table of the operators?
20:28 jdlugosz So .get is the generic iterate-one-item thing now?
20:28 TimToady yes
20:29 jdlugosz No, never seen periodic table of operators.
20:29 jdlugosz And rather than behaving differently in list context, .lines is a different function?
20:29 TimToady there's a link to it from http://perl6-projects.org
20:29 TimToady correct
20:29 TimToady and intentionally named as a noun rather than a verb
20:30 TimToady so that people will think of the set of lines as something to work with
20:30 TimToady we're doing all sorts of subtle things to encourage list processing over scalar processing
20:30 jdlugosz What about a specific number of lines?  $a,$b,$c = $IN.get;  ?  Or .lines?  Or what?
20:31 TimToady .lines(42) works
20:31 TimToady so my ($a,$b,$c) = $*IN.lines(3)
20:31 jdlugosz .lines(42) but you have to count the things on the left yourself.
20:31 TimToady yes
20:32 jdlugosz It's not behaving as a lazy list/iterator itself, even though that's the primitive for iterators?
20:32 TimToady but lines() is lazy, so if you want to just throw the rest away, that's fine
20:32 jdlugosz Oh, so lines doesn't advance, it's the whole collection?
20:33 TimToady yes, it's intended to refer to the whole collection
20:33 jdlugosz Stupid mIRC doesn't copy text from output window!!
20:33 jdlugosz So .lines again will give the same items.
20:34 TimToady uh, it's up to the filehandle to keep state on that, I expect
20:34 jdlugosz That's why it's a noun, and get is a verb.
20:34 TimToady so .lines(3) would give you the next three lines
20:35 TimToady but that's just a shortcut for get;get;get really
20:35 jdlugosz So it shifts the collection, rather than being the collection.
20:35 TimToady it modifies a mutable view of the collection
20:36 jdlugosz So you're counting on the lazyness saving the side-effect of advancing the pointer.
20:36 jdlugosz my ($a, $b, $c) = $*IN.lines;
20:36 TimToady that would thrown all the rest away, I think
20:36 jdlugosz my ($a, $b, $c) = $*IN.lines(*);
20:37 TimToady that could be made to work, possibly
20:37 jdlugosz It would work by returning the kind of iterator that I expected $*IN to be in the first place.
20:38 TimToady except, of course, that $*IN in a list context doesn't do anything
20:39 jdlugosz my @list = $*IN.lines;
20:39 jferrero joined #perl6
20:39 TimToady that's all of 'em
20:40 jdlugosz due to lazyness, it should read from the file and consume memory only if/when they are used from the front of the list.
20:40 TimToady but @list can do it lazily
20:40 TimToady if it decides .lines is potentially infinite
20:40 TimToady we don't enforce strict laziness
20:40 TimToady the implementation of an iterator is allowed to work ahead in batches
20:40 jdlugosz Sure, it reads ahead as many as it feels like.
20:41 jdlugosz A lazy list of "made of" iterators, that are cranked to produce more items.
20:42 TimToady it's turtles down however far you like it to be :)
20:42 jdlugosz So what is .lines returning other than a lazy list, containing the iterator, when $*IN is the iterator itself?
20:42 jdlugosz So .lines just packages self up as a lazy list.
20:43 TimToady $*IN isn't the iterator; it contains the iterator
20:43 jdlugosz OK, like $x isn't a dog, it's an item containing a dog.  But an item container is mostly invisible.
20:43 TimToady $foo is always one level of indirection from the "naked" object
20:44 TimToady not invisible in list context
20:44 jdlugosz I'm familiar with that.
20:44 TimToady so in fact, you can say @$*IN to get the same effect as .lines
20:44 TimToady but .lines is deemed to be good documentation
20:44 jdlugosz Ah, so you can do that, just not (no longer?) implicitly.
20:45 TimToady never was implicit, really
20:45 TimToady it was just = before
20:45 jdlugosz Which reminds me... I see changes in using the sigils are operators or tokens or whatever by themselves
20:45 jdlugosz Is @$x different from @ $x ?
20:46 TimToady the latter is now illegal
20:46 TimToady std: @ $x
20:46 p6eval std 26855: OUTPUT«##### PARSE FAILED #####␤Anonymous variable requires declarator at /tmp/3ZqUQ5hZd0 line 1:␤------> [32m[31m@ $x[0m␤    expecting any of:␤ prefix or noun␤   statement list␤   variable␤       whitespace␤FAILED 00:02 36m␤»
20:46 TimToady to catch when people say:
20:46 TimToady std: my ($a, $, @x) = 1,2,3
20:46 p6eval std 26855: OUTPUT«ok 00:02 38m␤»
20:46 TimToady but leave out the my
20:46 TimToady std: ($a, $, @x) = 1,2,3
20:47 p6eval std 26855: OUTPUT«##### PARSE FAILED #####␤Obsolete use of $, variable; in Perl 6 please use .join() method instead at /tmp/cs3zDLqfNz line 1:␤------> [32m($a, $,[31m @x) = 1,2,3[0m␤Other potential difficulties:␤  Variable $a is not predeclared at /tmp/cs3zDLqfNz line 1:␤------> [32m($a[31m,
20:47 p6eval .....
20:47 TimToady ooh, wrong message :)
20:47 TimToady but you get the idea
20:47 TimToady std: ($a, $ , @x) = 1,2,3
20:47 p6eval std 26855: OUTPUT«##### PARSE FAILED #####␤Anonymous variable requires declarator at /tmp/OlaOPrdR6L line 1:␤------> [32m($a, [31m$ , @x) = 1,2,3[0m␤    expecting any of:␤ null term␤        variable␤Other potential difficulties:␤  Variable $a is not predeclared at /tmp/OlaOPrdR6L line 1:␤------>
20:47 p6eval ..[32m...
20:47 TimToady I'll have to de-emphasize the $, message
20:48 jdlugosz (reviewing s02) OK, I see.  @ prefix with no space is equivilent to ARRAY operator.  And that's the end of it.
20:48 literal why was lvalue undef replaced with $ ?
20:49 TimToady it wasn't
20:49 TimToady it was replaced with *
20:49 TimToady std: ($a, *, $c) = 1,2,3
20:49 p6eval std 26855: OUTPUT«Potential difficulties:␤  Variable $a is not predeclared at /tmp/n5fLZ7hbmB line 1:␤------> [32m($a[31m, *, $c) = 1,2,3[0m␤  Variable $c is not predeclared at /tmp/n5fLZ7hbmB line 1:␤------> [32m($a, *, $c[31m) = 1,2,3[0m␤ok 00:02 37m␤»
20:49 literal oh, right
20:50 TimToady errands, back in about .5 hour
20:50 TimToady &
20:50 jdlugosz My diff digesting confuses me a bit.  Gotta remember what's coming and what's going. <g>.
20:50 TimToady feel free to ask questions, I'll backlog
20:50 literal std: ($first, *, $third_or_fifth) = 1,2,3,4,5
20:50 p6eval std 26855: OUTPUT«Potential difficulties:␤  Variable $first is not predeclared at /tmp/K3LnL6f4rs line 1:␤------> [32m($first[31m, *, $third_or_fifth) = 1,2,3,4,5[0m␤  Variable $third_or_fifth is not predeclared at /tmp/K3LnL6f4rs line 1:␤------> [32m($first, *, $third_or_fifth[31m) =
20:50 p6eval ..1,2,3,4...
20:51 literal std: my $first, $third_or_fifth; ($first, *, $third_or_fifth) = 1,2,3,4,5
20:51 p6eval std 26855: OUTPUT«Potential difficulties:␤  Variable $third_or_fifth is not predeclared at /tmp/xnYOIKBmcS line 1:␤------> [32mmy $first, $third_or_fifth[31m; ($first, *, $third_or_fifth) = 1,2,3,4[0m␤  Variable $third_or_fifth is not predeclared at /tmp/xnYOIKBmcS line 1:␤------>
20:51 p6eval ..[32mrd_or_fi...
20:52 literal mkay
21:06 CMA_ joined #perl6
21:11 c9s_ joined #perl6
21:12 CMA joined #perl6
21:16 Kisu joined #perl6
21:47 ruoso pmurias, aha! finally
21:48 ruoso -%DESTORYALL {
21:48 ruoso +%DESTROYALL {
21:50 Kisu joined #perl6
21:50 pugs_svn r26856 | ruoso++ | [re-smop] fix one important leak... now we got down to 3 errors instead of 11;
22:04 pugs_svn r26857 | ruoso++ | [re-smop] fix more leaks... now we have just 2 errors that are not memory leaks
22:08 pina joined #perl6
22:08 pina so what do you guys think of the wolfram alpha
22:09 pugs_svn r26858 | ruoso++ | [re-smop] hmmm... the errors I was aware were fixed, but now oone test is showing other errors...
22:09 pina pretty cool it can check ip addresses
22:13 wormphlegm joined #perl6
22:13 pugs_svn r26859 | ruoso++ | [re-smop] last test passing... no valgrind errors or warnings!
22:16 cspencer joined #perl6
22:18 lichtkind_ joined #perl6
22:19 Lunacy joined #perl6
22:20 literal pina: what do you think of Wolfram Beta? http://www.wolframsbeta.com/
22:22 pina whats with beta
22:24 cspencer are there known failures in the spectest suite? (specifically in t/spec/S04-statements/do.t)
22:25 jnthn cspencer: That one appeared a couple of days back.
22:25 cspencer jnthn: okay, thank you :)
22:25 jnthn cspencer: Not sure what's wrong with it, but it's not just you that's seeing it.
22:27 cspencer jnthn: good to hear, i'd just pulled into a branch with modifications and wasn't sure if it was changes i'd made
22:28 jnthn :-)
22:29 cspencer jnthn: it's nice to see that infix/posfix/etc operators can be define now :)
22:29 cspencer s/define/defined/
22:30 pmurias ruoso: not having memory leaks in the re-smop is very nice :)
22:30 ruoso indeed...
22:30 justatheory joined #perl6
22:30 ruoso pmurias, now we just need to do the same in mildew...
22:30 eternaleye I have no idea how someone that stupid has not autodarwinated yet.
22:30 eternaleye Gah, dang up arrow
22:31 jnthn ...
22:31 jnthn :-)
22:31 eternaleye Backogging, and I forgot to hold down Shift. Also, (shared input buffer between channels)--
22:32 jnthn At least it wasn't like, "I put on my coat and wizzard hat."
22:33 eternaleye Yeah, bloodninja quotes would not be good
22:40 ruoso rakudo: say False
22:40 p6eval rakudo ec55f1: OUTPUT«0␤»
22:41 ruoso rakudo: say ~False
22:41 p6eval rakudo ec55f1: OUTPUT«0␤»
22:41 ruoso hmm...
22:41 pugs_svn r26860 | ruoso++ | [re-smop] native bool implements Str
22:41 * ruoso just noticed it was wrongly implemented...
22:41 ruoso mildew: say False
22:41 p6eval mildew: OUTPUT«Bareword found where operator expected at perl6-snapshot/STD.pm line 4, near "$LANG is"␤  (Missing operator before is?)␤Bareword found where operator expected at perl6-snapshot/STD.pm line 5, near "$PKGDECL is"␤   (Missing operator before is?)␤Bareword found where operator expected
22:41 p6eval .....
22:41 ruoso meh
22:41 * ruoso later &
23:04 jun1 joined #perl6
23:04 jun1 left #perl6
23:11 ruoso joined #perl6
23:21 donaldh joined #perl6
23:48 CMA joined #perl6
23:51 icwiener-_- joined #perl6

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

Perl 6 | Reference Documentation | Rakudo