Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-05-20

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 toshinori joined #perl6
00:05 mr_ank joined #perl6
00:12 ggoebel joined #perl6
01:14 trunix joined #perl6
01:30 buetow joined #perl6
01:54 Aankhen`` joined #perl6
01:55 buetow joined #perl6
02:06 nicodaemos joined #perl6
02:14 nperez joined #perl6
02:44 amnesiac joined #perl6
02:57 kanru joined #perl6
03:03 [particle] joined #perl6
03:06 kanru joined #perl6
03:50 amnesiac joined #perl6
03:51 catch23 left #perl6
03:54 SCalimlim joined #perl6
03:59 dominix joined #perl6
04:02 dominix left #perl6
04:14 SCalimlim joined #perl6
04:14 Daveman joined #perl6
04:15 Talaman72 joined #perl6
04:17 zamolxes joined #perl6
04:19 Talaman72 hello
04:37 svnbot6 r16459 | Darren_Duncan++ | ext/QDRDBMS/ : added new test file t/QDR_10_AST.t ; fixed a kind of bug in AST.pm that it uncovered
04:49 Aankhen`` What is the Perl 6 equivalent of XS modules?
04:49 svnbot6 r16460 | Darren_Duncan++ | ext/QDRDBMS/ : fixed same kind of bug in QDRDBMS.pm, PhysType.pm
04:50 dduncan depends on implementation
04:50 dduncan for Pugs, its Haskell modules
04:50 Aankhen`` So no universal equivalent, then?
04:50 dduncan for v6.pm, its Perl 5 modules
04:50 Aankhen`` I mean, what would you package with your distro on Perl 6's CPAN?
04:50 dduncan for Parrot, its .pmc files or such
04:51 dduncan so you don't want to know about XS files, but rather how to package Perl 6 for CPAN?
04:51 Aankhen`` Hmm.
04:51 Aankhen`` Let me see if I can rephrase my question.
04:52 dduncan only code written *in* Perl 6 is universal
04:53 dduncan are you asking how to talk to C libraries?
04:54 Aankhen`` In Perl 5, XS modules are generally used where more close-to-the-metal implementations are required, whether for speed or to do things that are masked by the higher-level language.  Since there is only the one implementation of Perl 5, the XS portions can be packaged with any distribution, and (assuming the presence of a proper environment to build them in) used by any Perl 5 user.  Is there any such equivalent low-level—language?  
04:54 dduncan depending on what you need to do, Perl 6 itself has more down-to-the-metal features than Perl 5 did
04:54 Aankhen`` (I figure there isn't, but I was looking for confirmation.)
04:55 Aankhen`` Okay.
04:55 dduncan for example, unboxed data types like int that map to hardware native types
04:55 Aankhen`` Right.
04:56 dduncan also, Perl 6 code can indicate in various ways things that would help compilers make optimizations
04:56 dduncan eg, declaring specific data types, or indicating if loops are uncoupled
04:56 Aankhen`` I know of open/closed and super/finalized classes, but what else?
04:56 Aankhen`` Not sure I understand the distinction between coupled and uncoupled for loops.
04:57 dduncan uncoupled means they can execute in any order, or in parallel, implicitly
04:57 Aankhen`` Ahh.
04:57 dduncan so lots of reasons to use XS in the old days are now unnecessary, and you can write them in Perl 6
04:57 Aankhen`` I thought that only `map` &c. were implicitly parallelized?
04:57 Aankhen`` (With the use of `hyper`.)
04:57 dduncan but if you still need to talk to hardware in other ways, how you do it is implementation dependent
04:58 Aankhen`` Makes sense.
04:58 dduncan hyperops are implicit
04:58 dduncan for any(@ary) -> ... is uncoupled
04:58 Aankhen`` Oh.
04:58 dduncan vs for @ary -> which wants a specific order
04:59 dduncan generally speaking, any of the goodies that people would have reached for PDL for are built-in to Perl 6
04:59 Aankhen`` Mmm, I see.
04:59 Aankhen`` I'll have to remember the `for any(@ary)`.
04:59 dduncan also, Perl 6 has immutable types, which allow more optimizations
05:00 dduncan and multi-dim arrays (not same as arrays of arrays)
05:00 * Aankhen`` wonders if `for any(each(@foo;@bar))` would DWIM.
05:00 Aankhen`` How do multi-dim arrays differ from AoAs?
05:01 Aankhen`` Fixed lengths?
05:01 * Aankhen`` fires up S09.
05:01 dduncan AoAs come in immutable and mutable versions, and are constructed using eg [[a,b],[c,d]]
05:01 dduncan multidims are just mutable, and you declare them with eg @@foo[4,6] then assign to them
05:02 Aankhen`` Ah.
05:02 dduncan but yes, S09 has lots of what you want to know, as does S02
05:02 Aankhen`` Yes, I'm sorry to keep pestering you with questions... I do read the synopses a fair bit, but some of the things therein go over my head, so it helps to discuss them with someone.
05:03 dduncan that's fine for now ... once you learn it, you're another person who can tell others
05:03 Aankhen`` Thanks for all the help. ^_^
05:03 dduncan np
05:04 dduncan but is it complete or non- ?
05:05 Aankhen`` I'm reading S09/"Multidimensional arrays" once again to see. ;-)
05:08 BooK_ joined #perl6
05:09 kanru joined #perl6
05:11 Aankhen`` I've said it before, and I'll say it again: user-defined indexes = sexy.
05:12 spinclad I expect immutable multidim arrays to be available, initted using eg [[a,b],[c,d]]
05:12 Aankhen`` Isn't that an AoA, like dduncan said?
05:12 spinclad sure, initted from an AoA
05:12 Aankhen`` Ahh,
05:12 Aankhen`` s/,/./
05:12 dduncan I thought those were distinct things
05:12 Aankhen`` Bleh.
05:13 Aankhen`` I read the section on multidimensional arrays again, but it flew over my head as before, laughing as it went. :-\
05:13 Aankhen`` "Multislice arrays can keep track of their dimensionality as they are being defined" # what does this mean?
05:13 dduncan afaik, multislice whatevers are like arrays where the array indices have multiple numbers rather than one
05:14 Aankhen`` Hmm, I see.
05:14 dduncan eg, a 3-dimensional array could have eg @ary[4,5,6] = $foo
05:14 dduncan where a normal array has 1 dimension, @ary[7] = $foo
05:14 Aankhen`` Eureka!
05:15 dduncan similarly, we have multidim hashes, the difference being we can have strings rather than numbers as an address
05:15 Aankhen`` Right!
05:15 dduncan so the difference between multidim and AoA is that one adds complexity on the keys side, and the other on the values side
05:15 dduncan afaik
05:15 Aankhen`` So, let me see if I understood this correctly or just said Eureka out of a misplaced sense of understanding: in a 3-dimensional array where you say @ary[4,5,6] = $foo, the key is in effect 4,5,6 in its entirety?
05:16 dduncan or put another way, its like the key is a Seq rather than a scalar
05:16 Aankhen`` Oh jeez.  I can't believe I've taken so long to understand... @foo[0][1] vs. @foo[0,1], yes?  Please? :-P
05:16 dduncan Perl 6 lets any object be a key, so multidim is probably just a special syntax for when that any object is a Seq or such
05:17 dduncan I believe so
05:17 Aankhen`` Yay!
05:17 dduncan the second being the multidim
05:17 Aankhen`` Yup.
05:17 dduncan afaik
05:17 Aankhen`` I have absolutely no idea why it took so long to understand.
05:17 Aankhen`` I think I kept deluding myself into believing that normal AoAs are also [0,1].
05:18 Aankhen`` dduncan++
05:18 dduncan no, normal AoAs are like what Perl 5 already does
05:18 TimToady well, that's not quite right
05:18 lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
05:18 dduncan I think PDL added to Perl 5 what the multidim thing is
05:18 Aankhen`` Shouldn't it be [0;1], though?
05:18 TimToady yes
05:18 Aankhen`` Kewl.
05:19 TimToady [0,1,2] would be a slice of the first dimension
05:19 Aankhen`` Right.
05:19 dduncan my main point was that the key was more complicated or multidimensional
05:19 Aankhen`` Yup.
05:19 TimToady [0,1,2; 0,1] is a two-dimensional slice
05:19 Aankhen`` <dduncan> so the difference between multidim and AoA is that one adds complexity on the keys side, and the other on the values side # this is an excellent way to look at it, IMHO
05:19 TimToady also, the parallel for would be "hyper for" these days
05:19 TimToady for any() doesn't really work
05:20 dduncan I did recall that this seemed to be an overloading of syntax
05:20 dduncan so if hyper for @ary is the new for all(@ary), I'm happy
05:21 dduncan and so now all() once again just means build a junction, and nothing else?
05:21 spinclad i would expect for any() to be allowed to call it quits on the first success
05:21 TimToady by default for in list context is lazy, in scalar or void context is eager, I suspect, and never hyper unless explicitly in a hyper context
05:22 TimToady yes, all() and any() are strictly logical, and can short circuit or evaluate in any order
05:23 TimToady all() short circuits as soon as in finds a false, of course
05:24 TimToady one could even imagine a junction evaluator that does branch prediction based on past history
05:24 * Aankhen`` next sets sights on the feed operators.
05:24 Aankhen`` (I used to understand them, but now I'm not so sure.)
05:25 dduncan afaik, map is a feed operator, so its stuff like that
05:25 TimToady they're just unix pipes, only built out of lazy lists instead of bytes
05:25 Aankhen`` Neat.
05:25 TimToady map is lazy, but not a feed operator
05:25 Aankhen`` The forms with the double angle append rather than clobber the sink's *todo list*. # that sort of stuff tends to confuse me a bit, heh.
05:25 TimToady feeds are ==> and <==
05:26 TimToady it kinda goes with Unix's > vs >> redirection
05:26 Aankhen`` Right.
05:26 Aankhen`` So... @foo ==> @bar # overwrites (if you would forgive the non-lazy view of it) @bar
05:26 Aankhen`` @foo ==>> @bar # appends to @bar
05:26 lambdabot Maybe you meant: faq ft todo yow
05:26 TimToady correct
05:27 Aankhen`` H'ray.
05:27 luqui joined #perl6
05:27 Aankhen`` Ah, the pleasure of understanding basic things.
05:27 Psyche^ joined #perl6
05:27 TimToady yes, @foo <<== @bar is a kind of push
05:27 Aankhen`` Nothing quite like it.
05:28 TimToady but like all the parallel ops, makes promises about non-interaction
05:28 Aankhen`` Okay.
05:28 TimToady either that the left and right don't interact, or that if they do, you don't care
05:28 TimToady and the blunt end of a feed is considered likely to run in a separate thread
05:30 TimToady feeds are sort of doing what other languages use "futures" for, except they're potentially lists and not just scalars
05:31 TimToady I think Oz has a similar concept of "ports"
05:32 TimToady so the processor is even allowed to spin the blunt end of a feed off to somewhere else on the network if it likes.
05:33 TimToady and a hyper feed is something very like Google's map/reduce algorithm
05:34 TimToady but maybe that's not for 6.0.0
05:38 Aankhen`` That'd be interesting.
05:38 Aankhen`` As I said a while back, I read the synopses quite a bit, but I'm pretty sure I'll still be discovering features long after 6.0.0 is released.
05:39 revdiablo Aankhen``: I wonder if that statement is equally true for TimToady ;)
05:40 Aankhen`` It's lazily true. ;-)
05:40 TimToady if you s/read/write/, sure.
05:40 Aankhen`` LOL.
05:41 revdiablo I just got the image of randomly pounding the keyboard until features emerge =)
05:41 Aankhen`` Haha.
05:41 TimToady yeah, I imported about a million monkeys a few years back...
05:41 Aankhen`` One thousand monkeys with one thousand typewriters and one thousand years, or Larry... hrm...
05:42 revdiablo Apparently someone's put $larry in hyper context
05:43 TimToady definitely some kind of eager context, at least
05:43 TimToady I'm not very good at multithreading though
05:43 revdiablo The STM is working overtime
05:43 revdiablo =)
05:44 TimToady need someone who's better at ADHD than I am *cough* audrey *cough*
05:44 Psyche^ changed their nick to Patterner
05:52 Aankhen`` ?eval my @foo{<a b>}
05:53 Aankhen`` Eek, still no evalbot.
05:53 dduncan depending how badly you need it, some human could pretend to be a bot
05:54 Aankhen`` perlbot: be evalbot
05:54 perlbot <evalbot> WHY USE PEARL!?  C IS FASTAR?!?!?
05:54 Aankhen`` :-(
05:54 dduncan eg, what you said results in: Cannot cast into Hash: VRef <Array:0x2eaf660>
05:54 dduncan    at <interactive> line 1, column 1-15
05:54 Aankhen`` Tsk, tsk.
05:55 Aankhen`` I have to rebuild Pugs first.
05:55 dduncan maybe you meant to say ...
05:55 dduncan ?eval my @foo<a b>
05:55 TimToady that's also wrong
05:56 Aankhen`` I'm just copying S09's my @seasons{ <Spring Summer Autumn Winter> };
05:56 Aankhen`` Or at least I thought I was.
05:56 TimToady not impl
05:56 dduncan oddly enough, that gives the same error
05:56 Aankhen`` Cool.
05:56 dduncan or actually, not oddly
05:57 TimToady indeed, they should mean the same
05:57 dduncan I was treating <a b> like an array slice, but those are characters, so obviously a hash slice
05:58 Aankhen`` my @foo{ <a b> } == my @foo<a b>?
05:58 dduncan try changing the @ to %
05:58 Aankhen`` dduncan: I'm trying to use user-defined indexes.
05:58 TimToady subscripts on declarations aren't impl
05:59 Aankhen`` TimToady: Yeh, I figured as much. I was wondering about <TimToady> indeed, they should mean the same
05:59 dduncan I assume you mean enums
05:59 TimToady basically, almost none of S09 is implemented
05:59 Aankhen`` Awww, poop.
06:00 dduncan afaik, once the new MO comes in next week or whenever, it should be orders of magnitude easier to add any other language features
06:00 Aankhen`` I'm sorry, what does MO stand for?
06:00 dduncan meta-objects
06:00 Aankhen`` Ah.
06:01 TimToady with a bad pun on Modus Operandi
06:02 amnesiac MO = Mega objetos!
06:03 amnesiac or Muchos Objetos
06:06 TimToady hmm, if Microsoft can get .ms domains from montserrat, I wonder if we can get .mo domains from macao, or even .pl domains from poland...
06:07 TimToady and I wonder what country .p6 would be?
06:07 amnesiac I guess you can get .pl domains without problems...
06:14 zamolxes darn. formmail.pl is taken
06:16 TimToady hmm, .pm is Saint Pierre and Miquelon
06:18 Aankhen`` If an object is used as a hash key, I presume that prevents it from being GC'd?
06:20 TimToady presumably
06:21 Aankhen`` presumptuousness++
06:21 TimToady oddly, there seem to be no .pm web pages when I google for Saint Pierre and Miquelon.  .info, .com, .ca, au, and .fr, but no .pm
06:22 obra www.nic.pm
06:22 obra Looks like they're not accepting registrations within .pm
06:22 TimToady which redirects to .fr
06:22 obra Yep.
06:22 obra but it resolves ;)
06:22 obra http://www.iana.org/root-whois/pm.htm
06:22 lambdabot Title: IANA | .pm - Saint Pierre and Miquelon
06:23 TimToady don't want to give them ideas about seceding from France, I guess...
06:23 * obra grins
06:24 amnesiac_ joined #perl6
06:25 obra I'm amused that one of the top hits for .pm on google is london.pm bemoaning the fact that they can't get 'london.pm'
06:25 Aankhen`` LOL.
06:26 TimToady I wonder what the domain for Sealand is...
06:26 Averell joined #perl6
06:26 obra Ryan never managed to get one.
06:26 obra He was trying for a telephone country code first
06:27 Aankhen`` class Pooch:name<Dog>:ver<1.2.1>:auth<cpan:JRANDOM> # this is the class declaration, right?
06:27 amnesiac_ TimToady, Sealand?
06:27 Aankhen`` (As opposed to a lexical alias for Dog declared within a `use`ing program.)
06:29 TimToady an attempt to bootstrap a country on an abandoned oil platform
06:30 obra Anti-aircraft iirc.
06:30 obra http://www.sealandgov.org/history.html
06:30 lambdabot Title: The Principality of Sealand
06:34 TimToady The name "Pooch" is a lexical alias only in the current file, "Dog" is the official name in the library
06:38 devogon joined #perl6
06:48 Aankhen`` Okay.
06:52 Aankhen`` Does `grammar Foo` at the top of a file indicate Perl 6 in the same manner as `module Foo`?
06:53 TimToady y
06:53 Aankhen`` Whee.
06:56 TimToady zzz &
06:56 Aankhen`` Sleep tight.
07:03 audreyt joined #perl6
07:05 nicodaemos joined #perl6
07:06 nicodaemos_ joined #perl6
07:56 dmq joined #perl6
07:56 dduncan I discovered an interesting bug in my Perl 5 code just now (who knows if it would affect my Perl 6 code too), and it concerns for example having a QDRDBMS::AST::SeqSel in my code.  The bug is that I have both a class with that name, as well as a module named QDRDBMS::AST which has a SeqSel routine
07:57 dduncan which is exported
07:57 dduncan one was just a wrapper for another, but the bug is that calling the longer one with ->new somehow invoked the subroutine instead
07:58 dduncan I'm thinking I may have to rename the subroutine wrappers to get around this
07:58 dduncan still, something I never expected to happen
08:06 meppl good morning
08:16 xinming joined #perl6
08:16 overrosy joined #perl6
08:23 franck__ joined #perl6
08:26 franck__ joined #perl6
08:27 bernhard joined #perl6
08:27 larsen_ joined #perl6
08:36 trunix joined #perl6
08:37 ofer joined #perl6
08:42 moritz hi there
08:54 iblechbot joined #perl6
09:07 DarkWolf84 joined #perl6
09:18 isaacd joined #perl6
09:35 elmex joined #perl6
09:39 overrosy left #perl6
09:46 dduncan left #perl6
10:11 chris2 joined #perl6
10:11 riffraff joined #perl6
10:12 riffraff hi
10:13 moritz hi ;)
10:13 araujo joined #perl6
10:16 riffraff so I finally upgraded again a,nd with a ghc found in the ubuntu repos :D
10:17 riffraff but I think there is something wrong in the building procedure: if a lib is missing (ghc-net in my case) the .setup-config is not generated but the building process still goes on
10:18 moritz riffraff: I can provide you with my local patches to debian/, that should enable you to use dpkg-buildpackage to build debian packages
10:19 riffraff I don't care, ghc-6.6 is good enough for me
10:19 riffraff but thanks
10:19 moritz I'm talking about debian packages of pugs
10:19 moritz which enables you ton install pugs in a sane way without using "make isntall"
10:20 riffraff oh
10:21 riffraff well, even there not much point I never installk pugs, just run it from the build dir, but it's nice to know that if I would I could :D
10:21 moritz ok ;)
10:22 moritz it would complain about missing build dependencies - theat's why I came up with it in the first place ;)
10:24 riffraff makes sense
10:32 riffraff is it normal that [1,2] == [2,1] ?
10:32 riffraff I mean it is nice but unexpected
10:32 wolverian ?eval +[1,2]
10:33 wolverian (the answer is 2)
10:35 lumi So it's expected, but not nice?
10:36 wolverian I'm not sure what else it could sensibly do but length comparison
10:37 riffraff [==](@aZ@b)
10:37 isaacd joined #perl6
10:37 riffraff that's what I'd expect
10:37 riffraff cmp maybe
10:37 wolverian surely == won't do that.
10:37 moritz ===?
10:37 wolverian or rather, surely you don't expect == to do that.
10:37 riffraff well, I do, but it's ok to have a wrong expectation
10:38 wolverian I assume you want cmp.
10:38 moritz @a === @b or @a.sort === @b.sort do what you want
10:38 lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . v
10:39 moritz lambdabot: no, I didn't ;)
10:39 riffraff yeah I think so
10:39 wolverian moritz, no. === checks object identity.
10:39 wolverian what you want is probably Set(@a) cmp Set(@b)
10:40 moritz wolverian: but Set(...) ignores duplicates - is that what you want?
10:40 wolverian I just assumed it was whta riffraff meant originally.
10:40 wolverian hard to say from his example.
10:40 wolverian s,whta,what,
10:40 moritz ok
10:41 riffraff true, actually I need to compare lists with no duplicates but I went aòlready with @a.sort cmp @b.sort
10:42 riffraff Set are +really+  slow, on my box
10:43 wolverian Set.pm's implementation looks a bit.. naive
10:45 riffraff by the way, what is the method to check if an element is in an array?
10:46 moritz $element = any(@array) perhaps?
10:46 riffraff eh
10:46 riffraff I know
10:46 riffraff I'd just avoid junction if possible
10:46 moritz or perhaps even $element ~~ @array?
10:46 riffraff mh good idea
10:46 moritz but it doesn't work
10:47 moritz at least not in pugs
10:47 riffraff bad :/
10:49 riffraff mh
10:49 riffraff something is wroing i my pugs,
10:49 riffraff is it normal that typing a sub definition in it you get a huge stringification of the AST ?
10:50 wolverian that would be $elem ~~ Set(@array) ;)
10:51 moritz riffraff: it's new, but it's logical
10:51 wolverian or @array ~~ $elem
10:52 moritz riffraff: otherwise .perl on closures wouldn't stringify correctly
10:52 riffraff I see
10:53 wolverian ugh, wait, I misread.
10:53 wolverian those are deprecated.
10:55 buetow joined #perl6
10:57 wolverian I think $elem cmp any(@array) is what you want, or @array.Set.contains($elem).
11:02 riffraff I want .contains in the List role
11:03 riffraff or in Seq, still can't understand the whole container tower
11:03 riffraff Map, possibly
11:04 wolverian I'm not sure that's a good idea. it encourages people to use inefficient structures.
11:05 wolverian if you want fast membership test, use a hash or a set. and so on. :)
11:06 riffraff put it in perspective, you may have a lot of happy moments by switching from inefficient to efficient data structures :)
11:07 overrosy joined #perl6
11:07 moritz perhaps a special profiler could tell you "you use many membership tests on lists, consider hashes" ;)
11:21 franck__ joined #perl6
11:24 riffraff I think this is what the Smalltalk guys call the "code critic"
11:40 riffraff darn I can't 8understand why if I test foo() & bar()  everything works, if I try baz() {foo();bar()} in the repl everything works but then my tests for baz() fail
11:41 moritz maybe because & is short circuit?
11:41 moritz and in the second case you and-ify nothing, right?
11:41 riffraff ah no that was just to write "a and b" not a aperl operator :)
11:42 riffraff I mean my testa for foo() pass, for bar() too, if I try omposing them in interactive òpugs it worlks but in a script it fails
11:50 pasteling "riffraff" at 83.181.255.73 pasted "spell corrector with crazy behaviour" (160 lines, 3.2K) at http://sial.org/pbot/24998
11:51 riffraff if someone could take a loook I'd be pleased, the failing tests are in the end, the ones for the correct() function
11:51 riffraff sadly, impossible to reduce to seomthing smaller :/
12:26 overrosy left #perl6
12:31 svnbot6 r16461 | gabriele++ | changed "make fast" to "make soon" to reflect real beahviour
12:34 rindolf joined #perl6
13:02 Limbic_Region joined #perl6
13:07 Limbic_Region salutations all
13:14 rindolf Shalom Limbic_Region !
13:14 rindolf Limbic_Region: how do you do?
13:16 prism joined #perl6
13:19 xinming_ joined #perl6
13:33 prism joined #perl6
13:46 ggoebel joined #perl6
13:56 pmurias joined #perl6
13:57 pmurias is Makefile.PL supposed to use inc/Module/Install.pm  in the pugs repo?
13:57 pmurias (mine dosn't)
13:58 diakopter pmurias: I think it uses a later version if it can find it.  which one is yours using?
14:02 avar left #perl6
14:04 pmurias a wrong one as i get an evil error
14:04 pmurias how should i check?
14:06 avar joined #perl6
14:06 diakopter pmurias: I guess you could put  print $Module::Install::VERSION  after it's used
14:06 diakopter what's your evil error
14:07 pmurias Can't call method "load_all_extensions" on an undefined value at inc/Module/Install.pm line 128.
14:07 pmurias BEGIN failed--compilation aborted at Makefile.PL line 51.
14:07 pmurias it might be the pugsone because perl -Minc::Module::Install dosn't work
14:08 diakopter pmurias: http://moritz.faui2k3.org/irclog/out.pl?channel=perl6;date=2007-05-11#id_l141
14:08 lambdabot Title: IRC log for #perl6, http://tinyurl.com/yt8xrr
14:12 pmurias thanks
14:13 diakopter were you using 'perl Makefile.PL' ?
14:13 pmurias it works only if name my perl executable /usr/local/bin/perl instead of /usr/bin/perl
14:14 pmurias strange
14:16 pmurias should have googled in again today
14:24 avar joined #perl6
14:34 iblechbot joined #perl6
14:42 pmurias s/in/the error in/
14:50 REPLeffect joined #perl6
15:01 DarkWolf84 probably u've compiled perl from source :)
15:02 DarkWolf84 that's why the path is /usr/local/perl not /usr/bin/perl
15:10 offby1 joined #perl6
15:19 lumi Does anyone know perl5/PIL2JS/lib6/Prelude/JS/Rules.pm ? Is it current, relevant, should work?
15:20 avar the js emitter is largely coderotted, don't know about that file
15:20 lumi It's just that it doesn't even compile, in line 65 it refers to a variable $perl5 which doesn't exist
15:22 moritz that happend to quite a few packages in ext/ as well
15:22 lumi At a guess just removing that final if is the correct fix, but if it's in  total coderot I don't know if that's any good
15:22 lumi I guess a nice weekend task is to see whether PIL2JS is salvageable
15:22 moritz that line looks a bit weird anyway
15:22 lumi s/whether/how/
15:23 lumi Well yes
15:23 goban left #perl6
15:24 moritz I guess you can just remove the 'if $perl5;'
15:24 moritz that seems to be a redundant braino of the enclosing if !$p5
15:28 * moritz notices that evalbot6 is gone :(
15:28 svnbot6 r16462 | moritz++ | PIL2JS: fixed braino that kept Rules.pm from compiling
15:28 moritz s/6/
15:28 moritz oh, I see, I'm not the first one who noticed that
15:30 lumi You're the second?
15:31 moritz or even later
15:32 lumi Someone has fixed this before?
15:32 moritz no, that evalbot is missing ;)
15:32 theorbtwo joined #perl6
15:33 moritz but there is a parse failure in Algorithm::TokenBucket that I can't fix :(
15:34 lumi What does that break?
15:34 moritz ok, I found a fix
15:34 moritz Net::IRC or something
15:35 lumi How do I tell SVK what my user is?
15:36 clkao env USER=
15:36 svnbot6 r16463 | moritz++ | Algorithm::TokenBucket now compiles again
15:36 chris2 joined #perl6
15:36 lumi clkao: Thanks
15:37 lumi clkao: It remains unconvinced
15:39 isaacd_ joined #perl6
15:41 lumi Oh hah, I figured it out
15:41 svnbot6 r16464 | lumi++ | Wrong fix to make PIL2JS compile again
15:41 rindolf joined #perl6
15:41 moritz sub foo($bar, $baz = $bar) { ... } now produces a compiler error
15:42 moritz at least that's how I interpret Net::IRC's errors
15:43 pmurias DarkWolf84: i have perl from portage, i have it on my systems as /usr/bin/perl and linked as /usr/local/bin/perl
15:43 pmurias Makefile.PL only works if i use the link
15:43 DarkWolf84 strange
15:43 DarkWolf84 a have perl from portage too
15:43 pmurias which version
15:44 DarkWolf84 wait a moment
15:45 DarkWolf84 mine is the last unstable version
15:45 DarkWolf84 sys-apps/portage-2.1.2.7
15:46 DarkWolf84 that says emerge
15:46 pmurias :) which version of perl
15:46 pmurias ?
15:46 DarkWolf84 ok
15:46 DarkWolf84 5.8.8 I think
15:46 DarkWolf84 v5.8.8 built for i686-linux-thread-multi
15:47 pmurias the same as mine
15:47 pmurias does perl Makefile.PL work for you?
15:47 DarkWolf84 yes
15:49 DarkWolf84 but I didn't check the current svn
15:50 pmurias correction ./Makefile.PL works for me not /usr/local/bin/perl Makefile.PL
15:56 kanru joined #perl6
16:09 psst_ joined #perl6
16:09 psst_ mrgn
16:11 nicodaemos joined #perl6
16:12 psst_ changed their nick to psst
16:19 thoughtpolice joined #perl6
16:27 [particle1 joined #perl6
16:34 [particle1 left #perl6
16:37 diakopter isis is stable these days?
16:37 diakopter argh
16:43 audreyt :)
16:43 lambdabot audreyt: You have 4 new messages. '/msg lambdabot @messages' to read them.
16:45 freezone left #perl6
16:45 moritz audreyt: you propably already notice that... evalbot dies because definitions like sub foo($bar, $baz=$bar) complain about $bar not beeing declared
16:46 audreyt I don't... restarting it (that bug has been fixed)
16:46 moritz ok, then my pugs is outdated
16:58 BooK joined #perl6
16:59 [particle] joined #perl6
17:06 bonesss joined #perl6
17:08 weinigLap joined #perl6
17:12 evalbot_r16464 joined #perl6
17:12 amnesiac joined #perl6
17:40 BooK_ joined #perl6
17:45 nicodaemos joined #perl6
17:50 Psyche^ joined #perl6
17:52 renormalist joined #perl6
17:56 prly joined #perl6
17:59 Psyche^ changed their nick to Patterner
18:02 prly_ joined #perl6
18:06 ggoebel joined #perl6
18:07 prly__ joined #perl6
18:08 Limbic_Region joined #perl6
18:08 renormalist Why should I think twice before pugs make install?
18:08 renormalist I have a lot of pugses installed ...
18:09 moritz sometimes it overwrites perl6 modules - or something
18:09 moritz it is generally rather broken
18:10 bonesss joined #perl6
18:10 renormalist m'kay
18:11 renormalist btw, moritz, in which city do u live?
18:11 renormalist it's germany, isn't it?
18:11 moritz renormalist: currently in edinburgh, but usually in würzburg
18:11 renormalist ah
18:12 renormalist in eding
18:12 renormalist ups
18:12 psst so what does 'mrgn' mean?
18:12 moritz and every second weekend in erlangen ;)
18:12 moritz psst: that's short for "morgen" or "good morning"
18:13 psst ahaa!
18:13 psst so it doesn't mean 'tomorrow'?
18:13 renormalist the erlangen with the Erlangen.pm? do you know them?
18:13 psst thanks, moritz
18:13 moritz renormalist: exactly that - but I haven't been there yet
18:14 ggoebel joined #perl6
18:19 moritz psst: but you are right in some sense, "good morning" and "tomorrow" can be the same word in german
18:20 psst moritz: but on #perl6 it is 'morning'
18:20 moritz right
18:20 psst moritz: ok - thanks - that settles a discussion on #svn
18:20 * psst waves
18:20 psst left #perl6
18:28 jisom joined #perl6
18:28 bonesss joined #perl6
18:28 Patterner joined #perl6
18:28 rindolf joined #perl6
18:28 franck__ joined #perl6
18:28 araujo joined #perl6
18:28 ofer joined #perl6
18:28 Yappo joined #perl6
18:28 xern joined #perl6
18:28 Caelum joined #perl6
18:28 cls_bsd joined #perl6
18:28 haelix joined #perl6
18:28 obvio171 joined #perl6
18:28 rgs joined #perl6
18:28 cernd joined #perl6
18:28 gaal joined #perl6
18:28 LCamel joined #perl6
18:28 arguile joined #perl6
18:28 takesako___ joined #perl6
18:28 kolibrie joined #perl6
18:28 QtPlatypus joined #perl6
18:28 buu joined #perl6
18:28 jql joined #perl6
18:32 bonesss joined #perl6
18:32 Patterner joined #perl6
18:32 rindolf joined #perl6
18:32 franck__ joined #perl6
18:32 araujo joined #perl6
18:32 ofer joined #perl6
18:32 Yappo joined #perl6
18:32 xern joined #perl6
18:32 Caelum joined #perl6
18:32 cls_bsd joined #perl6
18:32 haelix joined #perl6
18:32 obvio171 joined #perl6
18:32 rgs joined #perl6
18:32 cernd joined #perl6
18:32 gaal joined #perl6
18:32 LCamel joined #perl6
18:32 arguile joined #perl6
18:32 takesako___ joined #perl6
18:32 kolibrie joined #perl6
18:32 QtPlatypus joined #perl6
18:32 buu joined #perl6
18:32 jql joined #perl6
18:38 ggoebel joined #perl6
18:40 jisom joined #perl6
18:46 nicodaemos joined #perl6
19:02 Eidolos joined #perl6
19:02 svnbot6 r16465 | moritz++ | typo in t/builtin/math/exp.t
19:03 Yaakov wc
19:03 Yaakov left #perl6
19:11 bonesss joined #perl6
19:17 renormalist I experiment with "use v5". Weren't variables shared between the v6 and v5 scope?  
19:17 pasteling "renormalist" at 87.234.95.11 pasted "How are variables shared between v6 and v5 scope?" (6 lines, 126B) at http://sial.org/pbot/25005
19:21 svnbot6 r16466 | moritz++ | added t/builtins/lists/first.t
19:24 svnbot6 r16467 | moritz++ | added smartlinks to t/builtins/lists/minmax.t
19:34 bernhard joined #perl6
19:41 moritz ?eval ^2
19:42 evalbot_r16464 changed their nick to evalbot_r16465
19:42 evalbot_r16465 (0.0, 1.0)
19:42 Tene ?eval sqrt(-1)
19:42 evalbot_r16465 NaN
19:43 moritz ?eval sqrt(-1 + 0i)
19:43 evalbot_r16465 0.0 + 1.0i
19:43 renormalist nice
19:43 Tene ?eval $m = sqrt(-1 + 0i); ^$m
19:43 evalbot_r16465 ()
19:46 moritz ?eval ^sqrt(2)
19:46 evalbot_r16465 (0.0,)
19:46 moritz ?eval ^sqrt(5)
19:46 evalbot_r16465 (0.0, 1.0)
19:47 Tene ?eval 2²
19:47 evalbot_r16465 Error: ␤Unexpected "\178"␤expecting "_", fraction, exponent, term postfix or operator
19:48 Tene ?eval sub postfix:<²> { $a**2 }; 2²
19:48 evalbot_r16465 Error: ␤Unexpected "\178"␤expecting "_", fraction, exponent, term postfix or operator
19:49 renormalist ?eval say "foo"; say "bar"
19:49 moritz ?eval sub postfix:<²> { $^a**2 }; 2²
19:49 evalbot_r16465 OUTPUT[foo␤bar␤] Bool::True
19:50 evalbot_r16465 Error: ␤Unexpected "\178"␤expecting "_", fraction, exponent, term postfix or operator
19:50 renormalist ?eval my @words = <foo bar - example>; say "p6: ", @words;
19:50 evalbot_r16465 OUTPUT[p6: foobar-example␤] Bool::True
19:51 renormalist ?eval my @words = <foo bar - example>; my $words = @words; eval('print "p5: ", @$words, "\n"', :lang<perl5>);
19:51 evalbot_r16465 1.0
19:52 renormalist ?print "foo"
19:52 lambdabot Not enough privileges
19:53 renormalist I'm still in experimenting the v5-bridge. For me it seems it only works with scalars. Is this correct?
19:54 renormalist If I use a reference to an array (in the middle of following line) it works:
19:54 renormalist my @words = <foo bar - example>; my $words = @words; eval('print "p5: ", @$words, "\n"', :lang<perl5>);
19:54 renormalist but not:
19:54 renormalist my @words = <foo bar - example>; eval('print "p5: ", @words, "\n"', :lang<perl5>);
19:54 renormalist Any hints?
19:56 Tene ?eval {use v5; print "p5: stuff\n"; }
19:56 evalbot_r16465 changed their nick to evalbot_r16467
19:56 evalbot_r16467 1.0
20:03 Jmax joined #perl6
20:04 * renormalist probably lives in the wrong timezone, it's a pity ... :-)
20:23 mr_ank joined #perl6
20:27 [particle1 joined #perl6
20:44 nicodaemos joined #perl6
20:48 renormalist ?eval my @foo = [[1, 2], 3]; say @res.perl
20:48 evalbot_r16467 OUTPUT[[]␤] Bool::True
20:48 renormalist ?eval my @foo = [[1, 2], 3]; say @foo.perl
20:48 evalbot_r16467 OUTPUT[[[[1, 2], 3],]␤] Bool::True
20:48 Jedai joined #perl6
20:48 Jmax why is it outputting utf8?
20:49 renormalist Jmax: dont know, maybe because I cut'n'pasted from an utf8 terminal
20:49 renormalist ?eval my @foo = [[1,2],3] say @foo.perl;
20:49 evalbot_r16467 Error: ␤Unexpected "say"␤expecting operator or ","
20:49 Jmax er, not in what you said, but in the evalbot
20:50 renormalist ?eval my @foo = [[1,2],3]; say @foo.perl;
20:50 evalbot_r16467 OUTPUT[[[[1, 2], 3],]␤] Bool::True
20:50 theorbtwo The evalbot always outputs utf8.
20:50 Jmax i need to restart screen with -U brb
20:50 moritz Jmax: evalbot substitues \n bis N/L
20:50 Jmax N/L ?
20:50 Jmax locale-specific newline?
20:51 theorbtwo No, there's a unicode character reserved for a graphical representation of the NL character.
20:51 moritz the Unicode Character ␤
20:51 Jmax argh
20:51 Jmax let me restart screen and show me again :)
20:51 theorbtwo U+2424 SYMBOL FOR NEWLINE
20:51 Jmax oh, I see
20:52 renormalist why is my array [[1,2], 3]  expanded with one more level of brackets? (see last eval above)
20:53 renormalist I generally get confused when [] and when () are used in output of arrays
20:53 renormalist ?eval my @res = -« [[1, 2], 3]; say @res.perl
20:53 evalbot_r16467 OUTPUT[[(-1, -2), -3]␤] Bool::True
20:54 moritz renormalist: if you want [] to be used, use .perl
20:54 renormalist In my last line it mixes brackets with parens.
20:54 renormalist after the hyper operator was used
20:54 renormalist I don't understand this
20:57 renormalist moritz: when do I use [] and when () to work with lists? do u know?
21:00 moritz renormalist: whenever you want to nest arrays you use []
21:00 moritz renormalist: so evalbots output with () is wrong
21:00 moritz renormalist: because if you eval() it again, it will be flattened
21:01 moritz () don't do anything but grouping the values
21:01 isaacd__ joined #perl6
21:02 moritz at least afaict
21:06 mako132_ joined #perl6
21:08 renormalist I see. I have (re-)found the example in S03 and it uses brackets when hyperoperating on nested lists.
21:09 Aankhen`` joined #perl6
21:10 moritz ?eval [(1,2)].perl
21:10 evalbot_r16467 "[1, 2]"
21:10 moritz the round parenthesis are a noop in that context
21:10 avar joined #perl6
21:11 wolverian looks like a bug up there
21:11 moritz what?
21:12 moritz ?eval (1, 2, (3, 4), 5).perl
21:12 evalbot_r16467 "(1, 2, 3, 4, 5)"
21:12 moritz same here - () don't construct lists anymore in p6
21:12 renormalist I see. The bug is probably in what the hyperoperator  -« on the nested list did above
21:13 wolverian right.
21:14 renormalist ?eval my @res = -« [[1, 2], 3]; say @res.perl
21:14 renormalist erm, hello eval bot?
21:14 renormalist ?eval my @res = -« [[1, 2], 3]; say @res.perl;
21:14 Tene ?eval [:a<b>, :d<e>]
21:14 evalbot_r16467 OUTPUT[[(-1, -2), -3]␤] Bool::True
21:14 evalbot_r16467 OUTPUT[[(-1, -2), -3]␤] Bool::True
21:14 evalbot_r16467 [("a" => "b"), ("d" => "e")]
21:17 Aankhen`` ?eval my @res = -« [[1, 2], 3]; say @res.perl;
21:17 evalbot_r16467 OUTPUT[[(-1, -2), -3]␤] Bool::True
21:17 Aankhen`` Musta been a lag spike.
21:18 renormalist but maybe it's a bug in .perl, because:
21:18 renormalist ?eval my @expected = [[-1, -2], -3]; say @expected.perl;
21:18 evalbot_r16467 OUTPUT[[[[-1, -2], -3],]␤] Bool::True
21:18 renormalist I always get an additional level of brackets
21:19 moritz renormalist: the "say" produces an "OUTPUT[$foo]"
21:19 moritz renormalist: that's where the outer [] come from
21:19 Tene ?eval my @res = -« ([1,2], 3); say @res.perl;
21:19 evalbot_r16467 OUTPUT[[(-1, -2), -3]␤] Bool::True
21:19 Aankhen`` ?eval my @foo = [ 1, 2 ]; say @foo.perl
21:20 evalbot_r16467 OUTPUT[[[1, 2],]␤] Bool::True
21:20 Tene ?eval my @foo = [ 1, 2 ]; @foo
21:20 evalbot_r16467 [[1, 2],]
21:20 Tene ?eval my @foo = [ 1 ]; @foo
21:20 evalbot_r16467 [[1,],]
21:21 renormalist I have that additional bracket also in Pugs shell.
21:21 Tene ?eval my @foo = 1; @foo
21:21 evalbot_r16467 [1,]
21:22 Tene ?eval my @foo := [1, 2]; @foo
21:22 evalbot_r16467 [[1, 2],]
21:22 Tene it's related to assigning a scalar to a list being equivalent to putting the scalar in the first element of the list.
21:23 Tene the [...] returns a list that is put in the first element of @foo
21:24 renormalist that means @foo = [1,2,3]   is the wrong thing I do
21:24 renormalist I should do @foo = (1,2,3);
21:24 Tene renormalist: are you wrong, or is the spec wrong, or is the implementation wrong?
21:24 moritz renormalist: or just @foo = 1, 2, 3;
21:25 Tene I *suspect* that you're wrong.  I'm not completely sure, though.
21:25 Tene this should probably be discussed on the ml, if it hasn't already.
21:25 moritz [...] is like an array ref in p5 I think
21:26 renormalist Maybe my confusion of () and [] comes from that. I cut'n'pasted .perl results and re-used them in succeeding experiments.
21:26 Aankhen`` I was under the impression that you could say `my @foo = [ 1, 2, 3 ]` or `my %bar = { a => 'b', c => 'd' }` and they'd be deref'd automatically.
21:27 Aankhen`` I wonder.
21:27 renormalist Aankhen``: that's what I assumed, too
21:28 renormalist Now I understand Tene's ?eval my @foo = 1; @foo
21:28 renormalist ?eval my @foo = 1; @foo
21:28 evalbot_r16467 [1,]
21:29 moritz Aankhen``: but at least in the case of lists it would make it hard to construct what it now means
21:29 Aankhen`` Maybe it just isn't implemented?
21:29 Aankhen`` moritz: Perhaps you could get that with ([ 1, 2 ])
21:29 Tene ?eval my %hash = :a<b>, :n<l>; %hash
21:29 evalbot_r16467 {("a" => "b"), ("n" => "l")}
21:29 Tene ?eval my %hash = [:a<b>, :n<l>]; %hash
21:29 evalbot_r16467 {("a\tb" => ("n" => "l")),}
21:30 Aankhen`` Heh.
21:30 moritz Aankhen``: that would be inconsitent, because () don't create lists...
21:30 Aankhen`` moritz: I guess so.
21:30 Tene This clears up a bug I kept re-introducing in some code the other day.
21:30 moritz Aankhen``: perhaps my @a = [1, 2,],;
21:30 Aankhen`` Yeah, maybe.
21:30 moritz but I quit like it the way it is now
21:31 Aankhen`` Ah, here we go, from S02:
21:31 moritz if you want to construct a list, use the comma operator
21:31 Aankhen`` Hmm, no wait.
21:31 Aankhen`` no, wait even.
21:31 * Aankhen`` continues looking.
21:34 renormalist ?eval my @foo = (1, 2, 3, 4); my @bar = eval (@foo.perl); @bar
21:34 evalbot_r16467 [[1, 2, 3, 4],]
21:35 renormalist That behaviour is strange, IMHO. I would expect the output of .perl to be eval'able directly
21:35 mako132_ joined #perl6
21:36 moritz renormalist: I'm pretty sure that's a bug
21:36 renormalist The question is, where. In .perl's way of printing arrays?
21:36 moritz I think so, yes
21:37 thoughtpolice seems the logical place to start
21:37 moritz ?eval my @foo = 1, 2; @foo.perl
21:37 evalbot_r16467 "[1, 2]"
21:37 renormalist or in Perl6 in not dereferencing array refs to lists in assignments?
21:37 moritz the [] are wrong
21:39 Jedai ?eval my @array = [1,2]; @array.elem
21:39 evalbot_r16467 Error: No such method in class Array: &elem
21:39 Jedai ?eval my @array = [1,2]; @array.elems
21:39 evalbot_r16467 1
21:40 Jedai From what I read, I understood that this assignment should have created an array with 2 elements
21:40 moritz Jedai: where did you read that?
21:40 Jedai Here we have the Perl5 behaviour
21:40 Jedai I'll search for it
21:42 Jedai But it may be quite old
21:42 Jedai So it may have changed
21:43 Jedai Still the S02 say now :
21:43 Jedai To get a Perlish representation of any object, use the .perl method. Like the Data::Dumper module in Perl 5, the .perl method will put quotes around strings, square brackets around list values, curlies around hash values, constructors around objects, etc., so that Perl can evaluate the result back to the same object.
21:43 avar ?eval my @array = [1,2]; @array[0].elems
21:43 evalbot_r16467 2
21:43 Aankhen`` "square brackets around list values"
21:43 avar it's a 1 element array with an array ref that has 2 elems
21:43 renormalist moritz: at least S02 says "To get a Perlish representation of any object, use the .perl method. Like the Data::Dumper module in Perl 5, the .perl method will put  ...  square brackets around list values, ..."
21:44 moritz ok, you convinced me
21:44 Aankhen`` Implies that [ 1, 2 ] ought to be parsed as a list, not an arrayref.
21:44 Aankhen`` Or at least so it seems to me.
21:44 moritz right
21:44 avar ?eval my @array; @array.perl
21:44 evalbot_r16467 "[]"
21:44 Aankhen`` I dunno about the [ 1, 2 ], to get the old behaviour, but you could at least use: [ [ 1, 2 ] ]
21:44 avar ?eval [[1,2]].elems
21:45 evalbot_r16467 1
21:45 avar this is what you're doing essentially
21:45 avar so the docs are right-ish, but maybe it should say s/list/array/?
21:45 * avar isn't clear on the terminology
21:45 Aankhen`` ?eval [[1,2]].perl.say
21:45 moritz why? [1, 2] isn't an array
21:45 evalbot_r16467 OUTPUT[[[1, 2],]␤] Bool::True
21:46 Aankhen`` Huh, that parses right.
21:46 Aankhen`` Er.
21:46 Aankhen`` ?eval my @foo = [[1,2]]; @foo.perl.say
21:46 evalbot_r16467 OUTPUT[[[[1, 2],],]␤] Bool::True
21:46 Aankhen`` Nevermind. :-)
21:47 renormalist The t/builtins/perl.t contains some .perl.eval tests that are commented out, maybe for reason, but I'm not sure they handle the same what we discuss
21:47 Jedai In clear it seemed to me that [1, 2] in list context should interpret as a two elements list, rather than a one element list with first element being a ref
21:47 Aankhen`` Jedai: Aye.
21:49 renormalist Jedai: In clear?
21:49 Tene I'm not so sure... [] is for grouping tighter, to prevent flattening.
21:50 Tene if you want flattening, use ().
21:50 Tene I suspect.
21:50 moritz or nothing
21:50 Tene yeah
21:50 Jedai renormalist : Sorry if it's wrong, English ain't my native language
21:51 Tene what about, for example, @list = ([ ... ])
21:51 moritz I can't understand why you are so fond of (...) ;-)
21:51 Jedai Tene : In S02 it's pretty clear that () is flattening (or rather is almost a noop, just group)
21:52 renormalist Tene: I see, my initial problem was the mixed output of .perl that used both () and [] in practically the wrong way:
21:52 renormalist ?eval my @foo = -« [[1, 2], 3]; say @foo.perl;
21:52 evalbot_r16467 OUTPUT[[(-1, -2), -3]␤] Bool::True
21:52 Tene moritz: that's what I'm saying, [...] is the same as ([...])
21:53 Jedai Tene : In my opinion, this syntax should just create an array, the () being absolutely noop there
21:53 renormalist Jedai: ok, then I think I understood. I thought it's sth. that my English wasn't good enough for. :-)
21:53 Jedai Tene: I agree
21:54 renormalist Tene: I agree, too. But the example produces [()] which is wrong
21:54 moritz right
21:54 Jedai renormalist: This output by Perl is clearly  a bug
21:54 Jedai by .perl sorry
21:54 Tene which output, specifically, is incorrect?
21:54 renormalist ?eval my @foo = -« [[1, 2], 3]; say @foo.perl;
21:54 renormalist this one
21:54 evalbot_r16467 OUTPUT[[(-1, -2), -3]␤] Bool::True
21:54 Tene Ahh.
21:54 renormalist outside: [], innerside ()
21:54 Tene Yes.
21:55 Jedai Because it flattens when it shouldn't
21:55 Jedai and when .perl did not mean to (I infer this from the fact it bothered to put parens)
21:55 moritz that's what we get from taking a non correct implementation as reference ;)
21:55 renormalist But again, I'm not sure whether it's .perl's failure. It might be the hyperop.
21:55 renormalist moritz: :-)
21:56 Jedai ?eval my @foo = -« [[1, 2], 3]; @foo.[0].elems;
21:56 moritz ?eval my @foo = -« [[1, 2], 3]; @foo[0][0]
21:56 evalbot_r16467 2
21:56 evalbot_r16467 \-1
21:56 moritz it _is_ a .perl bug
21:57 renormalist I understand
21:57 Jedai which means it's probably easier to fix (I hope)
21:57 renormalist Should this become a test in t/builtins/perl.t ?
21:57 moritz renormalist: yes
21:58 renormalist I'm not sure how to write the test, as a string compare to an expected result?
21:58 moritz renormalist: eval($data.perl) and compare it to the original structure?
21:58 Jedai which still doesn't say us if "my @array = [1,2]; @array.elems" should produce 2 or 1
21:59 renormalist ?eval [[-1, -2], -3].perl
21:59 evalbot_r16467 "[[-1, -2], -3]"
21:59 moritz Jedai: I think the S02 excerpt is pretty clear about that
21:59 Jedai Ok....... o_O
22:00 Tene ?eval my @foo = ([1, 2], 3); eval(@foo.perl)
22:00 evalbot_r16467 [[1, 2], 3]
22:00 Jedai So to be sure it's really clear, what's everyone guess at my question ?
22:00 Jedai I say 2
22:00 Tene ?eval my @foo = ([1, 2], 3); @foo.perl
22:00 evalbot_r16467 "[[1, 2], 3]"
22:01 Tene ?eval my @foo = -« ([1, 2], 3); eval(@foo.perl)
22:01 evalbot_r16467 [-1, -2, -3]
22:01 Tene There we go.
22:01 Tene ?eval -« ([1, 2], 3)
22:01 evalbot_r16467 ((-1, -2), -3)
22:01 Tene ?eval ([1, 2], 3)
22:01 evalbot_r16467 ([1, 2], 3)
22:02 Jedai Ok, I don't get it
22:02 renormalist it's a double bug or double confusion
22:03 Tene post my last three examples to the mailing list
22:03 Jedai ?eval ([1,2],3).perl
22:03 evalbot_r16467 "([1, 2], 3)"
22:04 Jedai ?eval my $array = [[1, 2], 3]; $array.perl
22:04 renormalist the hyper on the arrayref should have never been [[1,2],3] but ([1,2],3), as in Tene's eval above. My original [[1,2],3] is maybe the initial failure.
22:04 evalbot_r16467 "[[1, 2], 3]"
22:06 Tene something really weird is going on with the hyperop
22:06 Tene ([1, 2], 3).perl is correct, but .perl on the result of -«([1, 2], 3) is incorrect
22:06 justatheory joined #perl6
22:06 Tene uses inner ()s.
22:06 renormalist exactly
22:09 renormalist Tene: which maillist do you mean, p6-compiler?
22:10 Tene perl6-language
22:12 renormalist k
22:12 Jmax joined #perl6
22:27 justatheory joined #perl6
22:28 bonesss joined #perl6
22:41 lucs joined #perl6
23:01 lisppaste3 joined #perl6
23:04 svnbot6 r16468 | renormalist++ | - :todo-tested a bug with .perl on result of a hyperoperator
23:04 svnbot6 r16468 | renormalist++ | - BTW, which one is the real test file perl.t or perl2.t?
23:19 ggoebel joined #perl6
23:22 Eidolos_ joined #perl6
23:23 svnbot6 r16469 | renormalist++ | - mini newline fixes for better interactive console feeling
23:23 svnbot6 r16470 | Aankhen++ | * added first stab at set of (as yet non-functional) grammars for parsing the IRC protocol: examples/rules/Grammar-IRC.pm
23:31 Eidolos_ changed their nick to Eidolos
23:39 renormalist Maybe I repeat my question of some hours ago: I'm still in experimenting the v5-bridge. For me it seems it only works with scalars. Is this correct?
23:39 renormalist If I use a reference to an array (in the middle of following line) it works:
23:40 renormalist my @words = <foo bar - example>; my $words = @words; eval('print "p5: ", @$words, "\n"', :lang<perl5>);
23:40 renormalist but not:
23:40 renormalist my @words = <foo bar - example>; eval('print "p5: ", @words, "\n"', :lang<perl5>);
23:40 renormalist Any hints?
23:41 ggoebel joined #perl6
23:48 buetow joined #perl6
23:58 unreal_name joined #perl6
23:58 unreal_name hey guys
23:59 unreal_name quick question, how do i check if a file with "filename"
23:59 unreal_name is an image?

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

Perl 6 | Reference Documentation | Rakudo