»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
tadzik wtf, why did synopsebot react to help 00:03
00:10 cjwelborn left 00:13 Psyche^_ left
corecatcher yay, working BarTab order thingy \o/ 00:14
corecatcher pets jnthn 00:15
00:17 Psyche^ joined 00:18 Guest12202 left 00:19 benabik joined 00:28 EvanTeitelman left
timotimo crocket, TimToady, may i step in to explain pypy? 00:28
crocket timotimo, Feel free to do so
timotimo pypy usually refers to two parts: the rpython compilation toolchain and the python interpreter based on the rpython toolchain 00:29
rpython is basically a "subset" of python, in that there is one point where your program stops running as python and starts being severely restricted in what it can do
mostly things like "this function must always return the same type" or something
crocket ok 00:30
timotimo then the rpython toolchain goes ahead and, starting from a single entry point, adds types to every little nook and cranny of the code at that point
(so you can metaprogram in python before the translation starts)
crocket What is rpython written in?
timotimo at the end, a pluggable GC, the stackless transformation and a complete meta-tracing JIT are added, the whole thing is spat out as C code and compiled by gcc
the rpython translation toolchain is entirely python code
crocket weird 00:31
timotimo i don't think so.
crocket timotimo, Is rpython written in Cython?
timotimo no
rpython is a restriction on behavior, not syntax
at the point where the rpython translation starts, only code objects and python bytecode remain 00:32
(and annotations like "this bytecode comes from this line of code")
00:32 EvanTeitelman joined
timotimo cython doesn't enter the picture at all until you have a fully translated and installed pypy-c program 00:32
after that you need to do magic to make cython work because cython relies on the CPython extension API, which isn't fully supported by pypy 00:33
(by pypy-c, i should say)
crocket timotimo, PyPy doesn't seem to support pytho n3.
timotimo python 3 support is on the way for pypy-c 00:34
there will not be python 3 support for the rpython translation toolchain any time soon
00:34 benabik left
crocket What is pypy-c? 00:35
timotimo i call that the binary that you get when you translate the pypy-python-interpreter source code using the rpython translation toolchain
crocket timotimo, You make it more complex. 00:36
timotimo it is a bit complex
but the big picture is: you use a python interpreter (cpython or pypy, your choice) to run the rpython translation toolchain and you feed that the source code of the pypy-python-interpreter, out comes a pypy-python-interpreter binary 00:37
crocket It seems PyPy is running out of funding. 00:38
timotimo they only require funds to full-time-employ developers 00:40
crocket timotimo, It's already expensive enough.
timotimo and it would seem like they are getting funded pretty well
crocket timotimo, How are people paid?
sponsorship or full-time employment?
timotimo i'm not sure i understand the difference 00:41
but i think it's the former
00:41 EvanTeitelman left
timotimo if you'll excuse me, i have an appointment with my pillow and blanket :) 00:41
but i really don't understand what you mean by "it's already expensive enough"
crocket timotimo, devs are actually worth a lot. 00:42
commodity devs aren't paid well enough.
timotimo, With sponsorship, you don't require full-time engagement. 00:43
A sponsored dev is basically asked to work on a project. 00:44
An employed dev has less autonomy.
timotimo ok. you'd have to ask the pypy people about this.
i still don't understand what you mean by "already expensive enough" and "running out of funds"
i think they haven't yet used any of the money you can see on the website for their fundraisers 00:45
anyway, i'm going to bed now
oh, look, they've actually released a beta version of pypy3 00:46
crocket ok 00:47
timotimo, I'll probably want to get funded by internet projects like PyPy instead of having to endure humiliation of corporate programmer jobs.
01:00 benabik joined 01:05 risou_awy is now known as risou 01:11 EvanTeitelman joined 01:12 PacoAir left 02:01 FROGGS joined 02:06 FROGGS left 02:10 risou is now known as risou_awy 02:14 risou_awy is now known as risou
crocket How is perl6 winning over other languages? 02:26
perl5 wasn't particularly better than python as a language.
Let's not consider execution environment. 02:27
90% of everything is either shitty or mediocre. 02:30
02:34 Araq joined 02:57 crocket left 03:02 risou is now known as risou_awy 03:08 cjwelborn joined 03:31 thou left 03:42 Mouq joined 03:44 EvanTeitelman left, ksh left 03:47 ksh joined 03:58 REPLeffect left 03:59 preflex left 04:02 REPLeffect joined, preflex joined, ChanServ sets mode: +v preflex 04:08 eternaleye left 04:09 eternaleye joined 04:10 raiph joined 04:11 colomon left 04:20 aindilis left 04:31 Pzter joined, PZt left
TimToady crocket seems to have some trollish tendencies, but is not very good at it yet :) 04:37
lue In retrospect, I would agree (including the reason that he didn't seem like a troll at the time) 04:43
cognominal crocket: This kind of comparaisons miss the large picture. Without Perl, there would probably no Python to begin with.
04:44 fridim__ left 04:45 BenGoldberg left 04:49 eternaleye left 04:50 eternaleye joined 04:52 cognominal left, cognominal joined 05:12 rindolf joined 05:36 rindolf left 05:39 cjwelborn left 05:44 FROGGS joined 05:55 pernatiy joined 05:58 ksh left 05:59 ksh joined 06:05 risou_awy is now known as risou 06:20 salv0 left 06:21 salv0 joined 06:37 Pzter is now known as PZt
Woodi hallo :) I must say I am a bit out of sync with Perl6 development news... so: is it possible to generate binary (in .exe/+x sense) from v6 script at the moment ? 06:48
06:49 risou is now known as risou_awy
FROGGS Woodi: not at the moment 06:49
Woodi and: do some security infrastructure like in Java VM is planned for Perl6 (spec) or MoarVM ?
FROGGS Woodi: but something like staticperl might be possible without too much fuzz 06:50
Woodi java have applets legacy probably...
FROGGS Woodi: what do you mean?
Woodi eg. sandboxing
but maybe Perl6 is just language ?
FROGGS Perl 6 is a language yes 06:51
what you want might be maybe that rakudo has a safe setting? like the eval bot offers here?
r: open() 06:52
camelia rakudo c5ba78: OUTPUT«open is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting:2␤ in sub open at src/RESTRICTED.setting:5␤ in block at /tmp/V3hlV_BLEr:1␤␤»
06:55 darutoko joined
Woodi realy, I do not know what I want :) someting superextra and beatifull :) maybe kind of chroot, maybe sandbox like in applets, maybe SELinux integration or dtrace ? :) 06:56
Woodi afk but will be back :) 06:57
FROGGS o/ :o) 07:01
07:06 xenoterracide left 07:07 cognominal left 07:08 cognominal joined 07:13 xenoterracide joined 07:17 SamuraiJack_ joined 07:25 raiph left 07:33 raiph joined
Woodi b :) but realy I asking: is something like that planned and is it needed ? in the future ? becouse integrating security layer later will be +Ofun -Whard... 07:34
but maybe Perl6 is just yet another low level language and such things are not needed inside :) 07:36
07:47 SamuraiJack_ left 07:48 nyuszika7h left 07:49 nyuszika7h joined
timotimo use NativeCall; sub seccomp() is native("something_something.so"); seccomp(); 07:59
on the java level, you can grab a Perl6::Compiler object as a java instance thingie and put that into a security context with a classloader or something 08:00
08:02 raiph left
hoelzro why is it that when I run a perl6 script, I see two processes in top? 08:09
does Parrot spawn some sort of helper thread? 08:11
hmm 08:15
seems so
08:20 logie left 08:21 denisboyun joined 08:22 logie joined
timotimo maybe somebody sneaked in a concurrent GC while we weren't looking 08:29
08:35 risou_awy is now known as risou
hoelzro what is it? while(1) { sleep(1) }? 08:43
timotimo yeah, must be something efficient like that
08:48 dmol joined
Woodi timotimo++: nice and look secure for system/account 08:52
08:53 Rotwang1 joined 08:58 iSlug joined 09:01 spider-mario joined 09:09 PacoAir joined
hoelzro sweet 09:10
the JVM profiler + Perl 6 totally works!
hoelz.ro/files/perl6-objects.png
wow, SixModelObject. *That's* a shock.
hmm 09:11
what's a _P6Opaque?
er, nvm 09:12
arnsholt hoelzro: Every class backed by the P6opaque gets an autogenerated class, which is the _P6Opaque_\d+ classes 09:19
hoelzro makes sense
arnsholt Since different classes have different members and such 09:20
hoelzro of course
arnsholt On Parrot it's handled differently, since we can just malloc() differently sized slabs of memory and index into that 09:21
hoelzro arnsholt: do you happen to know where that P6opaque generating code lives? 09:23
if not, I'll probably be able to find it
09:24 iSlug left
masak antenoon, #perl6 09:24
arnsholt 'sec
dalek kudo/method2sub: 20d5a68 | (Elizabeth Mattijsen)++ | src/Perl6/World.nqp:
Panic if we cannot make the exception object
09:25
arnsholt hoelzro: src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6Opaque.java:253 (generateJVMClass) 09:26
hoelzro ahoy masak
cool, thanks!
masak this cracked me up: irclog.perlgeek.de/perl6/2013-09-20#i_7613368 :)
hoelzro I'm going to try to hack this profiler to get more details
arnsholt hoelzro: It's ~350 lines of stuff, mind =)
masak "it's... a contradiction? well gosh, we gotta do something about that immediately, I guess!" 09:27
woolfy ll 09:28
09:28 iSlug joined
lizmat good *, #perl6! 09:28
dalek kudo/method2sub: 2f2196f | (Elizabeth Mattijsen)++ | src/core/Any.pm:
Fix More/Some confusion
09:29
lizmat I've gotten a bit further with the method 2 sub migration of [] and {}
only running perl6 now is a problem, because apparently now %ENV is readonlu 09:30
masak I wonder if people coming in from the outside really have such a one-dimensional view of the world as they seem... or if they just give that impression due to lack of a common language. 09:31
09:31 risou is now known as risou_awy
masak open source communities are like isolated islands in the ocean. people visiting from another island have a hard time blending in, partly because the things they say sound like noises to us. 09:32
arnsholt Heh, TimToady is a very good antidote to that kind of overly serious thing. "it's fast enough already, except when it isn't" =D
09:32 rindolf joined
masak apparently I got out of my bed on the cultural-relativist side today. 09:32
arnsholt Or maybe you put on your PoMo hat =) 09:33
timotimo pomo? 09:34
masak moritz made my PoMo hat look all ridiculous and stuff :)
masak .oO( I maded you a hat but moritz deconstructed it! ) :P 09:35
arnsholt timotimo: post modern(ism)
masak timotimo: en.wikipedia.org/wiki/Postmodernism
timotimo of course 09:36
masak unless it happens to be Esperanto for "apple" :)
timotimo mehsperanto 09:38
09:39 SamuraiJack_ joined
masak I think disparaging Esperanto in here would qualify as throwing stones in a glass house ;) 09:40
cognominal: alternative history is hard, but I think Python would have come about with or without Perl. 09:43
cognominal: Guido was certainly aware of Perl when he started on Python. he just didn't like semicolons and braces.
09:52 pmurias joined
pmurias Woodi: re security infrastructure, I don't think anything like that is planned for the spec itself 09:55
masak I've been thinking about CCCs lately. (Cartesian Closed Categories)
and I have this question: how far apart are the OO world and the ADT world really. 09:56
at one end, we have objects (data + behavior). at the other end, Algebraic Data Types (defined using unions, tuples, and records). 09:57
there are some obvious differences, such as objects being opaque and ADTs being all too willing to be deconstructed. but as Perl 5 and JavaScript and Python show, opaqueness isn't required in an object system. 09:58
then there is the fact that behavior is defined "in" the class itself, whereas ADTs only talk about data, and you define behavior from the outside. 09:59
...but as golang shows, you can build a perfectly cromulent OO system by defining methods on the outside of classes.
(and it seems to work quite well. I still haven't figured out if there's any drawback to golang's approach.) 10:00
Woodi pmurias: any idea about S23 ? (status: TBD)
masak so. is there any strong reason something couldn't be *both* an OO system and fully based on ADTs?
pmurias Woodi: maybe once it is succesfully implemented it will be specced 10:02
masak I started thinking about all of this when I saw TimToady's red-black tree implementation on RosettaCode. I thought "well, it's a shame we cannot make objects and pattern matching closer to each other than that..."
pmurias masak: dosn't ADTs stop you from adding new subtypes of some thing? 10:04
data Foo = Foo | Bar, and we can't add a FooBar constructor
masak ah, so you mean there's no correspondence to subclassing in the ADT world? 10:05
that's true -- but on the other hand JavaScript eschews subclassing for prototype linking, and golang ditches subclassing for wrapping.
so that's also not a showstopper, it seems.
also, if an enum is seen as a tagged union, it's *also* not extensible. which makes a whole lot of sense, if code expects there to be a closed set of cases to handle. 10:06
pmurias you can have a semi decent object system with struct and function pointers for polymorphism if you try hard enough ;)
masak yeah. 10:07
my question, I guess, is whether someone has deliberately tried to make an object system out of sums, products, and exponentials. (like in a CCC)
Haskell doesn't count. 10:08
Woodi hmm, what is object system and pattern matching (in few words) ?
10:09 denisboyun left
masak Woodi: "object system" = something that allows you to define types (classes?) out of which objects can be instantiated. the objects have state and behavior. 10:09
10:09 denis_boyun joined
masak Woodi: "pattern matching" = the same function can have different function bodies, and the correct one is chosen at invocation time by matching the parameter signature against the arguments. 10:11
when you have multis in Perl 6, you generally also have pattern matching.
'given/when' also does pattern matching.
Woodi I have burned in brain that objects are just records. + functions. what is responsible for behaviour in ADT ? 10:13
10:14 xinming joined
masak well, "objects = records + functions" is fully compatible with an ADT world view, IIUC. 10:14
but records are products, and you haven't fit sums (unions) into that model. 10:15
and hence there isn't a great need for pattern matching, either.
10:17 krokite left
masak in terms of introspecting your ADTs, records/tuples are conjugate with field/element lookup. unions/enums are conjucate with pattern matching, multis, and given/when. 10:18
conjugate*
Woodi isn't a pattern matching a scheduling on some condition ? :) 10:19
masak "scheduling"? please define.
Woodi running "case" with data type as varible 10:20
10:21 Mouq left
masak in my understanding, that's exactly what pattern matching is. it's "unwinding" the structure that the union has "wound". 10:21
the simplest possible product is cons (car/cdr). the simplest possible sum is Either (Left/Right). 10:22
I wonder why Lisp gave us the former but we had to wait for Haskell for the latter ;)
the semantics of a product can be summarized as "two go in, one comes out". that is, you have to provide both the car and the cdr to build a cons, but the result is one single unit. 10:24
the semantics of a sum can be summarized as "one goes in, two come out". that is, you only have to provide a Left or a Right, and the Either in some sense pretends to be both of these to the rest of the world.
needless to say, these two notions are dual. :)
Woodi do ADT have loops ? I thing loops are needed for turing completness ? 10:26
dalek kudo-js: 4342f20 | (Pawel Murias)++ | run (2 files):
Pass test 78.

Implement nqp::cwd, nqp::getenvhash, nqp::shell (with 3 arguments).
masak Woodi: yes, because you can define them recursively.
Woodi: so a (binary) Tree[a] can be defined as (Empty + Leaf[a] + Node[Tree[a] * Tree[a]]) 10:27
10:28 Rotwang1 left
masak Woodi: FP folks have a trick for handling recursive types, involving (not surprisingly) the Y combinator. 10:28
Woodi but for object system behaviour definition is needed too, not just data definition 10:33
masak yes, but look at golang. 10:34
either you have to claim it has no object system.
or agree that it doesn't keep the behavior definition "inside" the type definition.
10:37 iSlug left
Woodi looks funcions are defined outside { }, like in object system written in asm :) 10:39
for me objects/inheritance/stuff is just syntax sugar for not writting same code twice. it makes some order on "code" level, humans prefer that :) 10:41
masak yes. 10:44
on some level, putting methods inside of the class definition is a lie. 10:45
that can be seen more clearly by considering that there are N copies of the data part, one for each instance -- but there is just 1 copy of the behavior part, one for the whole class.
inheritance is there as a mechanism for not writing the same code twice. as such mechanisms go, it's not a particularly successful one. 10:46
there's half a dozen others.
10:53 iSlug joined
Woodi and what new on the Actor model/STM field in Perl6 ? actually vm is sheduling async tasks on hardware threads ? 10:55
masak I have a whole lot more faith in the Actor model these days, than STM. 10:56
10:56 colomon joined
masak as jnthn has taken to saying, STM is great if you actually have immutable types all through your language. it's less great if you don't. 10:56
Woodi hmm, for me immutable types are compiler feature... users probably want do a=a+1, not b=a+1... 10:58
but actor model is kind of ideal, concurrent object system... 11:01
jercos well, if you consider a=a+1 in the most literal imperative sense, you could use := instead, you are evaluating a, adding one to that result, and binding a to the immutable result of that addition operation, no? the difference between := and = being that you are changing the contents of a mutable container, rather than rebinding a name. 11:03
but in either sense, it's still "a" resolving to two different immutable values, one before, and one after, right?
masak well, yes and no. 11:05
the 'a' on the right side is an rvalue -- you're accessing it for its value.
dalek kudo/method2sub: 149b15d | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Change order of candidates to be the same as the original version

Alas, still not being able to assign to hashes
masak the 'a' on the left side is an lvalue -- you're accessing it for the container that value is in, to replace that value.
jercos right 11:06
but the result of a as an rvalue is immutable by nature, that being why it's an rvalue... and that whole statement creates a new rvalue which is being placed in the contain that a as an lvalue references, and in the future "a" will resolve to that new rvalue. 11:08
11:09 iSlug left
jercos neither the contents of "a" before, or after the statement need be mutable, it's only the container they're held in, which I'm say is effectively equivalent to a rebind, and for most purposes wouldn't need to be a Scalar. 11:09
masak aye. 11:10
much of the confusion in these discussion seems to stem from the difference between immutability of a container and immutability of its contents.
Perl 6 suffers a bit from that too.
and as soon as you start thinking in terms of "deep immutability", all the way down so to speak, you get into philisophical difficulties about which objects "own" each other. 11:11
& 11:16
oh, and actors/aggregates help with that, because by definition each actor or aggregate is its own "world". 11:17
jercos almost like... multiprocessing and IPC? :p
lizmat r: multi sub a ($a) { say "without named" }; multi sub a ($a, :$foo) { say "with named" }; a("bar") # bug or feature ?? 11:18
camelia rakudo c5ba78: OUTPUT«with named␤»
lizmat given 2 candidates, one without named, and one with an optional named
masak jercos: not "almost like" -- one subsumes the other :)
colomon lizmat: how could that not be a bug?
lizmat is it right that the candidate with the optional named parameter is selected even if there is no named parameter given ?
masak lizmat: I think in this case, it comes down to ordering. 11:19
lizmat: I'd need to re-read S06 to be sure.
lizmat: but if it comes down to ordering, I still think the first one should win.
really &
lizmat r: multi sub a ($a, :$foo) { say "with named" }; multi sub a ($a) { say "without named" }; a("bar") # which one wins ? 11:20
camelia rakudo c5ba78: OUTPUT«with named␤»
lizmat seems to not be an order thing here
seems the candidate without named params is always ignored (to me, at least) 11:21
jercos I suppose what really cooks my noodle is that if structures are completely immutable, to change one value somewhere in a structure, you have to work that change up all the way to the top, or design something completely backwards like Git, or a transaction log, and have every read progress backwards up a versioning tree until the value sought is found... and neither are particularly appealing from the standpoint of single-threaded performance.
and there still always has to be something at the top, though the latter structures lend themselves to multiple "top" objects, with some mechanism of resolving to a preferred top... 11:22
lizmat colomon: how could that not not be a bug ? 11:23
FROGGS n: multi sub a ($a, :$foo) { say "with named" }; multi sub a ($a) { say "without named" }; a("bar") # checking niecza
camelia niecza v24-95-ga6d4c5f: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/iJZSUOXhE1 line 1:␤------> multi sub a (⏏$a, :$foo) { say "with named" }; multi s␤ $foo is declared but not used at /tmp/iJZSUOXhE1 line 1:␤------> multi sub a ($a, …»
lizmat n: multi sub a ($a, :$foo) { $foo; say "with named" }; multi sub a ($a) { say "without named" }; a("bar") # checking niecza 11:24
camelia niecza v24-95-ga6d4c5f: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/wQbNc1555w line 1:␤------> multi sub a (⏏$a, :$foo) { $foo; say "with named" }; m␤␤without named␤»
FROGGS n: multi sub a ($a, :$foo) { say "with named $a $foo" }; multi sub a ($a) { say "without named $a" }; a("bar") # checking niecza
camelia niecza v24-95-ga6d4c5f: OUTPUT«without named bar␤»
Woodi jercos: indirection eg. pointers allows to make changes in the middle
lizmat rn: multi sub a ($a, :$foo) { say "with named $a $foo" }; multi sub a ($a) { say "without named $a" }; a("bar")
jercos Woodi: yes, but only if the pointers can point to a mutable object :|
camelia rakudo c5ba78: OUTPUT«use of uninitialized value of type Any in string context in sub a at /tmp/8jPolJRUuH:1␤␤with named bar ␤»
..niecza v24-95-ga6d4c5f: OUTPUT«without named bar␤»
lizmat I think this calls for either a rakudo or niecza bug 11:25
colomon lizmat: I would (possibly naively) expect the most specific multi to win. but the least specific multi is winning. my default assumption is bug.
FROGGS lizmat: I think it should complain about an ambigious all
call*
lizmat that at least
but how can "no named parameters" not be narrower than "any named parameters" ?
colomon seems like we've thought up three possible behaviors, and rakudo is doing *none* of them.
lizmat submist rakudobug 11:26
jercos Woodi: if you're assuming pure immutability, there's no "changable container", and allowing such a thing breaks the very point of keeping everything immutable, namely allowing threads to work on the same data without checking locks or keeping logs
colomon goes looking in roast 11:27
Woodi jercos: things that work usually are little gray, not white or black :) eg. OSI vs IP :)
jercos well yes, in a *practical* sense you're always going to have mutability, you're working on machines with registers that can be changed, with a bank of memory that can be addressed and the data stored at a given address changes arbitrarily, but that doesn't solve the *problem* :p 11:28
colomon positional-vs-named.t only tests named parameters declared with exclamation points. 11:29
Woodi what was the problem, I forget now :)
colomon rn: multi sub a ($a, :$foo!) { say "with named $a $foo" }; multi sub a ($a) { say "without named $a" }; a("bar")
camelia rakudo c5ba78, niecza v24-95-ga6d4c5f: OUTPUT«without named bar␤»
jercos Woodi: the problem is, if you give two threads a cookie, they're probably going to want a glass of milk to go with it ;)
lizmat colomon: unfortunately, I need *all* named params to be optional :-( 11:30
Woodi ah, threads :) you must deal with shared memory or copy messages :)
colomon rn: multi sub a ($a, :$foo?) { say "with named $a $foo" }; multi sub a ($a) { say "without named $a" }; a("bar")
camelia niecza v24-95-ga6d4c5f: OUTPUT«without named bar␤»
..rakudo c5ba78: OUTPUT«use of uninitialized value of type Any in string context in sub a at /tmp/B1iLu772zp:1␤␤with named bar ␤»
jercos Woodi: when working at the low level, yes, but higher level programming allows for the same sort of abstraction you can have when dealing with a database, the idea of a transaction, or of concurrent reads and locking writes... 11:31
colomon lizmat: while I agree there's something wonky going on here, do you really require two different subs? should a("bar") and a("bar", foo=>False) do different things? 11:33
lizmat well, this is about {} and [] accesses
if there are no named params specified, I would like it to select the quickest sub
*now* I have to check all of the passed named parameters for *each* bare [] and {} access 11:34
aka: $delete & $exists & $kv & $p & $k & $v === $default
?? SELF.at_key($key)
rather than just SELF.at_key($key)
11:35 denis_boyun left
colomon I'm not sure forcing rakudo to figure it out with a multi will be a performance win there. 11:35
Woodi jercos: lastly I think implementation should fit clousely to required result... then you can design what work best... and levels of abstraction allows to do everything (inside)
lizmat it's about being able to do this at compile time 11:36
colomon I suppose if you have to have a multi anyway, it's not a bit deal...
lizmat so each {} and [] access doesn't have to go through a multi
but can be optimized to take the right one right away
jercos Woodi: well yes, ideally at the highest level one should simply be able to write code that does things, and not have to worry about concurrency, because the language itself should be designed such that any way to express a problem can be paralellized if the problem is parallelizable. 11:37
but that's sort of a perfect-world thing.
Woodi I lastly dreaming about cutting layers :) eg. putting html text in data section of asm code :) pages/templates do not change so often :) 11:40
and servers work more then year... :)
all that scripting languages, cpus hate them, I tell ya ;) 11:43
dalek kudo/method2sub: 25eddf5 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Make all optional named param version handle no named param version

Because of a bug (#119929) the no-named parameter is never selected, unlike Niecza. Feels to me that a candidate with *no* named parameters is narrower than a candidate with *only* optional named parameters.
Fixing this bug should allow better optimization of all {} and [] accesses without adverbs.
11:50
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=119929
lizmat spectest still not clean :-( 11:51
timotimo isn't the simples possible sum Maybe? 11:56
Araq I think it's "None" ;-)
11:58 EvanTeitelman joined
timotimo that doesn't feel like a sum to me any more :) 12:01
i think foo($a, :$foo) is narrower than foo($a), because foo($a) is really foo($a, *%) 12:02
lizmat timotimo: then there should be an attribute "is nonamed" or something like that 12:04
dalek kudo-js: d8255c9 | (Pawel Murias)++ | runtime/reprs.js:
Add a noop compose to the NFA repr.
lizmat because we will need the selection of the simplest candidate for speed
timotimo hmm
yes.
12:07 cognominal left 12:08 cognominal joined
masak timotimo, Araq: ok, "simplest" was a slight exaggeration. :) 12:12
but I consider Either to be simpler than Maybe.
Maybe is the simplest monad, though. 12:13
during my walk, I thought about the exponentials.
it's kind of cool that CCCs are built up using sums, products, and exponentials.
all of these are used for data abstraction. sums give us choice, products give us structure, and exponentials give us code-as-data. 12:14
12:16 lizmat_ joined, lizmat left
pmurias CCCs? 12:16
diakopter TimToady: I think crocket was just in a bad mood.
lizmat_ hmmm… the spectest just ate all of my RAM and virtual disk
diakopter hoelzro: that's way more vmarray/sixmodelobject[] than I expected
12:17 Araq left
masak pmurias: en.wikipedia.org/wiki/Cartesian_closed_category 12:17
pmurias: it seems to be Category Theory's answer to lambda calculus.
diakopter hoelzro: it'd be nice to know where those were allocated
(in the source)
cognominal masak, have you checked elm? It does RFP and generates websites without messing with html, dom and canvas elements elm-lang.org/ :)
Woodi masak: Either is impler then Maybe and Maybe is simplest ? I assume Either is monad too...
diakopter (whether directly from bytecode or indirectly from other bytecode in the runtime) 12:18
masak Woodi: no, Either is not a monad. 12:20
...I don't think so anyway.
dalek kudo-js: d2391c0 | (Pawel Murias)++ | runtime/ (2 files):
Mark delegation at compose time.
Woodi btw. on the Earth, how many we have ppls knowing Perl6 ? :) 12:23
diakopter 1
masak 0
diakopter -1
Woodi that's not good...
masak -Inf 12:24
Woodi I was estimating less then +10...
diakopter yeah, in unary
Woodi (mainly compilers writers) 12:25
diakopter oh cool beta.hackage.haskell.org/ 12:27
lizmat_ r: say {\01;42}
camelia rakudo c5ba78: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ at /tmp/RomqDcchmp:1␤ ------> say {\01⏏;42}␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ a…»
lizmat_ this currently eats all RAM / vdisk in method2sub
dalek kudo/method2sub: cfd148a | (Elizabeth Mattijsen)++ | src/Perl6/World.nqp:
Handle proper exceptions like they should
12:28
12:28 denisboyun joined
lizmat_ r: say "{\01;42}" 12:30
camelia rakudo c5ba78: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ at /tmp/N0UDcSfhpn:1␤ ------> say "{\01⏏;42}"␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ …»
12:31 cono left
lizmat_ hmmm… oddly enough it happens in the parse stage: 12:36
$ perl6 --stagestats -e 'say {\01;42}'
Stage start : 0.000
^C
12:37 fridim__ joined, xenoterracide left 12:38 ksh left
masak Woodi: surely you're insider enough to see that "knowing Perl6" is slightly ill-defined without a context. 12:39
Woodi: you could probably easily get TimToady to say he doesn't "know" Perl 6, and he's the prime candidate for knowing it.
lizmat_ further golf: 12:40
$ perl6 --stagestats -e '\00'
Stage start : 0.000
12:40 ksh joined
hoelzro diakopter: that's from htmlify.pl in the doc repo 12:41
I'm working on tweaking the profiler to properly label P6Opaques 12:42
Woodi masak: yes, quite stupid, reckless question. popularity is variable. but on the other hand Perl6 seems to be hard what is problematic and discouraging... 12:45
FROGGS lizmat_: it happens in the parsing stage because it is thrown by the grammar 12:46
12:46 lizmat_ is now known as lizmat
lizmat yes, but where ??? 12:46
12:47 xenoterracide joined
lizmat seems like \0 (only 0 ) folllowed by something else, with or without whitespace after the \0, eats all 12:47
diakopter maybe a bug in quant (nfa or otherwise) :) 12:48
well, probably not nfa.
FROGGS lizmat: have you checked HLL::Grammar in nqp? 12:50
lizmat no, not yet
FROGGS nqp: '\012'
camelia ( no output )
FROGGS r: '\012'
camelia ( no output )
FROGGS r: "\012"
camelia ( no output )
FROGGS r: say "\012" 12:51
camelia rakudo c5ba78: OUTPUT«␀12␤»
FROGGS r: say "\01"
camelia rakudo c5ba78: OUTPUT«␀1␤»
FROGGS r: say 01
camelia rakudo c5ba78: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ at /tmp/V8QXyzzh1S:1␤ ------> say 01⏏<EOL>␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ at…»
FROGGS nqp: 01
camelia ( no output )
FROGGS r: 01
camelia rakudo c5ba78: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ at /tmp/tU567Liomy:1␤ ------> 01⏏<EOL>␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ at /tm…»
FROGGS lizmat: rakudo/src/Perl6/Grammar.nqp:2747: <!!{ $/.CURSOR.worry("Leading 0 does not indicate octal in Perl 6; pl... 12:52
lizmat reverting changes I did World.nqp, just to be sure 12:53
12:54 xenoterracide left
lizmat changes I did to World are not the reason 12:58
diakopter bisect? 12:59
nqp: \\0 13:00
camelia nqp: OUTPUT«Confused at line 2, near "\\\\0"␤current instr.: 'panic' pc 14693 (src/stage2/gen/NQPHLL.pir:5223) (src/stage2/gen/NQPHLL.nqp:279)␤»
diakopter r: \\0
camelia ( no output )
diakopter r: \\00
camelia rakudo c5ba78: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at /tmp/q_A4w0UuRA:1␤ ------> \\00⏏<EOL>␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at /…»
diakopter r: \\0o0
camelia ( no output )
diakopter r: \00
camelia rakudo c5ba78: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at /tmp/AEjUGGMIYI:1␤ ------> \00⏏<EOL>␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at /t…»
diakopter r: eval('\00')
camelia rakudo c5ba78: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at eval_0:1␤ ------> \00⏏<EOL>␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at eval_0:1␤ …»
diakopter r: eval('\\00') 13:01
camelia rakudo c5ba78: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at eval_0:1␤ ------> \00⏏<EOL>␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at eval_0:1␤ …»
13:03 xenoterracide joined
lizmat ran it under gdb: gist.github.com/lizmat/6650426 13:03
GlitchMr I don't see a problem. 13:05
lizmat the only problem it has, is that it eats all of my 16G RAM in about 1 minute running 13:06
GlitchMr \ is capture operator.
lizmat could someone run the method2sub branch on a jakudo ? 13:07
diakopter lizmat: what about \(0)0 and \(00)
lizmat they also both hang
FROGGS lemme build that branch... 13:08
lizmat and eat all RAM
diakopter what about \(0)
lizmat now understands why the method to sub migration for {} and [] has been laying on the shelf for 1+ year
GlitchMr I personally would like a grammar without warning for 0 octal, but instead syntax error. 13:09
lizmat diakopter: doesn't hang
diakopter \(0)1 ?
lizmat hangs
diakopter \(0)a
lizmat hangs 13:10
masak GlitchMr: I like Perl 6. it fits the way I think when I program, even moreso than Perl 5.
diakopter hm, well, seems like backtracking that doesn't reach the base case
GlitchMr Well, warning is better than odd behavior in JS where 09 > 010. 13:11
And even odder behavior in PHP where 09 == 0.
diakopter what about \($_)a
lizmat sanity check: while parsing the grammar in nqp, it shouldn't access any of Perl6's multi subs for {} or [], or should they?
timotimo lizmat: have you considered *% where <= 0?
er, i mean
*% where * <= 0
13:11 SamuraiJack_ left
timotimo r: multi sub argh($foo, :$name) { say "with named" }; multi sub argh($foo, *% where * <= 0) { say "without named" }; argh("hi"); argh("hi", name => "me"); 13:12
camelia rakudo c5ba78: OUTPUT«with named␤with named␤»
lizmat timotimo: will try in a bit
timotimo >_<
diakopter lizmat: hrm, not sure
timotimo r: multi sub argh($foo, :$name, *% where * <= 0) { say "with named" }; multi sub argh($foo, *% where * <= 0) { say "without named" }; argh("hi"); argh("hi", name => "me");
camelia rakudo c5ba78: OUTPUT«with named␤with named␤»
GlitchMr r: subset Unsigned of Int where * > 0; sub something(Unsigned $value) { say $value }; something 1; something 2; something -3;
camelia rakudo c5ba78: OUTPUT«1␤2␤Constraint type check failed for parameter '$value'␤ in sub something at /tmp/YwOp6RMNbP:1␤ in block at /tmp/YwOp6RMNbP:1␤␤»
timotimo don't bother, it doesn't seem to work
lizmat ah, not working I see ?
timotimo :( 13:13
apologies for getting your hopes up
lizmat no pb
GlitchMr r: subset Unsigned of Int where {say "Condition!"; $_ > 0}; sub something(Unsigned $value) { say $value }; something 1; something 2; something -3;
camelia rakudo c5ba78: OUTPUT«Condition!␤1␤Condition!␤2␤Condition!␤Constraint type check failed for parameter '$value'␤ in sub something at /tmp/R7AOIY1mzi:1␤ in block at /tmp/R7AOIY1mzi:1␤␤»
timotimo i know how bad that feels, i do it to me all the time
lizmat timotimo: know the feeling 13:14
GlitchMr r: multi sub argh($foo, :$name!, *% where * <= 0) { say "with named" }; multi sub argh($foo, *% where * <= 0) { say "without named" }; argh("hi");
camelia rakudo c5ba78: OUTPUT«without named␤»
GlitchMr r: multi sub argh($foo, :$name!, *% where * <= 0) { say "with named" }; multi sub argh($foo, *% where * <= 0) { say "without named" }; argh("hi"); argh("hi", name => "me");
camelia rakudo c5ba78: OUTPUT«without named␤with named␤»
lizmat diakopter: rebuilding, one moment 13:15
GlitchMr: all named params *must* be optional
diakopter why
lizmat diakopter: \($_)a hangs 13:16
because the multi sub for simple {} and [] access, should be as simple as possible
diakopter what about ($_)a
lizmat also hangs
hmmm...
diakopter hunh.
lizmat #multi sub postcircumfix:<{ }>( \SELF, $key ) is rw { # NOT SELECTED 13:17
# SELF.at_key($key);
#}
now has become:
$delete & $exists & $kv & $p & $k & $v === $default
?? SELF.at_key($key)
13:17 xinming left
diakopter where's the !! 13:18
lizmat so for each "bare" {} access, we need to set up optional named parameters, and check them
!! SLICE_ONE( SELF, $key,
False, $delete, $exists, $kv, $p, $k, $v );
having to set these up, and then check them, is not good for performance :-) 13:19
diakopter a slurpy hash might be faster
lizmat diakopter: good point
diakopter (maybe) 13:20
lizmat hmmmm it seems to hang on a lot more 13:21
diakopter yeah it sounds like backtracking is generally busted 13:22
can you nopaste the branch diff?
or is on github I can see it? 13:23
*where
lizmat it's on github, in the method2sub branch
diakopter fancies I can code-read it
lizmat it's generally stupid and verbose code
timotimo that's the worst kind :( 13:24
lizmat trying to handle all the permutations of 6 named parameters, is kinda crazy
bit still very useful, I thnk
*but
*think
FROGGS froggs@TL02L-R8RXTCW-linux:~/dev/rakudo-jvm$ ./perl6 -e '\(0)'
froggs@TL02L-R8RXTCW-linux:~/dev/rakudo-jvm$ ./perl6 -e '\(0)0'
===SORRY!=== Error while compiling -e
lizmat: how do you get the hang?
lizmat perl6 -e '\01' # simplest case 13:25
FROGGS froggs@TL02L-R8RXTCW-linux:~/dev/rakudo-jvm$ ./perl6 -e '\01'
Potential difficulties:
Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that
timotimo lizmat: have you considered generating that code? >_< 13:26
lizmat timotimo: yes, but at a later point, when I really know what to generate
timotimo good point
diakopter timotimo: yes, at runtime with each invocation :) 13:27
lizmat the big problem with migrating this stuff from methods to subs
diakopter GIMME THE SPEEDZ
lizmat is that named parameters cannot be silently ignored
if necessary
and the method implementation depended on being able to do so 13:28
diakopter yeah, need to check each one and count the valid ones, and see if the total number of keys is greater
13:28 denisboyun left
timotimo diakopter: sounds great! 13:29
diakopter: that's just like jit, so it should be really fast!
perhaps have to write your own proto to do the heavy work with the nameds?
lizmat that also has come to mind 13:30
timotimo spectesting: "t/spec/S02-magicals/file_line.t" i read as "fine line"
%)
lizmat but I wanted to get something working the stupid way before getting smarter 13:31
diakopter don't cross it
lizmat r: sub a ($a) { say %_ }; a(:foo)
camelia rakudo c5ba78: OUTPUT«===SORRY!=== Error while compiling /tmp/4fIFVMgB1r␤Placeholder variable '%_' cannot override existing signature␤at /tmp/4fIFVMgB1r:1␤------> sub a ($a) { say %_ }⏏; a(:foo)␤ expecting any of:␤ postfix␤ state…»
lizmat r: sub a { say %_ }; a(:foo)
camelia rakudo c5ba78: OUTPUT«("foo" => Bool::True).hash␤»
timotimo .u thin line
yoleaux No characters found 13:32
timotimo .u thin
yoleaux U+2009 THIN SPACE [Zs] ( )
U+1F7A1 THIN GREEK CROSS [So] (🞡)
U+1F7A8 THIN SALTIRE [So] (🞨)
lizmat hmmm… what was the argument about %_ again? apparently, there is no %_ when there is a signature ?
diakopter r: sub a (*%_) { say %_ }; a(:foo)
camelia rakudo c5ba78: OUTPUT«("foo" => Bool::True).hash␤»
timotimo you can still get at it through a |c and some method on that i guess
13:32 xinming joined
timotimo r: sub a (|c) { say c.^methods }; c(foo => 1); 13:32
camelia rakudo c5ba78: OUTPUT«===SORRY!=== Error while compiling /tmp/mT2ucGMoWP␤Undeclared routine:␤ c used at line 1␤␤»
timotimo r: sub a (|$c) { say $c.^methods }; c(foo => 1);
camelia rakudo c5ba78: OUTPUT«Obsolete use of | or \ with sigil on param $c␤===SORRY!=== Error while compiling /tmp/sYAaJx8XyA␤Undeclared routine:␤ c used at line 1␤␤»
timotimo r: sub a (|$c) { say $c.^methods }; a(foo => 1);
%) 13:33
camelia rakudo c5ba78: OUTPUT«Obsolete use of | or \ with sigil on param $c␤BUILD at_key at_pos hash exists list elems Capture FLATTENABLE_LIST FLATTENABLE_HASH pairs values keys kv gist Str Bool Numeric perl␤»
timotimo r: sub a (|c) { say c.^methods }; a(foo => 1);
camelia rakudo c5ba78: OUTPUT«BUILD at_key at_pos hash exists list elems Capture FLATTENABLE_LIST FLATTENABLE_HASH pairs values keys kv gist Str Bool Numeric perl␤»
timotimo r: sub a (|c) { say c.hash.perl }; a(1, 2, 3, foo => 1, bar => 2);
camelia rakudo c5ba78: OUTPUT«EnumMap.new("foo", 1, "bar", 2, )␤»
timotimo perfect
diakopter hehhe
timotimo EnumMap, it's even a super low-level efficient superhash
lizmat r: sub a (|c) { say c.hash.perl }; a(1, 2, 3, {} => 1, bar => 2); 13:34
camelia rakudo c5ba78: OUTPUT«EnumMap.new("bar", 2, )␤»
lizmat r: sub a (|c) { say c.hash.perl }; a(1, 2, 3, Exception.new => 1, bar => 2);
camelia rakudo c5ba78: OUTPUT«EnumMap.new("bar", 2, )␤»
timotimo haha, nice 13:35
lizmat only if the keys are strings :-(
timotimo .o( what, like in a piano? ) 13:36
diakopter forte.
13:43 EvanTeitelman left
timotimo QAST::SpecialArg - what is this thing o_O 13:43
ah, it would appear that this is where you put a :named?
FROGGS yes 13:44
it gets mixed in, to provide the .named AFAIR
get*
timotimo good to know 13:47
i'm revisiting my lexical-to-local branch for nqp
it breaks stuff still 13:48
annoyingly, it breaks stuff in the rakudo spectest suite, not during compilation of nqp or rakudo 13:49
lizmat diakopter: on second thought, I probably don't want to use a slurpy hash 13:50
using hashes inside has accesses has something creepy and fragile about it
*hash accesses
diakopter
.oO( what if you could force p5 behavior of args )
13:51
timotimo oh, i may not be looking for lexpad operations 13:52
that must be it
hm, wait 13:55
there was something about Stmts and making temporaries not last after they get executed
does that refer to Vars with :decl<local>?
no, that wouldn't make sense ... but it may be true stil ...? 13:56
lizmat timotimo: no idea
timotimo is there an nqp op to clear out a hash? 14:02
diakopter no, but you could probably make set_elems a special case for 0.. and throw on all other inputs 14:04
timotimo class Optimizer { has $!stared_into_the_abyss; ... }
has $!abandoned_all_hope;? has $!lost_all_will_to_live;? 14:05
has $!flipped_the_table; 14:06
has $no_chance_to_survive := "make your time" # hahahaha
14:08 rindolf left 14:13 SamuraiJack_ joined
timotimo oh, i think i remember now that it was problematic to not have "is dynamic" because of the usages of [get/set]lex[dyn/caller/outer][_[i/n/s]]? 14:18
14:21 benabik left
lizmat ok, small summary: 14:31
1. method2sub branch hangs on the simplest code in the parsing stage, at least on parakudo
such as '\01', or 'sub a ()' 14:32
diakopter suggest backtracking is borked
timotimo but backtracking surely doesn't depend on the core setting? 14:33
lizmat that would be my thought also
timotimo well, i've currently commented out most of my optimizer code and get a build failure due to "missing dependency" in nqp
masak oh btw -- I was wrong earlier: Either is a monad.
knowing that, I think it ties with Maybe in simplicity. 14:34
timotimo okay, i found the culprit, but it doesn't make sense to me.
lizmat fact is that before I refactored the sub calls to the one candidate with all possible named params
I could run the spectest without it blowing up
timotimo but that doesn't make sense! :o 14:35
lizmat indeed… that's why I'm wrecking my braine
timotimo if $op.op ~~ /[get|set]lex[dyn|caller|rel]*['_'[i|n|s]]?/ { $!no_grasp_on_lexicals := 1; say("mumble mumble"); } <- how can this cause my whole program to blow up in a weird way? 14:36
lizmat verifying that the last sane commit was 23e9d5187082dbf425f70633fe7cf37600df8c88
timotimo what's the obvious thing i'm not seeing? 14:38
14:38 risou_awy is now known as risou
timotimo apparently it's enough to have the if9~. 14:40
does the ~~ operator do crazy things except set $/?
hm, does nqp::ctx give me access to lexicals, too? 14:41
14:42 REPLeffect left
dalek kudo-js: b31c2f9 | (Pawel Murias)++ | / (2 files):
Some support for eval etc.
14:43
kudo-js: dab0fa0 | (Pawel Murias)++ | runtime.js:
Convert arguments to split to strings.

This fixes test 80 on standalone nqp.
pmurias timotimo: and how do you detect contextuals? 14:44
14:44 thou joined, benabik joined
lizmat 23e9d5187082dbf425f70633fe7cf37600df8c88 was the last sane commit 14:45
timotimo pmurias: i hope they have the * in their name
pmurias there is also $/ 14:46
timotimo also, :scope('contextual')
$/ is specialcased, as is $_
and everything with a * or ? sigil for good measure
pmurias isn't :scope('contextual') currently only on access?
timotimo i'm looking at all accesses, so that's fine. i just have to detect it and abort the transform in that case 14:47
oorrrrrr
a five-screen-lines || causes the compilation to not break
what am i doing wrong >:(
14:47 denis_boyun joined
timotimo oh, also these contextuals seem to always be VarWithFallback and i ignore these (oh could that be what i'm doing wrong?) 14:49
they are not always.
pmurias hoopl uses something called optimalisation fuel to debug incorrect transforms 14:50
if you have the abilty to limit the number of transform to $n, you can binary search the incorrect one
timotimo interesting 14:51
pmurias blog.ezyang.com/2011/06/debugging-c...tion-fuel/
benabik Hoopl is pretty awesome. 14:52
(Or at least seems that way conceptually, I've never used it.)
14:53 thou left
lizmat 2: tried changing the order of the candidates, no change 14:53
3. tried having the original methods around as well (in case we missed a code generation part), no change
4. tried having the useless sub candidates around, no change 14:54
timotimo the point is: this is not an optimizer thing 14:55
i turned off the optimization i added
this is purely breaking the code by putting a regex match in
is there another way to word a regex match in nqp? 14:57
15:02 raiph joined, rindolf joined
lizmat 5: tried making at least 1 candidate with an obligatory named parameter, no change 15:03
lizmat is done with it for now
timotimo :( 15:04
i'm about to give up for now as well
lizmat .tell jnthn please have a look at the method2sub branch and tell me why this makes perl6 -e '\01' hang on parakudo and eat all memory
yoleaux lizmat: I'll pass your message to jnthn.
timotimo you're not infinitely recursing, are you? 15:05
i should probably just look at the code instead of guessing blindly
lizmat timotimo: that could well be
but I have no idea where that would be and how changing multi subs for {} and [] would make that happen
please note, this is happening in the *parse* stage
timotimo oh
you changed the exception stuff
have you considered reverting that commit temporarily? 15:06
it could be it's trying to throw an exception and infinicursing that way
15:06 ksh left
lizmat I'm pretty sure I did that, but I will do that again 15:06
just to make sure
timotimo where do i find the definition of $default? 15:07
lizmat in Any.pm, it's just a secret to determine whether a named parameter was passed or not
timotimo OK
lizmat $default = []; 15:08
timotimo found it
15:08 ksh joined
lizmat wishes there was a better way to determine whether a named parameter was passed 15:09
timotimo yeah, |c 15:11
is the only acceptable way i can think of
masak anyone remember where the spec talks about the rules of multi dispatch? 15:13
lizmat: what would be your suggested way to determine it? 15:14
lizmat: and (more importantly), would it carry its own weight compared to $optional = DEFAULT ?
TimToady S12:1161
synopsebot Link: perlcabal.org/syn/S12.html#line_1161
masak TimToady: thank you.
lizmat 6: reverted the exception handler changes, no change 15:15
timotimo i seem to be breaking tests in 01-qast.t
masak I find nothing there that makes lizmat's finding not a bug. 15:16
15:16 SamuraiJack__ joined
lizmat well, then niecza has a bug :-) 15:16
timotimo ... huh? 15:17
did you miss one of the two negations?
masak rn: multi x($a) { say "right" }; multi x($a, :$x) { say "wrong" }; x(5)
camelia niecza v24-95-ga6d4c5f: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/394ENwm7ty line 1:␤------> multi x(⏏$a) { say "right" }; multi x($a, :$x) { ␤ $x is declared but not used at /tmp/394ENwm7ty line 1:␤------> lti x($a) { say "right" …»
..rakudo c5ba78: OUTPUT«wrong␤»
masak n: multi x($) { say "right" }; multi x($, :$x) { say "wrong" }; x(5)
dalek kudo/method2sub: a819151 | (Elizabeth Mattijsen)++ | src/Perl6/World.nqp:
Return exception handler to original state to reduce noise
camelia niecza v24-95-ga6d4c5f: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/U8Lc7dxy_X line 1:␤------> multi x($) { say "right" }; multi x($, :⏏$x) { say "wrong" }; x(5)␤␤right␤»
masak lizmat, timotimo: both of you read me wrong :) 15:18
I think it *is* a bug (in Rakudo(.
lizmat not not!
timotimo that's what i thought
masak s:2nd/'('/)/
timotimo and there's no bug in niecza, right?
masak right.
masak submits rakudobug
timotimo i think i read you right in that case
lizmat is alreafy one
15:18 SamuraiJack_ left
masak oh, good. 15:18
lizmat #119929
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=119929
masak synopsebot: you're a synopsebot, not an RTbot! 15:19
timotimo welp, i can already tell that the "optimization" didn't change parse time in rakudo.
lizmat tadzik++ hacked that into synopsebot :-) 15:20
does anybody see how my changes to {} and [] handling can have such a profound influence on *parsing* ?? 15:22
15:22 EvanTeitelman joined
lizmat 7. it *does* seem to occur whenever we have any type of warning or error during parsing 15:22
r: sub a () # hangs 15:23
camelia rakudo c5ba78: OUTPUT«===SORRY!=== Error while compiling /tmp/xevCOMJisx␤Missing block␤at /tmp/xevCOMJisx:1␤------> sub a () # hangs⏏<EOL>␤ expecting any of:␤ statement list␤ prefix or term␤ prefix or meta-prefix␤ …»
lizmat r: sub a () {} # does not hang
camelia ( no output )
lizmat r: \01
camelia rakudo c5ba78: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ at /tmp/HJ2OgWWcmy:1␤ ------> \01⏏<EOL>␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ at /t…»
TimToady r: \xCAFE 15:27
camelia rakudo c5ba78: OUTPUT«===SORRY!=== Error while compiling /tmp/w56Ip_ryMp␤Undeclared routine:␤ xCAFE used at line 1␤␤»
TimToady lizmat: note that your \ has nothing whatsoever to do with the 01
\0 is meaningful only inside quotes and such 15:28
lizmat TimToady: it's the shortest way to create an error, yes,
TimToady r: 01
camelia rakudo c5ba78: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ at /tmp/8iAKicTwMU:1␤ ------> 01⏏<EOL>␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that␤ at /tm…»
TimToady that's shorter
lizmat it's how I found the problem originally
indeed, '01' is shorter :-)
15:28 denis_boyun left
timotimo why can't i have a variable named by the nullbyte? :( 15:29
lizmat r: a
timotimo perl6 limits me in my creative expression
camelia rakudo c5ba78: OUTPUT«===SORRY!=== Error while compiling /tmp/MY6kkTp_rK␤Undeclared routine:␤ a used at line 1␤␤»
lizmat oddly enough, this does *not* hang
but that's *after* parsing
timotimo right because subs are late-found 15:30
ah, at least some of the fails i'm getting is due to extra output during compilation 15:31
not ok 10 - multiple anonymous variables do not warn or err out
# got out: "# trial bind worked!\n# trial bind worked!\nalive\n"
TimToady reverts from random sniping mode to backlog mode... 15:33
timotimo huh, a column chock full of "ok" 15:38
i was expecting at least one "you are a failure and you should be ashamed of yourself"
TimToady (via Need Moar Caffeine mode)
15:39 btyler joined
FROGGS activates his MoarCM too 15:40
colomon has that blue Mountain Dew in the kitchen, but soooo shouldn't drink it. 15:41
timotimo All tests successful. - i must have accidentally turned my optimization off somehow %) 15:46
15:46 denis_boyun joined
timotimo (maybe because i instantly bail out if i see anything with lex/dyn/whatevs in its name) 15:47
lizmat method2sub theory: during parsing, whenever an exception is built, we go to Perl6 space with an exception object: somehow during the creation of that, something goes wrong. causing a new exception, etc. etc. ad infinitum 15:51
pmurias timotimo: re avoiding ~~ you could use NQPCursor.parse($target, :rule($rule), :c(0)) 15:52
lizmat this probably bypasses the stack logic, otherwise we would have a recursion too deep error
timotimo what does :c(0) do?
lizmat or maybe we have
but we never see that either
timotimo: c => 0 ?
same as :!c 15:53
timotimo lizmat: very helpful thanks ... not ;)
lizmat logically speaking
timotimo i wondered what the c parameter to NQPCursor.parse means
lizmat ah, ok
sorry, missed context
timotimo :)
lizmat steps away from the keyboard before inventing perl like TimToady did 15:54
timotimo that is by letting your head fall onto the keyboard, right? 15:55
masak "what is that, swearing?" :P 15:56
timotimo "i need a way to swear at my computer and be understood"
geekosaur fully expects there is an esolang composed entirely of swear words
timotimo cf negative numbers in shakespeare
15:58 ajr joined, ajr is now known as Guest38353
timotimo d'oh 15:59
i think i know what i'm doing wrong
i think i'm trying to use regex before my nqp has any idea what those are
wow, that sucks
15:59 Guest38353 is now known as ajr_ 16:01 Guest60186 joined
timotimo nqp: say(nqp::index("lex", "getlexdyn")) 16:01
camelia nqp: OUTPUT«-1␤»
timotimo nqp: say(nqp::index("l", "getlexdyn"))
camelia nqp: OUTPUT«-1␤»
timotimo huh.
that's probably for lists? 16:02
oh, no, it's just the other way around
nqp: say(nqp::index("getlexdyn", "lex"))
camelia nqp: OUTPUT«3␤»
timotimo it's a start. 16:03
arnsholt timotimo: That sounds weird. What kind of stuff are you working on? 16:06
timotimo optimizer 16:07
whenever i put any kind of regex into the code i get "oh no you don't has nqp-mo :( :( :("
pmurias it seems wierd 16:08
btyler did some log perusing: RE setting up VMs to try p6 with: it'd be pretty easy to set up vagrant boxes with everything pre-installed, just need to keep them up to date. native install packages are better for most cases though, I imagine
arnsholt Yeah, that sounds really weird. What kind of error do you get?
(Oh, and is it NQP optimiser or Rakudo optimiser?) 16:10
timotimo nqp optimiser
pmurias timotimo: could you paste the error? 16:12
arnsholt Yeah, that'd be great
timotimo Missing or wrong version of dependency 'src/stage1/gen/nqp-mo.nqp' 16:13
current instr.: '' pc 17537 (src/stage2/gen/nqp-mo.pir:7937) (src/stage2/gen/nqp-mo.nqp:1625)
when building src/stage2/gen/NQPP5QRegex.nqp
arnsholt Weird. I wouldn't really expect circularity issues while you're in the optimiser
16:14 logie left
arnsholt Maybe it's getting confused about where to get the regex things from 16:14
pmurias isn't it a build issue?
arnsholt What do you mean? 16:15
pmurias that somehow modules that depend on different versions of the same file have been used together 16:17
if B and C depend on A and you build them in the order B,A,C you get that error 16:18
timotimo okay, time to try to do some benchmarks i guess
arnsholt pmurias: Oh, in that sense
Maybe the optimiser is getting built before the regex things are done? 16:19
16:20 denis_boyun left
arnsholt timotimo: That might be worth trying. Try putting Optimizer.nqp last in the list of NQP_SOURCES 16:21
timotimo later.
arnsholt If that fails, I think the only advice I have left is to pester jnthn once he's back =) 16:22
timotimo .o( if you have a crucial m4 ssd in any of your devices, get the latest smartmontools and see if smartctl -a will output a big fat warning) 16:34
dalek p/r-lex-to-local: ecb8e5e | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
try to turn lexicals into locals.
16:39
p/r-lex-to-local: d2a8131 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
first version to pass rakudo spectests
timotimo mhh. perl6-bench still fails due to shell thingie 16:43
dylanwh a 16:45
silly phone keyboards. 16:46
timotimo perl6bench is somehow severely damaged 16:48
16:51 Rotwang1 joined
timotimo r: say cwd; 16:52
camelia rakudo c5ba78: OUTPUT«IO::Path</home/p6eval>␤»
17:10 lizmat left 17:11 lizmat joined 17:13 zakharyas joined 17:14 mtk joined
dalek p: 6bf0985 | (Pawel Murias)++ | t/nqp/55-multi-method.t:
Use ok(...) in test.
17:14
17:15 spider-mario left 17:16 spider-mario joined 17:20 logie joined, spider-mario_ joined 17:22 spider-mario left 17:25 logie left 17:26 krokite joined
masak re the previous discussion today: Perl 6 is generally very good at refactoring stuff from one "shape" to another. it seems to me that from this viewpoint, the jump from an array/hash/lambdas shape of some data to an object shape of same data is unnecessarily long. 17:28
and I'm currently mulling over how to shorten it.
17:29 spider-mario_ is now known as spider-mario
dalek kudo/method2sub: f51a00b | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Copy/paste candidates with one different required named param for selection
17:41
lizmat this should at least make the simple {} and [] access select the simple, positional only candidate 17:42
masak at its very smallest, a class/type simply puts a name to a recurring data structure. 17:44
allowing you to more easily attach behavior to that class/type, etc.
benabik If you have a hash with the same attributes as a class C, you can do C.new(|%hash). Going the other way is less convenient, I think 17:47
17:47 [Sno]_ joined
masak going the other way is less important. 17:47
it's more common to impose structure than to de-impose it.
17:48 [Sno] left, [Sno]_ is now known as [Sno]
benabik .WHAT reflection should make it easy enough to create a general public attributes to hash function if needed. 17:49
lambda to method conversion is more difficult because the code would be different in each case. 17:50
17:51 Rotwang1 left, spider-mario left, spider-mario joined 17:53 zakharyas left
masak yeah; I'm still not sure how lambdas fit into the bigger picture. 17:55
not so sure they should be converted to methods.
17:56 spider-mario left
masak an object attribute could contain a lambda, too. 17:56
17:56 xenoterracide left 17:59 spider-mario joined 18:02 wk joined 18:04 wk left 18:07 denysonique left, Rotwang1 joined, Rotwang1 left
Ulti whiccd .. 18:13
pmurias ?
geekosaur miswindow, I think 18:20
pmurias seems so 18:23
18:23 rindolf left
timotimo run seems to be b0rked WRT cwd 18:25
we are in: /home/timo/build/perl6-bench/components/niecza 18:26
Cloning into bare repository 'niecza.git'...
but the niecza.git folder appears in /home/timo/build/perl6-bench/, which is the CWD of the perl6 interpreter
timotimo trolls the program by running it from components/
sadly i'm not able to just replace the folders in the command with a full name, because there's also a git fetch in there that (except for changing the GIT_DIR env var or something) requires the pwd to be correct 18:27
is the "emulate a CWD" code part of only non-parrot? 18:28
because the parrot version of run doesn't have the $*CWD i nit
gtodd pmurias: ++ blogging about the GSoC stuff you;re doing 18:31
pmurias gtodd: you mean I should blog more?
timotimo aparently that is so. 18:32
gtodd hehe 18:35
well do the GSoC stuff and blog about it when you can :)
18:36 darutoko left
timotimo can this get into the rakudo star release? a hotfix for rakudo? 18:37
18:38 denysonique joined
timotimo shall build a test 18:38
FROGGS: are you awake & available? 18:43
FROGGS yes yes, whats up?
timotimo i need a short test for roast that will run a subprocess on windows that checks if the last piece of the path is "t" 18:44
on linux it'd look somewhat like run "pwd"
can you tell me what return value { run "pwd" } on windows will give me, so that i can try linux first and then windows? 18:45
hm, it's probably better to check for $*OS instead
oh, hold on, run won't give me the output 18:46
i need QX instead i think, but how do i test if run runs in the right CWD as well?
FROGGS timotimo: cd does that for windows 18:47
timotimo how about i try to run cd ../t/ to verify i'm in t (and hope that ../t/ doesn't exist for the rakudo directory ...)
you know what. i'm not going to write a test, this is crazy. 18:48
i'm not a sufficient rocketbrain
at least i fixed it. 18:49
how bad would it be to only return the return code from run instead of having the "return code but boolean" thing? 18:50
because that still blows up horribly
FROGGS I think you an be sure to be in the right 't' if you are in 't' and there is a 'spec'
it only returns the exit code, no? 18:51
timotimo currently it returns the exit code, mixes in a bool and crashes parrot if you do it more than a couple of times
FROGGS it should return a ProcessState objet though
wait
timotimo we don't have that yet
gist.github.com/timo/65fed23aaf44b9ebd4e1 - please merge this into nom and release a hotfix release?
FROGGS ahh 18:52
timotimo masak: ^
FROGGS I was thinking about shell()
timotimo shell may need that fix as well
nope, that doesn't need a fix
masak timotimo: waitwaitwait. I'm not backlogged. what caused this and why should we release a hotfix release? 18:57
and when did I volunteer for that? :)
timotimo hehe.
this is a regression from when we changed over to $*CWD instead of nqp::chdir
the parrot version of run and qx didn't know anything about $*CWD
masak why does it merit a hotfix release?
timotimo so everything you execute with run and qx on parrot will run in the cwd you started it in 18:58
masak why didn't the spectests catch this?
timotimo there are no tests for this, and it turns out that writing one is hairy
masak seems retroactively we needed one, though. :)
timotimo yes indeed
you have to write a bit of stuff to run that gives you "i changed my directory" via the *return code*
i know nowhere near enough shell and even less windows batch file stuff to make that happen 18:59
it's much easier to do for qx, though, and i'll do that real soon™
hotfix release is a good idea because R* isn't released yet
masak just shell into perl6 and check the current directory?
sounds easy to me :)
timotimo oh, that's an interesting way to do it
masak first one that occurred to me :) 19:00
timotimo can we be guaranteed that "perl6" or "perl6.exe" will give us a correct perl6?
also, i wasn't able to run perl6-bench
masak I think there are already tests that do this.
timotimo Test::Util probably has something? 19:01
huh, why doesn't that work? 19:04
is_run('say cwd', { out=>"/home/timo/build/rakudo/t/spec/" }) - that should work? 19:05
no use, that uses shell. 19:06
masak and why doesn't using shell work?
FROGGS this gets $*CWD.Str as an arg 19:07
timotimo because shell already works
the trouble is in qx and run.
masak I say if there's to be a hotfix release, there should also be a new passing test that fails on the previous release.
timotimo testing run by using shell instead don't get you nowhere :) 19:08
GlitchMr github.com/perl6/specs/commit/7103...32853b4af2 19:09
Different? Does that mean "eqv", "~~", "===", or perhaps something else?
timotimo FROGGS: i think i need your help :| 19:10
i need to hotfix my SSD 19:11
GlitchMr rn: my @array is default(42) = 42, 42, 42; say @array[1]:exists ?? "Yes" !! "No"; 19:12
camelia rakudo c5ba78: OUTPUT«Yes␤»
..niecza v24-95-ga6d4c5f: OUTPUT«===SORRY!===␤␤Trait default not available on variables at /tmp/HuAvzEuqkx line 1:␤------> my @array is default(42) ⏏= 42, 42, 42; say @array[1]:exists ?? "Y␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niec…»
GlitchMr rn: my @array is default(42) = 42, 42, 42; say @array[3]; say @array[1]:exists ?? "Yes" !! "No"; 19:13
camelia rakudo c5ba78: OUTPUT«42␤Yes␤»
..niecza v24-95-ga6d4c5f: OUTPUT«===SORRY!===␤␤Trait default not available on variables at /tmp/Xos4yQL2BS line 1:␤------> my @array is default(42) ⏏= 42, 42, 42; say @array[3]; say @array[␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niec…»
timotimo "i need to hotfix my SSD, while you please come up with tests" ;) 19:14
GlitchMr Also, interesting, a day when I simply cannot put huge changelog. 19:16
timotimo saved myself from death and destruction 19:18
19:23 xenoterracide joined
timotimo put a hug changelog instead? 19:44
FROGGS timotimo: sorry, was away... what needs testing now?
timotimo run and qx need to get a test that shows that they are affected by chdir
19:45 xenoterracide left
FROGGS k 19:45
$ perl6 -e 'use Test; chdir ".."; ok(qx{pwd} ne BEGIN qx{pwd})' 19:47
not ok 1 -
timotimo: what about that?
timotimo cool
that works on windows? o_O
FROGGS no, we'd use qx{cd} there 19:48
timotimo ah, great
now do it with run, too? :)
FROGGS hmmm 19:49
timotimo GlitchMr: the < > from <( )> got mangled in your blog or at least in my feed reader 20:02
GlitchMr Huh? I just checked. < is properly encoded as &amp;lt; in RSS. 20:04
timotimo it's definitely broken on your site.
GlitchMr Where? 20:05
timotimo <span class="str">/ [ ( something ) ]* /</span>
GlitchMr <span class="str"> should be added client-side.
timotimo yes, but this is about [ <( something )> ]*
20:06 logie joined
GlitchMr Everything looks fine. 20:06
Oh.
timotimo now you see it! :)
GlitchMr Should be fixed after GitHub updates static HTML 20:07
timotimo yes, there it is 20:09
FROGGS damnit, why does run("cd t") doesnt work?
timotimo because run spawns a subprocess
oh, no
because run expects you to split the arguments 20:10
FROGGS ohh
$ perl6 -e 'say run("cd", "t")' 20:11
255
:/
why?
timotimo i think you want run(["cd", "t"]) instead?
FROGGS no 20:12
timotimo huh.
FROGGS the problem is it doesnt know about cd there O.o
timotimo on windows, 255 is success?
FROGGS I'm on linux atm
timotimo you need to call cmd.exe and pass cd t as its command?
oh, right
FROGGS I guess it is a shell built-in, and this shell doesnt know about it
timotimo oh crap 20:13
i need to compile my rakudo locally before i can help you
FROGGS froggs@TL02L-R8RXTCW-linux:~/dev/rakudo$ perl6 -e 'say run("which", "dir")'
/bin/dir
0
for "cd" there is no output but error code 1 20:14
timotimo huh. i get no output and return code 0 for a bare cd
FROGGS ahh, now I know 20:15
weird
$ perl6 -e 'use Test; chdir "t"; ok(run("dir", "t") != BEGIN run("dir", "t"))' 20:16
00-parrot 01-sanity 02-rakudo fudgeandrun harness spec spectest.data
not ok 1 -
this should be windows-safe too
timotimo is != really right?
FROGGS run returns the exit code
timotimo oh, of course 20:17
20:18 SamuraiJack__ left
FROGGS is there a test file where we should add this to? 20:18
timotimo probably somewhere in S32-io/
either chdir.t or somewhere else 20:19
FROGGS k
I'll add it and test it on my boxes
20:21 SamuraiJack__ joined 20:27 benabik left
dalek ast: 84d6493 | (Tobias Leich)++ | S29-os/system.t:
added tests that qqx/qx/run are affected by chdir()
20:35
FROGGS testing on windows in a sec 20:36
timotimo thank you so much :) 20:40
FROGGS :o) 20:42
pleasure
timotimo the benchmarks show 0 change with my lexical to local transformation 20:45
maybe it aborts too often, or maybe it just doesn't make a darn difference whatsoever 20:46
20:46 spider-mario left
FROGGS :( 20:46
20:48 ssutch joined 20:50 SmokeMac_ joined 20:51 SmokeMachine left
FROGGS timotimo: qqx/qx seems to behave on windows like on linux, but run() seems to be borken... 20:51
hmmm 20:52
gah, I an run perl6 itself, but no built-ins -.-
timotimo :o 20:53
hm, but how can qx work if it doesn't chdir? 20:55
20:55 SamuraiJack__ left
FROGGS C:\rakudo>perl6 -e "say run('cmd', '/c', 'dir')" 20:55
Der Befehl ""dir " ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
20:55 ajr_ left
FROGGS timotimo: qqx it fails correctly 20:56
timotimo oh you mean the test successfully shows that it's broken
FROGGS but run() passes, because both fail
yes
timotimo right. we need an extra piece of predicate in that
FROGGS and run() itself need to be fixed in parrot or nqp I guess 20:58
timotimo see my patch above 20:59
FROGGS you mean the gist? 21:00
timotimo yes
that fixes run and qx
FROGGS I meant this:
<FROGGS> C:\rakudo>perl6 -e "say run('cmd', '/c', 'dir')"
<FROGGS> Der Befehl ""dir " ist entweder falsch geschrieben oder
timotimo oh
well .... i have no clue what that is all about :(
maybe you can use something different from dir?
FROGGS hmm?
timotimo something that's not a cmd builtin
FROGGS that is why I invoke cmd /c 21:01
this can execute its built-in
(if it gets the args correctly)
timotimo but apparently that doesn't work
also what's with q{""dir "}
FROGGS I guess this is how nqp/parrot assembles the passed argument 21:04
timotimo wtf :\
FROGGS k, patching now on linux and windows... 21:05
timotimo the list is passed directly to pir::spawnw__IP
FROGGS right
maybe we can emulate it, like it is done for shell
timotimo where does nqp_shell lead? (that's what's registered for nqp::shell in Operations on parrot) 21:07
ah, there it is
it just does Run_OS_Command
i think that's what spawnw also does
FROGGS yeah, I thought so too
passes on linux now 21:10
my windows box still thinks about how all that bytecode should go into its files... 21:11
timotimo %)
21:15 PacoAir left
FROGGS okay, looks good 21:16
timotimo: are you going to pull-request that or should I commit it?
timotimo it would be lovely if you could commit it for me 21:17
FROGGS k
21:18 bruges left
dalek kudo/nom: 776f189 | (Tobias Leich)++ | src/core/control.pm:
hotfix by timotimo++ for qx/run when chdir-ing
21:18
pmurias timotimo: nqp::shell is different from pir::spawnw__IP 21:19
timotimo yes, but it uses it internally 21:20
iirc
pmurias no
it does not
timotimo oh
whoops
pmurias we have our own version of Run_OS_Command that passes env variables 21:21
21:23 Mouq joined
FROGGS pmurias: an we use that for run() ? 21:23
21:25 benabik joined
pmurias FROGGS: didn't you do the change rakudo do use nqp::shell on parrot part? 21:29
FROGGS pmurias: not that I remember
maybe donaldh? 21:30
pmurias FROGGS: I think we use our custom Run_OS_Command only for running shell commands
FROGGS yeah, I think so too, but the question is: could we use it for run() too? 21:31
because this needs fixing
pmurias with slight modification yes
FROGGS that is what I wanted to hear *g*
pmurias we would need to stop hardcoding /bin/sh 21:32
FROGGS the only difference is that run() takes a list while shell() does not? 21:35
masak FROGGS: the underlying reason had something to do with safe shell quoting, IIRC. 21:36
maybe go back in the spec logs and check?
FROGGS O.o
pmurias FROGGS: hmm, execlvpe which takes both an env paramater and a array of arguments seems to be a GNU extension :/ 21:41
FROGGS damn, and it is not that easy on windows too
msdn.microsoft.com/en-us/library/wi...85%29.aspx
benabik You can use execve and do the path lookup manually. :-/ 21:42
21:43 zakharyas joined
timotimo not quite so hot, the fix :( 21:45
FROGGS well, this is another unrelated issue
benabik But "slightly chilled fix" doesn't have the same ring. 21:46
timotimo FROGGS: if you had used git am with the file i gave you, you would have gotten the original commit i made ;)
benabik pmurias: Doesn't execlvpe take variable number of parameters as the arguments? execvpe would take an array.
FROGGS timotimo: well, your patch was somehow invalid :o) (the second chunk) 21:51
timotimo how? :( 21:52
i made it with git format-patch
oh well, thanks for making it work then :) 21:53
pmurias benabik: meant execvpe 21:54
21:55 benabik left
pmurias FROGGS: we could do it the brute way, and set the env variables to the one for the call, and then restore the old ones 21:57
(I do it that way on nqp-js)
FROGGS pmurias: it is not about the env, it is about how parrot is passing the args itself 21:59
perl6 -e "say run('cmd', '/c', 'dir')" # 'dir' ends up as '"dir ' on windows 22:00
pmurias :/ 22:08
22:13 zakharyas left 22:14 raiph left 22:37 pmurias left 22:45 amkrankruleuen left 22:46 haagenti joined, haagenti left, amkrankruleuen joined 22:47 amkrankruleuen left, amkrankruleuen joined 22:48 FROGGS left 22:51 amkrankruleuen left 22:57 dmol left 23:01 amkrankruleuen joined
jercos r: sub dieroll(Str $dice where /^ \d+ 'd' \d+ $/) {(1..+$1).roll(+$0)};dieroll("2d6").perl.say 23:05
camelia rakudo 776f18: OUTPUT«use of uninitialized value of type Any in numeric context in sub dieroll at /tmp/BGBp2S2wDz:1␤␤use of uninitialized value of type Any in numeric context in sub dieroll at /tmp/BGBp2S2wDz:1␤␤().list␤»
jercos erm.
r: sub dieroll(Str $dice where /^ (\d+) 'd' (\d+) $/) {(1..+$1).roll(+$0)};dieroll("2d6").perl.say
camelia rakudo 776f18: OUTPUT«(1, 5).list␤»
jercos That's what I thought, but... 23:06
oh, derp, made the same mistake on my end
jercos shows himself out
timotimo :) 23:07
next step: give the nqp optimizer a off flag
an* 23:08
23:10 btyler left 23:16 rhr left 23:38 BenGoldberg joined
masak 'night, #perl6 23:48
colomon \o 23:50
dalek rl6-roast-data: 2cf4570 | coke++ | / (3 files):
today (automated commit)
23:54