»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
[Coke] submits a macport for moar. 00:00
00:02 dolmen left
timotimo TimToady: i'd want to do proper measurements first :) 00:02
grondilu I4ve just tried with SDL_RenderDrawPoints but could not make it to work.
TimToady what did you feed it? 00:03
grondilu a CArray[SDL_Point], but I may have failed to build it properly
gist.github.com/grondilu/7e66deb134e630e561ee <= my attempt with SDL_RenderDrawPoints 00:04
timotimo how does it fare when you have an $points instead? 00:06
grondilu not sure what you mean 00:07
timotimo just change the sigil
grondilu oh
timotimo just a total shot in the dark
um, actually 00:08
SDL_RenderDrawPoints takes a third argument
with the number of points to draw
grondilu indeed, missed that.
timotimo you have too much faith in C :) 00:09
personally, i'd see if the CArray could be re-used, maybe even re-use the SDL_Point structures inside, too
grondilu I still get a black screen :/ 00:10
timotimo update the gist please? 00:11
grondilu done
I just added a @points.elems 00:12
timotimo yo ushould also add the third parameter to the function signature up there 00:13
grondilu ahh
00:13 rurban1 left
TimToady does a CArray auto-extend like that? 00:13
grondilu forgot that indeed
TimToady: that's how it's done in 05-arrays.t in zavolaj I think. 00:14
timotimo yes it does
TimToady seems like it'd be worthwhile pre-extending in any case
if you're going for performance
timotimo yeah
grondilu I can't know its size in advance (I only draw one color)
TimToady do them from the end the beginning, for instance
*to 00:16
or just set point at i and j first
oh, nevermind 00:17
I see it's just a list of random points
so roughly %50 are set
grondilu yes
TimToady if you reuse you'd have to set them all, but then you'd have to do something like that eventually if you double-buffer or so 00:18
grondilu on the other end, I can use the third argument to SDL_RenderDrawPoints, and always allocate the maximum size array. 00:19
grondilu tries that 00:20
TimToady then maybe you could just go through and tweak the color of all the points, as timotimo++ suggested, and not realloc each time 00:21
grondilu oh $++ in the if is always 0 00:22
TimToady and maybe that could be done in a separate thread, as long as you don't care about sync
grondilu m: say "hi"
camelia rakudo-moar 114659: OUTPUT«hi␤»
grondilu m: for ^10 { if rand < .9 { say $++ } } 00:23
camelia rakudo-moar 114659: OUTPUT«0␤0␤0␤0␤0␤0␤0␤0␤0␤»
grondilu ^see?
TimToady yes, that block is recloned by the outer loop, so that's how it's supposed to behave
"state" only goes one level out
it's not "static" 00:24
grondilu indeed, just did not foresee it
TimToady it's easy to think of it as C's "static", I'll grant you 00:25
grondilu ouch:
No such method 'bind_pos' for invocant of type 'TypedCArray[SDL_Point]'
grondilu updates the gist
it's here: my @points := CArray[SDL_Point]; 00:27
@points[$++] := SDL_Point.new for 1 .. $w * $h;
timotimo TimToady: it's not actually drawing colored points; it clears the screen black and draws white points
grondilu yes
TimToady yes, but he was only drawing the black points, I think
timotimo oh, you already saw
TimToady and using clear to make white
00:28 adu left
grondilu I'm actually drawing white points, but you got the idea. 00:28
(and clearing in black)
timotimo %)
TimToady I would think that C semantics require = rather than := 00:29
timotimo you can use as many threads as the user has cores to have a "ring buffer" of arrays of random points (and their sizes, of course)
TimToady or just two channels of buffers handed back and forth, used and re-randomized 00:30
timotimo or that, yeah 00:31
TimToady I see that Point is just a location without color. is there a Pixel or so that carries the color as well, that you could modify in place?
grondilu if I don't use := I get 'Cannot modify an immutable TypedCArray[SDL_Point]'
TimToady: there is a pixel structure but its format is complicated. 00:32
I could not make it work anyway (it would have looked more like the C solution) 00:33
TimToady wonders if you could declare the $!x and $!y as rw and then just randomize those... 00:35
grondilu randomizing the location would not exactly give the same thing. 00:36
TimToady the task doesn't say it has to be exactly 50% bw
timotimo TimToady: that's not doable yet, but it will be RealSoon™
because that's what jnthn is doing right now
grondilu TimToady: if you randomize the location you need to pick a number of white pixel to through in, that's kind of cheating. 00:37
well, not cheating, but "artificial" let's say. 00:38
timotimo if you randomize the location, you may end up with two pixels in the same position
TimToady doesn't specify that it has to come out to 50% white 50% black
grondilu it has to obey statistical laws, not arbitrary picks.
TimToady random is...random... 00:39
grondilu you can carefully pick your numbers to match the expected statistics, but that's artificial.
TimToady you put put up one random pixel per screen and it'd still be random :)
grondilu it's not the same kind of randomness.
TimToady IT DOESN'T SPEC THE STATISTICS!!! 00:40
grondilu it was implicit, imho.
TimToady if it's implicit, it's not there :)
and if it makes you feel better, you could use .pick instead of .roll 00:41
but that'd be slower
anyway, it's just an idea
grondilu well, before I'd get into that I'd first make SDL_RenderDrawPoints work. 00:42
(or rather I'd wait for someone to make it work) 00:43
TimToady anyhoo, grondilu++ for a first solution 00:44
and grondilu++ for lot's of other first solutions 00:45
timotimo RenderDrawPoints is still not working?
00:47 Alina-malina left 00:48 Alina-malina joined
grondilu I've just made it work in C. It's faster but not much. Still can't make it work in Perl 6. 00:48
00:48 Alina-malina left, Alina-malina joined
grondilu the C code: gist.github.com/grondilu/588b78f4838bad93ba53 00:49
timotimo btw, github.com/timo/SDL2_raw-p6/blob/m....pl#L48-49 this is how i "upload" raw pixel data onto a drawable surface 00:52
i think i'll go to bed 00:53
have a good one!
grondilu good night 00:55
01:01 skids joined 01:11 rurban left, raiph joined 01:25 Mouq joined 01:32 BenGoldberg left, BenGoldberg joined 01:48 colomon left 01:49 raiph left 01:50 colomon joined 01:52 yeahnoob joined
japhb DANG IT, I can't get rid of *resolve stage failed for Grammar::Debugger: Dependency Term::ANSIColor is not present in the module ecosystem 02:06
... in my "rebuild everything" script
02:10 grettir left
japhb The section of my script that handles panda: gist.github.com/japhb/9cad548e5f8650ebb07a 02:11
Anyone have an idea what change will work around this problem?
flussence install Term::ANSIColor from a local git clone first, maybe?
japhb flussence: I suppose -- still makes me wonder if other modules that "should be there" are going to fail as well .... 02:12
And why is this happening in the first place suddenly?
flussence shrugs... 02:14
the only useful info I get out of this is that panda's missing a warning message where one's needed
02:16 adu joined
timotimo grondilu: couldn't fall asleep yet, so here's what i'm thinking: you're using perl6 "int" but sdl uses "int32"? 02:17
colomon Term::ANSIColor was in the ecosystem this morning....
colomon just installed it with no issues
flussence yeah, something fishy's going on. it's in META.list but panda isn't seeing it for some reason. 02:18
colomon my panda sees it, is what I’m saying
flussence odd...
colomon my panda hasn’t gotten the latest update in a few days, I suppose
japhb colomon: If you 'panda update', does it break?
02:19 lumimies left
colomon wonders why he would want to try to break his panda 02:19
yes, it does
japhb OK, so something's messed up in the downloaded file.
colomon: For SCIENCE!
colomon wait, wait said that wrong 02:20
Term::ANSIColor still installed fine after panda update
japhb hmmmm
Maybe it's a newly-built panda that's broken?
japhb worries that some last-minute change in Rakudo before the release broke it 02:21
colomon will update everything
did we release today? 02:22
japhb colomon: yes 02:26
colomon \o/
okay, got the latest rakudo-m, reinstalled panda, did panda update, installed Term::ANSIColor. It all worked fine. 02:27
flussence maybe it's a filesystem/IO issue? 02:29
that's the only obvious thing I can think of that's changed...
02:29 kshannon left 02:30 colomon left, kshannon joined, colomon joined 02:33 jack_rabbit joined
japhb colomon: What directory were you in when you ran the panda commands? 02:39
colomon errr… ~/Videos/Movies
japhb Huh 02:41
I was wondering if it was only working in the panda dir or rakudo tree or something 02:42
What OS are you on again?
colomon That was Linux
japhb Hmmm. 64-bit?
colomon yes
japhb Gah. 02:43
colomon same as you?
japhb Yeah.
My script sets up a rakudo-moar build tree (with the HEAD sha1 as part of the path), clones nqp and moar in the right places inside it, configures with --gen-nqp --gen-moar, make, make install, then clones a panda in a separate directory and does what was in that gist. 02:44
colomon I’m not on the latest Ubuntu, if that makes you feel better. 02:45
02:45 ilbot3 left
japhb I think I'm on latest LTS. 02:45
colomon hmmm, I’m on 14.04, I think 02:46
japhb That sounds right
02:46 raiph joined
japhb Grrrr 02:46
I wonder ... 02:47
02:47 ilbot3 joined
japhb tries nuking his existing "parent" clone of panda, in case there's something wrong with my local mirror 02:49
02:49 yeahnoob left
skids wrestles with rakudobrew. perl6-m seems to install and run fine and you can set a --prefix. panda installs in languages/perl6/site/ instead of languages/perl6/lib where star put it, then complains of missing m-CORE.setting 02:51
flussence my own rebuild script just nukes everything and copies the panda state file back afterwards, no other state preserved... 02:52
colomon rakudobrew has worked very well for me, but I just use it as is, rather than trying to finesse things with it. 02:54
japhb flussence: I used to attempt to keep the state file, then that just got unreliable at some point, so I just have my rebuild script install all the modules I want to be there by default.
02:57 grondilu left 03:03 yeahnoob joined, BenGoldberg left
japhb Sonofagun, that was it. Something was wrong with my panda mirror. 03:14
colomon mirror— 03:15
japhb Updating the panda mirror is just 'cd panda; git pull; git submodule update --init --recursive'
I wonder what's wrong with the assumption there.
*my assumptions
03:30 fhelmberger joined 03:34 fhelmberger left 03:43 firefish5000 joined 03:59 noganex joined 04:02 noganex_ left 04:05 jack_rabbit left, fernando___ joined
fernando___ Hi! 04:05
Am I doing something wrong: 04:07
Any.^add_method("Bla", method () {Bla.new(:id(self))});
it is creating a anon method on Any class
a "<anon>"
but, if I do: Any.^add_method("Bla", method Bla() {Bla.new(:id(self))}); 04:08
it works
on rakudo star
~/rakudo-star-2015.01/install/bin/perl6 -v
This is perl6 version 2015.01 built on JVM
can any on help me? 04:09
Mouq fernando___: A) why are you doing this? B) You might want to try "my method …" ? 04:10
fernando___: Or am I misunderstanding
fernando___: I think I am
fernando___ I am trying to dynamic create a method... 04:11
the "Bla" method name for real is a variable...
but I tried to isolate my problem using a "constant" 04:12
and it occurred...
Mouq Right, so in the first example, "Any.Bla" *is* created. It's just that the method that you've put into it doesn't know it has a name, because, well, it doesn't
japhb you could use 'anon method Blah', though I don't remember if that's NYI 04:13
.ask nine_ Do you have a guide or some slides for Inline::Python? I actually think I have a business use for this. :-)
yoleaux japhb: I'll pass your message to nine_.
Mouq Any.^add_method("Something", my method SomethingElseCompletely() { … }) will work fine, creating Any.Something, but not Any.SomethingElseCompletely 04:14
fernando___ japhb: I tried that too...(without the Blah...) let me try with the name
Mouq I'm pretty sure that's a "feature" rather than a "bug" in this case
fernando___ it created with the "Blah" name... but my problem continue... 04:15
I can't create a new method with dynamic name...
Mouq fernando___: What's the problem?
fernando___ that's what Im trying to do: 04:16
multi method add-resources($resource) { 04:17
say $resource.^name;
$resource.^name.fmt("Any.^add_method(%s, method () \{\$resource.new(:id(self))})").say;
my &meth = anon method test () {$resource.new(:id(self))};
Any.^add_method("bla", &meth);
%!resources{$resource.name} = $resource
}
(Im sorry... I didn't want to flood the channel)
Mouq: ^^ 04:19
Mouq fernando___: Is design.perl6.org/S12.html#FALLBACK_methods helpful?
fernando___ I don't think so... 04:20
the "my method" didn't work for me eigther 04:21
Mouq: here, for me the SomethingElseCompletely was created... 04:23
is there any way to change the name property of a Method object? 04:24
Mouq m: class Bla { has %rs; method add-r($r) { my &meth = my method { $r.new(:id(self)) }; self.^add_method($r.name, &meth); %rs{$r.name}; self } }; Bla.new.add-r((Any but role {has $.name}).new(:name<foobar>)) 04:26
camelia ( no output )
fernando___ Mouq: what is the %rs hash? 04:30
sorry, I saw!
04:31 yeahnoob left, rmgk_ joined, rmgk left, rmgk_ is now known as rmgk
fernando___ sorry, I didn't get it... 04:32
isn't it giving a name for the Any type?
let me explain from the beginning what I am trying to do: 04:33
I am trying to do that any Class "registered" on a specific method (ad-resources) automatic creates a coerce method from Any to that Class 04:35
Mouq Oh
m: class Bla { has %rs; method add-r($r) { my \meth = my method { $r.new(:id(self)) }; Any.^add_method($r.name, meth); %rs{$r.name}; self } }; my Bla $b .= new; $b.add-r: (Any but role {has $.name}).new(:name<foobar>); say Any.foobar 04:36
camelia rakudo-moar 114659: OUTPUT«Any+{<anon>}.new(name => Any)␤»
Mouq m: class Bla { has %rs; method add-r($r) { my \meth = my method { $r.new(:id(self)) }; Any.^add_method($r.name, meth); %rs{$r.name}; self } }; my Bla $b .= new; $b.add-r: (Any but role {has $.name; has $.id}).new(:name<foobar>); say Any.foobar 04:37
camelia rakudo-moar 114659: OUTPUT«Any+{<anon>}.new(name => Any, id => Any)␤»
Mouq Anyway, this is kind of a hacky way to do it… I'm sure someone else will come up with something better in the morning 04:38
It also doesn't seem that doing that distributes the new method to derived classes (which is probably reasonable behavior, given that we're not really supposed to be adding methods after composition :P ) 04:42
fernando___ just a question: I didn't get... I don't know if I understood, but... I am not passing Any to the add-r()... I am passing another class... and buy passing this class to the add-r, it should create a coerce method from Any to that class...
Mouq fernando___: Sorry my one-liner isn't very clear. I was just using "Any but role {has $.name}" as an example class 04:43
fernando___ oh! I'm sorry!
Mouq m: class Res { has $.name}; class Bla { has %rs; method add-r($r) { my \meth = my method { $r.new(:id(self)) }; Any.^add_method($r.name, meth); %rs{$r.name}; self } }; my Bla $b .= new; $b.add-r: Res.new(:name<foobar>); say Bla.new.foobar
camelia rakudo-moar 114659: OUTPUT«No such method 'foobar' for invocant of type 'Bla'␤ in block <unit> at /tmp/U9ThkiblCj:1␤␤»
Mouq m: class Res { has $.name}; class Bla { has %rs; method add-r($r) { my \meth = my method { $r.new(:id(self)) }; Any.^add_method($r.name, meth); %rs{$r.name}; self } }; my Bla $b .= new; $b.add-r: Res.new(:name<foobar>); say Any.foobar
camelia rakudo-moar 114659: OUTPUT«Res.new(name => Any)␤»
Mouq Again, it doesn't work on anything except Any 04:44
*Again, the method can't be called on any of the children classes of Any. There may be a way around that, but I don't know
m: use MONKEY_TYPING; augment class Any { multi method FALLBACK("foobar") { say "falling back!" } }; Int.foobar 04:45
camelia rakudo-moar 114659: OUTPUT«No such method 'foobar' for invocant of type 'Int'␤ in block <unit> at /tmp/lDTtYMV73O:1␤␤»
Mouq m: use MONKEY_TYPING; augment class Any { multi method FALLBACK("foobar") { say "falling back!" } }; augment class Int {}; Int.foobar 04:46
camelia rakudo-moar 114659: OUTPUT«falling back!␤»
Mouq Hm...
fernando___ humm... 04:47
Mouq fernando___: Sorry I couldn't be of more help 04:48
fernando___ no, you helped a lot! 04:49
that's a good way that I can move!
thank you very much!
Mouq fernando___: np, good luck! :) 04:51
fernando___ it looks that worked... 04:52
but didn't coerce my data... :(
thank you very much...
I will sleep a little... tomorrow I'll try again... 04:53
thanks!
05:04 ingy^util left 05:52 mr-foobar left 05:54 diana_olhovik_ joined 06:00 firefish5000 left 06:05 jack_rabbit joined 06:08 telex left 06:10 telex joined 06:19 firefish5000 joined 06:21 kurahaupo1 left 06:23 diana_olhovik_ left 06:31 adu left 06:36 xfix joined 06:41 Rounin joined 06:45 jack_rabbit left, Mouq left 06:46 Mouq joined 06:50 kaleem joined 06:51 gfldex joined 06:53 jack_rabbit joined 06:55 kurahaupo1 joined 07:04 diana_olhovik joined 07:10 pdcawley left
moritz \o 07:19
07:20 gfldex left
[Tux] o/ 07:23
dalek line-Perl5: fc2b56b | moritz++ | META.info:
Remove NativeCall as a dependency

it is now (since 2015.02) shipped with rakudo
07:25
k-simple: 55f2965 | moritz++ | META.info:
remove NativeCall as a dependency

it is now shipped with rakudo.
07:26
07:28 geekosaur left 07:29 geekosaur joined
dalek volaj: 4a29f3b | moritz++ | README.markdown:
README: mention that NativeCall is shipped with rakudo
07:29
07:29 geekosaur left
jnthn o/ 07:30
moritz \o jnthn
07:31 geekosaur joined
dalek ar: b6d7f3a | moritz++ | tools/star/Makefile:
Adjust versions to the Rakudo 2015.02 compiler release
07:32
jnthn One loose end that we will want to tie up at some point: where to NativeCall bugs get submitted now? 07:35
07:36 kaleem left
moritz rakudobug, I'd hope 07:36
jnthn There's 15 at github.com/jnthn/zavolaj/issues
rakudobug wfm
moritz so somebody[tm] should migrate them to rakudobugs, and then disable issues on github
[Tux] I know about .gist and .perl and I see good use for both, but in e.g.: 07:37
m: "\x[0000A0]".perl.say 07:38
camelia rakudo-moar 114659: OUTPUT«" "␤»
[Tux] is there a way to output that as "\x[A0]"
dalek ar: c36cac0 | moritz++ | modules/ (5 files):
Bring modules up to date
07:39
ar: ea65dfa | moritz++ | / (2 files):
Change version numbers in README and Makefile.in
07:39 FROGGS joined
moritz m: say to-json "\x[0000A0]" 07:39
camelia rakudo-moar 114659: OUTPUT«"\u00a0"␤»
[Tux] that was unexpacted :)
moritz [Tux]: it seems to be an oversight that .perl doesn't escape that
[Tux] perlbug it?
moritz [Tux]: yes 07:40
[Tux] also for €?
moritz don't think so
m: say "\x[0]".perl
camelia rakudo-moar 114659: OUTPUT«"\x[0]"␤»
moritz m: say "ø".perl 07:41
camelia rakudo-moar 114659: OUTPUT«"ø"␤»
[Tux] m: "\x[0020ac]".perl.say
camelia rakudo-moar 114659: OUTPUT«"€"␤»
FROGGS what is the problem?
yoleaux 19 Feb 2015 21:27Z <moritz> FROGGS: please remove NativeCall as a dependency from Inline::C. kthxbye
[Tux] do I really need to-jason to see that it is 20ac?
FROGGS moritz: will do :o)
[Tux] FROGGS, one moment, I'll show 07:42
FROGGS m: say to-json "€"
camelia rakudo-moar 114659: OUTPUT«"\u20ac"␤»
07:42 diegok left
FROGGS m: say (to-json "€").Str 07:42
camelia rakudo-moar 114659: OUTPUT«"\u20ac"␤»
FROGGS m: print (to-json "€")
camelia rakudo-moar 114659: OUTPUT«"\u20ac"»
[Tux] m: "Đ".perl.say 07:43
camelia rakudo-moar 114659: OUTPUT«"Đ"␤»
FROGGS ahh, now I understand
07:43 darutoko joined
[Tux] is this \x[00d0], \x[0110], or \x[0189] ? 07:43
FROGGS [Tux]: but that is not the purpose of .perl
raydiak m: "ø".ord.base(16) 07:44
camelia ( no output )
raydiak m: "ø".ord.base(16).say
camelia rakudo-moar 114659: OUTPUT«F8␤»
FROGGS .perl lets you serialize things so they can be EVALed at a later point in time
[Tux] I will keep that in mind
I'll also try to remind the to_json
FROGGS I'd like to have a Str.uniinfo or so, that provides a hash table containing the data of this page: www.fileformat.info/info/unicode/ch.../index.htm 07:46
m: say uniname "€"
camelia rakudo-moar 114659: OUTPUT«EURO SIGN␤»
moritz FROGGS: me too, thought I wouldn't object to a proper object instead of a hash
FROGGS moritz: hashes are objects too :P 07:47
but yeah
moritz p5 think :-)
[Tux] m: "\x[00d0]\x[0110]\x[0189]".perl.say
camelia rakudo-moar 114659: OUTPUT«"ÐĐƉ"␤»
[Tux] "\x[00d0]\x[0110]\x[0189]".uniinfo.say ? :)
FROGGS "\x[00d0]\x[0110]\x[0189]".chars».uniinfo».say 07:48
07:50 diegok joined
raydiak m: Str.^methods».name.grep: /uni/ 07:51
camelia ( no output )
raydiak m: say Str.^methods».name.grep: /uni/
camelia rakudo-moar 114659: OUTPUT«unival univals␤»
FROGGS moritz: done # Inline::C
raydiak m: "∈".unival.say 07:52
camelia rakudo-moar 114659: OUTPUT«NaN␤»
raydiak m: "a".unival.say
camelia rakudo-moar 114659: OUTPUT«NaN␤»
FROGGS somebody should write a UniInfo module that just exports uniinfo/uniinfos subs
moritz FROGGS: thanks 07:53
07:53 jack_rabbit left
FROGGS m: "⓯".unival.say 07:53
camelia rakudo-moar 114659: OUTPUT«15␤»
FROGGS raydiak: ^^
raydiak neat 07:54
FROGGS aye
m: "㏥".unival.say
camelia rakudo-moar 114659: OUTPUT«NaN␤»
FROGGS :o)
raydiak a character that isn't in my font...don't see those very often :) 07:55
FROGGS m: say uniname "㏥" 07:56
camelia rakudo-moar 114659: OUTPUT«IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SIX␤»
Rounin m: "\x[2603]".unival.say
camelia rakudo-moar 114659: OUTPUT«NaN␤»
Rounin m: say uniname "\x[2603]"
camelia rakudo-moar 114659: OUTPUT«SNOWMAN␤»
raydiak m: say "\x[2603]"
camelia rakudo-moar 114659: OUTPUT«☃␤»
Rounin m: say uniname "爽"
camelia rakudo-moar 114659: OUTPUT«<CJK Ideograph>␤»
Rounin m: say 一...十 07:58
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4nkEjlLDVP␤Undeclared routines:␤ 一 used at line 1␤ 十 used at line 1␤␤»
Rounin m: say "一"..."十"
camelia rakudo-moar 114659: OUTPUT«一 丁 丂 七 丄 丅 丆 万 丈 三 上 下 丌 不 与 丏 丐 丑 丒 专 且 丕 世 丗 丘 丙 业 丛 东 丝 丞 丟 丠 両 丢 丣 两 严 並 丧 丨 丩 个 丫 丬 中 丮 丯 丰 丱 串 丳 临 丵 丶 丷 丸 丹 为 主 丼 丽 举 丿 …»
Rounin Oh my
I forgot how they're sorted according to dictionary order 07:59
08:00 raiph left 08:01 spider-mario left
dalek ar: ad60319 | moritz++ | docs/announce/2015.02.md:
Draft release announcement for 2015.02
08:01
Rounin say 1, 2, 3... 08:03
m: say 1, 2, 3 ...
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_FsjeJV8Qw␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument␤at /tmp/_FsjeJV8Qw:1␤------> 3say 1, 2, 3 ...7⏏5<EOL>␤ expecting any…»
Rounin m: say 1, 2, 3, ...
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/o9qX4JftTf␤Comma found before apparent series operator; please remove comma (or put parens␤ around the ... listop, or use 'fail' instead of ...)␤at /tmp/o9qX4JftTf:1␤------> 3say 1, 2, 3,7⏏5 ...…»
08:04 jack_rabbit joined 08:05 prime- left
sergot morning #perl6 08:05
moritz \o sergot 08:06
08:07 prime joined 08:08 wicope joined 08:11 kurahaupo1 left 08:13 rurban joined 08:19 Ven joined, mohij joined 08:21 jack_rabbit left 08:25 _mg_ joined
moritz Util: in rakudo there's a prots/darwin_dmg/ directory which you have contributed 08:25
*ports
Util: however, this is based on parrot, which we'll not use after the 2015.02 release 08:26
Util: so, either we (for some values of "we") can updated that to use MoarVM, or remove it
Util: any thoughts?
08:30 lumimies joined 08:32 fhelmberger joined 08:33 spider-mario joined, jack_rabbit joined 08:39 mohij left 08:40 zakharyas joined 08:41 mohij joined 08:45 Ven left
moritz afk& 08:45
08:47 jack_rabbit left, rindolf joined 08:58 Ven joined 09:01 jack_rabbit joined, grondilu joined
grondilu Rounin: 1, 2, 3 ... * 09:02
(the * is mandatory)
Rounin Thanks, grondilu! I googled around for it for the longest time, to be honest
m: say 2, 3, 5, 7 ... *
camelia rakudo-moar 114659: OUTPUT«2 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155…»
Rounin Ah, so it goes by the 5, 7 09:03
m: say 1, 2, 6, 24, 120, 720 ... *
camelia rakudo-moar 114659: OUTPUT«===SORRY!===␤Unable to deduce arithmetic or geometric sequence from 24,120,720 (or did you really mean '..'?)␤»
Rounin Heheh 09:04
We're constrained by reality I see
09:07 rurban1 joined 09:08 _mg_ left 09:13 jack_rabbit left 09:14 mohij left 09:19 kaleem joined 09:20 bjz joined 09:21 bjz left, bjz joined 09:24 jack_rabbit joined 09:34 abraxxa joined, kjs_ joined 09:37 brx joined 09:38 _mg_ joined 09:39 bjz left 09:40 jack_rabbit left 09:41 rurban2 joined, rurban2 left 09:45 Ven left
nwc10 where's the source for dalek? 09:46
09:46 Ven joined 09:47 Ven left 09:48 sqirrel joined 09:53 jack_rabbit joined 09:58 espadrine joined 09:59 Mouq left 10:02 |Tux| left, xfix left 10:03 colomon_ joined 10:04 colomon left, colomon_ is now known as colomon 10:05 jack_rabbit left, eternaleye left, bjz joined
dalek ast: f476a59 | lizmat++ | S17-supply/start.t:
Fix deprecated .sleep call
10:06
ast: f3a8568 | lizmat++ | integration/advent2014-day05.t:
Fix another .sleep deprecation
10:09
masak good antenoon, #perl6 10:10
tadzik hello masak
masak hello. 10:11
my name is inigo montoya.
you killed my father.
prepare to die. 10:12
tadzik :o 10:14
10:17 rurban left
tadzik prepare, right. Let me put on my die-pants 10:17
lizmat m: say try {die} // "failed" 10:19
camelia rakudo-moar 114659: OUTPUT«failed␤»
10:22 rurban joined 10:28 rurban left
spider-mario I have just seen this on Parrot’s web site: 10:30
“ + rakudo perl6 announced to drop parrot support.”
is that true?
10:31 _mg_ left
spider-mario (parrot.org/news/2015/Parrot-7.1.0 ) 10:31
lizmat spider-mario: pmthium.com/2015/02/suspending-rakudo-parrot/
2015.02 is the last compiler / * release that will support parrot in the foreseeable future 10:32
spider-mario ok, thanks
10:33 Ven joined
spider-mario guess I’ll remove my rakudo-parrot package for arch linux, then 10:33
and replace it with rakudo-moarvm
lizmat that feels future proof to me 10:34
10:42 Ven left
[ptc] lizmat: is anyone working on the Debian Rakudo / Rakudo* package? 10:45
I notice that the current Debian package is 2014.07, based on parrot as its backend
El_Che [ptc]: there is a favolous perl debian team (pkg-perl.alioth.debian.org/). However I don't know if they do perl§ packages as well 10:48
lizmat I hope so... latest debian comes with rakudo 2012.02 on parrot 10:49
tadzik I think moarvm is the problematic part, it shipping its own libtommath etc
and debian maintainers don't like it when programs bundle libraries rather than using system libraries
10:54 rurban joined
El_Che tadzik: that's a very light way of formulating it 10:54
grondilu that's very sensible, though.
El_Che tadzik: debian won't ship the pkg UNTIL it's replace by debian libraries. What it's pretty logical for an OS 10:55
grondilu imagine the mess if all packages were shipping their own versions of libraries.
dalek kudo/newio: 1146597 | lizmat++ | src/core/Exception.pm:
Fix for #123884, [Tux]++
10:56
kudo/newio: d386900 | lizmat++ | src/core/IO/Handle.pm:
Deprecate IO::Handle.input-line-separator for .nl
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123884
kudo/newio: 9a75383 | moritz++ | / (79 files):
Remove parrot support from Rakudo.

Please see pmthium.com/2015/02/suspending-rakudo-parrot/ for some background information
kudo/newio: b327d0e | lizmat++ | / (78 files):
Merge branch 'nom' into newio
grondilu is on debian sid and can confirm available rakudo is 2014.07-4
El_Che grondilu: it sounds pretty much to what's coming with docker and co: track each ssl vulnerability
lizmat Debian 7.8 Wheezy doesn't :-( 10:57
grondilu tbh it would only make sense to put rakudo on debian/stable at "chrismas". 11:00
11:01 spider-mario left, skarn left
[ptc] actually, it would be great if users could just go: apt-get install rakudo and then have a reasonably current version 11:02
El_Che [ptc]: for that scenario you need a p6 repo that people can add
grondilu "reasonably current" is very subjective.
El_Che [ptc]: and that install stuff in e.g. /opt 11:03
so people can install system p6 at the same time
grondilu apt-get install rakudo works fine on sid.
[ptc] grondilu: I know ... but having a bleading edge version isn't always the best thing
grondilu (last time I tried anyway) 11:04
dalek kudo/newio: c1116de | lizmat++ | src/core/PIO.pm:
Do some more birdlessing
[ptc] grondilu: it works now, however it's based on parrot, and it would be good to have the option of moarvm or jvm as backends, even for those who simply install from the package manager
grondilu well, yes.
[ptc] and if the package comes from official Debian, that's very helpful for an impression of stability as well as to get user uptake 11:05
El_Che: a p6 repo is a good idea, but I was thinking more along the lines of official Debian 11:06
11:06 skarn joined 11:07 Ven joined
grondilu again, that should happen on Xmas. 11:07
El_Che well, you can do both like Virtualbox
standard OS VB is most of the time
move to VB repo if you need a new functionality (or a fix for a weird bug)
[ptc] grondilu: for it to happen at Xmas, the debian package build files need to be accepted into the package maintenance process 11:08
which takes a while...
grondilu well, there is time to prepare. It's not like Xmas is tomorrow. 11:09
[ptc] grondilu: true, however I've had packages wait months to years before anything starts to happen 11:10
does anyone know which package the debian build packages are located? I've checked the repos under perl6/ and rakudo/, however haven't found anything 11:11
grondilu ok, moreover I suppose debian is not the only GNU/linux distrib so there's no way rakudo can be shipped on all of them for Xmas.
[ptc] that's true 11:12
talking about "other distros": I haven't seen any spec files either. Is there a repo with these in somewhere?
dalek ar: 2f7d3a2 | timo++ | docs/announce/2015.02.md:
change "January" to "February"
11:13
moritz timotimo++
home.p6c.org/~moritz/rakudo-star-20...rc0.tar.gz 11:14
(still with the old announcement)
it fails jsonrpc on parrot for me
(and lots of JVM failures; I fear they are expected)
dalek c: e600ff3 | paultcochrane++ | t/pod-convenience.t:
Test Pod::Convenience::pod-with-title
11:15
c: 4f93f87 | paultcochrane++ | t/pod-convenience.t:
Plan 9 tests

Actually am only adding a plan to the test file; it just so happened to be 9 tests. ... Well, it seemed amusing at the time :-)
c: 26f60cd | paultcochrane++ | lib/Pod/Convenience.pm6:
Localise variable in pod-lower-headings()
c: 6b25b8a | paultcochrane++ | lib/Language/ (2 files):
Merge branch 'master' of github.com:perl6/doc
c: 42ed02c | paultcochrane++ | t/pod-convenience.t:
Test Pod::Convenience::first-code-block
c: b9300ba | paultcochrane++ | / (3 files):
Merge branch 'master' of github.com:perl6/doc
El_Che [ptc]: packages.debian.org/sid/rakudo
[ptc]: the links are on the right
[ptc]: the maintainer emails are there as well 11:16
[ptc] El_Che: thanks. Have looked there. I meant on GitHub :-)
timotimo i feel i made a valuable contribution to R* 2015.02
moritz timotimo: you did
El_Che [ptc]: well the debian changes are there in the *-debian.tar.gz 11:17
11:18 rurban left
[ptc] El_Che: I know. I just didn't want to start a new repo or add files to an existing one if they're already in the perl6/ GitHub namespace/ecosystem/thingie 11:18
El_Che: I don't want to clobber someone else's work; it'd be nice to build upon it :-) 11:19
11:21 |Tux| joined
moritz github.com/rakudo/star/blob/master...2015.02.md feedback welcome 11:22
lizmat moritz: panda givees 11:23
dalek ar: 2426ecd | moritz++ | docs/announce/2015.02.md:
announce: be more consistent in the use of markdown
ar: 67e5c83 | moritz++ | docs/announce/2015.02.md:
typo, lizmat++
11:24
lizmat moritz: "in shape en par" -> "in shape and on par"
dalek ar: 35a43b2 | moritz++ | docs/announce/2015.02.md:
wording, lizmat++
11:25
lizmat that's it
moritz lizmat++
Ven lizmat++ timotimo++
[ptc] moritz: full stop missing at end of second paragraph
[ptc] is still reading 11:26
dalek ar: 5abb64c | moritz++ | docs/announce/2015.02.md:
Update announcement

  * update list of failing parrot modules (only one)
  * missing fullstop, [ptc]++
  * more consistent use of markup
11:27
11:27 FROGGS left
lizmat moritz: it seems, 9a75383d *added* S26-documenttation/01-delimited.t to t/spectest.data 11:28
[ptc] moritz: looks good :-)
moritz++
moritz lizmat: oh, did I mis-merge? 11:29
dalek kudo/nom: face62b | lizmat++ | t/spectest.data:
Remove references to non-existing test files
11:30
nine_ How can I match white space separated tokens in my grammar? I tried rule server_alias { ServerAlias <domain>+ } as well as rule server_alias { ServerAlias [<domain> \h*]+ } but neither match
yoleaux 04:13Z <japhb> nine_: Do you have a guide or some slides for Inline::Python? I actually think I have a business use for this. :-)
moritz lizmat++ thanks
timotimo nine_: you can try [...] +
or + % [\h*]
moritz m: say 'ServerAlias a b c' ~~ /:s ServerAlias [\w+ ]+/ 11:31
camelia rakudo-moar 114659: OUTPUT«「ServerAlias a b c」␤»
moritz seems that [<domain> ]+ should work
m: say 'ServerAlias a b c' ~~ /:s ServerAlias [\w+] +/
camelia rakudo-moar 114659: OUTPUT«「ServerAlias a b c」␤»
moritz as well as <domain> +
nine_: a word of warning: since apache config directives are separated by newlines, you redefine token ws to only include horizontal whitespace 11:34
otherwise you will get *very+ surprising mis-parses
nine_ <domain> + works :) [<domain> ]+ seems to require white space after the last domain before the newline
moritz: did that 11:35
moritz: and got them :)
11:36 xfix joined
nine_ .tell japh niner.name/talks/Leapfrogging the bootstrap/Leapfrogging the bootstrap.pdf is your best bet for now. Page 37 and following. Or have a look at the tests. They should be somewhat instructive. And feel free to ask me any time here. 11:36
yoleaux nine_: I'll pass your message to japh.
11:43 Mouq joined 11:46 rurban joined, coffee` joined 11:48 Mouq left
[ptc] moritz: there's a routine in Pod::Convenience (pod-gist) which isn't used anywhere in the perl6/doc repo (other than recursively within itself): is it ok if I delete it? 12:01
lizmat m: say npq::unbox_i(42)
camelia rakudo-moar 114659: OUTPUT«Could not find symbol '&unbox_i'␤ in method <anon> at src/gen/m-CORE.setting:14883␤ in any find_method_fallback at src/gen/m-Metamodel.nqp:2823␤ in any find_method at src/gen/m-Metamodel.nqp:1001␤ in block <unit> at /tmp/hDGI1NllU1:1␤␤»
[ptc] moritz: Mouq wrote it originally, however isn't around to ask, and thought you'd be a good person to ask :-) 12:02
lizmat m: say Foo::bar()
camelia rakudo-moar 114659: OUTPUT«Could not find symbol '&bar'␤ in method <anon> at src/gen/m-CORE.setting:14883␤ in any find_method_fallback at src/gen/m-Metamodel.nqp:2823␤ in any find_method at src/gen/m-Metamodel.nqp:1001␤ in block <unit> at /tmp/iJA_PD5rAu:1␤␤»
lizmat why isn't that a compile time error ?
Q: does an nqp::unbox_s create a copy of the string? 12:04
I would think not, but want to check just in case 12:05
12:06 virtualsue joined
moritz [ptc]: it's handy for debugging htmlify 12:08
[ptc]: so I'd leave it in
12:09 sqirrel left
[ptc] moritz: ok 12:09
moritz: it wasn't easy to see what it did and thus wasn't easy to test 12:10
moritz [ptc]: it tries to be a better $pod.gist 12:11
[ptc]: ... unless I totally mis-remember it
12:16 silug left
[ptc] moritz: cool, thanks :-) 12:17
timotimo lizmat: it does not, but strings are immutable, at least on moarvm 12:23
lizmat yeah, that's what I figured :-)
12:27 brx left
moritz had some fun with tooling: github.com/tadzik/panda/pull/136 12:28
12:31 silug joined 12:33 kjs_ left
tadzik oo 12:35
ooooo
me gusta
why does it have 250 commits though? :o 12:36
12:37 abraxxa left
tadzik because it now contains all the deps' history? 12:37
12:38 rurban left
moritz tadzik: yes 12:38
tadzik: that could be avoided with --squash, if you'd prefer that 12:39
tadzik I think I would, navigating the history now would be a bit more difficult, I think 12:40
nwc10 tadzik/moritz: the trick we were using in perl 5 was to force a non-ff merge 12:43
so you end up with a merge commit, the left parent of which is to the start of a run of related commits
and the right parent of which is the run of commits
so the left parent is the "squashed" commit (and the default that most things see) 12:44
but the branch to the right preserves the detail
tadzik sounds nice
nwc10 see perl5.git.perl.org/perl.git/blob/HE...t.pod#l733 12:45
(dear everyone reading the IRC logs in years to come, that URL is prbably going to go wrong. Sorry)
moritz the subtree merges aren't fast-forward 12:51
so that's how it is now
just github shows them linearly
12:53 molaf_ joined
moritz for example github.com/tadzik/panda/commit/76b5d is a merge commit 12:53
12:55 rurban joined 12:56 molaf__ left
tadzik aha 12:57
dalek kudo/nom: 36ffb65 | lizmat++ | src/core/Str.pm:
Make generic Str.subst between 5 - 10% faster
12:58
kudo/nom: bf2d1dd | paultcochrane++ | lib/Test.pm:
Add simple use-ok implementation
kudo/nom: 32523c1 | lizmat++ | lib/Test.pm:
Merge pull request #367 from paultcochrane/pr/add_use_ok

Add simple use-ok implementation
[ptc] lizmat++ thanks :-) 12:59
lizmat [ptc]++ # thank you!
[ptc] lizmat: no problems! I hope it works ok. Am using it a bit more now and finding that the simple implementation might not have been good enough *sigh* 13:00
lizmat: I'll update it if I find any problems
lizmat well, another PR is welcome
[ptc] ok :-) 13:01
dalek kudo/nom: bf00eff | lizmat++ | src/core/Str.pm:
Small cleanup I forgot just now
13:17
lizmat afk for a few hours
13:35 Ven left 13:37 kaare_ left, Ven joined
Util moritz: I plan to update ports/darwin_dmg/ to support (and default to) MoarVM. 13:39
[Coke] Util: is that a self contained .dmg installer? 13:43
moritz Util: ok, great 13:46
Util [Coke]: It generates a .dmg of the R* "installed" dirs, all corrected to point to /Applications/Rakudo_Star. So yes, the end product is a drag-and-drop "self-contained". 13:48
[Coke] lizmat: those test files exist, but they probably needed to have a newline between them. 13:49
Util It has a few problems with getting the last lib-path cross-references fixed, and that is why I have not strted deploying .dmgs of R* yet.
The binaries would work on the machines of people who had (for example) ever built R* themselves, but not on machines completely new to R*. 13:50
[Coke] Util: nice. I am working on getting rakudo-m and rakudo-j on macports, will have to think about how we want to deal with recommended modules there. I really don't want to go the path of having each module in as a separate plugin, but it seems there's an overwhelming amount of prior art.
Util I will fix this during my update.
[Coke] er, *as a separate port 13:51
Util [Coke]: Do you mean rakudo-m from Rakudo, or rakudo-m from Rakudo Star? 13:52
moritz tadzik: github.com/tadzik/panda/pull/137 for your pleasure, now with only 9 commits 13:55
13:55 beastd joined
Util is a Homebrew user, so has no advice on your macports modules. Coke++ for it, though! 13:56
[Coke] a fiver tried to introduce me to homebrew, but at the time, it had none of the stuff I used. 13:58
Util: just bundled MoarVM (simple) next is to do nqp in 2 or 3 flavors, then rakudo in 2 flavors. Then I'll worry about what to do with Star. 13:59
moritz fwiw you could make a star-modules bundle (like Task::Star), which requires rakudo, and adds all the modules 14:00
dalek c: 1b44b51 | paultcochrane++ | t/pod-convenience.t:
Add plan to first-code-block tests
14:01
c: 85e24fa | paultcochrane++ | / (2 files):
Add initial Pod::Htmlify

This currently only exports url-munge(); more to come. Also added tests of url-munge().
c: 71799fb | paultcochrane++ | Makefile:
Add a simple Makefile

This aids slightly in building the html and running the test suite.
c: 3f26e7b | paultcochrane++ | htmlify.p6:
Use url-munge from Pod::Htmlify in htmlify.p6
14:02 RusAlex left
moritz [ptc]++ # brining some order to the mess I made with htmlify 14:03
*bringing
dalek c/inline-pygments: 63f0b7c | moritz++ | htmlify.p6:
Attempt to make Inline::Python optional

  ... falling back to the old shelling-out code
14:04
[ptc] hopefully I'm not breaking anything... I'm really just a hacker at heart!
moritz well, if you break something, we'll fix it 14:05
*shrug* 14:06
it's not like we have five 9s SLA or something
ingy Greetings. github.com/acmeism/RosettaCodeData is now completely up to date!
moritz [ptc]: and in the long run, tests will help us not to break things, so it's really the best possible direction 14:07
\o ingy
ingy Util++ # a ton of minor fixes of human mucked up wiki pages 14:08
[ptc] doesn't want to know about SLAs anymore... 14:09
moritz heh :-)
[ptc] thinks the name ITIL is amusing, especially if one speaks German 14:10
ingy Util: 100 new tasks added. I forgot that the new task addition is not automatic.
yet :)
14:12 larion joined
dalek c: 39e1c0f | paultcochrane++ | lib/Language/functions.pod:
Remove extra '<' in C< > block
14:13
c: 1ebc2d6 | paultcochrane++ | htmlify.p6:
Rename pygmentize-code-blocks -> highlight-code-blocks

We don't need to know how the code blocks are being highlighted, especially not in the name of the sub which does the highlighting.
14:18 kjs_ joined 14:22 raiph joined 14:28 skids left
tadzik moritz++ awesome :) 14:30
14:30 Kristien joined
Kristien What are the use cases for ENTER? 14:30
I can't really think of any 14:31
moritz I think it's mostly there for symmetry to LEAVE 14:32
for example it could be nice to set up a temp file in ENTER and unlink it in LEAVE
Kristien ah I see
moritz or one could start something asynchronously while the rest of the routine runs, without putting it on top of the routine 14:33
masak m: for 1..2 { ENTER { my $t = (^1000).roll; say "Setting up $t"; LEAVE say "Tearing down $t" }; say "Processing..." } 14:34
camelia rakudo-moar 114659: OUTPUT«Setting up 622␤Tearing down 622␤Processing...␤Setting up 357␤Tearing down 357␤Processing...␤»
masak hm.
so, not like PRE and POST, then.
guess that one can be argued both ways...
14:34 Rounin left
masak m: for 1..2 { my $t; ENTER { $t = (^1000).roll; say "Setting up $t" }; LEAVE { say "Tearing down $t" }; say "Processing..." } 14:35
camelia rakudo-moar 114659: OUTPUT«Setting up 261␤Processing...␤Tearing down 261␤Setting up 702␤Processing...␤Tearing down 702␤»
masak better. :)
PerlJam masak: what do you mean "not like PRE and POST"? 14:37
moritz PRE/POST are always scoped to a routine
so you can nest the POST inside the PRE block if you want 14:38
masak PerlJam: POST can be nested inside PRE to benefit from its lexicals.
PerlJam oh, I see.
masak yeah, it's all about what it binds to, I guess.
LEAVE binds to any block.
m: for 1..2 { ENTER { my $t = (^1000).roll; say "Setting up $t"; NEXT say "Tearing down $t" }; say "Processing..." } 14:39
camelia rakudo-moar 114659: OUTPUT«Setting up 471␤Processing...␤Setting up 449␤Processing...␤»
moritz m: my $x = { PRE False }; $x()
camelia rakudo-moar 114659: OUTPUT«Precondition 'False' failed␤ in block at /tmp/SBc_ioAFVI:1␤ in block <unit> at /tmp/SBc_ioAFVI:1␤␤»
moritz m: my $x = { PRE False }; say "alive"; $x()
camelia rakudo-moar 114659: OUTPUT«alive␤Precondition 'False' failed␤ in block at /tmp/YM35kmDD2w:1␤ in block <unit> at /tmp/YM35kmDD2w:1␤␤»
moritz seems like PRE isn't tied to a routine
masak I'm surprised the NEXT one above doesn't show "Tearing down <n>"
moritz: oh right, it doesn't!
moritz: then it wouldn't work with loops. 14:40
so there *is* a special case of sorts for POST.
moritz masak: you didn't call next; did you?
masak m: for 1..2 { ENTER { my $t = (^1000).roll; say "Setting up $t"; NEXT say "Tearing down $t" }; say "Processing..."; next }
camelia rakudo-moar 114659: OUTPUT«Setting up 984␤Processing...␤Setting up 97␤Processing...␤»
masak moritz: I don't think I have to.
moritz: there's like an implicit `next` at the end of a loop.
masak submits rakudobug 14:41
tadzik moritz++ # awesome work on panda
PerlJam m: for 1..2 { ENTER { my $t = (^1000).roll; say "Setting up $t"; next; NEXT say "Tearing down $t" };
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GUyw7r38lf␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/GUyw7r38lf:1␤------> 3$t"; next; NEXT say "Tearing down $t" };7⏏5<EOL>␤»
PerlJam blah
Kristien I found a wonderful Java refactoring tool today.
PerlJam m: for 1..2 { ENTER { my $t = (^1000).roll; say "Setting up $t"; next; NEXT say "Tearing down $t" }; }
camelia rakudo-moar 114659: OUTPUT«Setting up 349␤Setting up 651␤»
Kristien it's called rm it even ships with codeutils 14:42
PerlJam even with the next ...
:)
masak Kristien: refactoring. you keep using that word. I don't think it means what you think it means.
PerlJam m: for 1..2 { ENTER { my $t = (^1000).roll; say "Setting up $t"; NEXT say "Tearing down $t" }; next; }
camelia rakudo-moar 114659: OUTPUT«Setting up 606␤Setting up 552␤»
PerlJam huh
Kristien masak: it has "factori" in it so I guess it has to do with adding factories to your design 14:43
masak m: for 1..2 { NEXT say "hup!" }
camelia rakudo-moar 114659: OUTPUT«hup!␤hup!␤»
masak m: for 1..2 { ENTER { NEXT say "hup!" } }
camelia ( no output )
masak p6: for 1..2 { ENTER { NEXT say "hup!" } } 14:44
camelia ( no output )
15:01 Kristien left
nine_ So I parsed my Apache config into an AST. Now I'd like to convert this into an AST for an Nginx config. Are there some best practices/examples for how to do that? 15:03
15:04 _mg_ joined
moritz nine_: the rakudo way would be to do a tree transform into an nginx tree, and then a code/config emitting stage 15:05
arnsholt It depends on how general you want/need it to be 15:06
nine_ moritz: what would the code for such a tree transform look like? 15:07
arnsholt But you can probably get away with traversing the Apache AST and building an Nginx object as you go
Then dump the nginx object to string when you're done
nine_ arnsholt: that's what I'm going to do unless someone knows a better way 15:08
moritz nine_: probably a tree traversal that, at each node calls a multi sub that transform a single node into another node 15:09
nine_ multi sub! I'd have forgotten about them. So many shiny new toys :) 15:10
moritz nine_: they seem to be the cleanest solution, because they don't attach the transformation knowledge to the source type (as methods would), and neither are they a huge chain of if statements 15:12
at least that's how JSON::Tiny does the serialization 15:13
|Tux| just re-synced from rakudobrew: I now do see a speedup (I think) 15:14
40.x => 38.x seconds
15:16 telex left
nine_ Perl 6 makes parsing so much fun, I wish I had more things to parse :) 15:17
15:18 telex joined
dalek c: 6f0eb63 | moritz++ | lib/Language/functions.pod:
Explain "is assoc"
15:24
moritz nine_: well, you can now start parsing nginx config files :-)
nine_: also I'm kinda interested in a general-purpose apache config parser 15:25
nine_: it seems to hit a sweet spot of readability both in the small and the in the large; it allows delimited groups as well as newline-separated short directives
and there are at least two projects where I'd have used it if I had found a proper parser for it on CPAN 15:26
nine_ moritz: I already wrote a grammar that can parse some nginx config :) As we discovered in the past few months, Apache just sucks as front end proxy for starman. So we're now migrating to Nginx. With > 1400 virtual hosts, that's kind of a challenge. Hence the try to automate this.
dalek c: 8255be9 | moritz++ | lib/Language/functions.pod:
remove a TODO marker where I have no idea what is to be done
15:27
moritz nine_: so you're writing Perl 6 for $work?
nine_ moritz: indeed I do :)
moritz nine_: please blog about it :-) 15:28
15:28 smls joined
nine_ moritz: I don't need to parse Nginx configs for the conversion, but will use the code later for automating some standard config changes. 15:28
moritz nine_: oh, and are you available for hire? We'd need somebody who can do both perl 5 and python (and a bit of frontend work), and Perl 6 would be a plus in my eyes :-)
oh wait, you said you did it for $work, so likely not 15:29
nine_ moritz: I'm very comfortable where I am right now. Hey, I can even write Perl 6 at work :) When I do have time to code something... 15:30
moritz arstechnica.com/information-technol...h-version/ those are seriously impressive numbers, IMHO 15:35
smls m: my $c = 1; say [$c, ++$c].perl; 15:37
camelia rakudo-moar 114659: OUTPUT«[2, 2]␤»
smls m: my $c = 1; say [$c + 0, ++$c].perl;
camelia rakudo-moar 114659: OUTPUT«[1, 2]␤»
smls ^^ same in Perl 5.
Is it that referencing a variable in the same expression that changes it is simply undefined behavior?
Or is there some more fine-grained rule to what you can expect it to do? 15:38
masak I don't really see what the problem is.
moritz I'm not quite sure, but I can explain the values above easily
masak if you're thinking in terms of sequence points, then surely each evaluated element is one. 15:39
surely there's nothing weird about a variable changing its value from one array element to another?
moritz S03 talks about sequence points
masak *especially* in element order :)
smls masak: Well, [$c, ++$c].perl; could also interpolate the value of $c into the first array element, *before* the second expression gets to increment it 15:40
moritz design.perl6.org/S03.html#Sequence_points
smls: no, [...] is a call to circumfix:<[ ]>
smls: and argument lists are evaluated before they are passed on to the callee
smls ah ok 15:41
but still, it means that the single $c argument is evaluated to its container, nhot the value
and only after the whole argument list has been evaluated, it's value is read 15:42
m: my $c = 1; my @a = $c, ++$c; say @a.perl; # same with list assignment (or binding) 15:48
camelia rakudo-moar 114659: OUTPUT«Array.new(2, 2)␤»
smls So I guess the correct way to think about it is that the comma operator makes no promises about being a sequence point? 15:49
(unlike in C) 15:50
Or is it really about the container vs value distincion I mentioned above? 15:51
moritz smls: $c is evaluated to a variable. If you assigned to it (instead of binding), it references a container
smls: and the decontainerization (if it happens) is done by the binder
so, as part of passing the arguments, *after* they have been evaluated
smls m: my $c = 1; say ($c, ++$c).perl; # what is the "binder" in this case? 15:52
camelia rakudo-moar 114659: OUTPUT«(2, 2)␤»
moritz smls: there's a call to infix:<,> in there
for the comma
and that call involves the binder, like every call 15:53
smls ok
15:54 _mg_ left
smls m: say &postcircumfix:<[ ]>.gist 15:56
camelia rakudo-moar 114659: OUTPUT«use of uninitialized value $name of type Any in string context in block <unit> at /tmp/bPoGfF5upf:1␤␤sub postcircumfix:<[ ]> (Any |) { #`(Sub|48789632) ... }␤»
smls ^^ bug in .gist ? 15:57
moritz yes
15:57 fernando___ left 16:00 fernand__ joined, skids joined
fernand__ Hi! can anyone help me? I am trying to make a role that when someone create a class that do that role, it automatically creates a coerce method from Any (and all descendents) to that class. 16:00
is that possible? 16:01
my 2nd try was call a method from another class passing the role's class as parameter and the method should use the Any.^add_method() to create a new method named as the class name
m: class BlaWithRole {}; class TypeManager {method register($type) {my &meth = my method () {$resource.new};Any.^add_method($resource.^name, &meth);}}; TypeManager.register(BlaWithRole);Any.^methods.say;
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UWaycFaSMk␤Variable '$resource' is not declared␤at /tmp/UWaycFaSMk:1␤------> 3 {my &meth = my method () {$resource.new7⏏5};Any.^add_method($resource.^name, &meth␤ expecting any of:␤ me…»
fernand__ my bad...
Ven it has to be possible, it's #perl6 :P 16:02
dalek rl6-roast-data: 00fb121 | coke++ | / (5 files):
today (automated commit)
fernand__ m: class BlaWithRole {}; class TypeManager {method register($type) {my &meth = my method () {$type.new};Any.^add_method($type.^name, &meth);}}; TypeManager.register(BlaWithRole);Any.^methods.say;
camelia rakudo-moar 114659: OUTPUT«exists_key delete_key delete_pos list flat eager hash Parcel elems end keys kv values pairs invert squish rotor reverse sort reduce combinations permutations unique uniq pick roll classify categorize lol map for flatmap duckmap deepmap tree Array push unsh…»
Ven fernand__: you can chat in private with camelia through /w camelia m: ... to perfect your gists before putting them on the channel if you're unsure, or just use the REPL
fernand__ Ven: thanks, Im sorry... 16:03
Ven It's fine, I do it all the time :). It's really just more comfortable, if you don't have a REPL hanging around
fernand__ this code for me is creating a anon method on Any... 16:04
Ven sorry, I can't really help you, I'm not much into the metamodel stuff 16:07
fernand__ can any one help me?
16:10 diana_olhovik left 16:12 perl6_newbee joined
perl6_newbee hi together 16:12
nine_ Servas 16:16
16:18 fernando___ joined 16:19 kaleem left 16:24 espadrine left
fernand__ How could I automaticaly create a coerce method for classes that do a specific role? 16:24
masak fernand__: maybe ask with code? your question is a bit abstract. 16:25
fernand__ masak: masak, here is something that looks a bug for me: 16:26
class BlaWithRole {}; class TypeManager {method register($type) {my &meth = my method () {$type.new};Any.^add_method($type.^name, &meth);}}; TypeManager.register(BlaWithRole);Any.^methods.say;
16:26 _mg_ joined
fernand__ it's creating a anon method on Any 16:26
dalek c: b060886 | (Adrian Kreher)++ | htmlify.p6:
Use Inline::Python to interact with pygments

This is significantly faster when syntax highlighting but requires Inline::Python which is currently difficult to build. On my machine, htmlify with an external pygments takes around 22:20, while using it via Inline::Python took only 6:25.
c: 63f0b7c | moritz++ | htmlify.p6:
Attempt to make Inline::Python optional

  ... falling back to the old shelling-out code
c: 471e680 | moritz++ | htmlify.p6:
Merge branch 'inline-pygments'
tadzik \o/
moritz htmlify.p6 is back to ~5min with Inline::Python and pygments
16:27 estrabd left
moritz nine_++ # Inline::Python 16:27
avuserow++ # initial perl6/doc patch for using Inline::Python 16:28
16:28 PZt left 16:29 Ven left
fernand__ masak: did you see? 16:29
flussence
.oO( our biggest performance problem today is the startup time of *python*... )
skids fernand__: maybe there is away to name the method before passing it to add_method? Agree that's probably a bug. 16:30
smls With Inline::Python it will be more difficult make it process multiple snippets in parallel, right? 16:31
fernand__ skids: could you reproduce this "bug"?
moritz smls: possibly 16:32
smls Also, since when does Camelia use IRC colors?
:)
flussence since oh... a day or 2 ago
smls nice
|Tux| throws spaces at smls :)
smls ;)
fernand__ skids: I tried to rename it... but I couldn't... 16:33
16:35 Ven joined
moritz m: my $x = my anon method () {}; $x.name = 'flurb'; say $x 16:37
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5===␤Type 'anon' is not declared␤at /tmp/QmWWjqg53C:1␤------> 3my $x = my anon7⏏5 method () {}; $x.name = 'flurb'; say $x␤Malformed my␤at /tmp/QmWWjqg53C:1␤------> 3my $x = my 7⏏5anon method () {}; $x.name = 'flurb'; sa…»
moritz m: my $x = my method () {}; $x.name = 'flurb'; say $x
camelia rakudo-moar 114659: OUTPUT«Cannot modify an immutable Str␤ in block <unit> at /tmp/vktYEfkPdd:1␤␤»
moritz m: my $x = my method () {}; $x.set_name('flurb'); say $x
camelia rakudo-moar 114659: OUTPUT«flurb␤»
moritz fernand__: you can use .set_name
nine_ smls: this is so typical Python. Despite several people asking how to embed multiple interpreters, the answers are only that exceedingly few people need this and one should use multiple processes instead. 16:38
skids fernand__: Yes I can see an <anon> method added on a very recent build of rakudo as well. 16:39
moritz well, we could limit the Inline::Python calls to a single thread
but parallelizing htmlify doesn't work; the concurrency support is too unreliable right now :( 16:40
16:41 _mg_ left 16:44 kjs_ left
fernand__ with the set_name it's working!!! 16:45
but it steel looks a bug for me... 16:46
16:46 jluis joined
moritz it doesn't look like a bug to me 16:47
you install an anon method, so that's what you get
the MOP is a fairly low-level thing; you shouldn't expect a lot of "Do what I mean" from it
16:48 diana_olhovik joined
fernand__ moritz: but why would the .^add_method would expect a "name" if it isn't being used? 16:49
add_method($object, $name, code); what is that $name for? 16:50
moritz fernand__: the name by which you can call the method 16:51
m: Any.^add_method('thingy', my method () { 'argl' }); Any.thingy
camelia ( no output )
moritz m: Any.^add_method('thingy', my method () { 'argl' }); say Any.thingy
camelia rakudo-moar 114659: OUTPUT«argl␤»
moritz see, you can call it by that name
fernand__ for me its creating a anon method...
that's the "bug" 16:52
moritz fernand__: there are two names
fernand__: one that the method itself knows about
fernand__: and one by which you can call it from the outside
(or more than one, if you install the same method with multiple names)
that's a feature.
skids Well, one could argue that .^methods should show you the latter.
moritz skids: what would be the use? 16:53
well
skids To see what methods you can call.
moritz that's what .^method_table does
m: class A { }; A.^add_method('flurb', my method () { }); say A.^method_table.perl 16:54
camelia rakudo-moar 114659: OUTPUT«("flurb" => method <anon> ($: *%_) { #`(Method|62862072) ... }).hash␤»
skids m: class BlaWithRole {}; class TypeManager {method register($type) {my &meth = my method () {$type.new};Any.^add_method($type.^name, &meth);}}; TypeManager.register(BlaWithRole);Any.^method_table.keys.say; # fernand__'s example 16:55
camelia rakudo-moar 114659: OUTPUT«exists_key delete_key delete_pos list flat eager hash Parcel elems end keys kv values pairs invert squish rotor reverse sort reduce combinations permutations unique uniq pick roll classify categorize lol map for flatmap duckmap deepmap tree Array push unsh…»
skids doh. clipped.
moritz skids: that's why I used a separate class in my example, not Any :-)
16:57 Ven left
fernand__ I understood! 16:57
thank you very much!
I have another question:
moritz you're welcome
fernand__ I could create a method on Any... Why I can't use this method on Int? 17:01
moritz fernand__: do you want the short or the lang answer? 17:05
nine_ both :) 17:06
moritz short: "likely a bug"
fernand__ the longest the best... (i want to understand...)
moritz long: each type is "composed" when the closing curly brace of the definition is parsed
this composition publishes a method cache 17:07
so, in this order, Any is declared and composed, Int is declared and composed
now you add a method to Any
but Int doesn't know that, and doesn't update its method cache
why? because Any doesn't know that Int is a subclass of it 17:08
and it can't hold a reference to it, because then classes could never get garbage-collected
so, one could say it's a bug in rakudo
but one could also say that it's a bug in the code that adds a method after a class was composed 17:09
and that doesn't attempt recompose the class (and its subclasses)
[Coke] also, don't do that.
moritz aye
don't muck with built-in types; they are about as global as anything you get in Perl 6
and modifying globals is BAD, with capital B
fernand__ :) 17:11
but, so, if I do augment class Int {} after add the method on Any it should recreate the cache? 17:12
moritz for Any, yes
fernand__ didn't work for me... 17:14
but ok... I shouldn't use it anyway...
moritz fernand__: how did you test whether the method cache for Any was updated?
fernand__ I tryed to call the method... 17:15
moritz on Any?
fernand__ on Int
moritz well, Int has its own type cache
fernand__ I realy think I am going to the wrong way... 17:16
moritz fernand__: what are you trying to achieve, in the end?
fernand__ the right question is: how can I make a custom class be automatically "translated" from any descendent of Any. 17:17
moritz you create a constructor or a coercer that accepts Any 17:18
and you do that in the target method
erm
target class
fernand__ could you show me a example?
dalek c: e354b41 | moritz++ | lib/Type/Metamodel/MethodContainer.pod:
document method_table
17:19
moritz fernand__: well, the easiest route is the constructor
m: class MyThing { has $.thing; method new($x) { self.bless(thing => $x } }; say Mything.new(42).perl
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DoUxheHyRA␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/DoUxheHyRA:1␤------> 3method new($x) { self.bless(thing => $x 7⏏5} }; say Mything.new(42).perl␤ expectin…» 17:20
moritz m: class MyThing { has $.thing; method new($x) { self.bless(thing => $x) } }; say Mything.new(42).perl
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8iTogVFBp_␤Undeclared name:␤ Mything used at line 1. Did you mean 'MyThing'?␤␤»
moritz m: class MyThing { has $.thing; method new($x) { self.bless(thing => $x) } }; say MyThing.new(42).perl
camelia rakudo-moar 114659: OUTPUT«MyThing.new(thing => 42)␤»
17:20 kjs_ joined
moritz here the conversion is just stuffing the source value into an attribute 17:20
but you could do any logic you like in method new()
17:21 kjs_ left, kjs_ joined
fernand__ the problem is: 17:21
I have a class with a custom class as a attribute... 17:22
17:22 Rounin joined
fernand__ I'd like to give a Any descendent to the constructor of the first class an it should translate to the custom class... 17:23
moritz so have the first class call OtherClass.new($thing) in its constructor
the proper solution would be to use a coercion type for the attribute, but I don't think they work yet 17:25
fernand__ somethink like it: 17:26
class ClassA {}; class ClassB {has ClassB $.b}; ClassB.new(:b(42));
yes, I was trying to coerce...
nine_ fernand__: can you tell us in a less abstract way what you're trying to do? 17:27
17:27 Kristien joined
Kristien hi 17:29
17:31 _mg_ joined
TimToady Kristien: \o 17:32
17:32 PuercoPop left
Kristien how's it going. I wrote lots of Perl 5 today :v 17:32
TimToady we all have our little faults... :)
moritz fernand__: perlpunks.de/paste/show/54e76faa.5e74.199
fernand__: OuterThing wraps the "a" in a MyThing in that example 17:33
fernand__: which should be pretty much what you want
TimToady fernand__: when someone keeps asking how to do something specific, and doesn't say what they're actually trying to do, we tend to think there may be an XY problem, and that maybe you're trying to drive a screw with a hammer
fernand__ nine_: I am trying to create a Role (named Resource) that wait for a method (::?CLASS::U:) load() on a Class (example Post) that receive a id and return a hash with data. with that data it will create a new Post object. the data can have the value "author" as a id, for example 42. The type of author on Post class is another Resource class (Person) 17:34
17:34 zakharyas left
Kristien TimToady: and C programmers have little segfaults! 17:35
fernand__ and I need that when the load caller create the object, and make something like Post.new(|{author => 42}) it should create a obj Person(:id(42)) and store on author attribute od Post 17:37
*of
moritz fernand__: are you writing an ORM?
fernand__ a JSON::API framework 17:38
moritz ah, nice
an ORM, where R = REST :-) 17:39
TimToady what does a POST object do?
fernand__ TimToady: it represents a (blog) post
Kristien why allcaps? 17:40
TimToady this was not at all clear...
fernand__ I meant Post
TimToady Kristien: that was not at all clear either, but probably lack of caffeine in my case
Kristien I want an OOM where the second O is OData. I have to deal with a crappy OData API (Exact Online) and it's cumbersome to do with direct JSON stuff.
TimToady but I also typed it directly under the REST, so that might've influence me too 17:41
most of my thinking is subconscious...
dalek c: 7e45e2d | moritz++ | lib/Language/objects.pod:
Mention BUILDALL overriding in object construction
17:42
moritz where should I best document {call,next}{with,same} on doc.perl6.org?
in language/objects? or as subs in Mu? 17:43
TimToady same place you talk about generalized dispatchers?
moritz muhahaha
I don't even know what generalized dispatchers are :-)
TimToady: you're welcome to contribute that section :-)
PerlJam moritz: where do you talk about proto?
Kristien moritz: OOP section 17:44
inheritance and roles
somewhere there
moritz PerlJam: not yet, but I think it'll go into Language/functions.pod
masak a generalized dispatcher is like a diffeomorphism between two submanifolds, except over the rationals, not the integers.
I dare you to prove me wrong :P
PerlJam masak: this is IRC, I don't have to prove anything .... YOU'RE WRONG! 17:45
nwc10 TimToady: you're awareof the term "Birmingham Screwdriver"? -- www.urbandictionary.com/define.php?...crewdriver
masak has been reading too much slightly too advanced math lately
TimToady S12 talks about it primarily under method dispatch, but then mentioned nextsame again under multiple dispatch 17:47
fernand__ nine_: moritz: thats what I'm trying to do: gist.github.com/anonymous/69e8ad1f6a3b9c29fe9c
moritz think about renaming functions.pod into routines.pod, and putting it there
masak moritz: that might be the right thing to do, but let me devil-advocate a little: "routine" is Perl 6-think. "function" is what a beginner is more likely to look for (or find and think appropriate). 17:48
moritz: you and I naturally go "oh, routines are the generalization of functions, methods. submethods, macros etc". people not well-versed in p6 lingo wouldn't. 17:49
TimToady
.oO(functions and other routines)
smls moritz: operators are also routines though, aren't they?
and they have their own page 17:50
moritz smls: yes. That's why functions.pod covers custom routines
smls: only built-in operators have their own page
PerlJam masak: are you advocating for sections on functions, methods, submethods, etc. that all link to the section on routines?
TimToady routines, disambiguation 17:51
masak PerlJam: yes, maybe.
17:52 _mg_ left
masak PerlJam: maybe it's nice to actually talk about the specific things in detail, without generalizing first thing and then having to talk only on the general level. 17:52
moritz where does nextsame work? dispatching to the next multi? to the original in a wrap? to the next (non-multi) method?
masak moritz: maybe there should be a section for each individual "use" of nextsame, like the ones you just listed? 17:53
smls I admit that with the current content of the language/functions page, it would make more sense to name it language/routines
masak moritz: "Using `nextsame` to call the original in a wrap"
smls Though the page's summary suggests that it may have initially been intended to have a different focus
Also, we use the name "Routines" in the main menu for the API documentation 17:54
perl6_newbee n8 all 17:55
smls so we're kinda already relying on users being able to understand/guess the meaning of the word
17:55 perl6_newbee left 17:56 mr-foobar joined
masak "Routines (functions, methods, etc)" 18:01
smls in the API docs, the word "sub" or "subroutine" is usually used rather than "function" 18:03
how about two /language pages covering what the current /language/functions apparently set out do cover: 18:07
TimToady originally, Perl was trying to avoid confusion from Pascal programmers who think of procedures in opposition to functions
smls - /language/routines (subtitle: "Subroutines, methods, operators and more")
18:07 rurban1 left
smls - /language/functional (Subtitle: "Functional programming with Perl 6") 18:07
Kristien Subroutinal programming
SP sounds like "socialist party" — eek 18:08
TimToady remembers when we got pushback on the ss/// name :)
but we're trying to avoid becoming a taboo society 18:09
someone should say "lol" there :) 18:10
18:10 Mouq joined
smls well as long as the Unicode swastika symbol doesn't become a built-in operator... 18:10
TimToady it's not tilted, so we're not Waiting for Godwin 18:11
someone should write that play
Kristien In Funciton that would also work
Funciton programs are invariant under 90º rotations, but not under 45º rotations. :) 18:12
So you can work with four people on the same file!
smls .u 🗺 18:13
yoleaux No characters found
smls ? 18:14
Kristien m: say '🗺' 18:15
camelia rakudo-moar 114659: OUTPUT«🗺␤»
Kristien camelia: good girl
18:15 raiph left
TimToady were you trying for 卍? 18:16
smls no, i just discovered the Unicode world map symbol and thought it was funny
TimToady but without 45° you can't get the 8-fold way wheel
Kristien you can do 8-fold in Perl 6 18:17
m: sub infix:<8>($x, $y) { $x * $y }; say [8] 1 2 3 4; 18:18
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/t8EyiTkkKy␤Two terms in a row␤at /tmp/t8EyiTkkKy:1␤------> 3nfix:<8>($x, $y) { $x * $y }; say [8] 1 7⏏052 3 4;␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ …»
Kristien oh, you can't :(
m: sub infix:<8>($x, $y) { $x * $y }; say [8] 1, 2, 3, 4;
camelia rakudo-moar 114659: OUTPUT«24␤»
Kristien oh, you can :)
An 8 fold!
is there <…> for numbers? 18:19
m: say map { .Int }, <1 2 3 4> # shorthand for this
camelia rakudo-moar 114659: OUTPUT«1 2 3 4␤»
TimToady .u midline 18:20
yoleaux U+1CD4 VEDIC SIGN YAJURVEDIC MIDLINE SVARITA [Mn] (◌᳔)
U+22EF MIDLINE HORIZONTAL ELLIPSIS [Sm] (⋯)
TimToady there's that one, and all the other orientations
.u l.ellipsis 18:22
yoleaux U+002E FULL STOP [Po] (.)
U+0065 LATIN SMALL LETTER E [Ll] (e)
U+0069 LATIN SMALL LETTER I [Ll] (i)
TimToady boo, no regex
that works in my program :)
moritz TimToady: so IRCbotify your program :-)
smls Kristien: Isn't <1 2 3 4> supposed to return IntStr objects according to spec? (though I kinda hope it won't - Cool already provides a system to treats strings and numbers interchangeably, so do we really need another?) 18:23
18:23 pullphinger joined
Kristien :O 18:23
TimToady smls: but that doesn't get you an appropriate dispatch for things that were intended to be numeric
smls m: say <1 2 3 4>>>.Int.perl # hyper is shorter than map
camelia rakudo-moar 114659: OUTPUT«(1, 2, 3, 4)␤» 18:24
smls m: say ('a', 'd' ... *)[^5] 18:25
camelia rakudo-moar 114659: OUTPUT«a d e f g␤»
smls ^^ should that be smarter (like it is with numbers)?
TimToady that would be a low-luminance feature
smls i.e. continue to count in steps of 3 18:26
TimToady and you use case?
*r
smls none :D
just playing around
kindo expected ranges to be built on the generic .pred/.succ feature though 18:27
s/ranges/series/
TimToady so build a type in which 'a'.succ eq 'd' :P 18:28
smls And if not, wouldn't it be better if the range operator refused threw an error for string inputs?
Kristien m: my $s = 'abc'; $s++; say $x 18:29
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mvhMOcXdTg␤Variable '$x' is not declared␤at /tmp/mvhMOcXdTg:1␤------> 3my $s = 'abc'; $s++; say $x7⏏5<EOL>␤ expecting any of:␤ postfix␤»
Kristien m: my $s = 'abc'; $s++; say $s
camelia rakudo-moar 114659: OUTPUT«abd␤»
Kristien :O
smls Rather than loose its "smart" behavior and always do single-increment
TimToady there are two different useful semantics here
smls 'cause the latter can already be done with ..
Kristien can Perl 6 regexes be used as a C library?
TimToady m: say 'z'.succ
camelia rakudo-moar 114659: OUTPUT«aa␤»
Kristien or does that need a new implementation like P6CRE? :P
TimToady m: say '!' ... '~' 18:30
camelia rakudo-moar 114659: OUTPUT«! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~␤»
TimToady notice two different behaviors of 'z' here
Kristien All those sigils!
dalek kudo/nom: 59b16d5 | lizmat++ | t/spectest.data:
Properly fix mis-merge, [Coke]++
[Coke] Kristien: they are not bundled in a way that is easy to access from C, no. 18:31
moritz though you could go the chain through Inline::Perl6 :-)
[Coke] however, you can easily do the inverse and call your C from perl 6.
TimToady now, tell me what the 7th member of your 'a','d' sequence is?
smls m: say ('!' .. '~').list; 18:32
camelia rakudo-moar 114659: OUTPUT«! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~␤»
18:32 kurahaupo1 joined
TimToady m: say ('a'...*)[0,3...*][6] 18:32
18:33 mglass_ joined
TimToady hmm 18:33
that's supposed not eagerize the subscript
camelia rakudo-moar 114659: OUTPUT«(timeout)»
smls ^^ TimToady: How about keeping ('a' ... *) with a single LHS value as is, but throwing a warning/error if the LHS has more than one values
because that indicates a wrong assumption about what it does
TimToady m: say ('a'...*)[0,3...99][6]
camelia rakudo-moar 114659: OUTPUT«s␤»
TimToady m: say ('a'...*)[0,3...99][7] 18:34
camelia rakudo-moar 114659: OUTPUT«v␤»
TimToady m: say ('a'...*)[0,3...99][^9]
camelia rakudo-moar 114659: OUTPUT«a d g j m p s v y␤»
TimToady m: say ('a'...*)[0,3...99][^11]
camelia rakudo-moar 114659: OUTPUT«a d g j m p s v y ab ae␤»
TimToady m: say ('a'..."\xfffc")[0,3...99][^11]
camelia rakudo-moar 114659: OUTPUT«a d g j m p s v y | ^H␤»
TimToady so it's pretty easy to get your 'a','d' sequence, modulo bugs 18:35
smls Also, making it an error would allow adding the "smart sequence detection" (like it already does for numbers) in Perl 6.x if a usecase for it does appear...
TimToady but we don't know that someone doesn't want 'a','d','e','f'.... 18:36
18:36 Kristien left
smls then they can use parens 18:36
18:37 mglass_ left
TimToady we did discuss many generalizations of the detector, and decided that pretty much anything after arithmetic/geometric was just obfuscation 18:37
masak +1
18:37 jluis_ joined
TimToady the most notable proposal was to recognize OEIS sequences :) 18:37
but then why not just write oeis(42)
so I am dubious of future 'extensions' in any case... 18:38
lizmat moritz: re irclog.perlgeek.de/perl6/2015-02-20#i_10149105 about parents not knowing who their children are:
I think that should be solved for 6.0
TimToady it would be nice to be able to do a lazy subscript on a lazy list though... 18:39
18:39 grettir joined
masak lizmat: that doesn't sound to me like it must be a blocker for 6.0.0 18:39
lizmat well, then maybe we shouldn't have augment in 6.0 either 18:40
TimToady that doesn't sound to me like a problem that necessarily needs to be solved at all
in general, categories should not be tracking their instances
lizmat because you cannot explain when augmenting a super class, does not make its subclasses be augmented as well
18:41 jluis left
lizmat or that module loading order is going to determine if an augment is seen by a sub class or not 18:41
TimToady are we talking about cache invalidation here?
18:41 zakharyas joined
lizmat possibly 18:41
masak moritz: I've heard (and made) the argument about leaky types before -- but I wonder how much of a problem that would be in practice? types behave differently from object-level things, they are relatively rare, and have long lifetimes anyway. 18:42
lizmat but we would need to know which caches to invalidate
invalidating *all* classes feels, eh. GILlish
TimToady well, that's why you're not supposed to do it very often
18:43 mr-foobar left
TimToady and that's what P5 does, and that works just fine 18:43
18:43 raiph joined
lizmat I think P5 got smarter than that, actually 18:43
it will only invalidate caches it needs to invaiidate
well, post 5.12 I think 18:44
18:44 Hor|zon left
TimToady is not inclined to pander to augmentors 18:44
lizmat ok, so we need to invalidate all caches on an augment
TimToady it's a hard thing that should be possible
18:45 mr-foobar joined
lizmat I'm nor even sure if "invalidate all caches" is an option programmatically atm 18:45
TimToady we don't need to, but I think here's one of those spots where we don't torment the implementors on behalf of the (ab)users
lizmat seems to recall that jnthn said having parents know about their children, would need to be done at some point 18:46
TimToady well, it could merely be a global generation counter in the cache lookup, perhaps with exceptions for anything that was originally seeded in the cache because it's a circularity saw
lizmat otoh, that could just be wishful thinking on my part atm
TimToady yes, but I think I disagree with jnthn++ a bit on the efficacy of that approach 18:47
that being said, tracking child types is likely to be easier than tracking child instances, so if he really wants to inflict that torment on himself, he can 18:48
but pre-6.0 I'd go for the simplest thing that maintains correct semantics, and that'd be a global generation count 18:49
smls TimToady: One thing that makes augmenting built-in classes tempting in Perl 6, is the fact that many buil-in types put their coercer methods in Any, and custom classes may want to emulate that
(which is basically what fernand__'s asked for above, I think)
lizmat m: class A { }; class A::B { }; say A::B.isa(A) # this will trip up a lot of people
camelia rakudo-moar 114659: OUTPUT«False␤»
lizmat m: class A { }; class A::B is A { }; say A::B.isa(A) # need to be explicit 18:50
camelia rakudo-moar 114659: OUTPUT«True␤»
18:51 fhelmberger left
smls if that's not possible, custom classes will always kinda be second-class citizens 18:51
fernand__ exactally what I was asking!
TimToady but we allow come-from as well as go-to coercers, which is the normal way to handle that
18:52 mr-foobar left
smls how would a custom class implement a come-from coercer from built-in types? 18:52
TimToady and a type that is so important that it needs its methods in Any is likely to not be much damaged by a global augment generation counter
18:53 mr-foobar joined
TimToady an important type will fire off near startup anyway, when most caches are still empty 18:53
smls: with the standard type name coerces
it's only if you must force your methods to be magical that you need Any access 18:54
and we've pretty much only granted that to list methods for Any
and "scalar" methods for Cool
18:55 gfldex joined
TimToady but you can do $x.MyType and get the MyType() definition for free 18:55
18:57 mr-foobar left
fernand__ TimToady: are you saying that is possible to do something like 42.MyType ? 18:57
that was what I was trying to do creatng a new method on Any 18:58
TimToady m: class MyType { method postcircumfix:<( )>($from) { say $from } }; say 42.MyType
camelia rakudo-moar 114659: OUTPUT«No such method 'MyType' for invocant of type 'Int'␤ in block <unit> at /tmp/DDwq67tWp0:1␤␤»
TimToady that's supposed to failover
seems to be it used to 18:59
18:59 _mg_ joined
TimToady maybe I wrote it rwrong 19:00
m: class MyType { method postcircumfix:<( )>($from) { say $from } }; say MyType(42)
camelia rakudo-moar 114659: OUTPUT«42␤True␤»
TimToady no, the failover is busted
fernand__ and if it works, than should this work? my MyType $x = 42? 19:01
TimToady not that specifically, because you didn't specify a coercion type there 19:02
pretty soon, my MyType() $x = 42; should work 19:03
smls TimToady: But ideally you'd only want to define the postcircumfix () on the type object, right?
TimToady but coercion types only work in signatures so far
smls Also, if that's the recommended mechanism, why don't the built-in classes do that? 19:04
(and put their coercers in Any instead)
fernand__ m: class MyType { method postcircumfix:<( )>($from) { say $from } }; MyType() $x = 42; $x.perl.say
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/L81kUdhV3f␤Two terms in a row␤at /tmp/L81kUdhV3f:1␤------> 3:<( )>($from) { say $from } }; MyType() 7⏏5$x = 42; $x.perl.say␤ expecting any of:␤ infix stopper␤ infix or meta-in…»
TimToady fernand__: you need a declarator 19:05
like 'my'
19:05 mr-foobar joined
fernand__ coercive type declarations not yet implemented. Sorry. 19:05
m: class MyType { method postcircumfix:<( )>($from) { say $from } }; my MyType() $x = 42; $x.perl.say 19:06
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zbxCNexXtQ␤MyType() cannot be used as a nominal type on a variable␤at /tmp/zbxCNexXtQ:1␤------> 3($from) { say $from } }; my MyType() $x 7⏏5= 42; $x.perl.say␤ expecting any of:␤ constr…»
19:06 aa0e-40a0 joined
TimToady m: class MyType { method postcircumfix:<( )>($from) { say $from } }; my (MyType() $x) := 42; $x.perl.say 19:06
camelia rakudo-moar 114659: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in block <unit> at /tmp/CVA4ZRAW7R:1␤␤»
TimToady m: class MyType { method postcircumfix:<( )>($from) { say $from } }; my (MyType() $x) ::= 42; $x.perl.say 19:07
camelia rakudo-moar 114659: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in block <unit> at /tmp/dlxtwrigaM:1␤␤»
fernand__ gist.github.com/anonymous/e3481d2cf907cccbd984
19:07 Alina-malina left
TimToady fernand__: coercive types were not yet implemented in 2015.01 19:08
this is brand-new stuff
and they're only implemented where the old 'as' syntax was supported, so far
as you can see from the error, something isn't passed as a parameter where one is expected internally 19:09
fernand__ Im cloning...
smls m: class MyType { method postcircumfix:<( )>($self:U: $from) { "from $from" } }; say MyType(42) 19:10
camelia rakudo-moar 114659: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
smls :/ 19:11
TimToady looks like it's trying, anyway 19:12
m: class MyType { method postcircumfix:<( )>($self:U: $from) { "from $from" } }; say 42.MyType 19:13
camelia rakudo-moar 114659: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
TimToady looks like the failover is there too, just not working for some reason
19:13 FROGGS joined 19:14 aa0e-40a0 left
TimToady m: class MyType does Callable { method postcircumfix:<( )>($self:U: $from) { "from $from" } }; say 42.MyType 19:14
camelia rakudo-moar 114659: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
TimToady shrugs, and looks for more caffeine 19:15
moritz m: class MyType {method invoke($from) { "from $from" } }; say MyType(42) 19:16
camelia rakudo-moar 114659: OUTPUT«from 42␤»
moritz m: class MyType {method invoke($from) { "from $from" } }; say 42.MyType
camelia rakudo-moar 114659: OUTPUT«No such method 'MyType' for invocant of type 'Int'␤ in block <unit> at /tmp/kkYK8sk79j:1␤␤»
TimToady ah, we renamed it, eh
that should probably be uppercase
moritz +1
19:16 virtualsue left
TimToady but maybe that's when the failover got busted 19:18
smls What about requiring the invocant to be a type object with :U, is that supposed to work? 19:19
TimToady yes
m: class MyType {method invoke(MyType:U: $from) { "from $from" } }; say MyType(42) 19:20
camelia rakudo-moar 114659: OUTPUT«from 42␤»
TimToady m: class MyType {method invoke(MyType:U: $from) { "from $from" } }; say MyType.new.(42)
camelia rakudo-moar 114659: OUTPUT«Invocant requires a type object, but an object instance was passed␤ in method invoke at /tmp/JOcMxPBmQ2:1␤ in block <unit> at /tmp/JOcMxPBmQ2:1␤␤»
TimToady not only is it supposed to work, it does, shock!
smls :) 19:21
TimToady had better escape to the backlog while something is working right...
19:21 Sqirrel joined, zakharyas left 19:22 slavik left, zakharyas joined 19:26 Kristien joined
MadcapRusso what does the backslash mean in the operator `=:=`'s signature: multi sub infix:<=:=>(Mu \a, Mu \b) 19:26
fernand__ how can I get the Attribute type from its meta object? 19:27
masak MadcapRusso: it's a kind of sigil.
TimToady MadcapRusso: it means just do a raw bind of the argument to the name, no item or list assumptoins
not really a sigil
masak kinda 19:28
timotimo .tell grondilu be sure to hit me up with the white noise thing when you're back, and tell me if using int32 instead of int fixes things
yoleaux timotimo: I'll pass your message to grondilu.
TimToady more like the absence of one
it also declares a term
moritz m: say Date.^attributes.grep(*.name eq 'year').type.^name # for fernand__
camelia rakudo-moar 114659: OUTPUT«No such method 'type' for invocant of type 'List'␤ in block <unit> at /tmp/yNkWbXBdUO:1␤␤»
fernand__ and how can I set it's value? I cant use .set_value() it isnt working...
moritz m: say Date.^attributes.first(*.name eq 'year').type.^name # for fernand__
camelia rakudo-moar 114659: OUTPUT«Nil␤»
moritz hrmpf
m: say DateTime.^attributes.first(*.name eq 'minute').type.^name # for fernand__
camelia rakudo-moar 114659: OUTPUT«Nil␤»
moritz m: say DateTime.^attributes.perl 19:29
camelia rakudo-moar 114659: OUTPUT«(Attribute.new(), Attribute.new(), Attribute.new(), Attribute.new(), Attribute.new(), Attribute.new(), Attribute.new(), Attribute.new())␤»
TimToady if it were really a sigil, you could use twigils after it
moritz m: say DateTime.^attributes>>.name
camelia rakudo-moar 114659: OUTPUT«$!year $!month $!day $!hour $!minute $!second $!timezone &!formatter␤»
dalek c: 2898af7 | paultcochrane++ | Makefile:
Add html-nohighlight Makefile target

Which doesn't run the syntax highlighting and is thus a bit faster.
moritz oh
dalek c: f442416 | paultcochrane++ | / (3 files):
Move footer-html into Pod::Htmlify
moritz m: say DateTime.^attributes.first(*.name eq '$!minute').type.^name # for fernand__
camelia rakudo-moar 114659: OUTPUT«Int␤»
moritz now it works
fernand__ moritz: thanks!
MadcapRusso TimToady: is it using the backslash so that the \a and \b remain in their respective containers? (for the =:= operator) 19:31
dalek c: a7d5119 | moritz++ | lib/Language/functions.pod:
Document {call,next}{same,with}
19:32
fernand__ moritz: how to set the value? 19:33
TimToady MadcapRusso: yes 19:34
it's also faster in theory, though not necessarily in practice
it allows the caller to make a $ vs @ distinction, instead of imposing one ourselves
I think $ is faster than \ in practice because the optimizer works harder on $, iirc 19:36
moritz fernand__: with set_value
fernand__: doc.perl6.org/routine/set_value
fernand__ gist.github.com/anonymous/a58e4878c1d545f49575
Not enough positional parameters passed; got 2 but expected 3
moritz fernand__: yes. Read the error message. Compare it with the docs 19:37
FROGGS m: my $dt = DateTime.now; $dt.^attributes.first(*.name eq '$!minute').set_value($dt, 42); say $dt # fernand__ 19:38
camelia rakudo-moar 114659: OUTPUT«2015-02-20T20:42:17+0100␤»
FROGGS fernand__: though, you usually dont want to do that :o)
TimToady when you're working with meta-objects, you often have to pass in a non-meta-object also
we should require a declaration of 'use MONKEY_BUSINESS;' or so for meta-manipulation 19:39
FROGGS aye
use META_MONKEY
TimToady use MONKEY'S_UNCLE
19:40 rindolf left
TimToady use MONKEY_SEE-NO-EVIL; 19:40
I kinda like that one
use MONKEY_AROUND 19:41
fernand__ FROGGS: why not?
TimToady if 'meta' is 'around'
19:42 danstoner joined
FROGGS fernand__: the object you want to mess with should expose a rw-accessor instead 19:43
TimToady the metamodel is technically outside the language, and might evolve in a direction that breaks your code
19:43 Hor|zon joined
TimToady is not even quite sure we should be documenting it on doc.perl6.org so plainly 19:44
fernand__ but if I cant make auto-coercion from Any to my custom class, I cant see other way to do what I want...
TimToady it's already supposed to be possible within the language, it's just busted 19:45
so we should unbust it
19:45 rurban left
TimToady things inside the language will have more guarantees of stability going forward 19:46
as soon as you start going into the metasystem, you risk paradox (in the form of running into one of our carefully hidden circularity saws) 19:47
and basically, we reserve the right to move the circularity saws from one spot to another without changing the official language 19:48
but anything hidden behind a .HOW or a .^ is officially part of the implementation rather than the language
at least that's HOW I've always thought of it 19:49
we probably need metamodel versioning independent of language versioning, in fact
fernand__ makes sense... 19:50
TimToady no, never say that about me...the best you can say is that I sound like I make sense :)
19:51 zakharyas left
masak .oO( there are morphisms between TimToady and sense, but none of them are bijections... ) :P 19:51
TimToady I see that the implementation of 'invoke' relies on introspection to decide between 'invoke' and 'postcircumfix:<( )>', but why didn't we just alias the two symbols instead, and avoid the introspection smell? 19:52
Morphism: the cult of shapes 19:53
not to mention the introspection overhead? 19:54
19:54 zakharyas joined
TimToady hmm, maybe I know 19:55
m: sub foo { say "hi" }; &foo.postcircumfix:<( )>
camelia rakudo-moar 114659: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Sub'␤ in block <unit> at /tmp/AZIOeMsF5a:1␤␤»
TimToady nope, it's not even there, so can't be deprecating... 19:56
m: sub foo { say "hi" }; &foo.invoke
camelia rakudo-moar 114659: OUTPUT«No such method 'invoke' for invocant of type 'Sub'␤ in block <unit> at /tmp/VLvnThmCrL:1␤␤»
TimToady oh, come on... :)
masak :( 19:57
TimToady can't we have a *little* consistency?
masak 's submit finger itches
TimToady INVOKE should work on anything Callable, you'd think
unless it should be called, like, CALL 19:58
masak invoke sounds fine to me.
I draw parallels with at_pos and friends.
TimToady those are mostly called magically as well 19:59
masak right.
TimToady so properly oughta be uppercase
it's not just phasers that are called magically 20:00
and the all-caps idea is about things that magically come-from somewhere because of their special name, not just about phasers 20:01
masak *nod* 20:02
TimToady well, we probably have to rethink all our indexing for NSA anyway 20:03
gee, that sounds bad...
[Tux] www.dagolden.com/index.php/2406/tho..._community
20:04 spider-mario joined
Kristien damn 20:04
geekosaur they already did... 20:08
TimToady yes, we need to switch our internal module names to include version sometime soon, with bare names being aliases within a lexical scope 20:10
vers/auth I should say
::() can lookup in the current lexical scope, but output of typenames should probably depend on whether there is more than one version loaded 20:12
so if there are two different versions of Foo loaded, instead of (Foo) we might get (Foo:ver<1.23>:auth<jnthn>) 20:13
but if there's only one loaded, we can probably get away with (Foo)
FROGGS it might be handy to spit auth the ver/auth evey time 20:14
so you are always aware what distribution you actually use
skids That would make common debugging ugly.
TimToady you really want to see (Int:ver<6.0>:auth<TPF>) every time
FROGGS ohh, perhaps not for internal suff 20:15
stuff*
TimToady nor for stuff you only ever load one version of, even if not internal
we aren't just trying to streamline this for ourselves :)
20:15 eternaleye joined
TimToady we do plan to have users someday :) 20:16
skids Someone will come asking for an intrspective way to get the canonical name, though.
TimToady well, that's probably .^name or so
or .^longname
but once we're into OO-land, pretty much everything has to be longname 20:17
since you don't know the lexical scope anymore
or shortname, as long as you know it's unique, is my proposal 20:18
20:18 kurahaupo1 left
skids m: module A { class B { } }; A::B.WHAT.say 20:19
camelia rakudo-moar 114659: OUTPUT«(B)␤»
TimToady but identity is critical, is the long-standing point that S11 has been trying to make, both internally and in the official library
and the forest of identity often gets lost in the trees 20:20
m: module A { class B { } }; A::B.perl.say 20:21
camelia rakudo-moar 114659: OUTPUT«B␤»
TimToady m: module A { class B { } }; B.new.perl.say
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DEg0X9utZE␤Undeclared name:␤ B used at line 1␤␤»
TimToady (B) should probably be (A::B) if that's its global name 20:22
20:22 darutoko left
skids So, maybe that's something to clean up alongside versioning. 20:22
TimToady yup
20:24 pippo joined
pippo o/ #perl6 20:25
skids o/
pippo I need something like the sub "note" but that does not add the trailing \n. does this function exist? 20:26
smls m: print $*ERR: "Hello world" 20:28
camelia rakudo-moar 114659: OUTPUT«Hello world»
smls pippo: ^^
pippo smls: thank you! that is what I needed! 20:29
20:34 Alina-malina joined
skids Can an is repr('CPointer') class usefully define a way to serialize/deserialize an instance? 20:37
FROGGS skids: with nativecast(), yes
skids Are there actually docs on nativecast? 20:38
FROGGS I'm not sure....
m: use NativeCall; sub malloc(long) returns OpaquePointer is native { * }; my $ptr = malloc(8); say $ptr; say nativecast(Int, $ptr) # skids 20:40
camelia rakudo-moar 114659: OUTPUT«OpaquePointer<0x4b797a0>␤139909031614120␤»
skids Basically I'm wondering if I can help rakudo constant-fold.
FROGGS wow, cpanda does still work 20:41
20:42 zakharyas left
timotimo .tell grondilu you got "cannot modify an immutable TypedCArray blah" because you put a type object into the @points, rather than an instance 20:43
yoleaux timotimo: I'll pass your message to grondilu.
20:48 rurban joined
grondilu is actually here 20:50
yoleaux 19:28Z <timotimo> grondilu: be sure to hit me up with the white noise thing when you're back, and tell me if using int32 instead of int fixes things
20:43Z <timotimo> grondilu: you got "cannot modify an immutable TypedCArray blah" because you put a type object into the @points, rather than an instance
timotimo oh hey grondilu 20:51
grondilu I'm pretty sure I did put instances.
20:51 rurban1 joined
grondilu also: hello 20:51
timotimo not in your gist :)
grondilu ok well I'll try agagin 20:53
timotimo i'm also a bit baffled as to why it won't work
ugexe is there a nice way to get skip()/todo()/skip_rest() to place nicely with subtest?
grondilu I'll start again from gist.github.com/grondilu/7e66deb134e630e561ee
20:54 kjs_ left
skids ugexe: well, todo plays nicely with throws_like, so I would imagine... 20:56
ugexe ill write up an example in a minute, but the problem is it seems to mess up the count, and then testing things it shouldnt 20:57
grondilu timotimo: check this out:
m: use NativeCall; class Foo is repr("CStruct") {}; my @a := CArray[Foo]; @a[0] :=
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NXzalHU3RR␤Bogus statement␤at /tmp/NXzalHU3RR:1␤------> 3uct") {}; my @a := CArray[Foo]; @a[0] :=7⏏5<EOL>␤ expecting any of:␤ prefix or term␤ prefix or meta-prefix␤»
grondilu Foo.new' 20:58
ahhh
20:58 telex left
grondilu m: use NativeCall; class Foo is repr("CStruct") {}; my @a := CArray[Foo]; @a[0] := Foo.new 20:58
camelia rakudo-moar 114659: OUTPUT«No such method 'bind_pos' for invocant of type 'TypedCArray[Foo]'␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3288␤ in block <unit> at /tmp/Eyxb9Ko4eP:1␤␤»
grondilu ^weird, isn't it?
dalek osystem: 292c8dd | FROGGS++ | META.list:
add Foo v1.0 and Foo v1.2 for testing multiple versions
20:59
timotimo m: use NativeCall; class Foo is repr("CStruct") {}; my @a := CArray[Foo].new; @a[0] := Foo.new
camelia rakudo-moar 114659: OUTPUT«Unexpected named parameter 'BIND' passed␤ in sub postcircumfix:<[ ]> at lib/NativeCall.pm:324␤ in block <unit> at /tmp/M6bdLgpCzI:1␤␤»
timotimo m: use NativeCall; class Foo is repr("CStruct") {}; my @a := CArray[Foo].new; @a[0] = Foo.new
camelia ( no output )
FROGGS m: use NativeCall; class Foo is repr("CStruct") {}; my @a := CArray[Foo].new; @a[0] = Foo.new
camelia ( no output )
timotimo i told you, you were using a type object
grondilu oh
in the array yes
my bad 21:00
21:00 telex joined
timotimo Invalid renderer 21:01
says GetError
FROGGS .oO( *Cough*, computer says no! ) 21:02
btw, both panda/CPAN and panda/eleven seem to be in a very good shape 21:03
grondilu I don't get any more error but the screen remains black. 21:04
ugexe skids: you were right, todo works. its was just skip/skip_rest that doesnt handle subtests
timotimo yeah, you have to SDL_GetError 21:05
dalek kudo/nom: e6b992f | lizmat++ | src/core/Str.pm:
Make s/// up to 25% faster (for many changes)

  - abstract optimized .subst case into private method APPLY-MATCHES
  - optimize APPLY-MATCHES further by avoiding repeat checks where possible
  - make both .subst and .subst-mutate use this private method
21:06
flussence lizmat++ # all these optimizations are crazy-awesome 21:07
lizmat now, if someone could help me with passing a :SINK parameter to .subst-mutate if s/// is called in sink context 21:08
we probably could make s/// for strings an order of magnitude faster 21:09
21:09 xfix left
skids ugexe: yeah looks like todo is implemented differently via todo_upto_testnum 21:10
*test_num
raydiak \o 21:11
ugexe fwiw this was what happened: 21:13
m: use Test; plan 1; skip_rest(); subtest { ok 0; ok 1; };
camelia rakudo-moar 114659: OUTPUT«1..1␤ok 1 - # SKIP <unknown>␤ not ok 1 - ␤ ␤# Failed test at /tmp/Nmzoq7W5Mm line 1␤ ok 2 - ␤ 1..2␤ # Looks like you failed 1 tests of 2␤not ok 2 - ␤␤# Failed test at /tmp/Nmzoq7W5Mm line 1␤# Looks like you planned 1 te…»
TimToady lizmat: in the long run, sink will end up negotiated by the GLR, so I wouldn't put too much work into short-term fixes; the definitiion of "too much" is of course left up to you :) 21:16
lizmat TimToady: well, I'm not sure how the GLR would handle something like subst-mutate 21:17
which changes $self *and* returns the matches
TimToady it is nice to know what sorts of speedups are negotiable, of course
and maybe in the specific case of sink, the compiler can do the negotiation
and hence can apply it to something like s///, which we usually think of as a scalar op, even though s:g/// really is a list op 21:18
lizmat yes, my idea is that the compiler adds a :SINK named param
just like in the:
raydiak grondilu: when you get to the point where it works, you'll definitely want to use loop(;;) with a native int counter for iterating over every pixel...otherwise you'll get single-digit fps at 640x480 before even adding 1 line of code to the loop body
lizmat %hash<foo bar baz>:delete
case
TimToady things under the GLR will have those based on caller context though, not static context 21:19
lizmat where we don't actually need the values, just have the keys removed
TimToady *have to choose those
lizmat but I get the nudge :-) 21:20
I just hope pmichaud will be able to start soon
TimToady and even for the GLR, we'll know some caller contexts at compile time, and can choose the exact implementation in advance
lizmat indeed
:-)
TimToady but the exact low-level api for getting more values will be more closuer-based, likely
*sure
not so much method based 21:21
21:21 pippo left
lizmat ok... looking forward to things to come 21:21
grondilu raydiak, timotimo: well, frankly I've gave up already. I'll go back to it one day but I'll try to use pixels and not points.
TimToady in the case of strictly lazy, we'll have closures that simply return one value
and hopefully sufficient inlining tech to simplify a stack of lazy closures 21:22
grondilu (I mean, writing on the SDL_Surface directly, as in the C solution)
TimToady (not quite there yet, since inlining doesn't extend to clones yet as I understand it)
lizmat TimToady: indeedy :-) 21:23
TimToady but I could easily be misunderstanding that 21:24
timotimo grondilu: i fear i'll finish the task before you try again :)
TimToady well, it's a wiki 21:25
TimToady missed lunchtime, eep
21:26 _mg_ left
fernand__ is there any way that I can create a class LocalResource and when I use it on another class (has LocalResource[Person] $.author) and when I instanciate the class Class.new(:author(42)) the attribute of the object will have a LocalResource object with attr class = Person and id = 42 ? 21:27
FROGGS $ perl6-m -e '{ use Foo:ver(v1.0); say Foo.ver }; { use Foo:ver(v1.2); say Foo.ver };' 21:28
===SORRY!===
Merging GLOBAL symbols failed: duplicate definition of symbol Foo
:o(
21:28 diakopter joined
firefish5000 m: given "OptA" { for <OptA OptB> -> $Opt {when "$Opt" { say "{$Opt} Succeeded"; }} ; default { say "$_ Defaulted"; } } 21:29
camelia rakudo-moar 114659: OUTPUT«OptA Succeeded␤OptA Defaulted␤»
firefish5000 m: LABELG: given "OptA" { for <OptA OptB> -> $Opt {when "$Opt" { say "{$Opt} Succeeded"; LABELG.succeed; }; default { say "$_ Defaulted"; } }
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/K6LDSQZ94q␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/K6LDSQZ94q:1␤------> 3ed; }; default { say "$_ Defaulted"; } }7⏏5<EOL>␤»
firefish5000 From S04#Switch-statements . I thought this should work. However I didnt see it from a quick look in NYI in bugs nor a test for it in the linked file.
skids FROGGS: there's an alternate-auth Digest::MD5 in Sum if you want to play with that, too. 21:30
firefish5000 m: LABELG: given "OptA" { for <OptA OptB> -> $Opt {when "$Opt" { say "{$Opt} Succeeded"; LABELG.succeed; }}; default { say "$_ Defaulted"; } }
camelia rakudo-moar 114659: OUTPUT«OptA Succeeded␤No such method 'succeed' for invocant of type 'Label'␤ in block at /tmp/S3yvICiNfR:1␤ in block <unit> at /tmp/S3yvICiNfR:1␤␤»
dalek kudo/nom: 232601a | lizmat++ | src/core/Str.pm:
Oops, any named param should take slow path
FROGGS fernand__: LocalResource[Person] sounds more like a typed role 21:31
Kristien m: say Int[42]
camelia rakudo-moar 114659: OUTPUT«===SORRY!===␤Type Int cannot accept type arguments␤»
Kristien Int doesn't act like a list. :(
fernand__ typed role? is there any documentation about that?
FROGGS skids: I run into the same issue probably... but I put it on my list
skids fernand__: design.perl6.org/S14.html 21:32
diakopter m: say Int[[42]]
camelia rakudo-moar 114659: OUTPUT«Type Int cannot accept type arguments␤ in any parameterize at src/gen/m-Metamodel.nqp:2628␤ in block <unit> at /tmp/vXcjy0JpgJ:1␤␤»
yoleaux 22 Sep 2014 17:48Z <[Coke]> diakopter: - think I figured out the problem - can you up the swap space on host08 to match host07? (I can probably stumble my way through this if needed)
13 Oct 2014 19:13Z <[Coke]> diakopter: is host08 as zippy as it's going to get?
FROGGS fernand__: perl6advent.wordpress.com/2009/12/...-18-roles/ look at role DeliveryCalculation[::Calculator] {
diakopter: nice try :o) 21:33
diakopter it's a different error
ish
[Coke] OHAI diakopter
diakopter howdy 21:34
flussence "Files=940, Tests=34541, 315 wallclock secs"... my desktop is getting *very* close to breaking 5 minutes on the spectest. That figure's already dropped half a minute this month.
FROGGS firefish5000: it is NYI for Labels, correct... also stuff like LABEL.keep
21:34 kaare_ joined
[Coke] diakopter: ignore those, I'm no longer using host08. 21:34
diakopter k
FROGGS well, at least that works: 21:35
$ perl6-m -e 'use Foo:ver(v1.2); say Foo.ver' # v1.2
$ perl6-m -e 'use Foo:ver(v1.0); say Foo.ver' # v1.0
(ver is just a normal method that returns a literal version string...) 21:37
grondilu timotimo: by all means, do so :)
FROGGS and that's with panda/eleven, which installs all distributions into a "database"
dalek kudo/newio: face62b | lizmat++ | t/spectest.data:
Remove references to non-existing test files
21:38
rakudo/newio: bf2d1dd | paultcochrane++ | lib/Test.pm:
rakudo/newio: Add simple use-ok implementation
21:38 dalek left
lizmat sorry dalek 21:38
21:39 dalek joined, ChanServ sets mode: +v dalek
lizmat flussence: Files=940, Tests=34541, 181 wallclock secs ( 9.30 usr 3.18 sys + 1082.07 cusr 140.33 csys = 1234.88 CPU) on mine 21:39
21:39 kjs_ joined 21:40 bayprogrammer left
firefish5000 FROGGS, Alright then (I thought I might be calling it wrong), Label.next works for my case, ill use it. Thanks! 21:42
skids m: use MONKEY_TYPING; role Foo[:$bar = 4] { method bar { $bar } }; augment class IO::Path { also does Foo[:bar(8)] }; "/tmp/erf".IO.bar.say; # fernand__
camelia rakudo-moar 114659: OUTPUT«No such method 'bar' for invocant of type 'IO::Path'␤ in block <unit> at /tmp/jhJgsyTFIk:1␤␤» 21:43
skids hrm.
That worked locally. -- oh evalbot doesn't do MONKEY_TYPING probably
TimToady I don't think we have that restriction 21:44
if we did, it would complain on the use 21:45
lizmat m: use MONKEY_TYPING; augment class Str { method foo { "foo" } {; say Str.foo
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WDN9foPYfS␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?)␤at /tmp/WDN9foPYfS:1␤------> 3ugment class Str { method foo { "foo" } 7⏏5{; say Str.foo…»
lizmat m: use MONKEY_TYPING; augment class Str { method foo { "foo" } }; say Str.foo
camelia rakudo-moar 114659: OUTPUT«foo␤»
lizmat
.oO( works ok )
timotimo how do i bitwise-negate an int?
TimToady m: say +^ 0
camelia rakudo-moar 114659: OUTPUT«-1␤»
grondilu m: say +^ my int $ = 0 21:47
camelia rakudo-moar 114659: OUTPUT«-1␤»
TimToady note that you're still likely getting an Int there 21:48
grondilu m: say (+^ my int $ = 0).WHAT
TimToady we don't have inplace native ops yet
camelia rakudo-moar 114659: OUTPUT«(Int)␤»
raydiak m: say (my int $).WHAT 21:49
camelia rakudo-moar 114659: OUTPUT«(Int)␤»
TimToady this is why .WHAT must eventually be a macro, not a method
currently it must box it to call it
diakopter m: say int()
camelia rakudo-moar 114659: OUTPUT«(int(Any))␤»
diakopter m: say int(-1)
camelia rakudo-moar 114659: OUTPUT«Cannot invoke this object (REPR: P6int, cs = 0)␤ in block <unit> at /tmp/4IuNCpiLAU:1␤␤»
grondilu am I wrong if I have the feeling MoarVM's designers understimated the importance of natives and that this is why it takes time to have them?
FROGGS m: sub foo(int(Numeric) $x) { say $x.WHAT }; foo(42) 21:50
camelia rakudo-moar 114659: OUTPUT«No such method 'int' for invocant of type 'Int'␤ in sub foo at /tmp/N1UWOpcPCY:1␤ in block <unit> at /tmp/N1UWOpcPCY:1␤␤»
TimToady I don't think they were underestimating them, just running scared :)
PerlJam grondilu: ask on #moarvm, but I have a feeling you are wrong :)
lizmat grondilu: afaik, it was planned all along, but lack of tuits made them not appear yet
flussence
.oO( using some rough math, about a quarter of the spectest time is spent doing perl6-m startup. If that gets as fast as other languages (÷10), I can see my old cpu possibly "running a 4 minute mile"... )
21:52 diana_olhovik left
fernand__ skids: gist.github.com/anonymous/e26c27566bccf21dfdb9 21:53
timotimo m: say "1234" ~~ / (<digit>+) <{ $0.Str.Int.is-prime }> / 21:55
camelia rakudo-moar 114659: OUTPUT«This type cannot unbox to a native string␤ in sub MAKE_REGEX at src/gen/m-CORE.setting:15302␤ in block at src/gen/m-CORE.setting:15228␤ in method INTERPOLATE at src/gen/m-CORE.setting:15218␤ in method ACCEPTS at src/gen/m-CORE.setting:15350␤…»
timotimo ^- what?
flussence did you mean <?{ there?
21:57 mohij joined
lizmat has done enough damage for today 21:58
sleep& 21:59
diakopter m: say int(int)
camelia rakudo-moar 114659: OUTPUT«(int(int))␤»
diakopter wonders never marvel 22:00
22:02 virtualsue joined 22:03 kjs_ left 22:05 FROGGS_ joined 22:06 skids left
moritz www.dagolden.com/index.php/2406/tho...christmas/ 22:06
22:06 Sqirrel left 22:09 FROGGS left, gtodd1 left
timotimo flussence: probably did, thanks 22:10
how do i grammar.parse again without anchoring to begin-of-strign and end-of-string?
moritz timotimo: .subparse 22:11
timotimo: and here I need to tell you that doc.perl6.org/routine/parse even mentions .subparse
huh, it seems that we've documented .parse and .subparse twice :( 22:12
TimToady moritz: yes, that's why we were talking about internal versioning
moritz ah, in Language/grammars.pod and in Type/Grammar.pod 22:13
TimToady: I don't quite see how internal versioning relates to that
smls I remain unconvinced by the whole "minimalist languages are easier than rich languages" meme. 22:14
TimToady to the dagolden article
moritz ah
TimToady he talks about multiple versions loaded simultaneously
smls you don't hve to "master" a language in the sense of understanding every last bit of it perfectly, before you can start to use it.
It's not like programs written in minimalist languages involve less complexity 22:15
[Coke] Hai.
smls they just express in in the form of module APIs etc instead of syntax
grondilu smls: well, lambda-calculus is the obvious counter-example.
moritz grondilu: how is that a counter-example? 22:16
grondilu it's as simple as it gets, yet I would not say it's easy.
23:15 < smls> they just express in in the form of module APIs etc instead of syntax
TimToady we should all program turing machines, since those are as simple as possible
grondilu ^so true
diakopter O_O
moritz grondilu: I think I misunderstood what you meant by "counter-example" 22:17
22:17 Mouq left
TimToady it's an example you lay on the counter :) 22:17
smls or sometimes they express it in the form of many, many nested/combined used of the same few syntax elements, when a single high-level syntax would map much more closely to how a human might think of the problem.
grondilu amen 22:18
moritz smls: I think we're all in violent agreement there; but it's one of the big unsettled questions in programming language design, much like dynamic vs. static typing 22:19
the other side has good arguments too, if you ask them :-)
I mean, they'll say they have good arguments
grondilu but we're still more right than them because in perl you can program in their style, but the reciprocal is usually not true. 22:20
(but then I guess they would launch the "too much freedom is bad" argument) 22:21
moritz anyway, on the dagolden blog post: it's hard to follow good distribution practises when you don't even have a fraction of the infrastructure that you'll eventually need
grondilu (or the "there should only be one way to do things) 22:22
22:22 kjs_ joined
grondilu s/)/") 22:22
moritz though I do wonder if we should start to make versioned releases of our modules, just to pratise
and to start to create a need to deal with them
but not today; now is time for sleep& 22:23
flussence if anyone wants to experiment on that sorta thing, some of my modules oh github are properly versioned and tagged (and signed)... 22:25
22:27 Mouq joined 22:32 bayprogrammer joined 22:34 smls_ joined, smls left 22:37 smls_ left
firefish5000 How does one call a fully qualified sub. ie 'use Foo; Foo::Bar();' where Bar is an exported sub of module Foo. 22:39
22:39 espadrine joined
timotimo m: my @foo := 0..* Z~ "a"..*; say @foo[0..5] 22:39
camelia rakudo-moar 114659: OUTPUT«0a 1b 2c 3d 4e 5f␤»
TimToady firefish5000: it has to be declared our to be visible globally
firefish5000 ah, so our sub Bar? 22:40
TimToady yes, but we tend to discourage uppercase sub names, since that's how most types are
22:40 virtualsue left
TimToady unless you're trying to fit into an existing culture 22:41
22:41 mohij left
TimToady std: foo 22:41
camelia std f9b7f55: OUTPUT«5===SORRY!5===␤Undeclared routine:␤ 'foo' used at line 1␤Check failed␤FAILED 00:00 134m␤»
TimToady std: Foo
camelia std f9b7f55: OUTPUT«5===SORRY!5===␤Undeclared name:␤ 'Foo' used at line 1␤Check failed␤FAILED 00:00 134m␤»
TimToady and you might get better diags
firefish5000 aaa... I just have a horible habit of Capatalizing Each Word... 22:42
22:42 Mouq left
grondilu German people do that, don't they? 22:42
firefish5000 Changed my code and its working.
TimToady grondilu: not the Verbs 22:43
22:43 kjs_ left 22:45 espadrine_ joined 22:46 espadrine left
firefish5000 Is there a way to Ourify all the subs by default? And if so, how would you declar one to be private? 22:48
dalek c: b3e3379 | paultcochrane++ | lib/Language/io.pod:
Document I/O
22:49
c: e83ed7b | paultcochrane++ | lib/Type/IO/FileTestable.pod:
Make more explicit that -e and -f aren't in Perl 6
22:52 jluis_ left 22:54 rurban1 left
TimToady well, doubtless one could do BEGIN OUR::{$_} = MY::{$_} for MY::.keys.grep(/^'&'/); or some such 22:58
it might even work
but yes, then your implicit 'my' would turn into 'our' 22:59
so probably better just to use explicit 'our' on the non-my subs
or pull the aliases from the export list rather than from MY::
23:02 Sqirrel joined 23:04 spider-mario left
masak 'night, #perl6 23:09
diakopter m: macro marco {} 23:10
camelia ( no output )
raydiak good night masak
23:11 gfldex left, pullphinger left
firefish5000 Alright. Thanks TimToady. As you stated, using our would probably be better. (gave the code a try anyways, but wasn't able to figure out how to make it work. nice to know we can see the OUR/MY list that way though) 23:16
dalek c: 738d615 | paultcochrane++ | lib/Language/io.pod:
Correct links to IO-related types/roles
23:20
masak diakopter: I saw that.
23:21 espadrine_ left 23:22 locsmif joined
diakopter masak: o noes 23:25
timotimo sad of the day: unicode die faces don't have univals defined
23:30 beastd left
firefish5000 TimToady, lol, I knew that that would help me in some way. I finally figured out how to add subs in a loop like I use add_method for methods and tokens. Cuts my code 1/3; 23:32
timotimo where can i have a look at what *is* defined with a unival? 23:40
we didn't roll unival on our own, right?
23:50 jack_rabbit joined 23:52 rurban left 23:54 eternaleye left, eternaleye joined 23:55 mr-foobar left
Kristien My GC tried to allocate terabytes of memory since I didn't initialise a variable. :( 23:58
diakopter uh oh
TimToady m: say uniprop('⅔','numericvalue') 23:59
camelia rakudo-moar 114659: OUTPUT«0.66666667␤»
TimToady m: say uniprop('⅔','numericvalue').WHAT
camelia rakudo-moar 114659: OUTPUT«(Str)␤»
Kristien lol