Camelia, the Perl 6 bug

IRC log for #perl6, 2009-09-21

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:00 Student joined #perl6
00:02 nbrown_ joined #perl6
00:04 frew__ joined #perl6
00:08 Whiteknight joined #perl6
00:08 nbrown__ joined #perl6
00:10 pugs_svn r28333 | ruoso++ | [S08] adding two more sections
00:18 abra joined #perl6
00:29 tak11 joined #perl6
00:41 TiMBuS joined #perl6
00:51 maja joined #perl6
01:00 sparc left #perl6
01:07 alester joined #perl6
01:16 hcchien joined #perl6
01:28 pugs_svn r28334 | lwall++ | [S02] clarification of run-time-ish nature of (* * *) requested by JimmyZ++
01:33 s1n_mini joined #perl6
02:04 * carlin is trying and failing to get Hurd to boot
02:30 Confield left #perl6
02:35 Confield joined #perl6
02:39 xinming joined #perl6
03:08 * carlin gives up. I wonder what Minix is like ...
03:14 * araujo has not tried Hurd for long time now
03:43 alester joined #perl6
03:45 [particle]1 joined #perl6
04:22 sm` joined #perl6
04:33 petdance joined #perl6
04:36 alester joined #perl6
04:36 alester joined #perl6
04:47 frew__ joined #perl6
05:01 desertm4x joined #perl6
05:15 quietfanatic joined #perl6
05:26 alester joined #perl6
05:37 ihrd1 joined #perl6
06:24 ihrd1 left #perl6
06:36 rfordinal joined #perl6
06:41 orafu joined #perl6
06:44 JimmyZ joined #perl6
06:46 dakkar joined #perl6
06:47 dukeleto joined #perl6
06:49 barney joined #perl6
06:51 TopoMorto joined #perl6
07:09 rfordinal joined #perl6
07:17 TopoMorto joined #perl6
07:21 moritz_ good morning lambdabutterflies
07:27 Tene morning. :)
07:28 JimmyZ moritz_: morning.
07:29 iblechbot joined #perl6
07:33 viklund good morning
07:33 viklund moritz_: I fixed the install-deps bug an hour ago...
07:33 moritz_ viklund++
07:35 * moritz_ sshs to his home computer to test it
07:36 viklund ;)
07:37 moritz_ charms like a wok
07:37 moritz_ erm ...
07:37 moritz_ :-)
07:37 viklund :p
07:38 moritz_ does proto try private clone URLs first?
07:38 moritz_ (from github, that is)
07:38 moritz_ I'm wondering because it asks for the passphrase of my ssh key a few times
07:38 meppl joined #perl6
07:39 viklund that should depend on the config file
07:40 viklund ahh, but that isn't honored
07:40 viklund so I guess it tries the private url first
07:42 viklund line 323 of lib/Installer.pm
07:44 moritz_ anyway, viklund++, mberends++, masak++ for proto
07:47 blackooze left #perl6
07:47 viklund :)
07:50 nbrown_ joined #perl6
07:50 moritz_ building http-daemon fails because of an old PARROT_DIR
07:51 moritz_ I guess some projects need to update to the new scheme
07:52 viklund yes, november is one of them
07:54 nbrown__ joined #perl6
07:58 jnthn oh hai
08:00 moritz_ \o/
08:01 moritz_ http://smolder.plusthree.com/app/​public_projects/smoke_reports/18 rakudo can haz smoke reports
08:03 mariuz joined #perl6
08:03 dalek rakudo: adddb73 | moritz++ | build/PARROT_REVISION:
08:03 dalek rakudo: bump PARROT_REVISION to a post-1.6.0 revision to get some testing
08:03 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​dddb73fea2ee04aa239a8bcdd8e5aed6c2443f0
08:03 dalek rakudo: 836c8c8 | moritz++ |  (2 files):
08:03 dalek rakudo: mention spectest_smolder in README and ChangeLog
08:03 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​36c8c8012205cccad66b497461b3c769be7315e
08:04 jnthn moritz_: Great!
08:06 moritz_ jdv79++
08:19 Matt-W Good morning!
08:21 frederico joined #perl6
08:23 ingy joined #perl6
08:41 masak joined #perl6
08:41 viklund o/ masak
08:41 masak good late morning!
08:42 JimmyZ masak: good morning.
08:42 masak JimmyZ: 早上好
08:43 JimmyZ masak: 早上好,天气怎么样。
08:43 JimmyZ masak: 我们这里下雷电雨。 ;)
08:44 masak thunderstorm, eh?
08:45 Matt-W Wow! I actually have the fonts for that!
08:45 * moritz_ just opened two proto tickets
08:45 * viklund goes and looks
08:45 * masak follows
08:46 moritz_ for the second I awesomeified the error message a bit
08:46 moritz_ before it used to say 'unknown home type'
08:46 moritz_ which wasn't all that informative
08:46 viklund ok
08:47 masak I plan to become a user of that branch shortly as well.
08:47 masak it looks very promising.
08:48 moritz_ indeed
08:48 moritz_ it mostly worked for me so far
08:50 masak mberends++ viklund++
08:50 payload joined #perl6
08:50 masak I've been very much on the sidelines of that refactor.
08:55 JimmyZ masak: yep
09:12 Whiteknight joined #perl6
09:14 cognominal moritz_, if in rebuild-rakudo, within the blizkost build, you put the  "make clean"  after the "Configure.pl", the build will exectue correctly when an pmc is modified.
09:14 moritz_ cognominal: care to patch that?
09:14 moritz_ I hope you have commit access to the pugs repo?
09:15 viklund masak: suggestion, make Ecosystem a factory for Projects
09:15 viklund which knows about their files and states
09:15 cognominal moritz_, I don't how to test the build on feather
09:16 masak viklund: interesting. right now Ecosystem is a way to introspect projects, nothing more.
09:16 moritz_ cognominal: you don't have to - if something goes wrong with the build I'll notice :-)
09:16 M_o_C joined #perl6
09:16 viklund it felt natural to have it like that when I did some stuff y-day
09:17 pmurias joined #perl6
09:17 masak viklund: permission < forgiveness
09:17 viklund masak: :)
09:20 TiMBuS joined #perl6
09:34 cmv joined #perl6
09:38 rfordinal left #perl6
10:23 drbean_ joined #perl6
10:43 payload joined #perl6
10:44 toyam joined #perl6
10:48 drbean joined #perl6
10:51 M_o_C joined #perl6
11:03 masak rakudo: class A {}; role B is A {}; class C does B {}
11:03 p6eval rakudo 836c8c: OUTPUT«Null PMC access in get_string()␤in sub trait_mod:is (src/gen_setting.pm:3469)␤called from sub trait_mod:does (/tmp/X9CyIhINZ0:2)␤called from Main (/tmp/X9CyIhINZ0:2)␤»
11:03 masak mwhahaha.
11:03 * masak submits rakudobug
11:06 ejs joined #perl6
11:07 moritz_ can a role inherit from a class?
11:08 masak according to A12, yes.
11:08 masak I'm just explaining what it means in the bug ticket.
11:08 moritz_ A12 is... slightly dusty
11:08 masak whatever. it's a Null PMC access :P
11:08 moritz_ aye :-)
11:09 moritz_ anyway, it would make sense to me if you were able to unpun a class into a role somehow :-)
11:09 masak that's not what happens according to A12, methinks.
11:09 masak it's more like a delayed inheritence.
11:09 moritz_ I wasn't implying it either
11:10 masak C ends up inheriting from A. the role B is just making sure it does.
11:10 masak for some reason, it looks more sane when the 'is A;' is written as a statement within B. but we don't support that syntax yet.
11:11 moritz_ so isa_ok(C, A, 'fooo');
11:11 moritz_ ah, right
11:11 moritz_ because it's just a composition directive that's also mixed into C at composition time
11:12 masak indeed.
11:13 moritz_ I'm toying with the idea of moving the synopsis from perlcabal.org to perl6.org
11:13 moritz_ but it feels slightly maniac
11:13 moritz_ "never change a running system" and all
11:14 moritz_ "The management of complexity is complex, but only if you think about it."
11:16 diakopter heh
11:17 diakopter moritz_: subs/blocks/return?
11:18 diakopter (should vijs implement next)
11:18 cognominal moving stuff out of the pugs repository is not a bad idea.  People thinks pugs is dead so don't look in that repository
11:19 moritz_ cognominal: I'm not thinking about moving the source, but the rendered HTML
11:19 * diakopter thinks moritz_ meant moving the website only
11:19 moritz_ diakopter: good idea (thought correct 'return' is surprisingly trick)
11:19 moritz_ s/thought/though/
11:19 diakopter moritz_: how trick
11:21 moritz_ well, it throws a control exception that can be caught, but that's still tied to the lexically surrounding routine
11:21 moritz_ we have loads of tests for that
11:21 moritz_ but... a simple return might do very well for now
11:21 diakopter remember vijs is stackless, so its frames are virtual
11:22 diakopter anything like that can be trivially emulated, with the understanding that it'll be performance costly. :D
11:23 diakopter aka SLOW
11:23 diakopter writing slow interpreters is fun
11:26 diakopter someone needs to design a language named SLOW
11:26 moritz_ and write a fast compiler for it :-)
11:26 diakopter with a name like that, it's certain not to disappoint!
11:27 TiMBuS they should have named C++ 'regret'
11:27 TiMBuS 'in hindsight...'
11:29 diakopter perl6: say 3;
11:29 p6eval elf 28334, pugs, rakudo 836c8c: OUTPUT«3␤»
11:29 moritz_ wow, there's a program for which all three agree?
11:29 Matt-W yes
11:29 diakopter moritz_: have you considered upgrading pugs on p6eval to the latest hackage release?
11:29 Matt-W evidently
11:30 diakopter (I'm assuming it's not already)
11:31 moritz_ diakopter: I think it is (not sure though)
11:31 moritz_ pugs: say $?PUGS_REVISION
11:31 p6eval pugs: OUTPUT«*** Undeclared variable: ("$?PUGS_REVISION",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb6520821>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb652d07d>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0x…
11:31 moritz_ pugs: say $?PUGS_VERSION
11:31 p6eval pugs: OUTPUT«Perl6 User's Golfing System, version 6.2.13.11, July 31, 2008 (r20996)␤»
11:32 moritz_ uhm, it's nto
11:32 diakopter 6.2.13.14
11:32 moritz_ aye
11:32 diakopter I read somewhere audreyt saying that the later ones process the test suite in several minutes instead of hours
11:33 moritz_ now if only she continued development...
11:35 moritz_ trying now if a simple 'cabal update && cabal upgrade' works
11:35 diakopter needs cabal 1.2
11:36 moritz_ cabal-install version 0.5.1
11:36 moritz_ using version 1.4.0.1 of the Cabal library
11:36 moritz_ is that 1.2 enough? :-)
11:36 diakopter dunno
11:36 * masak loves the error messages from cabal
11:38 moritz_ it's been "Resolving dependencies..." for five minutes now
11:38 moritz_ we've found one thing where proto is faster, it seems :-)
11:40 masak "fast but wrong"
11:40 moritz_ a program that doesn't terminate (but should) is also wrong.
11:40 viklund fail early!
11:41 diakopter moritz_: or is just too slow.
11:41 moritz_ I killed it after it needed 1GB of RAM
11:42 diakopter remove cabal and everything and install fresh?
11:43 moritz_ well, no.
11:43 moritz_ that's going to take ages
11:43 diakopter heh
11:43 moritz_ and I don't know if I have to upgrade GHC in the process
11:43 diakopter 6.10.1
11:43 moritz_ which is not funny[tm] on debian stable
11:43 Student joined #perl6
11:43 moritz_ ii  ghc6           6.8.2dfsg1-1   GHC - the Glasgow Haskell Compilation system
11:43 diakopter o
11:44 moritz_ there's also a /usr/local/bin/ghc-6.10.1
11:45 * diakopter looks at visudo
11:45 moritz_ not sure if it's worth the trouble
11:45 iblechbot joined #perl6
11:50 pmurias moritz_: use the latest cabal (cabal-install)
11:51 pmurias moritz_: in my (very limited) experience updating cabal fixes strange errors
11:54 kent\n joined #perl6
11:58 sm` joined #perl6
12:17 masak std: RR+
12:17 p6eval std 28334: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/b6It6RqQtS line 1 (EOF):␤------> [32mRR+[33m⏏[31m<EOL>[0m␤    expecting any of:␤   noun␤   prefix or noun␤     standard stopper␤ term␤   terminator␤       whitespace␤Undeclared name:␤        RR used at 1,1␤FAILED 00:03 40m␤»
12:18 masak std: 4 RR+ 2
12:18 p6eval std 28334: OUTPUT«ok 00:02 37m␤»
12:20 abbe joined #perl6
12:20 masak moritz_: in the last paragraph of http://perlgeek.de/blog-en/perl​-5-to-6/26-exceptions.writeback : s/loosing/losing/ - otherwise, great post.
12:20 abbe hi all
12:20 masak abbe: hey there!
12:20 abbe hi masak.
12:21 abbe anyone running FreeBSD and interested in trying out Rakudo, please check out PRs: http://www.freebsd.org/cgi/query-pr.cgi?pr=139012 http://www.freebsd.org/cgi/query-pr.cgi?pr=139010
12:23 PZt joined #perl6
12:25 mikehh rakudo (836c8c8) builds on parrot r41400 - make test / make spectest (up to 28334) PASS - Ubuntu 9.04 amd64
12:26 Grrrr abbe: the trick with USE_PARROT and ../parrot/Makefile.parrot seems overly complex;  what's wrong with just using the explicit dependencies in the rakudo port itself?
12:27 abbe Grrrr, because, I don't want to update rakudo when parrot gets updated and the only change the port needs is the change in pathnames.
12:28 abbe s/and the only change the port/, and when the only change, rakudo port/
12:29 Grrrr maybe it should be handled by not making the parrot libdir version-specific;  there are not currently many (to put it mildly) ports that depend on parrot in the tree
12:30 abbe Grrrr, and I think this is the way to tackle language ports dependent on parrot.
12:30 Grrrr eventually, yes, but once there is a non-trivial number of ports requring parrot it should really go into Mk/
12:38 JimmyZ joined #perl6
12:39 pmurias diakopter: re subs/blocks/returns subs require blocks and return requires both
12:39 diakopter requires both what
12:40 pmurias both subs and blocks
12:40 diakopter oh, I meant do all of them, or something else
12:41 shachaf joined #perl6
12:41 pmurias you don't need control exceptions early on
12:42 pmurias you can use implicit return sub plus_one($foo) {$foo+2}
12:44 diakopter I agree
12:49 snearch joined #perl6
12:51 masak http://perl6.ru/fast-p6c/ http://perl6.ru/p6c -- this looks interesing.
12:52 Matt-W masak: All rules have exceptions
12:53 masak Matt-W: sure, but it's one thing saying that, and another to experience it.
12:53 Matt-W True
12:54 Matt-W Which rule triggered your tweet?
12:54 masak I'm at $WORK, coding Java.
12:54 masak I just realized that my view of promoting expressions into local variables has changed a lot.
12:55 masak previously, I'd hesitate to do it unless and until I'd need it twice somewhere.
12:56 masak nowadays, I'll gladly do it if it gives the expression a descriptive name.
12:56 masak even if I subsequently only use it once.
12:58 Matt-W mmm
13:09 synth joined #perl6
13:12 donaldh joined #perl6
13:15 masak perl6: class A { method foo() { say "A" } }; class B { method foo() { say "B" } }; class C is A is B { method foo() { if Bool.pick { self.A::foo } else { self.B::foo } } }; C.new.foo for ^5
13:15 p6eval rakudo 836c8c: OUTPUT«A␤B␤B␤B␤B␤»
13:15 p6eval ..elf 28334: OUTPUT«Undefined subroutine &GLOBAL::prefix__94 called at (eval 140) line 31.␤ at ./elf_h line 5881␤»
13:15 p6eval ..pugs: OUTPUT«*** pick not defined: VType (mkType "Bool")␤    at /tmp/kUL6zARjv7 line 1, column 115-125␤»
13:15 masak rakudo++
13:18 zpmorgan joined #perl6
13:18 SmokeMachine joined #perl6
13:23 jnthn Meh. The wifi only works if I'm sat in the least comfortable bit of the hotel room. Fail. :-/
13:24 masak lolitsjnthn
13:24 masak rakudo: class A { method foo() { say "A" } }; class B {}; my $b = B.new; $b.A::foo
13:25 p6eval rakudo 836c8c: OUTPUT«A␤»
13:25 masak o.O
13:25 masak I bet it's possible to do something evil with that...
13:26 Matt-W jnthn: jammed between the side of the dressing table and the wastepaper bin?
13:26 masak rakudo: class A { has $!x; method foo() { say $!x } }; class B { has $!x = 42; }; my $b = B.new; $b.A::foo
13:26 p6eval rakudo 836c8c: OUTPUT«42␤»
13:26 jnthn masak: yeah, I'll get it is ;-)
13:26 masak bye-bye, encapsulation.
13:27 jnthn masak: huh? You called a publicly visible method
13:27 moritz_ outch
13:27 jnthn masak: You didn't break encapsulation at all.
13:27 jnthn :-P
13:27 masak jnthn: we need to agree to disagree on that, I fear.
13:27 jnthn Matt-W: Actually sat in the doorway.
13:27 jnthn Matt-W: Which bit?
13:27 jnthn erm, last one was for masak
13:28 masak jnthn: whether it breaks encapsulation at all.
13:28 Matt-W jnthn: hmm not good, but could be worse, you could have to stand on the toilet and hold the laptop near the ceiling
13:28 NorwayGeek joined #perl6
13:28 jnthn Matt-W: That would be rather crap, yes.
13:28 jnthn masak: How does it break encapsulation?
13:28 masak jnthn: I managed to use the A class to print a private attribute of a B object. that's encapsulation breakage in my book.
13:29 jnthn masak: oh, wait, I see what you mean
13:29 jnthn masak: erm
13:29 masak thought so. :)
13:29 jnthn masak: rakudo bug.
13:29 * masak submits
13:29 jnthn masak: It should'a given you the $!x from A.
13:29 masak aye.
13:29 jnthn I can't believe I've not be badgered enough about that one before now to fix it.
13:29 * masak badgers jnthn a little
13:29 jnthn Anyway, with the correct semantics, do we agree it's not breaking encapsulation? :-)
13:30 * jnthn mushrooms
13:30 masak jnthn: with the correct semantics, pigs can fly.
13:30 szabgab joined #perl6
13:30 masak jnthn: AAAH SNAKE!
13:30 moritz_ if it works as specced, IMHO it doesn't break encapsulation
13:30 masak nod.
13:31 Matt-W It should just print the A instance's $!x
13:31 Matt-W which wouldn't break encapsulation
13:31 moritz_ aye
13:31 masak right.
13:31 jnthn OK, we're agreeing.
13:31 jnthn Now Rakudo just needs beating into agreement too. :-)
13:33 moritz_ and tests.
13:33 jnthn I'm sure we already have some failings for that.
13:34 jnthn I hope so, anyways...
13:34 dalek rakudo: 0eaf628 | moritz++ | build/Makefile.in:
13:34 dalek rakudo: unbreak the whitespaces in Makefile.in (spaces -> tabs)
13:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​eaf628acff7d8b1758f2df8c80d92a2f7e83acc
13:34 masak wait a minute.
13:35 masak how could it have given me the $!x from A?
13:35 masak the classes do not inherit from each other.
13:35 jnthn masak: oh
13:35 jnthn masak: In that case it'll try and explode.
13:35 masak I agree.
13:36 jnthn Evidnetly, I didn't really read the example before commenting on it. ;-)
13:36 masak I must admit to not thinking it through enough either.
13:37 jnthn :-)
13:37 jnthn eh, thinking is overrated
13:37 masak but that's actually two bugs, then.
13:38 jnthn well, it's the same underlying issue
13:39 * masak pretends not to hear that
13:39 masak two tickets coming up!
13:40 jnthn :-P
13:45 jnthn OK, this is getting uncomfy...time to go be comfortable (and lose wifi).
13:45 jnthn o/
13:45 masak \o
13:46 nErVe joined #perl6
13:47 abra joined #perl6
13:55 finanalyst joined #perl6
13:56 finanalyst hello everyone.
13:56 finanalyst is there a way implemented allowing me to enquire which files exist in a directory?
13:57 masak in Rakudo? don't think so.
13:58 finanalyst in rakudo
13:58 masak most of us use platform-dependent ways to do that right now.
13:58 finanalyst i use ubuntu linux
13:59 finanalyst i dont need a portable technique
13:59 finanalyst i'm getting to prefer perl6 over perl5 for things
13:59 masak well then, check out qx[] and qqx[]
13:59 masak they're the new spelling of ``
14:00 finanalyst how do i get response back into the program?
14:00 masak the output will be the value of that expression.
14:00 masak just like with ``
14:01 finanalyst so that would be $x=qx[ls /path/] ?
14:01 masak something like that, yes.
14:01 finanalyst oh it works!
14:01 finanalyst great. thanx
14:02 takadonet joined #perl6
14:03 masak np.
14:03 takadonet morning all
14:04 masak takadonet: o/
14:04 Matt-W o/
14:05 alester joined #perl6
14:14 masak rakudo: class A { has $!a = 42 }; class B is A { has $!b = $!a + 1 }; class C is B { has $.c = $!b + 1 }; say C.new.c
14:14 p6eval rakudo 0eaf62: OUTPUT«44␤»
14:14 masak cool!
14:16 PacoLinux joined #perl6
14:16 KyleHa joined #perl6
14:19 ejs joined #perl6
14:35 jferrero joined #perl6
14:35 pmurias diakopter: why did you write to ToJS instead of using a JSON module?
14:35 diakopter pmurias: b/c none of the JSON modules supported trees with multiple refs to the same object
14:35 diakopter (and JSON doesn't support that either anyway)
14:36 pmurias good reason ;)
14:37 Psyche^ joined #perl6
14:38 araujo morning
14:38 masak o/
14:38 nihiliad joined #perl6
14:39 diakopter pmurias: and I couldn't find a yaml parser in JS
14:40 diakopter anyway, ToJS is several times faster than YAML::XS
14:40 diakopter fwict
14:40 diakopter :)
14:46 carlin rakudo: multi infix:<^> {};
14:46 p6eval rakudo 0eaf62: OUTPUT«push_pmc() not implemented in class 'Sub'␤»
14:46 dukeleto joined #perl6
14:47 masak and he's back! :)
14:48 pmurias diakopter: are you using any V8 specific features? i'm trying to make vivjs emit normal js and when firefox runs it i get a Type quote__S_Double_Double not found! undefined exception
14:49 diakopter pmurias: interesting..
14:49 diakopter it should work
14:50 diakopter you'd need to implement say_them(){}
14:50 diakopter since that's injected into the V8 context by Perl
14:50 pmurias already noop'ed it for now
14:51 crythias joined #perl6
14:51 diakopter can I see what you've created
14:52 pmurias wait a bit
14:53 pmichaud good morning, #perl6
14:53 diakopter 'lo
14:53 TimToady ______
14:53 NorwayGeek joined #perl6
14:53 TimToady (puddle of slime waving)
14:54 masak morning, Usonians.
14:54 TimToady you're having us on
14:55 JimmyZ good morning, pmichaud :)
14:55 masak TimToady: maybe a little.
14:56 TimToady before the coffee hits, it's impossible for me to be on more than a little
14:57 zloyrusskiy joined #perl6
14:57 TimToady on the other hand, it's the time of day when I'm most dangerously free-associative
14:57 TimToady probably excipient dream-state
14:58 masak it didn't know it comes and goes.
14:58 * TimToady hops excipient means the opposite of incipient
14:58 TimToady *hopes
14:58 pugs_svn r28335 | pmurias++ | remove bitroten profiling support
14:58 carlin rakudo: sub bar { CATCH {}; }; say bar;
14:58 p6eval rakudo 0eaf62: OUTPUT«Null PMC access in type()␤in Main (/tmp/uAIj0RrPax:2)␤»
14:58 pugs_svn r28336 | pmurias++ | [vivjs] an experimental viv --jsx option
14:59 masak http://en.wiktionary.org/wiki/excipient
14:59 masak carlin: I think that one is known.
14:59 NorwayGeek joined #perl6
14:59 carlin masak: ah, okay
15:00 masak not 100% sure, though. but I think I saw someone RT-report it.
15:00 TimToady so why does it show incipient as a related term then, I wonder...
15:02 NorwayGeek joined #perl6
15:04 pugs_svn r28337 | pmurias++ | [vivjs] fix error
15:04 pmurias diakopter: say 1 should work with --jsx
15:05 JimmyZ vivjs?
15:05 diakopter vijs is what I've been calling it, but I think that's name is temporary
15:05 diakopter that name
15:06 diakopter or that's, I guess.
15:12 Woodi hi all; rakudo.org/status say only open works for IO... but it can write with :w at least ?
15:12 masak Woodi: it can.
15:12 huf which bit should i read if i want to know how to define the precedence levels of new operators?
15:13 moritz_ S03
15:13 moritz_ or S06
15:13 huf thanks
15:13 moritz_ but it's NYI in Rakudo (for custom operators)
15:14 Woodi how about modules ? some included/downloadable or loadable ?
15:15 moritz_ Woodi: proto (<http://github.com/masak/proto/>) know about some modules, and in a branch it can download them too
15:15 masak actually, it can download them in master as well.
15:16 Woodi proto is another p6 implementation ? :)
15:16 moritz_ no, it's a module installer
15:16 TimToady it's also a desert wax and a floor topping
15:16 TimToady *dessert
15:16 Woodi ah, k. thank you
15:17 Woodi TimToady: means some additional funcionality or easter eggs ? :)
15:17 diakopter also a hobbit name
15:17 TimToady I meant that the term "proto" is heavily overloaded :)
15:18 * TimToady ignores diakopter's ravings
15:19 Woodi ok, so rakudo is considered working language now :)
15:19 TimToady though we did get rid of the term "protoobject"
15:19 TimToady define "work"
15:19 masak Woodi: Rakudo has a lot of things that work nowadays, yes. you'd be surprised.
15:20 TimToady it could be regarded as Turing complete
15:20 mdxi "And so Proto Paggins and Ram Hamgee left the Whire under cover of darkness, pursued by the Bazgul, though they knew it not."
15:20 masak for some reason, that feels like small comfort.
15:20 Woodi not "sandboxed" calculations that disappear when process stops
15:20 masak Woodi: sounds like the Rakudo REPL to me. :)
15:20 TimToady You can't fool me, I know the real hobbit was named Frito
15:21 masak wait, aren't you bored of that subject yet?
15:21 TimToady Woodi: rakudo has I/O, so the calculations don't need to disappear
15:22 TimToady rakudo: say [*] 1..10
15:22 masak rakudo: class TheOneRing { method new { self } }; say TheOneRing.new === TheOneRing.new
15:22 p6eval rakudo 0eaf62: OUTPUT«3628800␤»
15:22 p6eval rakudo 0eaf62: OUTPUT«1␤»
15:22 TimToady there, now that calculation is recorded in the IRC log
15:23 TimToady masak: that's...wrong
15:23 moritz_ no, it's not
15:23 TimToady oh, wait
15:23 Woodi yes, but using expect for results isn't productive i think :)
15:23 moritz_ .new doesn't return a new instance
15:23 TimToady I see how you did it
15:23 moritz_ it returns the type object
15:23 masak :)
15:24 TimToady fortunately, it also returns something undefined
15:24 JimmyZ rakudo: ( [*] 1..( -> $_ { $_ ** } )(20)).say;
15:24 p6eval rakudo 0eaf62: OUTPUT«Confused at line 2, near "** } )(20)"␤in Main (src/gen_setting.pm:3469)␤»
15:24 JimmyZ rakudo: ( [*] 1..( -> $_ { $_ ** 2 } )(20)).say;
15:24 masak rakudo: class TheOneRing { method new { self }; method defined { True } }; say TheOneRing.new === TheOneRing.new; say TheOneRing.defined
15:24 diakopter rakudo: say defined self
15:24 p6eval rakudo 0eaf62: OUTPUT«Lexical 'self' not found␤»
15:24 p6eval rakudo 0eaf62: OUTPUT«Inf␤»
15:24 p6eval rakudo 0eaf62: OUTPUT«1␤0␤»
15:25 masak dang.
15:25 JimmyZ rakudo: ( [*] 1..( -> $_ { $_ ** 2 } )(5)).say;
15:25 p6eval rakudo 0eaf62: OUTPUT«1.5511210043331e+25␤»
15:25 JimmyZ wow
15:25 diakopter does rakudo have bigint
15:25 TimToady Woodi: it could be argued that putting things up on webpages is also relatively useless :P
15:25 masak diakopter: nope.
15:25 JimmyZ rakudo: ( [*] 1..( -> $_ { $_ ** 2 } )(7)).say;
15:25 * diakopter hurries
15:25 p6eval rakudo 0eaf62: OUTPUT«6.08281864034268e+62␤»
15:26 JimmyZ rakudo: ( [*] 1..( -> $_ { $_ ** 2 } )(8)).say;
15:26 p6eval rakudo 0eaf62: OUTPUT«1.26886932185884e+89␤»
15:26 JimmyZ rakudo: ( [*] 1..( -> $_ { $_ ** 2 } )(9)).say;
15:26 p6eval rakudo 0eaf62: OUTPUT«5.79712602074737e+120␤»
15:26 Woodi right, so many pages...
15:26 JimmyZ rakudo: ( [*] 1..( -> $_ { $_ ** 2 } )(10)).say;
15:26 p6eval rakudo 0eaf62: OUTPUT«9.33262154439441e+157␤»
15:27 JimmyZ not Inf now.
15:28 Woodi visual studio have so many pages that i make break after finding that vs2008 include sqlite replacement by default
15:28 masak rakudo: class A { method defined { True } }; say A.defined
15:28 p6eval rakudo 0eaf62: OUTPUT«0␤»
15:28 diakopter rakudo: my $a=10**308; say $a; say 10*$a;
15:28 masak 0? how does Rakudo figure that?
15:28 Woodi any DBI in rakudo ?
15:28 p6eval rakudo 0eaf62: OUTPUT«1e+308␤Inf␤»
15:28 masak Woodi: working on it!
15:29 masak Woodi: well, sorta.
15:29 moritz_ also working on it
15:29 moritz_ sorta
15:29 TimToady shower &
15:29 Woodi can i work on it too ? mean use something in script ? :)
15:29 masak Woodi: I'm porting Sequel -> Squerl http://sequel.rubyforge.org/
15:29 masak Woodi: you're very welcome to try it out.
15:30 JimmyZ rakudo: class A { method defined { Bool:;True } }; say A.defined
15:30 p6eval rakudo 0eaf62: OUTPUT«Confused at line 2, near ":;True } }"␤in Main (src/gen_setting.pm:3469)␤»
15:30 JimmyZ rakudo: class A { method defined { Bool::True } }; say A.defined
15:30 masak JimmyZ: ::, not ;;
15:30 p6eval rakudo 0eaf62: OUTPUT«0␤»
15:30 JimmyZ masak: yep
15:30 Woodi masak: why you work on ORM when no DB yet ? :)
15:30 JimmyZ rakudo: class A { method defined { Bool::True } }; say A.defined.perl
15:30 p6eval rakudo 0eaf62: OUTPUT«Bool::False␤»
15:31 masak Woodi: Tene++ made a simple SQLite connection work.
15:31 diakopter Made from an exclusive non-yellowing formula.
15:31 masak Woodi: this already works: http://github.com/masak/web/blob/​master/t/squerl/01-sqlite-write.t
15:31 JimmyZ rakudo: class A { method defined { Bool::True } }; say (new A).defined.perl
15:31 p6eval rakudo 0eaf62: OUTPUT«Could not find non-existent sub new␤»
15:32 masak (though I cheat a lot right now)
15:34 JimmyZ rakudo: ( [*] 1..(( $_ ~ '0' )(1).Int)).say;
15:35 p6eval rakudo 0eaf62: OUTPUT«Use of uninitialized value␤invoke() not implemented in class 'Perl6Str'␤in Main (/tmp/0znqi6NH0Z:2)␤»
15:35 JimmyZ rakudo: ( [*] 1..(( $_ ~ '0' )('1').Int)).say;
15:35 p6eval rakudo 0eaf62: OUTPUT«Use of uninitialized value␤invoke() not implemented in class 'Perl6Str'␤in Main (/tmp/AdUGZsHwRY:2)␤»
15:36 Woodi masak: squerl have something like ADO datasets ?
15:36 masak what's that?
15:37 JimmyZ rakudo: ( [*] 1..((( $_ ~ '0' )('1')).Int)).say;
15:37 masak ah, some .NET technology.
15:37 p6eval rakudo 0eaf62: OUTPUT«Use of uninitialized value␤invoke() not implemented in class 'Perl6Str'␤in Main (/tmp/to9PtDeVec:2)␤»
15:37 Woodi just db-acces arhitecture
15:38 masak well, I don't know how Squerl compares against ADO, but it does have a core class called Dataset.
15:38 Woodi with easy way to connect to visible components
15:38 masak I think of it as a lazy immutable way to formulate db queries.
15:39 JimmyZ rakudo: ( [*] 1..((( * ~ '0' )('1')).Int)).say;
15:39 p6eval rakudo 0eaf62: OUTPUT«invoke() not implemented in class 'Perl6Str'␤in Main (/tmp/47jT8sh4z1:2)␤»
15:39 Woodi i found "use SQLite3;" in Squerl.pm. so there is sqlit3 native module in rakudo ?
15:40 he_ joined #perl6
15:40 masak for example, $db<countries>.filter(region => 'Middle East').reverse_order('area').limit(5).avg('GDP') would create the SQL statement 'SELECT avg(GDP) FROM countries WHERE region = 'Middle East' ORDER BY area DESC LIMIT 5'
15:40 Woodi drop immutable pls :)
15:40 masak Woodi: no, it can be downloaded from github as perl6-sqlite
15:40 masak Woodi: I'd love to hear your reasons to drop immutable. presently, that's one of the things I like about Sequel's Dataset.
15:41 Woodi i thinked that your atased is readonly memory array...
15:41 Woodi so why ro ?
15:41 masak no, it's more like a representation of what to search for.
15:41 Woodi so how to update ?
15:41 masak having it immutable means that you can use it several times for searches.
15:42 masak there are methods to update the tables, but they don't affect the Dataset object.
15:42 masak (I sense that we might mean different things by 'Dataset', though)
15:42 Woodi no, i make s///g in my mind :)
15:43 Woodi your dataset is something like dataReader/dataROTable in other languages..
15:43 masak you replace nothing with nothing globally?
15:44 diakopter substitutions, generically, I'm sure
15:44 masak ah. well, we all do.
15:44 Woodi can you make dataset with update functionality ? look on it like some gui grid can just straight forward use it
15:45 masak Woodi: actually, in the example code I sent you, there's a Dataset doing an update at line 18. http://github.com/masak/web/blob/​master/t/squerl/01-sqlite-write.t
15:45 masak but maybe that's not what you mean.
15:46 Woodi sec
15:46 diakopter pmurias: things with double quotes seem to work in my firefox?
15:46 Woodi not iss just using db api. i talk about intermediate component
15:47 masak Woodi: ok. then I think I'll need a bit more explanation.
15:47 Woodi k
15:47 JimmyZ std: ( [*] 1..((( * ~ '0' )('1')).Int)).say;
15:47 p6eval std 28337: OUTPUT«ok 00:03 40m␤»
15:48 masak rakudo: class A { method postcircumfix:<{ }>(*@things) { .say for @things } }; my $a = A.new; $a< OH HAI >
15:48 Woodi you made dataser - object memory-array with is RO, right ? it is middleware betwin db api and programmer
15:48 p6eval rakudo 0eaf62: OUTPUT«OH␤HAI␤»
15:48 masak hey, overriding .{} does work!
15:48 masak how come .[] doesn't?
15:49 masak Woodi: no, the Sequel Datasets are not object memory arrays.
15:49 masak Woodi: they are just representations of a possible search.
15:49 Woodi masak: results in memory, read only
15:49 diakopter pmurias: actually, no, got a js error, but entirely different from the one you reported
15:49 masak Woodi: no. no results in memory.
15:49 diakopter I have lots of local mods tho
15:50 masak Woodi: it's more like an iterator, actually.
15:50 Woodi shape does not matter, box, or line...
15:50 masak I'm in design mode. from there it seems to matter a great lot. :)
15:50 masak but go on.
15:51 Woodi masak: it's memory structure so you can make lightwaight searches...
15:51 masak rakudo: class A { method postcircumfix:<[ ]>(*@things) { .say for @things } }; my $a = A.new; $a["OH", "HAI"]
15:51 p6eval rakudo 0eaf62: OUTPUT«OH␤HAI␤»
15:52 masak hey, .[] works too!
15:52 Woodi masak: with your own api
15:52 masak Woodi: aye.
15:52 avuserow rakudo: my $foo = [1, 2]; $foo.[0].print
15:52 p6eval rakudo 0eaf62: OUTPUT«1»
15:53 Woodi masak: so if someone will lern that new api he will need update methods in that new api
15:53 masak Woodi: is that so?
15:53 Woodi masak: no :)
15:53 masak Woodi: or, alternatively, why isn't the .insert method I showed you an update method?
15:53 masak it updates the databse.
15:54 Woodi masak: you can advertise this like MS advertised ADO :)
15:54 masak I'm sure I can. :)
15:54 Woodi and advertise p6 in same time as a platworm for wery efective db programming :)
15:55 Chillance joined #perl6
15:55 Woodi so look p6 is as production ready as C# :)
15:56 Woodi sqlite works, orm in place :0
15:56 masak rakudo: sub foo($a) { say $a }; foo("OH", "HAI")
15:56 p6eval rakudo 0eaf62: OUTPUT«too many arguments passed (2) - 1 param expected␤in sub foo (/tmp/bQxtEcsWRh:1)␤called from Main (/tmp/bQxtEcsWRh:2)␤»
15:56 masak rakudo: class A { method postcircumfix:<[ ]>($a) { $a.say } }; my $a = A.new; $a["OH", "HAI"]
15:56 p6eval rakudo 0eaf62: OUTPUT«OHHAI␤»
15:56 Woodi just gui representation is absent
15:56 masak hm, how come the latter works when the former doesn't?
15:56 masak Woodi: I'm glad you find so few things missing. :)
15:57 pmichaud masak:  postcircumfix:<[ ]>  is treated like a multi
15:57 Woodi i found i can use p6 right now :)
15:57 masak Woodi++
15:57 Woodi thanx again :)
15:57 masak pmichaud: does that explain it?
15:58 masak Woodi: good luck, and keep in touch!
15:58 pmichaud masak:  there's a fallback postcircumfix:<[ ]>  that knows how to deal with lists, and converts it into single-scalar lookups
15:58 masak aha.
15:58 pmichaud otherwise anyone wanting to override postcircumfix:<[ ]> would also have to provide implementations for Lists, Ranges, Whatevers, etc.
15:58 masak anyway, more already works than I though. that's good news.
15:59 masak s/though/thought/
15:59 diakopter more works than I, too.
15:59 molaf joined #perl6
15:59 pmichaud we also have to deal with the odd case of wanting to do positional access on non-Rakudo objects, which don't have a "postcircumfix:<[ ]>" method.
16:00 masak :)
16:00 masak whenever things seem too easy, bring HLL interoperability into the picture. :P
16:04 Woodi damn, googling for Tene++ just return page with our conversation...
16:04 masak :)
16:04 masak his nick is just Tene.
16:04 masak the two plusses are a way of showing appreciation around here.
16:04 masak @karma Tene
16:04 Woodi ah, k
16:04 masak ENOLAMBDABOT
16:05 masak movie &
16:07 payload joined #perl6
16:07 Woodi Curses works in p6 ?
16:08 Woodi no, p5 module
16:08 justatheory joined #perl6
16:09 justatheory joined #perl6
16:13 stephenlb joined #perl6
16:16 iblechbot joined #perl6
16:21 payload1 joined #perl6
16:22 aharoni joined #perl6
16:35 aharoni rakudo: my @ita_pronouns = <la lo>; for (@ita_pronouns) {$_.say};
16:35 p6eval rakudo 0eaf62: OUTPUT«la␤lo␤»
16:37 aharoni rakudo: my @ita_pronouns = <la lo>; if ('darlo' ~~ / @ita_pronouns /) { 'match'  } else { say 'no match' };
16:37 p6eval rakudo 0eaf62: OUTPUT«Confused at line 2, near "ita_pronou"␤in Main (src/gen_setting.pm:3469)␤»
16:37 TimToady std: my $a = 1; do { say $a; my $a = 2; say $a }
16:37 p6eval std 28337: OUTPUT«ok 00:03 38m␤»
16:38 pmurias diakopter: say 1 works in firefox
16:38 TimToady std:  my @ita_pronouns = <la lo>; if ('darlo' ~~ / @ita_pronouns /) { 'match'  } else { say 'no match' };
16:38 p6eval std 28337: OUTPUT«ok 00:03 38m␤»
16:41 diakopter pmurias: oh... say 2, say 3+1  # worked for me, but caught a JS error at the end
16:42 aharoni Hi. I'm trying to use Perl 6 feature that turns an array into an alternation in a regex, e.g.: my @ita_pronouns = <la lo>; if ('darlo' ~~ / @ita_pronouns /) { 'match' }; . Am i trying it correctly? Is it supposed to work in Rakudo?
16:42 moritz_ aharoni: it's not yet implemented in rakudo :(
16:43 pmurias diakopter: does --js work fine?
16:44 aharoni moritz: www.rakudo.org/status says that "variables in regexes" is one of the things that don't work. Is it a case of this problem?
16:45 moritz_ aharoni: yes
16:45 moritz_ aharoni: part of it, actually...
16:46 moritz_ there'a another syntax that doesn't work you
16:46 moritz_ rakudo: say 'la' ~~ / < li lo la > /
16:46 p6eval rakudo 0eaf62: OUTPUT«too many arguments passed (6) - 1 param expected␤in regex PGE::Grammar::_block51 (/tmp/bDpbJBKwnw:1)␤called from Main (/tmp/bDpbJBKwnw:2)␤»
16:47 aharoni moritz_: thanks
16:47 moritz_ aharoni: you're welcome
16:49 Student joined #perl6
16:57 Tene Woodi: Curses *does* work in P6.
16:57 Tene Woodi: if you just want raw access to the curses functions, do:
16:57 Tene use Curses:from<parrot>;
16:57 diakopter pmichaud: does --gen-parrot build parrot --optimized
16:58 Tene Woodi: If you want an OO interface to curses, I've got one I've been working on, so just ask me and I'll post it online.
16:59 pmichaud diakopter: not by default, no
16:59 pmichaud can do  --gen-parrot-config=--optimized
17:00 moritz_ pmichaud: what about making it the default?
17:01 pmichaud I'm not convinced that --optimized works on all platforms.  For a long time it caused some platforms to segfault.
17:01 moritz_ it did for amd64, but those are fixed by now
17:02 sjohnson afternoon all
17:02 pmichaud why doesn't parrot have it as the default, then?
17:03 moritz_ no idea.
17:03 pmichaud I'm inclined to do --optimized by default, but need to think about it a bit more.
17:03 pmichaud how big a difference does it make?
17:03 moritz_ I've never measured it
17:04 pmichaud I'll try it out later
17:05 PerlJam good afternoon all
17:05 pmichaud wb, PerlJam
17:06 cognominal sorry asking a perl 5 question here, I am using Regexp::Grammars that has problems with lookahead. As a workourand I want to use a zero-wdth assertion. But I don't how to access the string on which the match opers within the regexp
17:06 finanalyst left #perl6
17:07 PerlJam cognominal: email Damian :)
17:08 cognominal for the problem with lookaheads I send a bug report. For my workaround, my question is independent of R::G
17:08 cognominal *sent
17:09 Eevee joined #perl6
17:10 chturne joined #perl6
17:11 donaldh joined #perl6
17:11 donaldh left #perl6
17:11 moritz_ if you do ((?s:.*)) it's stored in $^N
17:13 moritz_ (at least the rest, which should be enough for look-aheads)
17:14 cognominal thx, I was about do something like that
17:15 pugs_svn r28338 | fglock++ | [mp6] Javascript runtime fixes, tests
17:20 rfordinal joined #perl6
17:24 mj41_ joined #perl6
17:27 ruoso joined #perl6
17:28 kidd_ joined #perl6
17:28 rfordinal3643 joined #perl6
17:28 Tene TimToady: any chance slurp() can get a list of files to read instead of just one?
17:29 Tene so I can slurp(@files) instead of [~] .slurp for @files;
17:30 ruoso so slurp would get a slurpy parameter ;)
17:30 ruoso that's indeed a very reasonable request
17:30 Tene exactly!
17:31 PerlJam Tene: you could update the spec to say so and ask forgiveness if anyone has a problem with it :)
17:32 molaf joined #perl6
17:37 mberends joined #perl6
17:38 abra joined #perl6
17:40 TimToady Tene: you should update lines at the same time, but you'll need to make $limit into :$limit
17:41 TimToady and that'll break $handle.lines(5)
17:43 TimToady probably worthwhile, it's not like $handle.lines(:limit(5)) will happen all that often
17:57 Chillance_ joined #perl6
18:01 ruoso TimToady, while you're around... have you seen my initial sketches on S08?
18:01 TimToady not yet, waiting for things to settle down :)
18:06 japhb joined #perl6
18:08 cmv joined #perl6
18:08 ruoso TimToady, I think this initial part is settled... I'd prefer to have some feedback before going further
18:09 cognominal ruoso, I did and found them very helpful. I had no idea what Parcel were
18:09 toyam_ joined #perl6
18:09 cognominal ruoso++
18:11 lmc joined #perl6
18:17 mee left #perl6
18:19 synth joined #perl6
18:52 NorwayGeek joined #perl6
18:53 snearch joined #perl6
18:57 mberends ruoso++: very readable S08. Just some small nits:  1. 36: "it" is ambiguous, say either "the runtime" or "the routine"  2. 48: "useful" spello  3. 51: s/on/of/  4. 68: s/made/done/  69: s/no matter/whether/  70: s/In/For/  80: s/in/for/  115: s/nts/nts,/  203: s/atly/ately/  These trivia aside, it's an excellent doc!
18:57 ruoso mberends, thanks
18:57 masak joined #perl6
18:59 jaldhar joined #perl6
19:01 pmichaud "@%" is a "capture sigil"?
19:01 pmichaud or am I seeing that wrong in my browser.
19:01 pmichaud ?
19:01 pugs_svn r28339 | ruoso++ | [S08] small fixes by mberends++
19:01 ruoso yes, it's the thing that replaces @@
19:01 pmichaud I thought that @% already had a meaning
19:02 pmichaud namely,   @%foo would be a hash in list context.
19:02 mberends S08:218 ?
19:02 ruoso yes, it had *that* meaning
19:02 pmichaud it did?
19:02 pmichaud ....that's.... a problem.
19:02 ruoso pmichaud, ah... I see what you mean now...
19:02 ruoso but we had discussed the capture sigil a few times already
19:03 pmichaud I don't mind if there's a specialized capture sigil, I just think that "@%" shouldn't be it.
19:03 pmichaud (or shouldn't be one)
19:03 ruoso the short form is ¢
19:03 pmichaud short form is fine
19:03 NorwayGeek joined #perl6
19:04 ruoso is %@foo a list in hash context as well?
19:04 pmichaud long form is a bit of a conflict
19:04 pmichaud I would expect so, yes.
19:04 ruoso hmmm... maybe keep @@
19:05 ruoso but it doesn't express it very well, since it implies something more positional oriented
19:06 meppl joined #perl6
19:07 pmichaud (other than that, S08 is very nicely done)
19:07 pmichaud ruoso++
19:12 PerlJam are we calling things that have an @ on front "lists" now instead of "arrays"?
19:12 pmichaud it's a contextualizer
19:12 pmichaud +%foo   # number of entries in foo
19:13 mberends ruoso: S08:69 "whether"
19:13 pmichaud ~%foo   # hash as a string
19:13 pmichaud ?%foo   # hash as a boolean
19:13 pmichaud @%foo   # hash as a list
19:13 PerlJam "As the element 1 of the list @a is not a Capture or a Parcel, it is not possible for the .[] operator to traverse it."  So, @a is a list?
19:13 pmichaud ah, in that line it should say "array @a", yes.
19:13 pmichaud @a is an array in that instance
19:14 pmichaud line above should also say "assign parcel to an array"
19:18 PerlJam When I assign a parcel to an array, the parcel is flattened.  What happens when I assign a parcel to a hash?
19:19 quietfanatic joined #perl6
19:19 pmichaud it's list context
19:20 crythias joined #perl6
19:20 pmichaud the parcel is placed into list context (flattening), and then the elements are assigned into the hash
19:21 pmichaud the part that is missing from this draft is an explanation of something like
19:21 pugs_svn r28340 | ruoso++ | [S08] another typo by mberends++, s/list/array/ as pointed by PerlJam++ and pmichaud++
19:21 pmichaud my @foo := 1, :a<b>, 2;   bar(|@foo);
19:22 ruoso pmichaud, line 100
19:22 dalek rakudo: 798ea1c | pmichaud++ | docs/spectest-progress.csv:
19:22 dalek rakudo: spectest-progress.csv update: 436 files, 15498 (71.4% of 21695) pass, 0 fail
19:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​98ea1c449ad762e08bc3f9481b1d621a8d3c0d3
19:22 PerlJam Also, a large semantic shift hinges on the presence of a colon.  my @a = 1, (2, (3, 4)); say @a[3]; my @b := 1, (2, (3, 4)); say @b[3]; # failure
19:23 pmichaud ruoso: yes, but then what about...
19:23 PerlJam (I'm not saying that's good or bad, just that it makes me uncomfortable)
19:23 ruoso pmichaud, line 158 complements it
19:23 pmichaud my @foo := 1, 'a'=>'b', 2;   bar(|@foo)
19:24 ruoso The "if you bind a parcel to a variable, it doesn't really matter which sigil it uses" part is one special thing I'd like some feedback
19:24 pmichaud well, it matters between @ and %
19:24 pmichaud I suspect that if I bind a parcel to %var, I can no longer see the positionals
19:25 pmichaud well, wait
19:25 ruoso why?
19:25 pmichaud hmmm
19:25 pmichaud I guess you're right there.
19:25 pmichaud since a parcel supports both associative and positional roles, you can bind to any variable.  but that doesn't change the underlying meaning.
19:25 ruoso that's the point
19:26 ruoso which is also what PerlJam pointed out
19:26 pmichaud I see no problem with that.
19:26 pmichaud but I still don't see how to distinguish   :a<b>  from 'a'=>'b' in a parcel
19:26 ruoso binding avoids the flattening
19:26 ruoso I guess the rule is the same as to a capture
19:26 ruoso it's syntactical
19:26 ruoso the parcel needs to keep that info
19:27 pmichaud so, if I have
19:27 pmichaud my $a := 1, :a<b>, 2;
19:27 pmichaud and
19:27 pmichaud my $b := 1, 'a'=>'b', 2;
19:27 pmichaud how can I tell the difference between  $a[1] and $b[1]  ?
19:28 pmichaud or is that something that can only be determined by asking $a and $b (the parcels) and not the elements ?
19:28 ruoso I would guess the latter
19:28 pmichaud in that case, how do I dynamically build a parcel having named elements from a hash?  Would it be...
19:28 pmichaud my $c = |%foo;   # ???
19:29 ruoso you want them as named or as positional?
19:29 pmichaud well, as positional I would probably use |@%foo
19:30 ruoso my ¢c = %foo;
19:30 ruoso I guess the above line would support both positional and named lookup
19:31 pmichaud so it's really a parcel, not a capture, hmmm?
19:31 ruoso I'm not sure, actually
19:31 pmichaud right
19:31 ruoso theoretically a capture always start as a parcel
19:31 pmichaud that's the part that isn't quite clear -- how we distinguish named arguments from positional pairs
19:31 NorwayGeek joined #perl6
19:32 ruoso parcels never do...
19:32 pmichaud we can say "it's syntactic", but there are still enough runtime instances and flattening cases that something has to keep track of it
19:32 pmichaud I think parcels *must* distinguish a named argument from a positional pair
19:32 pmichaud i.e., it has to be able to know the difference between
19:32 ruoso there's one trick, tho
19:32 pmichaud my $a := 1, :a<b>, 2;
19:33 pmichaud my $b := 1, 'a'=>'b', 2;
19:33 ruoso having a inner parcel that contains the named argument will hide it from the associative view
19:33 ruoso 1, (:a<b>), 2
19:33 ruoso or even maybe
19:33 pmichaud ...that's not an inner parcel, though :)
19:33 PerlJam parens don't make parcels :)
19:33 ruoso 1, \(:a<b>), 2
19:34 PerlJam ruoso: or just say that :a<b> begets a parcel
19:34 pmichaud perljam:  other way round
19:34 pmichaud :a<b> isn't a parcel, it's a named argument
19:34 pmichaud the question is how to protect a pair from being treated as a named argument
19:34 ruoso there are two sides in this issue
19:35 ruoso yes, what pmichaud said
19:35 pmichaud for example, if I have:     my $c = @a, 2, 3;
19:35 pmichaud wait, never mind.
19:35 pmichaud if I have:   my $c = |@a, 2, 3;
19:35 pmichaud and @a contains a Pair
19:36 pmichaud how do we prevent that Pair from becoming visible through $c's associative interface
19:36 ruoso or how do we enforce it to become visible by that
19:36 pmichaud I'm pretty sure it shouldn't be visible as written there
19:36 pmichaud at least, not according to the current S06 writings
19:37 ruoso I mean... we need to have a way to control whether individual arguments will be converted to named or positional in the resulting capture
19:37 pmichaud the only things that end up being named arguments are explicitly given as named arguments, or come from prefix:<|> on a hash.
19:38 pmichaud anyway, these are the questions that are current blockers for Rakudo being able to implement S08
19:38 pmichaud (or parcels/captures in general)
19:38 ruoso the point is: while parcel has this dual-life API
19:38 ruoso a capture contains positional and named arguments as mutually-exclusivve
19:40 ruoso pmichaud, but I guess the syntax can provide all the clues we need...
19:40 pmichaud I'm not sure it does, at least not yet
19:40 ruoso and the Parcel must store this clues
19:40 ruoso my ¢c = |@a, 2, 3;
19:40 ruoso in that case, we have a syntax clue
19:41 ruoso the elements in @a define only positional arguments
19:41 pmichaud my $b := @a;   my ¢c = |$b, 2, 3;   # ???
19:42 ruoso hmm... point taken
19:42 pmichaud my ¢c := |($x.foo), 2, 3;
19:43 ruoso I guess it's the prefix:<|> who needs to be better qualified then
19:43 pmichaud perhaps (more)
19:44 PerlJam my reading of S06 would make those always named args
19:44 pmichaud PerlJam: you mean pairs inside of @a would be named args?
19:44 PerlJam aye
19:45 pmichaud so how would I get them to be positionals?
19:45 ruoso I think we need three variants for prefix:<|>... one for "named only", other for "positionals only" and other for "pairs as named"
19:46 pmichaud PerlJam: I agree with your reading of S06
19:46 PerlJam ruoso: for option #3, would that mean that non-pairs would be positionals?
19:47 PerlJam ruoso: or, what would it mean for an array that has pairs and non-pairs mixed in |@a when we say  my ¢c := |@a, 2, 4, :a<foo>
19:48 PerlJam er, s/\|//
19:49 PerlJam (and how would that change if those non-pairs were objects that implemented the Positional or Associative (?) roles?)
19:49 pmichaud I think I'm okay with saying that |(...)  always treats pairs as named arguments
19:50 pmichaud although someone might be surprised when  $x.foo(|@a);    doesn't get all of the elements of @a into foo's  slurpy array argument
19:50 pmichaud (if @a happens to contain pairs)
19:51 pmichaud that being the case, I think it's probably okay if   infix:<,> syntactically identifies named arguments in a parcel
19:51 PerlJam Partitioning the concepts into Captures and Parcels helped my head a little, but I'm starting to get the feeling that there's a syntax density problem here.  Maybe we need some keyword help rather than a special symbol
19:52 pmichaud i.e.:
19:52 pmichaud my $a = 1, :a<b>, 2;    # parcel with one associative
19:52 ruoso pmichaud, yeah... I'm getting convinced that we need at least two variants for prefix:<|>
19:52 PerlJam anyway ... I've a meeting to attend
19:52 * PerlJam &
19:52 presh_ joined #perl6
19:52 pmichaud my $a = 1, (:a<b>), 2;    # parcel with zero associatives
19:53 pmichaud my $a = 1, 'a'=>'b', 2;   # parcel with zero associatives
19:53 pmichaud oops, modulo assignment precedence here
19:53 pmichaud (put parens around all of the above)
19:53 ruoso pmichaud, that's ok for when there are syntatical clues
19:53 leedo_ joined #perl6
19:53 ruoso but there are cases where there aren't
19:53 pmichaud I think the other cases could be helped with method support
19:54 pmichaud in particular, I'm thinking that    |¢@a   could do the right thing
19:54 pmichaud (i.e., an array in capture context)
19:55 ruoso but what about things that behave like Arrays but are not arrays
19:55 pmichaud btw, from S08:92 (and other locations)
19:55 pmichaud my $a = 0, :a<b>, 2;
19:55 pmichaud say $a[2];
19:55 pmichaud parens needed there, otherwise the assignment is an item assignment
19:57 ruoso a parcel in item context stays unchanged (unless it contains a single item)
19:57 pmichaud ruoso: it's a parsing issue
19:57 pmichaud my $a = 0, :a<b>, 2   parses as   (my $a = 0), :a<b>, 2
19:57 nuam joined #perl6
19:57 ruoso hm
19:57 pmichaud if you want the other, it'd be    my $a = (0, :a<b>, 2)
19:58 pugs_svn r28341 | ruoso++ | [S08] enforce correct precedence, as pointed out by pmichaud++
19:59 pmichaud also line 118
19:59 pmichaud and line 168
19:59 pmichaud and 175
20:02 pugs_svn r28342 | ruoso++ | [S08] enforce correct precedence, as pointed out by pmichaud++
20:03 zamolxes joined #perl6
20:05 rfordinal3643 left #perl6
20:10 ruoso anyway... I'd suggest having prefix:<|> turning every pair into named and prefix:<something_else> as positional only
20:10 pmichaud that works for me
20:10 pmichaud I wonder if prefix:<||> is a bad idea :)
20:22 * ruoso later &
20:22 japhb joined #perl6
20:24 pmichaud An interesting artifact of S08 as written:    http://gist.github.com/190523
20:24 chturne left #perl6
20:25 diakopter inline name/value pair literals, essentially
20:25 diakopter literals
20:25 diakopter what he said
20:25 nuam left #perl6
20:25 diakopter that's the spirit
20:26 pmichaud so, here's a variation that might be hard to explain...
20:27 pmichaud http://gist.github.com/190525
20:27 crythias joined #perl6
20:27 pmichaud although I guess it comes down to the same issue of "what does .kv iterate on a match object?"
20:28 pmichaud but in this case it's not terribly obvious that @a is ending up being a parcel
20:28 cmv joined #perl6
20:30 pmichaud afk for a bit
20:30 diakopter parcels lack postage
20:35 mberends diakopter: the simplest Test.pm for vijs would be approximately: sub plan($n){ say "1..$n"} my $testnumber=1; sub ok($cond){ if ! $cond {print "not "} say "ok $testnumber++"} }
20:35 diakopter mberends: thanks :)
20:35 diakopter I'm porting fglock's edition
20:35 diakopter from mp6
20:36 diakopter the trick will be to make STD and viv re-runnable in the same process
20:36 mberends hope it works soon! I got vijs working locally today. diakopter++
20:36 diakopter mberends: which architecture/platform?
20:36 mberends ubuntu
20:36 mberends 32 bit
20:37 diakopter neat
20:37 diakopter moritz_ and I got it going on linux amd64 for a possible p6eval replacement machine
20:37 diakopter 4 cores instead of 1; more RAM
20:37 mberends wahey!
20:38 diakopter perl amd64 and v8 amd64
20:38 diakopter speaking happily
20:38 mberends also cool
20:38 mberends will try Windows XP and 7 tomorrow
20:38 diakopter don't think that will be possible
20:39 diakopter the windows v8 is only just now being made to work on compilers other than msvc++
20:39 diakopter unless you have that, and have perl built in that as well..
20:40 mberends ah, worth looking into. I'm preparing a README.mswin for Rakudo anyway
20:40 diakopter though I think someone got it to work in cygwin
20:40 diakopter with lots of work
20:44 pugs_svn r28343 | diakopter++ | [vijs] laid the groundwork for subroutines/closures/blocks & control exceptions
20:45 pmichaud hmmmm
20:45 pmichaud time make spectest on standard parrot build:  user39m51.317s
20:45 pmichaud time make spectest on optimized parrot build: user24m24.600s
20:45 pmichaud I think we should default to --optimize
20:47 pmichaud (this was on 64-bit kubuntu)
20:47 * diakopter assents
20:48 diakopter same spectest outcome though?
20:48 pmichaud yes
20:48 pmichaud except for the "wallclock secs" part.  :-)
20:50 rdice joined #perl6
20:50 diakopter for make spectest, does rakudo spark a new process for each file? or "reset" some sandbox sub environment? or what
20:50 moritz_ diakopter: new process for each file
20:52 diakopter on that note, it it spec'd that the .parse routine can accept a symbol table (and 'parent'/environment stabs) as a place from which to start, for eval()
20:52 diakopter is it spec'd
20:53 diakopter that's a question
20:54 Confield_ joined #perl6
20:54 diakopter :)
20:56 meppl joined #perl6
20:57 pugs_svn r28344 | lwall++ | [S03,S09]
20:57 pugs_svn r28344 |     Range objects are now primarily intervals in C<cmp>
20:57 pugs_svn r28344 |     Extend dwimminess of series to handle steps and limits readably
20:57 pugs_svn r28344 |     :by is deemed Too Ugly and is now dead, David Green++
20:57 pugs_svn r28344 |     Use series operator to replace :by semantics more readably
20:57 pugs_svn r28344 |     Range objects used as lists now simply mutate .. to ...
20:57 pugs_svn r28344 |        (taking into account ^ though)
20:57 pugs_svn r28344 |     Alpha ranges must now match endpoint using !after semantics on non-eqv
20:57 pugs_svn r28344 |     Simplify range semantics when used as subscripts
20:57 pugs_svn r28344 |     Kill unshifty negative subscript lvalues as too error prone
20:57 pugs_svn r28344 |     Spec way to declare modular subscripts
20:58 tomaw_ joined #perl6
21:02 pugs_svn r28345 | moritz++ | [S08] use POD markup where appropriate
21:02 pugs_svn r28345 |
21:02 pugs_svn r28345 | Also use non-breaking space for "Perl 5" and "Perl 6"
21:02 * pmichaud rushes off to read the r28344 diff
21:02 * moritz_ too
21:03 SmokeMachine joined #perl6
21:06 moritz_ so any kind of iteration magic is now done with ...?
21:06 diakopter Rats >1 can represented by 2 integers (dividend/divisor) or 3 (quotient/remainder/divisor)... is a stringification of Rat specified to either one? or can there be both?
21:06 moritz_ diakopter: Rat stringifies like Num
21:06 pmichaud stringification of a Rat goes through .Num
21:07 moritz_ rakudo: say 1/2, ' ', (1/2).perl
21:07 p6eval rakudo 798ea1: OUTPUT«0.5 1/2␤»
21:07 diakopter ok; is there a "mixed fraction" string representation
21:07 pmichaud not defined by the language, no.
21:07 zamolxes joined #perl6
21:07 diakopter sorry; my question was unclear; I was asking about the 3-int one, in particular
21:07 pmichaud not defined by the language, no.
21:08 pmichaud (perhaps "not yet ...")
21:08 * moritz_ not enlightened by r28344, but is probably too tired to be so
21:08 pmichaud I'm ***so*** glad I didn't bother to try to implement lazy RangeIterators yet
21:09 pmichaud moritz_: r28344 seems to clear up a lot of range issues.  I'm looking forward to implementing it :)
21:11 pmichaud I don't understand the parsing of
21:11 pmichaud 1   ... * + 1, 9
21:11 pmichaud 10  ... * + 10, 90
21:11 pmichaud 100 ... * + 100, 1000
21:11 pmichaud that looks to me like there are "two terms in a row"
21:11 TimToady ah, missing commas
21:12 pmichaud okay, that makes it clearer to me then :)
21:12 * moritz_ confused
21:12 diakopter I thought it says ... isn't a term there; it's a comma?
21:12 pmichaud ... is an infix operator there
21:12 moritz_ ... is an infix op, no?
21:12 pmichaud but it's lower precedence than comma
21:12 pugs_svn r28346 | lwall++ | [S03] missing commas
21:12 pmichaud its arguments are lists
21:13 moritz_ ah, between the lines
21:13 moritz_ that makes sense, yes
21:13 * moritz_ parsed that as three independent examples
21:14 pmichaud right
21:14 pmichaud but it's all one multi-line example :)
21:14 nbrown joined #perl6
21:14 Confield_ left #perl6
21:14 diakopter TimToady: also the next /m example
21:15 pmichaud diakopter: which one?  the rest all look fine to me
21:16 TimToady they look good to me too
21:16 diakopter sigh
21:17 * diakopter gets it now
21:17 crythias joined #perl6
21:18 TimToady I suppose we could change the * dwimmery to only look at literal numbers, and then the 30 and 300 wouldn't be necessary
21:18 TimToady but that kinda violates the notion of * being run-time dispatched
21:24 diakopter doubling? or does the interpolation try to match the start of the next portion?
21:26 diakopter oh, I see.. assume it's arithmetic if only 2?
21:27 pugs_svn r28347 | lwall++ | typos
21:27 diakopter right, that's What It Says. :)
21:31 * diakopter needs to read top-down more often
21:31 pmichaud TimToady:  This is an amazing reconstruction of series operator, and I'm impressed.  TimToady++
21:37 TimToady well, :by was always a problem child, in more ways than one
21:38 pmichaud yes, but this seems to have also resolved some of the 'a'..'z'  issues
21:38 pmichaud although I guess some still remain
21:38 TimToady I've probably been a bit imprecise there
21:38 moritz_ is :by(-1) special cased?
21:39 moritz_ otherwise I din't see how 'reverse "a".."z"' can remain lazy
21:39 TimToady there is no :by any more
21:40 TimToady but yes, you have a point
21:40 TimToady if reverse is a listop
21:40 moritz_ in my copy of the synopsis there's still :by
21:40 TimToady might have to limit it to ('a'..'z').reverse
21:40 pmichaud even then, do ranges still have a "by" option?
21:41 TimToady or some series variant
21:41 pmichaud ah
21:41 pmichaud so 'a'..'z' could return a series
21:41 pmichaud hmmmm.
21:41 pmichaud er,
21:41 TimToady but a series isn't an object really
21:41 pmichaud ('a'..'z').reverse could return a series
21:41 moritz_ more to the point, I think you forgot to remove form instances of :by, if :by should be gone
21:41 pmichaud right, series is a generator
21:41 TimToady I'm sure I've neglected to hunt them all down
21:42 crythias just let :by gones be :by gones
21:42 TimToady however, some of generators might be intrinsically reversible
21:42 TimToady if found on the end of a list
21:42 pmichaud so,   ('a'..'z').reverse could return   ('z' ... *.pred, 'a')  or something like that
21:43 TimToady right
21:43 moritz_ pmichaud: sounds sane, but hard to instrospect
21:43 moritz_ what would ('a'..'z').reverse.reverse return?
21:43 pmichaud I'm not sure that reversing a yada can be done lazily
21:44 crythias why not? does it require surgery?
21:44 moritz_ no, effort ;-)
21:44 TimToady it would be like taking your intestines out and sticking them in backwards
21:44 crythias but they're in order...
21:45 pmichaud but I did wonder about negative increments....   how do we detect the end of the list in something like...
21:45 diakopter well, just make sure to eat in reverse, and chew slowly.
21:45 pmichaud 10 ... *-0.3, 0
21:45 crythias forget that, how do you determine the next entry?
21:45 TimToady yeah, the sense of the cmp has to change somehow
21:46 pmichaud perhaps we check to see if the cmp changes?
21:46 pmichaud i.e., we continue the series as long as   *-2 cmp *-1  === *-1 cmp *-0  ?
21:46 moritz_ pmichaud: that doesn't look too bright for 1 ... *+5 3
21:46 moritz_ that would produce an infinite list, because cmp never changes
21:47 moritz_ unless you compare the starting point too
21:47 moritz_ which might be the solution :)
21:47 pmichaud yeah, that gets kinda odd then
21:47 pmichaud I guess it would be the element before the generating closure
21:47 TimToady like the limit wants to be checked outside the closure
21:48 TimToady call the closure, compare prev with next, maybe force to Nil
21:48 diakopter sure 'nuff it gets `odd`
21:49 TimToady the closure plus limit form would certainly have to assume monotonicity
21:49 pmichaud I think that's probably okay, though
21:49 TimToady unless we require an exact match in those case
21:49 TimToady *cases
21:50 TimToady but then how would it know?
21:50 pmichaud I'd say that we want the direction of   start versus end to match the direction of generated element versus end
21:50 pmichaud i.e.,
21:50 TimToady you just wouldn't write those in the closure/limit form
21:51 pmichaud $start ... $code, $end      we continue as long as   $start cmp $end === $code(...) cmp $end
21:51 TimToady so I think we can just assume monotonic and leave the rest to the general form
21:51 pmichaud correct.
21:51 moritz_ +1
21:51 zpmorgan joined #perl6
21:52 TimToady well, $start cmp 2nd can be cached as a sign
21:52 pmichaud correct.
21:52 TimToady state var in the closure
21:52 pmichaud versus 2nd or versus $end ?
21:53 TimToady the point is to reduce it to $statevar == $code(...) cmp $end, but I guess state would be outside the user's closure :/
21:53 pmichaud right
21:53 pmichaud I just think $statevar should be produced from $start and $end :-)
21:54 pmichaud I could come up with a $code that starts moving away from $end but eventually comes around to it
21:54 pmichaud (like a sine wave, for example :-)
21:55 TimToady I guess, and we do have $end already; I was confusing it with $prev
21:55 pmichaud right
21:55 pmichaud perhaps I should say    $start ... $code, $limit
21:55 moritz_ is $start the first element in the list on the left of ...? or the last?
21:56 pmichaud last
21:56 moritz_ good
21:56 pmichaud $a, $b, $c, $d ... $code, $limit
21:56 TimToady at most, last 3 items for * dwimmery
21:56 pmichaud we compare $d with the $limit, even if $code is n-ary
21:56 TimToady hence the example with 10,20,30...*
21:57 pmichaud right
22:01 TimToady and I guess I'm not too worried about losing laziness on reverse; p5 gets along just fine without it :)
22:04 spinclad rakudo: .say for ^1
22:04 p6eval rakudo 798ea1: OUTPUT«0␤»
22:04 spinclad rakudo: .say for ^0
22:04 p6eval rakudo 798ea1:  ( no output )
22:04 spinclad good
22:05 spinclad rakudo: .say for 0 ..^ 0
22:05 p6eval rakudo 798ea1:  ( no output )
22:05 spinclad rakudo: .say for 0 ... *+1, 0
22:05 TimToady rakudo: .say for Nil
22:05 p6eval rakudo 798ea1: OUTPUT«No applicable candidates found to dispatch to for 'infix:...'␤in Main (/tmp/EyHiZDCmn0:2)␤»
22:05 p6eval rakudo 798ea1: OUTPUT«Nil()␤»
22:05 pmichaud heh
22:05 TimToady hmm, bug
22:05 pmichaud is "Nil" still the same as () or is it a type?
22:06 TimToady Nil is just () and is, I think, defined
22:06 pmichaud okay
22:06 spinclad TimToady: spec now says in 1, 2, 3 ... the 3 is needed, but earlier say two terms assume arithmetic.  -><- ?
22:07 pmichaud the 3 is needed for that example
22:07 TimToady it's a valid value, that you can't a valid value from :)
22:07 TimToady that 3 isn't really need, correct
22:07 pmichaud oh, yes, that one 3 isn't needed
22:08 spinclad (speaking of 3, 30, 300 being needed)
22:08 spinclad kthxbye & # gotta run, wife waiting
22:09 pugs_svn r28348 | lwall++ | [S03] revise thinko spotted by spinclad++
22:10 pmichaud <a c e> ... *    # what does this produce ?
22:10 TimToady acefghijk...
22:10 pmichaud and we detect that because... ?
22:10 TimToady no arithmetic ops to work with
22:10 pmichaud well, clearly I can write   'a' + 'c'
22:11 pmichaud so we have arithmetic ops
22:11 pmichaud i.e., my next example would be
22:11 pmichaud <2 4 8> ... *   # what does this produce ?   ;-)
22:13 Chillance joined #perl6
22:14 pmichaud I'm guessing the latter would need to be   2 4 8 9 10 11 12 13 14 ...
22:14 TimToady how 'bout, subtraction returns 0 when the entities aren't eqv
22:14 Confield joined #perl6
22:14 pmichaud how bout we use .succ when the entities aren't ~~ Num
22:14 TimToady that kills <2 4 8>
22:15 TimToady unless we special case <> to numify
22:15 pmichaud depending on what we expect 2 4 8 to be
22:15 pmichaud for example
22:15 pmichaud what about:      my $a = '3/4';   $a++
22:15 pmichaud I'm guessing that ends up being 3/5  :)
22:16 pmichaud rakudo:  my $a = '3/4';  say $a+1;   $a++;  say $a;
22:16 p6eval rakudo 798ea1: OUTPUT«4␤3/5␤»
22:16 TimToady rakudo: my $a = 3/4; say $a+1; $a++; say $a;
22:17 p6eval rakudo 798ea1: OUTPUT«1.75␤Method 'succ' not found for invocant of class 'Rat'␤»
22:17 pmichaud bug on that .succ
22:17 jauaor joined #perl6
22:18 pmichaud and in the previous example, rakudo doesn't know how to numify strings with fractions yet
22:18 pmichaud (it will do so)
22:19 pmichaud anyway, I suspect the "correct as spec" answer would've been  1.75\n3/5\n  for the first, and  1.75\n2.75\n for the second
22:21 TimToady you know, there's something to be said for forcing ++ to be numeric, and leaving .succ to increment strings...
22:21 pmichaud yes
22:22 pmichaud so, magical autoincrement for strings is always .=succ
22:22 TimToady right
22:22 TimToady I'm trying to think of any downside
22:22 pmichaud it feels very correct
22:22 pmichaud + is numeric anyway
22:22 pmichaud ++ should be numeric
22:22 TimToady well, there's the question of which type to coerce to
22:23 pmichaud ++  should be essentially the same as += 1
22:23 TimToady well, prefix anyway
22:24 pmichaud I don't understand "which type to coerce to", though
22:24 TimToady well, is Num(1) going to turn our fast int into a floater?
22:24 TimToady most ++ will be on ints
22:24 TimToady or Ints
22:24 pmichaud I would treat the '1' as an int
22:25 TimToady so coerce if not ~~ Numeric or some such
22:25 pmichaud well, ++ is already optimized for Int
22:25 pmichaud (it's already allowed to be optimized for Int)
22:25 TimToady not if Num() gets to it first :/
22:26 pmichaud I don't see the Num you're talking about
22:26 pmichaud my $a = '3';   $a++;   # I expect this to become an Int
22:26 TimToady okay, I guess it's not a problem
22:26 pmichaud just as I expect that
22:26 TimToady not if postfix:<++>(Any) coerces to Num
22:26 pmichaud my $a = '3/4';  say ($a+1).WHAT  gives me a Rat
22:27 TimToady we need something that says "coerce to best numeric type"
22:27 pmichaud i.e., string numification is smart enough to parse its contents to determine the return type
22:27 TimToady well, if Num does that already, that's okay
22:28 TimToady I suppose they can always say num() to coerce to a floater
22:28 pmichaud it doesn't do it that way in Rakudo yet, but that's what I think we had discussed previously
22:28 pmichaud i.e.,  numification of  '3+4i'  gives me a Complex
22:28 moxilo joined #perl6
22:29 TimToady we can at least make prefix:<+> do that, even if Num is more specific
22:29 moxilo left #perl6
22:29 pmichaud ah, good point
22:29 mspauldi1g joined #perl6
22:29 pmichaud so perhaps  ++ is really   +self + 1
22:29 pmichaud instead of  self.Num + 1
22:29 TimToady I'm slightly more comfy with that
22:30 TimToady otherwise you violate the invariant that Type($x) ~~ Type
22:30 pmichaud correct.
22:30 TimToady on the other hand, it doesn't work out so well for our proposed Num(Any) coercion type notation
22:31 pmichaud correct.
22:31 TimToady unless that's Nummy(Any) or some such
22:31 pmichaud I've often felt that "numification" is different from ".Num"
22:31 TimToady or coercion to Numeric role
22:31 TimToady now thinking about how that could set up a bunch of handlers
22:32 TimToady coercion to a role in general, that is
22:32 pmichaud in particular, putting something in list context isn't identical to .List
22:32 pmichaud and putting something in a hash context isn't identical to .Hash
22:32 pmichaud so putting something in a numeric context isn't the same as .Num
22:32 TimToady so, what does Associative($x) do?
22:33 TimToady presumably coerce to the first candidate that says "I can do that" in some list of candidates
22:34 TimToady where that list is some subset of the classes that compose Associtive
22:34 TimToady *ia
22:37 pmichaud anyway, I get a little lost on understanding the intended structure behind the coercions, contexts, and methods, so I'll hope it clears up soon.  (see also .true, .Bool, boolean context, etc.  :-)
22:41 TimToady bbl &
22:45 payload joined #perl6
22:55 Student joined #perl6
23:12 pugs_svn r28349 | diakopter++ | [vijs] make Int use arbitrary precision (BigInteger); there are *tons* of methods to expose/wireup for Int (someone please feel free)
23:14 ruoso joined #perl6
23:16 diakopter moritz_: you around
23:18 * ruoso starting the night shift
23:22 diakopter vijs: say 102987609812347098760129837021987103475138750 - 1230487130694871034374821979182735987249​183791837461982374981732549876660918203
23:22 p6eval vijs 28349: OUTPUT«-1230487130694871034374821979182735884​261573979490363222245144710562773185779453␤␤     time in interpreter: 0.011593 s␤»
23:26 mikehh joined #perl6
23:28 pugs_svn r28350 | diakopter++ | [vijs] implement Multiplicative for Int
23:38 rfordinal joined #perl6
23:45 Tene rakudo: my @list = <a b c d>; say (@list, 5).perl;
23:45 p6eval rakudo 798ea1: OUTPUT«["a", "b", "c", "d", 5]␤»
23:45 Tene rakudo: my %a = <a b c d>; say (%a, 5).perl;
23:45 p6eval rakudo 798ea1: OUTPUT«["a" => "b", "c" => "d", 5]␤»
23:53 rfordinal joined #perl6
23:59 sm^^^ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs