»ö« 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.
psch not me, i'm still mostly segfaulting 00:00
skids When I was playing with librhash/libmhash there was no fast way -- it was a choke point. 00:01
raydiak my segfaults all come from concurrency or precomp :)
psch mine currently come from callbacks
although i did hit a few moar-internal NYIs
raydiak yep looks like it's my choke point too...I mean even just an empty loop takes dozens of seconds for the number of iterations I need 00:05
00:07 pmurias left 00:18 pierrot left
skids Also doesn't help that CArray[int] is a) signed and b) endian-sensitive and c) sizeof(int) sensitive. But as I understand it help is on the way :-) 00:20
this was my attempt at the time: gist.github.com/skids/d5990725c9d611d924c9 00:22
00:23 pierrot joined
dalek c/Edit-the-class-SetHash-page: 5b04517 | (Cole Keirsey)++ | lib/Type/SetHash.pod:
Added example code and fixed a broken link

I added the union operator to the example code at lines 68 and 74. I (hopefully) fixed the broken link to the setbagmix page at line 77.
00:24
raydiak skids: oh also good to know; thanks 00:27
00:30 adu left
raydiak what about just initializing a CArray to a certain (large) number of zeroes? is there a fast way to do that? if so I guess I could switch from Blob to CArray in my app, and use Compress::Zlib::Raw instead of the wrapper 00:30
skids I imagine just setting a high index would cause a CArray to size out. 00:31
00:32 abraxxa left
skids e.g. line 85 of the gist. 00:32
00:32 abraxxa1 joined, abraxxa1 left
raydiak m: use NativeCall; my $buf = CArray[uint8].new; $buf[4] = 1; say $buf[$_] for ^5; 00:35
camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Could not find NativeCall in any of: /home/camelia/rakudo-inst-1/languages/perl6/lib, /home/camelia/rakudo-inst-1/languages/perl6␤»
raydiak oh right, we wouldn't want that in restricted setting anyway
00:35 ribasushi left
raydiak hm, it sizes but doesn't zero-fill 00:37
skids Heh. Wonder what's in it.
raydiak idk...random deallocated memory stuffs? 00:38
skids The other problem I was wrestling with in the gist was how to make a module only optionally depend on NativeCall and also c-libs, with pure-perl fallback.
00:38 ribasushi joined
skids star: use NativeCall; my $buf = CArray[uint8].new; $buf[4] = 1; say $buf[$_] for ^5; 00:40
camelia star-p 2014.12: OUTPUT«-32␤-17␤90␤7␤1␤»
..star-m 2014.12: OUTPUT«120␤118␤-80␤-59␤1␤»
raydiak oh right...star has modules :) 00:41
00:43 DarthGandalf joined
raydiak couldn't you just call a relevant native function in a try block, and select the implementation to use based on success/failure? 00:45
00:46 kurahaupo joined
skids Yeah I think I tried that and the problem is that if you use e.g. a CArray type in the file it bombs, and there's no way to harmlessly stub the "CArray[int]" type name as it is peculiarly implemented. 00:47
Hmmm... I don't think I had CArray[uint8] available at my disposal when last I tried. 00:48
Though obviously it's just faking with CArray[int8] but anyway maybe I should give it another go.
00:48 lestrrat left 00:53 lestrrat joined
raydiak yeah I think I'm pretty much at an impasse until I can either get a whole blob into a CArray at once, or iterate over the values in reasonable time, or at least even zero-fill a CArray quickly (though the 0-fill option is important to have, it would only provide a LTA workaround in my case) 00:59
skids Well, you could pass the CArray to a libc memset. 01:04
01:08 espadrine left 01:11 kyclark_ left
raydiak oh true...idk C much, would that be fairly portable? 01:11
skids I would imagine, if loading libc portably is possible. 01:12
I pretty much never test anything on Win, so I wouldn't know.
01:13 lue left 01:18 araujo joined, araujo left, araujo joined
raydiak think I'll hold off for now and see if the things I'm using improve before I get back around to breaking down and building it out of fiddly native bits, given that the module's name ends with "::Portable" :P 01:19
01:21 japhb left 01:22 japhb joined
raydiak thanks for the advice skids++, good to know where things stand...if you do work on it again and end up with a portable solution, let me know :) 01:22
01:30 lue joined
tadzik masak: possible; my readmes tend to be as descriptive as "polar bears are left-handed" or so 01:42
vendethiel are they? :op 01:46
colomon vendethiel: he said descriptive, not factually accurate. 01:47
;)
vendethiel *g* 01:51
tadzik I think they are though :)
otherwise all me readmes are wrong... :P 01:52
I went to bed at 20, to get good sleep and wake up early to get work done
woke up at 2 :|
(AM)
02:09 DarthGandalf left 02:11 DarthGandalf joined
Peter_R tadzik, means you've got an extra few hours in your day :) </glass half full> 02:14
tadzik Peter_R: heh, I'm afraid I'll end up falling asleep again at 4 and being supertired when I wake up in the actual morning :) 02:17
but, we'll see
Peter_R coffee, nicotine, speed, cocaine, in that order, as needed 02:18
Probably should put redbull in there somewhere
skids bah, never ruin a good speed run with caffeine. 02:22
02:23 pi314 joined 02:26 yeahnoob joined 02:36 adu joined
gtodd1 should there be a bit more info on meta/hyper/cross operators on the operators page of the main docs? doc.perl6.org/language/operators 02:39
a short summary with a link to another docs.perl6.org page more detail and few examples ... i.e. something like: rosettacode.org/wiki/Element-wise_o...ons#Perl_6 en.wikibooks.org/wiki/Perl_6_Progra..._Operators 02:42
02:42 gtodd1 is now known as gtodd
skids looks like metas like X mention they are metas along with the doc for the vanilla flavor. 02:43
gtodd yeah but I think it would be distracting to sprinkle *all* of them about in the list of main operators -- some sort of general statement about meta-ness with link to more details 02:44
might work better
02:45 ilbot3 left
skids Well certainly reduction and hypers are not currently covered, that I see. 02:45
02:47 ilbot3 joined 02:52 vendethiel left
colomon hrmm, whole batch of failures on the tests overnight. smoke.perl6.org/report 02:54
02:56 vendethiel joined 02:57 BenGoldberg left
skids Any way to see the fails? 03:02
colomon nothing other than trying to run them yourself 03:03
skids I'll be asleep before I can compile a daily :-)
hrm cpandatesters not respoding. 03:04
03:05 eternaleye_ joined, grep0r left 03:06 eternaleye left, eternaleye_ is now known as eternaleye 03:08 grep0r joined 03:14 pierrot left 03:19 vendethiel left, Mso150 joined 03:30 noganex_ joined 03:33 noganex left, kurahaupo left 03:37 Mso150_e joined, Mso150 left 03:38 pierrot joined 03:39 vendethiel joined, skids left 03:40 Mso150 joined 03:42 kurahaupo joined, Mso150_e left 03:51 Mso150 left 04:03 vendethiel left 04:08 raiph joined 04:11 adu left 04:14 pi314 left
tony-o_ does cpandatesters have a git repo? 04:15
04:19 vendethiel joined
raiph tony-o_: github.com/perl6/cpandatesters.perl6.org ? 04:22
04:27 kaleem joined
raiph m: say (6;) 04:29
camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Cannot find method 'flat'␤»
raiph m: say [6;] 04:30
camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Cannot find method 'flat'␤»
raiph m: say (6 ;)
camelia rakudo-moar 166cd3: OUTPUT«6␤»
raiph m: say (6\ ;)
camelia rakudo-moar 166cd3: OUTPUT«6␤»
raiph m: say (66;) 04:31
camelia rakudo-moar 166cd3: OUTPUT«66␤»
raiph m: say ( 6;)
camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Cannot find method 'flat'␤»
04:33 grep0r left, telex left 04:34 asdf12z_ joined, telex joined
raiph m: say (2,3,4; 5,6,7; 8,9,0) 04:34
camelia rakudo-moar 166cd3: OUTPUT«2 3 4 5 6 7 8 9 0␤»
raiph m: say (2,3,4; 5,6,7; 6; 8,9,0) # add a lone 6; anywhere and boom 04:35
camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Unknown QAST node type NQPMu␤»
asdf12z_ web framework in perl6? 04:36
04:39 grep0r joined
raiph asdf12z_: catalyst? :) 04:39
m: (6;) # above bug, golfed, about to rakudobug 04:40
camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Cannot find method 'returns'␤»
raiph asdf12z_: there's bailador 04:41
04:42 vendethiel left 04:43 PZt left, PZt joined 04:44 vendethiel joined 04:46 bcode_ joined 04:47 bcode left, gargamel left, bcode_ is now known as bcode, gargamel joined
raiph m: say (2,3,4; 5,6,7; 5,6; 8,9,0) # 5,6; is fine 04:47
camelia rakudo-moar 166cd3: OUTPUT«2 3 4 5 6 7 5 6 8 9 0␤»
raiph m: say (2,3,4; 5,6,7; 5+1; 8,9,0) # 5+1; is fine 04:48
camelia rakudo-moar 166cd3: OUTPUT«2 3 4 5 6 7 6 8 9 0␤»
raiph is borked in my december R too 04:51
05:06 kaleem left 05:08 vendethiel left 05:19 vendethiel joined 05:32 mr-foobar left 05:42 vendethiel left 06:20 [Sno] left, yeahnoob left
raydiak .tell skids thank you very much skids++, your help seems to have solved my problem: github.com/raydiak/Image-PNG-Porta...c85471624d 06:21
yoleaux raydiak: I'll pass your message to skids.
06:21 yeahnoob joined
raydiak
.oO( doublekarma )
06:21
does the no-longer-documented DESTROY still work? what should I use instead? I used malloc via nativecall and stored the pointer in an attribute, and need to ensure free gets called when the object is destroyed 06:34
06:52 kjs_ joined 06:59 virtualsue joined 07:13 bjz joined 07:15 bjz left
yakudza Hello, #perl6!!! 07:18
can I run perl6 on android and draw some graphics ?
or just console utilites 07:19
07:25 darutoko joined 07:28 kurahaupo left 07:37 kaleem joined, pecastro left
raydiak yakudza: I don't think anyone has tried rakudo on android in a very long time, but I don't think it was ever done successfully 07:39
yakudza the time has come. 07:45
i'll try
(:
07:45 kjs_ left 07:48 [Sno] joined 07:50 espadrine joined
dalek c: 5b04517 | (Cole Keirsey)++ | lib/Type/SetHash.pod:
Added example code and fixed a broken link

I added the union operator to the example code at lines 68 and 74. I (hopefully) fixed the broken link to the setbagmix page at line 77.
07:50
c: 2ab9f24 | FROGGS++ | lib/Type/SetHash.pod:
Merge pull request #44 from perl6/Edit-the-class-SetHash-page

Added example code and fixed a broken link - fixes #43
08:05 bjz joined, prime left 08:06 FROGGS joined 08:07 zakharyas joined
dalek osystem: d0f68d4 | Adrian++ | META.list:
Add Webservice::Lastfm to ecosystem
08:10
avuserow oh, I guess there's already a WebService:: module. If people like WebService instead of Webservice, then I'll rename this module. 08:14
08:17 Kristien joined 08:18 prime joined 08:19 bjz left, fhelmberger joined
avuserow actually it looks like WebService is preferred on CPAN so I'll give it a rename tomorrow 08:19
avuserow sleep & 08:20
08:20 jack_rabbit joined 08:23 danaj left, danaj joined
TimToady I'm a little bit worried, perhaps unnecessarily so, that the recent change to coercers to take multiple arguments will result in enormous confusion between coercers and composers/constructors; for example the difference between coercion of set-like object to a set vs composing a set of its elements 08:27
it's one thing if the coercer recognizes a list that was generated because there was a comma, and knows how to coerce a List to the desired type 08:28
08:29 grondilu joined
TimToady it's another thing if people start writing Foo coercers that function like Foo.new with arbitrary arguments 08:29
this isn't Python, where we write Foo() to call a constructor
and I suspect that will be an attractive nuisance 08:30
Kristien m: say((1, 2, 3) === (1, 2, 3)); say((1, 2, 3) === Parcel([1, 2, 3])) 08:33
camelia rakudo-moar 166cd3: OUTPUT«True␤False␤»
Kristien hmm
raydiak yakudza: \o/ good luck, let us know how it goes...I think the last serious attempt failed due to memory constraints 08:34
moritz m: say Parcel([1, 2, 3]
camelia rakudo-moar 166cd3: OUTPUT«===SORRY!=== Error while compiling /tmp/YkZTFmurLe␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/YkZTFmurLe:1␤------> say Parcel([1, 2, 3]⏏<EOL>␤»
moritz m: say Parcel([1, 2, 3]).elems
camelia rakudo-moar 166cd3: OUTPUT«3␤»
moritz m: say 42 for Parcel([1, 2, 3])
camelia rakudo-moar 166cd3: OUTPUT«42␤42␤42␤»
moritz huh, it's a flat one
moritz is slightly surprised
Kristien I think it doesn't copy the elements but stores a pointer to the array.
and then uses WHICH on the array for === 08:35
moritz m: my $p = Parcel([1, 2, 3]); $p[1] = 42; say $p
camelia rakudo-moar 166cd3: OUTPUT«1 42 3␤»
Kristien huh I thought parcels were immutable
moritz Kristien: the difference is that [] constructs an array, and an array stores all its elements in containers
Kristien: so the parcel created that way has containers
Kristien ooh I see
TimToady so it's making a parcel of the containers rather than teh values
moritz Kristien: yes, the parcel itself is immutable, but the things stored in there aren't 08:36
TimToady m: my $p = Parcel([1, 2, 3].values); $p[1] = 42; say $p
camelia rakudo-moar 166cd3: OUTPUT«Index out of range. Is: 1, should be in 0..0␤ in method assign_pos at src/gen/m-CORE.setting:8531␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3281␤ in block <unit> at /tmp/jESOTC89Q_:1␤␤»
moritz that's a weird one 08:37
TimToady m: [1, 2, 3].values.WHAT
camelia ( no output )
TimToady m: [1, 2, 3].values.WHAT.say
camelia rakudo-moar 166cd3: OUTPUT«(List)␤»
TimToady m: my $p = Parcel.new([1, 2, 3].values); $p[1] = 42; say $p 08:38
camelia rakudo-moar 166cd3: OUTPUT«Index out of range. Is: 1, should be in 0..0␤ in method assign_pos at src/gen/m-CORE.setting:8531␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3281␤ in block <unit> at /tmp/WYsmGp2rAM:1␤␤»
El_Che TimToady: how was the flight? 08:39
moritz m: my $p = Parcel.new([1, 2, 3].values); sau $p.elems
camelia rakudo-moar 166cd3: OUTPUT«===SORRY!=== Error while compiling /tmp/kwtpgmeHvK␤Undeclared routine:␤ sau used at line 1. Did you mean 'say'?␤␤»
TimToady hoelzro: anyway, see discussion above for a potential problem with switching coercions to |args
moritz m: my $p = Parcel.new([1, 2, 3].values); say $p.elems
camelia rakudo-moar 166cd3: OUTPUT«1␤»
TimToady El_Che: fine
moritz argues that this inconsistency is a bug
08:39 DieGraueEminenz joined
TimToady argues that moritz is misunderstanding the difference between OO coercion and FP composition 08:40
moritz m: say Parcel.new([1, 2, 3]).elems; say Parcel.new([1, 2, 3].values).elems; 08:41
camelia rakudo-moar 166cd3: OUTPUT«1␤1␤»
moritz oh
somehow I thought the first one said 3
08:42 xfix joined
moritz TimToady: you might be right, but I retract my point about it being inconsistent 08:42
TimToady I mean, OO does composition too, but it does so with constructors rather than via coercion 08:43
Kristien m: say .WHAT, .Parcel === (1, 2, 3) given [1, 2, 3].map({ $_ }) 08:46
camelia rakudo-moar 166cd3: OUTPUT«(List)False␤»
TimToady and the reason we have a set composer is so that there's not a big discontinuity in semantics between Set($foo) and Set($foo,$bar), where the former is a direct 1-to-1 here's how you change a $foo into a Set, whereas the latter suddenly becomes a composer that doesn't "work right" in the degenerate case of a 1-element list
so we really need to keep those two usages distinct
dalek kudo/newio: a7769c5 | lizmat++ | src/core/io_operators.pm:
Implement move($from,$to)
08:47
TimToady another very significant difference between Set.new() (aka set()) and Set() is that the composer/construct *must* make a new object, while Set() merely enforces that the result will match Set, and may be a no-op if it already matches Set. 08:53
and I don't know how we enforce the distinction if poeple start using the |args in coercers to function as constructors; this seems like a difficult thing to enforce culturally, and people will get themselves in trouble 08:54
or maybe people will just accept the complete semantic discontinuity at the presence of a comma, I dunno 08:55
maybe it's just a big DWIM with an only slightly smaller WAT 08:56
lizmat the reminds me of the whole Parcel mess: It's a Parcel if there is a comma. Or if it's an empty list.
fortunately, that will be going away
TimToady well, we just swept all that under the carpet of List instead
but the dirt is still there if you don't distinguish coercions from composers 08:57
lizmat indeed, my point :-)
TimToady and we've tried to distinguish them syntactially up till now, but |args works against that
lizmat feels to me we need a colon somewhere :-)
08:58 raiph left
espadrine m: say Parcel.new(1,2,3) === Parcel(1,2,3), Parcel.new(1) === Parcel(1), Parcel.new(1,) === Parcel(1,); 09:00
camelia rakudo-moar 166cd3: OUTPUT«TrueFalseFalse␤»
espadrine how do we coerce a single element parcel? 09:01
lizmat .tell Mouq seems you're LoL patches broke t/spec/S02-types/multi_dimensional_array.t 09:02
yoleaux lizmat: I'll pass your message to Mouq.
09:02 vendethiel joined
espadrine m: say Parcel.new(1) === Parcel((1,)); 09:03
camelia rakudo-moar 166cd3: OUTPUT«True␤» 09:04
espadrine I think
09:05 Sqirrel left
TimToady you're testing object identity with === there, which works for values on if they are considered immutable, and currently two different parcels might or might be considered the same value 09:06
m: say Parcel.new(1,2,3) eqv Parcel(1,2,3), Parcel.new(1) eqv Parcel(1), Parcel.new(1,) eqv Parcel(1,);
camelia rakudo-moar 166cd3: OUTPUT«TrueFalseFalse␤»
TimToady say Parcel(1).WHAT
m: say Parcel(1).WHAT 09:07
camelia rakudo-moar 166cd3: OUTPUT«(Parcel)␤»
TimToady m: say Parcel.new(1).WHAT
camelia rakudo-moar 166cd3: OUTPUT«(Parcel)␤»
09:07 abraxxa joined
TimToady those ought to be eqv anyway 09:07
m: say Parcel(1).perl
camelia rakudo-moar 166cd3: OUTPUT«(ListIter.new(),)␤»
TimToady m: say Parcel.new(1).perl
camelia rakudo-moar 166cd3: OUTPUT«(1,)␤»
TimToady m: say Parcel(1,2,3).perl 09:09
camelia rakudo-moar 166cd3: OUTPUT«(1, 2, 3)␤»
TimToady see, here's one of those discontinuities, though perhaps this one is bogus, since parcels are going away 09:10
JimmyZ m: say <2/6>.perl 09:11
camelia rakudo-moar 166cd3: OUTPUT«"2/6"␤»
JimmyZ should be <1/3>?
m: say <555555555555555555555555555555555555555555555/5>.perl
camelia rakudo-moar 166cd3: OUTPUT«"555555555555555555555555555555555555555555555/5"␤»
TimToady m: say <2/6>.WHAT
camelia rakudo-moar 166cd3: OUTPUT«(Str)␤»
TimToady that's the problem
espadrine adding parens for the 1-element parcel works, but it’s definitely a discontinuity in expectation 09:12
m: say Parcel((1,)).perl 09:13
camelia rakudo-moar 166cd3: OUTPUT«(1,)␤»
TimToady JimmyZ: rakudo doesn't do Rat or Complex literals yet, but relies on the string coercion to make up for it
JimmyZ S02:870
synopsebot Link: perlcabal.org/syn/S02.html#line_870
JimmyZ so bug or nyi?
TimToady nyi
RatStr and such are also not implemented yet 09:14
but <2/6> is supposed to turn into a Rat directly
09:14 wtw joined
TimToady because there's no whitespace 09:14
09:14 wtw left
TimToady it's one of those spots where niecza is still ahead of rakudo 09:15
but relaying on coercion rather than the correct literal interpretation means that rakudo will not multi-dispatch on <2/6> correctly yet 09:16
jnthn Is it supposed to do that by val(...), or a different parse rule? 09:17
TimToady n: say "here"
camelia niecza v24-109-g48a8de3: OUTPUT«(signal ABRT)Stacktrace:␤␤ at <unknown> <0xffffffff>␤ at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_string (intptr,intptr,int) <0xffffffff>␤ at (wrapper alloc) object.AllocString (intptr,int) <0xffffffff>␤ at string…»
lizmat afk for a few hours& 09:18
JimmyZ n: say <555555555555555555555555555555555555555555555/5>.perl 09:29
camelia niecza v24-109-g48a8de3: OUTPUT«(signal ABRT)Stacktrace:␤␤ at <unknown> <0xffffffff>␤ at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_string (intptr,intptr,int) <0xffffffff>␤ at (wrapper alloc) object.AllocString (intptr,int) <0xffffffff>␤ at string…»
09:29 vendethiel left 09:31 dakkar joined 09:32 molaf_ joined 09:33 konsolebox joined 09:35 molaf left 09:36 espadrine left 09:39 rurban_ joined 09:42 kjs_ joined 09:54 yeahnoob left 10:00 kjs__ joined 10:01 kjs_ left, kjs__ is now known as kjs_
masak good antenoon, #perl6 10:03
moritz good an, masak
TimToady CEST really before noon this time 10:04
jnthn TimToady: Already in Brussels? 10:05
10:05 kjs_ left, sqirrel__ joined
TimToady yup, so I can put off doing my talk while jetlagged :) 10:05
jnthn has been putting off his while being ill 10:06
:/
TimToady that seems suboptimal
tadzik heh, I went to sleep on 20 yesterday to get up earlier to get some work done 10:07
woke up on 2 am :|
masak to be fair, that *is* early. :P 10:09
tadzik heh, yeah, too same extent it worked, I guess :P 10:11
10:13 kjs_ joined, lea joined
El_Che jnthn: I hope you'll be well enough at the FOSDEM talk to contaminate the audience with your famous presenter stamina :) 10:13
jnthn El_Che: I'm pretty sure I'll be good for the talk, but I'll likely be giving the noisy, crowded, Friday evening beer thing a miss. 10:14
El_Che jnthn: I am not a fan of the Friday evening event myself.
jnthn: I *am* a fan of the one of saturday :)
10:15 espadrine joined
itz_ ah the fast efficient Belgium restaurent service ;) 10:15
El_Che for the restaurants defence: I reserved last time voor 20 persons ("maybe a little less, but 20 should do") 10:16
after 110 we stopped counting :)
10:18 bjz joined 10:20 Rounin joined
jnthn El_Che: Yeah, I'm hopeful I'll make the Sat/Sun dinners, and have the appetite to enjoy them... :) 10:21
rurban_ parrot is now at RELEASE_7_0_2 for the Visual C++ fixes 10:28
10:29 bjz left
FROGGS jnthn: do you favour a dinner tomorrow instead? (at the hotel or nearby) 10:29
rurban_++ 10:30
10:31 virtualsue left 10:32 virtualsue joined
jnthn FROGGS: Yes, some quiet dinner in/near the hotel with a few folks would be fine. 10:33
FROGGS awesome :o) 10:35
10:37 pecastro joined 10:42 DieGraueEminenz left
masak part of me wishes I was there with you FOSDEMites. :/ 10:43
10:44 chenryn joined 10:45 Otterpocket joined
itz_ El_Che: ah that explains it .. the food was good anyway :) 10:45
10:47 pecastro left 10:49 sqirrel__ left, pecastro joined 10:50 bjz joined 10:55 chenryn_ joined 10:56 Ovid_ left 10:57 chenryn left
TimToady El_Che: do you happen to know offhand whether the big room's projector will prefer 4:3 or 16:9? 10:59
El_Che TimToady: I will enquire now 11:07
but probably 4:3
TimToady in my experience, big rooms tend to have...how shall we say...conservative projection systems :) 11:08
"legacy" says Glo
El_Che yeah, I am taking my hdmi -> vga convertor 11:09
:)
TimToady despite having a newish Lenovo Carbon, it still has a VGA dongle, thankfully 11:10
which seems to work out better for the video driver than the hdmi output, often, dunno why 11:11
I think the hdmi driver more DWIM, which in my case generates more WAT
El_Che TimToady: mail sent, I'll keep you posted (but I am pretty sure it's 4:3) 11:12
11:12 rindolf joined
TimToady thanks, sometimes it makes a difference in how I plan 11:12
11:13 vendethiel joined 11:16 kjs_ left 11:17 pecastro left
El_Che TimToady: I got a tempative confirmation that the Jason room has 4:3, but I need to receive a second authorative mail (no kidding :) ) 11:17
btw, the projector in the dev room is also 4:3 11:18
woolfy1: there?
ab5tract hdmi is DWIMIALM -- Do What I Mean If Authorities Let Me 11:20
which is unfortunately becoming more and more the default for computing systems
i imagine it would be more plug and play if it were not encumbered by DRM subsystems
woolfy1 El_Che: yep
yoleaux 7 Oct 2014 15:25Z <japhb> woolfy1: Haven't been able to reach you this morning. Ping when you're back?
tadzik heh, during my scalar allocation experiments it turned out that creating an @array and pushing to it is 138 Scalar allocations :) 11:21
jnthn o.O
tadzik: Pushing how many things?
TimToady nice to know we still have room for improvement, I guess... 11:22
tadzik jnthn: feather.perl6.nl/~tjs/profile-14225...llocations code is gist.github.com/tadzik/e301f6aea294412dad89
tl;dr one thing
woolfy1 About restaurants: for Saturday I have 70 seats reserved in La Porteuse d'Eau, and now 45 are taken. I have 50 reserved in La Becasse, and 31 are taken. We can have some more people.
tadzik oh, to be fair, 135 of those is "say" 11:23
push itself is 3
so that's okay
so, false alarm
(kinda)
TimToady if you say so
jnthn Was gonna say, I just -e "my $a := []; $a.push(1)" and it came out with the 3 11:24
tadzik yeah, it's just say
jnthn What the heck in there hits a slow-path bind?!
Oh, it's not the say even 11:25
It's the .perl of the object
11:25 kjs_ joined
tadzik ah, that makes more sense inded 11:25
jnthn On the routines tab, .perl takes 83% of the time 11:26
11:26 pecastro joined
masak would it be possible/desirable to do some sort of "source mapping", showing where in the source code the various calls happen? 11:26
right now it feels like you're figuring that data out, but it should be in there somewhere, and visualizable. 11:27
tadzik the problem now, with allocations, is that you ask the profiler "where is this allocated?", and it says "why, in CORE.setting of course"
so there's a lot of guessing involved
TimToady file/line directives would be a good project for someone 11:28
or, contrariwise, some way to compose the setting from files that doesn't involve catting them all together 11:29
masak can't bring himself to shout "well volunteered!" at TimToady :P
TimToady has already volunteered too much, which is part of why his talk isn't done... :) 11:30
jnthn tadzik: fwiw, the data collected about allocations is actually detailed enough to work out the call paths 11:31
tadzik oh, it's just the UI?
jnthn It's just there isn't a visualization to show it 11:32
Yeah.
tadzik alright, I'll note that
arnsholt masak: I guess the social acceptability of "well volunteered" is inversely proportional to the amount of volunteering already done by the individual =) 11:33
11:34 vendethiel left 11:36 dwarring left 11:37 jack_rabbit left 11:38 kjs_ left 11:44 chenryn_ left
TimToady arnsholt: otoh, it's common wisdom that: "If you actually want to get something done, ask someone who's already too busy." 11:47
11:50 kaleem left 11:52 Woodi joined
El_Che TimToady: the authorative source is not sure :( :" I should be able to, but I'm not... I'm certain that last year we used 11:56
4:3, but I can't say for sure that the projector does not support 16:9.
Either way, I think 800x600 or 1024x768 in 4:3 aspect is the safest bet."
moritz not 640x480? SCNR 11:57
11:59 bjz left
masak has a soft spot in his heart for 320x200 11:59
12:05 bjz joined 12:07 Kristien left 12:08 vendethiel joined 12:14 Kristien joined 12:18 konsolebox left, yeahnoob joined, rindolf left
El_Che TimToady: an other mail, 4:3 and 800x600 or 1024x768. Those are also the video output (streaming, recording) support 12:19
12:28 rurban_ left
nwc10 I'm trying to remmeber exactly what Tim Bunce's comment was at APW2014 12:32
something like "this is the first projector I've plugged the laptop into, where the screen got *bigger*"
I doubt that it's on the videos 12:33
we cannot promise the same awesomeness for APW2015, as we don't yet have a venue, let alone knowledge about its AV equipment 12:34
but we hope we can deliver
12:34 konsolebox joined 12:38 rmgk is now known as Guest16720, rmgk_ joined, Guest16720 left, rmgk_ is now known as rmgk, pecastro left
El_Che nwc10: you could provide a pantomime 12:39
:)
12:40 pecastro joined 12:43 konsolebox left
Kristien is there a plan for some consistency on module names on modules.perl6.org? 12:46
e.g. there's DB::ORM::Quicky, but MongoDB isn't DB::MongoDB
moritz Kristien: not more than on CPAN itself :-)
12:47 kaleem joined
moritz Kristien: the best thing one can do is write some comprehensive guides to naming, and prominently link to them 12:47
Kristien: if you write the guide (preferably in a community-editable location, like doc.perl6.org), I'll help you with the linking 12:48
masak the root problem isn't 100% name consistency anyway -- it's discoverability.
TuxCM www.xs4all.nl/~hmbrand/t.pl => P6opaque: no such attribute '$!pos'
in method match at src/gen/m-CORE.setting:7267
Kristien moritz, OK!
moritz TuxCM: <Bool::> in a regex will be parsed as some sort of subrule call 12:50
TuxCM: quote it, '<Bool::>'
TuxCM very intuitive :/
moritz well, <alpha> and <thingy> are quite common in p6 regexes
masak TuxCM: not critical in any way, but if you lower-case your class names like that (`foo`), then you make it easy for people to accidentally read inheritance (`is foo`) as applying a trait.
moritz TuxCM: also, if you want to do a type check, do a ~~ Bool
12:50 sqirrel__ joined
TuxCM now *that* helps! Thanks 12:51
masak TuxCM: the rule with regexes is: *any* non-alnum has an operational meaning instead of a literal one. so if you want the literal meaning, you have to quote with \ or ''
TuxCM masak, it wa a shunken example from a larger code set
masak TuxCM: well, the point still stands.
moritz but the error message sucks
masak rakudobug? 12:52
moritz oh
known one, I guess
masak ah.
moritz it probably calls the Bool method
which isn't a regex
niecza had the awesome 'method "foo" doesn't follow the regex calling convention' error message
12:53 spider-mario joined
FROGGS would be nice to check for that in signatures also... 12:53
so that you write a multi candidate, and it will be picked if the object passed to it implements some methods 12:54
on the other hand, that might be stupid :o)
moritz FROGGS: well, type-checking the return value would be useful 12:55
FROGGS yeah
El_Che got confirmation that the fosdem talks at the devroom will also ve live-streamed
moritz \o/ 12:56
FROGGS \o/
12:57 andreoss joined 13:00 konsolebox joined
masak \o/ 13:03
Kristien m: module A { class C { } }; module B { class C { } }; say A::C.new.WHICH; say B::C.new.WHICH 13:05
camelia rakudo-moar 166cd3: OUTPUT«C|67964688␤C|67964752␤»
moritz Kristien: it should really use the type address in the WHICH, not the type name 13:07
andreoss rakudo.org is still giving back 500 error code. 13:10
yoleaux 28 Jan 2015 16:48Z <japhb> andreoss: Do you still need help creating your perl6-bench test?
moritz andreoss: I think pmichaud is the only one who can fix it 13:11
13:11 Kristien left
andreoss i see it has pretty old rhel5 which might be affected by lately discovered GHOST vulnerability 13:14
moritz it seems to have started erroring before its public disclosure 13:15
lots of reasons possible (disk full, for example) 13:16
hoelzro TimToady: it might be that I'm not understanding the deeper issue here, but is the issue that Type(...) can take > 1 argument, and thus can be abused for non 6-y purposes? 13:23
pmichaud checking on 500 error code 13:24
fixed now 13:25
FROGGS pmichaud++
pmichaud Sorry about that. The system was being attacked a couple of days ago, and apparently I messed up the .htaccess configuration without realizing it 13:26
Apparently Apache doesn't recognize "Order deny, allow", it has to be "Order deny,allow" (no space)
FROGGS pmichaud: well, it seemed secure during that time :o)
jnthn pmichaud: I noticed you have a FOSDEM talk...when're you arriving?
pmichaud 7am Fri
13:27 abraxxa left
pmichaud I think. I'm more interested in when I'm departing at this moment :) 13:27
jnthn ;-)
"Soon", surely :)
jnthn lands at 1pm
FROGGS I land at 8:30am or so
pmichaud my flight is in about 4.5 hrs
I land at 7:15a, it seems. 13:28
jnthn Quick! Pack! Airport! :D
jnthn wonders if pmichaud has started writing his talk yet :)
pmichaud Packing is almost finished. Airport is only 30min away from me, so that's not a problem.
jnthn Ah, nice :)
pmichaud I've outlined my talk, yes; slides -- not yet.
FROGGS hehe
jnthn Hah, same as me.
pmichaud Probably tomorrow in hotel room for that.
jnthn Yeah
Are you at the Louise hotel place also?
FROGGS I've 50 slides already /o/
pmichaud Yes.
jnthn Me too 13:29
FROGGS same
TimToady me zero
we're at the novotel in the older part of town
FROGGS :/ 13:30
TimToady we like older parts of towns :)
FROGGS I'd enjoy any part right now in case it would not mean $dayjob 13:31
FROGGS yawns 13:32
pmichaud I best finish packing and prepare to head to airport. See many of you soon.
FROGGS have a good flight :o)
13:32 Kristien joined
Kristien m: say [+][]; say [*][]; 13:32
jnthn pmichaud: Safe travels 13:33
camelia rakudo-moar 166cd3: OUTPUT«0␤1␤»
Kristien Neat.
jnthn :)
TimToady don't really need the [] there...
m: say [min];
camelia rakudo-moar 166cd3: OUTPUT«Inf␤»
jnthn Implementation of it is neat too - it's a zero-arity candidate on the operator
Kristien how does it know the identity elements?
Clojure's reduce does it by calling the function with zero arguments 13:34
13:34 sqirrel__ left
TimToady same here 13:34
Kristien neat
TimToady it seems the obvious thing to do once you have multi dispatch
jnthn wanders to do some shopping, so he can have lunch, so he finally has no excuses left not to write his talk slides...
TimToady oddly, you don't call the function at all when there's one arg, you just return it 13:35
13:35 sqirrel joined
TimToady m: say [*] "not a number" 13:36
camelia rakudo-moar 166cd3: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏not a number' (indicated by ⏏)␤ in method gist at src/gen/m-CORE.setting:14570␤ in sub say at src/gen/m-CORE.setting:17327␤ in block <unit> at /tmp/D7Txy6…»
TimToady heh, I guess it checks that
13:36 dayangkun joined 13:39 FROGGS left
colomon doesn’t think that sounds quite right… why would the reduce-meta-op know that * takes numbers? 13:39
masak colomon: not sure it does. 13:40
colomon: but the 1-param case of infix:<*> surely does.
colomon masak: “TimToady: oddly, you don't call the function at all when there's one arg, you just return it”
TimToady well, apparently I was wrong about that 13:41
Kristien that'd be silly
TimToady being wrong? :)
masak feels like the consistent thing to do to call the function.
Kristien * makes no sense on say DB connections
masak otherwise, why do we define the 1-arg case?
Kristien making it the identity operation instead of a type error in that case seems wrong
masak agreed.
Kristien speaking of which 13:42
masak infix:<*> implies casting to numeric, even if you only have one operand.
Kristien m: say (+"Hello, world!")
camelia rakudo-moar 166cd3: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏Hello, world!' (indicated by ⏏)␤ in method gist at src/gen/m-CORE.setting:14570␤ in sub say at src/gen/m-CORE.setting:17327␤ in block <unit> at /tmp/VGOrn…»
Kristien nice
13:43 rurban joined
vendethiel m: say infix:<*>("foo") 13:52
camelia rakudo-moar 166cd3: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤ in method gist at src/gen/m-CORE.setting:14570␤ in sub say at src/gen/m-CORE.setting:17327␤ in block <unit> at /tmp/P6ZDTq6TbP:1␤␤»
vendethiel right
14:00 mephinet- left, FROGGS joined 14:01 skids joined 14:03 konsolebox left 14:09 telex left 14:10 telex joined 14:11 sqirrel left, rindolf joined 14:15 dayangkun left 14:18 sven_123 left 14:23 sven_123 joined 14:24 Otterpocket left 14:29 kaare__ left
andreoss japhb: where the parameters from minibenchmark are described? like work, scale, scaling. I belive they are for plotting. 14:31
14:36 lestrrat left 14:40 lestrrat joined 14:45 mr-foobar joined
ab5tract wait, i don't understand why infix:<*>[] returns 1 14:53
timotimo because 1 is the neutral element of multiplication 14:55
FROGGS ab5tract: it has to start with something... so when you reduce a one element list, you kinda do: elem * 1 14:56
14:56 virtualsue_ joined
vendethiel
.oO( it's the monoid identity element )
14:56
ab5tract m: say "so {infix:<*>[]} multiplied by {infix:<+>[]} equals {infix:<*>[] * infix:<+>[]}??"
camelia rakudo-moar 166cd3: OUTPUT«so 1 multiplied by 0 equals 1??␤»
FROGGS ab5tract: no
m: say 0 * 1
camelia rakudo-moar 166cd3: OUTPUT«0␤»
FROGGS :o)
vendethiel well, yeah..? 14:57
FROGGS *g*
14:57 virtualsue left, virtualsue_ is now known as virtualsue, skaufman_ left
ab5tract FROGGS: except that that is not the case in the expression i just showed 14:57
vendethiel ab5tract: 0 is +'s neutral number that won't change the computation result
ab5tract still do not grok how the expression infix:<*>[] * infix:<+>[] does not compute as 1 * 0 14:58
FROGGS m: say infix:<+>[].perl
camelia rakudo-moar 166cd3: OUTPUT«(0,).list␤»
FROGGS m: say +infix:<+>[]
camelia rakudo-moar 166cd3: OUTPUT«1␤»
FROGGS m: say infix:<+>[] + infix:<+>[] + infix:<+>[]
camelia rakudo-moar 166cd3: OUTPUT«3␤»
ab5tract because it is parcewlled?
vendethiel m: say 3[]
camelia rakudo-moar 166cd3: OUTPUT«3␤»
vendethiel m: say (3[]).perl
camelia rakudo-moar 166cd3: OUTPUT«(3,).list␤»
FROGGS ab5tract: you calc with its .elems, aye 14:59
vendethiel ab5tract: because you don't call something with []. that's then slice
zen* Oo
FROGGS dem slice
vendethiel m: say "so {infix:<*>()} multiplied by {infix:<+>()} equals {infix:<*>() * infix:<+>()}??"
camelia rakudo-moar 166cd3: OUTPUT«so 1 multiplied by 0 equals 0??␤»
vendethiel *g*
ab5tract i dunno 15:00
i mean, i accept that it is probably there for a good reason
as it always is :)
FROGGS [] always is about an itemized list, and these do not flatten when you add them to something 15:01
vendethiel [] is used to interpolate a list
m: my @a = ^10; say "hey @a, or if I may, @a[]"
camelia rakudo-moar 166cd3: OUTPUT«hey @a, or if I may, 0 1 2 3 4 5 6 7 8 9␤»
15:02 Kristien left
vendethiel I can't find zen slice in s01-04, but s05 uses it once 15:03
jnthn S09 may well be where it's spec 15:04
'dc
vendethiel yes, s09 seems to talk about it :) 15:05
15:06 adu joined, noganex_ left
vendethiel m: my @a = ^10; say "hey @a, or if I may, @a[*]" 15:07
camelia rakudo-moar 166cd3: OUTPUT«hey @a, or if I may, 0 1 2 3 4 5 6 7 8 9␤»
vendethiel m: my @a = ^10; say @a.WHAT.perl, @a[].WHAT.perl, @a[*].WHAT.perl 15:08
camelia rakudo-moar 166cd3: OUTPUT«ArrayArrayParcel␤»
15:08 raiph joined
vendethiel will this difference disappear with the GLR? 15:08
lizmat vendethiel: I think the last one will become a List 15:09
but it could well become an Array, come to think of it 15:10
15:10 adu left 15:11 Kristien joined
vendethiel well, maybe [*] vs [] deserve an explanation in S09, but I can't give one :) 15:13
15:18 regreg joined
lizmat with a LoL, you could have * in one dimension, but not in others 15:19
15:20 Kristien left 15:24 konsolebox joined, kyclark joined 15:25 konsolebox left, kyclark left 15:26 konsolebox joined, regreg left 15:27 raiph left, raiph joined 15:30 adu joined 15:31 noganex joined
TuxCM m: class Foo{has Str $.s is rw="x";method xxx{$.s=Nil;};method yyy(*@s){$.s=@s[0];}};my$f=Foo.new;$f.s.say;$f.xxx;$f.s.say;$f.yyy("y");$f.s.say;$f.yyy(Nil);$f.s.say; 15:34
camelia rakudo-moar 166cd3: OUTPUT«x␤(Str)␤y␤Type check failed in assignment to '$!s'; expected 'Str' but got 'Any'␤ in method yyy at /tmp/f4v3qqL8hm:1␤ in block <unit> at /tmp/f4v3qqL8hm:1␤␤»
TuxCM that is the same bug as I reported recently: Nil is dropped from list 15:36
@s in yyy is Array.new()
jnthn fwiw, Nil was originally spec'd to do exactly what's happening with it here (that is, disappears in flattening list context). And by the time the spec changed on that, a bunch of stuff relied on it being that way, meaning it's not a simple fix, sadly. 15:40
15:40 jsix joined
nine_ woolfy1: is there a seat available for Saturday's dinner? I'd like to bring a colleague if possible. 15:42
woolfy1 nine_: yes, I can add plenty of names still, please give me a name (I can write "friend of nine", should be enough) 15:43
nine_ woolfy1: his name is Gregor Pilz 15:44
woolfy1 nine: OK, noted 15:45
El_Che "friend of nine" is a little ambivalent :) 15:46
nine_ I hope to see many friends of mine there :) 15:47
El_Che 9 people like the guy, everyone else hates him :)
tadzik seven of nine :o
El_Che live.fosdem.org/
woolfy1 I consider myself a friend of nine
hoelzro o/ #perl6
vendethiel woolfy1: you're pretty lucky, if I might say :) 15:48
15:48 kjs_ joined
woolfy1 vendethiel: I agree 15:48
nine_ blushes 15:49
TuxCM jnthn, any alternatives to using Nil (as in I want to mimic perl5's "undef")?
in a list 15:50
nine_ TuxCM: Any should be the closest to undef.
15:50 lestrrat left
TuxCM starts experiments ... 15:50
nine_ TuxCM: though in your example a Str would probably be more appropriate and a little more type safe. 15:51
jnthn TuxCM: Any type object should do
m: undef
camelia rakudo-moar 166cd3: OUTPUT«===SORRY!=== Error while compiling /tmp/nYR46T6RP9␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤ an undefined type object such as Any or Int,␤ :!defined as a matcher,␤ Any:U as a type constrai…»
jnthn The error for undef makes many suggestions :)
TuxCM that is what lead me to use Nil, which is quite near to what I actually mean 15:52
nine_ (all the people who write such awesome error messages)++
TuxCM but it disappears from list context :(
jnthn Then use one of the others that does not, for the time being.
nine_ reads "Nil" as "not in list"
TuxCM is there a way to see a diff between Str and "" ? 15:53
vendethiel TuxCM: yes, one is a type object, the other is an empty string
15:54 andreoss left
FROGGS m: say Str; say "" 15:54
camelia rakudo-moar 166cd3: OUTPUT«(Str)␤␤»
FROGGS m: say Str.defined; say "".defined 15:55
camelia rakudo-moar 166cd3: OUTPUT«False␤True␤»
15:56 lestrrat joined 15:57 andreoss joined, kjs_ left 16:00 yeahnoob left 16:01 lestrrat left 16:04 bronco_creek joined 16:05 kjs_ joined 16:06 lestrrat joined, konsolebox left 16:10 FROGGS_ joined 16:12 jluis left 16:14 FROGGS left
TuxCM m: class Foo{has $.xx is rw;};Foo.new.perl.say;Foo.new(xx=>1).say;Foo.new(yy=>2).say; 16:18
camelia rakudo-moar 166cd3: OUTPUT«Foo.new(xx => Any)␤Foo.new(xx => 1)␤Foo.new(xx => Any)␤»
TuxCM is there a way to catch uncaught named argument in new?
what is happening with yy => 2 ?
16:19 Kristien joined
nine_ TuxCM: there is at least one way: a BUILD method may check these arguments. But there's probably a simpler way as well. 16:19
16:20 bronco_creek left 16:21 lestrrat left
PerlJam TuxCM: ClassX::StrictConstructor ? 16:21
TuxCM :P
16:21 Kristien left
nine_ m: class Foo { has $.xx is rw; method BUILD(:$xx, *%args) { die %args if %args; }}; say Foo.new(xx => 1); say Foo.new(xx => 1, yy => 1); 16:22
camelia rakudo-moar 166cd3: OUTPUT«Foo.new(xx => Any)␤yy 1␤ in method BUILD at /tmp/Bp_i3zrf7j:1␤ in method BUILDALL at src/gen/m-CORE.setting:978␤ in method bless at src/gen/m-CORE.setting:960␤ in method new at src/gen/m-CORE.setting:946␤ in block <unit> at /tmp/Bp_i3zrf7j…»
16:24 konsolebox joined
PerlJam nine_: try that when your class has bunches of attributes :) 16:24
TuxCM the reason I want it is to allow aliasses for named arguments: Foo.new(always_foo=>True) should do the same as Foo.new(foo_always=>1); 16:25
what PerlJam said is also true
TimToady :always_foo(:$foo_always) as a parameter makes an alias
though we use them more for abbreviations: :sigspace(:$s) 16:26
16:26 lestrrat joined
TimToady so you don't really need to worry with unbound names, since we already have an aliasing mechanism 16:27
TuxCM on a single line?
PerlJam TuxCM: but then he *must* write a BUILD routine
er, TimToady
TimToady well, you can do it in the new's sig as well
TuxCM so far I have no method new yet 16:28
PerlJam I bet he'd like to write has $.always_foo is aliased-to('foo_always'); or something
TimToady or you can write a function as a constructor just as easily, and then it'll even tell you if there are unused arguments
but in any case, aliasing of named args is provided for already in the signature 16:29
TuxCM what I would also appreciate is a "signal" that named parameters to new() will *always* call the method (setter/getter) as I have defined one for each
method always_quote (*@s) { @s.elems == 1 and $!always_quote = @s[0] ?? True !! False; return $!always_quote; } 16:30
method quote_always (*@s) { @s.elems == 1 and $!always_quote = @s[0] ?? True !! False; return $!always_quote; }
method sep (*@s) { @s.elems == 1 and $!sep = @s[0]; return $!sep; }
method sep_char (*@s) { @s.elems == 1 and $!sep = @s[0]; return $!sep; }
there the aliassing is done in duplicating the methods 16:31
jnthn That isn't what the default BUILD does, though
The default BUILD is assigning to the attributes
TuxCM still has to learn A LOT 16:32
I was only able to start when FROGGS made me happy
a have a lot of catching-up to do
jnthn write a submethod BUILD(*%init) { for %init { self."{.key}"(.value) } } 16:33
Or so
El_Che volunteers.fosdem.org/task/225/ 16:34
funny
jnthn hah :) 16:35
16:41 konsolebox left
andreoss video recording are done by volunteers too? 16:42
16:43 gfldex joined
nine_ It is my understanding that all of FOSDEM is organized by volunteers. 16:43
andreoss volunteers can hire a professional to do recordings 16:44
fosdem videos i watched had terrible sound and video quality 16:45
nine_ But since there's no entrance fee, I guess their budget is quite limited.
PerlJam andreoss: are you volunteering to be a fosdem videographer? 16:46
16:46 zakharyas left 16:47 Kristien joined
Kristien hi 16:47
vendethiel \o
woolfy1 andreoss: we were disappointed by the quality of video and sound of the videos that our volunteers made at FOSDEM. But we had to make do with the equipment that FOSDEM supplied us with. 16:48
andreoss no. i just want perl related videos be more watchable, with good sound and embedded slides 16:49
woolfy1 andreoss: hiring professionals, so the volunteers don't have to do it?
andreoss: we all want that
PerlJam indeed 16:50
woolfy1 andreoss: FOSDEM is completely volunteer-driven, with 25 lecture rooms, and all rooms are run by volunteers from the communities 16:51
andreoss: I think our volunteers did a good job, but it is just oo bad that the quality of video and audio was not good enough for you
maybe next time I will hire Steven Spielberg or Peter Jackson. 16:52
andreoss www.youtube.com/watch?v=5kgUL_FfUZY video like this are done by people with level of expertise i believe
i never saw a video from yapc or fosdem like that.
nine_ andreoss: that's nice, but how do you propose to make such videos happen? 16:53
PerlJam woolfy1: for whatever it would cost to hire either of those two people, you could just get some really nice cameras/microphones and ship them to all of the Perl events and let volunteers do the videography with good equipment
andreoss how have ruby guyes ended up with video like that?
PerlJam andreoss: planning. post-production. people with some skill. 16:54
nine_ RAILSCONF Standrad Admission: $600.00. FOSDEM admission: $0.00. See a difference?
moritz m: say 0 / 600 16:55
camelia rakudo-moar 166cd3: OUTPUT«0␤»
16:55 labster left
nine_ On a side note: watching this guy give a keynote at an expensive conference like RAILSCONF, I'm suddenly much less nervous about my own talk... 16:56
woolfy1 andreoss: indeed, very nice video. Maybe I will pay a professional video team out of my own pocket next year. :-)
PerlJam nine_: excellent! :) (I look forward to seeing the video of your talk) 16:57
andreoss yapcs have admission fees, still no video like that
16:57 labster joined
osfameron they're very low fees... 16:57
itz_ the Debian Video Team are good but most programmers aren't Alfred Hitchcock
PerlJam andreoss: RAILSCONF Standrad Admission: $600.00 YAPC admission: ~$100 See a difference? :)
vendethiel itz_: are most alfred hitchcocks programmers? 16:58
nine_ andreoss: YAPC::EU Regular Price: 120.00 EUR, RAILSCONF: $600.00.
PerlJam though this year's YAPC has a larger admission fee IIRC.
woolfy1 andreoss: we hire professional people for the Dutch Perl Workshop: perltv.org/source/nlpw2014
Kristien m: class A { }; class B is A { }; sub f(A $x) { }; sub g(B $x) { f($x); } 16:59
camelia ( no output )
woolfy1 andreoss: my company sponsored that money, and maybe we will sponsor it this year again. It is quite a lot of money, though.
andreoss: doing that for FOSDEM is a bit different, because the organisation of FOSDEM hires professionals to set up the equipment, and these professionals also instruct our volunteers how to operate it. Having our own professionals there, might lead to tensions that I am not ready yet to ponder... 17:00
andreoss: we know what happened last year, and we are going to try to avoid that this time.
itz_ with some video recordings poor audio is a feature not a bug .. like mst :) 17:01
woolfy1 itz_: that is not nice, I love that voice of mst! He may be loud sometimes, but he has good reasons for it. Sometimes you need to be loud!
itz_ actually he is mellower than in the past 17:02
El_Che hi
woolfy1 El_Che \o/ 17:03
17:04 spider-mario left
El_Che I don't know what's up with ruby, but they don't have a full schedule: fosdem.org/2015/schedule/track/ruby/ 17:04
(I have learnt some Ruby lately to extend Puppet) 17:05
muraiki ah man there's a smalltalk track 17:06
El_Che muraiki: sunday! so no conflict there
woolfy1 At least the ruby-conferences have nice videos
muraiki well, I can't make it to fosdem anyways :( 17:07
El_Che The oscon video's were nice, but they cost $1000
Hehe,this talks in the Lisp room is funny: 17:08
Puppet is a tool for configuration management and automation. It’s written in Ruby, and therefore its codebase contains a notable lack of parentheses. So, we set out to solve that problem and wrote Puppet Server: a new, open source implementation of the Puppet Master, written in Clojure.
moritz nice :-) 17:09
muraiki leet 17:10
itz_ the CCC and Debian confs have good video
moritz they have lots of experience, and some hardware-affine hackers, I guess
woolfy1 Let's just hope that this year the cables will be better taped to the floor, that attendees not constantly knock over the microphone and camera, not constantly kick against the cables in such a way that they are disconnected, and that the battery does not die on us. 17:11
itz_ fosdem is great but the numbers of people make many things hard .. I usually end up going to obscure rooms about hurd etc 17:12
17:12 lestrrat left
itz_ docker was totally maxed out last year 17:12
17:13 Kristien left
vendethiel nine_: aaron patterson is amazing ;-) 17:15
17:17 lestrrat joined
nine_ vendethiel: yeah? I'm more and more convinced that I'm wasting my time watching this video... Well, I really am, since I really should be working on my own talk to not completely embarass myself. 17:18
vendethiel nine_: if I have very exactly no clue what this talk is about, I just had the opportunity to talk to the guy, and he's very fun and open
El_Che woolfy1: the micro is wireless and attached to the speaker 17:19
itz_ nine_: your talk went down well with people at the London Perl Workship
nine_ vendethiel: he certainly has a good number of laughs in the talk.
El_Che an entertainer!
:)
Ovid's slides look like fun as well 17:20
17:24 Rounin left
woolfy1 El_Che: is the wireless microphone not on a power adapter (it has its own battery?) 17:27
timotimo the c3voc makes super awesome conference recordings and they are also volunteers, except the C3 sponsored some good hardware once 17:28
El_Che woolfy1: this is what I have: 17:30
All rooms, including K.3.201 will be recorded and live streamed. FOSDEM
provides the needed hardware to do this:
* A screen capture device to capture what is being sent to the projector
* A wireless microphone to be worn by the speaker
* (optionally) an 3.5mm jack to record/stream computer audio.
woolfy1 OK, thanks
17:32 [Sno] left 17:33 naptastic joined
naptastic Did dot-notation for access of hashref and object members get considered for Perl 6? 17:34
( $self.member instead of $self->{'member'} )
And did "with" or something like it get considered? Example: paste.scsys.co.uk/460177 17:35
PerlJam naptastic: I just saw your text on #perl and tried loading that paste, but my browser is just spinning its wheels and not showing me anything. 17:36
naptastic: Could you make a gist perhaps?
naptastic PerlJam, that's a bummer. URL for gist?
PerlJam naptastic: gist.github.com
naptastic nvm, found it
gist.github.com/naptastic/d1fcd55d171cea66fd01 17:37
PerlJam naptastic: anyhow ... the line between "hash" and "hashref" is blurred so that you can say $hashref{$key} and $hashref.{$key} and they both just work. 17:39
(for a hash it would be %hash{$key} because of sigil invariance in P6) 17:40
17:40 pecastro left
jnthn And for object members, the underlying storage is not a hash, and there's a syntax for accessing them ($!attribute) 17:40
17:40 dakkar left 17:46 mephinet joined
PerlJam naptastic: wrt "with" ... we have given and for to set the topic, so in your last sugar example s/with/given/ and it just works. 17:47
17:47 Kristien joined
Kristien hi 17:47
17:50 rurban left
naptastic Cool! :D 17:55
PerlJam naptastic: I don't think we'll ever do $hashref.key or $hashref.$key to get at elements if that's what you're after. (your original question on #perl made me think you were after that kind of conflation that Templete::Toolkit does) 17:58
naptastic That is actually what I'm looking for, or something like it. 17:59
I grew up on QuickBasic, which has "type" access as thing.component = "value"
I know Ruby uses dot for basically all object member / method access; I also know that Perl != Ruby. 18:00
PerlJam You could do it in a module as long as none of your keys are actual methods on Hash. (have a failed method lookup check the hash's keys) 18:01
or, I suppose you could circumvent normal method dispatch with some shenanigans, but I wouldn't want to or have an idea how.
jnthn I heavily disrecommend doing this, but... 18:02
m: use MONKEY_TYPING; augment class Hash { method FALLBACK($name) { self{$name} } }; my %h = a => 42; say %h.a;
camelia rakudo-moar 166cd3: OUTPUT«42␤»
lizmat yuck :-) 18:03
jnthn
.oO( Future talk: questions I probably shouldn't have answered on #perl6 )
PerlJam m: use MONKEY_TYPING; augment class Hash { method FALLBACK($name) { self{$name} } }; my %h = name => "fred"; say %h.name; #oops
camelia rakudo-moar 166cd3: OUTPUT«%h␤»
jnthn Yes, that's why I suggested not to do it :P 18:04
jnthn is gradually assembling a talk, and figures he deserves some dinner by now :) 18:05
nine_ jnthn: same here :)
naptastic lawl 18:08
naptastic looks up MONKEY_TYPING
PerlJam naptastic: If you're going to fiddle with the innards of a class after the fact, you need to declare LOUDLY that you really and truly intend to, thus MONKEY_TYPING :) 18:10
naptastic PerlJam, about a month ago, I fixed a problem in our codebase where we implemented, incompletely, a tied filehandle glob to STDERR to a module with 1/7 of the required methods... so I definitely understand the dangers of mucking around with potentially-surprising behaviors :) 18:11
vendethiel
.oO( or you can just not do it :P )
naptastic hahaha
b2gills It sounds to me like you want an object without it being a class 18:12
naptastic nah; I just want syntax for member / method access with fewer awkward characters. :) 18:13
"given" is a HUGE improvement though, and I will gladly and humbly thank whoever implemented it.
PerlJam naptastic: $hash<key> # awkward?
naptastic PerlJam, $hashref->{'key'} # my employer requires the single-quotes 18:14
$object->method();
PerlJam naptastic: $hash<key> is equivalent to $hash{'key'}
naptastic $object.method(); # marginally easier to read and write
PerlJam, does it work with refs as well as hashes? (I'm still struggling to accept Perl 6's blurring of the distinction between hashes and hashrefs.) 18:15
PerlJam naptastic: yes.
naptastic Neat :D
(Of course, a lot of this is academic; I won't be able to use Perl 6 for some time, at least professionally. We *just* moved to 5.14, from 5.6 (!!!!) but we're going to 5.22 this year.) 18:16
moritz and 5.22 isn't even out yet!
b2gills m: multi sub infix:<`> (Hash:D \h,\key){h.{key}}; my %a = 5=>6; say %a`5 18:17
camelia rakudo-moar 166cd3: OUTPUT«6␤»
18:19 Mso150 joined
b2gills naptastic: you could do something like that ^ ( though you probably want to use some other character ) 18:19
vendethiel b2gills: why sigilless? 18:20
b2gills I really don't know, I just started typing
naptastic rofl 18:21
b2gills and it worked, so I stopped typing
18:21 kjs_ left
TimToady lmao 18:21
and my wife too
naptastic Anything to stop me from using <.> ?
TimToady in what context? 18:22
moritz naptastic: only confusion with method call
PerlJam naptastic: in general, with Perl 6, only your imagination stops you :)
naptastic suddenly remembers zombo.com
bbiaf; gotta go get some stuff out of the car.
TimToady there are two classes of people who will use Perl 6; those who admire the extension features but are quite comfy with the provided features, and those who admire the extension features and use them to make brain pretzels for everyone else :) 18:23
b2gills Well there are some who like doing both in different contexts
TimToady we need some kind of 'use MONKEY_BUSINESS;' to warn off people from the latter sorts of programs :) 18:24
18:24 muraiki left
TimToady well, the reason my wife is reading over my shoulder is because she's trying to get me to go to dinner :) 18:25
18:25 kjs_ joined
TimToady so if we can find the a's we lo'd we'll be afk & 18:25
b2gills 'use MONKEY_BUSINESS;' would eventually be like 'use strict; use warnings;' in Perl5 if that were the case
PerlJam b2gills: uh ... I hope not. 18:26
Kristien m: sort((8, 2, 6, 5, 2, 4, 6))
camelia ( no output )
Kristien m: say sort((8, 2, 6, 5, 2, 4, 6))
camelia rakudo-moar 166cd3: OUTPUT«2 2 4 5 6 6 8␤»
Kristien m: say sort((8, 2, 6, 5, 2, 4, 6) | (3, 9, 2, 1, 4, 5, 9))
camelia rakudo-moar 166cd3: OUTPUT«any(8 2 6 5 2 4 6, 3 9 2 1 4 5 9)␤»
PerlJam stricture and warnings tend to push people towards better code, while MONKEY_WHATEVER tends to push people towards evil code.
Kristien m: say sort(1 | 4 | 2) 18:27
camelia rakudo-moar 166cd3: OUTPUT«any(1, 4, 2)␤»
Kristien Why does sort not autothread?
Oh wait, it treats the parcel as a one-element list.
lizmat m: say sort(42) # same thing
camelia rakudo-moar 166cd3: OUTPUT«42␤»
TimToady people always expect flattening except when they don't...
rafk & 18:28
18:30 rindolf left, shlomif joined 18:31 shlomif is now known as rindolf
Kristien Flattening is most confusing. 18:37
nine_ Flattening is also insanely useful. 18:38
18:46 xfix left
Kristien I can't imagine a case where implicit flattening would be useful. 18:47
Or rather, more useful than explicit flattening.
18:50 [Sno] joined 18:52 naptastic left
japhb andreoss: re: irclog.perlgeek.de/perl6/2015-01-29#i_10025026 , those parameters are for determining how SCALE is initialized, and how it grows between benchmark runs as timeall tries to get the benchmark to run for long enough to produce stable data. 18:53
nine_ Kristien: for @foo -> $foo { ... } 18:54
japhb andreoss: Unfortunately, I have not documented all of the configuration stuff. Would you open a GitHub Issue for the things you'd like to see documented (or more than one, if several independent things)? 18:55
nine_ Kristien: you usually mean for |@foo -> $foo { ... } with this and I guess people would be very surprised by a different behavior.
japhb wonders if andreoss backlogs, or if he should have sent those with .tell ....
nine_ japhb: I'd .tell just to be sure 18:56
Kristien I guess people would be very surprised by map flattening ((1, 2, 3), (4, 5, 6)) to (1, 2, 3, 4, 5, 6).
PerlJam or just .tell him to backlog and give the link :)
Kristien: P5 people wouldn't
18:59 BigBear joined
nine_ Kristien: but even accepting your assessment, we already got one place where implicit flattening may be just as surprising as missing flattening in another place. 18:59
19:02 kjs_ left 19:05 raiph left 19:07 rindolf left 19:08 Mso150 left 19:10 Mso150 joined 19:11 bronco_creek joined 19:19 BigBear left
bronco_creek .tell moritz Thank you for the commit bit and the encouragement. I did manage to update the documentation for SetHash. I might suggest a way to use SetHash to improve XML::Writer. 19:22
yoleaux bronco_creek: I'll pass your message to moritz.
19:22 kaleem left 19:23 Rounin joined
ab5tract Kristien: to flatten or not is an interesting question. it can go both ways, and often does :) 19:24
19:25 grondilu left 19:26 spider-mario joined 19:27 rurban joined 19:30 mvuets joined
ab5tract i do have a certain trepidation about context coming to the forefront in perl 6 in a similar way as it does in perl 5. up until now i've only thought about 'sink' context and such a few times in my (admittedly short) time with p6 19:30
otoh, i think a) having context implies having ruptures (aka WATs) because inevitably not all language use will fit together without some consideration, and b) having those ruptures is good precisely because it _does_ highlight the presence and importance of context 19:32
(that comes from my experience as a perl 5 hacker)
19:33 raiph joined, Sqirrel joined
moritz bronco_creek++ 19:34
yoleaux 19:22Z <bronco_creek> moritz: Thank you for the commit bit and the encouragement. I did manage to update the documentation for SetHash. I might suggest a way to use SetHash to improve XML::Writer.
masak bronco_creek++ 19:35
b2gills src/core/Str.pm still has some code that checks if icu is available 19:38
moritz b2gills: feel free to patch it out
19:39 fhelmberger left
b2gills I don't know if it could be fixed by just removing the parrot specific ifdef 19:39
Actually it does look like that is the case 19:40
jnthn Looks like it to me too 19:41
If we're talking the one around line 522
19:41 espadrine left
b2gills yes 19:41
19:42 pochi left
b2gills I don't have a commit bit, but I would do a pull request if no else gets to it first 19:43
I was trying to see how hard it would be to create IntStr et all, and was looking at the source of Str on GH 19:44
19:45 pochi joined 19:46 Sqirrel left 19:47 [particle] joined
ab5tract i am hoping some #perl6 veteran could (re)read some of the documentation at www.dlugosz.com/Perl6/ and let me know how up to date the docs are 19:47
i'm hoping to get together a list of helpful/interesting links that aren't (too) misleading, such as masak suggested might be a nice resource to pass to newcomers post-FOSDEM 19:48
moritz ab5tract: perl6.org tries to be that resource 19:49
hoelzro ab5tract++ masak++
moritz ab5tract: if you find perl6.org not good enough, please consider improving it
19:49 nine joined
ab5tract moritz: for sure. and i would of course e honored to push the page to that 19:49
masak ab5tract: far as I remember, a lot at www.dlugosz.com/Perl6/ was interesting and nicely formal-ish, but largely unofficial speculation.
ab5tract moritz: but i need to learn and understand before i can teach. but Ovid has a whole blog post explaining red-black trees in perl 6
moritz project idea: port the code examples from Higher Order Perl to Perl 6 19:50
ab5tract and i also found that books.google.nl/books?id=xyuS3Ht4u...p;pg=PA280 is not wholly out of date 19:51
moritz: and you have lots of interesting posts on your own blog. strangelyconsistent.org is consistently mindblowing
19:51 pierrot__ joined
moritz ab5tract: that's masak++'s :-) 19:52
ab5tract: mine is perlgeek.de/blog-en/
ab5tract moritz: i was mentioning both in the same sentence, ya perlgeek you ;)
19:52 stux|RC joined
moritz oh, wasn't sure if you were confusing them 19:52
vendethiel ab5tract: is it strangely mindblowing, or consistently strange :)
ab5tract and then there's the Power of the Advent :)
masak is happy to be mindblowing 19:53
moritz is mindblogging
vendethiel is happy to see he's been mentioned in a 007 issue :p
moritz erm..
19:53 pierrot left, xfix joined, pierrot__ is now known as pierrot
masak moritz: we should guest post more on each other's blogs, just to mess with people :P 19:53
19:53 cosimo joined, muraiki joined
vendethiel masak: fwiw, I'd really love to talk more about that "macro enclosing macro" a bit more with you 19:53
ab5tract moritz: no offense taken. my only point is that there are a lot of really great resources about a given topic out there
so i am already compiling this kind of resource for myself, and it would be weird not to put it on the web somewhere 19:54
19:54 telex left
masak vendethiel: my brain feels like a flock of pidgeons lately, but I'm always ready to talk about macros ;) 19:54
lizmat b2gills jnthn : eradicating check for ICU on parrot now
b2gills I just did a PR
vendethiel masak: I'm actually writing my essay (due tomorrow) and I don't even have half of it yet.. So, a bit later :P
19:54 Woodi_ joined
lizmat checks the PR 19:54
ab5tract and improving doc.perl6.org is definitely something i will do wherever i can, but i'm still getting my *-legs here ;) 19:55
dalek kudo/nom: 13eb6ea | (Brad Gilbert)++ | src/core/Str.pm:
Remove ICU check from Str

ICU is now mandatory
kudo/nom: ac7ee64 | lizmat++ | src/core/Str.pm:
Merge pull request #358 from b2gills/patch-2

Remove ICU check from Str
19:55 rurban_ joined
lizmat b2gills++ 19:55
vendethiel
.oO( run for the gills ! )
19:56
19:56 telex joined
vendethiel
.oO( run while the GIL runs )
19:56
19:56 Adriaaan left, Roonin joined, [particle]1 left, nine_ left, profan left, stux|RC-only left, Rounin left, cosimo_ left, salv0 left, Woodi left, Hor|zon left, rurban left
Kristien m: say Int === Int 19:57
camelia rakudo-moar 166cd3: OUTPUT«True␤»
ab5tract is also trying to document all the code in Terminal::Print for a github.io page when it is released
b2gills I should have picked a better nick back in 90's. especially since my name only has one 'l' not 2
( my last name I should say )
Kristien m: role A[::T] { }; say A[Int] === A[Int]; say A[Str] === A[Int]
camelia rakudo-moar 166cd3: OUTPUT«True␤False␤»
Kristien m: role A[$x] { }; say A[42] === A[42]; say A[42] === A[43] 19:58
camelia rakudo-moar 166cd3: OUTPUT«True␤True␤»
lizmat m: role A[$x] { }; say A[42] === A[42]; say A[42] === A[43.2]
camelia rakudo-moar 166cd3: OUTPUT«True␤False␤»
19:58 salv0 joined
Kristien m: role A[$x] { }; say A[42] === A[42]; say A[42] === A[Int] 19:58
camelia rakudo-moar 166cd3: OUTPUT«True␤True␤»
lizmat Kristien: it takes the type, not the value
Kristien I am disappoint. 19:59
jnthn I'm rather dubious about that behavior.
masak me too.
19:59 Mso150_t joined
Kristien Today I learned how quicksort works! 19:59
ab5tract hugme: hug b2gills # my 90's nick brother 20:00
hugme hugs b2gills
ab5tract that's a YAPAE, front and center
20:00 Hor|zon joined
jnthn I dunno how it comes out with it :) 20:00
vendethiel YAPAE?
20:00 Mso150 left
PerlJam S99:YAPAE 20:01
synopsebot Link: perlcabal.org/syn/S99.html#YAPAE
jnthn m: role A[$x] { }; say A[42].WHICH; say A[Int].WHICH
camelia rakudo-moar 166cd3: OUTPUT«A[Int]␤A[Int]␤»
jnthn Yeah, that's rather off.
vendethiel eh :P
vendethiel is glad to see this is going to get fixed at some point
jnthn Yeah, it's rather closely related to the parametrics stuff I'm already doing :) 20:02
vendethiel I guess so
Kristien Also, why can classes not be parameterised?
jnthn Because they're mutable. 20:03
vendethiel m: role R[::T]{...}; role R[Int]{our sub ret{Str}}; role R[Str]{our sub ret{Int}}; {Int sub foo(::T $x --> R[T].ret){...} #jnthn: could that ever work?
camelia rakudo-moar 166cd3: OUTPUT«===SORRY!=== Error while compiling /tmp/RBhYmwNzUn␤Two terms in a row␤at /tmp/RBhYmwNzUn:1␤------> }}; role R[Str]{our sub ret{Int}}; {Int ⏏sub foo(::T $x --> R[T].ret){...} #jnthn␤ expecting any of:␤ …»
masak mutable in the `augment` sense?
jnthn masak: Yes.
vendethiel m: role R[::T]{...}; role R[Int]{our sub ret{Str}}; role R[Str]{our sub ret{Int}}; sub foo(::T $x --> R[T].ret){...} #jnthn: could that ever work?
camelia rakudo-moar 166cd3: OUTPUT«===SORRY!=== Error while compiling /tmp/jJ6B7OKOdV␤Missing block␤at /tmp/jJ6B7OKOdV:1␤------> r sub ret{Int}}; sub foo(::T $x --> R[T]⏏.ret){...} #jnthn: could that ever work?␤»
Kristien I see.
masak jnthn: I'm not sure I see the conflict -- could you spell it out for me? 20:04
jnthn vendethiel: I'm confused; you seem to be trying to call a sub using method syntax? Which not just method ret {Int} ?
20:04 darutoko left
vendethiel jnthn: I mostly use "method" when I want it to be an on instance, but I should be using ^foo here 20:05
jnthn: considering what we spoke of last time, it seems to me `class A[::T]{sub x of T{}}` can't work because T doesn't exist, it that wrong?
is that*
skids Kristien: I spent a while a few weeks ago mulling over what sort algs were easily parallel and also would allow outputing the front end of the list while the back was still being sorted without breaking the parrallelism. Answer was "probably cubesort is worth a deep look versus status quo of mergesort"
yoleaux 06:21Z <raydiak> skids: thank you very much skids++, your help seems to have solved my problem: github.com/raydiak/Image-PNG-Porta...c85471624d
Kristien skids I don't know anything about algorithms. 20:06
jnthn masak: Instantiating a generic thing means you copy it and "fill in" the type variables with the real types.
Kristien The only algorithms I know how to implement as of now are quicksort and linear search.
skids Heapsort is a bit mind twisting.
Kristien Whenever I try to implement binary search I end up with off-by-one errors and I give up and implement linear search instead.
20:06 IllvilJa left
vendethiel considers monkey typing a misfeature, considering the number of hours he's lost trying to debug ruby, with stacks all over the place 20:07
masak Kristien: wow, then you have a treat in front of you!
Kristien: I'd look at BFS and DFS next -- they're pretty easy.
jnthn Kristien: Good news: if you want to implement SSA (which I think you mentioned the other day) you soon get to learn post-order traversal and how to compute dominance frontiers. ;)
Kristien what is a dominance frontier 20:08
vendethiel indeed!
Kristien Oh that.
I'll just use an existing library with graph algorithms
moritz how boring.
vendethiel *g* 20:09
Kristien Or hell even Neo4j if I have to.
vendethiel ewww
jnthn Kristien: See graph.c in the MoarVM source if you decide to implement it; it refs a couple of papers that you can nab good algos from. :)
Kristien Distributed Parallel Cloud Optimising Compiler™!
vendethiel Kristien: is it web scale? 20:10
Kristien C :(
vendethiel tried another dive in moarvm's source lately, but was still a bit lost everywhere
20:10 profan joined
jnthn Kristien: Yeah, but you only have to read the comment at the top of the file to find the URLs of the PDFs it mentions :) 20:10
Kristien OK
Actually, I implemented SSA once, except without phi instructions. 20:11
Since I just compiled conditional expressions to function calls :P
20:12 espadrine joined 20:13 IllvilJa joined
masak Kristien: function calls? passing an expression and two blocks? 20:13
Kristien yeah :D
jnthn Cheating is technique... :P
raydiak good afternoon #perl6...to quickly build a 0-filled CArray, I malloc some memory, memset it, then nativecast to CArray...any reason any of that might be a bad idea? 20:14
Kristien loops were similar
20:14 BigBear joined
masak Kristien: that's cute. 20:14
Kristien and lambdas closed over everything in scope, even variables that were not used
japhb .tell andreoss See irclog.perlgeek.de/perl6/2015-01-29#i_10026518 and thereabouts. Let me know if you have questions. 20:15
yoleaux japhb: I'll pass your message to andreoss.
Kristien but the compiler did generate correct Lua code that produced the correct result, so I was quite happy :D
IIRC it even did constant folding and elimination of some referentially transparent expressions 20:17
ab5tract m: my sub sum($n) { [+] ^$n }; say sum(41); # this one's still good, i believe www.dlugosz.com/Perl6/web/addn_romp.html 20:21
camelia rakudo-moar 166cd3: OUTPUT«820␤»
Kristien ab5tract: pfft, O(n) algorithm 20:23
nine raydiak: I guess you could use calloc instead ;)
raydiak okay different questions...when I nativecast the pointer from malloc to a CArray, is nativecall smart enough to know it shouldn't free that array itself? what happens when the array grows? 20:24
heh thanks nine++, that'd be smart...I'm not a C guy, mostly :) 20:25
ab5tract Kristien: i've always been more into concision than hotrodding, myself
blogs.perl.org/users/ovid/2013/02/r...ained.html
moritz some of the #?if parrot blocks in BOOTSTRAP.nqp are truely frightening 20:26
ab5tract Kristien: you might be interested in that post
moritz which have unbalanced numbers of brackets, for example 20:27
nine raydiak: as far as I understand, rakudo will not free that array. It would if rakudo was the one to allocate it.
raydiak: inferring that from "By contrast, when a C library returns an array to you, then the memory can not be managed by Zavolaj"
20:27 Mso150_t left
timotimo aye, CArray and such are managed by our garbage collector 20:28
(... right?)
20:28 Possum left
raydiak okay, thanks...I assume that should mean it also won't attempt to move it when I add elements (guessing) 20:29
20:30 Possum joined
timotimo how did that fix work that makes stuff like / $s / faster? 20:31
so that we don't have to check $s for changes again and again? or something like that?
raydiak is there something not rakudo-specific I should be using instead of DESTROY to call free() in? right now I just document "calling .write calls .free unless you ask it not to, in which case you have to call .free yourself", but that's less than optimal for a user-facing P6 API 20:32
nine raydiak: what's wrong with DESTROY? 20:33
raydiak nine: it doesn't exist in the synopses, for one...saw a commit message a while ago referring to it as a "fossil"
so I guessed it's not a part of P6 itself any more, but rakudo internals specifically 20:34
20:34 bjz left
moritz raydiak: DESTROY is fine, we just need to spec it again 20:35
raydiak: it was over-eagerly removed from the specs
lizmat I'm still not happy with the name
it gives the wrong idea to people coming from Perl 5
masak a lot of things have changed their meaning slightly (or not-so-slightly) compared to Perl 5.
`bless`, for example. 20:36
nine lizmat: but we also failed to find any better name so far.
raydiak ah wonderful, I'll use it for now then...not having a spec...is it method or submethod? anything else I need to know to use it?
masak DESTROY fills the same role in Perl 6, it's just the GC that works differently. which people will need to learn anyway.
nine raydiak: I use it as a method.
skids gist.github.com/skids/31ff6c7bfad1fe22b964 # Kristien mentioned maybe looking at module naming suggestions. I never posted this way back when I did years ago, because I wasn't very happy with it, but food for thought I guess. 20:37
nine raydiak: DESTROY does exactly what you think it does. It's just that it's called at an unpredictable time.
masak raydiak: it's a submethod, like BUILD. it does not inherit.
dalek ecs: 32d0ad7 | lizmat++ | S (2 files):
Revert "Get rid of DESTROY fossils"

This reverts commit 56c5710c527cf6a0e9df71f9ed06930e594ea453.
raydiak nine: so it isn't like BUILD where a DESTROYALL calls each submethod DESTROY in most-to-least derived order or something, then?
20:38 Mso150 joined
raydiak thanks masak++ 20:38
woolfy1 tadzik++ for general awesomeness (he knows what I mean)
jnthn Looking at the spec that just got put back in place, it looks like there should be a DESTROYALL
vendethiel tadzik++ :)
moritz woolfy1: I don't know the specific instance, but panda alone would warrant a tadzik++ for general awesomeness :-) 20:39
woolfy1 moritz++ for this nice comment, with which I completely agree
timotimo m: say nqp::istrue("")
camelia rakudo-moar ac7ee6: OUTPUT«0␤»
timotimo m: say nqp::istrue("a")
camelia rakudo-moar ac7ee6: OUTPUT«1␤»
timotimo m: say nqp::istrue(Str)
camelia rakudo-moar ac7ee6: OUTPUT«0␤»
timotimo nqp::istrue($a_string) should be equivalent to !(nqp::len($a_string) < 1), right? 20:40
lizmat I'm leaving changes to the DESTROY spec as an exercise
raydiak jnthn: how hard would it be for nativecall to support zero-filling a CArray (on creation or after doesn't matter in this case)
20:41 grondilu joined
tadzik :) 20:41
grondilu m: say "wtf" if 7 == (5 or 7);'
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!=== Error while compiling /tmp/0YOHt49_0_␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/0YOHt49_0_:1␤------> say "wtf" if 7 == (5 or 7);'⏏<EOL>␤ expecting any of:␤…»
grondilu m: say "wtf" if 7 == (5 or 7); 20:42
camelia ( no output )
jnthn lizmat: Well, the exercise might also be changing the impl to match the spec ;)
masak raydiak: it doesn't inherit, because each class's DESTROY takes care of that class's own concerns. I haven't seen it stated as such, but submethods and the notion of "infrastructural methods" were basically created to make BUILD and DESTROY work as intended.
ab5tract m: say "wtf" if 7 ~~ (5 or 7); 20:43
camelia ( no output )
jnthn raydiak: Are you suggesting it as a defualt, or providing an option to do it?
raydiak: If the latter, I guess you can already do it with memset... ;)
lizmat jnthn: it might: I'll see it if/when it gets there :-)
b2gills I wonder what the output of IntStr.^mro should be
skids m: say (5 or 7)
camelia rakudo-moar ac7ee6: OUTPUT«5␤»
lizmat b2gills: there, in a nutshell, is the reason we don't have IntStr yet, I think
jnthn m: class IntStr is Int is Str { }; say IntStr.^mro
camelia rakudo-moar ac7ee6: OUTPUT«(IntStr) (Int) (Str) (Cool) (Any) (Mu)␤»
moritz m: class IntStr is Int is Str { }; say IntStr.^mro
camelia rakudo-moar ac7ee6: OUTPUT«(IntStr) (Int) (Str) (Cool) (Any) (Mu)␤»
moritz jnthn++ # faster than me 20:44
jnthn Copycat!
ab5tract m: say "wtf" if 7 ~~ (5 | 7);
jnthn :P
camelia rakudo-moar ac7ee6: OUTPUT«wtf␤»
20:44 Mso150_f joined
b2gills I've been doing some tests for IntStr et all, that's why I'm asking 20:44
raydiak jnthn: is there a way to use memset directly on a carray then, instead of malloc -> memset -> cast?
masak m: say(5 or "I kid you not, I will drop an ant farm into the Sargasso Sea")
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!=== Error while compiling /tmp/VppzNMSfai␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/VppzNMSfai:1␤------> say(5 ⏏or "I kid you not, I will drop an ant fa␤ expecti…»
masak huh. unexpected.
japhb raydiak: Wearing my paranoid hat, I'd say it should be actively difficult to allocate an uninitialized array, so a new CArray of a given size should be zeroed. (You should be able to copy or reuse data from an existing memory block on purpose, of course. It's just the allocation shouldn't get you the dregs of previous frees.) 20:45
b2gills m: say 'wow' if 7 == 5 | 7
camelia rakudo-moar ac7ee6: OUTPUT«wow␤»
ab5tract m: say "wtf" if 7.so ~~ (5 or 7);
camelia ( no output )
masak I guess `or` has to be at statement level.
m: say (5 or "I kid you not, I will drop an ant farm into the Sargasso Sea")
camelia rakudo-moar ac7ee6: OUTPUT«5␤»
Kristien m: say (5 or 7)
camelia rakudo-moar ac7ee6: OUTPUT«5␤»
raydiak jnthn: b/c having to build it myself w/malloc just b/c I can't cast the CArray to an OpaquePointer to pass to memset seems goofy
20:45 Mso150 left
raydiak japhb: aye I kinda expected it to be default, but it ain't 20:46
jnthn raydiak: I thought we could cast CArray to OpaquePointer these days?
japhb: Well, CArray does suggest C semantics. ;) But mebbe we shouldn't take that quite so literally :)
raydiak star: use NativeCall; nativecast OpaquePointer, CArray.new
camelia star-p 2014.12: OUTPUT«CArray representation expects an 'of' method, specifying the element type␤ in method bless at gen/parrot/CORE.setting:935␤ in method new at gen/parrot/CORE.setting:925␤ in method new at gen/parrot/CORE.setting:923␤ in block <unit> at /tmp/tmpfile:1…»
..star-m 2014.12: OUTPUT«Native call cast expected object with CPointer or CStruct representation, but got something else␤ in sub nativecast at /home/camelia/rakudo-star-2014.12/install/languages/perl6/lib/NativeCall.pm6:346␤ in block <unit> at /tmp/tmpfile:1␤␤»
b2gills I think there should be an option to have CArray not initialize it's contents for speed, but by default to the safe thing 20:47
raydiak star: use NativeCall; nativecast OpaquePointer, CArray[uint8].new
camelia star-m 2014.12: OUTPUT«Native call cast expected object with CPointer or CStruct representation, but got something else␤ in sub nativecast at /home/camelia/rakudo-star-2014.12/install/languages/perl6/lib/NativeCall.pm6:346␤ in block <unit> at /tmp/tmpfile:1␤␤»
..star-p 2014.12: OUTPUT«Native call expected object with CPointer representation, but got something else␤ in sub nativecast at /home/camelia/rakudo-star-2014.12/install/lib/parrot/6.10.0/languages/perl6/lib/NativeCall.pm6:348␤ in block <unit> at /tmp/tmpfile:1␤␤»
japhb jnthn: What b2gills said. We should flip some C defaults for general "good security practices" behavior. 20:48
b2gills ( on OpenBSD they always initialize memory if you use malloc )
raydiak if I could do that, I wouldn't need malloc or free or exposing my users to manual memory management (though I have BUILD now, so that one is solved)
jnthn OK, then file a ticket (or a patch ;)) 20:49
japhb b2gills: As is proper. :-) 20:50
raydiak well I considered a patch, thus the "how hard would it be..." that I started with :)
jnthn raydiak: I suspect it's a matter of patching src/6model/reprs/CArray.c in MoarVM, and on JVM it may be in a similar place. 20:51
b2gills I would also like to see Capsicum duckduckgo.com/?q=capsicum+freebsd implemented ( it's mostly a few ifdefs from what I here )
japhb There's another reason for having "allocate zero-filled" as an easily-accessed primitive: There are optimizations all the way down the stack to the hardware on some platforms for that operation.
b2gills Capsicum is a way of telling the OS that "I no longer want the ability to do X" 20:53
raydiak thanks jnthn, I'll look it over and see if it's not over my head :)
20:54 bjz joined, Mso150 joined
raydiak btw this is all to work around the fact that you just *can't* quickly turn a large blob into a CArray or vice versa from P6 code yet, so I just use a CArray directly all over now, to avoid the conversion 20:55
20:55 Mso150_f left
raydiak now if it just didn't segfault when precompiled...but tracking that down is on today's list 20:57
timotimo it's something we're hoping to get with native/shaped array, right? 20:59
FROGGS_ I think so
jnthn Yeah, it's in that space. 21:00
I'll be digging into natives stuff most likley next week. 21:01
*likely
timotimo having that will also make OpenGL bindings much more comfortable than what we could do right now 21:02
not that i know of anybody working on any ogl bindings actively
21:02 xfix left 21:03 xfix joined 21:04 bjz left
muraiki has anyone tried p6 on openbsd? 21:04
21:04 Mso150 left 21:05 BigBear left
adu shaped? 21:05
21:05 pmurias joined
bartolin muraiki: I did last september. at least I built rakudo.moar and rakudo.parrot and had clean spectests for both 21:06
muraiki bartolin: thanks!
21:06 andreoss left, xfix left
japhb timotimo: If you had talked to me half a decade ago .... 21:07
timotimo that's when you were less busy? :) 21:08
itz_ No such method 'ast' for invocant of type 'Any' in sub from-json at lib/JSON/Tiny.pm:51
timotimo itz_: match failed with a very bad error message
21:09 bronco_creek left
itz_ hmm maybe if I blow everything away 21:09
FROGGS_ m: say from-json 'hurz' 21:14
camelia rakudo-moar ac7ee6: OUTPUT«No such method 'ast' for invocant of type 'Any'␤ in sub from-json at src/gen/m-CORE.setting:24554␤ in block <unit> at /tmp/R1k64CXUvk:1␤␤»
moritz star-m: say from-json 'hurz' 21:15
camelia star-m 2014.12: OUTPUT«No such method 'ast' for invocant of type 'Any'␤ in sub from-json at src/gen/m-CORE.setting:23726␤ in block <unit> at /tmp/hZFJscwxQc:1␤␤»
jnthn
.oO( that error reporting megahurz... )
Mebbe the grammar wants a || <.panic: ...> at the end of its TOP or something :) 21:16
b2gills IntStr test gist.github.com/b2gills/8f942741303f7758c6ed 21:17
I don't think it can be made workable without cheating 21:18
21:18 mvuets left
b2gills ( The only winning strategy is not to play ) 21:18
dalek ecs/newio: 98f9b49 | lizmat++ | S32-setting-library/IO.pod:
Some more work on S32/IO, WIP
21:19
bartolin I looked at RT #123597 and wondered how subst-mutate is supposed to work with scalars of type Int (or Numeric). should numerics be stringified before subst-mutate is applied or should subst-mutate give an error with non-strings?
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123597
jnthn b2gills: Hmm, that looks curious... 21:20
bartolin in case someone wants to take a closer look: would those tests make sense: gist.github.com/usev6/19baafe3390a274d87d0 21:21
jnthn b2gills: I think the IntStr and so on instances need assembling using nqp ops, but they already should have a Int and a Str field
b2gills I think the biggest hurdle is trying to have them do the right thing in multi methods/subs 21:22
dalek kudo/newio: f1ad4e5 | lizmat++ | src/core/IO.pm:
MOVE-PATH should only attempt to move files
kudo/newio: 8787cc4 | lizmat++ | src/core/IO/Pathy.pm:
Fix deprecation in .gist
kudo/newio: fa4be3e | lizmat++ | src/core/io_operators.pm:
Bring some io ops up to spec
kudo/newio: 13eb6ea | (Brad Gilbert)++ | src/core/Str.pm:
Remove ICU check from Str

ICU is now mandatory
21:23
kudo/newio: ac7ee64 | lizmat++ | src/core/Str.pm:
Merge pull request #358 from b2gills/patch-2

Remove ICU check from Str
kudo/newio: db622c9 | lizmat++ | src/core/Str.pm:
Merge branch 'nom' into newio
lizmat b2gills: wouldn't it make more sense to create a Val role ? 21:26
21:27 raiph left
TimToady I don't see how that would help anything; if Int precedes Str in the mro it should do the right thing most of the time 21:27
21:29 bjz joined
TimToady we might usefully think about versions of Int and Str that compose nicely under MI though 21:29
21:31 rurban_ left
TimToady in other words, what would it take to let "class IntStr is Int is Str {}" actually work, and can it be done without sacrificing the efficiency of the current semi-native representations 21:33
b2gills lizmat: I tried that in an earlier attempt, but it might be possible
21:34 mvuets joined
raydiak \o/ hooray, this precomp problem gave itself up easily...looks like subtypes with a where clause segfault on assignment (guess the where clause doesn't get serialized) 21:35
jnthn TimToady: There's no deep reason why that can't work, as far as I know. 21:37
TimToady: If it doesn't already, it's a matter of debugging rather than something inherent in 6model design getting in the way. 21:38
TimToady though perhaps 'is Int is Str' is not sufficient to make MD pick Int over Str
jnthn No, that may be an issue
TimToady niecza had it further away via an extra role, iirc
(the Str part)
but same idea
21:39 grondilu left
TimToady I think was a DualVar role in there to make an appropriate constructor, since that could be problematic unless we guarantee all our value accessors have different names 21:40
*there was 21:41
anyway, just something to bear in mind with all the other 6pe thingies
21:41 Mouq joined
jnthn I think it's mostly orthogonal. 21:41
I already made it so nqp::unbox_[ins] can all work on the same object. 21:42
It's not like you have to pick one native you can unbox to.
TimToady we're supposed to be able to send different value sets to different parent constuctors anyway, though I don't think we implement that yet
Mouq .tell masak I took a minute to comment on github.com/masak/007/issues/13
yoleaux 28 Jan 2015 20:24Z <lizmat> Mouq: re your [0;0] autoviv patches: didn't you lose all adverb handling on there by accident?
Mouq: I'll pass your message to masak.
09:02Z <lizmat> Mouq: seems you're LoL patches broke t/spec/S02-types/multi_dimensional_array.t
Mouq Oh no
jnthn Yeah, that bit is NYI
Mouq Weird, I was sure spectested those patches too.. 21:43
jnthn Partly pending a re-work of BUILDALL, 'cus the current interpret-y approach is, while better than the previous introspecty approach, still sucking performance wise...
TimToady nod 21:44
raydiak m: my Any where {True} $foo; # is this supposed to work? the error is LTA either way
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤Type 'Any' is not declared␤at /tmp/MsmwwAkK1G:1␤------> my Any ⏏where {True} $foo; # is this supposed to␤Malformed my␤at /tmp/MsmwwAkK1G:1␤------> my Any ⏏where {True} $foo; #…»
21:44 bjz left
TimToady that message is LTA 21:45
jnthn I'd think the trait'd have to go after the variable
std: my Any where {True} $foo;
camelia std f9b7f55: OUTPUT«===SORRY!===␤Multiple prefix constraints not yet supported at /tmp/ZNyZBUbr2T line 1:␤------> my Any ⏏where {True} $foo;␤Malformed my at /tmp/ZNyZBUbr2T line 1:␤------> my Any ⏏where {True} $foo;…»
jnthn Hm, STD gets it better there.
raydiak is collecting bugs to report today, seems like 21:46
Mouq std: my Any $foo where {True}
camelia std f9b7f55: OUTPUT«ok 00:00 138m␤»
raydiak m: my Any $foo where True 21:47
camelia ( no output )
raydiak m: my Any $foo where ^3; $foo = 0; say $foo; $foo = 42; say $foo; 21:48
camelia rakudo-moar ac7ee6: OUTPUT«0␤42␤»
TimToady ignored
m: subset Tiny of Any where ^3; my Tiny $foo; $foo = 0; say $foo; $foo = 42; say $foo; 21:49
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤No such method 'name' for invocant of type 'NQPMu'␤»
21:50 kaare__ joined
TimToady cute 21:50
raydiak m: my Any $foo where 0 <= * < 3; $foo = 0; say $foo; $foo = 42; say $foo;
camelia rakudo-moar ac7ee6: OUTPUT«0␤42␤»
jnthn wtf... 21:51
m: subset Tiny of Any where ^3;
camelia ( no output )
raydiak m: subset Tiny where 0 <= * < 3; my Tiny $foo; $foo = 0; say $foo; $foo = 42; say $foo;
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
jnthn m: subset Tiny of Any where ^3; my Tiny $foo;
camelia ( no output )
jnthn m: subset Tiny of Any where ^3; my Tiny $foo; $foo = 0;
camelia ( no output )
jnthn m: subset Tiny of Any where ^3; my Tiny $foo; $foo = 0; say $foo; $foo = 42;
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤No such method 'name' for invocant of type 'NQPMu'␤»
jnthn m: subset Tiny of Any where ^3; my Tiny $foo; $foo = 0; say $foo;
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤No such method 'name' for invocant of type 'NQPMu'␤»
jnthn o.O 21:52
m: subset Tiny of Any where ^3; BEGIN { my Tiny $foo; $foo = 0; say $foo; }
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
raydiak btw it turns out my latest precomp problem is with any subset, not just ones with a where clause
jnthn m: subset Tiny of Any where ^3; BEGIN { my Tiny $foo; $foo = 0; }
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
jnthn m: subset Tiny of Any where ^3; BEGIN { my Tiny $foo; } 21:53
camelia ( no output )
jnthn Yeah, something's up there.
Mouq m: subset Tiny of Any where {$_ ~~ ^3}; my Tiny $foo; $foo = 0; say $foo; $foo = 42; say $foo; 21:54
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤Cannot look up attributes in a type object␤»
raydiak m: subset Tiny of Any where {say $_; $_ ~~ ^3}; my Tiny $foo; $foo = 0; 21:55
camelia rakudo-moar ac7ee6: OUTPUT«0␤»
raydiak ah, another heisenbug
TimToady he didn't try to say it 21:56
well, outside
m: subset Tiny of Any where {say $_; $_ ~~ ^3}; my Tiny $foo; $foo = 0; say $foo 21:57
camelia rakudo-moar ac7ee6: OUTPUT«(Obsolete)␤===SORRY!===␤Cannot look up attributes in a type object␤»
raydiak o i c
TimToady so the say inside doesn't really disable the bug
raydiak ... (Obsolete) ? 21:59
21:59 Roonin left, Kristien left
jnthn Uh...yes, what on *earth*... 22:00
TimToady ooh, it's a klew
22:01 skids left
jnthn Please RT this. I really need to pack stuff so I can sleep enough before the flight... :) 22:01
raydiak absolutely, will do
jnthn raydiak++ 22:02
raydiak (and I'll hold off on the precomp bugreport, b/c it's likely this same issue)
22:05 FROGGS_ left 22:06 FROGGS_ joined 22:12 dolmen joined 22:13 mvuets left
masak as part of writing pie-in-the-sky issues today for 007, I came up with the keyword `defer`, which I'd like to share here. 22:14
yoleaux 21:42Z <Mouq> masak: I took a minute to comment on github.com/masak/007/issues/13
masak (disclaimer: I am not proposing we spec anything.)
Mouq++ # just saw it -- will read it in a moment
(this one is about another issue) 22:15
`defer` has the following semantics: you've defined `&foo` in an outer scope and then shadowed it in an inner scope. `defer` in the inner scope's `&foo` will shut down the ongoing call to the inner `&foo` and call the outer `&foo` instead. 22:16
(I stipulated this because it would help 007 to partially override syntax)
think of it as a `callsame` but it works purely on the lexical lookup chain. 22:17
masak reads Mouq++'s comment
Mouq: first off, `amb` taking a statementlist is a very good idea. 22:18
22:19 kaare__ is now known as kaare_
masak Mouq: second -- yes, it's pretty clear to me too that `x` has to be added at parse time. that's how the rest of the compiler works. we should probably provide a very convenient "declare this thing" compiler hook for macro writers. 22:20
masak finds Mouq's comment intriguing and wants to subscribe to Mouq's newsletter 22:21
Mouq: I'll have to mull over your whole comment. I'll be sure to write up a reply once I have. 22:23
Mouq :) I'm glad it was thought-provoking. Awesome, thanks! I'm can't really talk much right now anyway 22:24
22:28 Kristien joined
masak me neither ;) 22:31
22:33 broquaint left 22:34 broquaint joined
Kristien m: any(any(1, 2), any(3, 4), 5).perl.say 22:37
camelia rakudo-moar ac7ee6: OUTPUT«any(any(1, 2), any(3, 4), 5)␤»
Kristien good.
m: say so any(any(1, 2), any(3, 4), 5) 22:38
camelia rakudo-moar ac7ee6: OUTPUT«True␤»
Kristien Duh.
m: say 2 * any(any(1, 2), any(3, 4), 5)
camelia rakudo-moar ac7ee6: OUTPUT«any(any(2, 4), any(6, 8), 10)␤»
Kristien Awesome.
m: multi sub nth-fib(Int $x where * == 0 | 1) { 1 }; multi sub nth-fib(Int $x) { nth-fib($x - 2) + nth-fib($x - 1) }; (0..10).map(&nth-fib).say 22:42
camelia rakudo-moar ac7ee6: OUTPUT«1 1 2 3 5 8 13 21 34 55 89␤»
Kristien Absolutely fascinating. 22:44
jnthn yeah but such a waste of chars... (1, 1, *+* ... *)[^11] :P 22:45
22:45 Alina-malina left
jercos m: sub nth-fib(Int $x) {my \phi = (1 + 5.sqrt)/2;(phi ** $x - (1-phi) ** $x)/5.sqrt}; (0^..11).map(&nth-fib).say 22:46
camelia rakudo-moar ac7ee6: OUTPUT«1 1 2 3 5 8 13 21 34 55 89␤»
Kristien I want Vim to autocomplete \phi to φ 22:47
masak Kristien: define a keybinding. 22:48
Kristien Not just for \phi
masak define some more.
Kristien But for many more LaTeX things.
I don't like &&, gimme \wedge already!
masak go crazy with keybindings. they're great.
22:49 Mouq left
Kristien I can turn Perl into APL! 22:49
masak .oO( I may not agree with your desire to turn Perl into APL, but I will defend to the death your right to do so. -- Voltaire ) 22:50
vendethiel
.oO( Please don't it, though, a quote from the internet is telling you not to - Winston Churchill )
22:53
dalek kudo-star-daily: 7d0b57c | coke++ | log/ (9 files):
today (automated commit)
22:56
rl6-roast-data: 4601fb1 | coke++ | / (5 files):
today (automated commit)
22:57 IllvilJa left
raydiak Kristien: if you're interested in latex input beyond vim, there is a latex table available for the ibus table IME (ibus-table-latex in my distro) 22:57
Kristien :v 22:58
Do I have to recompile my kernel for that?
jercos m: sub nth-fib(Int $x) {my \phi=5.sqrt.succ/2;([-] phi,1-phi X**$x)/5.sqrt}; (0^..11).map(&nth-fib).say
camelia rakudo-moar ac7ee6: OUTPUT«1 1 2 3 5 8 13 21 34 55 89␤»
Kristien Since I lost my kernel configuration.
jercos now even confusinger :D
raydiak Kristien: likely not, but idk...for me it was just apt-get 22:59
Kristien My favourite ways of getting the nth fibonacci number: use Math; say Math::Fibonacci[$n]
s/F/f/
maybe ( ) instead of [ ]
Kristien never actually had to use fibonacci numbers 23:03
Kristien should implement Fibonacci search 23:04
raydiak m: my @f = 1, 1, *+* ... *; say @f[^10]; # I know most of us have seen this one before, but I still haven't gotten over the sheer awesomeness :)
camelia rakudo-moar ac7ee6: OUTPUT«1 1 2 3 5 8 13 21 34 55␤»
raydiak oh I see...nth 23:06
jercos and now for an amusingly stupid trick...
23:06 adu left
jercos m: sub nth-fib(Int $x) {((5.sqrt.succ/2)**$x/5.sqrt+0.5).floor};sub fibth-n(Int $x) {($x * 5.sqrt + 0.5).log(5.sqrt.succ/2).floor};(0^..12).map(&nth-fib).map(&fibth-n).say 23:06
camelia rakudo-moar ac7ee6: OUTPUT«2 2 3 4 5 6 7 8 9 10 11 12␤»
masak \o/
japhb I find it interesting that the versions without rounding were getting exact results anyway. 23:08
jercos The version without rounding is an exact formula. the rounding version shaves a few characters off. 23:09
Using floor in math sorta feels like cheating :p
japhb jercos: I mean because floating point
jercos Ah, I suppose so. 23:10
23:11 Kristien left
jercos m: (1.0, 1/*.succ ... *)[^10].map(*.nude[0]) 23:12
camelia ( no output )
jercos m: (1.0, 1/*.succ ... *)[^10].map(*.nude[0]).say
camelia rakudo-moar ac7ee6: OUTPUT«1 1 2 3 5 8 13 21 34 55␤»
jercos amusing rational abuse, no? :)
(that series converges to phi, so it's sort of the inverse of using phi to compute fibonacci numbers...) 23:15
japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub nth-fib(Int $x) { (φ ** $x - (1-φ) ** $x)/√5 }; ^11.map(&nth-fib).say 23:19
camelia rakudo-moar ac7ee6: OUTPUT«89␤»
japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub nth-fib(Int $x) { (φ ** $x - (1-φ) ** $x)/√5 }; (^11).map(&nth-fib).say
camelia rakudo-moar ac7ee6: OUTPUT«0 1 1 2 3 5 8 13 21 34 55␤»
japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub nth-fib(Int \x) { (φ**x - (1-φ)**x)/√5 }; (^11).map(&nth-fib).say 23:20
camelia rakudo-moar ac7ee6: OUTPUT«0 1 1 2 3 5 8 13 21 34 55␤»
23:20 gfldex left
japhb Looking better ... 23:21
Now I have an urge to superscript the x somehow 23:22
ab5tract japhb: nicely done :) 23:23
jercos well from the land of things that *don't* work... 23:26
m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub postfix:<ⁱ>(Numeric $n) {$*i ** $n}; sub nth-fib(Int $*i) { (φⁱ - (1-φ)ⁱ)/√5 }; (^11).map(&nth-fib).say
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!=== Error while compiling /tmp/l7EhJzw7wz␤Undeclared routine:␤ φⁱ used at line 1␤␤»
jercos >.> 23:27
japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub nth-fib(Int \x) { my &postfix:<ˣ> := * ** x; (φˣ - (1-φ)ˣ)/√5 }; (^11).map(&nth-fib).say 23:28
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!=== Error while compiling /tmp/ayP0DrVzjm␤Undeclared routine:␤ φˣ used at line 1␤␤»
japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub nth-fib(Int \x) { my &postfix:<ˣ> := * ** x; (φ\ˣ - (1-φ)ˣ)/√5 }; (^11).map(&nth-fib).say
camelia rakudo-moar ac7ee6: OUTPUT«0 1 1 2 3 5 8 13 21 34 55␤»
japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; my &postfix:<ˣ> := * ** $*x; sub nth-fib(Int $*x) { (φ\ˣ - (1-φ)ˣ)/√5 }; (^11).map(&nth-fib).say 23:30
camelia rakudo-moar ac7ee6: OUTPUT«0 1 1 2 3 5 8 13 21 34 55␤»
23:30 Alina-malina joined
japhb \o/ 23:30
Although yeah, probably i is better
jercos very nice :)
23:31 IllvilJa joined
raydiak m: sub root ($n, $r where * != 0) { $n ** (1/$r) }; say root 27, 3 # any reason we don't have something like this in core? 23:32
camelia rakudo-moar ac7ee6: OUTPUT«3␤»
dolmen m: :{ ^10 => 42 }.pairs[0].gist 23:33
camelia ( no output )
dolmen m: { 1 => 42 }.pairs[0].gist 23:34
camelia ( no output )
jercos japhb: I would note that the same trick can be used for √, my &prefix:<√> := *.sqrt; to save a few chars. That's getting somewhat silly though :)
raydiak I mean if you aren't a mathy person who knows the identity, you end up with $n.roots($r).first(!*.im).re.ARGH
dolmen m: say { 1 => 42 }.pairs[0].gist
camelia rakudo-moar ac7ee6: OUTPUT«1 => 42␤»
dolmen m: say :{ ^10 => 42 }.pairs[0].gist
camelia rakudo-moar ac7ee6: OUTPUT«0..^10 => 42␤»
jercos raydiak: perhaps much like .log($base), a .root($base) method? 23:35
japhb jercos: Yeah, though still fun
:-)
raydiak jercos: yeah...something that works like roots but just gives you the one Real answer 23:36
m: say roots 27, 3
camelia rakudo-moar ac7ee6: OUTPUT«3+0i -1.5+2.59807621135332i -1.5-2.59807621135332i␤»
japhb m: my &prefix:<√> := *.sqrt; my &postfix:<ⁱ> := * ** $*i; constant φ = (1+√5)/2; sub nth-fib($*i) { (φ\ⁱ - (1-φ)ⁱ)/√5 }; (^11).map(&nth-fib).say 23:38
camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Uninstantiable, cs = 0)␤»
japhb Woah
23:39 kjs_ joined
masak quiz of the day: what do people use to end their heredocs? 23:40
23:40 kjs_ left
masak I know 'EOF' is practically the standard. 23:40
I see some people use the "thing that describes the document": like 'HTML' 23:41
I've been known to use a full stop ('.') sometimes.
jercos masak: YALL_COME_BACK_NOW_YHEAR is fully functional
23:41 dolmen left
jercos But no yeah I like the full stop, especially for composing email bodies. 23:42
23:42 skids joined
masak right. it has some prior art in SMTP, I guess. 23:42
geekosaur and some other protocols of the same vintage that have mostly fallen by the wayside by now 23:44
jercos END, EOF, __DATA__ if I'm feeling like confusing perlfolk.
raydiak uses bracket quoting more than heredocs...so "]]]" :)
geekosaur does tend to use EOF for one-offs but for multiple here docs will generally give them meaningful names 23:45
(in part because of habit from ancient shell bugs when you used the same heredoc terminator twice)
japhb uses meaningful enders like HEADER, BLOCK, and FOOTER
m: sub prefix:<√> { $^n.sqrt }; my &postfix:<ⁿ> := * ** $*n; constant φ = (1+√5)/2; sub nth-fib($*n) { (φ\ⁿ - (1-φ)ⁿ)/√5 }; (^11).map(&nth-fib).say 23:46
camelia rakudo-moar ac7ee6: OUTPUT«0 1 1 2 3 5 8 13 21 34 55␤»
japhb jercos: A little more magic
^^
jercos For something with no spaces, you can do a lot with <<"" in e.g., bash
heredoc ends at the first empty line
erm, no *vertical* spaces rather
japhb Strangely, it's the definition of the square root prefix using your method that blows up with the REPR: Uninstantiable error
jercos Which is to say, no empty lines
japhb I was able to use $^n though 23:47
jercos hrm 23:48
m: my &prefix:<test> := *.say;test "Hello"
camelia rakudo-moar ac7ee6: OUTPUT«Hello␤»
jercos shrugs
That general form clearly isn't entirely broken.
23:49 virtualsue left
raydiak .tell jnthn #123700 23:49
yoleaux raydiak: I'll pass your message to jnthn.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123700
23:50 adu joined
japhb m: my &prefix:<√> := *.sqrt 23:50
camelia ( no output )
japhb m: my &prefix:<√> := *.sqrt; √5 23:51
camelia ( no output )
japhb m: my &prefix:<√> := *.sqrt; say √5
camelia rakudo-moar ac7ee6: OUTPUT«2.23606797749979␤»
japhb WTH?
jercos m: my &prefix:<√> := *.sqrt; say 1/√5
camelia rakudo-moar ac7ee6: OUTPUT«0.447213595499958␤»
jercos m: my &prefix:<√> := *.sqrt; sub test{ 1/√5 }; say test 23:52
camelia rakudo-moar ac7ee6: OUTPUT«0.447213595499958␤»
japhb It isn't just the *.sqrt form that is broken in the original line. If you do my &prefix:<√> = { $^n.sqrt }; It still breaks. 23:54
Something gets very confused.
jercos Yeah I mean... I'm not sure exactly what that error even means like that
m: Numeric()
camelia rakudo-moar ac7ee6: OUTPUT«Cannot invoke this object (REPR: Uninstantiable, cs = 0)␤ in block <unit> at /tmp/PG6t4Mu0P_:1␤␤»
jercos But there's no ===SORRY!===, and there is a line number... So presumably this is actually invoking code elsewhere that's producing that issue? 23:55
japhb That's one heck of a golf, though 23:58