Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-04-20

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:02 timotimo oooh we're getting a working YAML parser for perl6 finally?
00:06 timotimo .tell lizmat i'd have to actually measure what the overhead of actually "generated" accessors would be; it'd have an impact on the core setting file on disk and the ram of a running program (plus having speshes for each individual instance of accessors etc etc)
00:06 yoleaux timotimo: I'll pass your message to lizmat.
00:06 timotimo on the other hand, that may allow us to inline checks from where clauses etc?
00:10 dayangkun joined #perl6
00:37 aborazmeh joined #perl6
00:37 aborazmeh joined #perl6
00:38 Zoffix joined #perl6
00:42 nbdsp joined #perl6
00:47 leont joined #perl6
01:00 silug joined #perl6
01:01 dayangkun joined #perl6
01:09 laouji joined #perl6
01:28 Sibin joined #perl6
01:45 dolmen joined #perl6
01:51 colomon joined #perl6
02:03 chenryn joined #perl6
02:05 noganex_ joined #perl6
02:10 laouji joined #perl6
02:23 nbdsp joined #perl6
02:30 quester joined #perl6
02:35 quester_ joined #perl6
03:08 Gothmog_ joined #perl6
03:42 aborazmeh joined #perl6
03:42 aborazmeh joined #perl6
03:55 laouji joined #perl6
04:02 konsolebox joined #perl6
04:03 jack_rabbit joined #perl6
04:31 chenryn joined #perl6
04:34 _1_shuklaatul joined #perl6
04:35 kaare_ joined #perl6
04:36 _1_shuklaatul ??
04:37 TimToady !!
04:37 raydiak ..
04:42 quester Is it just me, or does "Unsupported serialization format version 12 (current version is 15)" seems like an LTA message to say that some module...
04:42 quester ... not named in the error message, needs to recompiled into mbc?
04:44 quester If anyone else has run into this, a quick and very dirty fix is:    find . -type f -iname '*.pm' | while read line; do echo $line;  perl6 --target=mbc --output=$line.moarvm $line; done
04:45 quester ... and repeat as needed if the .pm's involved use each other.
04:50 lolisa joined #perl6
04:55 quester ... and you may need to do the same thing for .pm6 files as well.
04:57 diana_olhovik_ joined #perl6
05:04 cschwenz joined #perl6
05:04 cschwenz .botsnack
05:04 yoleaux :D
05:06 quester (afk)
05:07 laouji joined #perl6
05:11 spider-mario joined #perl6
05:52 anaeem1_ joined #perl6
05:53 nine .tell nbdsp you can set dbh attributes using the 4th argument to connect: DBI.connect('dbi:mysql:database=testDB;host=localhost;port=3306', 'user', 'password', {mysql_enable_utf8 => 1});
05:53 yoleaux nine: I'll pass your message to nbdsp.
05:55 jnthn morning, #perl6
05:55 yoleaux 19 Apr 2015 19:33Z <FROGGS> jnthn: after successfully bootstrapping panda I try to install a dist, and then it explodes when serializing a null object: https://gist.github.com/FROGGS/c6d637b32e4665ec3882
05:55 yoleaux 19 Apr 2015 19:35Z <FROGGS> jnthn: I believe this object is a string, the absolute path to the panda script that is currently running (aka $*EXECUTABLE)... is there something I need to take care of?
05:55 yoleaux 19 Apr 2015 19:39Z <FROGGS> jnthn: I pushed to rakudo/jsoff in case you are curious
05:56 nine .tell lizmat actually, my patch to perl for use v6; support doesn't even require Inline::Perl6. It works as long as you have some perl6 binary in your $PATH
05:56 yoleaux nine: I'll pass your message to lizmat.
05:57 diana_olhovik_ joined #perl6
05:57 jnthn .tell FROGGS I'm curious how you ended up with a real NULL in the objects to serialize list...
05:57 yoleaux jnthn: I'll pass your message to FROGGS.
05:58 jnthn .tell FROGGS Something seems a bit off there. Can't immediately tell what.
05:58 yoleaux jnthn: I'll pass your message to FROGGS.
05:58 nbdsp nine: that worked! thanks!
05:58 yoleaux 05:53Z <nine> nbdsp: you can set dbh attributes using the 4th argument to connect: DBI.connect('dbi:mysql:database=testDB;host=localhost;port=3306', 'user', 'password', {mysql_enable_utf8 => 1});
06:25 brrt joined #perl6
06:38 _mg_ joined #perl6
06:40 virtualsue joined #perl6
06:42 brrt \o
06:43 brrt just here to point you all to my hague grant application at tpf: http://news.perlfoundation.org/2015/04/perl-6-hague-grant-application.html
06:43 brrt please be just as critical as you like :-)
06:45 jnthn \o/
06:45 bjz joined #perl6
06:48 FROGGS joined #perl6
06:50 laouji joined #perl6
06:53 FROGGS .schnickschnack
06:53 yoleaux 05:57Z <jnthn> FROGGS: I'm curious how you ended up with a real NULL in the objects to serialize list...
06:53 yoleaux 05:58Z <jnthn> FROGGS: Something seems a bit off there. Can't immediately tell what.
06:57 moritz brrt: the example you mentioned seems to be missing
06:57 brrt oh, yes
06:57 brrt the links are missing
06:57 moritz glad it's not just me :-)
06:57 brrt https://gist.github.com/bdw/fef76ca07b7203e49fc2 is the example
06:58 brrt dunno if you are familiar / comfortable with at&t syntax
06:59 brrt and to be really clear about it, this is a *highly artificial* example
06:59 brrt real code will not see such benefits
06:59 brrt unless we attack other parts of the stack as well
07:00 MARTIMM joined #perl6
07:00 moritz well, that's the nature of optimizations
07:01 zakharyas joined #perl6
07:01 Ven joined #perl6
07:04 abraxxa joined #perl6
07:05 brrt sure. i just don't want anybody thinking we'll get a 5x speedup for free :-)
07:06 moritz not free, it'll cost us 10k :-)
07:06 lizmat joined #perl6
07:06 moritz and yes, I know I know, just fooling around
07:09 brrt :-D
07:10 laouji joined #perl6
07:10 masak morning, #perl6
07:10 moritz \o masak
07:11 brrt \o masak
07:12 jnthn o/ FROGGS, moritz, masak, lizmat :)
07:12 lizmat good morning, jnthn !
07:12 yoleaux 00:06Z <timotimo> lizmat: i'd have to actually measure what the overhead of actually "generated" accessors would be; it'd have an impact on the core setting file on disk and the ram of a running program (plus having speshes for each individual instance of accessors etc etc)
07:12 yoleaux 05:56Z <nine> lizmat: actually, my patch to perl for use v6; support doesn't even require Inline::Perl6. It works as long as you have some perl6 binary in your $PATH
07:13 FROGGS morning @all
07:14 El_Che the elfs are working hard to make christmas possible! :)
07:21 * masak is so confused, because in Scandinavia there are no elfs, only small clones of Santa
07:21 lizmat joined #perl6
07:21 lizmat joined #perl6
07:22 lizmat brrt++  # Hague Grant Application
07:22 brrt thanks :-)
07:22 moritz masak: and trolls!
07:22 RabidGravy joined #perl6
07:22 brrt but a scandinavian troll is not the same as an internet troll... or is it
07:23 masak moritz: Scandinavia had trolls before it was cool. :P
07:26 Rounin joined #perl6
07:28 quester left #perl6
07:30 lizmat M: nqp::say("foo")
07:30 lizmat m: nqp::say("foo")
07:30 camelia rakudo-moar 4ba4aa: OUTPUT«===============================================================================␤The use of nqp::operations has been deprecated for non-CORE code.  Please␤change your code to not use these non-portable functions.  If you really want␤to keep using nqp:…»
07:30 lizmat m: use nqp; nqp::say("foo")
07:30 camelia rakudo-moar 4ba4aa: OUTPUT«foo␤»
07:30 moritz lizmat++
07:30 jnthn lizmat: Hmm, I'd say it's only deprecated without using "use nqp;"
07:31 Ven o/, @*peeps
07:31 lizmat m: use nqp; nqp::say("foo"); { no nqp; nqp::say("bar") }; nqp::say"baz"
07:31 camelia rakudo-moar 4ba4aa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9T27cQDIit␤Two terms in a row␤at /tmp/9T27cQDIit:1␤------> 3); { no nqp; nqp::say("bar") }; nqp::say7⏏5"baz"␤    expecting any of:␤        infix␤        infix stopper␤        statement end…»
07:31 lizmat m: use nqp; nqp::say("foo"); { no nqp; nqp::say("bar") }; nqp::say("baz")
07:31 camelia rakudo-moar 4ba4aa: OUTPUT«===============================================================================␤The use of nqp::operations has been deprecated for non-CORE code.  Please␤change your code to not use these non-portable functions.  If you really want␤to keep using nqp:…»
07:32 lizmat jnthn: it is
07:32 lizmat jnthn++  # lexical pragma's framework
07:33 lizmat BTW, *all* the pragmas now also work with -M
07:34 jnthn lizmat: No, I more meant that I'd phrase it not as "deprecated for non-CORE code" but "deprecated without 'use nqp;'"
07:34 jnthn lizmat: Yes, I saw :)
07:34 rurban_ joined #perl6
07:34 brrt i wonder if we can add tracing without a very significant runtime cost....
07:35 brrt ... we can
07:35 brrt but it is more evil than you might imagine
07:35 brrt (at least if you have CGOTO's)
07:35 lizmat jnthn: I'll gladly leave the phrasing of the message to the bikeshedding team  :-)
07:36 lizmat brrt: looking forward to seeing that evilness in action ;-)
07:36 jnthn We can't rely on CGOTO, alas.
07:37 jnthn I'd more been thinking of using the specialization framework to produce a trace-recording version of the code.
07:38 brrt the evilness was replacing the cgoto table to a version that added trace by the way :-). that would be relatively cheap
07:38 brrt i have no quick idea on how to let spesh do it though
07:38 cschwenz joined #perl6
07:38 brrt but i'm afk for now :-)
07:39 zeleiadi joined #perl6
07:40 renormalist joined #perl6
07:40 jack_rabbit joined #perl6
07:41 arnsholt Object modeling musing: Does it make sense to have a role that can only be mixed into subtypes of a particular class?
07:42 jnthn arnsholt: What makes it only possible to mix it into subtypes of a particular class?
07:42 moritz that would have been my question too :-)
07:42 arnsholt Assuming things about stuff the mixed-into type can do
07:42 moritz arnsholt: the usual approach is more that require a certain role (instead of a subclass)
07:42 moritz s/that/to/
07:42 arnsholt Basically, this comes from stuff I'm doing at $work ATM (in Python)
07:43 dalek rakudo/nom: a96118d | labster++ | src/core/ (2 files):
07:43 dalek rakudo/nom: move methods from Cool.pm to Str.pm: <codes chars uc lc tc tclc ord flip>
07:43 dalek rakudo/nom:
07:43 dalek rakudo/nom: Boost performance on all of these functions by ~25% when performed
07:43 dalek rakudo/nom: on a Str object; roughly unchanged performance on other Cool types.
07:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a96118dc87
07:43 jnthn arnsholt: You could express those as requirements.
07:43 jnthn (in the role)
07:43 moritz with perl 6 roles, if role R depends on stuff from type A, make A a role too, and have R do A
07:43 jnthn Or what moritz said.
07:43 arnsholt Yeah, that probably makes more sense
07:43 moritz labster++
07:44 arnsholt Of course, Python doesn't have roles, so it's all classes
07:45 yvan1 joined #perl6
07:45 arnsholt What I have is more or less this: A hierarchy of Tool-subclasses, doing various things. And a collection of tools that are weird and idiosyncratic. So I have a utility class for those problematic tools that I inherit from, as well as the relevant Tool subclass
07:46 labster Yeah, I thought that boosting the performance might have something to do with the unboxing op, but it didn't seem so useful on other Str functions... maybe I'm just giving the dispatcher stronger hints.
07:46 jnthn labster: You are quite possibly also bringing things below the size limit for inlining.
07:46 arnsholt In Python it's just normal multiple inheritance, but it feels sort of like a role, but of course the utility class assumes that downstream classes also inherit from Tool
07:47 jnthn labster: Which both the JVM and MoarVM can perform.
07:47 labster Yeah, I had read about it in JVM, cool to know that Moar can pull the same trick.
07:56 jnthn In NFG news, I just got my 500 "code points -> NFG string -> code points" tests passing. :)
07:56 moritz \o/
07:58 rindolf joined #perl6
08:00 labster jnthn++
08:04 Ven jnthn++ :)
08:06 zjmarlow joined #perl6
08:09 sjn sweet!
08:10 alini joined #perl6
08:14 darutoko joined #perl6
08:16 FROGGS jnthn++ # \o/
08:22 bjz joined #perl6
08:23 andreoss joined #perl6
08:24 andreoss joined #perl6
08:27 dalek roast: c9d683a | jnthn++ | S15-nfg/test-gen.p6:
08:27 dalek roast: Script to generate some mass NFG tests.
08:27 dalek roast:
08:27 dalek roast: We look through the Unicode Normalization Tests for cases where the
08:27 dalek roast: NFC form contains non-starters, giving us some good candidates for
08:27 dalek roast: NFG tests. We then generate tests checking we get the correct results
08:27 dalek roast: for .chars, and that we can get back from NFG to codepoints. Mostly we
08:27 dalek roast: will be going to NFC, so we generate more tests for that, but produce
08:27 dalek roast: 100 each for the other forms too just to quickly sanity test them.
08:27 dalek roast: review: https://github.com/perl6/roast/commit/c9d683a3e1
08:29 dalek roast: 27b17e3 | jnthn++ | S15-nfg/mass- (5 files):
08:29 dalek roast: Add a bunch of NFG tests.
08:29 dalek roast:
08:29 dalek roast: Generated from the Unicode NormalizationTests.txt. They are emitted in
08:29 dalek roast: numbers that make them suitable for inclusion in a normal spectest run
08:29 dalek roast: rather than being stress tests.
08:29 dalek roast: review: https://github.com/perl6/roast/commit/27b17e3a6b
08:31 * masak is teaching Angular today
08:31 dalek nqp: f4f7adc | jnthn++ | tools/build/MOAR_REVISION:
08:31 dalek nqp: Bump MOAR_REVISION for latest NFG bits.
08:31 dalek nqp: review: https://github.com/perl6/nqp/commit/f4f7adc0c9
08:31 jnthn masak: Have fun :)
08:31 masak Angular is a lot like Perl 6. reckless, dangerous, self-consciously ugly, and "it's the magic that counts".
08:31 masak or, should I say, Perl in general.
08:31 moritz shouldn't it be called "Polar"? :-)
08:32 masak not sure I see why it should
08:32 masak the name refers to the <> things in HTML tags.
08:32 * moritz has been thinking in coordinate systems
08:32 masak ooh, and then you could have a web framework called Cartesian
08:33 masak and then someone unites Cartesian and Polar, and makes Cylindrical
08:33 masak and then someone somehow unites Polar with itself, and makes Toroidal
08:33 masak :P
08:33 nwc10 I can see a hole in that.
08:33 moritz and then Randall Munroe steps in, and starts to make map projection javascript frameworks :-)
08:34 dalek rakudo/nom: 3ac5c31 | jnthn++ | src/core/Uni.pm:
08:34 dalek rakudo/nom: Add Str method to Uni.
08:34 dalek rakudo/nom:
08:34 dalek rakudo/nom: Goes from a Uni (code point level) to an NFG string (soon!)
08:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3ac5c319b4
08:34 dalek rakudo/nom: 44daca2 | jnthn++ | src/core/Str.pm:
08:34 dalek rakudo/nom: Implement Str.[NFC|NFD|NFKC|NFKD].
08:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/44daca2cef
08:34 dalek rakudo/nom: 81fe3c3 | jnthn++ | tools/build/NQP_REVISION:
08:34 dalek rakudo/nom: Bump NQP_REVISION for Moar NFG bits so far.
08:34 dalek rakudo/nom:
08:34 dalek rakudo/nom: Certainly we're not all the way on NFG, but enough to pass a bunch of
08:34 dalek rakudo/nom: tests, and it's nice to get others running them for wider testing.
08:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/81fe3c31d3
08:35 masak nwc10: the best thing algebraic topology has done for me is to give me not just a normal intuition of what a hole is in a space, but also a *mathematical* intuition.
08:38 masak nwc10: my dad can't explain how the universe can have a "shape" if there's no (observable) "outside". but with enough mathematical background it's clear to me, even if I can't explain it to him.
08:42 dalek rakudo/nom: 5cfddf5 | jnthn++ | t/spectest.data:
08:42 dalek rakudo/nom: Run a bunch of NFG spectests on Moar.
08:42 dalek rakudo/nom:
08:42 dalek rakudo/nom: These all should pass with the work done so far.
08:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5cfddf562b
08:42 rarara joined #perl6
08:45 Rounin joined #perl6
08:52 moritz masak: re shape of the Universe, it reminds me of something a professor once said in a lecture...
08:52 moritz masak: it was about the question where the Big Bang happened
08:52 moritz masak: and the answer was that there are two equally valid models to think of the Universe expanding
08:53 moritz think of an expanding baloon
08:53 DrForr The entire *universe* is running away from me...
08:53 moritz and the first way of thinking is to equate the Universe with the baloon; so the Big Bang was everywhere that the Universe is now
08:53 moritz and the second way of think is to equate the Universe with the *surface* of that balooon
08:54 moritz and in that way of thinking, the Big Bang happened somewhere that's not even in the current Universe right now :-)
08:54 bjz joined #perl6
08:54 [TuxCM] joined #perl6
08:58 masak moritz: I'd heard the expanding balloon metaphor before, but I think I'd only heard it in the latter sense, with the universe being the surface.
08:59 masak moritz: my point is that, even if we restrict the universe to being just the surface, it's entirely possible to define things such as "positive curvature" without ever needing to refer to things that are not the surface.
08:59 * lizmat goes sightseeing and is looking forward to testing all the new good stuff late tonight
08:59 lizmat &
08:59 moritz masak: right; just the way that angles add up in a triangle is enough to observe curvature
09:00 masak right; and the behavior of parallel lines.
09:00 moritz aye
09:01 DrForr In your *face*, Euclid.
09:02 * masak .oO( in your *edge*, Euclid. in your *vertex*, Euclid. )
09:03 DrForr masak+=-(-2)
09:04 masak I'm still struggling a bit with the concept of homology, to be honest.
09:04 masak and don't even get me started on cohomology.
09:05 espadrine joined #perl6
09:07 RabidGravy while we're on the subject of euclid, what would be a good character for an operator for https://gist.github.com/jonathanstowe/ff0885b0841b39aeebed ?
09:08 RabidGravy i.e.   $somelistything = $slots <somechar> $fills
09:08 moritz erm, sorry, what does it do?
09:10 DrForr Well, the paper just uses E(x,y)...
09:10 RabidGravy if e.g.  slots is 16 and fills is five it makes 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0
09:11 RabidGravy my interest in it is for generating rhythmic pulse for musics
09:11 moritz well, we use x for repeating
09:11 moritz so $x x<mumble> $y
09:12 moritz and if it's about intervals, maybe xi ?
09:12 moritz or more 'x devided by y intervals', xd ?
09:12 DrForr $x x. $y # at least going by the results, though it'd be almost impossible to pick out in text.
09:12 moritz or x/
09:12 moritz or x%
09:15 RabidGravy yeah x% is visually distinct, cheers
09:23 andreoss` joined #perl6
09:26 rarara Are grammars normal objects? Is it possible to override parse() ?
09:26 moritz rarara: yes and yes
09:27 moritz rarara: a grammar is just a class that also inherits from class Grammar
09:27 moritz m: grammar G { }; say G.^mro
09:27 camelia rakudo-moar 5cfddf: OUTPUT«(G) (Grammar) (Cursor) (Any) (Mu)␤»
09:29 rarara ah ok, I just made my first perl6 grammar: a fastq format parser. Would like to try to see if it would be feasible to use it to parse files which only "mostly" parsable
09:31 sergot hi #perl6 \o
09:33 FROGGS hi sergot
09:34 rarara but subparse seems useful enough
09:41 rarara How do you iterate on a parse tree in a perl 6 grammar parse output?
09:43 cschwenz joined #perl6
09:44 ingy anyone know if tadzik is in Berlin still today?
09:44 FROGGS rarara: depends... yuo either want to use actions of loops
09:44 FROGGS bbiab
09:47 rarara Actions, right
09:53 Ven joined #perl6
09:55 nine ingy: I think I remember him saying that he'll go home this evening
09:55 rarara There is some thing which is confusing me in the documentation.
09:55 rarara From class grammar: If the action named argument is provided, it will be used as an action object, that is, for each successful regex match, a method of the same name (if it exists) is called on the action object, passing the match object as the sole positional argument.
09:56 rarara then there is the "made" method which let you get the result of action
09:56 rarara why would this method be needed?
10:00 brrt joined #perl6
10:00 rarara I guess it would be possible to define a Grammar class which doesn't automagically store anything useless in memory
10:01 nine .tell brrt What I would like to see in your grant proposal is some indication to the maintainability of your proposed new code. What would it take for someone to take over maintenance, should you lose interest?
10:01 yoleaux nine: I'll pass your message to brrt.
10:01 nine rarara: it is not needed. It is merely convenient.
10:02 brrt \o
10:02 yoleaux 10:01Z <nine> brrt: What I would like to see in your grant proposal is some indication to the maintainability of your proposed new code. What would it take for someone to take over maintenance, should you lose interest?
10:02 brrt nine, that is a good question. i'm afraid i can't ask karen to change the proposal, so i'll answer here
10:03 brrt in very general terms i *think* this should make it somewhat more maintainable
10:03 brrt as more of the work of the JIT will shift to higher-level constructs
10:04 brrt and i've found that there are not so many people willing and happy to dig into x86_64 assembly, which is the current form of much of the JIT code
10:04 brrt that said, the JIT will become more complex
10:04 * jnthn notes that at least two people besides brrt++ have worked on JIT code that was implemented last summer.
10:04 brrt that is very true
10:04 jnthn That probably gives it a higher bus number than some other bits of the VM.
10:05 brrt also true :-)
10:05 nine So maintainability of the current code is ok and your proposed changes would even improve that. Maybe you can put this in a comment on the proposal news?
10:06 brrt i can, or don't you mean me?
10:06 nine brrt: I do mean you
10:07 brrt it can definitively be improved though :-) but i'll do that
10:07 nine What jnthn said is probably good community input
10:07 donaldh joined #perl6
10:08 * jnthn will write a more general comment on the post at some point sonish :)
10:08 jnthn *soonish
10:09 brrt thanks :-)
10:09 brrt and i'd note that maintainability also depends crucially on subjective-quality-of-code
10:12 jnthn Well, there's also the matter of necesary complexity.
10:15 brrt true. and this does and will increase
10:17 brrt uh, that wasn't grammatical
10:23 diana_olhovik_ joined #perl6
10:23 jnthn Your grammar is and will improve :P
10:26 * Ven only looked at the JIT code during apw14, but didn't touch it...
10:27 brrt aw, that makes me feel sorry i couldn't be there
10:27 brrt i'd have loved to talk about it
10:29 Ven brrt: I tried to help timotimo fix a bug, but most of it flew over my head :-). bug turned out to be storing floats in the wrong register, IIRC
10:30 FROGGS jnthn: serialization question... if I serialize a single object be calling scsetobj($sc, 0, $obj), why are there more than object in the SC when deserializing it?
10:31 brrt well, that's where i could help and explain. x86_64 isn't really very difficult, or at least not as difficult as it's made out to be
10:31 brrt certainly not as difficult as 32 bit x86
10:32 alini joined #perl6
10:33 jnthn FROGGS: Because the SC ends up containing all the objects transitively found from those that you add
10:33 jnthn FROGGS: Excluding those that already belong to a different SC.
10:33 nine Is there a way to hook into serialization/deserialization of my module so I can for example replace CPointers on serialization and restore them on deserialization?
10:35 lolisa joined #perl6
10:35 PZt joined #perl6
10:35 brrt nine - if you mean the moarvm-native serialization, i don't think so, no
10:36 jnthn nine: Not really, though if you write code in a CHECK phaser you are not long before serialization and in an INIT one not long after.
10:36 jnthn uh, not long after deserialization in the second one.
10:36 brrt what is the CHECK phaser? :-o
10:36 jnthn Runs at the end of compilation, but before the optimizer gets its hands on the code
10:37 sqirrel joined #perl6
10:39 nine jnthn: would this work for fixing precomp issues?
10:40 nine And how can I detect if we're precompiling? INIT and CHECK will run as part of normal control flow, too.
10:41 nwc10 is there a difference?
10:41 FROGGS jnthn: but it should be safe just to put out the object in slot 0 ?
10:41 jnthn FROGGS: Yes
10:41 FROGGS k
10:41 nwc10 by which I mean, does Rakudo purposefully attempt to make it ireelevant whether compilation is happening for "right now" or "going to disk for later"
10:41 jnthn nwc10: Yes, pretty much
10:42 jnthn Only a handful of places burried in Perl6::World really care.
10:42 jnthn Well, and in HLL:Compiler so it knows not to run stuff, but write it to disk
10:42 telex joined #perl6
10:42 jnthn nine: If you're writing a module, then you may as well assume that is the case.
10:43 nine Inline::Perl5 and really any module that touches external state during BEGIN needs to care, too.
10:43 jnthn nine: Becuase most of the time it will have been installed and tus pre-compiled.
10:43 jnthn So I'd just always assume it's happening; at most you may do a little extra work when it doesn't.
10:46 nine jnthn: the extra work may be not so little. During precomp I have to record all the calls to perl5. After deserialization I have to initialize Perl 5 again and replay this log. And I may call PERL_SYS_INIT only once per process so I have to know if I already created a perl5 interpreter before in this process.
10:47 jnthn nine: Hmm...but hang on, is this about precomp of Inline::Perl5 itself, or things *using* Inline::Perl5?
10:48 rurban joined #perl6
10:49 nine jnthn: the latter
10:50 nine jnthn: precomp of a module that does for example use DBI:from<Perl5>; That creates an Inline::Perl5 (containing a CPointer) object and stores it in a package variable.
10:50 FROGGS Date::Holidays::DE::holidays(): Date::Calc::Easter_Sunday(): year out of range at ...
10:50 FROGGS grrrr!
10:50 FROGGS what bloody value is out of range?
10:50 jnthn nine: Ah. That's a rather different question...
10:51 FROGGS it had been helpful if it has told me that 'undef' is pretty much out of range
10:56 nine jnthn: I'm all ears for ideas :)
11:05 pdcawley joined #perl6
11:06 nine Python people discussion adding multiplicity and maybe using it for multi-threading and the realization that they may have not broken enough to make Python 3 interesting: http://lwn.net/Articles/640179/
11:06 nine And a link for those who do not yet have an LWN subscription (you really should get one!): http://lwn.net/SubscriberLink/640179/ab08329f0b138f48/
11:09 nine nwc10: ^^^
11:12 moritz nine: iirc we've had that link here before
11:12 moritz (maybe not LWN, but the mailing list where it was posted originally)
11:12 dalek perl6-examples: bde7fe2 | paultcochrane++ | categories/cookbook/ (13 files):
11:12 dalek perl6-examples: Add TITLE and AUTHOR to all cookbook examples
11:12 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/bde7fe2a93
11:12 dalek perl6-examples: 1d00fd2 | paultcochrane++ | categories/games/ (3 files):
11:12 dalek perl6-examples: Add missing 'use v6' statements and vim codas to game examples
11:13 [ptc] now at least all perl6-examples are documented to a minimal extent
11:13 dalek joined #perl6
11:14 chenryn joined #perl6
11:15 jnthn nine: Is it just about "use Foo:from<Perl5>" or are there other cases?
11:16 dayangkun joined #perl6
11:18 colomon joined #perl6
11:18 mephinet joined #perl6
11:18 nine jnthn: that's certainly the most important use case. But I guess, modules will want to EVAL Perl 5 code during compilation to create some adaptors.
11:19 jnthn nine: OK, I could imagine doing something with the first in the Perl 5 module loader somehow...the latter I've no idea how to do, especially given there may be references back to Perl 6 objects too...
11:24 nine jnthn: references back to Perl 6 objects may not be that much of a problem because Perl 6 objects are referenced by an index into a purely Perl 6 array: https://github.com/niner/Inline-Perl5/blob/master/lib/Inline/Perl5.pm6#L43
11:25 jnthn Ah, ok
11:31 dalek roast: 12350f7 | jnthn++ | S15-nfg/ (2 files):
11:31 dalek roast: Generate NFG string euqality tests.
11:31 dalek roast:
11:31 dalek roast: Again, using the Unicode normalization tests as the base. This time,
11:31 dalek roast: we look for cases where there are two distinct non-starters, swap
11:31 dalek roast: them around, and test for equality/inequality depending on if the two
11:31 dalek roast: things we swapped have an identical Canonical_Combining_Class.
11:31 dalek roast: review: https://github.com/perl6/roast/commit/12350f76bb
11:33 pdcawley joined #perl6
11:34 _mg_ joined #perl6
11:43 andreoss` m: my $rx = "\d\d6"; say (666 ~~ /$rx/).perl;
11:43 camelia rakudo-moar 5cfddf: OUTPUT«5===SORRY!5===␤Unrecognized backslash sequence: '\d'␤at /tmp/tPFw3ioXjz:1␤------> 3my $rx = "\7⏏5d\d6"; say (666 ~~ /$rx/).perl;␤Unrecognized backslash sequence: '\d'␤at /tmp/tPFw3ioXjz:1␤------> 3my $rx = "\d\7⏏5d6"; say (666 ~~…»
11:44 jnthn Use single quotes there
11:45 jnthn Or some other non-backslash-interpreting quoting construct.
11:45 andreoss` still doesn't match
11:45 moritz /<$rx>/
11:45 jnthn Sure
11:45 jnthn 'cus...what moritz said :)
11:50 nwc10 I don't remember reading a mail message with the content of that link before
11:52 andreoss` regexes cannot be used as a hash key?
11:52 andreoss` m: my $rx = /<\d>/; my %h; %h{$rx} = 1; say %h.perl;
11:52 camelia rakudo-moar 5cfddf: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/0pnnZmxytF:1␤------> 3my $rx = /<7⏏5\d>/; my %h; %h{$rx} = 1; say %h.perl;␤Unrecognized regex metacharacter \ (must be quoted to match literally…»
11:52 nine nwc10: you talking about the lwn.net link?
11:52 andreoss` m: my $rx = /\d/; my %h; %h{$rx} = 1; say %h.perl;
11:52 camelia rakudo-moar 5cfddf: OUTPUT«Code object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/_6HULosYX5:1␤␤{"" => 1}<>␤»
11:53 moritz m: my $rx = /\d/; my %h{Any}; %h{$rx} = 1;
11:53 camelia rakudo-moar 5cfddf: ( no output )
11:53 nwc10 yes, the lwn.net link
11:53 moritz andreoss`: works if you declare the hash to be of type Any (or Regex, for that matter)
11:53 moritz andreoss`: though that approach seems to suggest that you're still think of regexes as glorified strings. They aren't.
11:53 moritz they are more like glorified methods
11:54 nine nwc10: that's an original lwn.net report about the Python Language Summit
11:54 nwc10 "Guido van Rossum famously said that Python would never merge Stackless" - why?
11:54 nwc10 aha OK. Me, context, confused.
11:54 nwc10 clearly I'm not built for multiplicity
11:54 nine nwc10: "because it would complicate life for Jython, IronPython, PyPy, and others, Hastings said" futher down in the article
11:55 nwc10 nine: thanks. Maybe I should stack my questions, and only ask the ones still unresolved at the end. :-)
11:55 nwc10 or, maybe I just make more coffee
11:55 nine I find the dlmopen suggestion interesting. At least because it would maybe allow Inline::Python to do what python cannot ;)
11:56 nwc10 I independantly thought about it a few days ago. In theory you can load more than one python interpreter (eg a 2 and a 3)
11:56 nine nwc10: the whole coverage of the Python Language Summit is interesting to read. I can send you more subscriber links if you want
11:56 nwc10 but I think that you utteryl confuse any C-based extension
11:56 nwc10 because it has no idea which version it might find itself calling
11:57 nwc10 Gisle said you have the same problem with (at least) Win32 embedded thingies that want to embed Perl (5)
11:57 nwc10 and different thingies want to embed a different version
11:57 nwc10 nine: do the links become public access in a week or two?
11:58 nine nwc10: yes. Should become public this Thursday or Friday even. I'm currently catching up on the reading I postponed during the QA hackathon
11:59 nwc10 nine: I'd prefer to wait, rather than cheat.
11:59 brrt joined #perl6
12:00 * nwc10 is amused by
12:00 nwc10 Something compelling in python 2.7, however, is stability. I can write code in 2.7 and I am certain that I won't need to change it until 2020. Can the same thing be said for 3.4? Maybe not: https://docs.python.org/dev/whatsnew/3.5.html#deprecated
12:01 nine nwc10: it's not cheating. Subscriber links are an explicit feature provided to spread interesting articles to non-subscribers and maybe attract them to subscribe.
12:01 * nwc10 had half joked a few months back that python *2* is an ideal business choice for starting something new, because no-one is going to change it under you
12:02 nine The "subscriber link" mechanism allows an LWN.net subscriber to generate a special URL for a subscription-only article. That URL can then be given to others, who will be able to access the article regardless of whether they are subscribed. This feature is made available as a service to LWN subscribers, and in the hope that they will use it to spread the word about their favorite LWN articles. If this feature is abused, it will hurt LWN
12:02 nine nwc10: that's no joke anymore :) I've seen people call that an attractive feature
12:03 nwc10 this appears to be one such person: http://lwn.net/Articles/640534/
12:03 nine There are three versions of Python in use at this point: 2.6, 2.7, and everything else. Based on some Python Package Index (PyPI) data that he gathered (which was a few months old; he also admitted the methodology he used was far from perfect), Python 2.7 makes up the majority of the downloads, while 2.6 has a significant but far smaller chunk, as well. All the other Python versions together had a smaller slice than even 2.6.
12:03 psch \o
12:04 * psch wonders about RT #116280
12:05 * moritz uses mostly python 3.4 at $work, though it's a pretty new project
12:05 psch specifically, if it can or should be solved by having Perl 6 level sprintf, because Perl 6 Ints should know Inf, and NQP currently misconverts Inf as BI
12:05 psch but that's probably a bit backwards, as NQP sprintf should be able to deal properly with Inf as well
12:09 nwc10 nine: where's that "three versions" quote from? It doesn't seem to be that article
12:09 [ptc] moritz: what's python 3 like to work with?  I'm stuck with python 2 at $work currently
12:10 nwc10 nine: oh, google finds a link :-)
12:10 moritz [ptc]: I don't know python 2 much, so I can't compare well
12:10 [ptc] ah, ok
12:10 moritz [ptc]: though a small part of the project must support both 2 and 3, and that's a pain (IMHO)
12:10 [ptc] moritz: I can imagine
12:11 moritz writing six.u('foo') instead of 'foo' is quite annoying
12:19 rmgk_ joined #perl6
12:19 dalek ecosystem: 67e6c32 | (Jonathan Stowe)++ | META.list:
12:19 dalek ecosystem: Add Log::Syslog::Native
12:19 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/67e6c32c7f
12:20 RabidGravy totally shite but hey
12:26 RabidGravy psch, I was wonndering about sprintf last night.  So now it's implemented only in nqp?
12:26 RabidGravy specifically I was wondering whether there was a way to programmatically extend the format codes
12:27 psch RabidGravy: nqp/src/HLL/sprintf.nqp is our implementatin
12:27 psch +o
12:28 RabidGravy right
12:28 * RabidGravy looks
12:32 psch RabidGravy: as for the actual question, i don't think format codes are easily extendable currently
12:33 RabidGravy yeah, that was my thought looking at it
12:34 RabidGravy but if the grammar and actions weren't private then it would be possible
12:36 FROGGS you can port it to Perl 6 of course...
12:37 RabidGravy my actual rationale behind wanting to do this for example would be something like a log appender where you might want to add a '%H' say for hostname and %P for PID and so forth
12:38 RabidGravy of course one could always do that the dumb way
12:41 dalek perl6-roast-data: 49d920a | (Heiko Jansen)++ | perl6_pass_rates.csv:
12:41 dalek perl6-roast-data: Update perl6_pass_rates.csv
12:41 dalek perl6-roast-data:
12:41 dalek perl6-roast-data: Remove redundant data from revisions bfcb510 and 578f6b4 (from triple commits on Apr. 9th) so GitHub auto formatting works again.
12:41 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/49d920a1f2
12:41 dalek perl6-roast-data: 8505d4c | (Will Coleda)++ | perl6_pass_rates.csv:
12:41 dalek perl6-roast-data: Merge pull request #6 from heikojansen/patch-1
12:41 dalek perl6-roast-data:
12:41 dalek perl6-roast-data: Update perl6_pass_rates.csv
12:41 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/8505d4ce6e
12:42 RabidGravy FROGGS, on the face of it that doesn't look that difficult, though I'm sure there's some catch I missed
12:42 FROGGS RabidGravy: you can first parse+remove the newly added directives and then pass it off to the nqp implementation
12:42 FROGGS no, there should be a catch I think
12:42 FROGGS not*
12:43 RabidGravy :)
12:45 FROGGS pesky little words :o)
12:46 xfix joined #perl6
12:50 RabidGravy FROGGS, your latter suggestion was my "dumb way"
12:50 RabidGravy ;-)
12:50 FROGGS :o)
12:51 Ven is there any abstraction (maybe in the ecosystem) to parse something with precedence?
12:52 FROGGS Ven: v5 has EXPR
12:53 FROGGS though it might be hard to rip out
12:57 rurban joined #perl6
13:01 Ven FROGGS: the v5 grammar is somewhat crazy :o)
13:01 Ven or very long, at least
13:03 nine Perl 5 grammar is somewhat crazy ;)
13:04 FROGGS it is not much worse than P6's grammar
13:04 FROGGS (file size wise)
13:05 Ven FROGGS: I'm just wondering how to parse infixes "cleanly" without infinite loops :)
13:05 Ven token expr { <expr> + % <op> } is cool, but.. :P
13:06 FROGGS I just know about EXPR, which also guesses pre- and postfixes nicely
13:07 Rounin joined #perl6
13:10 aborazmeh joined #perl6
13:10 aborazmeh joined #perl6
13:12 dalek roast: 6e1d6a3 | jnthn++ | S15-nfg/case-change.t:
13:12 dalek roast: Some very basic NFG case-change tests.
13:12 dalek roast: review: https://github.com/perl6/roast/commit/6e1d6a38df
13:17 RabidGravy joined #perl6
13:20 andreoss joined #perl6
13:21 andreoss is there a method to mesure a wallclock time of block execution?
13:22 andreoss clock { BLOCK }  or something
13:23 andreoss i could use profiler, but not willing to leave repl
13:23 jnthn There's a benchmark module, iirc. Otherwise, there's "code; say now - INIT now" or so
13:24 jnthn Maybe "now - ENTER now" is better in the REPL
13:30 andreoss m: sub  clock(&B) { my $now = now; &B() ; warn $now - now  }; clock { sleep 1 };
13:30 camelia rakudo-moar 5cfddf: OUTPUT«-1.0008718  in sub clock at /tmp/X216dAoWzT:1␤␤»
13:30 andreoss okay
13:33 RabidGravy I'm sure there's some solution involving monkey patching Block but I can't get there at the moment ;-)
13:35 RabidGravy it appears that there are 8 modules in the META.list that don't appear in the modules list for one reason or another
13:38 andreoss is there someting nicier than .gist and .perl for blocks?
13:39 jnthn Define "nicer"
13:42 RabidGravy tony-o, you around?
13:42 nine jnthn: probably something that includes the source code?
13:44 andreoss this, like B::Deparse->coderef2text
13:44 jnthn No, there's no way to do that.
13:45 jnthn Probably at some point somebody will write a prama-y module using some macro-y trick that attaches the source.
13:45 jnthn We don't keep anything around that we can deparse though.
13:45 nwc10 nor does perl 5 really.
13:46 nwc10 B::Deparse is a cunning hack that generates "code that would compile to the same thing"
13:46 nwc10 (modulo bugs in it)
13:46 muraiki joined #perl6
13:47 jnthn An op tree still makes that cunning hack more plausible than the bytecode of whatever VM we happen to be running on.
13:47 nwc10 but pmichaud_
13:48 nwc10 but pmichaud demonstrated decoding PIR to LOLCODE
13:48 jnthn eww :)
13:48 nwc10 so presuambly it can also be done for MoarVM
13:48 jnthn Oh, I don't think he did though
13:48 jnthn It was a QAST level, no?
13:48 nwc10 oh, maybe I'm misremembering
13:49 nwc10 OK, lets watch: https://www.youtube.com/watch?v=DzpSREpLJY8
13:53 nwc10 I CAN HAZ LOCODE ON NQP?
13:53 nwc10 jnthn: you remembered correctly.
13:53 masak "`make` is an implementation of *constructive logic programming*, using the following instantiation of the 'Propositions-as-X' paradigm" -- interesting. -- http://bentnib.org/posts/2015-04-17-propositions-as-filenames-essence-of-make.html
13:57 nwc10 pmichaud_++ # LOLCODE still fun
13:57 masak pmichaud_++ # amazing lightning talk, too
13:57 nwc10 so good it bent time.
13:57 masak funny *and* educational.
13:59 andreoss joined #perl6
14:00 * brrt thinks fosdem is never going to upload the languages sessions
14:01 FROGGS brrt: an hour ago I checked the status page again and sighed... as usual
14:01 * masak .oO( tossed dem )
14:01 brrt masak: lol
14:16 dalek roast: 1977cfe | jnthn++ | S15-nfg/regex.t:
14:16 dalek roast: Baisc tests for regex + grapheme interaction.
14:16 dalek roast: review: https://github.com/perl6/roast/commit/1977cfe0f3
14:28 Khisanth joined #perl6
14:31 dalek nqp: 53d43e8 | jnthn++ | tools/build/MOAR_REVISION:
14:31 dalek nqp: Bump MOAR_REVISION for more NFG work.
14:31 dalek nqp: review: https://github.com/perl6/nqp/commit/53d43e830e
14:32 diana_olhovik_ joined #perl6
14:32 dalek rakudo/nom: f23bc73 | jnthn++ | tools/build/NQP_REVISION:
14:32 dalek rakudo/nom: Bump NQP_REVISION for Moar NFG improvements.
14:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f23bc73208
14:32 dalek rakudo/nom: 958ffbf | jnthn++ | t/spectest.data:
14:32 dalek rakudo/nom: Run 3 more NFG-related spectests.
14:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/958ffbf6ed
14:33 andreoss m: my @x := True xx *; say @x.kv[0,1];
14:33 camelia rakudo-moar 5cfddf: OUTPUT«0 True␤»
14:34 moritz m: my @x := True xx *; say @x[0]:kv
14:34 camelia rakudo-moar 5cfddf: OUTPUT«0 True␤»
14:34 andreoss im getting "Cannot call method 'kv' on a null object
14:34 andreoss with .kv on infinite list
14:34 moritz andreoss: how old is your rakudo?
14:35 andreoss 2015.03
14:36 andreoss on Windows
14:36 nine ancient ;)
14:37 moritz star-m: my @x := True xx *; say @x.kv[0,1];
14:37 camelia star-m 2015.03: OUTPUT«0 True␤»
14:37 moritz works with 2015.03 here
14:38 andreoss yep, looks like a repl issue
14:38 andreoss works in one line, but doesn't in two
14:40 FROGGS the repl has problems with bindings
14:42 moritz andreoss: well, with two lines, it tries to print the return value form the first line
14:42 moritz andreoss: which is unfortunate, since it's infinite
14:52 brrt this is also a really nice article: http://www.monkeysnatchbanana.com/2015/04/19/of-debt-and-decisions/
14:53 brrt (it's about how somebody ended up patching mysql and the linux kernel for a groupware application in a box)
14:53 brrt from which the lesson (for me at least) is: 'wow, it's awesome that this is possible'
15:01 nine The sad truth is: sometimes technical debt really is acceptable and indeed preferable.
15:02 moritz I think there's some tradeoff here; trying to avoid *all* technical debt is exponentially more work than avoiding most technical debt
15:03 andreoss can i slice with infinite list?
15:03 moritz didn't work last I tried
15:08 nine moritz: true. And despite having spent years to clean up my predecessor's mess at $dayjob, I'm still absolutely convinced that he did the right thing back then. Had he developed in my way back then, the company may not have survived to enjoy the benefits of good code.
15:09 brrt i'm not sure if that truth is sad or not
15:09 brrt :-)
15:10 dalek roast: a80ad64 | coke++ | / (6 files):
15:10 dalek roast: auto-unfudge.
15:10 dalek roast:
15:10 dalek roast: The one marked as sometimes hanging or segfaulting is currently doing
15:10 dalek roast: neither.
15:10 dalek roast: review: https://github.com/perl6/roast/commit/a80ad649c1
15:10 brrt it's sad if you believe (not unreasonably) that code quality is a primary valuable characteristic of a codebase
15:10 andreoss any sieve implementation i've came up so far is slower than just checking every number for primes with .is-prime. is it supposed to be that way?
15:10 cschwenz joined #perl6
15:11 [Coke] t/04-nativecall/02-simple-args.t   (Wstat: 512 Tests: 12 Failed: 2) Failed tests:  10-11
15:11 nine brrt: I don't even have to believe that. I just like good code :)
15:11 [Coke] is-prime is meant to be fast, if that's what you mean.
15:12 [Coke] getting nativecall test failures on os x. I don't normally run make test, typically spec or stress
15:13 brrt [Coke] - you should probably check if it's related to serialisation format change
15:13 [Coke] brrt: how?
15:14 brrt if you run them directly (without the test runner) and they complain about serialisation failure, then that's it :-)
15:17 btyler joined #perl6
15:18 anocelot joined #perl6
15:19 gfldex joined #perl6
15:20 hoelzro o/ #perl6
15:20 cschwenz o/ hoelzro :-)
15:21 brrt \o hoelzro
15:21 araujo joined #perl6
15:21 araujo joined #perl6
15:22 hoelzro ahoy cschwenz and brrt!
15:23 andreoss examples.perl6.org should have answers for project euler tasks under the spoiler
15:23 cschwenz ahoy matey!  Yarrrr!
15:24 [Coke] brrt: nope: # Failed test 'passed uint8 0xFE'
15:24 [Coke] # at t/04-nativecall/02-simple-args.t line 50
15:24 [Coke] # expected: '10'
15:24 [Coke] #      got: '0'
15:24 [Coke] not ok 11 - passed uint8 0xFFFE
15:24 [Coke] er, that was actually the failure for #10 there.
15:25 skids joined #perl6
15:27 [Coke] only tests 10,11 fail. everything else in the file is fine
15:28 FROGGS I guess these two tests are the only tests about unsigned int8?
15:29 [Coke] looks like t/spec/S02-magicals/progname.t is creating the directory GNOREME.
15:38 * [Coke] adds 2 to the open ticket count.
15:38 FROGGS [Coke]++
15:40 grondilu joined #perl6
15:44 andreoss left #perl6
15:45 dalek rakudo/nom: bd046ec | jnthn++ | src/Perl6/World.nqp:
15:45 dalek rakudo/nom: Toss dead code.
15:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bd046ecf2e
15:45 dalek rakudo/nom: 6f8d283 | jnthn++ | src/Perl6/Actions.nqp:
15:45 dalek rakudo/nom: Avoid creating WVal for non-SC object.
15:45 dalek rakudo/nom:
15:45 dalek rakudo/nom: Fixes RT #124304 (sigilless vars could work out badly in an EVAL).
15:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6f8d283f91
15:46 jnthn [Coke]: integration/advent2014-day05.t now hangs for me.
15:46 dalek roast: 0782842 | jnthn++ | S29-context/eval.t:
15:46 dalek roast: Add test for RT #124304.
15:46 dalek roast: review: https://github.com/perl6/roast/commit/0782842534
15:47 [Coke] jnthn: dammit, it worked on my fiddly os. :)
15:47 [Coke] I'll refudge it.
15:49 flussence .tell andreoss .is-prime calls down to mp_prime_is_prime() in libtommath, so you're going to have no chance of beating it for speed using perl6 code.
15:49 yoleaux flussence: I'll pass your message to andreoss.
15:50 TimToady well, he could native-call down to the same function, and nearly tie for speed :)
15:51 colomon joined #perl6
15:51 dalek roast: 361a73b | coke++ | integration/advent2014-day05.t:
15:51 dalek roast: re-fudge. works for Coke, hangs for jnthn++
15:51 dalek roast: review: https://github.com/perl6/roast/commit/361a73b6ab
15:52 hoelzro when is 2015.04 supposed to go out?
15:52 [Coke] thursday
15:52 hoelzro hmm
15:52 hoelzro any chance someone could look at my tab completion branch by then? it would be great if it could make it into the release!
15:53 [Coke] "thursday after the 3rd tuesday", even though the reason we did that isn't happening anymore.
16:02 moritz we just haven't had a reason to change the release date
16:04 grondilu btw in the REPL standard shortcuts like Alt-B, Alt-D and so on do not function.  On GNU/Linux that is.
16:04 flussence which standard is that?
16:04 grondilu readline
16:04 grondilu standard in the Unix sense.
16:05 grondilu I mean come on, it's really basic stuff we see everywhere else.
16:05 grondilu that's part of the reason I never use the REPL anyway.
16:07 * [Coke] honestly doesn't know what alt-b and alt-d are supposed to do.
16:08 tony-o RabidGravy: yes
16:08 grondilu back a word and delete a word.  How do you do that on your system and does it work with the REPL?
16:09 grondilu (please don't tell me you're using your mouse)
16:09 geekosaur [Coke]: emacs style command editing
16:09 spider-mario joined #perl6
16:10 RabidGravy tony-o, hi, I put an "issue" on your Event::Emitter module, suggesting that I merge what I did with yours
16:10 tony-o RabidGravy: i'll take a look
16:10 grondilu tony-o: http://www.bigsmoke.us/readline/shortcuts
16:11 grondilu tony-o: sorry, that was intended to [Coke]
16:11 tony-o grondilu: did you mean that for someone else?
16:11 tony-o ah :-)
16:11 tony-o :wq
16:12 RabidGravy I've done one of the roles already, should be good with the other in a few minutes :)
16:13 [Coke] ^W deletes the word (to the left)
16:13 tony-o RabidGravy: merging it - thank you
16:13 andreoss joined #perl6
16:14 [Coke] I don't know if linenoise has a "move left one word" shortcut.
16:15 RabidGravy tony-o, there'll be another PR with the additional roles in a bit and if you're cool with that I'll remove the EventEmitter from the modules list
16:16 hoelzro the shortcuts that linenoise supports are indicated here: https://github.com/hoelzro/p6-linenoise/blob/master/linenoise.c#L770
16:16 RabidGravy no point in having two almost identical packages
16:18 grondilu hoelzro: ok, noted.
16:19 * grondilu doesn't know why linenoise is used instead of readline but he assumes there are reasons.
16:21 hoelzro grondilu: licensing
16:22 hoelzro although we could probably use libedit to solve the compatability and licensing issues
16:27 captain-adequate joined #perl6
16:31 captain-adequate joined #perl6
16:36 dalek rakudo/nom: a75917e | jnthn++ | t/02-rakudo/repl.t:
16:36 dalek rakudo/nom: Make REPL tests robuster for Windows.
16:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a75917e9b7
16:36 dalek rakudo/nom: da0f895 | jnthn++ | src/Perl6/ (2 files):
16:36 dalek rakudo/nom: Don't lower UNIT lexicals from the REPL.
16:36 dalek rakudo/nom:
16:36 dalek rakudo/nom: Unbusts binding in the REPL, fixing RT #122914.
16:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/da0f8959f2
16:36 dalek rakudo/nom: 15bb095 | jnthn++ | t/02-rakudo/repl.t:
16:36 dalek rakudo/nom: REPL tests for RT #122914.
16:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/15bb095e83
16:38 zjmarlow joined #perl6
16:38 timotimo oooh
16:38 timotimo that's a nice fix, jnthn!
16:38 timotimo that'll allow so many people to try out infinite list things without stumbling over the repl being strange
16:38 jnthn yeah, figured I should hunt it down
16:39 jnthn Took a bit to find 'cus my first guess was that it was related to the sigilless vars in EVAL bug that FROGGS reported over the weekend
16:39 jnthn But it turned out to be somethiung else entirely.
16:39 jnthn Also those REPL tests I add actually pass on Windows.
16:39 jnthn I think we don't run that test file, however.
16:40 jnthn It uses fudge markers when it should probably use normal todo
16:40 MARTIMM joined #perl6
16:42 timotimo jnthn: could i perhaps steal a shred of jnthntime to get that superfluous decont fixed for local/localref?
16:43 dalek rakudo/nom: ee1e718 | jnthn++ | t/02-rakudo/repl.t:
16:43 dalek rakudo/nom: Use normal todo markers in REPL tests.
16:43 dalek rakudo/nom:
16:43 dalek rakudo/nom: It's not in spectest, so fudge don't apply here.
16:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ee1e71823d
16:43 timotimo (after that i should be able to make the lexical stuff work somewhat easily?)
16:44 jnthn timotimo: I kinda need to eat now, but could look into that after dinner.
16:45 timotimo that'd be swell :)
16:45 timotimo i also have a bit of errands and the weekly to keep me entertained in the mean time
16:46 jnthn Yeah, it's time for me to write up another weekly report today too :)
16:55 jnthn dinner &
17:03 [Coke] psch: https://github.com/rakudo/rakudo/commit/20e95b6239ece7a451f498ba0fbc795fb92055c1 - when do we have fudged test files not in t/spec ?
17:05 psch [Coke]: that's t/02-rakudo/repl.t — jnthn said a few minutes ago it should "use normal todo"?
17:06 psch where "that's" means "i added a test file that, when ran manually, produces a fudge file"
17:06 psch actually, i think bartolin_++ added it
17:06 psch but i fudged in there
17:07 psch anyway, point being, if there's a different mechanism (or there's none needed because we don't run it by default) i didn't know about it
17:07 vendethiel joined #perl6
17:11 mohij joined #perl6
17:12 eli-se joined #perl6
17:13 grettis joined #perl6
17:19 mr-foobar joined #perl6
17:34 prammer joined #perl6
17:40 telex joined #perl6
17:41 b2gills I've seen both `... () returns Type {...}` and `... ( --> Type ) {...}` in the Rakudo source, I wonder if one of them should be the standard ( at least within the Rakudo source files )
17:42 TimToady there are arguments for both sides :)
17:43 TimToady it really depends on whether you think about the signature as only being for dispatch, or as something that specifies the whole API
17:43 TimToady I tend to like --> for the latter reason
17:44 TimToady "here are the inputs and outputs"
17:45 TimToady but it does confuse people sometimes into thinking that return values participate in MMD
17:46 TimToady so we haven't really taken a stand one way or the other
17:46 TimToady and, there is in fact a third way, which is more of a C-style
17:46 TimToady my Type sub foo () {...}
17:46 FROGGS joined #perl6
17:46 dalek specs: 6e08690 | (Stéphane Payrard)++ | S99-glossary.pod:
17:46 dalek specs: added MAIN entry and (empty) YOU_ARE_HERE
17:46 dalek specs: review: https://github.com/perl6/specs/commit/6e086901a7
17:48 vendethiel m: sub f of Int { 5 }; say f; # b2gills
17:48 camelia rakudo-moar ee1e71: OUTPUT«5␤»
17:48 vendethiel 4th way, as well :-)
17:48 TimToady m: my $f = -> Int $a, Int $b --> Real { $a / $b }; say $f(1,2)
17:48 camelia rakudo-moar ee1e71: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jSsyAKLWfc␤Missing block␤at /tmp/jSsyAKLWfc:1␤------> 3my $f = -> Int $a, Int $b --> Real7⏏5 { $a / $b }; say $f(1,2)␤»
17:48 b2gills Of course in Perl 6 there is no standard, but seeing two of the many ways mixed in the same source file is not great
17:49 TimToady looks like lambda doesn't hanlde --> right yet
17:49 TimToady std: my $f = -> Int $a, Int $b --> Real { $a / $b }; say $f(1,2)
17:49 camelia std 28329a7: OUTPUT«ok 00:00 144m␤»
17:49 TimToady note that --> is the only way to give a return type for a ->
17:51 TimToady well, maybe not
17:51 TimToady std: my $f = -> Int $a, Int $b { also returns Real; $a / $b }; say $f(1,2)
17:51 camelia std 28329a7: OUTPUT«ok 00:00 144m␤»
17:51 TimToady m: my $f = -> Int $a, Int $b { also returns Real; $a / $b }; say $f(1,2)
17:51 camelia rakudo-moar ee1e71: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6GaDofZvgv␤Cannot call trait_mod:<returns>(Block, Real); none of these signatures match:␤    (Routine:D $target, Mu:U $type)␤at /tmp/6GaDofZvgv:1␤»
17:52 TimToady why is it not a Block?
17:52 TimToady so there's yet another way :)
17:53 TimToady well, unless you count it the same as 'returns' outside the block
17:54 b2gills I was just saying that the Rakudo source should perhaps be a bit more homogeneous
17:55 TimToady oh, wait, that's the call that is Block, so that's right
17:56 atweiden joined #perl6
17:57 TimToady b2gills: I'm not too worried about it, epecially if the documentation tools can turn the 'returns' form into the '-->' form for presentation to the user
17:58 itz_ joined #perl6
17:58 TimToady at the moment the source code reflects more of the implementation view rather that the API view
18:03 [Coke] psch: yah, there's no fudging if it's not in t/spec, so those are just comments.
18:08 [Coke] jnthn: all those tests pass here, no need for todo.
18:10 dolmen joined #perl6
18:11 [Coke] oh, they're not run in make test. arglebargle.
18:22 yvan1 joined #perl6
18:23 molaf joined #perl6
18:24 atweiden i'm trying to convert an array of unknown length @arr = "one", "two", "three"
18:24 atweiden to %h<one><two><three>...
18:24 atweiden should i be using a macro for this?
18:24 moritz a sinmple function will do
18:25 atweiden how to return <one><two><three> from a function?
18:25 diana_olhovik joined #perl6
18:25 vendethiel m: my %h; my @a = <one two three>; %h{||@a} = 1; say %h.perl
18:25 camelia rakudo-moar ee1e71: OUTPUT«5===SORRY!5===␤Arg-flattening | is only valid in an argument list␤at /tmp/WfpndeHWxC:1␤------> 3my %h; my @a = <one two three>; %h{|7⏏5|@a} = 1; say %h.perl␤Arg-flattening | is only valid in an argument list␤at /tmp/WfpndeHWxC:1␤-----…»
18:25 TimToady NYI
18:25 vendethiel aw :-)
18:26 moritz m: sub deref(%h, *@k) is rw { my $h = %h; $h = $h{$_} for @k; $h }; deref(my %x, <one two three>) = 42; say %x.perl
18:26 camelia rakudo-moar ee1e71: OUTPUT«{}<>␤»
18:27 moritz m: sub deref(%h, *@k) is rw { my $h = %h; $h = $h{$_} for @k; $h }; my %x = one => (two => (three => 42)); say deref(%x, <one two three>);
18:27 camelia rakudo-moar ee1e71: OUTPUT«42␤»
18:28 moritz at least works as an rvalue
18:28 atweiden i need it as lvalue
18:29 moritz sorry, can't debug it for you right now (screaming baby on the lap)
18:29 moritz m: sub deref(%h, *@k) is rw { my $h := %h; $h := $h{$_} for @k; $h }; deref(my %x, <one two three>) = 42; say %x.perl
18:29 camelia rakudo-moar ee1e71: OUTPUT«{:one({:two({:three(42)})})}<>␤»
18:29 moritz ah, binding helps
18:30 atweiden thank you, that is awesome
18:30 El_Che moritz: the screaming baby sounds like a perl syntax joke )
18:30 El_Che :)
18:31 RabidGravy tony-o, sent big PR as mentioned before :)
18:31 eli-se joined #perl6
18:32 Sqirrel joined #perl6
18:34 moritz El_Che: no, the real Ms. 1 is getting her teeth
18:34 aborazmeh joined #perl6
18:34 aborazmeh joined #perl6
18:37 El_Che moritz: fun time. I remember
18:38 vendethiel TimToady: did you look at what it'd take (amount-of-work-wise) for implementing "prefix:<||>" when doing LOLLY?
18:38 vendethiel (I also think that the current prefix:<|> misses some specific semantics? I can't remember, they do quite a lot...)
18:39 dalek perl6-roast-data: 4c934fd | coke++ | / (9 files):
18:39 dalek perl6-roast-data: today (automated commit)
18:39 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/4c934fd4db
18:39 dalek perl6-roast-data: 0aceb1f | coke++ | / (2 files):
18:39 dalek perl6-roast-data: today (automated commit)
18:39 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/0aceb1ff9f
18:39 TimToady vendethiel: no, didn't look at that yet
18:42 TimToady and actually, it's mouq++ that did the subscripting part of it
18:43 vendethiel ooh. Mouq++ :-)
18:45 aindilis joined #perl6
18:46 dalek nqp/mast_localref_2: e2fc716 | timotimo++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
18:46 dalek nqp/mast_localref_2: localrefs are always in object registers
18:46 dalek nqp/mast_localref_2: review: https://github.com/perl6/nqp/commit/e2fc716b65
18:46 dalek nqp/mast_localref_2: 13967fc | timotimo++ | t/moar/02-qast-references.t:
18:46 dalek nqp/mast_localref_2: this loop'll give you spesh log output for the tests
18:46 dalek nqp/mast_localref_2: review: https://github.com/perl6/nqp/commit/13967fc7a2
18:48 aindilis joined #perl6
18:53 aindilis joined #perl6
18:57 brrt joined #perl6
18:58 anaeem1 joined #perl6
18:59 tony-o RabidGravy: merged your E:E PR
18:59 RabidGravy coolio
19:00 dalek rakudo/nom: b629299 | TimToady++ | src/Perl6/Grammar.nqp:
19:00 dalek rakudo/nom: allow ws after --> Type in signature
19:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b62929991f
19:03 masak RT #113078 -- hehe, is the directory really called "GNOREME" ?
19:04 * masak .oO( gnore, v.t. )
19:04 dalek ecosystem: 0897770 | (Jonathan Stowe)++ | META.list:
19:04 dalek ecosystem: Remove EventEmitter in favour of more featuresome Event::Emitter
19:04 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/089777019d
19:09 alini joined #perl6
19:11 yqt joined #perl6
19:21 dalek roast: b6e2526 | usev6++ | fudge:
19:21 dalek roast: Register all functions from test modules used in roast
19:21 dalek roast: review: https://github.com/perl6/roast/commit/b6e2526e8f
19:21 dalek roast: 29a0324 | usev6++ | t/ (8 files):
19:21 dalek roast: Add more tests for fudging
19:21 dalek roast: review: https://github.com/perl6/roast/commit/29a03243c9
19:21 dalek roast: e550267 | usev6++ | fudge:
19:21 dalek roast: Fix fudging for 'todo'
19:21 dalek roast:
19:21 dalek roast: ... until now it could happen that plain code
19:21 dalek roast: lines were marked with 'todo' by fudge
19:21 dalek roast: review: https://github.com/perl6/roast/commit/e5502674cc
19:23 leont joined #perl6
19:25 TimToady m: my $f = -> Int $a, Int $b --> Real { $a / $b }; say $f(1,2)
19:25 camelia rakudo-moar b62929: OUTPUT«0.5␤»
19:25 TimToady m: my $f = -> Int $a, Int $b --> Int { $a / $b }; say $f(1,2)
19:25 camelia rakudo-moar b62929: OUTPUT«0.5␤»
19:26 TimToady oopsie
19:26 grettis joined #perl6
19:26 TimToady m: my $f = -> Int $a, Int $b --> Int { $a / $b }; say $f.returns
19:26 camelia rakudo-moar b62929: OUTPUT«(Mu)␤»
19:26 TimToady well, at least it parses now...
19:28 vendethiel TimToady++
19:29 TimToady it would be a shameful thing to claim to do modern FP and not allow lambdas to be typed...
19:30 skids m: https://gist.github.com/skids/255ade0fc1b2709e22b3 # I'm inclined to lay the blame for much of the slowness of Sum here, FWIW
19:30 camelia rakudo-moar b62929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rYNCnioB0E␤Confused␤at /tmp/rYNCnioB0E:1␤------> 3https:7⏏5//gist.github.com/skids/255ade0fc1b2709e␤    expecting any of:␤        colon pair␤»
19:31 skids oops didn't mean to m that.
19:31 vendethiel m: my $rep = -> ::T $a, Int $n --> Array[T] { $a xx $n }; say $rep(3, 3);
19:31 camelia rakudo-moar b62929: OUTPUT«3 3 3␤»
19:40 RabidGravy anyone got a boilerplate test for a good META.info?  I keep making mistakes in them
19:49 muraiki joined #perl6
19:51 espadrine joined #perl6
19:53 lizmat joined #perl6
19:58 grondilu m:  m: my $rep = -> ::T $a, Int $n --> Array[T] { Mu xx $n }; say $rep(3, 3);
19:58 camelia rakudo-moar b62929: OUTPUT«(Mu) (Mu) (Mu)␤»
19:59 spider-mario joined #perl6
19:59 TimToady grondilu: it doesn't even attach the type info currently
19:59 grondilu ok
19:59 prammer joined #perl6
20:00 jnthn Not to mention that we don't even attempt to handle generic return types yet
20:00 jnthn furthrmore, Mu xx $n sure won't match Array[T]
20:02 TimToady might possibly match Array[T]() someday though
20:02 jnthn I...uh...what? :)
20:02 jnthn I don't think that's valid as a matcher.
20:03 jnthn Well, it is, but it matches Any
20:03 TimToady it's a coercion
20:03 jnthn I know, which is an operation, not a type check...
20:04 TimToady well, long term the right side of --> is intended to be more than a type check
20:04 jnthn If you want coercion to do that, I need a bit more of an idea of how you want coercions to work. :)
20:05 jnthn I can see that we might get 'em to be constrainty
20:05 jnthn But I don't have any idea how exactly it should be factored.
20:06 jnthn I'll happily implement any sane design there, but I didn't manage to come up with one yet.
20:07 TimToady we probably need to figure out how --> $retval and --> Nil and such work first
20:07 TimToady but no rush
20:08 TimToady --> with non-types can wait, maybe even till after Christmas
20:09 jnthn True; coercion type details also sorta-can if we decide they're de-sugars for now, but if we want to get rid of the need for IntStr and co. before Christmas then I think we need to figure out coercion types - and coercion generally - a little better.
20:09 grettis joined #perl6
20:09 jnthn At the moment, I only made coercion types do stuff on parameters.
20:10 jnthn And it's just "sugar" for what what "Foo $bar as Baz" produced.
20:11 TimToady coercion on return might become obvious from however we decide 'my Int() $i = ..." works
20:11 jnthn Agree.
20:12 jnthn I'll work more on NFG later in the week; might I push the following onto your pondering stack:
20:12 konsolebox joined #perl6
20:12 TimToady so if that desugars to 'my Int $i = Int(...)', maybe the corresponding is to desugar the return $x to return Array[T]($x)
20:12 ponbiki joined #perl6
20:12 jnthn 1) What leg does with synthetics
20:12 jnthn 2) What the bitwise string ops do with synthetics
20:13 TimToady in any case, it's different from non-types and non-coercing types
20:13 jnthn 3) If the tests I've written so far in S15-nfg/regex.t are sane :)
20:14 jnthn Well, we can't syntactically desugar my Int() $i = ... becuase we have first-class l-values, so it can happen at at distance.
20:14 TimToady nod
20:14 TimToady part of why I said 'if'
20:15 TimToady but to generalize from there requires types that not only check if they can coerce but can somehow return both success and the new value
20:15 jnthn Yes, the interface for doing that is the bit I'm not sure about.
20:16 TimToady ich ouch :)
20:17 jnthn :)
20:18 jnthn On NFG, btw, I mostly took the Unicode canonical composition algo description's definition of starter/non-starter and took it to its logical conclusion to get the NFG algorithm.
20:18 jnthn However, canonical comp (which gets to NFC) has an algorithmic special case for Hangul.
20:19 jnthn I don't know enough about Hangul to know if NFG needs anything there. :)
20:19 jnthn I dunno if you know, or who might know. :)
20:20 TimToady good thing we're not a standards body, or we'd have to take two years to decide that...
20:20 TimToady I think for now we just guess, and wait for feedback from native speakers of various languages
20:20 prammer joined #perl6
20:20 * TimToady notes that at least at one point, CRLF was being considered a grapheme
20:21 jnthn OK. From what I can figger from the Unicode spec, it's probably classical rather than comtemporary Korean than might want the special cases anyway. :)
20:21 [Coke] Do we need to put out a request for a Hangul unicode expert?
20:21 virtualsue joined #perl6
20:21 [Coke] maybe it can go into the weekly.
20:22 jnthn [Coke]: Good idea.
20:22 TimToady though I don't think we can worry about getting it right for every language out there before Christmas
20:22 TimToady we should plan to revise as we know more
20:22 jnthn TimToady: Hangul is the only thing with special cases in NFC anyways.
20:23 TimToady and doc that this aspect of it is experimental
20:23 masak I wouldn't mind us finding a Hangul unicode expert just for the sake of it :)
20:24 TimToady for those orthographies "beyond" Hangul I think this is one of those areas where we just get "close enough" to what people will need for now
20:25 jnthn I think the natural extension of the NFC algo I've done will go pretty far.
20:25 TimToady if there's some way to override the built-in rules for local needs, that would probably suffice for a good long time
20:25 Rounin joined #perl6
20:26 TimToady and then if the Unicode Consortium adopts some of those rules, they could probably be implemented by the same mechanism
20:29 [Coke] m: use Test; ok (chars "abcdef" > 4),     "chars() has the right precedence (1)";
20:29 camelia rakudo-moar b62929: OUTPUT«Earlier failures:␤ Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏abcdef' (indicated by ⏏)␤  in sub parse-int-frac-exp at src/gen/m-CORE.setting:7422␤  in sub parse-simple-number at src/gen/m-CORE.setting…»
20:29 [Coke] ^^ that dodgy test is in S32-str/length
20:30 [Coke] it's from 2008-01-12
20:30 Sqirrel joined #perl6
20:30 jnthn [Coke]: The test looks bogus t ome
20:30 jnthn [Coke]: chars isn't a prefix op
20:31 [Coke] m: use Test; is (chars("abcdef" > 4)), 0, "chars() has the right precedence (2)";
20:31 camelia rakudo-moar b62929: OUTPUT«Earlier failures:␤ Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏abcdef' (indicated by ⏏)␤  in sub parse-int-frac-exp at src/gen/m-CORE.setting:7422␤  in sub parse-simple-number at src/gen/m-CORE.setting…»
20:31 alini joined #perl6
20:31 masak should be `chars("abcdef")`
20:31 [Coke] that one as well. Ok, will rip them out.
20:31 jnthn Maybe the test is from a time when chars *was* a prefix op?
20:32 jnthn But I'm pretty sure these ays it shouldn't be.
20:32 jnthn 8days
20:32 jnthn *days
20:33 dalek roast: 9d678a5 | coke++ | S32-str/length.t:
20:33 dalek roast: Remove test fossils.
20:33 dalek roast:
20:33 dalek roast: jnthn++
20:33 dalek roast: review: https://github.com/perl6/roast/commit/9d678a533b
20:35 [Coke] jnthn: what is "equanity" ?
20:35 dalek perl6-examples: 43d78b6 | (Steve Mynott)++ | categories/cookbook/ (2 files):
20:35 dalek perl6-examples: fix numeric examples
20:35 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/43d78b6286
20:35 [Coke] S15-nfg/mass-equality.t (is it equality?)
20:36 TimToady jnthn: on 1), I'd say that you can use NFCish comparison to check for equality at a position, but as soon as you've got an inequality, we probably have to compare NFDishly for any kind of consistency
20:36 jnthn [Coke]: uh, yes, weird typo...
20:37 TimToady on 2), flying butt unicorns of any color are probably appropropriate
20:37 TimToady s/pro//
20:38 TimToady on 3), you're assuming that anything in a file named 'regex.t' can be sane...
20:39 jnthn TimToady: On 2, I'll probably iterate codepoints, operate on those, and then re-NFG.
20:40 jnthn Those seem like non-SEGV-y butt unicorns :)
20:40 TimToady but iterate to NFC or NFC is the question
20:41 TimToady er, NFD
20:41 jnthn Hm, true
20:41 TimToady well probably doesn't matter
20:41 jnthn The easy thing is NFC
20:41 TimToady it's really only there for ASCIIish chicanery
20:41 jnthn Aye
20:42 jnthn For 1, how ish can NFDish be?
20:42 TimToady on 3 I assume that :m might cause a character class to ignore marks, but not otherwise
20:42 jnthn What do you mean by char class?
20:43 jnthn :m is ignoremark, yes?
20:43 TimToady the stuff under # Enumerated character classes don't accidentally discard the combiners, though.
20:43 jnthn OK, then that works for me
20:44 jnthn And \w and things like <:L> looking at the base grapheme is sensible?
20:44 TimToady well, if one of the strings has an NFC and the other a synthetic that you have the NFD for, you can't really compare those consistently without turning the NFC into NFD too
20:44 TimToady yes, I think that's sensible
20:44 jnthn Synthetics are stored in NFC.
20:44 jnthn As in, the base + codes are NFC
20:44 TimToady we need a way to scan combiners intentionally though
20:45 jnthn *nod*
20:45 jnthn Not sure how that wants to look yet.
20:45 * TimToady was always thinking it was NFD, but I can see where the other might be okayish
20:45 jnthn It's NFC mostly because that's a fairly normal thing to want on output
20:46 TimToady is probably consist under NFC comparison also
20:46 TimToady *tent
20:46 jnthn Yeah, it menas there's a bunch of synthetics we don't need.
20:46 jnthn also that ord works within the latin-1 range however we decide to implemnt ord
20:46 jnthn If we go the NFD route I'm not sure we can promise that.
20:47 TimToady the main problem with NFC is that you can get "old" canonicalizations coming out of databases and such
20:47 TimToady with NFD you never get that
20:47 jnthn We don't have any Perl 6 level code path to let you tell us "it's NFC I promise" yet anyways.
20:48 TimToady but I suppose that's no harder than the canonicalizations we do on input anyway
20:48 jnthn So we always do the check
20:48 jnthn (Using the QuickCheck property, and only doing real work if we have to)
20:48 TimToady well, we may need to make some concessions to performance there
20:49 jnthn Maybe, though given we already need to do the "get to NFG" step...
20:49 jnthn (Which already needs the scan through the string)
20:49 jnthn Not sure we've so much to win.
20:49 jnthn While I've described NFG as "take NFC and then..." it's actually being computed in a single pass.
20:49 TimToady do we attempt to share NFC with NFG if there's no combiners, since they're both immutable?
20:50 jnthn I've designed it so we can go straight from bytes to NFG in a sinlge pass without an intermediate result.
20:50 jnthn *single
20:51 jnthn There's nothing *yet* that lets us take the raw bytes in the, say, ASCII range and say "don't copy at all"
20:51 TimToady does NFC() notice en passant whether it qualifies as NFG already?
20:52 jnthn No, but at the moment they result in different representations.
20:52 TimToady would be nice to avoid two passes in the case of double conversion
20:52 TimToady but simple first
20:52 jnthn Aye, though I don't expect many people to actually use Uni in real life.
20:52 TimToady nod
20:53 TimToady mabye we should spell it out longer to discourage people :)
20:53 jnthn It's used extensively in the tests because it lets me talk very directly about codepoints, and it also gave me a way I could get NFG stuff in place and tested without turning it on for all the "normal strings" yet.
20:54 TimToady I agree that most of the time we'll be going straight from UTF to NFG
20:55 jnthn Yeah, that's the path I've designed to not produce a huge bunch of intermediate results
20:55 jnthn It's quite "fun" though
20:55 TimToady -O"fun"
20:56 * masak was gonna say that :)
20:56 jnthn UTF-8 means that codepoints can danlge over multiple IO buffers, and NFG means graphemes can dangle over multiple codepoint buffers.
20:56 jnthn I've done stream-y APIs for both levels that we can compose.
20:57 jnthn And the normalization buffer is basically "things that failed quickcheck"
20:57 jnthn If you never hit something needing normalizing the buffer is at most 2 codepoints in size.
20:58 jnthn But geez, getting Unicode decently right is quite some work. :)
20:58 TimToady ayup
20:59 * leont recognizes the problem, having looked at implementing a NF[DC] normalization layer for perl 5 (never wrote it in the end, ETUITS)
21:02 ugexe is there some way to apply constraits to a tap parameter without it dying when it fails its type check? like if a file gets passed to a supply with my $dir-tap = $paths.tap(-> $path where {$path.IO.d} { say $path });
21:02 jnthn ugexe: No, though nothing stops you writing a bunch of multi candidates and doing $paths.tap(&the-multi)
21:03 ugexe ah that works too
21:03 jnthn ugexe: If you want to filter just $paths.grep(*.IO.d).tap(...) though
21:07 nwc10 what sort of failure is this?
21:07 nwc10 Stage parse      : Error while compiling, type X::Syntax::Can'tMeta
21:07 nwc10 meta: cross with
21:07 nwc10 operator: ,
21:07 nwc10 dba: comma
21:07 nwc10 reason: too fiddly
21:07 nwc10 line: 20522
21:07 nwc10 modules: ()
21:07 nwc10 from src/Perl6/Grammar.nqp:2495  (blib/Perl6/Grammar.moarvm:declarator:848)
21:11 masak shouldn't that be X::Syntax::CannotMeta, by the General Decree of Cannot?
21:11 nwc10 possibly, but I assume that if it were, it would just fail with different words :-)
21:11 masak right, I'm bringing up a side point ;)
21:12 masak Can'tMeta looks really weird from a visual pill standpoint.
21:14 nwc10 this is somewhat - it failed there. What on Earth does that mean?
21:14 nwc10 and can I blame IBM?
21:14 nwc10 and even if I can, does that help solve it?
21:15 dolmen joined #perl6
21:17 masak nwc10: the error itself is really weird/bogus.
21:17 masak nwc10: if I'm reading it correctly, it's saying that you can't do `X,`
21:17 nwc10 hence, "can I blame IBM?"
21:18 nwc10 in that, it's ppc64le
21:18 masak nwc10: which is weird/bogus, because `X` defaults to `X,`
21:18 nwc10 but it *did* pass all the NQP tests
21:18 nwc10 "bug in the C compiler" is not out of the question here.
21:18 * masak is spectesting renaming Can'tMeta
21:19 Sqirrel joined #perl6
21:19 nwc10 Oh, bonkers, it seems to have a working valgrind. Let's try that :-)
21:19 jnthn masak: Why?
21:20 jnthn masak: And what to?
21:21 virtualsue_ joined #perl6
21:25 nwc10 Can::tMeta ? :-)
21:30 masak jnthn: X::Syntax::CannotMeta, because at some point we standardized that in the choice between "can't", "can not", and "cannot", error messages should choose "cannot"
21:31 jnthn masak: OK.
21:32 masak nwc10: some features I'm glad we didn't inherit from Perl 5 ;)
21:32 aborazmeh joined #perl6
21:32 aborazmeh joined #perl6
21:34 dalek perl6-examples: d9c1e3e | (Steve Mynott)++ | categories/cookbook/01strings/01- (2 files):
21:34 dalek perl6-examples: more LHF examples
21:34 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/d9c1e3e39e
21:36 dalek rakudo/nom: c4beed6 | (Carl Masak)++ | src/ (2 files):
21:36 dalek rakudo/nom: rename s/Can'tMeta/CannotMeta/
21:36 dalek rakudo/nom:
21:36 dalek rakudo/nom: <jnthn> masak: Why?
21:36 dalek rakudo/nom: <masak> because at some point we standardized that in the choice
21:36 dalek rakudo/nom:         between "can't", "can not", and "cannot", error messages
21:36 dalek rakudo/nom:         should choose "cannot"
21:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c4beed679c
21:36 dalek roast: d625ea1 | (Carl Masak)++ | S03- (4 files):
21:36 dalek roast: chase Rakudo change s/Can'tMeta/CannotMeta/
21:36 dalek roast: review: https://github.com/perl6/roast/commit/d625ea10d0
21:37 DrForr 90% of the ANTLR sample grammars pass their parsing step.
21:37 masak 'night, #perl6
21:37 jnthn 'night, masak
21:38 DrForr Nini
21:40 dalek perl6-examples: 8f507ea | (Steve Mynott)++ | categories/cookbook/01strings/01-19 (3 files):
21:40 dalek perl6-examples: remove original and add more consistent name
21:40 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/8f507ea6bd
21:54 eli-se $ brew install gnu-cobol
21:55 vendethiel omg eli-se.
21:55 eli-se you mean "program-id." not "eli-se."
21:58 jnthn omblog: https://6guts.wordpress.com/2015/04/20/this-week-digging-into-nfg-fixing-use-fatal-and-more/
22:01 eli-se vendethiel: I'm porting my hangman implementation from Mercury to COBOL.
22:01 vendethiel jnthn++
22:01 eli-se Screw logic programming!
22:01 vendethiel eli-se: damn :-)
22:05 jnthn .oO( Prolog not like a pro... )
22:07 * DrForr has a Prolog grammar half-finished somewhere on the VM, but ran into the segfault bug while getting it ready.
22:10 jnthn My tuits ran out before I got to that one, sadly. Though I did fix one thing related to :ignorecase handling that mighta led to a SEGV.
22:12 labster jnthn++, looking forward to NFG strings
22:13 Zoffix left #perl6
22:22 bobkare joined #perl6
22:25 jnthn sleepy time &
22:27 RabidGravy yep
22:31 Sqirrel joined #perl6
22:35 eli-se .tell vendethiel https://gist.github.com/rightfold/5b5ac73aaaf0d9ccd8bd ;)
22:35 yoleaux eli-se: I'll pass your message to vendethiel.
22:36 eli-se .botsnack
22:36 yoleaux :D
22:46 aborazmeh joined #perl6
22:46 aborazmeh joined #perl6
22:58 vendethiel joined #perl6
23:01 aborazmeh joined #perl6
23:01 aborazmeh joined #perl6
23:04 zjmarlow joined #perl6
23:05 rmgk joined #perl6
23:15 dalek doc: 5360d9c | ennio++ | lib/Language/functions.pod:
23:15 dalek doc: Just a typo
23:15 dalek doc: review: https://github.com/perl6/doc/commit/5360d9cbb8
23:15 dalek doc: bf2136b | labster++ | lib/Language/functions.pod:
23:15 dalek doc: Merge pull request #74 from scriplit/patch-1
23:15 dalek doc:
23:15 dalek doc: Just a typo
23:15 dalek doc: review: https://github.com/perl6/doc/commit/bf2136b310
23:22 vendethiel joined #perl6
23:47 [Tux] joined #perl6
23:49 BenGoldberg joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo