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