»ö« 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
00:16 moritz joined
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 ...
00:16 skyheights left
flussence okay, the PNG is a clear improvement over the jpg now. 00:22
00:22 moritz left, moritz joined
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
00:23 moritz left 00:25 benabik left, benabik joined 00:27 gdey left 00:33 xinming left 00:35 moritz joined, moritz left 00:36 _ilbot joined, _ilbot left 00:37 xinming joined 00:38 _ilbot joined 00:39 _ilbot left 00:45 moritz joined, moritz left
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
01:00 _ilbot joined
timotimo apparently i can turn on the classloader to make all java.io and java.nio loaded classes dumb stubs 01:00
01:00 _ilbot left
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...
01:07 _ilbot joined, _ilbot left 01:08 snoopy joined
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
01:14 _ilbot joined, moritz joined, _ilbot left, moritz left
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
01:18 _ilbot joined
timotimo oh! 01:18
wait, you were going to implement something like that?
01:18 _ilbot left
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
01:25 echoprinter left 01:32 dayangkun left 01:33 xinming_ joined 01:35 raiph left, gdey joined 01:36 xinming left 01:43 raiph joined
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
01:54 Chillance left 01:55 ssutch left 01:58 ssutch joined
timotimo e-16, that's no tmuch, perhaps pi is just not precise enough? 02:03
(perhaps just ~15 digits?)
02:06 ggoebel2 left
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
02:27 woosley joined 02:32 anuby joined 02:40 jaldhar left 02:42 jaldhar joined 02:47 _ilbot joined, _ilbot left 02:50 _ilbot joined, _ilbot left 02:51 SamuraiJack joined 02:55 raiph left 02:56 moritz joined 02:57 moritz left 02:59 atroxaper joined 03:02 moritz joined, moritz left 03:03 SamuraiJack left
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
03:13 _ilbot joined 03:14 _ilbot left 03:29 bonsaikitten joined 03:32 preflex_ joined, ChanServ sets mode: +v preflex_, preflex left, preflex_ is now known as preflex 03:42 fgomez left 03:44 _ilbot joined, moritz joined, moritz left, _ilbot left 03:47 dayangkun joined 03:50 fgomez joined 03:56 anuby left
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
04:02 anuby joined 04:03 _ilbot joined 04:04 xinming_ left
sorear that depends on what random number generator you're using 04:04
04:05 _ilbot left, xinming joined 04:06 anuby left 04:07 logie left, moritz joined, moritz left 04:08 anuby joined, dayangkun left 04:09 anuby left 04:10 _ilbot joined 04:11 _ilbot left 04:12 moritz joined 04:13 moritz left, gdey_ joined, gdey left
lue wonders how useful perl6 ++FOOBAR ... ++/FOOBAR actually is, and if it simply must be implemented for him to see it. 04:18
04:30 Patterner left 04:32 Psyche^ joined, Psyche^ is now known as Patterner 04:33 _ilbot joined, _ilbot left, BenGoldberg left 04:35 _ilbot joined, _ilbot left 04:42 xinming left 04:43 moritz joined, moritz left, xinming joined 04:48 SamuraiJack joined
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.
04:53 birdwindupbird joined, fgomez left
labster I'm sure there's someone out there who could explain this better. 04:53
04:53 fgomez joined
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
04:59 _ilbot joined, _ilbot left
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
05:01 skids left
ssutch it's all good :) 05:04
05:06 _ilbot joined, _ilbot left 05:08 _ilbot joined, _ilbot left 05:09 logie joined, logie left 05:11 moritz joined, moritz left
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
05:28 berekuk left 05:30 _ilbot joined, _ilbot left
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
05:39 _ilbot joined 05:40 _ilbot left
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
05:45 dmol joined
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␤»
05:49 odoacre joined, kaleem joined
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
05:51 kaleem_ joined
sorear ...I have a commit bit now 05:51
sorear gets to fixing that 05:52
05:55 moritz joined, _ilbot joined, _ilbot left, moritz left
ssutch am i getting closer? gist.github.com/samuraisam/5847807 05:55
05:56 PacoAir joined
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
06:07 PacoAir left
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
06:07 kaleem_ left
sorear lue: Those are method names. 06:07
r: say 4.^isa(Int)
camelia rakudo b9869c: OUTPUT«1␤»
sorear r: say 4.^does(Numeric)
06:07 kaleem left
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
06:11 FROGGS joined
sorear o/ FROGGS 06:12
FROGGS o/ sorear
gah, mondays -.- 06:13
06:14 xinming left 06:15 xilo left 06:18 xlat joined 06:19 _ilbot joined, _ilbot left 06:28 moritz joined, moritz left 06:30 dmol left 06:42 _ilbot joined, _ilbot left, gdey_ left 06:44 ssutch left 06:45 moritz joined 06:46 _ilbot joined 06:47 _ilbot left, moritz left 06:52 bonsaikitten left 06:56 moritz joined 06:58 moritz left 07:01 domidumont joined, dagurval left, sjn left 07:06 kaleem joined 07:08 domidumont left, bonsaikitten joined 07:09 domidumont joined, domidumont left 07:10 domidumont joined, _ilbot joined, _ilbot left 07:12 _ilbot joined, _ilbot left 07:13 bonsaikitten left 07:18 ssutch joined 07:19 popl joined 07:20 popl left 07:21 phpdude joined 07:24 fridim_ left 07:29 _ilbot joined, _ilbot left 07:36 moritz joined 07:38 bonsaikitten joined 07:40 moritz left 07:44 bonsaikitten left 07:51 moritz joined, moritz left 07:52 _ilbot joined, _ilbot left 07:56 moritz joined, moritz left 07:57 dagurval joined 08:04 bonsaikitten joined 08:05 sjn joined 08:07 moritz joined, moritz left 08:08 bonsaikitten left 08:11 _ilbot joined 08:12 _ilbot left 08:14 Jimmy__ joined 08:18 ozmq joined 08:19 JimmyZ joined, Jimmy__ left 08:20 bonsaikitten joined
FROGGS sorear: it takes 22minutes to compiler one of my scripts... (the one with several infix declarations) :/ 08:22
08:25 dakkar joined, bonsaikitten left
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
08:27 ssutch left
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
08:35 _ilbot joined
Ulti with the REPL I am I incurring the startup costs with every line with the JVM implementation? 08:35
08:35 _ilbot left
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
08:41 dag joined 08:42 bonsaikitten joined 08:43 _ilbot joined, _ilbot left, fhelmberger joined 08:49 bonsaikitten left
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++
08:53 _ilbot joined
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... )
08:55 _ilbot left
JimmyZ :-) 08:58
TimToady timotimo: and the current .odg is completely hosed
08:59 _ilbot joined, _ilbot left
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.
09:03 _ilbot joined
mls cause in that case it has to catch the exception that is thrown 09:03
09:03 _ilbot left 09:04 moritz_ joined, kresike joined, moritz_ left
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
09:08 daxim joined
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.
09:09 moritz_ joined, moritz_ left
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
09:16 bonsaikitten joined
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
09:18 _ilbot joined
Ulti I was trying just then though :) 09:18
09:18 _ilbot left
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
09:27 salv0 joined
FROGGS jnthn: sounds like a plan 09:29
09:30 spider-mario joined
tadzik Ulti: not quite. But you can keep asking me until stuff makes sense :) 09:31
09:35 bruges joined 09:36 _ilbot joined, _ilbot left 09:49 sqirrel joined 09:55 markov left 09:59 JimmyZ left 10:00 dayangkun joined 10:04 moritz joined, markov joined 10:05 moritz left
FROGGS Missing or wrong version of dependency 'src/stage1/gen/nqp-mo.nqp' :/ 10:06
10:08 berekuk joined 10:12 berekuk left 10:15 moritz joined 10:16 kaleem_ joined 10:17 _ilbot joined 10:18 berekuk joined
lizmat is there a basic difference between BEGIN { eval slurp "file.pm" } and "use file" ? 10:20
10:21 kaleem left
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
10:23 moritz left, _ilbot left
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
10:24 moritz joined, moritz left, Chillance joined
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)
10:39 _ilbot joined
timotimo hrmpf. 10:39
10:39 _ilbot left
timotimo starts from scratch 10:39
10:41 berekuk left, kaleem_ left 10:42 kaleem joined 10:44 _ilbot joined 10:45 moritz joined, _ilbot left, moritz left 10:47 _ilbot joined 10:48 _ilbot left 10:53 _ilbot joined, _ilbot left 10:55 moritz joined 10:57 moritz left 11:00 flaviusb joined 11:07 crab2313 joined 11:10 ozmq left, rindolf joined
timotimo neither inkscape's "save as .odg" nor libreoffice "load svg" work ... 11:11
11:12 moritz joined, moritz left 11:17 ggoebel joined
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
11:19 atroxaper left
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
11:23 moritz joined 11:25 moritz left 11:26 crab2313 left 11:27 ozmq joined 11:29 sisar left
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...
11:38 JimmyZ joined 11:39 _ilbot joined, _ilbot left
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
11:46 dmol1 joined
daxim cool, please reblog when you're done 11:48
colomon daxim: the new version *is* blogged already, same post 11:49
11:49 araujo left
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
11:52 root____1 joined
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?
11:55 moritz joined 11:56 moritz left
lizmat colomon: with "random number generator" I assume you mean "random number seed", right 11:56
?
11:59 berekuk joined
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
12:00 domidumont left
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
12:01 domidumont joined
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
12:08 ozmq left 12:10 kivutar joined
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
12:15 raiph joined
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
12:24 atroxaper joined 12:31 dayangkun left, dayangkun_ joined, _ilbot joined, _ilbot left 12:32 xinming joined 12:34 araujo joined, araujo left, araujo joined 12:39 moritz joined 12:40 moritz left, dayangkun_ left 12:48 konundra joined 12:49 kaleem_ joined
lizmat seems moritz++ is still having net problems :-( 12:50
12:51 kaleem left 12:52 kaare_ joined 12:53 domidumont left 12:55 MrMeek joined 13:01 berekuk left, moritz joined 13:02 moritz left
lizmat r: say (use Test); ok 1 13:03
camelia rakudo b9869c: OUTPUT«Nil␤ok 1 - ␤»
13:04 berekuk joined
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
13:11 bibifuc joined
FROGGS the list of top level namespaces would be evaluated at compile time... 13:11
13:11 PacoAir joined
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
13:14 p5eval left
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.
13:15 benabik left
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
13:16 p5eval joined
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
13:17 kaleem_ left
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
13:20 bluescreen10 joined, raiph left
FROGGS I see 13:20
weird that the tests are passing so far, but maybe there are no mixins yet 13:21
13:21 benabik joined, bruges left 13:22 bruges joined
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
13:23 raiph joined, pecastro_ joined, raiph left
FROGGS $ perl6 -e '{ sub postfix:<!>($n) {[*] 1..$n }; say 5! }; say 1 + 2' 13:23
120
3
hmmm
13:24 domidumont joined, _ilbot joined
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.
13:27 _ilbot left 13:28 kaare_ left, kaare_ joined 13:30 _ilbot joined, _ilbot left 13:35 skyheights joined 13:37 skyheights left
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…
13:43 xilo joined, skids joined
jnthn r: 'should, it, match' ~~ m/^ [\w+]+ % [\,\s*] $/ 13:44
camelia rakudo b9869c: ( no output )
jnthn r: say 'should, it, match' ~~ m/^ [\w+]+ % [\,\s*] $/
13:44 kaleem joined
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␤␤»…
13:46 berekuk left
xlat niecza++ 13:46
13:48 benabik left 13:49 bluescreen10 left
FROGGS Null PMC access in get_bool() -.- 13:53
13:53 btyler joined 13:55 gdey joined 13:56 kivutar left 13:58 _ilbot joined, _ilbot left 14:00 logie joined
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
14:07 root____1 is now known as JimmyZ_away
FROGGS cognominal: it would be: /invite camelia #channel 14:07
you need to be op in that channel as it seems
14:09 konundra left 14:10 _ilbot joined, _ilbot left 14:14 Stygia joined 14:19 konundra joined
cognominal is still camelia Moritz evalbot? 14:20
lizmat perhaps, but it runs on feather 14:21
unlike irclog.perlgeek.de
14:22 bbkr joined 14:24 JimmyZ_ joined 14:25 JimmyZ left, JimmyZ_ is now known as JimmyZ
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
14:36 JimmyZ is now known as JimmyZ_
FROGGS but we are talking about things that are too far away in future 14:36
14:36 JimmyZ_away is now known as JimmyZ
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
14:38 raiph joined
lizmat FROGGS++ 14:38
14:39 JimmyZ left
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
14:40 kaleem left
hoelzro that makes sense 14:40
14:40 root____1 joined, root____1 is now known as JimmyZ
FROGGS lizmat: right, at least <+[Perl5]-[XS]> :o) 14:40
14:40 Guest1337 joined
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
14:44 _ilbot joined, _ilbot left
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
14:51 raiph left 14:52 JimmyZ left
perigrin lizmat: How does Perl6 compare with REXX? 14:52
lizmat snarky! 14:53
14:55 jeff_s1 joined 14:56 SamuraiJack left, raiph joined
cognominal Will the Gsoc project target javascript or asm.js ? asmjs.org/spec/latest/ 14:58
14:58 raiph left 14:59 rindolf left
lizmat pmurias should know, right? 14:59
15:00 _ilbot joined, _ilbot left
kresike bye folks 15:01
15:01 kresike left 15:02 JimmyZ joined
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␤»
15:06 xlat left
lizmat :-( 15:07
PerlJam Are there todo tests for those? 15:08
FROGGS no, dont think so 15:09
15:09 _ilbot joined, moritz joined, moritz left, _ilbot left 15:10 birdwindupbird left 15:11 yoleaux left
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
15:18 domidumont left, ajr joined 15:19 ajr is now known as Guest59337
diakopter is excited to backlog this 15:19
15:19 Guest59337 is now known as ajr_ 15:20 moritz joined, moritz left 15:24 rindolf joined 15:29 FROGGS left, FROGGS[mobile] joined
[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
15:37 _ilbot joined, pecastro_ left, _ilbot left
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 ?
15:37 alester joined
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?
15:39 benabik joined
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
15:45 _ilbot joined
lizmat no, it doesn't currently 15:45
15:45 _ilbot left
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
15:45 phpdude left
lizmat yes, -MFoo does, "perl6 Foo.pm" does not 15:45
jnthn lizmat: huh, I thought it did...
Right :)
15:46 phpdude joined
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
15:51 JimmyZ_ left
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
15:53 moritz joined
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
15:55 moritz left
lizmat this allows different versions of the same longnamed module to co-exist in the same @INC entry 15:55
15:56 crab2313 joined
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
16:00 fridim_ joined
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
16:01 _ilbot joined
benabik It might not find the auth, etc. 16:01
16:01 _ilbot left 16:02 gdey left
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
16:02 gdey joined
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
16:03 moritz joined, moritz left
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
16:05 daxim left
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
16:15 moritz joined, moritz left
lizmat just for the record: I'm trying to unslush S11 into something that can be implemented soon :-) 16:15
16:16 kaleem joined
jnthn lizmat++ 16:16
I'm really happy somebody is doing that.
16:18 Stygia left
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
16:20 phpdude left, phpdude joined 16:22 fhelmberger left 16:25 ssutch joined 16:27 kingbeast joined 16:28 berekuk joined, gdey left 16:30 FROGGS joined 16:31 moritz joined, moritz left 16:33 raiph joined 16:34 kaleem left, BenGoldberg joined 16:36 phpdude left 16:37 phpdude joined
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
16:41 _ilbot joined
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
16:42 _ilbot left
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 :/
16:44 _ilbot joined, _ilbot left
mls hmm, how do I update the jvm stage0 bootstrap directory? 16:47
16:47 dag left
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
16:50 dakkar left 16:52 kaleem joined
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
16:53 moritz joined, moritz left
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
16:58 shinobicl left, moritz joined, moritz left
PerlJam moritz! o/ 16:58
oh, well. Need to be quicker next time.
16:59 atroxaper left
benabik ilbot2 has been jumping in and out of #parrot like that for, I dunno, days? 17:01
17:07 yoleaux joined, ChanServ sets mode: +v yoleaux
pmichaud don't .ask, do .tell 17:11
17:12 ajr_ left
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
17:25 moritz joined, moritz left
PerlJam BenGoldberg: you mean "something that can act like a file handle" surely? 17:26
17:26 athomason left
TimToady also, P5 assumes it's going to be compiling whatever is there, which doesn't necessarily follow in P6 17:26
17:27 _ilbot joined, _ilbot left
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
17:29 _ilbot joined
diakopter in Soviet Russia, your programs invert your control. oh wait.. 17:29
17:29 _ilbot left 17:30 moritz joined, moritz left 17:32 fhelmberger joined
PerlJam Is there any prior art in other languages (besides Perl 5)? 17:33
17:33 _ilbot joined, _ilbot left 17:35 moritz joined, athomason joined 17:36 moritz left, kaleem left 17:37 fhelmberger left
TimToady PerlJam: Well, sure, but that's partly why S11 says what it says already :P 17:45
17:46 kingbeast left
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.)
17:51 mikemol left
TimToady and doctoring @*INC with active objects is more in the category of "tricksy" 17:51
17:51 moritz joined, moritz left 17:52 tomyan joined
masak .oO( the category Tri of tricksy semigroups ) 17:53
where homomorphisms are all functions that preserve associativity and... tricksiness. 17:54
17:54 _ilbot joined, _ilbot left 17:56 berekuk left 17:58 tomyan left
[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
18:02 flaviusb left 18:06 xlat-home joined 18:07 Guest1337 left 18:08 domidumont joined
[Coke] ugh, I lied, still not at S03. So sllooow. 18:12
timotimo [Coke]: wow, how few runners is that? >_< 18:16
18:16 tomyan joined
[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
18:21 rindolf left
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. :)
18:21 raiph left
[Coke] are there docs on perl6-eval-server and friends? 18:23
18:23 _ilbot joined 18:24 _ilbot left
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
18:25 _ilbot joined, _ilbot left
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
18:29 moritz joined 18:30 _ilbot joined, moritz left, _ilbot left 18:31 ajr joined
flussence htop has an option to show threads in a different colour... 18:32
18:32 ajr is now known as Guest36255, Guest36255 is now known as ajr_
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
18:37 rindolf joined, raiph joined
[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.
18:43 cognominal left 18:44 cognominal joined 18:45 moritz joined, dmol1 left, moritz left 18:47 dmol joined 18:50 rindolf left 18:53 xlat-home left 18:56 raiph left 18:57 _ilbot joined, _ilbot left 18:58 vk_ joined, tomyan left, raiph joined 19:04 Rotwang joined
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
19:05 Guest1337 joined
lizmat so one could argue, that we could potentially live without it (thinking outside the box now) 19:06
19:07 berekuk joined
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.. ;) ]
19:10 _ilbot joined, sqirrel left, _ilbot left 19:12 berekuk left, xlat joined
flussence the biggest difficulty here is trying to predict the future while aeffecting it... 19:13
19:14 berekuk joined
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 )
19:18 jlaire left 19:19 berekuk left
lizmat but seriously, I think the idea makes sense 19:21
r: say @*INC.of
camelia rakudo b9869c: OUTPUT«(Mu)␤»
19:23 jlaire joined
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
19:27 rindolf joined 19:29 itz joined 19:35 SmokeMac_ left, Timbus left 19:36 moritz joined 19:37 moritz left, Timbus joined 19:40 Timbus|Away joined 19:41 Timbus left, Timbus|Away is now known as Timbus 19:44 raiph left 19:45 tomyan joined
flussence has a DSL idea 19:47
«$foo but right-aligned(20)» --> «$foo.fmt('%20s')» 19:48
19:50 _ilbot joined 19:51 _ilbot left 19:53 _ilbot joined, _ilbot left 19:54 domidumont left 19:57 perigrin left 19:58 perigrin joined, zby_home_ joined
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
20:18 census joined
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.
20:20 tomyan left
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
20:27 kaare_ left
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
20:31 census left 20:35 benabik left 20:40 _ilbot joined, _ilbot left, ssutch left 20:41 konundra left 20:49 moritz joined 20:50 moritz left
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.
20:53 imarcusthis- joined 20:54 xlat left 20:57 xlat joined 21:07 smash left, cosimo left, Timbus left, Timbus joined, Juerd joined 21:09 xlat left, skids left 21:10 _ilbot joined, smash joined, _ilbot left 21:11 cosimo joined 21:14 Rotwang left 21:15 _ilbot joined, PacoAir left, _ilbot left, semahawk joined
lue hello world o/ 21:16
timotimo ohai lue
21:23 _ilbot joined, _ilbot left 21:25 _ilbot joined, _ilbot left 21:30 arlinius left, Gothmog_ joined, rindolf left
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
21:33 jeffreykegler joined
FROGGS done 21:34
masak url? 21:35
FROGGS your repo branch binary 21:36
github.com/masak/sprintf/commit/8e...6ad07baecd
masak looks
21:37 _ilbot joined, _ilbot left, zby_home_ left
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.
21:48 phpdude left, FROGGS[mobile] left, phpdude joined 21:55 moritz joined, phpdude left, moritz left
lue Are AnyChar and Char the same thing? S29's description of both are basically identical. 21:56
21:56 arlinius joined
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
21:57 dukeleto joined, phpdude joined
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
22:00 moritz joined, _ilbot joined, semahawk left
lue masak: that's not surprising :) 22:01
22:01 moritz left, _ilbot left
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
22:02 ozmq joined, spider-mario left
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
22:07 moritz joined, moritz left
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
22:10 tomyan joined
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
22:11 salv0 left, raiph joined 22:12 Vlavv left
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.
22:15 raiph left, raiph joined
lizmat one may wonder whether that needs to be Str or something lower 22:16
22:17 Vlavv joined
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
22:23 _ilbot joined, _ilbot left 22:24 dmol left 22:27 salv0 joined
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
22:36 aindilis left
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
22:41 mtk left, ajr_ left
pmichaud lue: suboptimal for who? 22:41
22:42 mtk joined
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
22:48 jeffreykegler left, phpdude left
masak redundance and efficiency are almost opposites. 22:49
22:49 phpdude joined
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
22:51 moritz joined, moritz left
flussence ew, ew, EW 22:53
found how gucharmap does it
$ wc -l gucharmap/unicode-names.h
48826
22:54 _ilbot joined, _ilbot left
flussence it's basically *exactly* that @codepoints line I used above, but as a static C array. 22:55
22:56 moritz joined 22:58 moritz left
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
23:05 _ilbot joined
masak lue: I... feel uneasy about such an addition. 23:06
23:06 _ilbot left
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
23:09 tomyan left
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
23:23 moritz joined, moritz left
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
23:38 _ilbot joined, _ilbot left
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
23:40 moritz joined, moritz left
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␤»
23:50 moritz joined 23:52 moritz left
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
23:54 btyler left