»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:01 ClarusCogitatio joined
masak wollmers: `unshift %bMatches{$_} for @b[$bmin..$bmax]; $index += $bmax - $bmin + 1;` 00:04
00:06 virtualsue left 00:12 ClarusCogitatio left
wollmers masak: Why the +1? 00:14
00:22 erkan left
masak because a range that includes both its endpoints will contain one element more than the difference between them. 00:23
00:23 erkan joined, erkan left, erkan joined
masak m: say (10..30).elems 00:24
camelia rakudo-moar 315ec6: OUTPUT«21␤»
wollmers m: my @b = <a b a b>;my %bM;my $i;unshift %bM{$_},$i++ for @b;%bM.perl;
camelia ( no output )
wollmers m: my @b = <a b a b>;my %bM;my $i;unshift %bM{$_},$i++ for @b;%bM.perl.say; 00:25
camelia rakudo-moar 315ec6: OUTPUT«("a" => [2, 0], "b" => [3, 1]).hash␤»
masak oh, right, you actually want to unshift the $i++. sorry :)
wollmers masak: yea. I am sure, there is something more elegant in P6 00:26
masak not so sure.
wollmers Hmm. It goes through a list, and stores the positions of the keys as values. 00:31
00:33 raiph left 00:36 thou joined 00:41 thou left
wollmers masak: can I combine this in a hash: <a b a b>.kv 00:41
m: <a b a b>.kv.say
camelia rakudo-moar 315ec6: OUTPUT«0 a 1 b 2 a 3 b␤»
masak m: say <a b a b>.pairs.perl 00:42
camelia rakudo-moar 315ec6: OUTPUT«(0 => "a", 1 => "b", 2 => "a", 3 => "b").list␤»
masak m: say <a b a b>.pairs.classify(*.value).perl
camelia rakudo-moar 315ec6: OUTPUT«("b" => [1 => "b", 3 => "b"], "a" => [0 => "a", 2 => "a"]).hash␤»
masak m: say <a b a b>.pairs.classify(*.value).map({; .key => [.value.keys]}).perl 00:43
camelia rakudo-moar 315ec6: OUTPUT«("a" => [0, 1], "b" => [0, 1]).list␤»
wollmers But with ethe letters as key, and the values as arrays.
masak \o/
01:00 wollmers left 01:02 slavik left
timotimo actually 01:03
m: say ((my %).push: <a b a b>.pairs).perl
camelia rakudo-moar 315ec6: OUTPUT«("1" => "b", "0" => "a", "2" => "a", "3" => "b").hash␤»
timotimo ah 01:04
m: say ((my %).push: %<a b a b>.invert).perl
camelia rakudo-moar 315ec6: OUTPUT«().hash␤»
timotimo how did that work again
m: say %<a b a b>.perl
camelia rakudo-moar 315ec6: OUTPUT«().hash␤»
timotimo ah, of course
m: say %(<a b a b>).perl
camelia rakudo-moar 315ec6: OUTPUT«("a" => "b").hash␤»
timotimo m: say %(<a b a b>.pairs).perl
camelia rakudo-moar 315ec6: OUTPUT«("1" => "b", "3" => "b", "0" => "a", "2" => "a").hash␤»
timotimo m: say %(<a b a b>.pairs).invert.perl 01:05
camelia rakudo-moar 315ec6: OUTPUT«("a" => "0", "b" => "1", "a" => "2", "b" => "3").list␤»
timotimo m: my %target; %target.push: %(<a b a b>.pairs).invert; say %target
camelia rakudo-moar 315ec6: OUTPUT«"a" => ["0", "2"], "b" => ["1", "3"]␤»
timotimo that's what i meant
01:15 slavik joined 01:25 grettis joined 01:30 grettis left 01:31 leont left 01:48 BenGoldberg left 01:52 dj_goku left 01:57 dj_goku joined
dj_goku [Coke]: hi. Yeah I want to add tests to what ingy has downloaded. 01:58
02:21 molaf_ left
PerlJam got an email today from Mr. Laurence Wall 02:24
02:24 thou joined 02:29 thou left
colomon PerlJam: ooooo 02:34
02:36 molaf_ joined 02:42 grettis joined, kurahaupo left 02:46 grettis left 02:51 eternaleye left 02:55 tinyblak joined 03:10 noganex joined 03:13 noganex_ left, eternaleye joined 03:38 tinyblak left 03:39 tinyblak joined
dalek rl6-bench/stress: 8fc4746 | (Geoffrey Broadwell)++ | / (2 files):
Add --show-relative analyze option, defaulting to --compare, turned off for diagnosis
03:42
rl6-bench/stress: 63330ac | (Geoffrey Broadwell)++ | lib/Analyze/Summary.pm:
Fix 'showing' subheader to correctly reflect various --show-* options
rl6-bench/stress: 5e2a95b | (Geoffrey Broadwell)++ | analyze:
Improve diagnosis layout in --compare mode
03:48 araujo joined 03:57 rmgk left 03:59 rmgk joined 04:13 thou joined 04:15 tinyblak_ joined, tinyblak left 04:16 jepeway left, PZt left 04:17 thou left 04:37 zombcode is now known as bcode 04:41 immortal joined 04:42 erkan left 04:51 baest_ joined 04:53 baest left 05:11 labster left 05:30 tinyblak_ left 05:55 tinyblak joined, anaeem1 joined 06:01 thou joined 06:06 thou left 06:10 raiph joined
dalek rl6-bench/stress: 83fb590 | (Geoffrey Broadwell)++ | analyze:
Prepare analyze for detection of timeouts
06:18
rl6-bench/stress: a9ba519 | (Geoffrey Broadwell)++ | analyze:
Reorder code slightly for clarity
rl6-bench/stress: 47c5376 | (Geoffrey Broadwell)++ | analyze:
Refactor summarize_results_html_snippet() in preparation for adding failure diagnoses
06:24 tinyblak_ joined 06:26 notfix is now known as xfix 06:28 tinyblak left, renormalist left 06:33 gfldex left 06:34 kaare_ joined
dalek rl6-bench/stress: 918d15a | (Geoffrey Broadwell)++ | analyze:
Only show summary scores when --show-relative is set, HTML edition
06:36
rl6-bench/stress: 4ba1f4a | (Geoffrey Broadwell)++ | analyze:
Show failure diagnosis icons in HTML output
06:39 FROGGS_ left 06:42 gfldex joined 06:43 cognominal left 06:47 raiph left 06:51 noganex left 06:57 renormalist joined 07:16 avuserow left
moritz good morning #perl6 07:21
timotimo hello :) 07:23
07:34 ugator joined, avuserow joined 07:35 jfredett left 07:45 anaeem1 left 07:49 thou joined, kurahaupo joined 07:53 thou left 08:00 kaare_ left 08:03 anaeem1 joined 08:08 sqirrel_ joined 08:09 FROGGS_ joined 08:13 darutoko joined 08:17 MilkmanDan left, MilkmanDan joined
lizmat good *, #perl6! moritz timotimo o/ 08:32
timotimo hai liz :)
08:38 gfldex left
FROGGS_ morning 08:40
lizmat FROGGS_ \o 08:41
08:56 sqirrel_ left
FROGGS_ .tell wollmers It looks like /:P5\X/ is post NFG... because right now "E\c[COMBINING GRAVE ACCENT]" ~~ /./ only matches 'E' 08:59
yoleaux FROGGS_: I'll pass your message to wollmers.
09:03 sqirrel_ joined 09:05 zacts joined 09:08 rindolf joined 09:17 virtualsue joined 09:21 PZt joined 09:26 khisanth_ joined 09:27 chenryn joined 09:28 Khisanth left 09:29 chenryn left 09:31 chenryn joined 09:32 spider-mario joined 09:37 sqirrel_ left, thou joined 09:41 chenryn left 09:42 thou left
moritz now I wonder -- what's the use case for the m/.../ immediate matching forms? 09:48
for @list { if m/.../ } # would work with rx or / / too, because of boolean context 09:52
m/(.)(.)/; say join '|', $0, $1; # could work with rx or / / if sink context triggers regex matches 09:53
09:54 ugator left
FROGGS_ hmmm, maybe m/../ as the last statement of a routine? 09:55
dalek kudo/nom: 685ee66 | (Elizabeth Mattijsen)++ | src/core/IO/Dir.pm:
Fix dirname/succ/pred
kudo/nom: 86af5ee | (Elizabeth Mattijsen)++ | src/core/IO.pm:
Add MAKE-EXTENSION, fix MAKE-BASENAME
kudo/nom: c466b28 | (Elizabeth Mattijsen)++ | tools/build/ (3 files):
Add IO/Dir.pm to settings
09:57 sqirrel_ joined 10:17 anaeem1 left 10:18 ilbot3 left 10:19 ilbot3 joined 10:33 virtualsue left 10:46 jack_rabbit left 10:59 sqirrel_ left
masak hi there, #perl6 11:08
11:10 virtualsue joined 11:12 leont joined 11:15 kjs_ joined 11:26 thou joined
firefish5000 I am trying to figure out subsets. What are they? <my subset Min of Int where (0..60); my Min $min=1; say $min.WHAT;> prints Int, <$min=62;> fails (so its still effective), and <my $b=$a; $b=62;> works (so subsets arn't kept by =, which is unfortunate for my use case), 11:27
11:28 nebuchadnezzar left, nebuchadnezzar joined
masak it's containers that are typed, not their values. 11:28
and subsets are refinement types, not nominal types. 11:29
(so you won't see the subset type when you .WHAT) 11:30
11:30 thou left
lizmat cycling& 11:31
firefish5000 so since its just the container constrained, copies will be unconstrained, which is why I cannot pass them as arguments and have them work the way I want... 11:32
11:35 kjs_ left
masak yes, you got it. 11:37
11:38 kjs_ joined
firefish5000 Thanks masak! I would have gone down this route for an eternity without that... 11:39
masak prego. enjoy your Perl 6. 11:40
11:43 PZt left
firefish5000 now as a follow up. Is there a way for me to create a normal type such as <class Min { has Int $.min where (0..60); }; my Min $a; $a = 4;> where some p6 black magic makes $a=4 work like $a.min=4? I have tried overloading '=' for Min, but thats not possible.. 11:43
11:44 nebuchadnezzar left
timotimo mumbles something about box targets 11:44
11:45 anaeem1 joined
firefish5000 if anyone says 'no' or 'i don't think so', 90% of my stress from over complicating my p6 to achieve this functionality will be revealed as I just deal with the 4 extra chars... 11:47
timotimo well, Int itself is implemented as having a "has $!int is box_target" attribute 11:49
that makes it possible to nqp::box_i(123, Int)
11:49 anaeem1 left
timotimo (though pretty much all code in rakudo itself should use nqp::p6box_i(123), which gives the Int automatically) 11:49
and many operations will use one of the two Int box types that "come in" to do calculations 11:50
so if you use the minute Int type everywhere, it might just work out
er
i forgot the important part
"has int $!int is box_target" 11:51
and native ints cannot have subsets applied to them
11:52 nebuchadnezzar joined, xfix is now known as notfix
firefish5000 is googleing box targets and enjoying the streamed information throughly 11:52
11:53 virtualsue_ joined, Alula left
timotimo i had no idea %) 11:53
11:54 virtualsue left, virtualsue_ is now known as virtualsue
firefish5000 thanks timotimo, Ill see what I can do with this and hopefully will be able to put it to good use! (my hate those 4 chars is worth 1000 lines of code, and from a 2min google this looks like it may be done in <100) 11:57
timotimo hmm 11:58
masak so, how do you young'uns connect to SQLite from your Perl 6 code these days?
do you use DBIish?
timotimo i haven't done database stuff with perl 6 yet
but i'd probably just use DBIish
masak will try this 11:59
11:59 virtualsue left
masak I am now at a point where a hobby project takes about an hour just to start up, mostly because it's building a data model. 11:59
I figure if I put some of this in a db, the boot sequence will be faster :)
timotimo oh wow 12:01
well, we should still become faster 12:02
but yeah ... db is your friend
masak it's a really data-heavy thing I'm doing.
timotimo so i was thinking of how to model unions for NativeCall
12:02 anaeem1 joined
timotimo one way seems to be to create a new REPR, but that sounds quite iffy 12:03
another way is to have an "is union" trait on classes that can set a "create a union" flag in the repr_data, which requires changing Metamodel::ClassHOW, which seems iffy, too
with an ExportHOW i could perhaps create a "cunion" keyword that'd do a whole lot of magic for creating dummy attributes so that the resulting CStruct is big enough and for each class you put into it it'd create an accessor that'd cast and return self 12:05
that kind of sounds not too terrible
it's still pretty annoying to cast CStructs into other CStructs 12:06
another thing i thought about for the particular use case of SDL_Event is this: 12:07
every SDL_Event has an int32 type and an int32 timestamp at the start and then there's more stuff following it
so if CStruct would actually implement change_type, it could be "casted" like this: 12:08
have a role that contains the extra attributes
and a cast would just be return self but SDL_MouseButtonEventAttributeRole
that's kind of neat, but has its problems, as well
12:09 Alula joined
timotimo like if you .= new your own SDL_Event - which is what you do before you SDL_PollEvent - it'd only have space for the beginning and everything after that would be writing/reading garbage memory 12:09
12:12 ggoebel111111119 joined
timotimo i suspect it'd be the best thing to teach nativecallcast about casting CStruct into something; currently it just complains that it expects a CPointer REPR'd thing 12:13
12:14 ugator joined 12:15 ggoebel111111118 left 12:18 Isp-sec joined 12:24 virtualsue joined 12:27 notfix is now known as xfix 12:36 JimmyZ joined 12:44 slavik left 12:46 xinming joined, pecastro joined 12:52 bcode is now known as we 12:55 kurahaupo left, pecastro left 12:56 virtualsue left 12:57 slavik joined, pecastro joined 13:04 tinyblak joined 13:07 raiph joined 13:08 tinyblak_ left
moritz note to self: the day after halloween is a holiday. Not good for shopping. 13:10
13:10 Alina-malina left 13:14 thou joined 13:19 thou left, erkan joined 13:21 immortal left
timotimo interesting 13:22
my code is causing MVM to try to free() the string data for a piece of string data that wasn't malloc'd 13:23
that string is "$OUT" ... i have no clue where my program found that
moritz the setting uses '$OUT' for initializing '$*OUT', iirc 13:27
PROCESS::<$OUT> = ...; 13:28
timotimo that would mean it comes from the string heap? 13:30
13:30 firefish5000 left
moritz I have no idea; just speculating wildly 13:31
13:31 isBEKaml joined
timotimo it does smell a lot like memory corruption. 13:31
moritz oh fun, mk.de is down (and all their network lines, which they lend to others) 13:32
13:39 pat_js joined, tinyblak_ joined 13:41 tinyblak left
isBEKaml moritz: what's mk.de? 13:47
I'm guessing ISP of some sort?
13:51 bjz left 13:52 bjz joined 13:57 Alina-malina joined 13:59 isBEKaml left
timotimo interesting 13:59
the problem occurs even when i'm not using nativecallcast at all ... and it also occurs if i revert the latest commit to moarvm
14:02 esaym153 left 14:03 esaym153 joined 14:06 chenryn joined 14:08 esaym153 left 14:09 esaym153 joined, [Sno] left, [Sno] joined 14:11 [Sno] left, [Sno] joined 14:14 chenryn left 14:30 sqirrel_ joined 14:47 ugator left 14:52 anaeem1 left 15:02 thou joined 15:07 thou left 15:16 jfredett joined 15:21 fragiletag joined 15:34 guru joined, guru is now known as Guest77676, Guest77676 is now known as ajr_
masak quiet in here today. 15:36
15:36 [Sno] left 15:37 sqirrel_ left 15:39 kjs_ left
timotimo mhm 15:39
i'm having a hard time trying to motivate myself to hunt that memory corruption look-alike
moritz timotimo: I promise you a cookie for a fix 15:44
timotimo how am i supposed to fix such a stupid thing like that? :( 15:47
moritz timotimo: ok, I promise you two cookies
timotimo i can feel the problem become easier 15:48
moritz timotimo: what kinds of cookies do you like? 15:49
timotimo i like many kinds of cookies
moritz timotimo: www.amazon.de/Bahlsen-Selection-1er...000FWHWEU/ :-) 15:51
timotimo that *is* a "many kinds of cookies" kind of thing :D 15:52
moritz and it's more than two cookies too 15:53
timotimo :)
moritz timotimo: sudo feel motivated :-) 15:54
15:54 renormalist left
timotimo hah 15:54
well, i've already reproduced the bug on my desktop, so there's that
15:55 JimmyZ left
timotimo oh, wait ... if it says "freed by thread T0 here:" followed by "==31298== AddressSanitizer CHECK failed: ../../../../libsanitizer/sanitizer_common/sanitizer_stackdepot.cc:182 "((id & (1u << 31))) == ((0))" (0x80000000, 0x0)" ... 15:55
moritz just made one commit so far today 15:56
timotimo does that mean it tries to double-free? or did that error get triggered while trying to show the error properly?
15:58 kaare_ joined, we is now known as bcode
timotimo oh! someone could have told me that you need the llvm-symbolizer binary to get symbols resolved in asan stack traces 15:59
-fno-omit-frame-pointer and --debug=3 is not enough
16:00 jfredett left
timotimo er ... except i already have that installed and i still only get memory addresses 16:00
16:03 molaf__ joined 16:05 molaf_ left
dalek rl6-bench/stress: 2cb1967 | (Geoffrey Broadwell)++ | analyze:
Non-plot HTML pages are UTF-8 too
16:07
rl6-bench/stress: 2dbd21e | (Geoffrey Broadwell)++ | analyze:
Reduce visual noise by de-emphasizing the icon for successful runs
16:13 raiph left
raydiak good morning #perl6 16:17
timotimo hey ray :) 16:18
moritz: what if the memory error is just from passing incorrectly sized structs to SDL's functions? 16:20
valgrind apparently has trouble following our function pointers around for REPRops 16:21
16:22 [Sno] joined
FROGGS_ timotimo: can we already profile stuff that has an exit in it? 16:24
timotimo i've figured out how to do it, but it looked too wrong to be committed ... 16:25
FROGGS_ ahh, hmmm
TimToady moritz: re irclog.perlgeek.de/perl6/2014-10-31#i_9594588 I'd say s/generic/specific/ is incorrect.
timotimo basically you nqp::gethllsymbol('perl6', '@END_PHASERS') or what it's called
and .push a little closure in there that does the dump_profile_info
that would go into rakudo's HLL Backend 16:26
FROGGS_ timotimo: okay, I add that now temporarily to profile cpandatesters :o)
timotimo++
timotimo :)
wow. 16:27
my SDL_Event struct is 56 bit big. it needs to be 56 bytes.
that's why SDL is writing outside of malloc'd space
16:27 ugator joined
FROGGS_ ohh, heh 16:28
timotimo i quite competently calculated what combination of 64 bit, 32 bit, 16 bit and 8 bit integers i'd have to put in there so that it'd be the "right size"
except int64 is 64 bits, not bytes big ...
moritz just a factor 8 off :-) 16:29
timotimo yup
16:31 kurahaupo joined
timotimo *nice* 16:32
now i got an empty window that i can close by clicking the window decoration's close button
and the only valgrind messages i get come from inside libnvidia-glcore 16:33
FROGGS_ that sounds good!
dalek rlito: 2aa46bf | (Flavio S. Glock)++ | / (2 files):
Perlito5 - js - fix context propagation in if()
TimToady timotimo: I don't see offhand why unboxed types cannot have constraints enforced at the time they are stored; after all, something like int16 is constrained to 16 bits, even if the actual storage is wider. native constraints "merely" have to be enforced by the compiler rather than the runtime, using knowledge stored somewhere outside the native 16:39
much like C knows whether you're using a foo** or a bar*, but it's still just a native pointer 16:40
16:43 denis_boyun_ joined 16:44 raiph joined 16:45 raiph left 16:51 thou joined
TimToady or to look at another way, native assignment merely has to inline the appropriate assignment code 16:51
"merely", I mean :)
but that's why C has to be so picky about knowing the difference between an lvalue and an rvalue at compile time 16:53
timotimo mhm mhm 16:54
TimToady I suspect this is part of what jnthn++ is mulling over subconsciously while he's hiking around :)
16:55 thou left, vendethiel joined
vendethiel well met, #perl6. 16:55
FROGGS_ hi vendethiel
16:56 sqirrel_ joined
timotimo hey ven 16:57
did you know that if you malloc a 56 bit wide area and give it to SDL2's event polling function, which expects a 56 byte wide area to write all over, there'll be trouble?
FROGGS_ SDL2 is a bit picky, that's for sure 16:58
timotimo FROGGS_: how can you call that sdl2 being picky? %) 16:59
FROGGS_ ohh, is it byte picky instead? :o) 17:00
timotimo yeah
that must be it
.o( now that i get it ... it's funny )
dalek p: 05cb90e | (Tobias Leich)++ | src/vm/moar/HLL/Backend.nqp:
also write profiler output when rakudo exit()s

  timotimo++ for the proposed patch.
17:02
17:03 immortal joined
TimToady
.oO(obviously C needs better constraint checking on its native types...)
17:05
17:06 erkan left
timotimo turns out the struct i built wasn't even 56bit big, it was 120 bit big 17:06
i wonder how i reached the conclusion that that would be the right size 17:07
but it was pretty late at night, so at least i have an excuse - sort of
vendethiel timotimo, I did know that, yes 17:10
timotimo well then why didn't you tell me? :\ 17:11
vendethiel C is like "if I fit, I sit, otherwise LOL mate".
timotimo well, it did fit
there was just something else that it had to partially sit upon ...
FROGGS_ eww, I got a 17MB profile from my cpandatesters run >.< 17:12
17:13 anaeem1 joined
timotimo yup, that's how our profiler does it 17:13
let me dig out my partial patch that cuts down on size but also sadly makes the results wrong
maybe you can fix it? :)
remotes/origin/finite_callgraph_depth 17:14
please have a look at that :)
17:17 raiph joined
timotimo i'm definitely looking forward to native shaped arrays; that's going to give us flattened arrays in CStruct almost immediately 17:20
17:24 anaeem1 left 17:25 H2O1 joined
raydiak so I've seen people talking about cpan and perl 6...should I be worried about making p6 modules with the same names as p5 modules? 17:29
17:29 kjs_ joined, [Tux] left
timotimo nope, no worries there 17:29
17:29 [Tux] joined
raydiak cuz math::symbolic is almost ready to go up, but it's not yet a faint glimmer of p5's math::symbolic, I almost felt bad for naming it the same when I saw it :) 17:30
timotimo in that case, just call it Math::Symbolish :P
raydiak heh not that bad 17:31
17:31 raiph left
raydiak how's it goin anyway timo? working on anything interesting today? 17:33
timotimo my current focus is SDL2 bindings 17:34
raydiak awesome!
timotimo afk for a tiny bit &
17:35 H2O1 left 17:43 flussence left, sqirrel_ left, flussence joined
timotimo and you? anything besides math::symbolic keeping you busy? 17:43
raydiak I'm procrastinating walking/bussing half way across town in the rain to jack up my g/f's car and carry the flat tire w/wheel to the nearest gas station and pray it holds air :P 17:44
timotimo oh my 17:45
i had b0rked my car recently, too
17:45 anaeem1 joined, adu joined
raydiak ah, sorry to hear it...you okay? the car? 17:45
timotimo yeah, it was only damage to the autobody 17:46
happened at very low speeds
raydiak one time I rear-ended a truck in an entry-level new car at like 5 mph and half the engine compartment crumpled up like an accordian
gotta love them crumple zones 17:47
timotimo :o
that doesn't sound so good
also, that sounds like it'd be very expensive to repair
raydiak was just body stuff mostly, didn't total it...drove it a couple blocks home, hanging my head out the window so I could see around the hood
timotimo d'oh
i only lost the bumper 17:48
it was hanging on by one of the light's cables, so before i could drive it away "to safety" i had to unscrew the light using one of my keys :S
cars can be fun
raydiak hah yes they can
I've learned a *ton* about physics just from learning about cars, too 17:49
timotimo oh, yeah
i recently went karting with friends and i was kind of disappointed that all the stuff i learned from my dad, who's big into racing simulation games, wasn't enough to make my performance stand out :| 17:50
17:50 FROGGS__ joined
raydiak I haven't really done any kind of competitive driving 17:51
except a little fling with need for speed once in a while 17:52
17:52 Sqirrel left
timotimo ah, you were considering "simulated driving" in that description, too 17:52
raydiak I have done a *ton* of fixing (and breaking)
timotimo i think i've been karting twice in my life so far; once with regular combustion engines and recently with electric karts 17:53
electric karts are way cool.
raydiak oh I'll bet...weird to have all the torque right from the start?
17:53 FROGGS_ left
timotimo didn't feel weird; not entirely sure why, though 17:55
raydiak wI've always wanted to try an electric car, a car w/a cvt, and a rotary mazda, to see what they feel like 17:56
17:57 colomon left
timotimo i know neither what a cvt nor a rotary mazda is :\ 17:57
raydiak cvt=continuously variable transmission, no discreet "1st", "2nd", "3rd" gear
17:58 Ven joined
timotimo ah 17:58
liz and wendy took me to APW in their plug-in prius
raydiak and mazda has made some cars with rotary engines, which don't have pistons 17:59
17:59 gfldex joined
raydiak instead it's this weird sort of "triangle spinning in an oval" shape 17:59
timotimo en.wikipedia.org/wiki/Wankel_engine - like this one?
raydiak yeah that one!
I knew there was a more specific term I wasn't remembering 18:00
timotimo i always thought wankel engines were really neat 18:01
but i never saw one in action
raydiak I hear they love to accelerate...almost no reciprocating mass, very well-balanced, high redline, wide powerband
poor fuel economy b/c of a low compression ratio, but that means they probably do well with turbo/supercharging 18:02
timotimo mhm
i'd love to own a tesla one day
or at least drive
raydiak yeah no kidding 18:03
timotimo i've seen a quite big amount of charging stations all around the city
raydiak haven't seen any here yet
though tbh if I had a bunch of money and wanted a nice car, I'd rather have a lotus than most other things...they tend to be crazy light, good fuel economy and power-weight ratio 18:06
not that expensive either, by comparison to most other "exotic" brands
entry-level elise was like $60k US last time I looked 18:07
timotimo what's missing in the entry-level ones? 18:08
raydiak but I got a few years to worry about how to bankroll my midlife crisis yet :)
no supercharger, for one
18:08 raiph joined
raydiak or was it a turbo on the exige? I forget, either way, naturally aspirated 18:08
timotimo i wouldn't accept a car that doesn't have air conditioning and heating, for example
raydiak not sure if the bottom-end elise has limited-slip or not, either 18:09
18:09 BenGoldberg joined
timotimo to me, a "supercharger" is the thing that you can charge your car very quickly with 18:09
raydiak I don't use A/C, but I'd be surprised if it has no heat
hehe
japhb raydiak: Back in the 80's my dad had a rotary-engine sports car. The acceleration was indeed amazing. It had an auditory readline, because you might not notice you were hitting it.
timotimo i kind of sort of know what a turbo is
... a readline? 18:10
japhb redline
raydiak the way the slang around here goes, turbo is forced-induction (air pump in your intake) powered by the exhaust flow, while supercharger is belt-driven
japhb Clearly you know which one I type more often
raydiak japhb: nice :) I'm jealous
timotimo oh, redline is the point where your rpm is too high?
japhb timotimo: yeah
timotimo OK
raydiak yeah past that you're risking immediate internal engine damage 18:11
TimToady the redline on a rotary was up like 6-7000 rpm, iirc
timotimo mhm
raydiak though many engines make peak power below their redline anyway
18:11 xenoterracide_ joined
raydiak hm, 7k isn't much higher than many piston engines 18:12
TimToady the three main problems with rotaries were: seals, efficiency, and emissions
well, back in the day, was more like 3000 for most pistons 18:13
materials have improved :)
raydiak when was this? :)
18:13 thou joined
TimToady back when you added more cylinders, not more rpms :) 18:13
japhb From the WP article on the Mazda RX-7: "Because of the smoothness inherent in the Wankel rotary engine, little vibration or harshness was experienced at high engine speeds, so a buzzer was fitted to the tachometer to warn the driver when the 7,000 rpm redline was approaching."
raydiak ah, before my time :) 18:14
japhb: hah that's awesome
guess the limiting factor for a rotary is burning the seals or something, then? 18:15
japhb There was a running joke that only Mazda mass-produced them, because they were the only ones that had figured out how to seal them well enough. 18:16
18:16 anaeem1 left
TimToady well, the center of mass of the rotor does move around some, so you still get some vibrational effects, just less than in a piston engine 18:16
18:17 anaeem1_ joined
TimToady there was also a diesel wankel that had more lobes 18:17
raydiak there was?
TimToady german, not japanese, iirc
japhb There's also a story that when they first came out they caused some issues in racing competitions because they produced so much more power for unit displacement and engine weight, so rules had to be refined to place them off in their own bracket.
TimToady then there was the episode of turbines at Indy... 18:18
japhb Oh dear, I can imagine that being ... spectacular.
And not in a "I want to be in that car" sense
TimToady I think they basically outlawed them by limiting air intake
japhb dislikes the fact that so many racing competitions deal with real innovation by disallowing it. 18:19
My uncle (an avid race fan) tells me of when active aerodynamics first came out, and cars that could turn their spoiler into an air brake started lapping cars that didn't ... so they disallowed that. I would like to have seen that kind of thing in my day, rather than what frankly looks like slot cars sometimes. 18:21
raydiak I had a co-worker tell me about some guy way back that affixed huge fans or something to the bottom of his car for downforce, b/c there wasn't a rule against it 18:22
idk where or what sort of racing he was talking about 18:23
japhb The rules of modern downforce boggle me -- "If you don't enter that corner going FAST ENOUGH, you'll lose traction" 18:24
kurahaupo japhb: rumour has it the Mazda put an RX7 engine on a test bench and ran it up to something like seven times the official redline rpm
japhb woah 18:25
BenGoldberg Another problem with mazda's (early) rotary engines was how they dealt with emmissions... to get rid of unburnt hydrocarbons in the exhaust, they decided to just throw a bit of air and fuel into the exhaust, and burn it. This was *just* before fuel economy requirements went up, which was unfortunate for them.
Modern rotarys use extra spark plugs, to fully burn the fuel inside the engine, to avoid that problem. 18:26
japhb Yeah, dad's car got like 14 MPG. But they were very fun miles. :-)
Ulti if I have a sub with two typed parameters and pass in a list as the arguments with two elements how can I get that to match the sub?
japhb
.oO( Oh no, on topic conversation! )
timotimo fun miles and likely also cheap gallons
BenGoldberg Ulti, typed parameters? Using Moose, or what?
Ulti o___O using Perl6 18:27
timotimo Ulti: sounds like you'd my_sub(|@foo)
BenGoldberg Erps, wrong channel ;)
BenGoldberg feels silly, now.
japhb m: sub foo(Int $a, Str $b) { say "$a $b" }; my @a = (1, 'bar'); foo(|@a);
Ulti sub add (int $a, int $b --> int) {$a+$b} and then add(@args)
camelia rakudo-moar 315ec6: OUTPUT«1 bar␤»
Ulti timotimo: aha!
I tried @args[*] living in hope 18:28
japhb Ulti: Is what I sent what you meant?
Ulti yeah
thanks
timotimo Ulti: well, that's already syntax for "the element after the last element"
japhb OK, cool
ugator reading S09#Compact_structs: I wonder if it's possible to translate strongly typed code directly into C - for specific operators, loops or simiar? 18:29
*similar
18:29 Mso150 joined
timotimo ugator: MoarVM's jit will come very close 18:29
TimToady timotimo: * by itself is not a closure
timotimo oh
TimToady so @args[*] is just all the values
@args[*-0] is the one beyond the end 18:30
Ulti ha! now I have the inverse problem that the one with @args isnt *@args
timotimo mhm mhm
18:30 flussence left
ugator timotimo: in terms of speed too? that would be a huge thing?! 18:30
18:30 flussence joined
timotimo ugator: we hope! :) 18:31
ugator :-))
timotimo perl6 classes with native attributes are already only a bit more expensive than a regular struct would be
Ulti oh wow adding typed information to that recent benchmark with the ast makes it incredibly slow 18:32
x___X
timotimo but our jit is currently not clever enough to avoid reading from and writing to the stack before and after every single op
raydiak okay, thanks for the chat this morning everyone, I feel prepared to go tackle my g/f's car now...catch you all later :) 18:33
TimToady
.oO(Car Talk)
timotimo good luck!
maybe you'll be able to replace her engine with a wankel engine now? :) 18:34
raydiak would rather replace it with a horse at this point :)
TimToady which is sort of the flip side of #perl6, insofar as it's two guys doing a car talk show where nothing is OT
japhb Ulti: Type information both helps and hurts: Enforcing constraints constantly is slow, but with the constraints in place, the optimizer can be smarter about the compiled code. It just so happens that right now usually for object types the constraint checking wins, and for native types the optimization wins. Especially when the JIT kicks in. 18:35
raydiak hahaha
okay really gone now o/
timotimo i think type checking is often expensive
Ulti: it may be the case that you're getting poor performance due to slurpy arguments, though
Ulti I think the problem is that benchmark is all anon subs?
18:36 colomon joined
Ulti timotimo: I just added the slurpy argument to one of them to avoid the implicit slurpy of the untyped subs everywhere 18:36
timotimo i've noticed a huge amount of code objects being created from the clone method from these anon subs
er
Ulti oh I tell a lie!!
timotimo surely you mean @_[0] and @_[1]?
japhb Methinks an idiomatic version of that benchmark (the same was as was done for Go) would make it much, much faster (the same way as for Go). Use the language the way it's most often used, and you'll tend to hit the optimized paths. 18:37
Ulti the native typed code with fixed numbers of arguments takes 88 seconds rather than 111
timotimo because we don't have implicit slurpy arguments; you have to explicitly refer to @_ for them to appear
Ulti not exactly incredible but also essentially the same code
timotimo yeah, i've observed something similar
also using Num instead of Rat gives a little speed boost as well
Ulti still 12% for just specifying type information... kind of cool
japhb timotimo: Why not num instead of Num? 18:38
Ulti yeah this was all num
timotimo japhb: might as well 18:39
gist.github.com/timo/2d2cc1260428e5758086 - this is how i patched it recently
Ulti though I think the benchmark is specifically testing this horrible case with just passing in a list and accessing it 18:40
timotimo yeah
18:40 cognominal joined
Ulti since the Go and everything else is written that way even when it is really gross 18:40
18:40 colomon left
timotimo well, if the code doesn't pass arrays as args around any more, it might as well use the built-in +, -, * and / operators 18:41
japhb But, but, they call out the idiomatic Go as well. And it's an order of magnitude faster. 18:43
Ulti oh I also changed the total sum to use [+] not sure that is better
the idiomatic Perl6 wouldnt even implement the AST that way though :/ 18:44
we'd have a grammar to define a whole sublanguage or something right >:3 18:45
timotimo Ulti: to be honest, the AST representation is just fine; this is *after* any grammar or similar would have run 18:48
18:50 immortal left
BenGoldberg How much speed difference is there between @ast[$i] and @ast.at_pos($i)? 18:51
timotimo a bit. one has to do a range check and defer to the other
18:52 erkan joined, denis_boyun_ left 18:53 Ven left
BenGoldberg Would it be faster, or slower, to loop over @ast[ 1 .. @ ], and get rid of $i entirely? 18:53
Err, @ast[ 1 .. * ]
timotimo i tried to have @ast is copy and shift off the first element and then iterate over the whole list 18:54
that seemed a lot slower
18:54 kjs_ left 18:55 Guest33617 left
timotimo how come uint8 doesn't work in native calls? :\ 18:57
18:58 raiph left 19:00 Mso150_m joined, Mso150 left 19:03 ghostlines joined 19:05 xfix is now known as notfix
dalek rl6-bench/stress: 8e2d9f9 | (Geoffrey Broadwell)++ | analyze:
Add simple HTML hover text with a couple diagnostic details
19:06
19:15 Sqirrel joined 19:24 anaeem1_ left 19:28 zacts left, zakharyas joined 19:31 darutoko left 19:32 anaeem1_ joined 19:35 adu left, denis_boyun_ joined 19:36 anaeem1_ left 19:38 anaeem1_ joined 19:39 raiph joined 19:41 thou left 19:44 kjs_ joined, ugator left 19:53 tinyblak_ left, notfix is now known as xfix, tinyblak joined 20:03 tinyblak_ joined 20:06 tinyblak left 20:08 ghostlines left 20:10 Ven joined 20:14 colomon joined, cognominal left 20:15 Mso150 joined, Mso150_m left
timotimo i'm back :) 20:24
even though i don't think anybody noticed i was gone
20:24 denis_boyun___ joined 20:26 denis_boyun_ left
masak moritz: I saw this and thought of you: lesswrong.com/lw/l16/2014_iterated_...t_results/ 20:29
FROGGS__ wow, now I cpandatesters is almost fast... I compile the templates on one now 20:34
(which is not the default when using Bailador)
timotimo "on one"?
FROGGS__ only once
sorry
timotimo aaah
20:34 denis_boyun___ left
masak moritz: it's an interesting twist for a bot to be able to run its opponent. :> 20:34
timotimo almost fast, eh? we still got some way to go 20:35
FROGGS__: could you make anything of the branch that tries to limit the depth of the call stack for the profiler?
FROGGS__ timotimo: no, because I've got profile atm that are almost usable... so I didn't try your branch :/ 20:36
20:36 Ven left
[Coke] kk 20:37
20:38 Ven joined
dalek href="https://cpandatesters.perl6.org:">cpandatesters.perl6.org: 2e7cae9 | (Tobias Leich)++ | app.pl:
compile templates once at startup
20:39
href="https://cpandatesters.perl6.org:">cpandatesters.perl6.org: b25f577 | (Tobias Leich)++ | app.pl:
allow binding to a specific ip address
20:40
timotimo :( 20:44
raydiak yay back home and out of the rain, and the tire seems to hold air after bouncing it around to re-seat the bead \o/ 20:50
timotimo bounce it to the beat to re-seat the bead 20:52
20:54 ajr_ left 20:59 rindolf left
dalek href="https://cpandatesters.perl6.org:">cpandatesters.perl6.org: 1bcdea1 | (Tobias Leich)++ | setup/cpandatesters_pg.sql:
update prostgres schema (serial,varchar)
21:00
21:03 Alina-malina left 21:04 Alina-malina joined 21:07 Mso150 left, Mso150_e joined
dalek href="https://cpandatesters.perl6.org:">cpandatesters.perl6.org: 00cc706 | (Tobias Leich)++ | setup/cpandatesters_pg.sql:
add column "grade"
21:07
raydiak is there a way to overload operations on a class besides exporting subs? i.e. so it still works when the object is passed into a namespace that doesn't directly use my module, so doesn't import 21:09
or would that be considered "spooky action at a distance"?
timotimo there's a mechanism for that 21:10
NYI, though
raydiak ah, glad I asked before digging in to that one, then :) thanks timotimo++ 21:11
21:12 jack_rabbit joined 21:14 revlin joined
dalek href="https://cpandatesters.perl6.org:">cpandatesters.perl6.org: 3240e6e | (Tobias Leich)++ | app.pl:
switch from mysql to postgresql
21:14
timotimo kind of "import operators from the caller's scope" 21:15
raydiak it's fun to rip pieces of conversation out of context: "spooky action at a distance? there's a mechanism for that" 21:16
timotimo :)
raydiak huh...my first thought was a way to say it with methods instead of subs 21:17
21:17 kurahaupo left 21:18 anaeem1_ left
raydiak but then I guess every operator has to check for the existence of special methods on its arguments 21:18
dalek volaj: 7687ca0 | (Salve J. Nilsen)++ | README.markdown:
Fix typo in SQL
volaj: 1b220a2 | (Tobias Leich)++ | README.markdown:
Merge pull request #50 from sjn/master

Fix typo in SQL
21:21 tinyblak_ left
revlin perl6: say 3; 21:22
camelia rakudo-{parrot,moar} 315ec6: OUTPUT«3␤»
revlin Anyone aware of some interest in developing a language-to-language compiler: Perl6 to asm.js? 21:26
BenGoldberg There're always interest in porting perl6 to new backends. 21:27
21:27 raiph left
revlin Is this the place to follow such interest or is there another pond I should be fishing in? 21:27
BenGoldberg This is the place for it. 21:28
revlin cool
raydiak didn't someone start some sort of js backend?
BenGoldberg perlito
timotimo forget perlito
we are getting a rakudo-js
BenGoldberg ooh
revlin can I search rakudo-js and find anything?
ah, on github 21:29
it uses NQP
timotimo it's a javascript backend for nqp right now 21:30
but when you have a complete nqp backend for something, you're quite close to a rakudo backend
revlin that's cool.
What I actually had in mind was writing an app in Perl(6), which compiles down to the asm.js subset to be run client side 21:31
asmjs.org/spec/latest/
timotimo perl6 doesn't lend itself to be compiled to asm.js ... at least at compile time
revlin I'm not new to Perl, but am just starting to read about Perl 6... what does it lend itself to? 21:33
timotimo compiling to js is fine
we don't compile down to machine code - although MoarVM has a JIT compiler
you'd need an AOT compiler to output asm.js instead
21:34 ugexe_ joined
revlin k, I need to read a bit more before I can have an intelligible conversation about this 21:35
21:35 ugexe__ joined
revlin now figuring out what a Parrot Virtual machines is, so I can better understand rakudo 21:35
21:36 ugexe left
timotimo you can pretty much ignore parrot nowadays :\ 21:36
21:36 raiph joined, ugexe__ is now known as ugexe
revlin ignore? Is MoarVM the active development stream? 21:37
raydiak aye
masak pretty much.
timotimo you can say that, yes
moarvm and the jvm backend, too
revlin K, thanks. I will read about that instead.
timotimo feel free to approach us with any questions you have :) 21:38
revlin Is perlito also a "dead end"?
thx
21:38 ugexe_ left
FROGGS__ perlito's goal is just to support a subset... dunno if these are your plans too 21:39
21:39 FROGGS__ is now known as FROGGS
timotimo i heard fglock considers the perl6 part of perlito to be done 21:39
FROGGS to support more than a subset you basically *have to* use/port rakudo
timotimo or build your own compiler :) 21:40
revlin no plans, as of yet. I love Perl, but spend most of my days in JS. Mojolicious is really cool, but looking for more signs indicating Perl's future
FROGGS sure... and in twenty years... :o)
tony-o in twenty years we're in here asking FROGGS about perl7 21:41
FROGGS hehe
I don't think so :o)
tony-o haha 21:42
21:44 Guest33617 joined
raydiak revlin: perhaps this highlights troubles you might run in to? 21:46
"Unlike nqp-rx, which aimed to have almost no runtime component whatsoever, this new version of NQP accepts that a minimal Perl 6 object metamodel, multidispatcher, and regular expression engine are needed on top of the underlying virtual machine."
revlin raydiak: problems I might run into if trying to build my own compiler? 21:48
raydiak revlin: yeah, looks like those are some of the key points of trouble others have run in to 21:49
I don't know much about it and am not a language implementor, but it looked relevant
revlin I'm just fact-finding. I want to use Perl in full-stack web development, so just exploring different possibilities for doing that 21:50
masak ooh. Dylan has a macro called `block`, which is used to implement "nonstandard flow of control". neat. 21:51
which means that they don't need a special mechanism for `last`, for example, because `block` can already do that. 21:52
opendylan.org/books/drm/Statement_Macros#block
revlin thanks for the pointers, folks :) 21:53
21:53 revlin left
raydiak saw something called tao3d mentioned on /. today...noticed it claimed "It makes it very easy to create new control structures. Defining if-then-else is literally a couple of lines of code." 21:55
21:55 colomon left 21:57 molaf__ left 22:12 zakharyas left 22:13 molaf__ joined
masak raydiak: interesting. I was just reading about a language called 3D, in connection with metacircularity. 22:13
'night, #perl6
raydiak g'night masak o/ 22:14
22:14 kaare_ left 22:15 xfix is now known as notfix 22:19 raiph left 22:22 raiph joined 22:35 kjs_ left
moritz masak: thanks for the prisoner's dilemma link, and good night 22:41
22:47 gfldex left
dalek kudo/nom: e46b2f4 | (Elizabeth Mattijsen)++ | src/core/IO.pm:
More primitives
22:48
kudo/nom: 930bb08 | (Elizabeth Mattijsen)++ | src/core/IO/Dir.pm:
Use new MAKE-CLEAN-PARTS primitive
22:56 psch joined
psch hi #perl6 o/ 22:56
raydiak \o psch
psch grammars are my newest hammer. i hit a (very limited) assembly with it.
hey raydiak o/ 22:57
although i still feel like grammars are lacking something, which means i probably don't understand something about them yet
i.e. when wanting to match things that can be specified from outside. .parse(:rule<...>, :args<...>) still seems unfinished 22:58
i'm helping myself with dynamics, which feels a bit too global-ish 22:59
the improved cli parsing as well as the little assembler i wrote both suffer from that, FSVO suffer
lines like this one: github.com/rakudo/rakudo/pull/324/...4a98650R90 23:01
23:10 colomon joined 23:17 spider-mario left 23:20 FROGGS left
psch i also think i'm missing something re: the difference between WhateverCode and blocks with placeholders 23:31
m: say { :16($^a) }('ff') # works
camelia rakudo-moar 315ec6: OUTPUT«255␤»
psch m: say (:16(*))('ff') # doesn't
camelia rakudo-moar 315ec6: OUTPUT«Cannot call 'UNBASE'; none of these signatures match:␤:(Int:D $base, Cool:D $num)␤:(Int:D $base, Str:D $str)␤ in block <unit> at /tmp/RbNH1gh1IY:1␤␤»
psch m: say { :16(*) }('ff') # neither
camelia rakudo-moar 315ec6: OUTPUT«Cannot call 'UNBASE'; none of these signatures match:␤:(Int:D $base, Cool:D $num)␤:(Int:D $base, Str:D $str)␤ in block <unit> at /tmp/b7gV9PMaiT:1␤␤»
psch maybe it's not Whatever vs placeholder but colon-pair--as--UNBASE... 23:32
sjn wonders what "To compile on the MoarVM backend, QAST::VM must have an alternative 'moar' or 'moarop'" means
sjn is using rakudobuild, fwiw 23:33
23:33 PZt joined
psch sjn: google against the clog suggests some module might be lagging behind. i'm not sure 23:39
fwiw, i built nom HEAD without rakudobrew cleanly a few minutes ago. i won't build with rakudobrew 'cause i'm low on bandwidth... :)
sjn just rebuilt both moar_jit-HEAD and moar-HEAD 23:41
psch oh right, i'm not running jitted, 32bit here 23:42
sjn Hm. Does NativeCall work on moar? 23:51
psch it doesn't test properly on 32bit 23:53
but it should definitely work
sjn tries with parrot-HEAD, to see if that makes a difference 23:55
hm. lots of build warnings when compiling rakudo-parrot 23:56
looks like most of them are of type -Wunused-parameter 23:57
23:59 Isp-sec left