»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend!
Set by sorear on 23 June 2013.
dalek : fd763ab | (Timo Paulssen)++ | misc/camelia. (2 files):
reinstate camelia's lipstick
00:00
timotimo TimToady: the pdf looks strange when zoomed in
facepalm. 00:03
sorear um
the new camelia sure looks different 00:04
timotimo yes, inkscape helpfully selected "selection" for export 00:05
dalek : a92daa4 | (Timo Paulssen)++ | misc/camelia. (2 files):
reinstate camelia's lipstick
timotimo i hope you don't mind my diverged force-commit
maybe i'll do it again and make it the same size as before, too ... 00:06
sorear ah, and you dealt with her cracked lips too 00:07
timotimo cracked *everything*
dalek : 3faf5b7 | (Timo Paulssen)++ | misc/camelia. (2 files):
reinstate camelia's lipstick
timotimo i'm not sure why i added a pngfile in the previous commit that had cracked everything, too 00:11
i must have confused my paths
sorear it's, um, still not the same size 00:13
timotimo oh? 00:14
excuse my incessant failing
i'll nuke the previous commit along with this one then. 00:15
dalek : a055286 | (Timo Paulssen)++ | misc/camelia. (5 files):
rework camelia.svg, create .png, .odg and delete .jpg, .pdf
00:16
timotimo please be correct, please be correct, please be correct ...
flussence okay, the PNG is a clear improvement over the jpg now. 00:22
flussence (it's also convenient that page up/down on that diff page places them in exactly the same position on my screen...) 00:22
timotimo :D 00:23
timotimo i'm discussing with a friend: ways to make an io-incapable evalserver for secure running of stuffs 00:55
flussence libseccomp if you're on linux - blocks operations at the syscall level 00:56
timotimo can i threads with that? 00:58
or do i have to fork?
i don't think i can even fork on the jvm
flussence IIRC it applies to whatever process it's initially used in and anything that spawns 00:59
timotimo apparently i can turn on the classloader to make all java.io and java.nio loaded classes dumb stubs 01:00
flussence that might work, seccomp would work better if you're really paranoid though since it's an in-kernel thing :) 01:01
the java way is probably far less effort to actually get working though...
timotimo may very well be 01:08
especially since i'd want to let clients connect while the server is running
and not start a fresh eval worker for each client 01:09
sorear why not eval on the client? 01:12
timotimo because 1) java applets apparently need to die in a fire and 2) i want to offer something like try.rakudo.org which would hopefully work without "installing" anything 01:13
and we don't have rakudo-js or moarvm-to-emscripten yet
sorear java applets work without install 01:15
timotimo that is true, however there's an additional hurdle 01:16
benabik At this point many people have (had) disabled the Java applet plugin. 01:17
timotimo it's apparently possible to call functions inside the applet from javascript
but it's not possible to call into js from the applet
sorear that's wrong
timotimo so the applet could receive code from a code editor, but not push the result back?
oh, pleaes enlighten me!
sorear 11:06 < sorear> timotimo: jdk6.java.net/plugin2/liveconnect/#JAVA_TO_JS 01:18
11:10 < sorear> timotimo: the design I'm planning to implement is to have an invisible applet that responds to evaluation methods, and implement the repl in html/js
11:10 < sorear> that way you get all the nice browser features like right click, copy for free
timotimo oh! 01:18
wait, you were going to implement something like that?
sorear yes 01:18
next week
timotimo awesome!
sorear unless you want to take over? 01:19
timotimo no, i really don't :D
.o(but i do have some non-ripe ideas about a website to go around such an eval thingie)
sorear I haven't tested the #JAVA_TO_JS stuff, it might not work at all :p
timotimo could you please keep in mind an api that would allow me to 1) send code from multiple different code editors and receive them in different places, 2) add test case code, perhaps to the end but hopefully externally, 3) allow for multiple sources-of-code to act like different files for modules? 01:20
no need to make that all straight away, but it would be cool if that would be possible to implement from the beginning 01:21
jercos hrm, something's shady here... 01:43
r: 4.unpolar(pi).Int
camelia rakudo b9869c: OUTPUT«Can not convert -4+4.89842541528951e-16i to Int: imaginary part not zero␤ in method Int at src/gen/CORE.setting:10358␤ in method Int at src/gen/CORE.setting:8521␤ in block at /tmp/X4FCY25gwk:1␤␤»
jercos r: 4.unpolar(pi*2).Int 01:44
camelia rakudo b9869c: OUTPUT«Can not convert 4-9.79685083057902e-16i to Int: imaginary part not zero␤ in method Int at src/gen/CORE.setting:10358␤ in method Int at src/gen/CORE.setting:8521␤ in block at /tmp/wW75k_RXWR:1␤␤»
sorear looks right to me
timotimo e-16, that's no tmuch, perhaps pi is just not precise enough? 02:03
(perhaps just ~15 digits?)
colomon floating point math is not precise enough 02:09
timotimo that makes sense.
at this point, wouldn't .abs work?
colomon approximately, sure. 02:16
r: 4.unpolar(pi).abs
camelia rakudo b9869c: ( no output )
colomon r: say 4.unpolar(pi).abs 02:17
camelia rakudo b9869c: OUTPUT«4␤»
timotimo if you expect the imaginary part to be almost 0 but not quite, i think abs is kind of sort of good enough 02:18
colomon well, you lose the sign of the real part that way
timotimo except if you actually want to continue with the value, because of course errors reproduce and grow
oh!
good point, thanks
in that case .real?
colomon but hell, if you expect imaginary part to be essentially zero, you might a well call .re
r: say 4.unpolar(pi).re 02:19
camelia rakudo b9869c: OUTPUT«-4␤»
timotimo ah, .re
decommute& 02:22
dalek ecza: a7a94cf | (Solomon Foster)++ | lib/CORE.setting:
Rewrite infix:<∖> to take any number of arguments and return Bag if the first argument is Baggy.
03:04
ast: 8160e4b | (Solomon Foster)++ | S03-operators/set.t:
Fix up tests for new set difference.

More changes needed.
03:08
colomon hmmm. how the heck do you do setSeed in Java? It's like the function is there but it isn't implemented? 04:01
colomon has written his first nqp method, but it doesn't actually work. :\ 04:02
sorear that depends on what random number generator you're using 04:04
lue wonders how useful perl6 ++FOOBAR ... ++/FOOBAR actually is, and if it simply must be implemented for him to see it. 04:18
ssutch is it possible to inject names into a module from another module? eg 'use PB; module Hello; BEGIN PB::gen-module('file');' # where Hello would then contain classes that were generated in PB::gen-module? 04:50
labster My guess is that you need to use an 'our' there. 04:51
ssutch how do you mean?
labster sub foo is export makes &foo in the lexical scope when you use ... 04:52
our sub foo; in module PB makes PB::foo() available.
labster I'm sure there's someone out there who could explain this better. 04:53
ssutch this is probably better at explaining what im trying to accomplish: gist.github.com/samuraisam/5847807 04:54
labster Okay, I'm a little lost (mainly due to my own lack of knowledge), but it looks like you're importing PB which runs its EXPORT stuff, then calling it's gen-module sub, which adds things to the EXPORT later. 04:59
labster what I'm not sure is if that EXPORT::DEFAULT ever gets moved into Hello.pm's lexical scope. 05:00
sorry I'm useless, I just code here 05:01
ssutch it's all good :) 05:04
sorear ssutch: what does PB stand for? 05:22
ssutch protocol buffers
sorear in theory, at BEGIN time there's nothing stopping you from modifying the caller's lexical scope
in practice, doing it is currently nonportable and undocumented 05:23
ssutch ah, shucks
sorear you should talk to masak++ about declarations in macros
ssutch is there any way to accomplish something *like* this, that i can revise in the future 05:24
sorear generating a _class_ at runtime is going to be easier
and portable*
ssutch how would it be accessed then, from the calling package?
sorear *I haven't gotten around to implementing the 6model MOP in niecza
#`( Module ) class Foo; use PB (Foo, 'file'); #`( User ) use Foo; Foo.method(bar); 05:25
actually, you could have PB copy objects into the CALLER's EXPORT::DEFAULT 05:26
ssutch that could work
sorear it's adding stuff to the _lexical_ scope that's tricky
but adding to a module's export list and adding to a class are both more or less settled APIs 05:27
ssutch how is that accomplished?
sorear which?
ssutch export list
sorear EXPORT::DEFAULT:: is a hash-like object
in the module, pass EXPORT::DEFAULT:: as an argument to gen-module 05:28
in PB itself, stuff subs into the hash
ssutch ahhh, right
sorear (with properly sigilled names)
you might need to pass EXPORT:: instead and do the DEFAULT creation on demand
sorear calling EXPORT_SYMBOL might be a good idea 05:31
ssutch sorear: something like this? gist.github.com/samuraisam/5847807
sorear something like that, but the syntax is wrong in every single way 05:32
ssutch haha
im just guessing, putting together bits ive gathered here and there, so that's not surprising 05:33
sorear $pkg::DEFAULT means GLOBAL.WHO.{'pkg'}.WHO.{'$DEFAULT'}
ssutch not at all what i want 05:35
sorear in perl 6, every type has an associated hash which can be accessed with the WHO method-macro
packages and modules are degenerate types that have a name, a WHO, and not much else
GLOBAL is the root package
to access a global named foo, you do GLOBAL.WHO.{"foo"} 05:36
ssutch so i want $pkg.WHO{'DEFAULT'} = package MyPkg { };
sorear that's better, but not perfect
well, the left side is good
but the middle is dubious (the setting uses :=, = might work but I'm not sure) 05:37
and the right side is wrong (when you say "package" in source code, that creates a package once at compile time and at runtime always returns the same value)
ssutch i see
soo
sorear have a look at github.com/rakudo/rakudo/blob/nom/...ts.pm#L151 05:38
ssutch $pkg.WHO{'DEFAULT'} = Perl6::Metamodel::PackageHOW.new('MyPkg');
sorear actually, you may want to call EXPORT_SYMBOL directly. 05:39
ssutch what might that look like? 05:41
sorear take a look at the next sub down
EXPORT_SYMBOL('&foo', [<ALL DEFAULT>], sub { whatever }) maybe 05:42
ssutch trying it out 05:44
sorear note that if you provide an 'our sub EXPORT(*@args) {}' in your module, then the user doesn't need an explicit BEGIN
ssutch why not? 05:46
sorear because there's an implicit call at begin time at the site of the use statement, passing any positional arugment from the use statement 05:47
ssutch r: EXPORT_SYMBOL('&Thingy', [<ALL DEFAULT>], sub { say "hello" }); Thingy()
camelia rakudo b9869c: OUTPUT«===SORRY!===␤Undeclared name:␤ Thingy used at line 1␤␤»
sorear use Foo (1,2) -> BEGIN Foo::EXPORT(1,2)
ssutch oh, that's clever 05:48
sorear r: my module Foo { BEGIN EXPORT_SYMBOL('&thingy', [<ALL DEFAULT>], sub { say "hello" }) }; import Foo; thingy;
camelia rakudo b9869c: OUTPUT«hello␤»
sorear r: my module Bar { our sub EXPORT($name) { EXPORT_SYMBOL('&'~$name, [<ALL DEFAULT>], sub { say "hello" }) } }; my module Foo { import Bar "thingy" }; import Foo; thingy; 05:49
camelia rakudo b9869c: OUTPUT«===SORRY!===␤Undeclared routine:␤ thingy used at line 1␤␤»
sorear r: my module Bar { sub pie is export {}; our sub EXPORT($name) { EXPORT_SYMBOL('&'~$name, [<ALL DEFAULT>], sub { say "hello" }) } }; my module Foo { import Bar "thingy" }; import Foo; thingy; 05:50
camelia rakudo b9869c: OUTPUT«===SORRY!===␤&EXPORT sub did not return an EnumMap␤»
sorear r: my module Bar { sub pie is export {}; our sub EXPORT($name) { EXPORT_SYMBOL('&'~$name, [<ALL DEFAULT>], sub { say "hello" }); return {} } }; my module Foo { import Bar "thingy" }; import Foo; thingy;
camelia rakudo b9869c: OUTPUT«hello␤»
sorear is that a known rakudobug?
ssutch the EnumMap thing?
sorear no, the sub pie thing 05:51
sub EXPORT is ignored unless there is at least one exported symbol
appears to be an incorrect order of tests in the core
sorear ...I have a commit bit now 05:51
sorear gets to fixing that 05:52
ssutch am i getting closer? gist.github.com/samuraisam/5847807 05:55
sorear apparently we have no tests at all for EXPORT 05:56
ssutch: Just say thingy() in caller.pm 05:57
ssutch ok 05:58
sorear and you may need to add a dummy exported sub to PB.pm
ssutch im getting: Error while importing from 'PB': no EXPORT sub, but you provided positional argument in the 'use' statement 05:59
i have a few other our subs in the PB.pm file 06:00
sorear they have to be exported, not our 06:01
ssutch: could you commit or gist your actual PB.pm file? 06:03
ssutch sorear: gist.github.com/samuraisam/5847807 06:05
lue question: was C<isa> an old spelling of C<is> ? I just found a line containing it in S29, and I'm not sure if it's meant to be a valid Perl 6 snippet, as opposed to some kind of pseudocode (S29:87 and S29:882) 06:06
(now that I found :882, I suspect this is the case) 06:07
sorear ssutch: That code should work if I'm reading the code correctly
ssutch yeah it seems it should 06:07
but it's complaining Error while importing from 'PB': no EXPORT sub, but you provided positional argument in the 'use' statement
sorear lue: Those are method names. 06:07
r: say 4.^isa(Int)
camelia rakudo b9869c: OUTPUT«1␤»
sorear r: say 4.^does(Numeric)
camelia rakudo b9869c: OUTPUT«True␤» 06:07
sorear r: say 4.^can("sqrt") 06:08
camelia rakudo b9869c: OUTPUT«sqrt sqrt␤»
lue OK. It was the :87 line that I initially spotted and it looks suspiciously like an old spelling of C<class Foo is Bar> 06:09
sorear o/ FROGGS 06:12
FROGGS o/ sorear
gah, mondays -.- 06:13
FROGGS sorear: it takes 22minutes to compiler one of my scripts... (the one with several infix declarations) :/ 08:22
jnthn morning, #perl6 08:25
Ulti morning, just got rakudo on jvm running on my Mac :) 08:26
jnthn :)
Ulti it would help if I stop using \q to get out of the REPL... to much SQL clearly 08:27
TimToady timotimo: the Camelia's are both wrong now 08:31
the P6 is supposed to have varying line width, made with two lines, and you've only got one of the two lines
probably the export selection problem again 08:32
FROGGS jnthn: the redesign sorear mentioned... do you have a timeline for that?
jnthn FROGGS: What redesign?
FROGGS about the mixins, that always a full copy of %?LANG goes into the .pir file 08:33
Ulti with the REPL I am I incurring the startup costs with every line with the JVM implementation? 08:35
jnthn Ulti: Shouldn't be 08:35
Ulti: The first line, yes
Ulti ahh
jnthn Ulti: Because it doesn't load the setting until then
Ulti that might be it
jnthn After that it's loaded, cached
FROGGS: I may be able to alleviate the pain a bit without having to re-design it... 08:36
Ulti haha yeah that's it
*few*
1+1 taking ten seconds was scary, it's not perceivable after the first line
jnthn FROGGS: I don't know what a redesign would look like anyway, and it's hard to give a timescale for something I don't know the end goal of :) 08:37
FROGGS: I need to focus on $dayjob for a bit, but please feel free to try this patch: gist.github.com/jnthn/5848604 08:38
sorear jnthn: I didn't mean a redesign-from-scratch, just some design changes are probably needed to alleviate the flaw 08:50
jnthn: I of course proposed the niecza approach (don't serialize NFAs, lazily recompute them when needed) 08:51
sleep&
jnthn sorear: The was a somewhat notable startup time win from serializing them rather than recreating them.
sorear: So I'm a little cautious to drop it. :) 08:52
'night, sorear++
TimToady *Camelias, ENOCAFFEINEYET 08:54
jnthn ooh, caffeine is a good idea.. 08:55
.oO( Why didn't I think of that? Hm, bootstrapping problem... )
JimmyZ :-) 08:58
TimToady timotimo: and the current .odg is completely hosed
TimToady black lipstick, line-de-doubling, and missing the ellipses on the ends of the lines as well 08:59
FROGGS jnthn: I can try that patch, though I already tested that 09:00
mls Hi guys,
JimmyZ hi mls
mls jnthn: about that "ExceptionHandling.java makes sure that a handler doesn't catch catch twice": does that work with recursion? There was a reason why parrot exceptions were done like that. Just making sure that you thought about recursion. 09:02
I.e. The exception handler recursivly calls the function that contains the handler.
mls cause in that case it has to catch the exception that is thrown 09:03
kresike hello all you happy perl6 people 09:04
jnthn > sub foo($x) { die 'foo' if $x; CATCH { default { foo($x - 1) } } }; foo(1) 09:05
Nil
> sub foo($x) { die 'foo' if $x; CATCH { default { foo($x - 1) } } }; foo(2)
foo
FROGGS hi kresike
jnthn Those look right to me.
rn: sub foo($x) { die 'foo' if $x; CATCH { default { foo($x - 1) } } }; foo(2) 09:06
camelia rakudo b9869c, niecza v24-82-ga7a94cf: ( no output )
kresike FROGGS, o/
jnthn Oh. :/
Hmmm.
Guess there's some static/dynamic confusion there... 09:07
jnthn wonders if we have spectests for that :) 09:08
mls probably not ;)
jnthn Well. Then I'm not going to worry about it in a hurry. :)
It should be fixable, anyway.
jnthn And should get a spectest, of course... 09:09
.oO( where's masak to file rakudo-jvm bug :P )
09:10
FROGGS jnthn: that patch does not help... I think if you once installed %?LANG, and you mixin more things, %?LANG grows and so does the installed symbol because it is bound
mls Yes, thanks!
FROGGS jnthn: does make make sense?
jnthn FROGGS: "The %?LANG grows" is odd as it's just a hash. I think what's happening is that each mixin level keeps its cached, computed NFAs. 09:11
So the entries in %?LANG don't increase, but the object it ends up pointing to is a long mixin chain.
Ulti naaaww finally found a NYI in the JVM rakduo :) "run is NYI on JVM backend". Playing for an hour and that's all I found after trying to be cheeky and install panda 09:12
tadzik now you know what to implement :)
Ulti heh
jnthn It took you an hour to break it? o.O :)
Not bad! :) 09:13
Ulti yup, looking good :)
I was mostly playing with lists though 09:14
TimToady fg 09:15
afk & # have to change hotel rumes
Ulti wow just managed a proper explosion, I forgot 'my': @list = 1..4 goes into an infinite loop of woe 09:17
jnthn yes, the REPL needs love... 09:18
Ulti I was trying just then though :) 09:18
Ulti really cool stuff, I better get off to work though! 09:18
FROGGS jnthn: about that cache of computed nfas, do you have a keyword by hand that let me find some related code? 09:21
Ulti tadzik: is there a doc somewhere on getting started with the internals? explaining roughly what is going on where? 09:22
or is it just use the sauce 09:23
FROGGS jnthn: nvm, I think I found it
jnthn FROGGS: precompute_nfas in QRegex.nqp probably
uh, or that's related anyway
FROGGS jnthn++ # thank you
jnthn FROGGS: If we added a flush_cache method in NQPClassHOW, and we know there's already a %?LANG, we could always flush the cache of the thing we know we're replacing (and so its cache would be useless) 09:25
FROGGS jnthn: sounds like a plan 09:29
tadzik Ulti: not quite. But you can keep asking me until stuff makes sense :) 09:31
FROGGS Missing or wrong version of dependency 'src/stage1/gen/nqp-mo.nqp' :/ 10:06
lizmat is there a basic difference between BEGIN { eval slurp "file.pm" } and "use file" ? 10:20
lizmat thinks not, but may be missing something essential 10:21
tadzik use does BEGIN require and import
which is need, import, iirc
lizmat ok, "use file ()" then 10:22
forget about the import business :-)
I know there is some subtle difference in Perl 5
jnthn Yes, the first is in the lexical context of the place you do the BEGIN/eval, a "use" is in the lexical context of the setting. 10:23
lizmat jnthn: but that's the only difference ? 10:25
lizmat assume "probably" :-) 10:27
*assumes
timotimo looks at the camelia files again 10:33
jnthn lizmat: Well, it's more like "need" than "use" 10:34
lizmat: I suspect those are the main differences.
I mean, ModuleLoader and eval both call into the compiler, if the module was not pre-compiled.
lizmat argh, yes, need to remember we have pre-compiled compilation units in Perl 6 10:35
timotimo indeed, loading the svg file in libreoffice draw makes the strange rectangles + pie slices appear again
lizmat jnthn: I mean, if you say "module was pre-compiled", then you really mean "file was pre-compiled" or "compilation unit was pre-compiled", right? 10:36
jnthn lizmat: yes 10:37
lizmat is giving a stab at unslushing S11
jnthn lizmat: Sorry, the imprecise terminology is fairly ingrained. :)
lizmat: I don't know we can fix that culturally but we can try to do better in the impl/spec for our own sanity :)
lizmat indeed.. 10:38
timotimo i made a new .pdf, but i cannot open it in libreoffice draw (it gives me a text document with the bare contents of the .pdf file as text instead of a picture)
timotimo hrmpf. 10:39
timotimo starts from scratch 10:39
timotimo neither inkscape's "save as .odg" nor libreoffice "load svg" work ... 11:11
colomon The problem I'm having with srand in JVM is the ThreadLocalRandom we're using doesn't allow you to set seeds. Ever. As far as I can tell. 11:18
timotimo indeed, "ThreadLocalRandom is initialized with an internally generated seed that may not otherwise be modified" 11:19
timotimo docs.oracle.com/javase/7/docs/api/j...andom.html - this shows no constructor, does that mean it gets a constructor with a seed value form its parent? 11:20
jnthn The Random class has a working setSeed, but we'd have to do our own one per ThreadContext to get it thread safe 11:22
Or put it on GlobalContext and do locking
colomon isn't p6's srand by its nature global rather than threaded? I mean, not that it necessarily should be, mind you.... 11:32
dalek : be21e24 | (Timo Paulssen)++ | misc/camelia. (3 files):
uncrack lines, remove invisible objects, simplify shapes
timotimo this should be rather satisfactory (i hope you'll excuse the branch overwrite)
i kept the .pdf and .odg files as they were, as the pdf is the original and i couldn't create an .odg from the svg or pdf without it being completely hosed 11:33
the .png file is new and the .jpg file comes from the new svg
lizmat colomon: S32/Numeric:295 doesn't state anything about the scope of srand 11:36
although I could see a use for srand being lexically scoped 11:37
and therefore thread scoped, I guess
colomon I have a vague memory that we punted making a decision on that until we had working threads...
daxim re justrakudoit.wordpress.com/2013/06/...perations/ - why are there so many multi subs? what's the Any, Baggy distinction for? 11:40
lizmat suppose $*RAND would contain the seed, srand(foo) could then be a macro for "temp $*SRAND=foo" ?
jnthn It's generally better to lean towards thread locality. With time and cores, the cost of synchronizing global things is most likely only going to increase relative to the cost of thread local things. 11:45
So unless there's a strong semantic reason...
colomon daxim: the version with all the multis is the old version; they are being replaced with a single sub 11:46
daxim cool, please reblog when you're done 11:48
colomon daxim: the new version *is* blogged already, same post 11:49
daxim ooooh 11:49
colomon daxim: first code block is the old version, second the new
lizmat jnthn: I think the seed should be at least process global: we don't want each thread to start with the same random number sequence ?
so unless the seed is lexicalized specifically, it should always work on, and adapt, the process global seed 11:52
lizmat I'm not even sure srand should be lexotic 11:52
FROGGS++ # usev5.wordpress.com 11:55
colomon lizmat: I'm not sure what you mean by that, exactly. But it seems to me we should strongly prefer that each thread have its own random number generator. so how does a a global seed fit with that?
lizmat colomon: with "random number generator" I assume you mean "random number seed", right 11:56
?
colomon lizmat: ... dang, it's hard to formulate this coherently. (For me, anyway.) 11:59
jnthn I think if we're discussing threads and programmer expectations on random number sequences, it's worth keeping in mind that OS threads are *not* the granularity we expect a lot of paralle/concurrent problems to be solved at.
*parallel 12:00
lizmat I was thinking for use cases where you would want to use a deterministic random number sequence over a set of threads 12:01
lizmat so far, I can only think test-suites 12:01
as a way to reduce the degree of variability when debugging thread related issues 12:02
colomon the *same* deterministic random number sequence spread across a set of threads? I can't think of any reason for that, not even test suites 12:03
lizmat but I guess this can be handled by a .wrap when needed
colomon: did you ever stress-tested a threaded application, and have it fail only once in a while? 12:04
a stress test that uses randomly generated data ?
anyways, it can be handled by a .wrap around rand() when needed 12:05
colomon lizmat: I can understand why you might want to have two identical random number sequences running on two threads, or be able to have the sequence repeated between runs of a program. I can't see the point in two threads each taking numbers from the same sequence, because the order they take them in will be ... errr ... random. 12:11
lizmat good point, maybe I should leave my 2000-2003 thread-debugging nightmares behind me :-) 12:14
FROGGS jnthn: okay, so it deletes now the alt_nfa's, result is: filesize 4.5MB (before it was 9MB), pir->pbc in 12s rather than 49s 12:18
jnthn: I play with it a bit
jnthn FROGGS: You can delete the protos too
FROGGS jnthn: "!protoregex_table" ? 12:19
or "!protoregex_nfa" ? 12:21
I guess the latter
jnthn The latter 12:22
FROGGS k
lizmat seems moritz++ is still having net problems :-( 12:50
lizmat r: say (use Test); ok 1 13:03
camelia rakudo b9869c: OUTPUT«Nil␤ok 1 - ␤»
lizmat wondering whether it would make sense for -use- to return the top level package statement objects from a file 13:04
FROGGS (use Test)>>.import ? 13:09
jnthn You already *did* import if you did a "use"
FROGGS true 13:10
bah
jnthn Would need to be extremely careful here to avoid confusing runtime and compile time.
FROGGS (need Test)>>.import ? # :P
jnthn That's still a confusion of compile time and runtime.
FROGGS (use Test)>>.^name.say ? # what about that? 13:11
FROGGS the list of top level namespaces would be evaluated at compile time... 13:11
jnthn It's fine, my point is just that the effect of the "use" is compile time and the dispatch you then do on the result is runtime 13:11
FROGGS yeah 13:12
jnthn r: say 'there'; (BEGIN { say 'here'; 1..10 })>>.say
camelia rakudo b9869c: OUTPUT«here␤there␤10␤8␤6␤4␤2␤9␤7␤5␤3␤1␤»
FROGGS jnthn: btw, there was no such key as 'protoregex_nfa' 13:14
jnthn oh...
ok, I dunno how it works :P
jnthn It's not like I wro...oh, wait... :P 13:14
Maybe they are stored in the cache under the method names. 13:15
FROGGS jnthn: right now, my patch resets the whole hash, so my filesize is 1.2MB (instead of 9MB), and parrot just takes 1s instead of 49s
jnthn oh, resetting the whole hash seems fine.
That sounds MUCH better :)
FROGGS yepp
jnthn We're only storing the single copy of the NFAs now.
jnthn Not loads of useless ones along the path. 13:15
You are being careful to not throw away those of Perl6::Grammar itself, I guess? 13:16
FROGGS there are also thing like 'term' and 'statement' in the hash, these are sweeped away too 13:16
jnthn Oh. Those wil be the protoregex NFAs
FROGGS jnthn: that is the patch: gist.github.com/FROGGS/5e28f5da70ada8db5e8e 13:17
I'm not sure about Perl6::Grammar beeing affected... 13:18
that self.flush_cache happens in method mixin
jnthn yeah, that's a little too aggresive I suspect. 13:19
FROGGS maybe it should be invoked in other methods too, but I dont know where
jnthn { sub infix:<!>($n) {[*] 1..$n }; say 5! }; say 1 + 2
You threw away what it needed when exiting that block to parse the 1 + 2
It probably wants to check the thing it's flushing the cache of is itself a mixin. 13:20
FROGGS I see 13:20
weird that the tests are passing so far, but maybe there are no mixins yet 13:21
FROGGS jnthn: does it really matter if it is a mixin or not? the question is more: is it still used or not, no? 13:22
FROGGS $ perl6 -e '{ sub postfix:<!>($n) {[*] 1..$n }; say 5! }; say 1 + 2' 13:23
120
3
hmmm
jnthn FROGGS: It will *work*. You just force a load of re-compuation. 13:24
*re-computation
FROGGS ahh, good 13:25
jnthn By throwing away the NFAs of the base Perl 6 language.
Perl 6's ClassHOW tracks if a given class is derived as the result of a mixin.
Having similar tracking in NQPClassHOW should be a several line addition. 13:26
Take the same naming as Perl 6's ClassHOW uses.
xlat r: 'should, it, match' ~~ m/^ [\w+] ** [\,\s*] $/ 13:42
camelia rakudo b9869c: OUTPUT«===SORRY!===␤Quantifier quantifies nothing␤at /tmp/Ibo4THSm_o:1␤------> 'should, it, match' ~~ m/^ [\w+] ** ⏏[\,\s*] $/␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ prefix or te…
jnthn r: 'should, it, match' ~~ m/^ [\w+]+ % [\,\s*] $/ 13:44
camelia rakudo b9869c: ( no output )
jnthn r: say 'should, it, match' ~~ m/^ [\w+]+ % [\,\s*] $/
camelia rakudo b9869c: OUTPUT«「should, it, match」␤␤» 13:44
xlat jnthn: thnks I was missing "+" before % 13:45
FROGGS n: 'should, it, match' ~~ m/^ [\w+] ** [\,\s*] $/ # niecza++ has the better error message here
camelia niecza v24-82-ga7a94cf: OUTPUT«Potential difficulties:␤ Unsupported use of atom ** [\,\s*] as separator; nowadays please use atom+ % [\,\s*] at /tmp/_olVNKzq2R line 1:␤------> ould, it, match' ~~ m/^ [\w+] ** [\,\s*]⏏ $/ # niecza++ has the better error mess␤␤»…
xlat niecza++ 13:46
FROGGS Null PMC access in get_bool() -.- 13:53
JimmyZ :D 14:01
cognominal what is the invocation to invite camelia in a channel? 14:03
tadzik "camelia camelia camelia", in front of a mirror ;)
lizmat "/msg camelia" ?
in any gui like IRC client, usually double click on "camelia" in the list of logged in users? 14:04
cognominal nope, I really want to invite her, not to msg her
FROGGS camelia doesnt follow invitations IIRC
FROGGS cognominal: it would be: /invite camelia #channel 14:07
you need to be op in that channel as it seems
cognominal is still camelia Moritz evalbot? 14:20
lizmat perhaps, but it runs on feather 14:21
unlike irclog.perlgeek.de
bbkr hi. is it possible to get raw Num bytes (IEEE 754 format)? maybe through some NQP tricks because unpack does not have required pattern currently. 14:27
hoelzro hmm 14:32
if I have my %hash in Perl 6
and I do { use v5; ... }
would I use $hash{$key} in that v5 block to access %hash?
FROGGS hoelzro: yes 14:33
hoelzro what about hash %!hash?
er, has %!hash
FROGGS hmmm
if the grammar works right you could do: $!hash{key} 14:34
hoelzro so the Perl used in v5 blocks is a superset of regular Perl 5? 14:35
FROGGS not yet, no
but if things make sense and dont break the rules... why not?
hoelzro shrugs 14:36
FROGGS you wont be able do declare something like %!hash though
hoelzro right
FROGGS but we are talking about things that are too far away in future 14:36
lizmat "so the Perl used in v5 blocks is a superset of regular Perl 5?" this would imply yet another Perl dialect 14:37
hoelzro o_O
Perl 5.5? ;)
FROGGS and that is not what I want, I dont want another p2 for example
lizmat I mean, the idea of v5, is to be able to load modules from the Perl 5 world as is
FROGGS or just to reuse old code snippets 14:38
lizmat If someone would like to introduce some Perl6isms into Perl 5 code, it would probably make more sense to migrate the whole module
FROGGS so that the migration to perl6 goes well, I dont want to improve Perl 5 on that way, that would break the idea
lizmat FROGGS++ 14:38
bbkr r: try { my $x = $x / 0; } 14:39
camelia rakudo b9869c: OUTPUT«use of uninitialized value of type Any in numeric context in block at /tmp/K1PE8jPfmh:1␤␤»
lizmat so I think you could say, that v5 provides a subset of Perl 5, rather than a superset
as it will not be able to run *all* Perl 5 code, like ever?
FROGGS dont get me wrong, I appreciate what rurban does, but these "improve P5 projects" always feel a bit second-system-effectish to me
hoelzro that makes sense 14:40
FROGGS lizmat: right, at least <+[Perl5]-[XS]> :o) 14:40
FROGGS but back to $!hash{key}, if it works nicely and improves the P5->P6 migraten, then this still might be an option 14:41
migration*
lizmat good thing that Perl 6 is more third-system-ish :-)
FROGGS I dont think so :o)
it finally grows out of the second system it was 14:42
PerlJam I thought Perl 6 was more sixth-system-ish ;) 14:44
hoelzro hears a rimshot
lizmat some interesting historical context, almost 18.5 years ago: stuff.mit.edu/afs/athena/contrib/perl/doc/FAQ.1 14:45
perigrin lizmat: How does Perl6 compare with REXX? 14:52
lizmat snarky! 14:53
cognominal Will the Gsoc project target javascript or asm.js ? asmjs.org/spec/latest/ 14:58
lizmat pmurias should know, right? 14:59
kresike bye folks 15:01
lizmat by kresike! 15:06
*bye
std: class Dog:ver<2> excludes Fox:ver<1> {}
camelia std d4cc5ab: OUTPUT«===SORRY!===␤Unable to parse class definition at /tmp/5J9eCAVknJ line 1:␤------> class Dog:ver<2> ⏏excludes Fox:ver<1> {}␤ expecting trait␤Parse failed␤FAILED 00:00 41m␤»
lizmat std: class Dog:ver<2> emulates Fox:ver<1> {}
camelia std d4cc5ab: OUTPUT«===SORRY!===␤Unable to parse class definition at /tmp/RCtQwzIU0l line 1:␤------> class Dog:ver<2> ⏏emulates Fox:ver<1> {}␤ expecting trait␤Parse failed␤FAILED 00:00 41m␤»
lizmat :-( 15:07
PerlJam Are there todo tests for those? 15:08
FROGGS no, dont think so 15:09
JimmyZ_ evening.. 15:12
FROGGS hi JimmyZ_
JimmyZ_ hi
diakopter pragprog.com/magazines/2013-06/prog...ing-elixir 15:13
language enthusiasts: sorry if you're already familiar
FROGGS jnthn: the patch seems to work fine now, my Perl5::Terms.pm took 22 minutes before to compile to pbc, now it takes 7 seconds!! 15:15
lizmat wow!
jnthn FROGGS: Well. That's an improvement. :) 15:16
FROGGS jnthn: it is :o)
spectesting now, and tonight I'll benchmark it a bit
diakopter is excited to backlog this 15:19
[Coke] holy cow. (is this something that will improve other pbc builds also?) 15:35
FROGGS[mobile] if they mixin stuff, yes 15:36
like custom infixes
FROGGS[mobile] 10 infixes needed 49s on my box, now it needs 0.8s 15:37
lizmat aren't all things coming from roles, infixes ?
lizmat *mixins? 15:38
or does this only apply to custom infixes mixed in?
FROGGS[mobile] hmmm, not sure, but dont think so
lizmat too bad
lizmat wonders whether it would be feasible to have a default MAIN sub be called when loading a module with -M
perigrin if I understand mixins properly they're just differnet from standard role composition 15:39
lizmat and *only* with -M
perigrin (I could very likely be understanding them entirely wrong)
FROGGS[mobile] lizmat: what about sub EXPORT?
lizmat this is about an easy way to install a new compunit (module) 15:40
I was thinking: if one would do "perl6 -MFoo" and Foo.pm was not installed yet, that would install it by running a default MAIN
that would Do The Right Thing 15:41
FROGGS[mobile] ahh
cool 15:42
lizmat or even "perl6 Foo.pm"
that would probably make even more sense :-)
benabik Well, perl6 Foo.pm should run Foo.pm.
IIRC, it's allowed for modules to have a MAIN. Useful for apps and testing.
lizmat the ides is if that compunit would not have a MAIN, it could run a default MAIN 15:43
that would check if the module was "installed" already, and if not, install it in whatever cached compunit directory file we will have
benabik What would the default MAIN do? I would expect perl6 -MFoo to start a REPL, myself. 15:44
jnthn It does 15:45
lizmat no, it doesn't currently 15:45
jnthn It also does in perl6-debug, which is nice 'cus then you can write a call into the module and start debugging it. 15:45
lizmat ah
lizmat yes, -MFoo does, "perl6 Foo.pm" does not 15:45
jnthn lizmat: huh, I thought it did...
Right :)
lizmat so, I would like to have perl6 Foo.pm do something special if it doesn't have a MAIN 15:48
benabik That feels hazardout.
*hazardous.
[Coke] r: say 'asdf"asdfasdf"asdf2' ~~ / '"' <-["]>+ '"'/ 15:49
camelia rakudo b9869c: OUTPUT«「"asdfasdf"」␤␤»
benabik If I accidentally write sub MAI {}, for example...
flussence erm... wouldn't it better to have something separate like «sub MODULE» for use with -M?
[Coke] r: say 'asdf"asdfasdf"asdf2' ~~ / '"' (<-["]>+) '"'/
lizmat maybe my idea needs another special sub for installing the compunit
camelia rakudo b9869c: OUTPUT«「"asdfasdf"」␤ 0 => 「asdfasdf」␤␤» 15:50
benabik Installing the comp unit? As in copying the module to a library directory? I propose we write a new utility for that other than perl6. We can name it after a cute animal, like a panda.
lizmat something like 'perl6 Foo.pm' would call a method INSTALL
sorry, but we want to be able to support multiple installers for Perl6, so this logic needs to be part of an API 15:51
an API that can be overridden if necessary
lizmat and a cutely named utility can then use this API, as an other less cutely named API like cpanm :-) 15:52
benabik Getting an install when I asked for the program to run it is broken.
lizmat this is intended for developers 15:53
lizmat in Perl6, most likely compunits need to be installed in some way before they can be -use-d 15:53
benabik This is true in nearly every language.
lizmat not so in Perl 5: it just needs to exist 15:54
and breaking away from that is hard for the mind of the Perl developer
benabik What installation are you talking about?
lizmat in Perl 6, -use- is specced to also accept from/auth/ver parameters 15:55
lizmat this allows different versions of the same longnamed module to co-exist in the same @INC entry 15:55
lizmat also, this is all case-sensitive and unicode, 15:56
benabik is fairly familiar with the spec, thank you.
lizmat and needs to be able to run on a case-insensitive, non-unicode FS
this implies we need some way of mangling the compunit name given to a file on the filesystem 15:57
benabik Yes. So there needs to be an API for this. Fine. I'm saying that making this the default behavior on running a module is terribly broken and please don't do that.
perl6 * runs *'s MAIN. perl6 -MFoo uses Foo and gives me a REPL. 15:58
Maybe perl6 --install-this-for-me Foo.pm can do it.
lizmat indeed: I was just exploring of huffmann coding this to something shorter 15:59
perigrin lizmat: you mean build in something like metacpan.org/release/lib-xi?
lizmat no
this is only about making a local file known to the local installation, so -use- can find it 16:00
benabik But, also, I think that the auth,yadda,yadda isn't supposed to make it impossible to have a .pm in the current directory and just `use lib '.'` 16:00
lizmat well, that is the question 16:01
allowing that would make searching for a module a lot more intensive
benabik It might not find the auth, etc. 16:01
lizmat as it would force to check each @INC dir for existence of the file, if it is not found in the cached compunit information 16:02
lizmat and it would probably only work for -use Foo- *without* any from/auth/ver information 16:03
so, the :auth(Any):ver(Any) case
lizmat feels for moritz 16:04
benabik I think you're trying to Huffmanize this wrong. Installing new modules isn't the common case, running files is. It's perfectly appropriate to have a separate utility for installation. 16:05
benabik I don't see perl6 being any different than perl5 (cpan), Python (pip), or Ruby (ruby gem) here. 16:05
lizmat also as a developer?
benabik If you specify :auth<cpan:FOO>, I would really expect that that module was installed by cpan. 16:06
Or something similar.
lizmat that's the big difference: as a developer, you need to make your own file known to your installation before it is able to find it
that's a consequence of not going to the filesystem to check for existence of files, but instead use the cached compunit info when doing a -use- 16:07
jnthn I'd really hope that this looks like -I. or -Ilib
benabik If I'm trying to run my own code why would I be using the auth stuff instead of use lib?
lizmat use lib will only add a directory to @INC 16:08
and allow the cached compunit info in that dir to be seen by the system
in my vision, it would *not* find your new file just like that
benabik A _cache_ shouldn't be considered authoritative.
If I muck with @INC, I rather expect it to go looking in those directories for my files. 16:09
lizmat well, each @INC directory will have its own cache 16:10
jnthn lizmat: I think that hurts whipuptitude a little too much. Developing small things locally shouldn't be painful.
lizmat that's what I'm trying to do: to make this as painless as possible
jnthn lizmat: We don't have to have the same cache policy for every directory in @INC, though.
benabik Having to register every single module via external utility before use is not "as painless as possible" 16:11
lizmat jnthn: something like having .perl6_search_fs in a dir
jnthn If I can't just write a Foo.pm then do 'perl6 -I. -e "use Foo.pm; blah"' I'll probably be sad... 16:12
lizmat would prohibit from creating a cache in that dir, and only use filesystem lookup there?
jnthn lizmat: Well, we may want to say that's the policy for anything you add with -I.
lizmat ah, to make it a runtime override
benabik Or via use lib. Or via directly mucking with @INC.
lizmat that's an idea… 16:13
jnthn It's places we expect an installer only to place stuff where we can say "OK, treat the cache as stable"
benabik I'm somewhat expecting that @INC actually includes interesting objects to do module lookups instead of just paths.
And if it encounters a path, well, then it just has to go look.
jnthn Which in production is probably going to be all the places in @INC
lizmat ok, I'm going to mull over this afk in the coming hours 16:14
lizmat just for the record: I'm trying to unslush S11 into something that can be implemented soon :-) 16:15
jnthn lizmat++ 16:16
I'm really happy somebody is doing that.
benabik Actually I kind of like the objects in @INC idea. That way you can `use CPAN-Alternative; @INC.unshift CPAN-Alternative.new('/path/to/libs'); use Foo:auth<funny-stuff-here> 16:18
FROGGS <benabik> But, also, I think that the auth,yadda,yadda isn't supposed to make it impossible to have a .pm in the current directory and just `use lib '.'` 16:37
my S11 proposal has a solution for this btw
github.com/FROGGS/p6-S11Versioning...tributions 16:38
FROGGS @*INC is for in-development-modules and for I-dont-care-what -version-it-has--take-it-!, %*CUSTOM_LIB is for proper installed modules with auth/ver 16:41
benabik FROGGS++ 16:42
FROGGS \o/
I should just implement it over night *g* 16:43
the problem is: night is not at the same time everywhere :/
mls hmm, how do I update the jvm stage0 bootstrap directory? 16:47
mls 'make bootstrap-files' copies jar files into directory 16:47
instead of .class files
FROGGS maybe the makefile is borken? I dunno 16:49
jnthn mls: sorear++ did the class => jar transition and would probably know
benabik I think sorear++ made it generate jars instead of classes now. No idea if it's stable enough to bootstrap.
mls seems like bootstrap needs more love ;) 16:50
timotimo .ask sorear to ping me when he gets a few free minutes and headspace for the try.perl6.org + java applet thingie 16:53
camelia: .ask sorear to ping me when he gets a few free minutes and headspace for the try.perl6.org + java applet thingie
timotimo ... i suppose he'll find that in the backlog. 16:53
benabik No yoleux?
timotimo oh, of course.
yoleaux: .ask sorear to ping me when he gets a few free minutes and headspace for the try.perl6.org + java applet thingie
benabik timotimo: I mean "yoleaux doesn't seem to be in the channel" 16:54
Was that another of moritz's bots?
timotimo er... yes you are right
FROGGS .tell, not .ask 16:56
timotimo show, don't tell 16:57
PerlJam moritz! o/ 16:58
oh, well. Need to be quicker next time.
benabik ilbot2 has been jumping in and out of #parrot like that for, I dunno, days? 17:01
pmichaud don't .ask, do .tell 17:11
benabik Well, now you can .tell. 17:14
wb yoleaux
diakopter .seen diakopter
yoleaux You're right there.
diakopter .seen .seen
yoleaux I haven't seen .seen around.
diakopter .seen \ 17:15
yoleaux I haven't seen \ around.
benabik Looks like .ask, .tell, and .to all work. (judging from the .help)
BenGoldberg .seen yoleaux 17:17
yoleaux I'm right here.
BenGoldberg In perl5, if you unshift a blessed ref into @INC, then require something, the ->INC method of that object will get called. Anyone have any idea if something like that will be available in perl6? 17:19
geekosaur that was being discussed earlier 17:20
flussence wouldn't that just be .Str here? 17:22
BenGoldberg Well, the name of the method isn't that important... 17:23
Just that the method gets called on a (possibly stateful) object, and that a file handle gets returned. 17:24
PerlJam BenGoldberg: you mean "something that can act like a file handle" surely? 17:26
TimToady also, P5 assumes it's going to be compiling whatever is there, which doesn't necessarily follow in P6 17:26
TimToady just has a feeling that there may be a better way to achieve the inversion of control that this mechanism is a poor substitute for 17:27
if we can't think of it, then maybe the low-wattage hack is okay, but usually we've come up with a better way to generalize the low-wattage hacks of P5 17:29
diakopter in Soviet Russia, your programs invert your control. oh wait.. 17:29
PerlJam Is there any prior art in other languages (besides Perl 5)? 17:33
TimToady PerlJam: Well, sure, but that's partly why S11 says what it says already :P 17:45
TimToady I think the main point of S11 should be read as "We need to see these things from the viewpoint of someone managing a large system of interacting modules at a large company, not just from the viewpoint of the person writing a tricksy little script." 17:48
masak o/, #perl6 17:49
yoleaux 23 Jun 2013 23:15Z <FROGGS_> masak: good morning! I updated the gist gist.github.com/FROGGS/5845176
masak FROGGS: verra nice. if it were a pull request, I'd accept it :) 17:51
(and if it were a commit, I wouldn't revert it.)
TimToady and doctoring @*INC with active objects is more in the category of "tricksy" 17:51
masak .oO( the category Tri of tricksy semigroups ) 17:53
where homomorphisms are all functions that preserve associativity and... tricksiness. 17:54
[Coke] wonders if jnthn is still waiting for the daily jvm run! 17:59
(alllmost at S03)
[Coke] wonders why running a single spec test using test_summary shows 11 child processes all the same(?) (but with different PIDs) 18:00
masak sorear: have you seen homotopytypetheory.org/book/ ? 18:02
[Coke] ugh, I lied, still not at S03. So sllooow. 18:12
timotimo [Coke]: wow, how few runners is that? >_< 18:16
[Coke] timotimo: I'm using t/spec/test_summary - SFAIK, there are no runners. 18:18
each test is, I think, invoking "./perl6 t/spec/xx/yy.t" 18:19
timotimo oh, yikes! 18:20
the startup times must be horrible
timotimo hoelzro: it seems like ACE can generate language definitions from .tmlanguage files, which is the format sublimetext uses. that may be interesting to do; write one highlighter for a popular code editor, get another for github's and gist's (and other website's) editors 18:21
[Coke] timotimo: yes. yes it is. :)
[Coke] are there docs on perl6-eval-server and friends? 18:23
tadzik [Coke]: try TEST_JOBS=n make spectest 18:24
n being number of cpu cores
[Coke] tadzik: I can't do that. I need test_summary 18:25
tadzik ah
diakopter [Coke]: if you're looking in htop, it's b/c it's showing threads 18:26
erm.
maybe not.
[Coke] I would also probably jsut use TEST_JOBS=1 here (but still want the eval server)
diakopter: they all have different PIDs.
which I thought would indicated different processes.
*indicate
diakopter oh, those are definitely threads 18:28
userland threads
geekosaur [Coke], older linux did threads with processes. (it ... didn't work very well. there's real threads in modern linux kernels) 18:29
diakopter that's not necessarily relevant to his question
flussence htop has an option to show threads in a different colour... 18:32
diakopter i.imgur.com/sO9CF98.png those are threads 18:32
(see they have the same memory stats) 18:33
(and the process says it's using 143% cpu) 18:35
(93% + 21% + 26% + 1% ish) 18:37
[Coke] S05! 18:38
zzzzz
[Coke] offers sorear a bounty for making the eval server work with test_summary. 18:42
s/sorear// , but I figure sorear++ could do it faster than anyone else.
lizmat TimToady: oddly enough, @*INC seems not to have been specced, at least not much 19:05
S19:447 refers to S11, but S11 doesn't provide any more insight
lizmat so one could argue, that we could potentially live without it (thinking outside the box now) 19:06
diakopter :) 19:08
you're forgetting the S01 catch-all
masak .oO( Perl 6's @*INC will work exactly like Perl 5's @*INC ) 19:09
diakopter lizmat: [feel free to clarify said catch-all.. ;) ]
flussence the biggest difficulty here is trying to predict the future while aeffecting it... 19:13
lizmat masak: I assume you mean Perl 5's @INC ? 19:14
masak lizmat: no, I was just being tongue-in-cheek. 19:15
flussence: if it's difficult, that suggests you're doing too much predicting and too little affecting :P
timotimo masak: with all that tongue-in-cheek-ness, do you have to make sure you balance left and right cheek, so that one doesn't get dented out more than the other?
lizmat Anyway, I think it makes sense
timotimo afk&
jnthn
.oO( :-b )
19:16
flussence
.oO( wouldn't that be :þ ? )
geekosaur ...a thorn in your side... 19:17
flussence
.oO( U+00FE MOUTH WITH IMPROPERLY USED CURLY STRAW )
lizmat but seriously, I think the idea makes sense 19:21
r: say @*INC.of
camelia rakudo b9869c: OUTPUT«(Mu)␤»
lizmat r: class Foo {}; BEGIN {@*INC.unshift(Foo.new)}; use Test; ok 1 # adding objects to @*INC seems to not break anything 19:24
camelia rakudo b9869c: OUTPUT«ok 1 - ␤»
lizmat so I assume we won't be breaking any existing Perl 6 code if we allow addition of objects to @*INC 19:26
I guess the above works because the stringification of Foo.new yields a non-existing directory
flussence has a DSL idea 19:47
«$foo but right-aligned(20)» --> «$foo.fmt('%20s')» 19:48
avuserow relurks :) 20:07
diakopter !! 20:12
dalek rl6-roast-data: 1c39fca | coke++ | / (5 files):
today (automated commit)
diakopter avuserow: did you mean delurks?
lizmat 70.47%
still more than 70.02% :-) 20:13
timotimo holy hell. that's pretty darn good 20:15
FROGGS what
rakudo .jvm is at >70% ??
tadzik www.quickmeme.com/meme/3uyw62/ 20:16
FROGGS that is pretty awesome
I remembered to hear jnthn say that the jvm-backend will land in september or so... 20:17
tadzik: yeah :o) 20:18
tadzik do we have jop:: opcodes, or so?
I guess I'll have to dig into nqp
benabik I think there are only nqp:: ops in nqp-jvm. I think there are some unique ops though. :-/ 20:18
timotimo "2 todo PASSED: no parametrization" :) 20:19
benabik wonders if we need a JavaCall for JVM.
timotimo + 395 tests more than planned were run 20:21
does this enter the calculation at all?
FROGGS timotimo: usually yes 20:23
timotimo in a bad way?
FROGGS It can be bad, yes, and I think the tests are not fudged for rakudo.jvm 20:24
so it maybe loops more that it should, or something like that 20:25
timotimo that was from an exception-related thingie, so probably crazy control flow jumpyness? 20:28
FROGGS I had the problem in v5 that it printed both 1 - ok and 1 - not ok... but I guess that wont happen with Test.pm :o) 20:29
[Coke] In general, do not yet fudge for rakudo.jvm
timotimo whoops :)
FROGGS [Coke]: yeah, it makes sense when it settled down
FROGGS .tell masak here is binary support, left justify, 0B-prefixing and precision for binaries: gist.github.com/FROGGS/5845176 20:50
yoleaux FROGGS: I'll pass your message to masak.
lue hello world o/ 21:16
timotimo ohai lue
masak FROGGS: thanks, but why are you sending me gists for review instead of github branches? :) 21:31
yoleaux 20:50Z <FROGGS> masak: here is binary support, left justify, 0B-prefixing and precision for binaries: gist.github.com/FROGGS/5845176
masak it leaves me unsure of what next action to take...
FROGGS masak: ohh, just wanted to hear your opionen... I can make branches for this I'm unsure to push directly... 21:32
FROGGS done 21:34
masak url? 21:35
FROGGS your repo branch binary 21:36
github.com/masak/sprintf/commit/8e...6ad07baecd
masak looks
masak pushed :) 21:38
(to master)
FROGGS k 21:39
masak FROGGS++
FROGGS ohh, thanks 21:40
masak I think grokking the git model is the best knowledge investment I made in the past year.
FROGGS yes, it is a pretty useful tool
... which improves code quality a lot 21:41
gnight
masak to review/push your commit I did the following: git pull; git log ..origin/binary; git merge origin/binary; git push; git push origin :binary
so simple!
FROGGS hmm, I had checkout that branch, and cherry picked it I guess 21:42
masak had you cherry-picked it, you would have created an additional commit object. 21:45
with a different committer.
otherywise, yeah, not much difference.
lue Are AnyChar and Char the same thing? S29's description of both are basically identical. 21:56
timotimo when "inventing" a new op to be used to make dir() work (nqp::readline, anyone?), is it mandatory to immediately implement nqp::readline for parrot also? 21:57
dukeleto o/ 21:57
timotimo hm, actually, that's not such a difficult thing, i can totally do that.
masak S29 is full of slush. 21:58
lue masak: that's not surprising :) 22:01
masak lue: it's that kind of well-meaning spec'age that never quite connects with reality. the "oh, *I* know!" kind. 22:01
as opposed to "it's been like this for ages, let's take the rough consensus and working code and formalize it". 22:02
lue Is there a use for something like (Any)Char anyway? /me suspects not 22:02
timotimo huh. i don't know how to make an jvm-nqp-op that can lazily do things :| 22:03
lizmat lue: it feels more like a conceptual spec, than something that would need to be implemented 22:06
lizmat otoh, I could see Str.shift return a Char 22:07
lue Yeah. I'm just wondering how useful AnyChar would really be (a one character string at the highest abstraction level currently possible). 22:08
lizmat and Str.list return a List of Char
rather than returning a List of itself, as is the case now
s/List of Char/lazy List of Char/ 22:09
a bit like Str.coomb does now
*comb 22:10
lue
.oO(I can see the spec now: "A Char is essentially a one-character Str, typically at the highest possible view of what a character is. Unlike C-like languages, a Char is not a fancy Int8")
22:10
masak lizmat: I don't feel a need for both Str.comb and a Str.list 22:11
lizmat me neither. come to think of it
lizmat have we specced how to get unicode properties from a codepoint already? 22:13
lue Str definitely needs some way to view/modify its current unicode abstraction levels, unless I missed that part.
lizmat one may wonder whether that needs to be Str or something lower 22:16
pmichaud S02 talks about unicode abstraction levels 22:18
lue ( It would also be nice to have the opposite of "\c[ASTERISK]", like "\x2A", "\o52", and "\c42" have chr("*") )
pmichaud lue: that confuses me :-)
timotimo i've wanted a codepoint-to-name lookup, too
(plus: lookup of attributes and such)
pmichaud r: say chr('*')
camelia rakudo b9869c: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏*' (indicated by ⏏)␤ in method Int at src/gen/CORE.setting:10358␤ in method Int at src/gen/CORE.setting:4257␤ in sub chr at src/gen/CORE.setting:3685␤ in sub chr at src/gen…
lizmat .u want this in Perl 6
yoleaux No characters found 22:19
lizmat :-(
pmichaud but yes, having a way to look up unicode information sounds good
otoh, perhaps that's better as a module than core
lue s/chr/ord/ then
timotimo doesn't core already handle that information? it needs to check the database for regexes, for instance 22:20
lue e.g. codepoint("Ä") returns "CAPITAL LETTER A WITH DIARESIS" 22:21
timotimo anyway, i'll go to sleep now :)
(i'd even go so far as to create a CodepointInfo class or something)
lue
.oO(It also already has the names of unicode codepoints for interpreting \c)
22:22
flussence if this Char object were to exist, it should probably be called Grapheme to make it clear 22:29
lizmat will continue working on S11 tomorrow 22:30
but for now: sleep&
lue flussence: I was going of S29's definition of Char (and AnyChar), which is "the current highest possible Unicode abstraction level"
good ♞ lizmat o/
s/of/off/
pmichaud having a database that can go from names to numbers doesn't automatically imply the inverse :)
besides, if it's not a common operation, it might be better as a module than as something that gets loaded on every execution
masak +1 22:31
pmichaud (as an example... libicu has a way to go from names to numbers, but I haven't found a reliable way to do the inverse in libicu... and libicu is pretty big.)
masak .oO( a very reliable way would just be to try all the names in some order until you find your number ) :P 22:32
flussence (@names Z=> @names».resolve).hash.invert 22:33
lue I was just thinking it'd be suboptimal if a module has to come with a second copy of a names--numbers hash (but if core would have to make such a second table too, then it's just the module author's grumbling at having to recreate ≈0x11_000 entries)
flussence (may take a few hundred of MB RAM to run that line though.) 22:34
masak flussence: why not just (@names».resolve Z=> @names) in that case? :) 22:35
lue I want the opposite of \c[NAME] not only because there are times where I want to know the name of a character, and Perl 6 through the shell is fastest, but also symmetry (like I said, \x and friends have their inverse, but \c[NAME] doesn't) 22:37
flussence masak: now that you mention it, @codepoints[@names».resolve] = @names may be more efficient :) 22:38
lue just found codepoints.net, for those interested 22:40
pmichaud lue: suboptimal for who? 22:41
pmichaud suboptimal for the person that has to write the module (once), or suboptimal for the programs that get to run without loading a full character database into core on every execution ? 22:42
lue I guess I just don't like the idea of having two copies of the same table once you `use name-from-char', one in core and one in the module.
pmichaud sure, it seems redundant. but sometimes redundancy can be more efficient 22:43
and certainly a vm or implementation of Perl 6 could make it easier to provide such a module.
I'm not sure it's wise to say that every P6 implementation has to have that capability in its core.
flussence wonders where gucharmap pulls all its data from... ldd shows it depend on icu so maybe that does have something for it
pmichaud flussence: it's possible that icu has a codepoint-to-name mapping... I just couldn't find an interface that looked straightforward for it 22:44
afk, dinner
masak redundance and efficiency are almost opposites. 22:49
masak that's what the whole DRY-vs-views insight is all about. 22:49
redundancy*
lue thinks Perl 6 in general should allow you to look up various Unicode properties, at least to a certain extent. 22:50
flussence ew, ew, EW 22:53
found how gucharmap does it
$ wc -l gucharmap/unicode-names.h
48826
flussence it's basically *exactly* that @codepoints line I used above, but as a static C array. 22:55
flussence (and the irony is, they use a p5 script to create it :) 22:58
lue I just realized. We also don't have a non-string-interpolation version of "\c[NAME]", while \x and friends do. That should be easy to solve though: say chr("LATIN CAPITAL LETTER A") 23:02
masak lue: I... feel uneasy about such an addition. 23:06
masak it feels like a change without a use case. 23:06
flussence this stuff is definitely sounding like module territory 23:07
lue I should've included the asterisk on easy to solve (* except doing only->multi would likely not be well-accepted) 23:09
lue Can a module force a previously only sub to be part one candidate of a multi? I don't recall ever be able to do this, which means a C-style chr_name() 23:10
masak lue: all builtins should be multi, if you ask me.
lue s/part one/a/
masak precisely for this reason, that they should encourage extension. (in modules)
lue The sub is, but not Int.chr it seems.
(duh, I wouldn't need to change that in this case) 23:11
.oO(It's incredibly difficult to find a simple text-based list of codepoints and names)
23:22
labster r: 3i.floor # I've spent quite a while thinking about this bug. 23:32
camelia rakudo b9869c: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 104724 (src/gen/CORE.setting.pir:46812) (src/gen/CORE.setting:9242)␤called from Sub 'Numeric' pc 224376 (src/gen/CORE.setting.pir:97988) (src/gen/CORE.setting:2991)␤called from Sub 'Numeric' pc 1…
labster Basically Complex delegates to Cool, which sees it, calls Numeric on it, sees another Complex and delegates to Cool. 23:33
I'm having trouble seeing how to break this in a way that would be easily expandable by modules. 23:35
masak why does Complex delegate to Cool? that's the step that I don't find intuitive. 23:37
labster because it doesn't have floor, nor does Numeric. it's in Real. 23:38
labster Maybe something like this in Numeric would work? method floor { die "floor not available for {self.WHAT}" } 23:38
masak yeah. 23:39
labster I'd like someone with a module to be able to do augment class Complex { multi method floor { ... } } and have it Just Work. 23:40
labster assuming they typed use MONKEY_TYPING; which I always forget to do :o) 23:41
lue
.oO(Is flooring a complex number more, uh, complex than I would think? Or do you plan on writing Complex.floor too?)
23:49
[Coke] r: use MONKEY_TYPING; augment class Complex { method floor() { return NaN} }; say 3i.floor; 23:50
camelia rakudo b9869c: OUTPUT«NaN␤»
labster Well, I could write one. It seems people do use it formatting output. It's just that I'm not sure it should be in core, because the behavior is not obvious. 23:52
lue thinks of floor as being "get rid of the decim^W radix point and all the numbers that came after it", thus (-4.2+πi).floor would be -4+3i 23:54