Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2005-12-05

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 autrijus yo
00:03 wolverian evening/night
00:03 dduncan so, I was looking into the die() thing yesterday ...
00:04 dduncan is removing the Str cast an easy thing to do, or would there be complication side effects?
00:04 dduncan such as issues with various back-ends
00:05 wolverian btw, does sub foo (Str @bar) only accept Str-typed @bars, or does it coerce?
00:06 dduncan In my experience, ...
00:06 justatheory has quit IRC (Read error: 110 (Connection timed out))
00:06 dduncan declaring the container type of an argument such as with Str doesn't do anything yet ...
00:07 dduncan or at least, I have declared arguments to only take Locale::KeyedText::Message objects, and still have to do an explicit does() test inside the function to actually catch bad args, such as if a Str is passed instead
00:08 dduncan I assume such checks by the runtime itself or compiler will come later
00:08 wolverian yeah, I was asking for the perl6 behaviour really, not pugs
00:08 dduncan aka, the system seems to act the same as if you said: sub foo (@bar)
00:09 wolverian sorry for the confusion
00:09 dduncan still, I don't have a problem with that right now
00:10 autrijus wolverian: it only accepts Str-typed @bars, but each type has a chance of coercing into Str
00:10 dduncan in the short term, I see it more important that Pugs enables correct behaviour, than that it blocks incorrect behaviour ... so if you code right, it works
00:10 autrijus there's no type system before 6.2813
00:10 dduncan so correct code still runs
00:10 autrijus I totally agree
00:10 autrijus 6.2831, even
00:12 dduncan fyi, in case you didn't see my comments from 16 hours ago, I see 2 main problems left before Locale::KeyedText works correctly ... one concerns die coercing arg to Str, and I had committed a test for that ... hopefully this is easy to fix
00:12 autrijus ok. path to that test?
00:12 autrijus (sounds easy to test)
00:12 dduncan the other is that I don't yet know the correct syntax for checking if a module is loaded
00:13 dduncan it is easy to test ...
00:13 dduncan its in built-ins
00:13 dduncan control-flow
00:13 dduncan ...
00:13 autrijus t/builtins/control_flow/die_arg_preservation.t
00:13 dduncan yes
00:14 autrijus ok... I need to modify the exception type in Eval monad from Str to Val
00:14 autrijus guess that's all it takes
00:14 locksy has quit IRC ("Terminated with extreme prejudice - dircproxy 1.0.5")
00:14 dduncan if you backlog to 15 hours ago, I wrote some comments about where I thought the problem was
00:14 autrijus will fix. you can probe for loaded modules using
00:14 autrijus %INC{'Test.pm'}
00:14 dduncan thank you ... will try that ...
00:15 autrijus same as p5 currently
00:15 dduncan oh
00:15 dduncan ?
00:15 autrijus in p5 you test $INC{'Test.pm'}
00:15 dduncan in that case, I should probably fix my Perl 5 code, which does it using a symbol table test
00:15 autrijus *nod*
00:15 dduncan the only place in my code I ever said 'no strict'
00:16 autrijus glad you can rid of that now
00:16 dduncan indeed ... I don't like having to turn strict off to do anything
00:17 dduncan maybe it is the same, but what I actually want to check is whether a package was already declared ...
00:18 dduncan eg, I want to see if myapp.pl already declared package Foo, and only if not, do I try to load Foo.pm
00:22 svnbot6 r8074 | autrijus++ | * Test::Builder::Test - fixing parameter list syntax for defaults:
00:22 svnbot6 r8074 | autrijus++ |     (?$x = 1) is now just ($x = 1)
00:22 autrijus oh... in that case you need a if ( $::{'Foo::'} ) { ... } in p5
00:23 autrijus in p6 you can try
00:23 autrijus if ( ::Foo.isa(Package) ) { ... }
00:23 autrijus or something along that line
00:23 autrijus don't need strict either way.
00:24 dduncan will try that ... what I had been doing in perl 5 is "no strict 'refs'; return defined %{$module_name . '::'};", but your way looks better
00:24 autrijus *nod* have fun
00:24 autrijus I'll take a look at die()
00:24 dduncan thank you
00:24 dduncan fixing that will help a lot of programs
00:26 autrijus :)
00:26 * autrijus goes back to Alias's talk
00:27 nothingmuch has quit IRC (Read error: 113 (No route to host))
00:28 scook0 has joined #perl6
00:32 elmex has quit IRC ("bis mrogen")
00:42 clkao autrijus!
00:44 autrijus hey clkao
00:52 locksy has joined #perl6
00:55 frederico has joined #perl6
01:14 joepurl has joined #perl6
01:19 Shachaf has quit IRC ("Leaving")
01:23 Shachaf has joined #perl6
01:33 stevan heya autrijus
01:33 autrijus hey stevan!
01:33 stevan how is .au?
01:33 autrijus excellent wonderful weather
01:34 autrijus quite productive environment
01:34 stevan very nice :)
01:34 * stevan shoveled snow today
01:34 autrijus the first open source conference I attended that py and pl people are actually friendly toward each other's languages
01:34 autrijus refreshingly
01:34 stevan nice
01:35 stevan I never disliked Python, I just like Perl better :)
01:35 stevan autrijus: did you discuss with luqui about his new type system ideas?
01:35 autrijus stevan: I did... his idea is basically that p6 should not have a fixed static type engine
01:35 autrijus although I think we'll still need a structure to collect annotations
01:35 autrijus and share them between modules
01:35 stevan yes
01:36 stevan yes
01:36 autrijus but the idea of the other static analysis tools being pluggable
01:36 autrijus is sound
01:36 autrijus the problem is whether this should pass compilation by default:
01:36 autrijus 1 = 2.{3.[4]}
01:36 autrijus I still conjecture no
01:36 autrijus but would be yes under his scheme
01:36 stevan yeah I agree
01:36 autrijus which I'm afraid of
01:36 autrijus so maybe we still need a minimal typechecker.
01:37 stevan I think the idea is very interesting, but my concern is we will end up with another strict.pm
01:37 stevan but it will be static.pm instead
01:37 autrijus I think because strict is on by default, a minimal (perl5ish) static should be on by default as well.
01:37 stevan yes
01:37 autrijus so I think we are in vehement agreement
01:37 stevan hell yeah :)
01:37 SamB is that anything like heated agreement?
01:38 stevan so my latest side venture has been to explore PIR and assess it's suitability as a metamodel host
01:38 autrijus oh! how goes?
01:38 autrijus (I may drop and resume within 20mins)
01:38 autrijus 0% battery since Alias required my laptop running Wx and PPI::Tester for demo
01:38 stevan it goes.
01:38 autrijus PPI::Tester absolutely rocks btw. we need that for pugs
01:38 * stevan makes a note to look on CPAN
01:38 autrijus AST visualizer
01:38 autrijus interactive ones too
01:38 stevan oohhhh
01:39 stevan very nice
01:39 autrijus that doesn't bail on syntax errors
01:39 autrijus but rather point out where the error might be
01:39 autrijus and resume parsing
01:39 stevan even better
01:39 autrijus perfect for editor/refactorere/whatever
01:39 stevan Alias++
01:39 autrijus Alias++
01:40 stevan so mostly right now I am fighting against my lack of PIR knowledge
01:40 stevan but I am getting the feel for Parrots existing object system
01:40 stevan and I think I can get the metamodel to sit atop it fairly easily
01:41 stevan once I can get things to compile without error that is ;)
01:47 frederico has quit IRC ("...")
02:01 mugwump Hey guys... are co-routines spec'ed yet?
02:02 mugwump or continuations?
02:03 autrijus mugwump: there are two proposals in end of S17
02:03 autrijus not yet canonised
02:03 autrijus continuations is even more out there.
02:03 autrijus stevan: ooh, that would absolutely rock
02:04 stevan autrijus: it will probably progress quite slowly though as $work is kind of busy lately
02:06 justatheory has joined #perl6
02:08 autrijus nod... I'll go ahead as originally planned on compiler-side MM bootstrap
02:08 autrijus now we don't need to infer anything about MMD types, it should get much easier
02:09 stevan :)
02:09 autrijus the mini inferencer in particular can go from the runcore.
02:09 meppl gute nacht
02:09 autrijus and turned into something manipulatable from perl6 side, I hope
02:09 stevan hmm, so luke's (lack of a) type system means MMD gets pushed to runtime right?
02:10 autrijus yeah... the idea is that if you turn off all staticness, types become assertions
02:11 stevan I always thought we would end up with that anyway
02:11 autrijus and we don't have type information for any "is lazy" chunks or any closures without explicit annotations
02:11 autrijus well, yes and no... sometimes runtime assertions isn't good enough
02:11 stevan keeping everything so "open unless explicitly closed"
02:11 autrijus but they are a start
02:11 autrijus yes
02:12 stevan I will just get used to writing "use static;" at the top of all my files :)
02:12 * autrijus goes grab some sandwich
02:12 autrijus we'll see about that :)
02:12 stevan very true
02:12 clkao ddude, you need to eat better
02:12 stevan I mean after all ,.. this is perl 6 :)
02:12 stevan clkao: whats wrong with sandwiches??
02:13 clkao it's just not like a real meal
02:13 clkao and sounds too much like a british lunch
02:13 stevan in america it is,.. but then again,... that america ;)
02:13 clkao well, i think in britian as well. but.
02:14 * stevan has been living on noodles a lot lately ,.. yum
02:14 hexmode has quit IRC (Remote closed the connection)
02:14 autrijus well they are tasty... by conf standards anyway
02:15 autrijus still doesn't trump YAPC::Taipei but pretty decent
02:16 stevan soon at YAPC::Isreal - Turkish Coffee, Hummus and Yuval's famous flaming pizza
02:16 autrijus I look forward to more flaming pizza
02:17 stevan ok, have to run, enjoy the conf autrijus :)
02:17 * stevan &
02:17 autrijus have fun :)
02:20 svnbot6 r8075 | autrijus++ | * "fail" should actually do something; put in a stub in Prim.hs
02:20 svnbot6 r8075 | autrijus++ |   before Prelude.pm's implementation gets finished
02:20 clkao p
02:20 clkao ~>
02:22 qmole has quit IRC (Read error: 110 (Connection timed out))
02:26 svnbot6 r8076 | autrijus++ | * Fix postincrement_in_subscripts.t (noted by r0nny):
02:26 svnbot6 r8076 | autrijus++ |   Evaluation of index into array/hashes should not evaluate
02:26 svnbot6 r8076 | autrijus++ |   the index expression inadvertently.
02:26 svnbot6 r8076 | autrijus++ | * Change the name of evalExpType and cxtOfExp into inferExpType
02:26 svnbot6 r8076 | autrijus++ |   and inferExpCxt and move both into Eval.Var -- they are to be
02:26 svnbot6 r8076 | autrijus++ |   factored out from the runtime into the compile time.
02:35 mugwump I've been playing with Coro, which is coroutines for Perl 5... and it's very nice indeed
02:36 mugwump it has a great mechanism for communicating usage problems, it uses SIGSEGV
02:39 autrijus excellent
02:39 * autrijus ponders "segfault the ultimate"
02:39 mugwump Yes!  Higher order Perl 5!
02:43 mugwump Coro wouldn't need much to make it conform to that API in S17, most of it anyway
02:46 xinming1983 has quit IRC (Read error: 104 (Connection reset by peer))
02:48 dduncan I could be imagining it, but Pugs.Run seems to be taking a lot longer to compile than usual
02:49 autrijus oh? hm
02:52 Khisanth dduncan: more time to fail than compile ;)
02:56 dduncan its done now
03:04 justatheory has quit IRC ()
03:04 justatheory has joined #perl6
03:04 justatheory has quit IRC (Client Quit)
03:06 joepurl has quit IRC (Remote closed the connection)
03:20 dduncan it seems that make smoke is much slower than normal too ... currently sitting on ext/FA-DFA/t/DFA.t
03:20 justatheory has joined #perl6
03:21 Shachaf has quit IRC ("Leaving")
03:21 autrijus mm, hopefully not an infinite loop
03:21 dduncan then when I kill it with ctrl-c, it says:
03:21 dduncan ^CCould not run yaml harness: No such file or directory at util/run-smoke.pl line 58.
03:21 dduncan make: *** [smoke-pugs] Error 2
03:22 justatheory has quit IRC (Client Quit)
03:22 dduncan anyway, I've noticed that several ext/ have been failing for awhile, and I think I can fix some ... they seem to use old argument syntax
03:22 autrijus yup, that'd be appreciated
03:23 dduncan it also occurs to me it might be useful at times to have a global just-try-to-compile-it test
03:24 Shachaf has joined #perl6
03:24 dduncan sort of like my first test in Rosetta-Incubator, but for all the others too
03:24 autrijus 01-loat.t is supposed to do that
03:24 autrijus load, even
03:24 autrijus for each module
03:24 autrijus of course only a few has that defined
03:24 dduncan the point is that one could see quickly that modules meet that requirement, before trying to run all their execution tests
03:25 autrijus find ext -name '*.pm' -exec ./pugs -c {} ';'
03:25 autrijus should do that for *nix
03:26 dduncan will try ...
03:26 autrijus maybe make it a make target? (or rewrite it in find2perl)
03:26 Shachaf has quit IRC (Remote closed the connection)
03:27 dduncan could be a good idea
03:28 autrijus or write a t/ext/ext.t (or merge it with t/examples/example.t, or store it into t/examples)
03:28 autrijus which does a glob for all module files and runs pugs -c on each
03:28 autrijus that can conceivably go into pugsrun as well -- improvise :)
03:28 dduncan I'm running that 'find' line now ... seems to be working
03:30 justatheory has joined #perl6
03:37 justatheory has quit IRC ()
03:37 justatheory has joined #perl6
03:37 justatheory has quit IRC (Client Quit)
04:03 Odin-LAP has quit IRC ("What's this button do?")
04:04 Odin-LAP has joined #perl6
04:08 Amnesiac has joined #perl6
04:09 autrijus dduncan: throwing out objects to $! should work now
04:09 autrijus about to commit
04:09 dduncan thank you
04:10 dduncan I'm also nearly done a compile-test utility ... basically a copy of your one-liner that looks in blib6/lib instead
04:10 autrijus cool!
04:10 dduncan I just have to add a use-lib line or something
04:10 autrijus nod
04:14 vel has joined #perl6
04:15 vel has left
04:16 vel has joined #perl6
04:17 autrijus ?eval try { die %*ENV }; $!.ref
04:17 evalbot_8073 is now known as evalbot_8076
04:17 evalbot_8076 ::Str
04:19 dduncan ?eval try { die Object.new(); } $!.ref;
04:19 evalbot_8076 Error:  unexpected "$" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
04:21 dduncan ?eval try { die Object.new(); }; $!.ref;
04:21 evalbot_8076 ::Str
04:24 autrijus oh of course, I need to fix die() and fail() also
04:25 autrijus 8077 is not enough... 8078 coming right up
04:27 svnbot6 r8077 | autrijus++ | * &die and &fail now takes objects; they get stored into $!
04:27 svnbot6 r8077 | autrijus++ |   as objects, not strings, inside a try {} block.
04:27 autrijus curiously, in p5
04:27 autrijus eval { die $x, $y; };
04:27 autrijus stringifies and concats them
04:27 autrijus whilst
04:27 autrijus eval { die $x }
04:27 autrijus preserves the ref
04:27 autrijus I don't think we need to emulate that, do we
04:34 autrijus dduncan: r8078 is in and should Just Work (tm)
04:35 dduncan ?eval try { die Object.new(); }; $!.ref;
04:35 evalbot_8076 ::Str
04:35 dduncan soon...
04:38 vel has left
04:38 svnbot6 r8078 | autrijus++ | * fix die() and fail() for real so they take objects.
04:39 vel has joined #perl6
04:40 * dduncan brb
04:49 vel has left
04:50 vel has joined #perl6
05:00 vel has left
05:01 vel has joined #perl6
05:05 vel has quit IRC (Client Quit)
05:32 * autrijus hacked unicode support into PPI... no idea why I'm doing this though
05:32 autrijus maybe for Perl5->PIL someday, maybe ;)
05:51 svnbot6 r8079 | autrijus++ | * throwing out single objects should impose object context.
06:04 gaal hey autrijus
06:04 gaal doesn't fail clash with Test::fail? what's been decided on that?
06:05 dduncan it shouldn't if you say Test::fail() rather than fail()
06:05 gaal har. that's 8000 s///s
06:05 gaal well, one s///, but 8000 applications :-(
06:06 dduncan this change is still very little work with a script and/or good multi-file s+r text editor
06:07 gaal sure. but I don't like the asymmetry:
06:07 gaal ok(...) is(...) pass(...) Test::fail(...
06:07 dduncan maybe the functions in Test should be renamed, then
06:07 dduncan oh, oh ...
06:08 dduncan multi-methods!
06:08 dduncan if the two have different signitures, no problem
06:08 gaal indeed. but it has a legacy. So there the question came up a while ago if perhaps the it's the fail builtin should be renamed
06:08 dduncan perl 6 is already changing some legacy things ... what's one more?
06:09 dduncan the perl 5 Test modules could gain whatever the perl 6 fail() is renamed to as an alias, for cross-language consistency
06:09 gaal true, but still potentially confusing.
06:10 gaal The multi-method workaround is terrible, IMHO
06:10 dduncan yes it is
06:10 gaal it's being used as a workaround rathert than an expression of polymorphism.
06:11 gaal so we're back to "this town ain't big enough for the two of us", and the question is, which one gets renamed, and what name does it get.
06:11 dduncan in any event, I think that if either Test or Perl 6 had to become more ugly to not get in the way of the other, I say Test should go ... Perl 6 itself should be a priority for elegance
06:11 gaal a bikeshed question of some visibility.
06:11 dduncan question ...
06:12 dduncan do you think anyone would use the fail() built-in in the same scope as the Test one?
06:12 gaal sure!
06:12 gaal it could happen in tests.
06:12 dduncan okay, then, overriding isn't good then
06:12 dduncan locally
06:12 gaal I think you're right about giving the language priority.
06:13 dduncan in any event, generally, single-word functions should be used mainly by the language itself, and modules should have multi-word functions ... then its easy to tell the difference and we avoid such collisions
06:13 dduncan objects are different
06:13 gaal nonono, tests are so important they really want to be exportable goodies like ok() etc.
06:14 dduncan but exported user def functions are ideally multi word
06:14 gaal dduncan: nobody would write tests if they had to say expect_this_value(...)
06:14 dduncan is it so bad for it to be, eg, test_ok(), test_is(), test_pass(), test_fail(), etc?
06:14 gaal yes :)
06:15 gaal test_ is like Test::, only makes me think I'm coding in c
06:15 dduncan well, then a good solution is ...
06:15 gaal (which, these days, I actually sometimes am, but that only makes me grateful there's Perl in the world)
06:15 dduncan take advantage of the english language's propensity for a lot of synonyms
06:15 gaal yes.
06:15 dduncan use one synonym for the built-in, and another for the Test
06:15 justatheory has joined #perl6
06:16 dduncan so then the question is, who gets fail()
06:16 gaal stumble("oh no! this test didn't pass!")
06:16 autrijus I think Test.pm should give way. A new verb, say flunk(), should be used.
06:16 gaal flunk++ :-)
06:16 dduncan flunk++
06:16 obra heh
06:17 webmind ... :)
06:17 dduncan so who should we run this by before we go and change it?
06:17 gaal p6-l. I'm writing up the email.
06:17 dduncan I look forward to it
06:19 autrijus note that fail() is not specced anywhere.
06:19 gaal you mean p6 fail? it is mentioned in S... uh, something. :-)
06:19 autrijus the only place it's mentioned is S05
06:19 gaal 6 maybe.
06:19 autrijus implicitly
06:19 gaal 5 !? that's a surprise.
06:20 autrijus there's no mention of fail in 6.
06:20 autrijus implicit mention in A12.
06:20 autrijus stub in S29.
06:20 autrijus so it's... not exceedingly well specced
06:20 gaal I'm pretty sure I did see it in a synopsis somewhere :(
06:21 autrijus oh wait, the new S4 mentions it.
06:21 autrijus my bad
06:21 autrijus should've updated P6::Bible before speaking
06:21 gaal you flunked the grep
06:22 autrijus lol
06:26 gaal .oO(MMD would not even have worked as a workaround in this case)
06:28 autrijus yup. you need something far more evil.
06:29 autrijus also, fail() isn't that popular in tests anyway.
06:32 autrijus in the spirit of jfdi I went ahead and replaced fail() with flunk()... r8080.
06:32 gaal ha!
06:33 autrijus dduncan++ gaal++ # vehement agreement
06:33 autrijus mm, keynote coming up tomorrow wrt Pugs.
06:34 dduncan oh, autrijus ...
06:34 autrijus dduncan: yes?
06:34 dduncan I still have to trace it but ...
06:34 dduncan while your last fix seems to have corrected the problem, something more subtle has come up, that I'm trying to trace
06:35 autrijus ?eval try { die Object.new }; $!.ref
06:35 evalbot_8076 is now known as evalbot_8080
06:35 evalbot_8080 ::Object
06:35 svnbot6 r8080 | autrijus++ | * to not conflict with keyword "fail" (now specced in S04),
06:35 svnbot6 r8080 | autrijus++ |   Test.pm's fail() is renamed to flunk().
06:35 dduncan that part's fine
06:35 dduncan there seems to be a problem where something is copied by reference rather than by value
06:36 autrijus k... test case appreciated
06:36 autrijus (I know you're tracing it :))
06:36 dduncan after doing something else that could set $!, a variable copied from $! loses its value
06:36 dduncan I think that's what's happening
06:37 autrijus mmm
06:37 dduncan I mean, I say after the catch, $foo = $!, then $foo contains the object, but some time later, $foo becomes undef
06:38 dduncan that undeffing doesn't happen if $foo was set as $foo = Obj.new()
06:38 gaal I should really get back to pragmas...
06:38 dduncan I think its acting like someone said $foo := $!
06:38 gaal But I should also really get to the office :/    bye &
06:39 autrijus enjoy, gaal
06:39 autrijus dduncan: nod... minimal example greatly appreciated
06:39 dduncan but are method arguments supposed to be aliases for the original
06:39 dduncan ?
06:39 autrijus yes, they are
06:39 autrijus they are bound using := semantic
06:39 autrijus unless you do "is copy"
06:39 dduncan maybe this is correct then
06:40 dduncan but what I actually want is for the two to be references to the same value
06:40 autrijus (problem is that "is copy" is not yet supported.)
06:40 autrijus nod... make the first one an explicit ref then
06:40 autrijus just like in p5
06:40 dduncan like if you said $bar = Obj.new(); $foo = $bar; $bar = undef;
06:40 dduncan $foo still has the object
06:40 dduncan that's how I expected arguments to behave
06:40 autrijus yes, and "is copy" is "$foo = $bar"
06:41 autrijus args in p6 behaves like $_[0]
06:41 autrijus by default
06:41 autrijus except they cannot be assigned to
06:41 dduncan so you're saying that 'is copy' is just a shallow copy, not a deep copy?
06:41 dduncan I guess so
06:41 autrijus yup, is copy is just a shallow copy -- FETCH then STORE
06:41 autrijus need .clone for deepcopies
06:42 dduncan I can't help thinking that this may be counter-intuitive
06:42 dduncan otoh, they are read-only by default, right?
06:42 autrijus yes.
06:42 autrijus I think it's sane semantics
06:43 dduncan I'll add an is-copy then
06:43 autrijus as that removes function call overhead
06:43 autrijus okay, and I'll try adding support for "is copy" for you right now :)
06:44 dduncan the reason I considered this counter-intuitive is that, while the argument is read-only from the invoked sub's perspective, the value can still change out from under it if the caller handed it a global or env ish variable like $! in the first place ... that's what seems counter intuitive ...
06:45 dduncan to protect against this, one would have to put a whole bunch of is-copy in their code even when they are never going to change the value
06:45 dduncan conceptually, you only use is-copy if you're going to modify the variable
06:46 dduncan the problem here sort of evokes the kinds of problems you normally just have with threads, where something can magically change on you
06:46 nothingmuch has joined #perl6
06:46 autrijus I think "is copy" actually should work jsut as is for you
06:46 autrijus further I think the real problem here is global vars.
06:46 autrijus they are Evil(tm).
06:46 dduncan yes
06:46 nothingmuch morning
06:46 autrijus nothingmuch: hi
06:47 dduncan I think that this problem can be fixed if $! was lexical like, where each scope has their own
06:47 nothingmuch aye!
06:47 dduncan that way, a try {} in the called sub won't change the $! of the caller sub
06:47 autrijus I think $! being an environmental lexical
06:47 autrijus instead of a global
06:47 dduncan if *that* was fixed, then the is-copy we're discussing won't be necessary
06:47 autrijus makes much more sense.
06:47 dduncan yes
06:48 autrijus in newest S02, lwall put a "Conjectural:" to that idea
06:48 dduncan but as I recall, each call scope has a separate environment of sorts
06:48 autrijus if we can argue him into removing the "Conjectural:", yay.
06:48 * autrijus nudges dduncan into doing a minimal p6l post demonstrating why global $! (and $/) is a bad bad idea
06:48 dduncan meanwhile, if I end up using is-copy, or a manual $foo = $foo meanwhile, I'm putting a big comment by it saying this $! thing is bad
06:49 dduncan I think I will
06:49 autrijus nod... but turning it into a p6l post will make more sense
06:49 dduncan meanwhile, don't feel you need to do is-copy for my sake, for this issue
06:49 autrijus as I'm very happy to make perl6 to have zero "register" variables.
06:49 dduncan fyi, I think that is-copy *may* in fact already be working ... at least, I used it somewhere else
06:50 autrijus dduncan: I discovered "is copy" is already there
06:50 autrijus it's just accidentally also made it writable.
06:50 dduncan see what I said before you said that!
06:50 autrijus :D
06:50 dduncan my interpolate_vars_into_template_text used it for awhile
06:50 dduncan to get around that it barfed when I tried to do a s/// on an hash arg value
06:51 dduncan but there, is-copy made sense
06:51 dduncan will write the p6l post now ...
06:52 autrijus danke!
06:53 justatheory has quit IRC ()
06:53 GeJ has joined #perl6
06:54 * autrijus conjecture that the register variables are the singlemost worst idea in perl5 :)
06:55 GeJ g'dday mates
06:55 autrijus greetings GeJ
06:55 GeJ Hello Mr. A. How was the flight?
06:56 autrijus the flight was okay; I slept most of the way. then slept some 13 hours. then some 7 hours after flying to melbourne.
06:57 autrijus last-hour deployment of $job on multiple client sites can do that to a person :)
06:58 GeJ I can see that. Well, $job is done. Get some rest and enjoy the summer :)
06:58 autrijus indeed :) the weather is lovely.
06:58 autrijus and I've not received emergency cell phone calls, so I assume it worked out well
06:59 * autrijus praises cc2e checklists for catching a lot of potential errors
07:00 GeJ Well, I was in the area a few weeks ago. I can trust you on the weather. Now it's all cold and snow. damn...
07:00 autrijus the first day of conference is wonderful as well... but I think it's closing in a few mins. I'll log on back after dinner
07:00 autrijus yeah... I shudder when I think about the Taipei weather I'm going to return to.
07:02 autrijus gaal++ # "dropout cuteness"... I almost lol'ed which would be in appropriate in the conference room
07:10 autrijus bbl... dinner &
07:14 Amnesiac has quit IRC ("Leaving")
07:27 iblechbot has joined #perl6
07:30 lisppaste3 has quit IRC ("Want lisppaste3 in your channel? Email chandler AT unmutual.info.")
07:30 lisppaste3 has joined #perl6
07:31 saorge__ has quit IRC (Connection timed out)
07:32 gaal d'oh, on the cab I realized I made a silly syntax error; that should have been ++<< <dduncan autrijus>
07:33 dduncan hello
07:33 dduncan the email looked fine to me
07:33 gaal yeah but [++] is wrong :-)
07:47 dduncan p6l message away ...
07:57 dduncan ... and returned ... autrijus and gaal and others, I welcome any feedback or support on p6l
07:57 dduncan but I'll have to read it tomorrow because I'm about to bed
08:18 r0nny has joined #perl6
08:18 r0nny moin
08:19 GeJ servus(s)?
08:19 * GeJ in Germany for over a year and still doesn't know how to write this properly.
08:19 GeJ Well, it's too early anyway
08:23 elmex has joined #perl6
08:31 r0nny lol
08:31 * r0nny hands GeJ a manaual about the irc actions, and the holy book of servus
08:33 GeJ thanks
08:47 cognominal has quit IRC (Read error: 110 (Connection timed out))
08:49 elmex has quit IRC ("uni lol")
09:08 meppl guten morgen
09:08 dduncan good morning
09:08 dduncan and now I will to bed
09:11 dduncan has quit IRC ()
09:27 dada has joined #perl6
09:34 brother_ has joined #perl6
09:47 kane_ has joined #perl6
09:48 brother has quit IRC (Read error: 110 (Connection timed out))
09:49 nnunley has quit IRC (Read error: 110 (Connection timed out))
10:31 ImustDIE has joined #perl6
10:53 r0nny yo
10:53 r0nny i got a problem with m:P%/foo/ - pux tessl it didnt expect the m
10:53 r0nny eh pugs
10:56 rafl Please paste something.
10:56 r0nny darn
10:56 r0nny found where i was wrong
10:56 r0nny bad typo again
10:59 r0nny btw - is there something like popen ?
11:00 rafl Well, fork and invoke a shell and you have a popen.
11:00 r0nny hmm
11:01 r0nny guess i will use `foo`
11:01 rafl But popen kind of sucks because its read-only or write-only.
11:01 rafl Well, that doesn't do what popen does.
11:01 r0nny i need only the purput
11:01 r0nny output
11:02 rafl Yes. But if the output takes a while to be generated or includes some progress information it's not good to use `foo` because you could better read async and keep your application responsive
11:03 r0nny just calling find on a simple directory structure
11:04 rafl We have a File::Find module.
11:05 r0nny atm its not usable for my purpose
11:12 r0nny darn
11:12 r0nny why is abs2real from File::Spec unknown :/
11:13 rafl I guess because you call it the wrong way.
11:14 rafl The current File::Spec module is cruft.
11:14 rafl You're welcome to rewrite it in a sane way.
11:16 r0nny how to call it correct?
11:22 iblechbot has quit IRC (Read error: 110 (Connection timed out))
11:30 rafl use File::Spec;
11:31 rafl catfile('foo', 'bar');
11:31 rafl No File::Spec.catfile or whatever you might expect.
11:31 rafl You can't avoid to import all the stuff into your namespace.
11:34 r0nny i did use File::Spec, and then called abs2rel
11:35 r0nny but it doesnt want to run it
11:52 Juerd_ rafl: Sure you can.
12:26 fglock has joined #perl6
12:34 svnbot6 r8081 | kane++ | * forgot to add jib.pm as a placeholder for version etc
12:34 svnbot6 r8081 | kane++ | * add a note about binary packages in the comment
12:38 kane-xs has joined #perl6
12:46 cognominal has joined #perl6
12:46 iblechbot has joined #perl6
12:46 cognominal has quit IRC (Remote closed the connection)
12:49 r0nny re
12:49 cognominal has joined #perl6
12:50 fglock stevan: how about a "pil2-pir" backend?
12:53 fglock with some parts written in p6, and some in pir - so that it could run itself some day
12:57 r0nny i found a problem with exports
12:58 r0nny for some reason each function is used is only exported once - so if i use it in 2 independ modules it happens, the stuff breaks everything since 1 module cant access
13:11 stevan has quit IRC (zelazny.freenode.net irc.freenode.net)
13:11 wilx has quit IRC (zelazny.freenode.net irc.freenode.net)
13:11 jp-autark has quit IRC (zelazny.freenode.net irc.freenode.net)
13:11 f0rth has quit IRC (zelazny.freenode.net irc.freenode.net)
13:11 lumimies has quit IRC (zelazny.freenode.net irc.freenode.net)
13:12 stevan has joined #perl6
13:12 wilx has joined #perl6
13:12 jp-autark has joined #perl6
13:12 f0rth has joined #perl6
13:12 lumimies has joined #perl6
13:32 scook0 has quit IRC ("Leaving")
13:40 nemux has joined #perl6
13:40 nemux hi all
13:44 nemux has quit IRC (Client Quit)
13:51 r0nny sub fakk(Int $i){[*] 1..$i;};fakk(7)
13:52 r0nny ?eval sub fakk(Int $i){[*] 1..$i;};fakk(7)
13:52 evalbot_8080 is now known as evalbot_8081
13:52 evalbot_8081 5040
13:54 nothingmuch has quit IRC ("leaving")
13:57 Qiang has joined #perl6
13:58 f0rth has quit IRC (zelazny.freenode.net irc.freenode.net)
13:58 stevan has quit IRC (zelazny.freenode.net irc.freenode.net)
13:58 wilx has quit IRC (zelazny.freenode.net irc.freenode.net)
13:58 jp-autark has quit IRC (zelazny.freenode.net irc.freenode.net)
13:58 lumimies has quit IRC (zelazny.freenode.net irc.freenode.net)
14:01 stevan has joined #perl6
14:01 wilx has joined #perl6
14:01 jp-autark has joined #perl6
14:01 f0rth has joined #perl6
14:01 lumimies has joined #perl6
14:06 GeJ has quit IRC ("Client exiting")
14:07 diotalevi has quit IRC ("Leaving")
14:07 diotalevi has joined #perl6
14:07 GeJ has joined #perl6
14:10 f0rth has quit IRC (zelazny.freenode.net irc.freenode.net)
14:10 stevan has quit IRC (zelazny.freenode.net irc.freenode.net)
14:10 wilx has quit IRC (zelazny.freenode.net irc.freenode.net)
14:10 jp-autark has quit IRC (zelazny.freenode.net irc.freenode.net)
14:10 lumimies has quit IRC (zelazny.freenode.net irc.freenode.net)
14:10 f0rth_ has joined #perl6
14:11 lumimies has joined #perl6
14:11 stevan has joined #perl6
14:11 jp-autark has joined #perl6
14:11 wilx has joined #perl6
14:20 robkinyon ?eval sub fakk(Int $i){[*] 1..$i;};fakk(7)
14:20 evalbot_8081 5040
14:32 r0nny try it with 700 ;P
14:34 dudley_ has joined #perl6
14:36 iblechbot has quit IRC (Read error: 110 (Connection timed out))
14:45 iblechbot has joined #perl6
15:14 Jooon has quit IRC ("Reconnecting")
15:14 Jooon has joined #perl6
15:27 hexmode has joined #perl6
15:30 lisppaste3 has quit IRC ("Want lisppaste3 in your channel? Email chandler AT unmutual.info.")
15:30 lisppaste3 has joined #perl6
15:44 dudley_ has quit IRC ()
15:48 justatheory has joined #perl6
15:50 * rafl want's a new pugs release. The collection of patches against 6.2.10 that I use in the Debian package gets unmaintainable..
15:55 bradb_ is now known as bradb
16:06 cognominal has quit IRC (Read error: 104 (Connection reset by peer))
16:06 justatheory has quit IRC ()
16:08 cognominal has joined #perl6
16:12 nothingmuch has joined #perl6
16:17 Eimi has joined #perl6
16:23 justatheory has joined #perl6
16:24 fglock has quit IRC ("CGI:IRC (Ping timeout)")
16:42 saorge has joined #perl6
16:42 Gilby has joined #perl6
16:43 elmex has joined #perl6
16:52 knewt has quit IRC (Read error: 110 (Connection timed out))
17:07 Shachaf has joined #perl6
17:13 Gilby has left
17:17 geoffb has quit IRC (Read error: 104 (Connection reset by peer))
17:19 Amnesiac has joined #perl6
17:28 nothingmuch has quit IRC (Read error: 113 (No route to host))
17:30 Shachaf has quit IRC ("Leaving")
17:35 Shachaf has joined #perl6
17:42 nothingmuch has joined #perl6
17:51 GeJ has quit IRC ("Client exiting")
17:59 geoffb has joined #perl6
18:06 sapper has joined #perl6
18:10 dudley_ has joined #perl6
18:10 _Vutral has joined #perl6
18:18 r0nny re
18:20 r0nny ?eval sub fob(Int $i){[+] 1..$i;};fob(2000)
18:20 evalbot_8081 2001000
18:21 r0nny ?eval sub fob(Int $i){[+] 1..$i;};fob(3000)
18:21 evalbot_8081 4501500
18:27 diotalevi has quit IRC (Read error: 110 (Connection timed out))
18:27 diotalevi_ has joined #perl6
18:29 Odin-LAP has quit IRC ("What's this button do?")
18:35 dada has quit IRC ("-... -.-- .")
18:50 sapper has quit IRC ("Leaving")
18:57 Limbic_Region has joined #perl6
19:02 diotalevi^ has joined #perl6
19:03 Limbic_Region salutations diotalevi
19:04 Limbic_Region did a GHC port of NetBSD become available on your architecture?
19:04 Limbic_Region errr - did an NetBSD port of GHC ...
19:12 diotalevi_ has quit IRC (Read error: 110 (Connection timed out))
19:14 nothingmuch hola diotalevi^
19:16 Limbic_Region ?eval my @list = 1...; @list[42]
19:16 evalbot_8081 pugs: out of memory (requested 1048576 bytes)
19:16 Limbic_Region oh - so that's not fixed yet huh
19:22 wolverian ?eval (1...)[42]
19:22 evalbot_8081 \43
19:22 wolverian heh.
19:23 Limbic_Region ?eval my @list = 1 .. Inf; @list[42]
19:23 evalbot_8081 pugs: out of memory (requested 1048576 bytes)
19:24 SamB boy, that isn't a whole lot of memory for a list from 1 .. Inf
19:26 saorge_ has joined #perl6
19:39 r0nny yo
19:40 r0nny ?eval sub lop(Int $i){[**] 1..$i;};fob(4)
19:40 evalbot_8081 Error: No such method: "&fob"
19:40 r0nny ?eval sub lop(Int $i){[**] 1..$i;};lob(4)
19:40 evalbot_8081 Error: No such method: "&lob"
19:40 r0nny ?eval sub lop(Int $i){[**] 1..$i;};lop(4)
19:40 evalbot_8081 1.0
19:40 r0nny ?eval sub lop(Int $i){[**] 1..$i;};lop(5)
19:40 evalbot_8081 1.0
19:40 r0nny ?eval sub lop(Int $i){[**] 2..$i;};lop(5)
19:40 evalbot_8081 Inf
19:40 r0nny ?eval sub lop(Int $i){[**] 2..$i;};lop(2)
19:40 evalbot_8081 2
19:40 r0nny ?eval sub lop(Int $i){[**] 2..$i;};lop(3)
19:40 evalbot_8081 8/1
19:41 r0nny ?eval sub lop(int $i){[**] 2..$i;};lop(3)
19:41 evalbot_8081 8/1
19:41 r0nny darn it
19:42 diotalevi_ has joined #perl6
19:43 saorge has quit IRC (Success)
19:49 pd has joined #perl6
19:49 fglock has joined #perl6
19:51 fglock does m:/<space>/ match newlines?
19:51 fglock I'm trying to parse PIL2
19:52 diotalevi^ has quit IRC (Read error: 110 (Connection timed out))
19:56 _SamB_ has joined #perl6
19:57 SamB has quit IRC (Nick collision from services.)
19:58 _SamB_ is now known as SamB
20:06 pd anyone know if the PIR backend in pugs is a bit dated?
20:08 Odin-LAP has joined #perl6
20:33 diotalevi^ has joined #perl6
20:43 diotalevi_ has quit IRC (Read error: 110 (Connection timed out))
20:45 comet^ is now known as comet
20:45 comet is now known as comet^
20:46 fglock I'm getting this error: 'pugs: *** No such sub: "&rx_"' while using 'pugs -Cxxx', but no error in plain pugs. Maybe rules are not implemented in PIL/PIL2 yet?
21:02 robkinyon has left "Leaving"
21:04 dduncan has joined #perl6
21:15 _Vutral has quit IRC (Connection timed out)
21:20 Limbic_Region has quit IRC ("tiuq\")
21:56 autrijus fglock: weird... it all worksforme
21:56 svnbot6 r8082 | autrijus++ | * zip(@a; @b; @c) now works as specced.
21:56 autrijus did you build with precompiled prelude?
21:56 autrijus pd: yes it is
21:57 autrijus I need to update it to 0.4.0 syntax
21:57 autrijus (and maybe call it 6.2.11)
21:57 r0nny Ÿyo
21:58 autrijus hey r0nny
21:58 autrijus the [++$a] bug is fixed
21:58 obra hey autrijus
21:58 r0nny is there a need way, to join a special atribute of all elements f a list
21:58 r0nny neat
21:58 autrijus hi obra
21:59 autrijus @list.map{.attr}.join
22:01 r0nny neat!
22:01 saorge_ has quit IRC (Connection timed out)
22:02 r0nny ?eval my $x=0;my $foo=1..9;$foo[++$x]
22:02 evalbot_8081 \2
22:02 r0nny ?eval my $x=0;my $foo=1..9;$foo[$x++]
22:02 evalbot_8081 \1
22:02 r0nny sweet
22:04 pd thanks, autrijus
22:04 autrijus er, I mean @list.map:{.attr}.join
22:05 autrijus pd: np... new_pad is gone from parrot
22:05 autrijus so we need to use the new padspec
22:05 pd aha, that would explain a lot of it.
22:05 autrijus I can't complain, it's me who demanded their removal months ago ;)
22:06 pd that's what you get! :)
22:06 autrijus now I gotta deal with the consequences
22:09 pd so it's all _lex etc. as per http://www.parrotcode.org/doc​s/pdd/pdd20_lexical_vars.html eh?
22:09 autrijus aye
22:09 pd thanks, that's good to know. I haven't been keeping up lately. :)
22:09 autrijus thank $deity... as it's chip's design, I guess $deity := Bob
22:10 * pd was just reading last night about Dan doing his post-mortem, like, a month ago or something
22:11 autrijus *nod*
22:13 autrijus leo++ chip++ # moving forward
22:13 pd let's hear it for that
22:13 leo hi autrijus - and thanks
22:14 autrijus hi leo :)
22:14 pd speak of the leo
22:14 autrijus congrats on 0.4.0 -- it's gotta take some time to catch up with the fact that new_pad is gone, but it'd be time well spent
22:15 nnunley has joined #perl6
22:15 leo autrijus: please forward my greetings to the Australians from Austria (the other .au w/o kangoroohs ;)
22:15 integral one question on pads:  I see you can index them by name or by number;  does parrot help with allocating numbers against variable names?
22:17 autrijus leo: will do :)
22:19 leo integral: there is no index by number
22:19 integral oh :-/
22:19 autrijus integral: it's a level of indirection via LexInfo
22:20 autrijus but the translation iirc happens at PIR compile time
22:20 autrijus so it's still a constant lookup at runtime, if I'm not mistaken -- maybe I am
22:20 leo or just use registers in the sub, where the .lex is define
22:20 integral oh :-/  I was reading docs/compiler_faq.pod the other day
22:20 autrijus that too
22:20 integral that doesn't spec out the new design that's been implemented?
22:21 autrijus it mentioned new_pad
22:21 autrijus which makes it automatically wrong and obsolete
22:21 integral that'd gone?  Is there a spec somewhere else then?
22:21 integral *'s
22:21 autrijus pdd20 I think
22:21 autrijus # http://www.parrotcode.org/doc​s/pdd/pdd20_lexical_vars.html
22:21 integral ah
22:22 DaGo has joined #perl6
22:22 r0nny has quit IRC ("leaving")
22:23 autrijus I'll remove the misleading parts.
22:24 integral autrijus++
22:25 * mugwump waves at autrijus from across the ditch
22:27 autrijus yo mugwump
22:28 autrijus done
22:37 dduncan well, my p6l list post on $! got some responses
22:37 autrijus dduncan: yeah, and I agree with lwall that the "env" treatment = best
22:38 dduncan so how difficult would this be to implement ... if it is considered official?
22:42 svnbot6 has quit IRC (Read error: 110 (Connection timed out))
22:42 autrijus dduncan: trivial actually
22:43 autrijus dduncan: so maybe I take it as official and give it a try today
22:50 DaGo has quit IRC ()
22:52 elmex has quit IRC ("gn8")
22:57 hexmode has quit IRC (Remote closed the connection)
23:05 kane_ has quit IRC ()
23:12 kanru2 has joined #perl6
23:13 Qiang has quit IRC ("Leaving")
23:13 Eimi has quit IRC ("Leaving")
23:17 qmole has joined #perl6
23:25 iblechbot has quit IRC (Success)
23:30 lisppaste3 has quit IRC ("Want lisppaste3 in your channel? Email chandler AT unmutual.info.")
23:30 lisppaste3 has joined #perl6
23:36 kanru has quit IRC (Connection timed out)
23:36 nothingmuch has quit IRC (Read error: 113 (No route to host))
23:53 sapper has joined #perl6

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

Perl 6 | Reference Documentation | Rakudo