»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:10 ugexe joined
timotimo if the CAS doesn't turn into a little functional language, is it even useful? 00:15
00:15 BenGoldberg joined
raydiak well, I suppose not, I just didn't think about it that way when I started out, but w/the compiling and stuff, it's starting to show a little potential for actual usefulness 00:16
with only a couple more additions, it could be a new way to define primitives for Pray...or render procedural 3D surfaces from a user-entered equation by auto-generating the intersection tests at runtime 00:21
would have been way too slow for any actual use like that before, was mostly just good for rearranging equations or evaluating them for non-performance-sensitive uses 00:22
ugexe does feather have some threshold that can be exceeded by updating the ecosystem with panda a lot? i keep getting connection refused on one specific machine when panda tries to update the ecosystem 00:26
timotimo isn't the panda server down in general right now? 00:28
raydiak ugexe: if feather moved hosts today, could you have an old cached dns record on that machine or something? 00:29
timotimo i wonder why we don't just host that on a static web server
raydiak panda has been pack up for me for hours now
*back up
timotimo OK
00:29 ugexe_ joined 00:32 ugexe left, ugexe_ is now known as ugexe
ugexe its possible. just weird it worked one second then the next it was refused 00:33
00:34 kurahaupo left 00:45 GladiaTeur left, jack_rabbit joined 00:47 firefish5000 left
timotimo just to make sure ... perl6 regex do have negative look-behind with variable-length things, right? 00:57
TimToady for things that are reversible 01:01
supposed to, ayway
*n 01:02
otoh, it's almost always a parsing smell to use one
timotimo mhm mhm 01:03
i'd just like to throw a "that works in perl6!" into a conversation about perl regexes having that limitation
TimToady *g*
m: say 'abbbc' ~~ /<.after ab+> c/ 01:05
camelia rakudo-moar c40c1b: OUTPUT«「c」␤␤»
TimToady m: say 'Abbbc' ~~ /<.after ab+> c/
camelia rakudo-moar c40c1b: OUTPUT«Nil␤»
TimToady looks like it works to me
01:05 exixt is now known as EXIXT
timotimo can we reverse subrules if they are declarative? 01:06
01:08 EXIXT is now known as exixt 01:09 KCL joined 01:10 exixt is now known as EXIXT 01:12 KCL_ left
TimToady it's the declarative ones that are easy 01:16
dalek ake: d022e43 | (Arne Skjærholt)++ | src/Snake/ (3 files):
Store functions defined in a class body in the class object.

This means methods are half-way there. To make them work properly, attributes looked up in the class object have to be wrapped up as a lambda with the invocant to make them behave properly.
timotimo i was mostly wondering if we can reverse all <foobar> and <&barbaz> likes
anyway, i should catch some sleep 01:17
good night, #perl6 !
psch g'night timotimo
TimToady o/ 01:18
psch i've had an idea, in between, how to make jvm interop work, but apparently i confused the HOW with the class it describes... 01:19
where "work" doesn't really mean work 01:27
more like "try to understand", i guess
i probably should also sleep o/
01:27 psch left 01:29 panchiniak joined 01:31 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 01:32 chenryn joined 01:35 BenGoldberg left 01:42 chenryn left, BenGoldberg joined 01:47 robinsmidsrod left 01:49 robinsmidsrod joined 02:02 virtualsue left 02:32 BenGoldberg left 02:37 kurahaupo joined 02:40 Akagi201 left 02:43 BenGoldberg joined 02:47 BenGoldberg left 02:53 chenryn joined 03:11 adu joined 03:18 robinsmidsrod left 03:19 robinsmidsrod joined 03:20 chenryn left 03:22 chenryn joined 03:23 noganex_ joined 03:25 noganex left 03:30 JimmyZ joined 03:42 itz joined 03:43 waressearcher2 left 03:45 itz_ left 04:09 robinsmidsrod left, rmgk_ joined, rmgk is now known as Guest69125, Guest69125 left, rmgk_ is now known as rmgk, robinsmidsrod joined 04:14 araujo left 04:15 kaare__ joined 04:32 robinsmidsrod left 04:35 robinsmidsrod joined, robinsmidsrod left 04:37 robinsmidsrod joined 04:38 robinsmidsrod left 04:39 robinsmidsrod joined 04:44 robinsmidsrod left, robinsmidsrod joined 04:50 PZt left 04:53 robinsmidsrod left 04:54 chenryn left, robinsmidsrod joined 04:55 PZt joined 05:11 kaare__ left 05:13 mr-foobar left 05:18 robinsmidsrod left 05:19 robinsmidsrod joined 05:25 chenryn joined 05:30 PZt left 05:33 itz_ joined 05:35 itz left 05:44 kaare__ joined 05:56 jfredett joined 05:58 telex left 06:00 telex joined 06:06 mephinet left 06:07 denis_boyun joined 06:12 mephinet joined 06:14 anaeem1_ joined
raydiak not sure if anyone is around, but I'm having trouble thinking of an adequate name for a data structure I made that I might wrap up into its own module 06:34
moritz is around sporadically
raydiak it's a hash keyed by hash w/eqv semantics
also has extra methods to e.g. find all keys with a certain sub-key w/o manual grepping and such 06:35
using it for polynomials in math::symbolic...like {:x(2),:y(1)} => 3 is an entry for 3x²y at a certain place in the guts 06:38
but there's nothing specific in it about numbers or math 06:39
it's not a HoH b/c the sub-hash is on the key side :) calling it MultiHash in the code, b/c I couldn't think of anything meaningful/intuitive/descriptive 06:42
06:44 gfldex joined 06:47 dayangkun joined 06:48 dayangkun left 06:49 adu left, denis_boyun left 07:02 dayangkun joined
JimmyZ 3x^2y ? 07:03
07:04 eternaleye left 07:07 eternaleye joined, KCL left 07:08 rurban joined 07:13 davido__ joined 07:15 davido___ left 07:19 kaleem joined 07:21 jluis joined, FROGGS joined 07:23 jfredett left 07:26 virtualsue joined 07:31 dayangkun_ joined 07:32 dayangkun_ left, blackbolt joined 07:35 dayangkun left 07:36 darutoko joined, Alina-malina left 07:37 Alina-malina joined 07:42 gfldex left 07:47 robinsmidsrod left 07:49 robins joined 07:53 robins left, robinsmidsrod joined 07:54 bjz joined
dalek c: a14cc56 | smls++ | lib/Type/ (17 files):
Add summaries for roles
07:54
c: acd0982 | smls++ | lib/ (86 files):
Add summaries for all remaining classes
c: 9633d96 | smls++ | htmlify.p6:
Make summaries work for type docs embedded in language docs
c: 7ec008c | smls++ | htmlify.p6:
Render role summaries in italic, on type index pages

Since the summaries for classes and roles are phrased differently, it will help readers if we also render them differently.
c: eecebd6 | moritz++ | / (103 files):
Merge pull request #30 from smls/master

Add summaries for all remaining documented types, + minor related htmlify improvements
07:55 robinsmidsrod left 07:57 robinsmidsrod joined 07:59 robinsmidsrod left, robinsmidsrod joined 08:00 grondilu joined
grondilu guys, my version of rakudo comes from the future! 08:00
This is perl6 version 2014.11-25-gc40c1b8 built on MoarVM version 2014.11-17-g972d95b
:-)
FROGGS grondilu: :P 08:01
08:03 [Tux] left 08:04 blackbolt left 08:08 blackbolt10 joined 08:11 [Tux] joined
masak morning, #perl6! 08:12
moritz \o masak, #perl6
08:13 robinsmidsrod left 08:14 robinsmidsrod joined
FROGGS morning m&m 08:15
masak moritz and masak: www.m-ms.com.au/media/3387/red_yell...unning.jpg 08:16
08:16 robinsmidsrod left 08:19 robins joined
moritz masak: who's the red one? :-) 08:19
08:20 rindolf joined
masak still trying to figure that out myself. 08:27
08:28 erkan joined, erkan left, erkan joined 08:29 smls joined
smls o/ 08:29
moritz \o smls 08:32
smls: you should have an invitation to join the perl6 organization on github, so that you can push doc changes (and more) directly
smls: and thanks for your patches so far!
smls ok
though for more invasive changes, review requests are still better, right? 08:33
so you can review them... :)
08:33 blackbolt10 left
moritz yes 08:33
though normally we operated on the "forgiveness is better than permission" principle 08:34
smls is the sync to doc.perl6.org automated thought?
if it is, we should be a little more careful with this particular repo
08:35 robins is now known as robinsmidsrod, pecastro left, rurban1 joined
moritz it's not 08:35
though I hope to automate it in a few months 08:36
08:38 rurban left
dalek ecs: ba95f5f | (L. Grondin)++ | S99-glossary.pod:
fix "control flow" link
08:52
ecs: c86147b | (L. Grondin)++ | S99-glossary.pod:
fix "sigil" link
ecs: 780f49e | (L. Grondin)++ | S (5 files):
Merge branch 'master' of github.com:perl6/specs
08:52 bjz left 08:54 bjz joined 08:55 abraxxa joined
moritz www.greghendershott.com/2014/11/git...ments.html does that mean github doesn't hilight Perl 6 code anymore? 08:55
jnthn smls++ # documentation work 08:56
08:56 vti joined, Ven joined
Ven .tell masak swift has something akin to your THUNK. stackoverflow.com/questions/2410261...utoclosure – it's like a "call-by-name" 08:57
yoleaux Ven: I'll pass your message to masak.
masak moritz: well, I see highlighting in github.com/masak/druid/blob/master...id/Game.pm -- but it might be it's Perl 5 highlighting. `has` ain't highlighted, for example.
yoleaux 08:57Z <Ven> masak: swift has something akin to your THUNK. stackoverflow.com/questions/2410261...utoclosure – it's like a "call-by-name"
masak Ven: I'm right here.
Ven :) nice then.
(but it's a more like your THUNK than a call-by-name) 08:58
moritz useless use of yoleaux at line *-3
Ven "is-move-bad" wouldn't "illegal" be a more fitted name?
masak yes, that's pretty close to THUNK. 08:59
Ven: yes, probably. 09:00
09:00 sqirrel__ joined
Ven just skimmed through druid's code once again 09:00
masak seems my 2010 self optimized that name for brevity, though.
Ven ponders the idea of a D&D game in p6 09:01
masak Ven: does this mean that in Swift, functions cannot be called before they're declared?
Ven masak: think so. That's 100% for the best in my book, though :) 09:02
also, operators can be predeclared (operator prefix |>, e.g.)
masak *nod*
I sometimes like post-declaring functions.
I realized yesterday that this actually provides a limited Haskell-style `where` functionality, for functions only. 09:03
Ven It does. But I think there's usually a problem in your "flow" if you need that :) 09:04
masak m: 2 + 2 == 5 or exit-saying("seems I need to brush up my math") given my &exit-saying = -> $msg { say $msg; exit }
camelia rakudo-moar c40c1b: OUTPUT«seems I need to brush up my math␤»
masak \o/
Ven you might be either overengineering or not having enough blocks in such cases
masak nah, it's all about emphasis in the phrase.
Ven yeah, the postfix-given is nice :)
jnthn
.oO( I might use that idiom given it's possible... )
09:06
masak actually, with some gritting of teeth, it's possible for other variables as well. 09:07
m: 2 + 2 == 4 or say "Turns out it was ", (my $actual) given $actual = 4
camelia ( no output )
masak m: 2 + 2 == 5 or say "Turns out it was ", (my $actual) given $actual = 4
camelia rakudo-moar c40c1b: OUTPUT«Turns out it was 4␤»
09:07 azawawi joined
azawawi hi 09:07
masak azawawi! \o
Ven now that's evil :)
hey awwaiid 09:08
whoops. azawawi
azawawi lol
panda's meta http server seems to be down... feather.perl6.nl:3000 is down from the same box 09:09
cant panda update
azawawi wonders if he will see rakudo star 2014.11
smls moritz: Speaking of slightly more invasive changes... Are you very fond of keeping the full type docs for the 8 types {Set, SetHash, Bag, BagHash, Mix, MixHash, Grammar, Perl6::Metamodel::ClassHOW} embedded inside free-form Language/ Pods? 09:11
I'd prefer them to have their own stand-alone Type/ Pods like all other classes and roles.
masak azawawi: feather was migrated yesterday, and the panda service is not back up.
smls Both because I think linking instead of embedding would be more reader-friendly, and because htmlify would benefit from being able to expect a more consistent structure for its input data (rather than munging through everything and heuristically extracting stuff from all over the place, like it does now). 09:12
azawawi masak: migrated where?
masak to a new feather.
smls (Especially in anticipation of the envisaged refactor to make htmlify.pl pull-based/incremental...)
09:13 erkan left
moritz smls: +1 to having them in type/ 09:14
smls ok
azawawi tries to build rakudo on windows 7 64-bit
smls moritz: While I modify Language/Sets_Bags_and_Mixes.pod to accomodate that change, may I also rename it to Language/setbagmix.pod to match the naming/URL scheme of the other docs? 09:18
Do you have a system in place to add URL redirects on doc.perl6.org for backwards-compatibility?
09:19 itz joined 09:20 itz_ left 09:21 Ugator joined 09:23 cosimo left 09:24 Shozan is now known as SHODAN, dakkar joined, cosimo joined 09:26 ribasushi left 09:27 ribasushi joined 09:34 sqirrel__ left 09:42 chenryn left 09:49 denis_boyun joined 09:58 azawawi left 10:05 EXIXT is now known as exixt 10:07 zakharyas joined 10:08 Celelibi left 10:10 Celelibi joined
carlin re: github highlighting, yes it appears that perl6 is no longer highted, tested by creating a gist and selecting Perl6 as the language, and it doesn't highlight it when it definitely used to 10:21
smls m: my %fruits := <apple orange apple banana>.Set; say "{++$}) $_" for %fruits; 10:22
camelia rakudo-moar c40c1b: OUTPUT«1) apple orange banana␤»
smls ^^ It looks like Set does not do Iterable, and hence does not flatten. Why not? 10:23
JimmyZ carlin: you're right
10:23 kst` joined 10:25 kst left
peteretep that's because they stopped using pygments, right? 10:26
smls m: my Set[Int] $n; :( 10:32
camelia rakudo-moar c40c1b: OUTPUT«===SORRY!===␤Type Set cannot accept type arguments␤»
10:32 JimmyZ left
jnthn It's not spec'd as doing so either, afaik. 10:35
Maybe in 6.future :)
moritz smls: +1 to renames; no system for preserving old URLs
10:37 Ven left 10:43 chenryn joined
moritz smls: so that sets can be nested, IIRC 10:43
smls hm but hashes, array, and lists can also be nested just fine... 10:45
re preserving URLs: What kind of server setup does doc.perl6.org use? nginx? 10:46
moritz smls: apache2
10:47 chenryn left
smls m: my $x = set <foo bar baz 1 2 3>; say $x.list; 10:57
camelia rakudo-moar c40c1b: OUTPUT«foo bar baz 1 2 3␤»
smls ^^ don't hash'y things scramble the order of their elements like they do it Perl 5? 10:58
moritz they can
iirc set currently doesn't, but don't rely on it
11:00 pecastro joined
Woodi hallo #perl6 :) 11:01
m: Grammar::Tracer; grammar abc { rule TOP { <quoted> }; rule quoted { '"' <string> '"' }; }; abc.parse('"abc"'); 11:02
camelia rakudo-moar c40c1b: OUTPUT«Could not find symbol '&Tracer'␤ in method <anon> at src/gen/m-CORE.setting:13780␤ in any find_method_fallback at src/gen/m-Metamodel.nqp:2725␤ in any find_method at src/gen/m-Metamodel.nqp:988␤ in block <unit> at /tmp/pGIm0jTQPn:1␤␤»
masak 'allo, Woodi
Woodi: missing `use`
Woodi in repl I get a bit of grammar trace and error: Method 'string' not found for invocant of class 'abc' 11:03
so, grammar class is build at runtime ? or it is Tracer effect ?
jnthn Well, yeah...your grammar has no method named string.
Woodi I thinked it should be checked at compile time 11:04
jnthn It's just a normal method call, and those are always late-bound.
Woodi a bit strange...
jnthn Nope.
Not unless the only languages you ever programmed in are Java, C#, and C++, anyway. :P
masak .oO( requestor fails at pasting code into camelia, then complains about language features he doesn't fully grok. community++ remains polite. ) 11:05
11:10 anaeem1_ left
jnthn Iinterestingly, the original OO languages were dynamic in this sense, and used the more helpful "message send" metaphor rather than "method call"... :) 11:10
masak Woodi: the same mechanism that allows a method base class to call a method in a derived class (with no additional fuss) also makes it impossible to check at compile time. 11:11
Woodi: it's called "runtime polymorphism".
jnthn And of course, when you send a message, the object can be all like, "return to sender...address unknown..." :) 11:12
masak .oO( this method call ain't nothin' but a hound dog )
jnthn
.oO( you ain't never seen my fields and you ain't no friend class of mine )
11:13
masak .oO( don't be cruel to a class that's true ) 11:14
11:17 sqirrel__ joined 11:20 ssqq joined
smls What's an example of a simple, commonly-used (by users not implementors) Perl 6 built-in type that is *not* a value type? 11:21
masak Hash 11:22
Array
Pair
smls m: say (1, 2, 3).WHICH; say [1, 2, 3].WHICH; say (a => 1).WHICH; 11:23
camelia rakudo-moar c40c1b: OUTPUT«Parcel|(Int|1)(Int|2)(Int|3)␤Array|70620192␤Pair|77700592␤»
smls ok
m: say .WHICH for /./, {$_}, Buf.new(2, 4, 6) 11:28
camelia rakudo-moar c40c1b: OUTPUT«Regex|55031280␤Block|61498240␤Buf|76158368␤»
ssqq github.com/songzan/vim_plug/blob/m...ax/pod.vim could make Pod more readable.
smls ^^These two, or is their .WHICH just NYI?
*too
11:33 yeahnoob joined 11:35 anaeem1 joined
lizmat smls: what do you expect about their .WHICH ? 11:36
11:36 anaeem1 left
smls in theory they could be value types, no? 11:36
same which for every structurally identical instance
lizmat Array will never be a value type, nor will Pair be (because the value is not fixed) 11:37
Parcel is on the chopping block
jnthn And Buf is a kind of array really.
So it also ain't a value type
smls ok
11:38 anaeem1_ joined, anaeem1_ left, araujo joined
jnthn Same with regex, since "are these two pieces of code identical" is the halting problem :) 11:38
moritz and we still haven't solved that. We should be trying harder :-)
jnthn I fear if we start working on it, we'll just never stop...
smls "Parcel is on the chopping block" -- but List will take over its duties :) 11:39
moritz List is a mutable type, so no value type 11:41
smls but post-GLR?
"Thus infix:<,> will now create Lists directly. It’s likely that comma-Lists will be immutable [...]" - pmthium.com/2014/10/apw2014/ 11:42
moritz huh, I missed that part 11:43
smls Having one mutable list type (Array) and one immutable one (List), seems elegant to me :) 11:44
11:45 robinsmidsrod left
smls I would maybe even go one step further, and make List the only one that supports laziness. 11:45
lizmat ??? a lazy, immutable List ?
smls why not?
lizmat that's called a generator, surely ? 11:46
nine We could also rename List to Tuple and match Python
abraxxa tuple are pairs, list is just a list imho 11:47
moritz tuples don't need to be 2-tuples
11:47 robinsmidsrod joined
lizmat that sounds more like Parcels to me... 11:49
smls As for lazy/infinite Arrays, do we really need them? 11:50
lizmat yes
11:50 ssqq_ joined
lizmat going back to p5 and not having them, has made that *very* clear to me 11:51
smls I think the kind of functional idioms/algorithms that tend to make use of lazy lists, don't really have much use for mutability or guaranteed itemization of values... 11:52
lizmat: Can you give an example of an algorithm/solution that is better served by a lazy Array than a lazy List? 11:53
11:53 ssqq left
lizmat ah, sorry, I didn't get the emphasis on Array there 11:54
hmmm....
smls And jnthn said in one of his talks, that potential laziness is one of the reasons why arrays are still a lot slower than in Perl 5...
lizmat you could have a point there...
so, no I don't have an example of lazy Array over lazy List 11:56
11:59 smls left
jnthn Well, if you can't do that, you can't assign an infinite thing to an array, ever. 12:00
12:00 kaleem left
lizmat you maen: my @a := inifinite list ? 12:02
my @a = infinite list
?
jnthn That's not assignment.
Right, = is
You would have to write :=
lizmat I could live with that, really
it makes it *really* clear what you're doing
dalek kudo/newio: 55d59e4 | (Tobias Leich)++ | src/Perl6/ (2 files):
attempt to fix RT #123215
12:04
kudo/newio: 2b6e77e | (Tobias Leich)++ | src/Perl6/Actions.nqp:
fix value of chained colonpairs in ( )
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123215
kudo/newio: c40c1b8 | (Tobias Leich)++ | src/Perl6/ (2 files):
fix chained colonpairs in curlies, resolves RT #123215
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123215
dalek kudo/newio: f55a607 | (Elizabeth Mattijsen)++ | src/Perl6/ (2 files):
Merge branch 'nom' into newio
jnthn Also, Array ~~ List, and Array not being lazy when List is seems like a pretty clear Liskov violation... 12:05
12:06 fhelmberger joined
lizmat perhaps Array !~~ List? 12:08
just playing devil's advocate here 12:09
they're just both Iterables ?
12:09 smls joined
smls Array ~~ List, but Array !~~ Parcel 12:10
So, if post-GLR List becomes more like current Parcel...
As for assigning vs binding infinite lists to @ variables, I wouldn't miss it the current state of being able to assign *some* infinite lists but having to use binding for others 12:13
As lizmat said, always using binding in those cases improves clarity anyway 12:14
12:16 kurahaupo left
smls s/'i't '// 12:17
smls can't even type his typo corrections without typos :/ 12:18
12:20 smls left 12:31 chenryn joined 12:36 chenryn left
Ugator hi #perl6 :-) is there gonna be a weekly? 12:40
vti in regexes is this supposed to work '** ^2'? like from 0 to 2 range? right now you have to write '** 0..2', or am i missing smth? 12:42
masak Ugator: good question! haven't seen timotimo today... 12:43
vti: I think you're the first who thinks of that syntax.
vti: doesn't sound all that unreasonable to me.
Ugator .seen timotimo
yoleaux I saw timotimo 01:17Z in #perl6: <timotimo> good night, #perl6 !
Woodi I was not aware that Perl6 design choices was "too-late" binding :) becouse this can be categorized as syntax-error-not-detected during compilation. in such simple case all info is in code but not used...
vti masak: i thought it had the same 'range' functionality as in loops 12:44
12:45 darutoko- joined
masak m: say "AxxxB" ~~ / A [x ** ^4] B / 12:45
camelia rakudo-moar c40c1b: OUTPUT«===SORRY!=== Error while compiling /tmp/dyFJahR0z4␤Quantifier quantifies nothing␤at /tmp/dyFJahR0z4:1␤------> say "AxxxB" ~~ / A [x ** ⏏^4] B /␤ expecting any of:␤ postfix␤ infix stopper…»
Woodi jnthn: interestingly, I always understand "method sending" as as asynchronous signal :)
masak I don't see it colliding with anything, so... I guess it's just a simple matter of programming. 12:46
Woodi: you mean "message passing".
12:48 darutoko left
vti masak: nice, how do i start? :) 12:48
masak vti: write failing spectest. then (I'm guessing) extend the NQP grammar engine. 12:49
jnthn Message sends to an object can be sync or async; it's all up to the meta-object doing the dispatching. See my OO::Actors model for that makes $obj.something(...) an async operation on $obj :)
masak was gonna say -- whether it is actually sync or async is up to the object system.
jnthn *systems* :) 12:50
masak oh, in the sense that each meta-object can be one, and they're running alongside each other? fair enough. 12:51
Woodi: some years ago, I found worrydream.com/EarlyHistoryOfSmalltalk/ fascinating reading. you might, too. it's long but worth it.
Woodi yes, I mean as in actors. that was my first intuition whrn learning OO. I have problems with learning "method call-and-return" class interaction design... 12:52
it's design choice, I know... 12:53
jnthn Well, I suspect Perl 6 is flexible enough that you could write a module that enforces much stricter compile-time checking. But I don't think it's a good default. 12:55
masak it kinda presupposes a closed world hypothesis.
jnthn (Especially when considered in the context of the rest of the language.) 12:56
Hm, I better get ready for my train trip... :)
bbl & 12:57
lizmat sometimes I wish we had something like ifd 13:01
(as in if defined)
masak what's wrong with `if $thing.defined` ? 13:02
lizmat ifd complicated_thing -> $foo {
13:02 brrt joined
lizmat would match only if complicated_thing were defined, but passed the thing into $foo (rather than the result of defined) 13:03
or do we have a simple recipe to do something like that already ?
13:04 robinsmidsrod left
masak m: sub ifd($thing, &fn) { if $thing.defined { fn($thing) } }; ifd 2, -> $n { say $n }; ifd my $x, -> $y { say "!!!" } 13:04
camelia rakudo-moar c40c1b: OUTPUT«2␤»
13:04 ssqq joined
masak m: macro ifd($thing, $fn) { quasi { if {{{$thing}}}.defined { {{{$fn}}}({{{$thing}}}) } } }; ifd 2, -> $n { say $n }; ifd my $x, -> $y { say "!!!" } 13:05
camelia rakudo-moar c40c1b: OUTPUT«===SORRY!===␤Cannot reference undeclared local 'pres_topic__1'␤»
masak :/
13:06 robinsmidsrod joined
ssqq How to get all *symbols/symbolic* of current package? 13:06
moritz m: say ::?PACKAGE.WHO.keys 13:07
camelia rakudo-moar c40c1b: OUTPUT«␤»
masak m: module Current { our $x; say Current.WHO.perl }
camelia rakudo-moar c40c1b: OUTPUT«("\$x" => Any).hash␤»
moritz m: module A { our sub f() { }; say ::?PACKAGE.WHO.keys } 13:08
camelia rakudo-moar c40c1b: OUTPUT«&f␤»
nine lizmat: doesn't a Perl 5 like if my $foo = complicated_thing { ... } still work?
lizmat: if defined my $foo = complicated_thing { ... } of course
lizmat hmmm....
moritz nine: but iirc it's differently scoped
that is, visible after the if
masak it is.
moritz my: if defined(my $x = 42) { }; say $x
m: if defined(my $x = 42) { }; say $x
camelia rakudo-moar c40c1b: OUTPUT«42␤»
moritz loves camelia++ 13:09
nine moritz: oh indeed. A Pity.
masak you could do `given complicated_thing { if .defined { ... } }`
lizmat m: if defined my $foo = 42 { say $foo }
camelia rakudo-moar c40c1b: OUTPUT«42␤»
lizmat but yeah...
masak or even name it with `->`
lizmat m: if defined my $foo = Int { say $foo }
camelia ( no output )
ssqq m: say ::?GLOBAL.WHO.keys 13:10
camelia rakudo-moar c40c1b: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol ::?GLOBAL␤»
moritz that's just GLOBAL
m: say GLOBAL.WHO.keys
camelia rakudo-moar c40c1b: OUTPUT«␤»
nine m: { if defined my $foo = 1 { say $foo; } } 13:11
camelia rakudo-moar c40c1b: OUTPUT«1␤»
nine m: { if defined my $foo = 1 { say $foo; } } say $foo;
camelia rakudo-moar c40c1b: OUTPUT«===SORRY!=== Error while compiling /tmp/m7U81ACHTU␤Two terms in a row␤at /tmp/m7U81ACHTU:1␤------> if defined my $foo = 1 { say $foo; } } ⏏say $foo;␤ expecting any of:␤ postfix␤ statement…»
nine m: { if defined my $foo = 1 { say $foo; } }; say $foo;
camelia rakudo-moar c40c1b: OUTPUT«===SORRY!=== Error while compiling /tmp/gI1aCI7q0s␤Variable '$foo' is not declared␤at /tmp/gI1aCI7q0s:1␤------> ed my $foo = 1 { say $foo; } }; say $foo⏏;␤ expecting any of:␤ postfix␤»
moritz ssqq: the setting is full of lexical symbols which get added to your program as an outer scope
m: say CORE::.keys
camelia rakudo-moar c40c1b: OUTPUT«%DEPRECATIONS @UNITS $init-time-num %FILETEST-HASH %CLEAN-PARTS-NUL &zip %pvalcodecache %propcodecache $?TABSTOP $UINT64_UPPER $sprintfHandlerInitialized $default &samewith &lastcall &nextsame &callsame &nextwith &callwith &redo &next &last &return &return…»
13:12 zakharyas left
Woodi can we have a switch --do-compile-time-bind ? 13:13
masak no.
moritz Woodi: nope; that's a recipe for disaster
Woodi why ? 13:14
13:14 sqirrel__ left
moritz first of all, the whole setting would need to be done differently if we expected it to be used with such an option 13:14
second, it'd fracture the language (worse than strict/no strict)
third, lots of extra work
masak it doesn't work well with how people (including core developers) use the language. 13:15
13:15 guru joined
masak Woodi: the closest you can realistically wish for is a pragma you can load to conform to your kinky mode of programming. 13:15
Woodi moritz: I thinked it could be optimization time work. I prefer more compile time work...
13:16 guru is now known as Guest58485, Guest58485 is now known as ajr_
Woodi masak: that dynamic-idealism is not always good 13:16
but just dreaming... 13:17
masak Woodi: people have informed you of why your dreaming does not work out in practice. it's all there in the backlog.
ssqq O,my god, COE:: have 596 symbols have been used. 13:18
masak Woodi: I fail to see which "dynamic-idealism" it is you dislike, beyond *runtime polymorphism*, which tends to be help up as one of the nicer things in OO.
held*
ssqq CORE:: have 596 symbols have been used
13:22 kaleem joined
Woodi masak: I think you like to have things sharply categorized... such or such. but good things are often "elastic" 13:23
masak maybe a summary of the situation is that Perl 6 is strict in the lexical scoping end, but loose/dynamic in the method dispatch end.
13:23 grondilu left, pnu left
masak Woodi: yes, sure. though sometimes, things are fairly well clear-cut, and wishing the core language were different, without understanding the tradeoffs, is unproductive. 13:24
13:25 Spot__ joined, sivoais left, skarn left 13:26 Spot_ left, Spot__ is now known as Spot_ 13:27 sivoais joined, pnu joined, skarn joined 13:28 sqirrel__ joined
ssqq m: say pi; 13:35
camelia rakudo-moar c40c1b: OUTPUT«3.14159265358979␤»
13:36 yeahnoob left, yeahnoob joined 13:37 sivoais left
masak m: say round e ** (2 * pi * i), 1e-15 13:38
camelia rakudo-moar c40c1b: OUTPUT«1+0i␤»
masak \o/
13:38 sivoais joined 13:45 grondilu joined 13:46 kaare__ left
moritz strict by default is basicall .NET :-) 13:46
*basically
13:47 sivoais left
masak I was thinking TypeScript. 13:47
but yes, that's a level of static method checking that Perl simply doesn't subscribe to. 13:48
13:48 sivoais joined
moritz sometimes ponders a stricter fork of p6, just for experimenting 13:49
masak ooh
Striktudo!
moritz "how would it looks like, if..."
I have the theory that it'd force us to think more about which roles we put methods in 13:50
13:52 rurban1 left
ssqq Just like elisp, Perl 6 *MAIN* namespace have amount of symbols that exported from many module. 13:53
moritz no, they aren't exported from many modules 13:55
13:59 sivoais left
masak elisp doesn't have namespaces. 13:59
it has community-encouraged manual prefixing of everything.
14:00 sivoais joined
brrt (just like c, one might add) 14:00
14:01 yeahnoob left
masak right -- and IIUC, C++ codegens methods using a similar mapping. 14:01
14:01 bjz left
masak I mean, there's an obvious isomorphism between actual namespaces and prefixing. 14:02
14:02 bjz joined 14:04 ssqq left
[Coke] Wish me luck! water advisory at work today, so no coffee! *twitch* 14:05
14:06 anaeem1 joined
vti it seems that $$ doesn't eat the newline character and smth like '[ \n | $ ]' has to be written, is there a way around that? and is \n portable? i mean \r?\n isn't required anymore? 14:06
lizmat
.oO( if they cannot have coffee, give them tea! :-)
masak vti: $$ is an anchor, and by nature zero-width.
vti: you can always define your own rule <eol> or something. 14:07
14:07 molaf joined
vti masak: i see 14:08
FROGGS m: say "a\r\n" ~~ / a $$/
camelia rakudo-moar c40c1b: OUTPUT«「a」␤␤»
FROGGS m: say "a\n" ~~ / a $$/
camelia rakudo-moar c40c1b: OUTPUT«「a」␤␤»
FROGGS m: say "a\r\n" ~~ / a $$/
camelia rakudo-moar c40c1b: OUTPUT«「a」␤␤»
FROGGS er
m: say "a\r" ~~ / a $$/
camelia rakudo-moar c40c1b: OUTPUT«「a」␤␤»
FROGGS so yeah, it is portable
timotimo o/ 14:09
i want to do a weekly today
14:09 ssqq_ left
FROGGS \o/ 14:09
14:09 panchiniak left
jnthn \n will match \r\n, yes 14:09
FROGGS ++timotimo
masak timotimo: how appropriate -- we want to read it! :D
jnthn Why would you write \n $$, though?
You just matched a new line, it's pretty darn clear you're at the end of the line. :) 14:10
14:10 bjz left, sivoais left, bjz joined 14:11 anaeem1 left
jnthn I can see [\n | $] a bit more 14:11
14:11 Util joined
vti jnthn: i am not writing \n $$, just [\n | $] 14:11
jnthn Though in many cases I'd structure it more like <line>* % \n [ $ || { die 'parse fail' } ] or so
14:12 sivoais joined
jnthn vti: Yeah, others were, I missed what you originally wrote. 14:12
masak jnthn: I don't see any `\n $$` in the backlog, except from you ;)
14:13 marconrd joined
jnthn Yes, lots of $$ though. 14:13
14:13 anaeem1_ joined
masak agree on principle, though. better to handle line breaks outside of the line rule. 14:14
it's an inside-outside thing. if the line rule itself can avoid talking about line breaks, so much the better.
sometimes it has to. but better to avoid it if possible.
jnthn Aye, that's a more eloquent way of saying what I was trying to :) 14:15
timotimo make test inside nqp gives me two failing tests, 10-file-ops.t and 78-shell.t 14:18
vti i don't what to parse in a 'line per line' way, but sometimes i want to cut the line out with the newline, so instead of (my own syntax follows :) /^^ .*? $$+/ i write /^^ .*? [ \n | $ ]/, $$+ is $$ + \n :)
timotimo they seem to be trying to do operations on folders, which we now throw exceptions for, OSLT?
marconrd hi, folks! can anyone help me? how to add my first p6 module on ecosystem? (github.com/marcoonroad/Coro-Simple ...) 14:19
14:19 sqirrel__ left 14:20 JimmyZ joined, chenryn joined
timotimo marconrd: do you know of the "take-rw" feature? 14:20
marconrd "take-rw"? not... 14:21
14:21 sivoais left
jnthn marconrd: Submit a pull request to github.com/perl6/ecosystem/blob/ma.../META.list or just ask for a commit bit to it if you plan to do more modules in the future :) 14:21
timotimo it will put a read-write-able container into the resulting lazy list, that the receiver of the list can then write to
and the "generator" can inspect the container for a change in value after the take has returned 14:22
moritz marconrd: what's your github ID?
timotimo (this relies on "no batching" behavior, though)
14:23 sivoais joined
FROGGS moritz: seems to be marcoonroad 14:24
marconrd this is just a minimal module for coroutines inspired on Lua coroutine.wrap/coroutine.yield...
timotimo FROGGS: macarooned?
marconrd: OK :)
14:25 chenryn left
FROGGS timotimo: my kids often look macarooned 14:25
moritz would like to wait for a confirmation from marconrd
marconrd thanks to everyone, i will think about new features before try to submit the pull request :) 14:26
timotimo i didn't know what a "macaroon" was until i saw an article on google's security/permission framework with that name yesterday 14:27
moritz makes coconut macaroons for christmas each year
14:28 kjs_ joined
timotimo is that "makronen" in german? 14:28
moritz yes 14:29
timotimo ah 14:30
14:33 sivoais left 14:34 sivoais joined 14:42 kjs_ left 14:44 sivoais left 14:45 sivoais joined 14:52 telex left 14:54 telex joined 14:56 sivoais left 14:57 sivoais joined
dalek kudo/nom: f526b08 | (Timo Paulssen)++ | src/Perl6/Optimizer.nqp:
optimize METAOP_ASSIGN in-place (benefits += in sink context)
14:59
lizmat timotimo++ 15:00
timotimo before this, only += in non-sink contexts would be optimized, which isn't as clever i think %)
hm. actually: "void context" would have been more correct
since the void context itself is what causes the sink to be emitted 15:01
&METAOP_ASSIGN is now completely gone from the rat_mul_div_cancel benchmark profile
lizmat we have $foo.?method (as in call method on foo if method exists)
is there something like:
$foo?.method
timotimo $foo andthen .method could work 15:02
lizmat (call method on $foo if instantiated)
timotimo m: my $foo = "Hello"; say ($foo andthen .lc)
camelia rakudo-moar c40c1b: OUTPUT«␤»
timotimo m: my $foo = "Hello"; say ($foo andthen *.lc)
camelia rakudo-moar c40c1b: OUTPUT«hello␤»
timotimo m: my $foo; say ($foo andthen *.lc)
camelia rakudo-moar c40c1b: OUTPUT«(Any)␤»
timotimo m: my $foo; say ($foo.lc)
camelia rakudo-moar c40c1b: OUTPUT«No such method 'lc' for invocant of type 'Any'␤ in block <unit> at /tmp/hZg4SYDWzK:1␤␤»
lizmat timotimo++
timotimo :) 15:03
jnthn ooh, nice :)
timotimo DIVIDE_NUMBERS is responsible for 50% of all Scalar allocations in rat_mul_div_cancel. that could probably be cut down significantly by using binding instead of assignment, OSLT?
[Coke] m: no, andthen! 15:04
camelia rakudo-moar c40c1b: OUTPUT«===SORRY!=== Error while compiling /tmp/Gdcivk69fh␤Two terms in a row␤at /tmp/Gdcivk69fh:1␤------> no, andthen⏏!␤ expecting any of:␤ argument list␤ postfix␤ infix stopper␤ …»
moritz timotimo: OSLT?
timotimo "or something like that"
moritz timotimo: +1 15:05
timotimo: are you going for it, or should I?
timotimo you can if you like, i'll open up my wordpress "add post" page and see what i can come up with :) 15:06
15:06 sivoais left 15:07 sivoais joined
jnthn actually did something this week to report in the weekly :) 15:07
timotimo i see you started work on the parameterized 6model things 15:08
i haven't looked at the full commit log yet, but i will do that for the weekly
15:08 Sir_Ragnarok left
moritz spectests 15:08
15:09 marconrd left 15:11 kjs_ joined 15:13 Sir_Ragnarok joined
vti what's an alternative for like in Test.pm? 15:13
moritz vti: what kind of alternative are you looking for? 15:14
15:14 sqirrel__ joined
vti moritz: 'like', sorry for not empasizing :) 15:14
moritz vti: why do you need an alternative?
vti because i coudn't find like(), maybe there is smth else 15:15
i tried reading source code, but no luck
15:15 b2gills left
vti i expected is $foo, rx// to work, but 'is' looks like just does 'eq' 15:16
15:16 virtualsue left
moritz vti: it seems we don't have anything (I thought we had something, and you were looking for an alternative) 15:16
osfameron so you mean an alternative to *Test::More*'s like() ?
moritz vti: I tend to use ok $thing ~~ /.../, but that doesn't give good diagnostics
15:17 sivoais left
moritz but I think I'd welcome a like() function in Test.pm that simply smart-matches 15:17
one problem is that our regexes don't stringify nicely
so the diagnostics won't be very good
vti osfameron: exactly
[Coke] like++
15:18 sivoais joined
lizmat so, what *is* the quickest way to get the name of the calling sub ? 15:19
timotimo i'd go via callframe(1) i think? 15:20
moritz m: sub f() { g() }; sub g { say Backtrace.new()[0].code.name } 15:21
camelia ( no output )
lizmat m: sub b { a }; sub a { callframe(1).my<&?ROUTINE>.name }; say b # timotimo++
camelia rakudo-moar c40c1b: OUTPUT«b␤»
moritz m: sub f() { g() }; sub g { say Backtrace.new()[0].code.name }; f()
camelia rakudo-moar c40c1b: OUTPUT«␤»
moritz m: sub f() { g() }; sub g { say Backtrace.new()[1].code.name }; f()
camelia rakudo-moar c40c1b: OUTPUT«new␤»
moritz m: sub f() { g() }; sub g { say Backtrace.new()[3].code.name }; f()
camelia rakudo-moar c40c1b: OUTPUT«f␤»
timotimo heh heh 15:22
lizmat moritz: I think callframe will be cheaper
jnthn Yes, much cheaper
I'd hope. :)
lizmat creating a while Backtrace is expensive
moritz aye :-)
15:22 pmurias joined
lizmat *whole 15:22
jnthn If you're doing it in CORE.setting you can nqp::getcodename(nqp::callercode()) or so :) 15:23
pmurias hi
moritz \o pmurias
pmurias snake seems to have very little tests, do they live elsewhere or do they need to be written?
moritz hilights arnsholt for ^^ 15:24
timotimo oh hey pmurias :)
jnthn
.oO( will badgering arnsholt cause tests to mushroom into existence? )
arnsholt pmurias: They need to be written 15:25
Also, my irssi only highlights on /^arnsholt/ =)
moritz Hi, my name is moritz, I'm a failed highlighting engineer 15:26
jnthn You must work at GitHub!
arnsholt (jnthn: Implementing Python has addered by brains, incidentally =p) 15:27
pmurias arnsholt: and later on it should be possible to steal some tests from pynie?
lizmat jnthn++
arnsholt pmurias: Definitely!
moritz kinda hopes it's possible to steal tests from python
they do have tests, don't they?
arnsholt The indent handling is almost entirely cribbed from Pynie, actually. Except in NQP, rather than PIR 15:28
I tried looking for tests at some point. Nothing as specific as roast, certainly
pmurias moritz: as far as i remember the tests in python are rather complex in structure
arnsholt There's some test stuff in the Python repo, but it wasn't clear to me whether they were sanity tests for the implementation, or more speccy 15:29
Pypy might have something. Didn't check there yet
15:29 sivoais left 15:30 sivoais joined
arnsholt I have actually considered joining #pypy and ask some questions 15:30
15:31 Sir_Ragnarok left
masak do it! 15:31
15:32 Akagi201 joined
arnsholt Yeah, I think the time is more right now, since some things actually work 15:32
Last I thought about it I was still working on getting the parsing right
timotimo jnthn: the thing you were refering to for the weekly was the parameterized 6model stuff, right? 15:33
jnthn timotimo: That plus some Windows test fixes plus fixing the floor/ceil bug on Moar with large numbers...
timotimo ah, yes 15:34
15:37 anaeem1_ left 15:39 Sir_Ragnarok joined 15:40 sivoais left, dakkar left
hoelzro o/ #perl6 15:40
15:40 anaeem1_ joined 15:41 sivoais joined
[Coke] heyo, hoelzro 15:42
vti what is the best way of doing smth like this from p5 'sub get{shift->route('GET', @_}', currently I have 'sub get (*@rest) { route('GET', |@rest) }' 15:43
hoelzro o/ [Coke] 15:44
jnthn sub get($_, *@rest) { .route('GET, @rest) } maybe. 15:45
uh, without a missing quote :)
lizmat m: sub a (|c) { b(|c) }; sub b { say @_; say %_ }; a( 42, b=>5) # maybe this ? 15:46
camelia rakudo-moar f526b0: OUTPUT«42␤"b" => 5␤»
lizmat m: sub a (|c) { b("foo", |c) }; sub b { say @_; say %_ }; a( 42, b=>5) # maybe this ?
camelia rakudo-moar f526b0: OUTPUT«foo 42␤"b" => 5␤» 15:47
jnthn I thought the point wsa to method call on the first argument?
Or did I understand the shift-> wrong?
vti jnthn: sorry, actually there is no 'shift', just added that automatically
jnthn Oh
vti just passing the same args and adding one in front 15:48
jnthn Then what you had looked fine enough
May be a bit faster with the capture approach
moritz or you can use sub get($_, \c) { .route('GET', |c) }
that passes along named arguments too
jnthn |c in the sig too 15:49
moritz oh 15:50
moritz tends to mix those up
\c would be a single one, right?
vti: sub get($_, |c) { .route('GET', |c) } then 15:51
jnthn Right
15:51 sivoais left
vti thanks 15:52
15:52 sivoais joined, mr-foobar joined 15:54 sivoais left
hoelzro I was thinking about the non-definite form of return values in S06 (ex. method foo($x --> self)). S06 is kind of murky on this, but can the return value in the signature be an arbitrary expression? 15:55
15:55 sivoais joined
hoelzro (I'm thinking of trying my hand at implementing it) 15:55
15:56 b2gills joined
moritz has no idea 15:59
16:00 sqirrel__ left
timotimo moritz: did the scalar-decreasement-effort work out? 16:03
dalek kudo/nom: a3cf223 | moritz++ | src/core/Rat.pm:
Avoid scalar allocations in DIVIDE_NUMBERS

  timotimo++ for coming up with the idea, and benchmarking/profiling
moritz lets dalek answer
timotimo :) 16:04
did you measure yet?
if not, i'm going to do it
moritz timotimo: I didn't 16:05
timotimo i'll have results in a bit :)
hoelzro I'm thinking it makes sense as an arbitrary expression, but I'm wondering if it should be evaluated at compile time or runtime
moritz I had a hang in t/spec/S17-procasync/kill.rakudo.moar and a failure in another async test; I hope they aren't related to my change
hoelzro: run time
timotimo i don't think so, moritz
moritz hoelzro: just like default values are evaluated at run time 16:06
hoelzro moritz: to be consistent with "regular" params?
lizmat fwiw, I've not seen hangs for a *long* time
hoelzro yeah, that makes sense
lizmat moritz: so I would be suspect of hangs ...
timotimo uh oh
moritz hoelzro: yes, you don't want --> [1, 2, 3] to return references to the same array
hoelzro indeed
brrt yeah, spectest hangs for me too
hoelzro moritz++
timotimo it could be compile-time evaluated (maybe in the optimizer) and generate a clone() for it? 16:07
moritz timotimo: in that special cases, yes
timotimo: in --> self, no
timotimo ah, yes 16:08
16:09 JimmyZ left
timotimo moritz: i'm sad to say the number of allocations didn't decrease 16:09
16:09 chenryn joined
timotimo i feared that ;( 16:09
but *something* caused the number of GC runs to decrease anyway 16:10
so we may have another case of an op not being annotated as ALLOCATES
1505 gc runs instead of 1778 gc runs
dalek rl6-roast-data: a853cd8 | coke++ | / (5 files):
today (automated commit)
16:11
jnthn timotimo: getlex may vivify containers, as may getattr; if you implement the "look at end of nursery" thing, then we can just mark up all of those.
timotimo ah, yes, that'd be good 16:12
jnthn: that's the little push i needed to make me implement that :P 16:13
16:13 chenryn left
|Tux| ==> Reinstalling Slang::Tuxic 16:16
Could not download module metadata: Failed to connect: connection refused
in method update at lib/Panda/Ecosystem.pm:91
moritz tadzik: ^^ panda meta data server not running? 16:17
timotimo jnthn: what do you think about ops that first allocate and then call other stuff that may allocate, too? should i allow for a bit of space between the returned object and the current allocation pointer?
16:19 ptc_p6 joined
moritz lizmat: can't reproduce the hang 16:19
so I hope we're fine :-)
brrt moritz - i can 16:20
moritz :(
lizmat I hope so too, otherwise the wrath of [Coke] will be upon you :-)
moritz brrt: can you bisect it please?
16:21 kaare__ joined
jnthn timotimo: Hm, wonder how many of those we have... 16:22
timotimo: Oh...guess split is an example...
lizmat m: "~/rakudo/.bashrc".IO.f # shouldn't we handle ~ at the beginning of a string when creating an .IO ? 16:23
camelia rakudo-moar f526b0: OUTPUT«Unhandled exception: Failed to find '~/rakudo/.bashrc' while trying to do '.f'␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13784 (/home/camelia/rakudo-inst-…»
lizmat does ~ mean something on Win32 ? 16:25
brrt doesn't know how bisect works, and only has mac-availability for the next 5 minutes or so 16:26
timotimo huh, interesting. 16:27
i get a segfault now
getlex or getattr_o may return an actual null pointer?
16:27 denis_boyun left
brrt hmmm 16:27
jnthn Don't think they should 16:28
brrt it should not
although getattr_o may
it is repr-dependent
getlex should not though. and it should do that correctly even if we're jitting 16:29
16:30 brrt left
timotimo i didn't actually look where exactly the segfault came from, but it seems obvious enough %) 16:31
and just as i say that, it still blows up even though i put in a null pointer check %) 16:34
16:35 fhelmberger left
timotimo huh. 16:35
tadzik moritz: indeed, it crashed. Should be up now
timotimo ah, getlex can handle native types, too 16:36
so it's not necessarily a pointer that it returns 16:37
so getting the STABLE(obj)->WHAT fails
hoelzro when a value is deserialized, there's no nqp:: call going on like nqp::create, is there? 16:38
timotimo don't think so 16:39
jnthn: what other ops should i annotate as "maybe annotates"? 16:40
jnthn timotimo: When you instrument, you should only do it if it's an object lexical...
timotimo right, i'll have to inspect that
haven't done much with lexicals yet
jnthn hoelzro: No, no code is run on deserialization 16:41
timotimo: You don't have to, just look at the local type of the register it's assigned into.
timotimo oooooh 16:42
of course :)
japhb I noticed someone mention implementing D&D in Perl 6 in the backlog as I was skimmming for highlights. FWIW I've been sketching out what it would take to implement the rules (even just the character generation rules) of a full pen and paper RPG. It's ... a LOT of special cases. Old school RPGs pretty much assumed they could write any rule at all, because it was humans that had to deal with it, not computers. 16:44
timotimo jnthn: apparently i'll have to check if the spesh_graph's lexical_types was set up and if not i'd look at g->sf instead?
16:45 kaleem left, kaleem joined
jnthn timotimo: Just always look at g->sf->local_types, I think 16:46
16:46 anaeem1_ left
timotimo um, local types 16:46
yes
16:47 jluis_ joined
jnthn Oh, wait, you might want to always go for local_types actually 16:48
Because otherwise it may explode on inlined things
timotimo local_types in the g rather than the sf?
moritz: if you'd like to do a tiny bit more with DIVIDE_NUMBERS: it allocates hundreds of thousands of BOOTCode in my current profile 16:49
nine Is this one known?
m: Buf.new() eq Str.new()
camelia rakudo-moar a3cf22: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤ in method Stringy at src/gen/m-CORE.setting:5715␤ in sub infix:<eq> at src/gen/m-CORE.setting:1550␤ in block <unit> at /tmp/ZZbxARVm7s:1␤␤»
timotimo exactly as many as it allocates Scalar objects
nine Oh, seems even fixed! Ends in an endless loop allocating memory on my machine. Will upgrade rakudo 16:50
jnthn timotimo: yes
timotimo jnthn: but that segfaults :) 16:51
jnthn Oh.
Does the instrumentation look at the locals anywhere yet at all? 16:52
timotimo i don't think so 16:53
the comment clearly states that the local_types is only set up if there's inlines
jnthn Oh, well, I'd trust it then :)
timotimo so since we allocate from a nulled blob anyway, i just put in a check for g->local_types to be non-null
i just added getattr_o and getlex; i should probably add many more. like getlexouter, getdynlex, ... as well as sp_get_o and sp_p6get_o and such? 16:54
jnthn Yeah 16:55
Uh
Not sp_p6get_o
You know that one does not
But there is a variant that does
timotimo oh, of course
jnthn Also getattrs_o, the late-bound one.
16:56 Akagi201 left
timotimo ah, yes 16:57
how do you feel about counting how many allocations come from interpreted code and how many come from spesh'd code?
that way, thrown-out allocations due to spesh would be visible
17:00 pmichaud joined
pmichaud Good morning, #perl6 17:00
nine Good morning, pmichaud! 17:01
jnthn timotimo: Hm, could be interesting idea... 17:02
timotimo: Good prep for when we get escanal too...
o/ pmichaud
pmichaud o/ jnthn
timotimo escanal? that's an amusing way to shorten in
it*
jnthn "A canal! It is a canal!" 17:03
[Coke] enterprise standards C analytics?
[Coke] makes up something plausible.
pmichaud A man, a plan, a canal?
jnthn Escape analysis :P
pmichaud At one level I'm really concerned about how many things our "optimizations" will break after doing GLR. 17:04
vti is my-method preferred over my_method? are there any conventions? 17:06
timotimo there are at least two conventions! 17:07
jnthn pmichaud: Which ones, ooc?
timotimo a third one might be my'method
jnthn pmichaud: There's rather few of them that relate specifically to lists.
pmichaud well, especially the ones attempting to optimize for sink context
jnthn Ah
So things in Perl6::Optimizer, rather than things in Moar
pmichaud since we're planning to change our notion of sink context a bit
yes, in Perl6::Optimizer 17:08
and throughout much of src/core
jnthn Yes, there'll be some upheavel. It's easy enough to turn the optimizer down while we work on GLR
timotimo jnthn: looking at DIVIDE_NUMBERS, here: github.com/rakudo/rakudo/blob/nom/...Rat.pm#L40
do you think the way the code uses the "last statement of block as return value" causes the optimizer to not inline the blocks? 17:09
and thus causes closures to be taken every time we DIVIDE_NUMBERS?
17:10 kaleem left
jnthn timotimo: It's more likely the "my $r" getting in the way 17:11
timotimo: Lexicals declared in a scope prevent it being flattened away, modulo other opts
And while NQP is quite good at those now, Rakudo is less so ('cus it's harder)
timotimo i would have expected that to be turned into a local; i could probably look at the speshlog to find out 17:12
jnthn github.com/rakudo/rakudo/blob/nom/...Rat.pm#L40
oops
No, it won't be.
timotimo we could most probably put $r outside the if/else and it could help?
jnthn Could do, yes
17:13 FROGGS left
timotimo we don't require escanal to turn lexicals into registers at the spesh level when we inline other spesh graphs, right 17:13
?
yes, that did it! :) 17:14
now i'll just need a proper measurement to see if it got worse for some unrelated reason
jnthn The VM isn't the right place to turn lexicals into registers, I don't think. That is a decisoin for higher up. 17:15
17:15 anaeem1 joined
jnthn Too many language semantics come into play 17:15
timotimo OK
17:16 ajr_ left, mr-foobar left
jnthn Note that Moar's optimizer can inline blocks with lexicals, in some cases. 17:17
17:17 guru joined
TimToady is working on his fifth implementation of longext literals now, having discovered four other ways that mostly work... :) 17:17
17:17 guru is now known as Guest77835
TimToady the current implementation works so well it's coredumping now :) 17:18
jnthn TimToady++ # perserverance
timotimo jnthn: how do we handle allocations like in p6recont_ro? it allocates a new container and swaps out the container in its first argument ... 17:19
jnthn timotimo: Umm...not sure we easily can...
pmurias longext literals?
jnthn timotimo: I think that op may go away though
TimToady pmurias: the 2nd tiebreaker rule for longest token matching 17:20
jnthn timotimo: Since emitting it as code would make it transparent to spesh.
timotimo ah, that sounds fair 17:21
17:21 kjs_ left
timotimo jnthn: would you +1 a moar revision bump just to make p6listitems MVM_EXTOP_ALLOCATING? or should i just wait until the next bump comes along? 17:22
17:22 kurahaupo joined
jnthn timotimo: Feels fine; bumps are a renewable resource... :) 17:23
17:23 Guest77835 is now known as ajr_
dalek kudo/nom: c238291 | (Timo Paulssen)++ | src/core/Rat.pm:
make DIVIDE_NUMBERS friendlier to block inlining
17:23
TimToady it's debumps that are limited, since you can't go negative
jnthn timotimo: Did that last patch make a measurable difference? 17:25
timotimo i pushed it for convenience so that i can measure it with perl6-bench on my desktop
jnthn :P 17:27
timotimo might have wanted to push it to a branch instead, but i'm hopeful it'll turn out an improvement
17:29 jluis_ left
timotimo DIVIDE_NUMBERS is now a single "thing" at spesh time, but it still has 42 BBs 17:30
jnthn Well, is that 'cus it inlined all the ops used in it? 17:31
timotimo i'm looking closer right now 17:32
jnthn k
Time to detrain &
timotimo there's some invokes still in there 17:34
the first three fastinvokes probably correspond to gcd, div and div in the first three lines 17:35
and one at the end is for sinking
17:40 kaleem joined, pmurias left 17:56 kaleem left
cognominal strongloop.com/strongblog/whats-new...execution/ Can we do that with rakudo and moarvm? 17:57
17:58 chenryn joined
timotimo yes, we can 17:58
you can have as many MVMInterpreter structures as you like 17:59
18:00 kaleem joined
timotimo actually, i just very briefly looked at the post; what is it actually about, exactly? 18:00
i think moarvm is pretty global-free 18:01
but i haven't actually checked to make sure
18:02 chenryn left
cognominal well, I am looking about the editor atom, and transitively I read about atom-shell, a new way to build guis using node-js and this article about a necessary feature? 18:02
timotimo anyway, gotta AFK for a bit 18:03
cognominal Would be nice if we could hook rakudo as well to atom.
18:05 virtualsue joined, anaeem1 left 18:10 kaleem left
tony-o found it, nvm 18:10
18:11 kjs_ joined
timotimo found what? 18:17
18:20 exixt is now known as EXIXT, gfldex joined 18:21 kaare__ is now known as kaare_
tony-o wrong channel, i was missing a comma in my META for Slang::SQL though 18:23
18:26 xinming_ joined
timotimo OK :) 18:27
18:27 kjs_ left 18:28 xinming left
masak JSON is a harsh mistress. 18:29
timotimo rat_mul_div_cancel 95092/s 108362/s
rat_harmonic 19060/s 21178/s
that's before my DIVIDE_NUMBERS inlining patch on the left, and after on the right
tony-o is ab5tract in here? 18:30
masak timotimo: looks... better.
timotimo just a tiny bit :\
18:30 kjs_ joined 18:32 denis_boyun_ joined, ajr_ left
timotimo for some reason, divide-and-conquer got 4.8x faster over that exact commit 18:32
i don't think that's due to my change, though
18:36 kjs_ left 18:38 FROGGS joined
japhb timotimo: d-a-c is using rationals ... but perhaps you have accidentally found one of the things that causes d-a-c to be unreasonably slow (closures) 18:42
(I don't know that to be the case, I'm just speculating on possible reasons)
18:43 denis_boyun_ left
timotimo i didn't improve closures 18:44
sadly, the profiler doesn't work very well with multple threads
18:45 Ugator left
raydiak \o mornin #perl6 18:50
hoelzro o/ raydiak
timotimo heyo raydiak :) 18:51
raydiak how goes it timo & hoelzro? 18:52
hoelzro it goes
holiday season and whatnot =)
raydiak I hear that...time of year I keep my head down and try to stay away from stores :) 18:53
.oO( oh wait that's all year )
18:55
nine "Or Node embedded in a phone or network switch where it is performing routing logic for multiple connections" <- this scares me on so many levels... 18:58
raydiak as in Node.js?
tony-o .tell ab5tract fixed the HTML::Parser::XML module, it works as expected and it works with the advent sample ugexe provided 18:59
yoleaux tony-o: I'll pass your message to ab5tract.
timotimo yes, node.js
tony-o: way cool :)
tony-o timotimo: it's much faster than when i originally released too :-) (not because i optimized it, either) 19:00
need to get my other modules up to snuff too, i'm disappointed in the async http server performance
raydiak why would you want your embedded devices to run javascript? 19:01
tony-o because ecmascript
timotimo tony-o: did you ever have a look at moarvm's --profile? :) 19:02
19:02 anaeem1_ joined
tony-o timotimo: i haven't, moar segfaults when i siege the server, jvm perl hangs when i siege 19:02
timotimo for html::parser::xml, though? :) 19:03
19:07 sqirrel__ joined
tony-o html parser seems to work great 19:12
i'm taking a look at the web scraper right now, then the async serber
timotimo: are you trying to use the parser for something? 19:13
19:14 pecastro left 19:17 anaeem1_ left
timotimo nah 19:18
i just meant for the profiler
19:20 anaeem1_ joined
tony-o ah 19:20
19:25 dalek left 19:26 dalek joined, ChanServ sets mode: +v dalek
TimToady has pushed the latest longlit patch; you'll need to pull both nqp and moar to keep them in sync under master 19:27
dalek ast: 49638fb | TimToady++ | S05-metasyntax/longest-alternative.t:
more longlit tests for various failure modes
19:29
19:29 EXIXT is now known as exixt
vendethiel- TimToady: github.com/perl6/nqp/compare/53e0c...20de67R164 indentation seems off here 19:29
is that a github issue or is it an editor one?
19:31 exixt is now known as EXIXT
dalek p: 750f659 | TimToady++ | src/QRegex/NFA.nqp:
fix tab damaged noticed by ven++
19:32
timotimo TimToady: how stable does it seem to be?
TimToady passes all the tests except the pairs test, which doesn't seem to be my problem
though it probably only works right for moar, now that I think on it 19:33
19:34 Ugator joined
dalek kudo/newio: 00535f7 | (Elizabeth Mattijsen)++ | src/core/ (7 files):
.IO now does an IOU.new
19:34
TimToady probably should have checked in the branch instead, but got lost in a maze of merge conflicts
dalek kudo/newio: f526b08 | (Timo Paulssen)++ | src/Perl6/Optimizer.nqp:
optimize METAOP_ASSIGN in-place (benefits += in sink context)
19:35
kudo/newio: a3cf223 | moritz++ | src/core/Rat.pm:
Avoid scalar allocations in DIVIDE_NUMBERS

  timotimo++ for coming up with the idea, and benchmarking/profiling
kudo/newio: c238291 | (Timo Paulssen)++ | src/core/Rat.pm:
make DIVIDE_NUMBERS friendlier to block inlining
kudo/newio: f6eea6e | (Elizabeth Mattijsen)++ | src/ (2 files):
Merge branch 'nom' into newio
moritz timotimo: those BOOTCodes, are they from if statements?
timotimo: and what benchmark do you use?
timotimo they are from taking closures
rat_mul_div_cancel from perl6-bench 19:36
TimToady in fact, don't pull nqp right now if you're on jvm or parrot
moritz timotimo: how do I run just that one?
timotimo the lexical $r inside the if clauses prevented inlining, because lexicals are hard
i usually just copy&paste from microbenchmarks.pl and insert a number for SCALE
because i also want to --profile 19:37
moritz timotimo: I can see how $numerator and $denominator can cause closurification, but there's no $r in a condition in DIVIDE_NUMBERS 19:38
nine How do I unpack an array into variables in Perl 6? In Perl 5 I'd do my ($foo, $bar) = @baz;
moritz m: my @ar = <a b c>; my ($a, $b) = @ar; say $b 19:39
camelia rakudo-moar c23829: OUTPUT«b␤»
moritz nine: just the same :-)
tony-o is it possible to break a promise already vowed? i'm using one as a timer to "timeout" a request if it takes too long and if my request is fulfilled prior to the timer then i'd like to not have that timeout promise hanging around 19:40
nine Oh, then I did something wrong when I tried that.
moritz: thanks
tony-o break or keep..
or destroy 19:41
19:41 travis-ci joined
travis-ci NQP build failed. TimToady 'fix tab damaged noticed by ven++' 19:41
travis-ci.org/perl6/nqp/builds/41997965 github.com/perl6/nqp/compare/55b3c...0f65973fcc
19:41 travis-ci left
timotimo damn you, tabs! 19:42
tony-o: timer promises are pretty cheap, i believe
dalek osystem: 0f6241c | (Marco Aurélio)++ | META.list:
Add Coro::Simple.
19:43
osystem: 6542129 | moritz++ | META.list:
Merge pull request #37 from marcoonroad/master

Add Coro::Simple.
tadzik oh :)
timotimo tadzik: is that better than yours? :)
tony-o timotimo: i think they are but they're filling up the queue and causing moar to stop responding
tadzik timotimo: I don't know yet :)
the code looks familiar 19:44
it has some features mine doesn't
19:45 Alula left 19:46 chenryn joined
timotimo oh, wow. 19:49
19:50 vendethiel- left 19:51 chenryn left 19:52 vendethiel joined
tony-o there isn't a mechanism to break the timer promise, though? 19:53
19:54 Alula joined
timotimo oh, wait, actually 19:55
didn't we get cancelable thingies?
no, i think that was for repeating things
19:55 sqirrel__ left
tony-o i wonder if i'm using the wrong mechanism for a timeout :/ 19:56
it sounds like i am
20:01 raiph joined
dalek ast: 71cb115 | usev6++ | S02-types/pair.t:
Fudge tests for RT #123215 for Parrot and JVM
20:01
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123215
FROGGS bartolin: how does that fail on these backends? the patch I did was not moar only 20:04
bartolin FROGGS: on parrot it aborts with duplicate named argument in call in block <unit> at t/spec/S02-types/pair.rakudo.parrot:329 20:05
FROGGS hmmm
20:07 rindolf left, darutoko- left
bartolin FROGGS: on jvm it just doesn't pass: gist.github.com/usev6/2758cadede70afcb92c6 20:07
FROGGS: is a gist for the failure on parrot useful, too? 20:08
FROGGS jvm fails very interestingly here
bartolin: no, I'll need to build a perl6-p anyway :o)
bartolin: thank you
bartolin no problem :-) 20:09
dalek kudo/nom: bf6f157 | moritz++ | src/Perl6/World.nqp:
Fix error reporting inside the setting

without thsi patch, at least r-m always printed the last key for all elements
20:10
timotimo good catch, moritz! 20:11
20:15 kurahaupo left 20:18 kurahaupo joined
TimToady will have to disable longlit on parrot and jvm till he gets those backend nfa engines in shape 20:19
20:22 raiph left, travis-ci joined
travis-ci Rakudo build failed. Moritz Lenz 'Fix error reporting inside the setting 20:22
travis-ci.org/rakudo/rakudo/builds/42001844 github.com/rakudo/rakudo/compare/c...6f15746194
20:22 travis-ci left
timotimo p6weekly.wordpress.com/?p=266&s...393895e763 - feedback please :) 20:22
dalek p: 38d290c | TimToady++ | src/QRegex/NFA.nqp:
disable longlit on jvm and parrot for the moment
20:27
TimToady that should make travis happier anyway
only moar will pass all the new longlit tests though 20:28
but that should unbreak the build
(for people on master) 20:29
jnthn evening, #perl6 20:35
lizmat jnthn o/ 20:36
FROGGS timotimo: I feedbacked
20:37 bjz_ joined, bjz left
colomon \o 20:37
timotimo i saw, thanks :)
jnthn, lizmat, p6weekly.wordpress.com/?p=266&s...393895e763 feel free to feed back :)
lizmat timotimo: I think TimToady did most of the work on the negative index issue... I merely nudged 20:38
jnthn FROGGS: "feedbuck", no? :)
FROGGS jnthn: yeah, probably :o)
jnthn looks at the weekly before he digs into teaching prep :)
20:40 EXIXT is now known as exixt
jnthn timotimo: Looks good to me :) 20:40
20:41 panchiniak joined 20:42 timotimo left, guru joined 20:43 guru is now known as Guest67284 20:44 Guest67284 is now known as ajr_ 20:45 exixt is now known as EXIXT, EXIXT is now known as exixt 20:47 chenryn joined 20:50 cognominal left 20:52 chenryn left 20:53 Mouq joined
masak timotimo: "Mouq worked towards making slangs more easily usable from Perl 6 code, among others by introducing the ~ sigil." 20:53
should that be "twigil"?
Mouq TimToady: NQP needs a Moar bump 20:54
[Coke] masak++ 20:55
20:55 denis_boyun_ joined
dalek line-Python: 09ad48b | nine++ | / (3 files):
Handle exceptions raised in Python or Perl code correctly

We now handle user exceptions, invalid function or method names and passing exceptions from Perl through Python back to Perl.
20:56
20:56 cognominal joined, raiph joined
Mouq nine++ 20:56
nine This should make debugging so much easier :) 20:57
20:58 jluis_ joined
dalek p: 5d9d2b7 | TimToady++ | tools/build/MOAR_REVISION:
bump moar
20:58
20:58 raiph left
jnthn TimToady: I guess try number 5 was the lucky one? :) 20:59
dalek kudo/nom: ac27d2f | TimToady++ | tools/build/NQP_REVISION:
bump nqp
vendethiel nine++ :-)
TimToady except I forgot to fix jvm and parrot's nqp runner, oops
so longlit is disabled in those for the moment 21:00
jnthn nqp runner, or nfa runner?
TimToady er, nfa
jnthn ftm tla...
TimToady ysi 21:01
jnthn What approach did you settle on in the end?
TimToady see the commit messages :) 21:02
errands &
dalek line-Python: 9cb450f | nine++ | pyhelper.c:
Correctly handle invalid method names when calling methods on P6 objects inheriting from Python
21:05 kjs_ joined
jnthn ah, which dalek didn't report. :) OK. 21:06
vendethiel oooh we have a beginning of native arrays :o)? 21:09
21:11 wtw left 21:17 brrt joined, brrt left 21:18 exixt left 21:24 raiph joined 21:27 kjs_ left 21:28 kjs_ joined, Pleiades` left, exixt joined
woolfy Interviews by Denis Banovic during Austrian Perl Workshop with Larry Wall and Jonathan Worthington, in Salzburg (by the way, the article around it is nice too): www.tourismusbesprechungsraum.at/bl...-salzburg/ 21:29
21:31 kaare_ left 21:32 kjs_ left
jnthn oh no, what did I say... :) 21:32
woolfy Follow the link, see the second video... 21:33
21:33 Pleiades` joined
lizmat .tell timotimo "Interviews by Denis Banovic during Austrian Perl Workshop with Larry Wall and Jonathan Worthington, in Salzburg (by the way, the article around it is nice too): www.tourismusbesprechungsraum.at/bl...salzburg/" might be worth mentioning in the Perl 6 Weekly 21:33
yoleaux lizmat: I'll pass your message to timotimo.
vendethiel ooh, I remember this interview! 21:34
woolfy was interviewed as well, I'm sure :P
*g* 21:35
woolfy I was the one holding the camera... I was not interviewed.
(a train interrupted the interview at the end... just a bit of noise...) 21:36
vendethiel this week was a very good week :)
dalek ast: d025d6c | usev6++ | S03-operators/ (2 files):
Replace tests like 'dies_ok' with more specific version
21:37
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77592
woolfy (I did not hold the camera during the interview with jnthn... I assume I did a bad job during Larry's... with the train and all) 21:39
[Coke] Is anyone working on adding a "like" to our Test.pm?
bartolin hmm, maybe that commit holds a bit too much (too specific) testing. but someone once mentioned the term 'interface consistency' ;-) 21:40
21:43 anaeem1_ left 21:44 anaeem1_ joined, anaeem1_ left
[Coke] m: say /'hi'/.WHAT 21:47
camelia rakudo-moar ac27d2: OUTPUT«(Regex)␤»
FROGGS m: say /'knockknock'/.WHAT
camelia rakudo-moar ac27d2: OUTPUT«(Regex)␤»
lizmat m: say /'knockknock'/.WHO 21:48
camelia rakudo-moar ac27d2: OUTPUT«(Mu)␤»
lizmat MuMuMuMu
.oO( there have been better knock knock jokes )
FROGGS m: say ('Look, a joke!'; *).WHAT 21:49
camelia rakudo-moar ac27d2: OUTPUT«(LoL)␤»
21:50 Mouq left
[Coke] :P 21:50
m: say /'hi'/.Str ; say /'hi'/ 21:52
camelia rakudo-moar ac27d2: OUTPUT«Code object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/Sjs_VLbH9m:1␤␤␤␤»
FROGGS how would a aborigine react?
[Coke] m: say /'hi'/.Str ; say /'hi'/.gist
camelia rakudo-moar ac27d2: OUTPUT«Code object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/mJISZ2Qb9q:1␤␤␤␤»
FROGGS (lol) # native LoL
[Coke] m: say /'hi'/.gist
camelia rakudo-moar ac27d2: OUTPUT«␤»
FROGGS stops now
[Coke] m: say /'hi'/.perl
camelia rakudo-moar ac27d2: OUTPUT«regex (Mu: *%_) { #`(Regex|74193440) ... }␤»
[Coke] so there's no pretty printing a regex? 21:53
(vaguely needed to implement like())
FROGGS [Coke]: you could make it output the .perl output for now 21:55
21:56 telex left
[Coke] perl6.org/compilers/ - the rakudo section needs to be updated to talk about moar. 21:56
FROGGS: the .perl is useless.
see ^^
jnthn m: class StateMachine { has $!state = 0; method run() { given $!state++ % 3 { when 0 { 'Knock knock?' }; when 1 { 'Who\'s there?' }; when 2 { 'Bug in your state machine' } } } }; my $sm = StateMachine.new; say $sm.run for ^4
camelia rakudo-moar ac27d2: OUTPUT«Knock knock?␤Who's there?␤Bug in your state machine␤Knock knock?␤»
FROGGS >.< 21:57
[Coke]: same goes for subroutines 21:58
(I think)
21:58 denis_boyun_ left, telex joined, jluis_ left 22:00 denis_boyun_ joined 22:02 ptc_p6 left
jnthn I dunno how robust this will be, but: 22:04
m: sub like-impl($a, $b, $txt) { say $a ~~ $b ?? "ok" !! "not ok - $a ain't like $txt" }; macro like($a, $b) { my $txt = ~$b; quasi { like-impl({{{ $a }}}, {{{ $b }}}, $txt) } }; like 'abc', /\w+/; like '!!!', /\w+/;sub like-impl($a, $b, $txt) { say $a ~~ $b ?? "ok" !! "not ok - $a ain't like $txt" }; macro like($a, $b) { my $txt = ~$b; quasi { like-impl({{{ $a }}}, {{{ $b }}}, $txt) } }; like 'abc', /\w+/; like '!!!', /\w+/;
camelia rakudo-moar ac27d2: OUTPUT«===SORRY!=== Error while compiling /tmp/D3uet963gt␤Redeclaration of routine like-impl␤at /tmp/D3uet963gt:1␤------> "ok" !! "not ok - $a ain't like $txt" }⏏; macro like($a, $b) { my $txt = ~$b; qu␤ expectin…»
jnthn wtf
m: sub like-impl($a, $b, $txt) { say $a ~~ $b ?? "ok" !! "not ok - $a ain't like $txt" }; macro like($a, $b) { my $txt = ~$b; quasi { like-impl({{{ $a }}}, {{{ $b }}}, $txt) } }; like 'abc', /\w+/; like '!!!', /\w+/; 22:05
camelia rakudo-moar ac27d2: OUTPUT«ok␤not ok - !!! ain't like '!!!', /\w+/␤»
jnthn There we go :)
oh, well, almost...hmm. 22:06
Anyway, it's a way to get the text :)
22:08 denis_boyun_ left
dalek ast: aad8694 | usev6++ | S03-operators/arith.t:
Add test for RT #122053
22:12
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122053
bartolin and with that: good night #perl6! 22:15
22:18 wtw joined
FROGGS gnight bartolin 22:26
22:27 panchiniak left 22:36 chenryn joined 22:40 chenryn left, kjs_ joined 22:41 vti left 22:46 Mouq joined
dalek kudo/newio: 7b96bac | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
Copy all file open logic to open()
22:46
kudo/newio: 327ef78 | (Elizabeth Mattijsen)++ | src/core/IO/Handle.pm:
PIO is a public attribute (at least for now)

We need to be able to set it with .new
kudo/newio: bf6f157 | moritz++ | src/Perl6/World.nqp:
Fix error reporting inside the setting

without thsi patch, at least r-m always printed the last key for all elements
22:48
kudo/newio: ac27d2f | TimToady++ | tools/build/NQP_REVISION:
bump nqp
kudo/newio: ef6e3b9 | (Elizabeth Mattijsen)++ | / (2 files):
Merge branch 'nom' into newio
22:48 timo joined, timo is now known as timotimo
jnthn Sleep time...'night 22:50
TimToady good night
timotimo seems like the machine i'm using for irc, mail, web hosting, jabber and other stuff has fallen off the 'net
yoleaux 21:33Z <lizmat> timotimo: "Interviews by Denis Banovic during Austrian Perl Workshop with Larry Wall and Jonathan Worthington, in Salzburg (by the way, the article around it is nice too): www.tourismusbesprechungsraum.at/bl...salzburg/" might be worth mentioning in the Perl 6 Weekly
lizmat gnight jnthn 22:51
timotimo++ weekly!
22:51 KCL_ joined
timotimo thank you 22:51
and thank you all for the work i was able to present :)
22:52 synopsebot left 22:53 masak left, tadzik left, pmichaud left, [Coke] left, Util left 22:54 Juerd left, hugme left, dalek left
timotimo oh, kind of looks like another server that's used for irc sessions has fallen off the 'net 22:54
TimToady oh, ~ is a twigil, not a sigil... 22:55
Mouq m: say $~MAIN # Still 99% NYI :P 22:58
camelia rakudo-moar ac27d2: OUTPUT«Slang.new(:grammar(Perl6::Grammar), :actions(Perl6::Actions))␤»
raydiak perlcabal.org and perl6.org are down too 23:00
23:06 masak joined, tadzik joined, pmichaud joined, Util joined, masak is now known as Guest92293, Juerd joined, dalek joined, ChanServ sets mode: +v dalek
timotimo welcome back, featherers! 23:06
TimToady
.oO(The United Featheration of P6anets)
23:07
23:07 hugme joined, ChanServ sets mode: +v hugme
TimToady hugme: hug yourself 23:08
hugme hugs yourself
23:08 synopsebot joined
lizmat hugme: hug herself 23:10
hugme hugs herself
lizmat :-)
23:11 [Coke] joined, vti joined 23:12 kjs_ left
timotimo vendethiel: please tell me more about how the last week was good :) 23:14
23:21 [Sno] left 23:22 [Sno] joined 23:25 exixt is now known as EXIXT 23:37 chenryn joined 23:41 chenryn left 23:45 timotimo left 23:46 timo joined, timo is now known as Guest54457 23:49 nebuchadnezzar left 23:51 virtualsue left
tony-o with nativecall, is it possible to dereference a sub and pass that into the library (as a mechanism for a callback, for instance)? 23:52
i'm looking at the microhttpd example here: www.gnu.org/software/libmicrohttpd/ 23:53
trying to figure out in what way i can abuse MHD_start_daemon to run a perl6 sub
dalek kudo/newio: d64b919 | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
pipe() now has all the logic it needs
23:54
kudo/newio: 130fd21 | (Elizabeth Mattijsen)++ | src/core/IO/Handle.pm:
IO::Handle.encoding fixes
FROGGS tony-o: yes
lizmat and with that, good night, #perl6!
FROGGS tony-o: look at NativeCall's test suite, there are examples for callbacks
gnight lizmat
tony-o FROGGS: i guess i missed it 23:55
FROGGS: oh in the test suite ..
FROGGS yes
woolfy timotimo: I should have asked vendethiel the same question... so I hope he answers... 23:56
23:58 raiph left