The topic for #perl6 is: pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by TimToady on 25 November 2008.
azawawi @tell masak i finally got it working using your script as indexer... Padre::Plugin::Perl6 now shows you the S29 function documentation when you hit F2 over a function (or a word) 00:44
lambdabot Consider it noted.
azawawi @tell masak Padre::Plugin::Perl6 + S29-Functions.pod integration, padre.perlide.org/wiki/Screenshots 01:39
lambdabot Consider it noted.
pugs_svn r24759 | pmichaud++ | typo fix. 07:03
Matt-W Am I right in thinking that ultimately, things like @list>>.dosomething() could potentially autothread, and thus the various .dosomething() calls could happen (a) simultaneously and (b) in undefined order? 09:50
Tene Matt-W: yes, that's right. 10:04
Matt-W: if you want to guarantee order, you need to use a different construct. 10:05
Matt-W Tene: so .dosomething() for @list; would be order-preserving? 10:30
pugs_svn r24760 | ruoso++ | [smop] default block signature defines $¿self. 12:00
r24760 | ruoso++ | [mildew] knowhow attributes work!
ruoso just realized we need "bvalue"s for a lot of things... 12:16
moritz_ s1n: I don't have many tickets open, but I usually look through open tickets by others and see if their problem is being tested somewhere in the test suite. If not, I add it somewhere, and reply to the ticket. You could certainly help with that task. 13:13
Matt-W: aye, that would preseve order 13:14
Matt-W moritz_: cheers, thanks 13:17
Perl 6 is more interesting than work
moritz_ I can very much confirm that ;-) 13:24
ruoso and that actually can harm you ;)
Matt-W Well I was just talking to a colleague about our in-house test-running language 13:25
And how I'd like to rip apart the interpreter and do it properly
Matt-W Maybe on Parrot... 13:25
Although that would depend, what's the native library call interface like
mberends if you could adapt it to TAP, I have a small rakudo based Test::Harness and prove util that you could try 13:27
Matt-W TAP? 13:28
moritz_ "Test Anything Protocoll" 13:29
mberends exactly, what Perl 5 and 6 use for testing
ruoso I've been using TAP+Test::Harness to test things in the most diverse languages 13:29
even C
Matt-W Oh 13:30
mberends yes it's that good. See Perl 5's Test::Tutorial
Matt-W I may be after something different
moritz_ TAP is just the output format of the tests 13:32
Matt-W Yes, I'm looking for something different 13:41
This is a tool we use for testing, for scripting one of our libraries
But it uses an in-house, horrible scripting language 13:42
would be nice to do it in Perl or something
preferably Perl
ah well, they'll never let me, the management have their eye on some horrible Java thing
pugs_svn r24761 | ruoso++ | [mildew] implements "has $.a"! 14:02
ruoso for now mildew routines are always "is rw" due to the way capture works... 14:03
Matt-W What's mildew? 14:04
ruoso mildew: $OUT.print("Hello from mildew")
p6eval mildew: OUTPUT«Use of uninitialized value in string eq at src/VAST/variable.pm line 9.␤Hello from mildew»
Matt-W It's a Perl 6 implementation then
ruoso Matt-W, mildew is a STD compiler backend targetting SMOP
Matt-W hmm 14:05
ruoso it uses STD as the parser, and SMOP as the runtime
Matt-W I hate to say it
but what's SMOP
ruoso www.perlfoundation.org/perl6/index.cgi?smop
Matt-W reads
Oh my 14:06
ruoso Matt-W, to make it easier to understand, take a look at v6/mildew/t in the pugs repo 14:07
Matt-W As if Parrot didn't make my head spin enough
It is good to see multiple apparently-healthy implementations of Perl 6 appearing though
ruoso std: unless 1 { } elsif 2 { } else { } 14:10
p6eval std 24761: OUTPUT«############# PARSE FAILED #############␤Syntax error at /tmp/86sxV3H2ie line 1:␤------> unless 1 { } elsif 2 { } else { }␤ expecting terminator␤00:05 82m␤»
ruoso std: unless 1 { } elsif 2 { } else {...} 14:11
p6eval std 24761: OUTPUT«############# PARSE FAILED #############␤Syntax error at /tmp/YfmchRDIXZ line 1:␤------> unless 1 { } elsif 2 { } else {...}␤ expecting terminator␤00:05 82m␤»
ruoso std: if 1 { } elsif 2 { } else {...}
p6eval std 24761: OUTPUT«00:05 82m␤»
ruoso cool... unless can't have "elsif"
std: unless 1 { } else {...}
p6eval std 24761: OUTPUT«############# PARSE FAILED #############␤unless does not take "else" in Perl 6; please rewrite using "if" at /tmp/FozsmnYM9l line 1:␤------> unless 1 { } else {...}␤00:05 82m␤»
ruoso coo
l
Matt-W good 14:12
it shouldn't
unless...else always made me a bit uncomfortable too
pugs_svn r24762 | ruoso++ | [mildew] implements unless 14:21
ruoso mildew turns "unless 1 {...}" into "if 1 {} else {...}"
Matt-W well if you can't have else clauses, that seems a nice sensible way to do it 14:22
I remember being kind of surprised to see that Rakudo does it by making a PAST 'unless' node
since that pushes awareness of unless down into Parrot... it's all more closely bound together than I expected 14:23
ruoso close to compile v6/smop/src-s1p/Multi.pm 14:24
jnthn Matt-W: unless PAST nodes are actually a couple of line wrapper around PAST if nodes, IIRC. :-) 14:44
Matt-W jnthn: I'm sure they are, I was just surprised the transform wasn't done in Rakudo's action method
jnthn Stuff tends to go into PCT if it's felt that more than one language will make use of it.
But yes, it woulda been trivial to do it at a higher level too. 14:45
ruoso std: my @foo = loop { 1 };
p6eval std 24762: OUTPUT«Unknown routines:␤ loop called at 1 ␤00:05 86m␤»
ruoso cool... loop can't be rvalue... that makes things eaiser 14:46
Matt-W jnthn: and there are other languages with unless statements, so its inclusion there does make sense
jnthn Aye, I think so.
Note that it's not strictly Parrot that actually knows about unless here, just the Parrot Compiler Toolkit. 14:47
jnthn Which is built on top of Parrot. 14:47
Matt-W Good point
I'm still a little hazy on some of the details of this
Which is why half the time I can never find the code that does what I want to find
jnthn There's quite a lot to get into your head, yes.
I've been through that process. :-) 14:48
Matt-W I used to follow the design process really closely
but then I sort of drifted away again
And now things are getting really interesting with implementation stuff, but there's an awful lot to catch up on
jnthn *nod*
Matt-W Although it's quite wonderful sometimes to try something and have it actually work
You've all done a cracking job :) 14:49
I'm going to keep asking questions though 14:50
Matt-W Although not right now, I'm at work and they're not interested in Perl 6 :( 14:51
pugs_svn r24763 | ruoso++ | [mildew] supports accessing $.foo inside a method. 14:52
r24763 | ruoso++ | [mildew] supports loop statement_control
eric256 finds that work is only ever interested in results though they pretend to care about process ;) 14:52
mberends process gives best long term results, but business is often short term 14:54
Matt-W Too true
We try to point out that it's short-term thinking that got us in this mess to start with, but... 14:55
eric256 mberends: true..unless your boss thinks "open source" is a bad word ;) i've finaly convinced them that they don't care what i use as long as it works
Matt-W eric256: we got approval to use Python a few months ago... for running one script only. We're not allowed to write anything else in Python at all, or run anything else we might happen to have. 14:55
fun, eh? 14:56
eric256 Matt-W: thats a pain in the arse
eric256 i'm surprised they let you on IRC 14:56
Matt-W I didn't ask
Matt-W whistles
eric256 my boss taught me to as for forgivness rather than permission, who am i to argue?
Matt-W the server I run my irc client on happens to listen for SSH on port 443 on a secondary IP
and what do you know, putty can connect to that via the web proxy, which thinks I'm doing an https session 14:57
eric256 lmao 14:59
mberends similar to some of www.tldp.org/HOWTO/text/Firewall-Piercing 15:00
Matt-W basically yes
it's really quite simple to do things like that when you have sudo on the remote server 15:01
mberends give Matt-W an inch, and he takes a yard ;) 15:02
Matt-W kind of hoping none of you end up being a future employer now
eric256 pmichaud: your website www.pmichaud.com seems a little dated ;) lol last entry is in 2006 15:04
pmichaud yes, I know. I've been too busy writing Perl 6 to update my site.
eric256 not that i don't have plenty of similar cases ;) just followed the link off of rakudo.org
pmichaud (unless nodes) -- yes, I know that HLLs could do the if/unless transform easily enough, but there are two reasons for having it in PCT 15:05
(1) the code to handle it is fairly simple
(2) unless is also used to handle infix:<!!>
er, infix:<||>
Matt-W pmichaud: don't let him distract you! Write more Rakudo!
eric256 i posted a link to github on your WSG post BTW...but i think i misunderstood the URL option and should have put the link in my actual comment
pmichaud by having the 'unless' type, infix:<||> becomes easily implementable as 15:06
proto infix:<||> is pasttype('unless') { ... }
otherwise it's a _real_ pain to handle that one.
Matt-W infix:<||> is still short-circuiting logical or? 15:07
pmichaud yes
Matt-W yes that does make sense
very cunning
pmichaud and _lots_ of languages have short-circuit or
in fact, it was the short-circuit operators that drove 'unless' more than Perl.
afk for a bit. 15:08
Matt-W short-circuit operators are wonderful things to have
ruoso just realized mildew still doesn't support named parameters... *sigh* 15:10
Matt-W the mixture of positional, optional and named is a bit tricky, I gather 15:11
pugs_svn r24764 | ruoso++ | [mildew] put signature-named.t in ROADMAP
ruoso Matt-W, not really, considering STD already parses it
;)
and SMOP already supports it as well
it's just a matter of turning STD VAST into mildew AST
which is just boring work 15:12
Matt-W well wehn you put it like that it doesn't sound like anywhere near as hard a problem
ruoso Matt-W, if you take a look at v6/mildew/src/VAST/*.pm
you'll see how easy it actually is 15:13
eric256 can we start a glossary somewhere? STD, SMOP, VAST, mildew, AST...lol
ruoso eric256, I think irc.pugscode.org already takes care of that ;0
;) 15:14
alright.. not of all of them
maybe moritz_ could add some more acronyms to the irc log dictionary
Matt-W ruoso: wow it's all in Perl 5! 15:21
ruoso Matt-W, except for STD 15:22
Matt-W well yes
ruoso which is all in Perl 6
Matt-W that must be confusing
ruoso not really... mildew really receives a blessed tree-like structure
and generate a new blessed tree-like structure
Matt-W mmm tree transforms 15:23
sounds like a job for Haskell :P
vixey why settle with lousy haskell when you can have XSLT! 15:24
Matt-W That's what I really should've done a few years back
I knew Haskell, I should've got involved with pugs
ruoso we even use haskell
m0ld compiler is written in haskell 15:25
Matt-W I'm a little rusty, but I still like it
they don't let me use that at work either
ruoso Matt-W, anyway... p5 is actually quite straight forward to do tree transforms 15:26
eric256 m0ld!!! another word ;)
ruoso as long as the incoming tree is a set of blessed items
eric256, m0ld is the smop lowlevel language (like PIR)
except that m0ld only refers to a single frame 15:27
Matt-W ruoso: yeah it is pretty good at it
eric256 you ciould have said that in latin and i'd have gotten the same out of it ;)
Matt-W I was asking all this earlier
what's mildew... what's SMOP... what's that bright thing in the big blue room... 15:28
ruoso eric256, heh... basically, m0ld is a bootstrapping language, that has a very limited syntax and no context at all
it has only 4 different constructs
eric256 where do i read about it? or find it? is it in the parrot repo too?
ruoso eric256, no, in the pugs repo
ruoso eric256, besides the smop wiki page in perlfoundation.org 15:29
ruoso you can check out the pugs repo and take a look at v6/smop and v6/mildew 15:30
pugs_svn r24765 | ruoso++ | [smop/src-s1p] Multi.pm uses the capture with the appropriate | operator 15:31
r24766 | pmichaud++ | [t/spec]: Fix erroneous test in S12-class/parent_attributes.t . 15:32
ruoso lunch & 15:42
eric256 man i read smop and mold and i'm not surei know any more than 20 minutes ago
Matt-W Well it must be more pleasant than what I've been doing for the last 20 minutes 15:45
eric256 hehe yea.. i need a picture ;) with perl6 and rakudo and smop and mold and s1p and PGE and parrot and STD and how this all relates 15:46
Matt-W well as I understand it, rakudo and PGE and parrot make one implementation of perl 6, and smop, m0ld, s1p and STD make another... 15:47
eric256 actualy if there is an opensource flowchart program and someone could tutor me i'd be happy to work on some sort of flowchart + wiki page 15:50
might help me and others figure this thing out ;)
Matt-W you can draw flowcharts using Dia, although it's not quite as easy as a dedicated flowchart program might be 15:51
Matt-W hurrah! nearly home time! 15:55
&
eric256 rakudo: my $test = "hell0"; say $test.replace("0","o").WHAT; 16:15
rakudo: my $test = "hell0"; say $test.replace("0","o").WHAT;
p6eval rakudo 34991: OUTPUT«Null PMC access in find_method()␤current instr.: '_block14' pc 104 (EVAL_12:50)␤»
masak something. 16:25
@tell azawawi re screenshots: wow! now I _really_ need to get my act together about S29. if someone asks, tell them that S29 needs a lot of love, and that people are welcome to help. 16:28
lambdabot Consider it noted.
masak std: my @foo = do loop { 1 }; 16:31
p6eval std 24766: OUTPUT«00:05 86m␤»
masak pmichaud: please explain why infix:<xor> isn't a relational op. 16:35
pugs_svn r24767 | moritz++ | [t] and [t/spec] 16:39
r24767 | moritz++ | * more tests for slurpy args + is copy/is rw
r24767 | moritz++ | * moved macro test to spec/
r24767 | moritz++ | * moved closure trait tests to spec/
r24767 | moritz++ | * add tests for hygienic macros
r24767 | moritz++ | * remove some is($something, undef) instances, ack++
r24767 | moritz++ | * moved most tests from examples/99problems to spec/integration/99problems*
r24767 | moritz++ | and merged ten each into one file; solved problems 55, 57, 59.
r24767 | moritz++ | * moved lexical_subs.t to spec/
r24767 | moritz++ | * more tests for Unicode string lengths
r24767 | moritz++ | * merge most of map_*.t into map.t
r24767 | moritz++ | * moved a regex test to spec/, deleted a mostly wrong/pointless regex test
r24767 | moritz++ | * moved oo construction and destruction tests to spec/
r24767 | moritz++ | * moved all tests in oo/roles/ and oo/traits/ to spec/
r24767 | moritz++ | * fudged pointy.t for rakudo
masak we need an expression for this kind of occurrence... 'moritzbomb'? 'moritz attack'? 'massive moritz happening'? 16:40
moritz_++
moritz++
pmichaud masak: it's not testing a relation. It's a logical op. 16:41
relational ops compare relationships between two values.
masak pmichaud: doesn't that depend on the use and nothing else? xor returns a Bool.
pmichaud actually, xor does not return a bool.
masak oh?
pmichaud 'xyz' xor False returns a Str
masak ah, right. 16:42
pmichaud similar to how 'and' and 'or' don't return Bool.
masak aye.
ok, I see.
then it doesn't count, no.
pmichaud it's really easy to confuse "binary op", "relational op", "logical op", and "boolean op" :-)
masak and there are no definitions in the synopses, as far as I can see. 16:43
just usages :)
moritz_ masak: add that to your laundry list ;-)
masak moritz_: it falls somewhat outside S29, my adopted child. 16:44
I wouldn't know where to add it, honestly. 16:45
s/honestly/to be honest/
moritz_: I thought you wouldn't be back until Thursday.
moritz_: also, where are the S29 commits you promised? :)
moritz_ masak: found a WLAN 16:47
masak \o/ 16:48
rakudo_svn r34997 | moritz++ | [rakudo] track file merges/moves in t/spectest.data. Also add a few more test 16:50
r34997 | moritz++ | files.
moritz_ masak: or to be more specific, I helped somebody to set up a wlan + router, and now I may use it 16:51
masak :)
pugs_svn r24768 | particle++ | [S19] provide rules for negated single-character options; rearrange list items for clarity 16:53
azawawi hi
lambdabot azawawi: You have 1 new message. '/msg lambdabot @messages' to read it.
azawawi @messsages
lambdabot masak said 25m 29s ago: re screenshots: wow! now I _really_ need to get my act together about S29. if someone asks, tell them that S29 needs a lot of love, and that people are welcome to help.
masak I'm still here, but I'm about to leave. 16:54
azawawi hi masak
hi moritz_
masak azawawi: y0
pugs_svn r24769 | moritz++ | [S29] document isa, can, does, perl and clone 16:55
masak ...and there it is!
moritz_++
moritz_: I will now claim S29 for a couple of days, if that's ok.
by which I mean 'feel free to make changes, but there might be conflicts ahead in case you do' 16:56
the additions look great, by the way. 16:57
I hope to be able to keep up that standard.
azawawi masak: cool, meanwhile i can make the Perl6 Padre plugin fetch it and store a local S29 copy
masak azawawi: sounds like a plan.
azawawi: make sure you take note of all the things you find wanting in S29. 16:58
azawawi i think it is best to open the browser instead of the message box...
masak azawawi: I thought so as well.
azawawi: message boxes are so 1995.
anyway, gotta go. 16:59
azawawi masak: but they are the easiest lol
masak: cya
masak azawawi: :)
azawawi moritz_: can we upgrade Moose and Class::MOP to latest? 16:59
moritz_: through aptitude ofcourse
eric256 arg blue sscreen of death in my windows vm machine 17:04
GitHub109 perl6-examples: 3Eric Hodges 07master0 SHA1-5af9dab 17:08
[WSG] Adding answer to Adv. #5 2008
eric256 can any one run wsg/advanced-2008/event005-eric256.pl from the perl6-examples repo for me? i started getting a seg fault on it for no apparent reason
GitHub109 github.com/eric256/perl6-examples/c...9cb822d7d0
azawawi eric256: using latest rakudo? 17:09
eric256 i'm rebasing now, but i rebased about 10 hours ago...i'll know in a few minutes
azawawi eric256: gonna try it now... same here... 17:10
azawawi eric256: where can i find perl6-examples? 17:15
eric256 github.com/eric256/perl6-examples/ 17:16
pasteling "azawawi" at 212.38.139.31 pasted "$ ./perl6 event005-eric256.pl" (14 lines, 1K) at sial.org/pbot/34227 17:18
azawawi oops 17:19
yup segmentation fault 17:21
with the latest parrot & perl6
eric256 same here... i don't get it 17:25
size of the dictionary maybe? 17:26
azawawi dont know...
eric256 oddly i have a different script that uses the same line to load that dictionary...so maybe thats not it
yep...changing the length to 6 instead of 5 gets ride of the segfault 17:27
dwhipp pugs: my @a = 1..9; for @a -> @b[3] { say @b } 17:31
p6eval pugs: OUTPUT«*** ␤ Unexpected "["␤ expecting word character, "?", "!", trait, "=", default value, "-->" or block␤ at /tmp/A9vv5p9vdU line 1, column 27␤»
dwhipp std: my @a = 1..9; for @a -> @b[3] { say @b }
p6eval std 24769: OUTPUT«00:05 87m␤»
dwhipp rakudo: my @a = 1..9; for @a -> @b[3] { say @b }
p6eval rakudo 34997: OUTPUT«Statement not terminated properly at line 1, near "-> @b[3] {"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
pugs_svn r24770 | azawawi++ | [S:H:P6] updated to version 0.0297. Gonna release it now to CPAN.
r24770 | azawawi++ | [S:H:P6] updated to latest STD.pm and perl6.vim
ruoso Hello! 17:34
Matt-W, eric256, STD is not SMOP-specific... STD is *the* standard Perl 6 grammar, larry implemented a grammar->p5 compiler, and the result is STD.pmc 17:35
s1p was supposed to be the "first stage" language, which would be a subset of Perl 6, 17:36
but s1p in the end was not needed... we're already working for full Perl 6 17:37
but the concept of "s1p" as being the bootstrapping process
remaisn
SMOP supports the concept of "Polymorphic Eval", which means that it can support several interpreters co-running 17:38
the first interpreter was SLIME
then pmurias implemented Mold 17:39
SLIME used the sm0p mini-language
ruoso Mold uses the m0ld mini-language 17:39
ruoso mildew is the STD->m0ld compiler 17:40
eric256 so...STD actual takes perl6 code and make it into perl5 code? 17:52
could it then eventualy target parrot? or something else?
ruoso eric256, STD takes Perl 6 code and turns it into a parse tree 17:53
eric256, yes, it could target parrot, for sure
eric256, there's gimme5 which converts STD.pm to STD.pmc 17:59
eric256 ruoso: thanks. sorry reading about the Church of All worlds.. not realy sure how anyone got from Heinlein to this crap 18:07
lol
pugs_svn r24771 | moritz++ | [t/spec] test for RT #61868 (slicing with empty range) 18:27
moritz_ uhm, wrong ticket number in commit msg 18:28
should have been 61842
pugs_svn r24772 | moritz++ | [t/spec] really test for #61868 this time 18:36
dwhipp eric256: Q re github (I've not used git before) 19:01
I cloned the perl6-examples and added a few files 19:02
how do I push them back?
(they're committed to dwhipp/perl6-examples) 19:03
eric256 then you send me a pull request
or just let me know and i'll pull them
otherwise you have to pull down "git clone [email@hidden.address] " instead of yours 19:04
and push changes directly to that, i think i made you a collaborator already
dwhipp how do I send you a pull request? (or have I already done so by gives you my github path?) 19:05
eric256 i already pulled it for you, i have a mangment space that shows all forks and their commits, so i pulled in all pending fork changes
dwhipp thx 19:06
eric256 np. you probably want to use the command above and then you can push directly into my branch without waiting for me to pull it. i don't mind either way though
dwhipp I keep making the same typo :-( : "$txt =$*IN" -- which isn't a syntax error 19:20
perhaps we should parse assignment only with consistent whitespace surrounding it? 19:21
ruoso rakudo: my $ace = 1 | 11; my $seven = 7; my @hand = $ace xx 3, $seven; my $j = [+] @hand; say $j.perl;
p6eval rakudo 35002: OUTPUT«any(any(any(10, 20), any(20, 30)), any(any(20, 30), any(30, 40)))␤»
ruoso rakudo: my $ace = 1 | 11; my $seven = 7; my @hand = $ace xx 3, $seven; my $j = [+] @hand; say $j[0] 19:21
p6eval rakudo 35002: OUTPUT«elements() not implemented in class 'Junction'␤current instr.: 'postcircumfix:[ ]' pc 1683 (src/classes/Positional.pir:108)␤»
pugs_svn r24773 | moritz++ | [t/spec] unfudge a few tests, found by autounfudge
ruoso so it does parse as expected ;)
dwhipp, I've just replied to your mail... 19:22
in summary, Junctions could provide a list API for its members
rakudo: my $a = 1|11; say $a.^methods 19:25
p6eval rakudo 35002: OUTPUT«Method 'methods' not found for invocant of class 'P6metaclass'␤current instr.: 'parrot;Perl6Object;!.^' pc 1181 (src/classes/Object.pir:725)␤»
ruoso pugs: my $a = 1|11; say $a.^methods
p6eval pugs: OUTPUT«*** No such method in class Class: "&methods"␤ at /tmp/K0OnzXJ87z line 1, column 19 - line 2, column 1␤»
ruoso hm
dwhipp I don't think that "$junction.elements" (or the implicit variation of that that you propose) is correct 19:26
what if it's a "none" junction?
moritz_ .elems is reserved for the number of elements 19:27
maybe .values, or I heard that .eigenstates was in the discussion
dwhipp I suggest using an operator because then you get to say how you're observing it
"eigenvalues" is an private method in the Rakudo implementation
I think it's good to keep it private 19:28
ruoso why?
(besides using a exotic name)
dwhipp because it's semantics aren't correct 19:28
A junction can be compound
pugs_svn r24774 | particle++ | [S19] note behavior of clustered options with required values 19:29
ruoso dwhipp, but if you're introspecting a junction, you are supposed to know what you're doing
dwhipp but I don't want to introspect
ruoso you do... 19:30
dwhipp I just want to know what the "value" is
ruoso hm?
dwhipp Like when in quantum mechanics a hermitian operator defines how you want to "observe" the wave function
Actually, "the value" is not a well defined concept 19:32
so you need to supply the context of "the value"
moritz_ quantum mechanics is greatly overrated ;-)
dwhipp as a programming language feature, perhaps 19:33
but p6 does have junctions -- albeit not Quantum::Superpositions
no implicit collapse is fine
but explicit feels necessary (to me) 19:34
TimToady we can build any operations into Junctions that we like over time; we just arrive at Junction operations by ordinary dispatch rules
but for now, nearly all operators should autothread junctions
dwhipp We would still need methods to introspect the junction in that case
that would essential expose a (virtual) AST
moritz_ dwhipp: note the smiley in my statement above; I spend most of the time of my diploma thesis working with QM concepts
TimToady introspection is fine, but must be defined with unlikely-to-be-used operators 19:35
hence, .eigenstates and such
or as I said earlier, eigen<mumble> :)
TimToady but mere mortals will almost always expect junctions to autothread on ordinary operators 19:36
dwhipp yes, I really don't want to have to use exotic introspection to do simple things 19:36
ruoso TimToady, does that include plain method invocation?
dwhipp though they would at least allow friendly operators to be created in user-space
TimToady but there's no magic to junctions themselves as a type, just where they happen to sit in the dispatch hierarchy
yes, it includes plain method invocation 19:37
autothreading is done by Object noticing that Junction didn't handle it
ruoso so $junction.foo should autothread
TimToady unless Junction defines method foo
ruoso right...
TimToady which is why we should pick unusual names for Junction methods 19:38
ruoso I didn't get the other statement
what do you mean by "autothreading is done by Object"?
I was thinking autothreading was done by the junction itself
TimToady nope
ruoso (and by the multis that have Junction in the signature)
TimToady but we get to the routines by not matching Any,Any... 19:39
so basically it's on failure to dispatch within the realm of Any
ruoso that supposing you have a typed signature
TimToady for single dispatch, we could have a type between Junction and Object that is the implementation, I suppose
then Obect wouldn't have to worry about it 19:40
ruoso the problem with that perspective is that not all signatures are typed
but would it autothread?
TimToady and are slurpy, which are not autothreaded
slurpy args don't 19:41
hudnix what sort of result/error do you get if only some of the objects in a junction implement a method?
ruoso hmmm...
I'm almost thinking that Junctions are as fragile as Capture
meaning that it would autothread whenever you want to use it in some context 19:42
TimToady let us say they would be easy to abuse, and we'll have to rely on some cultural enforcement
but it feels right to use the existing dispatch system, not hardwire it
[particle]1 delicate, not fragile :)
ruoso [particle]++ that's a better term ;) 19:42
TimToady but if we had a JunctionImpl type, we could call $junk.JunctionImpl::eigenstates and such 19:43
hmm, wait that doesn't work
ruoso so basically if you send a junction inside a regular capture, it would autothread at bind-time
TimToady, that's p5 19:44
;)
pugs_svn r24775 | putter++ | [STD.pm] Kludges to work around some p5 regexp parse failures.
ruoso my question would be then "When to 'join' the threads" ?
TimToady p6 too, but JunctionImpl would be doing autothreading on unrecognized methods, so the type coercion doesn't help anything
mncharity TimToady: fyi, STD.pm has been infiltrated by tabs. 19:45
Happy new year everyone. :) 19:46
moritz_ :retab helps
moritz_ rakudo: say (undef max 2) 19:47
p6eval rakudo 35004: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤current instr.: 'infix:cmp' pc 14438 (src/builtins/cmp.pir:146)␤»
TimToady somebody probably edited it with emacs :)
moritz_ TimToady: what should infix:<min> and infix:<max> do with undef values?
ruoso moritz_, I'd suggest doing the same thing a database does 19:48
Limbic_Region oh, and imaginary numbers and NaN and Inf numbers
TimToady depends on what kind of undef it is
I suspect
moritz_ TimToady: compare them as 0 or empty string, depending on context
?
Limbic_Region salutations all btw
moritz_ TimToady: a bare undef
TimToady Failure should throw exception
there is no such thing as a bare undef 19:49
the undef function happens to return Object
Limbic_Region TimToady - you prude, no undefs in the nude
moritz_ ok, an Object then
TimToady please don't bare with me :)
pugs_svn r24776 | moritz++ | [t/spec] test that (undef min 2) doesn't die 19:50
TimToady a protoobject should generally pretend to be "" or 0, maybe with a warning
depending on the operator
moritz_ ok, so (2 min undef) would return the undef
TimToady but maybe for min/max it should be something else
moritz_ I think min/max should use cmp internally 19:51
TimToady see table for [min] and [max] on 1 or 0 values
TimToady [min]() returns +Inf, as I recall 19:51
so perhaps infix:<min> should assume similarly 19:52
especially when used as min=
moritz_ so should [min] 1, undef the same as [min]?
TimToady the real question is when does a protoobject really reprepresent Nil 19:53
TimToady Failure never does 19:54
reducing to when does a variable returning a protoobject represent an accumulator? 19:55
with min= we know it does
when a min b we don't necessarily know it
so I suspect the latter should warn and try to do the right thing
"Use of uninitialized value in 'min', assuming +Inf"... 19:56
ruoso dwhipp, I'm unsure about: for @AoA -> @arr { ... } 19:58
mncharity :) #re emacs. hopefully not me :/
ruoso I think it was supposed to work without the additional dereferencing
TimToady or a vim that doesn't recognized the :expandtabs at the end 19:59
for @AoA supplies a list context, so it should work okay
dwhipp that would be my expectation
perhaps the cases where it doesn't work quite right are rakudobugs 20:00
ruoso I'd assume so
TimToady rakudo has historically been weak on list context, but it's getting better
mncharity moritz_: Hmmm. It seems the t/regex/ p5 regexp tests have been deleted? What's up? My fuzzy impression is that rx:P5/foo/ has been respeced as rx/:P5 foo/, but other than that, those should be valid tests. A thousand of them. 20:02
no?
moritz_ mncharity: they live in t/spec/S05-modifier/ these days (I didn't move it, though) 20:03
ruoso rakudo: (2..200).grep{ ! (($_ % any(2..^$_))==0) } 20:04
p6eval rakudo 35004: OUTPUT«No applicable methods.␤␤current instr.: '_block14' pc 76 (EVAL_15:41)␤»
ruoso rakudo: (2..200).grep: { ! (($_ % any(2..^$_))==0) }
pugs_svn r24777 | putter++ | [elf_h] Assorted improvements. IR dump, concat, substr, push, 'is context', constant, default args, variable name mangling, infix:<//>, etc.
p6eval rakudo 35004: No output (you need to produce output to STDOUT) 20:05
azawawi finishes Padre Perl6 S29 function calltips or baloons... masak++ 20:06
TimToady mncharity: I'm leaning toward saying that rx:P5/$foo/ interpolates like p5 before feeding the regex parser, while rx/:P5 $foo/ doesn't, and just assumes it has post-interpolation text
which is why the tests have to be written with :P5 inside currently
since the :P5 just parses it like a string and it never gets to the P5Regex code 20:07
the outside :P5
moritz_ TimToady: any thoughts on @empty_array.pop? should it return Nil instead of an undef Object? 20:08
ruoso moritz_, I was already unhappy with Capture returning one of two things in item context, returning one of three sounds even worse...
but it could also provide a powerfull thing 20:10
return $item: $l,$i,$s,$t, :h(1), :a(2), :s(3), :h(4); 20:11
so that would make Capture in item context return:
- the invocant, if there's one
- the first positional argument, if there's only one
- an array of the positional arguments, if there's more than one 20:12
moritz_ that would be the ideal case for the issue you brought up on p6l
ruoso TimToady, what do you think?
TimToady in a meeting, so a bit hard to think 20:13
moritz_ no hurry, I'll backlog ;-)
ruoso TimToady, you might reply to the post on p6l as well
I still need to raise an even harder problem about that 20:14
TimToady sorry, things have been kinda hectic; brother-in-law had a minor stroke last week...
ruoso TimToady, sorry to hear that... 20:20
mildew: knowhow Foo { has $!bar; method bar { $!bar } }; Foo.bar = 2; $OUT.print(Foo.bar.FETCH); 20:22
p6eval mildew: OUTPUT«Could not find variable $?PACKAGE in the lexical scope.␤»
ruoso hmm... evalbot seems outdated...
moritz_, it seems smop wasn't rebuilt in the mildew evalbo 20:23
moritz_ sh: line 1: 23259
ruoso moritz_, if that's the svn revision, it's pretty outdated 20:25
moritz_ no, it's not
Setup: At least the following dependencies are missing:
utf8-string >=0.3.1.1
pugs_svn r24778 | putter++ | [elf] Merging STD_blue, STD_green, and rx_on_re directories into a new elfish/elfparse. (Part 1)
moritz_ that seems to be the culprit
ruoso libghc6-utf8-string-dev 20:26
install that package
moritz_ still complains
ruoso hmm.. which version? 20:27
moritz_ ii libghc6-utf8-s 0.3.1.1-1 GHC 6 libraries for the Haskell UTF-8 librar
I'm running ./configure now, as suggested in a later error message
ruoso ah... right
moritz_ but I'm low on power now, just ~12min to remain 20:28
ruoso ok...
moritz_ don't know if I'll make it today
pugs_svn r24779 | particle++ | [S06] add another command-line short name example; modify comment to line up visually with others 20:29
mncharity moritz_: ah, my thanks. I was confused, accidentally searching two different copies of elf. and finding the the tests gone from one, but not yet in t/spec on the other. D'oh. 20:32
TimToady: re rx:P5// rx/:P5/ and interpolation, ooo, that sounds nice. 20:33
ruoso dwhipp, also, $.is_winning_move is supposed to just work 20:34
if it doesn't it is probably a rakudobug 20:35
dwhipp rakudo: class A { method foo { say @_ }; method bar { self.foo } }; A.bar 20:38
p6eval rakudo 35004: OUTPUT«␤»
dwhipp rakudo: class A { method foo { say @_ }; method bar { $.foo } }; A.bar
p6eval rakudo 35004: OUTPUT«␤»
dwhipp rakudo: class A { method foo { say @_ }; method bar { $.foo(42) } }; A.bar
p6eval rakudo 35004: OUTPUT«␤invoke() not implemented in class 'Integer'␤current instr.: 'parrot;A;bar' pc 390 (EVAL_13:165)␤»
ruoso that's a bug 20:39
dwhipp sending rakudobug... 20:40
azawawi moritz_: padre.perlide.org/raw-attachment/wi...ration.png 20:45
rakudo_svn r35006 | tene++ | Partially erge pct_hll branch into trunk. 20:50
r35006 | tene++ | I'm *mostly* sure this doesn't break anything.
azawawi hi * 21:03
mncharity Could we get the #perl6 /topic unlocked? Is there some new threat which didn't exist a year or whatever ago? It used to be world writable, with community maintenance. We have enough people for that still. But /topic is currently limited to channel operators. So it's had a "The topic for #perl6 is:" typo for some time, can't easily be updated to reflect padre and other happenings, etc. 21:06
diakopter: jnthn: moritz_: PerlJam: pmichaud: Tene: TimToady: ^^ 21:07
Tene mncharity: go ahead and fix it. :) 21:09
mncharity The topic can be and was a nice way to pass on community news, a community focus, orientation for new visitors. [...] clip.
Tene: my thanks :)
pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/ 21:09
mncharity pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | evalbot: perl6: say 3; (or rakudo:, pugs:, elf:, etc) | irclog: irc.pugscode.org/ 21:12
mncharity perl6: say 3; 21:12
p6eval elf 24779, pugs, rakudo 35005: OUTPUT«3␤»
azawawi perl6: say 'hi' ~~ 5;
p6eval elf 24779: OUTPUT«Can't call method "Str" on an undefined value at ./elf_f line 649.␤ at ./elf_f line 3861␤»
..rakudo 35005: OUTPUT«0␤»
..pugs: OUTPUT«␤»
azawawi perl6: say 'hi' ~~ '5'; 21:13
p6eval elf 24779: OUTPUT«Can't call method "Str" on an undefined value at ./elf_f line 649.␤ at ./elf_f line 3861␤»
..rakudo 35005: OUTPUT«0␤»
..pugs: OUTPUT«␤»
azawawi perl6: say 'hi' . '5';
p6eval pugs: OUTPUT«*** ␤ Unexpected "."␤ expecting operator, ":" or ","␤ at /tmp/ckhb8Le0B7 line 1, column 10␤»
..elf 24779: OUTPUT«Parse error in: /tmp/i063nKqsn9␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: say 'hi' . '5';␤WHERE:/\<-- HERE␤ STD_red/prelude.rb:99:in `panic'␤ STD_red/std.rb:76:in `scan_unitstopper'␤ STD_red/std.rb:224:in `comp_unit'␤
..STD_red/std.rb:210:i...
..rakudo 35005: OUTPUT«Statement not terminated properly at line 1, near ". '5';"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
azawawi is sorry for the spam
ruoso later & 21:17
pugs_svn r24780 | putter++ | [evalbot] Update to elf_h (from old elf_f). 21:20
mncharity elf: say 3; 21:43
p6eval elf 24780: OUTPUT«3␤»
mncharity perl6: say 3;
p6eval elf 24780, pugs, rakudo 35007: OUTPUT«3␤» 21:44
mncharity elf: say 'hi' ~~ 5;
p6eval elf 24780: OUTPUT«Can't call method "Str" on an undefined value at ./elf_f line 649.␤ at ./elf_f line 3861␤»
cspencer is there a special method that i can define in a perl 6 class that determines how it stringifies? (or coverts to an integer or a num, for that matter)? 21:49
pugs_svn r24781 | putter++ | [elf] Merging STD_blue, STD_green, and rx_on_re directories into a new elfish/elfparse. (Part 2) 21:55
r24781 | putter++ | elfish/ STD_blue, STD_green, and rx_on_re are deleted. Improved Makefile. elf.pm is a ~week-old snapshot of STD.pm. STD_green_run.pm is the start of a p6 version of STD_blue, using std.pm and elf's rx, instead of gimme5.
mncharity cspencer: .Str 21:57
.Int .Num
cspencer ah ok, so just define: method Str() { .. }
gotcha, thank you!
mncharity no problem :)
elf: say 'hi' ~~ 5; 21:58
p6eval elf 24780: OUTPUT«Can't call method "Str" on an undefined value at ./elf_f line 649.␤ at ./elf_f line 3861␤»
mncharity wonders how to kick evalbot...
rakudo: class A { method Str { "foo" } }; say A.new; 21:59
p6eval rakudo 35007: OUTPUT«foo␤»
mncharity elf status update: I'm currently working through a copy of STD.pm, getting elf to run it. The STD.pm copy is currently almost entirely commented out. ./STD_green_run --start noun -e 42 , and not much else. The running bits are mostly unmodified, but do contain elf-compatibility tweaks. The vision is to work up to 'say 3', then elf self-compilation. STD_green should be a drop-in replacement 22:07
for STD_blue. Once elfblue can self compile on STD_green, then elf and STD_green will merge, and a new elf_i will no longer depend on an external parser. 22:08
mncharity Then perhaps transliterate the existing p5 rx_on_re runtime into p6, at which point the elf frontend will be all p6. And the common-lisp background can then also switch to internal parsing. 22:11
mncharity s/background/backend/ 22:11
azawawi nice
mncharity :) s/backend/elf-compiled-to-common-lisp/ 22:14
cspencer mncharity: which common lisp implementations are supported? 22:17
or is it able to run on all of them? 22:18
cspencer rakudo: my Int $i = 12; my Num $n = $i; say $n ~ " is " ~ $n.WHAT 22:21
p6eval rakudo 35007: OUTPUT«12 is Int␤»
cspencer perl6: my Int $i = 12; my Num $n = $i; say $n ~ " is " ~ $n.WHAT 22:22
p6eval elf 24781, pugs, rakudo 35007: OUTPUT«12 is Int␤»
mncharity cspencer: currently, 22:27
only sbcl. I'd like to see it generalized to clisp.
cspencer mncharity: hmmm...i'd like to give it a go, but i can't remember how the last time i'd tried to wrestle sbcl onto OS X turned out 22:28
or if sbcl even supports OS X for that matter
oh it does. i'll give it a go then some time this week! 22:29
mncharity the cl side is actually quite simple. should be able to get it working on any good implementation.
cspencer that's great. any other CL package dependencies? 22:30
mncharity looking... 22:30
svn.pugscode.org/pugs/misc/elfish/on_sbcl/ 22:31
cspencer thanks :) 22:31
mncharity mostly just weitz's perl compatible re / interpolation / unicode libraries. 22:32
cspencer that's easy enough then 22:33
mncharity make libraries should build them all.
cspencer awesome. is it running parts of the spec suite?
spec test suite, that is
mncharity not really. my push was to get to self-compilation. make check does that, but there's an unresolved diff. I've not looked at it - elf critical path drove me elsewhere. 22:36
cspencer fair enough, thanks for the info :) 22:38
mncharity for adding another cl impl, in svn.pugscode.org/pugs/misc/elfish/o...vesSBCL.pm the 'is cl' subs, and the big string in svn.pugscode.org/pugs/misc/elfish/o...mitSBCL.pm method prelude, can be #+foo'ed. "sbcl" are hardwired in a few places. The library directory organization 22:39
may need tweaking for multiple cl implementations to be used simultaneously.
rakudo_svn r35008 | pmichaud++ | [rakudo]: spectest-progress.csv update: 265 files, 5914 passing, 0 failing 22:40
mncharity runs clean on_sbcl build, just to make sure it all still works... 22:42
cspencer thanks :) 22:43
mncharity cspencer: you may be the first person other than me to touch any of it. so if you have any questions, please ask. 22:44
cspencer will do :)
mncharity oh, I was wrong. It *can* self-compile correctly. It's the crosscheck of using a cl elf to compile a p5 elf which turns up the diff. 22:47
cspencer alrighty. if that becomes an issue, i imagine you'll probably hear from me again on #perl6 :) 22:52
mncharity fib() in cl elf's p6 is currently about 1/5 the speed of native p5. it started at 10x, but as I added compatibility features, it declined. the nice thing is, some of the features are ones a not-too-bright elf IRx1_Analysis and emitter might recognize are not needed in particular cases. note at the bottom of svn.pugscode.org/pugs/misc/elfish/on_sbcl/README . 22:58
and I've done little performance optimization.
pugs_svn r24782 | putter++ | [on_sbcl] README: QuickStart section: bugfix and addition. 23:05
mncharity cspencer: Sooo, self compilation still works. Compiling a p5 elf has a new more severe problem. The elsif $v eq '$¢' { I added to elf_h today triggers a unicode problem. 23:07
:/
mncharity My fuzzy impression is $¢ seems to be causing more unicode pain, in multiple settings, while things like « are just working. curious. 23:09
mncharity though perhaps it's just the first unicode scalar variable name I'm using? 23:10
cspencer mncharity: heh, ok
by "p5 elf" , do you mean elf compiles to perl 5 as well? 23:11
mncharity elf is largely written in p6 (well, the elf mostly-compatible-subset of p6). elf_h in svn.pugscode.org/pugs/misc/elf/ is a stand-alone p5 program, namely elf compiled to p5. the elfish/on_sbcl just swaps out the emitter. so elf_on_p5 can compile to p5 and to cl (depending on the emitter used), and so can elf_on_sbcl. 23:15
so "p5 elf" == "elf compiled as a p5 program". hmm, "elf manifest as p5"? :) 23:16
cspencer ah ok
eric256 anyone mind if i scrap the IRC logs and put some of these things in a wiki? i swear you all are speaking in code and I intended to crack it!
mncharity elfcl is just ${ELF} -I ${ELFDIR} EmitSBCL.pm -x -o elfcl Elf_SBCL.pm , where svn.pugscode.org/pugs/misc/elfish/o...lf_SBCL.pm just use()s the svn.pugscode.org/pugs/misc/elf/elf_h_src/ sources. 23:19
eric256: "scrap the IRC logs"???
[particle] s/scrap/scrape/
cspencer eric256: where're you logging the IRC stuff to?
[particle] the logs are public, so go ahead
mncharity re code, there is a "glossary" someone did somewhere... the perl.org wiki maybe? 23:20
eric256 err scrape? or scan...i just mean read and compile into something readable ;)
mncharity www.perlfoundation.org/perl6/index....and_jargon
eric256 i seem to recall a monk who didn't like his writings being re-used...so just covering my a$$
mncharity re elfcl, it's actually gotten even easier to do elf derivatives. An Elf_SBCL.pm is not really needed at this point. Things got modularized even further, so the various elf derivatives which are now elfparse svn.pugscode.org/pugs/misc/elfish/elfparse/ could simply say for instance ${ELF} -x -o ./elfblue -I . -I ${ELFDIR} -e 'use Elf_wo_main' IRx1_FromAST2.pm Parser2.pm -e elf_main 23:25
modularity was a design goal. :) 23:27
cspencer awesome. i'm definitely going to have to bookmark this conversation for later this week when i try and get things going :) 23:28
mncharity eric256: making it easier for people to get started would definitely be nice. 23:33
eric256 sometimes i feel as if i'm treading water carrying a sack of potatoes ;) easy to drown in all this new information 23:34
eric256 wishes there was an online coolaboritave flow chart (preferrable with revision control built in ;) ) 23:34
mncharity eric256: my fuzzy impression is there are a couple of them... some free, though perhaps only proprietary? 23:52
re "online coolaboritave flow chart", not potatoes. 23:53
cspencer rakudo: my $x = 12; my $y = $x; $x++; say "x = $x, $y = $y" 23:57
p6eval rakudo 35009: OUTPUT«x = 13, 12 = 12␤»
Tene It wouldn't be too hard to hack something like that together with git and graphviz 23:58
cspencer rakudo: my $x = 12; my $y := $x; $x++; say "x = $x, $y = $y"
p6eval rakudo 35009: OUTPUT«x = 13, 13 = 13␤»