Camelia, the Perl 6 bug

IRC log for #perl6, 2011-09-23

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:00 shinobicl_ left #perl6
00:00 shinobicl_ joined #perl6
00:20 pmichaud joined #perl6
00:20 hugme joined #perl6
00:20 jrockway_ joined #perl6
00:26 cotto_work benabik: when you say Rakudo master, you mean nom, right?
00:27 benabik cotto_work: Er, umm, yes.
00:27 cotto_work benabik: ok.
00:34 pmichaud joined #perl6
00:34 hugme joined #perl6
00:34 jrockway_ joined #perl6
00:34 uasi joined #perl6
00:36 mkramer joined #perl6
00:38 benabik Yes, my merge does appear to have worked.  \o/
01:13 frhodes joined #perl6
01:25 wolfman2000 joined #perl6
01:30 woosley joined #perl6
01:34 REPLeffect joined #perl6
01:44 thou joined #perl6
01:48 abercrombie joined #perl6
02:02 am0c joined #perl6
02:32 envi joined #perl6
03:30 sorear good * #perl6
04:03 birdwindupbird joined #perl6
04:11 ZapZ joined #perl6
04:11 JimmyZ joined #perl6
04:12 diakopter o/
04:13 djanatyn joined #perl6
04:20 satyavvd joined #perl6
04:22 sorear o/ diakopter
04:38 alvis joined #perl6
04:41 TimToady you guys talk too fast
04:42 japhb .oO( I ... have ... tortoise ... nervosa ... )
04:43 sorear hello japhb
04:44 japhb o/
04:52 moritz good morning
04:53 japhb o/
04:58 JimmyZ good moritz :)
05:00 * JimmyZ wonders where append_inplace is defined
05:00 sorear it appears likely I will not have niecza/serialize done in time for v10
05:01 sorear does anyone have specific changes they would like to see in master for v10?
05:02 JimmyZ what does niecza/serialize do? improve startup time?
05:06 TimToady I'd like the ability to shell out
05:09 TimToady mostly so's I can run stty
05:17 cognominal what is v10?
05:18 japhb .oO( release 10 ? )
05:19 REPLeffect joined #perl6
05:20 molaf joined #perl6
05:20 moritz yes
05:21 cognominal I see indeed that last niecza release was v9
05:22 alvis joined #perl6
05:22 SHODAN joined #perl6
05:25 packetknife joined #perl6
05:26 mberends joined #perl6
05:31 JimmyZ perl 10 will be released
05:31 moritz but not Perl 10
05:32 sorear not related to PerlIO.
05:32 sorear JimmyZ: the single biggest improvement will be adding BEGIN support
05:33 japhb Man, waiting ~6 min for Core.setting to build is painful when you're trying to iterate one of its constituent files.
05:33 japhb er, CORE.setting
05:34 moritz japhb: I usually prototype methods and functions outside of CORE first
05:35 moritz but yes, it's quite annoying
05:37 japhb moritz, yeah, I may have to do that.  :-/
05:39 moritz japhb: what are you hacking on?
05:40 packetknife joined #perl6
05:40 japhb MAIN_HELPER
05:41 japhb Both to get the USAGE stuff working again, but also because there appear to be some subtle bugs in arg parsing in there
05:41 MayDaniel joined #perl6
05:41 moritz example?
05:42 moritz (USAGE was quite hacky in master, I hope you're doing it more according to the spec :-)
05:43 japhb '--/' will be treated as '--' (and not for example warn); return from process-cmd-args() is handled improperly in caller code; ordering of tests in while loop in process-cmd-args leads to redundant tests and (to me) unclear intent
05:43 japhb So a range from tiny bugs to normal-sized bugs to code cleanliness
05:44 japhb First I'm resurrecting what's there, then I'm planning to iterate towards correct.
05:50 wtw joined #perl6
05:53 kaleem joined #perl6
05:56 mberends joined #perl6
05:57 koban` joined #perl6
06:06 orafu joined #perl6
06:20 REPLeffect joined #perl6
06:25 packetknife joined #perl6
06:43 japhb phenny, ask jnthn Is it expected that an only sub will always be reported as a candidate from &only_sub.candidates_matching(), when the same sub marked multi would not match (i.e., the parameter list does not match the proposed arguments, and if dispatched to, will fail to bind)
06:43 phenny japhb: I'll pass that on when jnthn is around.
06:44 japhb ^^ source of a surprising bug in my code
07:13 awwaiid joined #perl6
07:19 mberends joined #perl6
07:26 mj41 joined #perl6
07:41 pochi joined #perl6
07:42 japhb Old MAIN usage code resurrected, one important bug fixed, but improvements to the usage auto-generation will have to wait.  Time for ...
07:42 japhb sleep &
07:43 japhb (^^ above is in my local copy; have not pushed yet)
07:43 japhb really &
07:43 JimmyZ good night
08:07 Chat7297 joined #perl6
08:07 Chat7297 hii
08:08 Chat7297 what u doin
08:09 moritz reading http://arxiv.org/ftp/arxiv​/papers/1109/1109.4897.pdf
08:12 pmichaud joined #perl6
08:12 hugme joined #perl6
08:12 jrockway_ joined #perl6
08:14 masak joined #perl6
08:14 masak sorear: +1 on TimToady's suggestion "shelling out". I missed that the other day.
08:15 masak perl6: sub MAIN() { say "OH HAI" }
08:15 p6eval niecza v9-32-g380d891: OUTPUT«Potential difficulties:â�¤  &MAIN is declared but not used at /tmp/tD_7ppJ37U line 1:â�¤------> [32msub MAIN[33mâ��[31m() { say "OH HAI" }[0mâ�¤â�¤Â»
08:15 p6eval ..pugs:  ( no output )
08:15 p6eval ..rakudo 952b7b: OUTPUT«OH HAI␤»
08:15 masak sorear: MAIN would be nice, too.
08:17 masak oh, and please fix http://github.com/sorear/niecza/issues/58 :)
08:18 masak niecza: sub MAIN(); say "OH HAI"
08:18 p6eval niecza v9-32-g380d891: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed block at /tmp/FvF6kyOM84 line 1:�------> [32msub MAIN()[33m�[31m; say "OH HAI"[0m��Parse failed��»
08:19 masak std: sub MAIN(); say "OH HAI"
08:19 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed block at /tmp/ORaCXiQi5a line 1:â�¤------> [32msub MAIN()[33mâ��[31m; say "OH HAI"[0mâ�¤    expecting any of:â�¤       new name to be definedâ�¤ param_sepâ�¤      routine_defâ�¤    signatureâ�¤      traitâ�¤Parse failedâ�¤FAILED 00:01 119mâ�¤Â»â€¦
08:19 masak TimToady: ^^
08:19 moritz what should 'sub MAIN()' do?
08:19 moritz make the rest of the file the sub MAIN?
08:21 bbkr1 joined #perl6
08:31 masak moritz: aye.
08:33 masak S06:3296
08:39 jnthn mornnin'
08:39 phenny jnthn: 06:43Z <japhb> ask jnthn Is it expected that an only sub will always be reported as a candidate from &only_sub.candidates_matching(), when the same sub marked multi would not match (i.e., the parameter list does not match the proposed arguments, and if dispatched to, will fail to bind)
08:39 moritz jnthn o/
08:41 Trashlord joined #perl6
08:42 jnthn phenny: tell japhb Hmm...seems that's what I implemented. Maybe it's not the most useful semantics for that case though...
08:42 phenny jnthn: I'll pass that on when japhb is around.
08:43 dakkar joined #perl6
08:45 masak jnthn: mornnn
08:45 Woodi nom: sub a( Int $b ) { say $b }; a( "123" );
08:45 p6eval nom 952b7b: OUTPUT«Nominal type check failed for parameter '$b'; expected Int but got Str instead␤  in sub a at /tmp/6wyjkBvdcN:1␤  in <anon> at /tmp/6wyjkBvdcN:1␤  in <anon> at /tmp/6wyjkBvdcN:1␤␤»
08:45 Woodi nom sub a( Int $b ) { say $b }; a( "123" );
08:49 jnthn Woodi: That's a type *constraint*, not a type coercion
08:49 jnthn Use "$b as Int" if you want a coercion.
08:49 MayDaniel joined #perl6
08:50 Woodi k
08:51 striking joined #perl6
08:51 striking hi #perl6   o/
08:51 moritz or  Cool $b as Int
08:51 moritz what a striking appearance!
08:51 moritz SCNR
08:51 moritz :-)
08:52 striking Is there any  example for IO.read??
08:52 moritz nom: say $*IN.read(5)
08:52 p6eval nom 952b7b: OUTPUT«Buf:0x<4c 61 6e 64 20>␤»
08:52 moritz nom: say $*IN.read(5).decode
08:52 p6eval nom 952b7b: OUTPUT«Land ␤»
08:52 moritz say $*IN.get
08:53 moritz nom: say $*IN.get
08:53 p6eval nom 952b7b: OUTPUT«Land der Berge, Land am Strome,␤»
08:53 moritz (that's the first line of the input stream)
08:56 dalek specs: 953a85b | moritz++ | S32-setting-library/IO.pod:
08:56 dalek specs: [S32::IO] all .read methods should return a Buf. This is not C.
08:56 dalek specs: review: https://github.com/perl6/specs/commit/953a85bcfb
08:57 moritz ... now it even conforms to the spec :-)
08:57 Woodi moritz: is .eof working on sockets ?
08:57 moritz Woodi: I have no idea. Does it work?
08:57 Woodi no in b
08:58 Woodi how to not block without kind of .eof in read or recv ?
08:58 moritz you can't do non-blocking in b
08:58 Woodi if i give to big buffer it hangs. or Buf resolve this ?
08:58 moritz there's IO::Select for nom
09:00 Woodi can i check how many to read in socket before perform read/recv ?
09:01 moritz I don't think so :(
09:02 moritz though I'm not really good with sockets; bbkr1 can probably help you much better than I
09:02 Woodi ok
09:05 masak striking: hi!
09:05 striking hi masak
09:07 striking hi masak can you give me a small tut ?how to print something IO.read
09:07 moritz striking: didn't you like my examples earlier?
09:08 striking I don,t know how to use it
09:08 moritz why do you want to use IO.read? What do you want to achieve?
09:09 striking just print
09:09 moritz rakudo: say 'this is printed out'
09:09 p6eval rakudo 952b7b: OUTPUT«this is printed out␤»
09:09 moritz that's how you print stuff.
09:09 moritz you don't need IO.read for printing.
09:10 JimmyZ nom: print $*IN.read(5)
09:10 p6eval nom 952b7b: OUTPUT«Buf<95687496>»
09:10 striking moritz: where is your example?
09:10 JimmyZ nom: say $*IN.read(5)
09:10 p6eval nom 952b7b: OUTPUT«Buf:0x<4c 61 6e 64 20>␤»
09:11 moritz striking: http://irclog.perlgeek.de/​perl6/2011-09-23#i_4468060 and the following lines
09:11 moritz $*IN is an IO object
09:11 JimmyZ what? say is different from print?
09:11 moritz JimmyZ: sure, say() uses .gist, print() uses .Stringy
09:12 JimmyZ I thought difference is "
09:12 JimmyZ \n"
09:12 moritz not anymore
09:13 daxim joined #perl6
09:14 * masak also did not know this o.O
09:14 * jnthn either :)
09:14 * mux can't wait for people to 'wtf?!?' over that one
09:14 masak wtf.. I mean why is there a difference?
09:14 jnthn wtf...why?
09:15 jnthn .oO( that's mux satisfied... ;-) )
09:15 masak say = print + \n is so easy to understand.
09:15 * mux is silently chuckling
09:15 moritz where have you folks been in the last 3 month?
09:15 masak jnthn: I didn't do it for mux, I was already writing it. :/
09:15 jnthn moritz: Clearly, nowhere that we use print. ;)
09:15 mux I'm scared shitless of perl 6 already
09:15 masak moritz: I admit to being slightly distracted when .gist appeared.
09:16 masak moritz: though I like the other effects of it.
09:16 mux I really need to find a job where I'll have to write some to check it out
09:16 masak spaces in lists, for example.
09:18 masak but I'm curious why print and say would use different underlying stringifications.
09:18 masak nothing so far in this discussion has convinced me, or even given a hint, that they should.
09:19 mux maybe the intent was to have different stringifications, one human readable such as python's str() and the other that is valid code, like repr()
09:19 moritz three actually
09:19 mux oh shit.
09:19 masak while we're at it, please compare and contrast .Str, .Stringy, and .gist.
09:19 moritz .gist is for humans
09:19 masak why are there three of them?
09:19 moritz .perl for perl
09:19 moritz and .Stringy for IO
09:20 mux humans and IO overlap
09:20 moritz mux: partially
09:20 * mux nods
09:20 moritz nom: say 0.5.Str, 0.5.gist
09:20 p6eval nom 952b7b: OUTPUT«0.50.5␤»
09:20 mberends joined #perl6
09:20 moritz nom: say 0.5.perl
09:20 p6eval nom 952b7b: OUTPUT«1/2␤»
09:21 moritz for the gory details, check the logs up to 2011-06-18
09:21 masak moritz: I use 'say' and 'print' pretty much interchangably in my code. I find the fact that they're now using different backends more than a little disturbing.
09:21 masak but yes, I will backlog before saying anything more.
09:22 masak wait, "up to"?!
09:22 masak how far back? :(
09:22 moritz the discussion has been going for days or weeks
09:22 moritz I'm pretty surprised you don't remember any of it
09:22 masak I remember bits and pieces.
09:22 masak I certainly wasn't conscious when .gist was born.
09:23 moritz I'm not quite sure I how much I like or dislike the change
09:23 moritz since most of my scripts so far contained debugging or summary output meant for the human, not much that was meant to go into files
09:24 masak moritz: haven't you ever printed parts of a line of output in a loop or so?
09:25 masak what are the consequences of that going to .Stringy, and all say calls going to .gist?
09:25 moritz masak: "haven't you ever" is the wrong question in response to a line with "most" in it
09:25 masak moritz: I'm just presenting my use case for using print/say interchangeably to you, wondering whether you've encountered it too.
09:26 masak I wasn't questioning your use of "most".
09:26 moritz masak: I'm well aware of that use case, and that it needs rethinking in light of the recent spec change
09:26 masak since that's the use case I see that currently looks problematic, I wanted to bring it up.
09:26 masak as far as I can see, it's the spec change that's the root cause of the problems.
09:27 masak not the expectation that 'say = print + \n'.
09:27 masak but here I go again. :/
09:27 * masak shuts up
09:27 moritz masak: it's just that this usecase seldomly appeared in the scripts I've written since the spec change, and since the implementation in nom
09:27 moritz masak: so upto now it wasn't a pain point for me, but that doesn't mean anything yet
09:28 REPLeffect joined #perl6
09:28 moritz also note that if you do output of the form say "a big $interpolated $string";
09:28 moritz it continues to work as it did before
09:30 striking moritz: good example! thanks!
09:34 cotto joined #perl6
09:35 moritz striking: you're welcome
09:36 jnthn fwiw, I think I'd prefer print to .gist too. It'll catch too many people out.
09:37 moritz and require explicit prefix ~ or .Str or .Stringy for the old mode?
09:38 kaleem joined #perl6
09:38 woosley left #perl6
09:40 jnthn moritz: Right, and people can use that with say too if they want the newline and the old mode.
09:40 jnthn I mostly see the use of Stringy being string operations though
09:41 jnthn e.g. it's what concatenation uses if it needs to get two strings to concatenate.
09:41 MayDaniel joined #perl6
09:42 moritz (fwiw most uses of .Str in the setting should really be .Stringy)
09:43 c1sung joined #perl6
09:47 JimmyZ +1
09:47 JimmyZ nom: print $*IN.read(5).gist
09:48 p6eval nom 952b7b: OUTPUT«Buf:0x<4c 61 6e 64 20>»
09:48 moritz should .Str and .Stringy on Buf die?
09:48 moritz to avoid accidental concatenation of Str and Buf, that is
09:48 JimmyZ nom: say $*IN.read(5)
09:48 p6eval nom 952b7b: OUTPUT«Buf:0x<4c 61 6e 64 20>␤»
09:48 JimmyZ nom: say ~$*IN.read(5)
09:48 p6eval nom 952b7b: OUTPUT«Buf<83845744>␤»
09:49 moritz or should print() iterate over its argument, and write Buf's contents directly to the stream?
09:52 JimmyZ moritz: where append_inplace method defined in Buf.pm? ~= use it , but I can't find
09:54 moritz JimmyZ: it's gone, and ~= should be gone too
09:54 moritz JimmyZ: you'll notice that if you write ~=, it still works, because that candidate is never picked up
09:55 moritz still it's dead code, and should be removed...
09:55 dalek rakudo/nom: 7a51746 | moritz++ | src/core/Buf.pm:
09:55 dalek rakudo/nom: [Buf] remove cruft noticed by JimmyZ++
09:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7a51746e53
09:55 JimmyZ rakudo doesn't support that candidate?
09:59 tadzik it just becomes a = a ~ b
10:00 moritz JimmyZ: the metaop wins
10:00 moritz see yesterday's logs
10:02 masak I never did submit a rakudobug about that.
10:02 masak someone else is welcome to.
10:02 tadzik oh, good morning :)
10:02 masak otherwise I'll get to it tonight.
10:03 tadzik fwiw, I don't like the magic about say and print too :)
10:06 djanatyn joined #perl6
10:09 koban` joined #perl6
10:12 * Woodi like nom IO::Socket::INET.recv :)
10:15 Woodi maybe not...
10:17 * moritz was a bit surprised by that :-)
10:18 Woodi moritz: realy, i must dig into networking programming and not expect to much automagic :)
10:19 Woodi or documentation would be nice :)
10:19 moritz indeed
10:19 Woodi assuminig behavior is C-like -> parrot -> rakudo
10:19 moritz did you see S32::IO ?
10:19 moritz there's *some* docs, though not much
10:20 Woodi but my recv-test.pl is much faster on nom
10:21 moritz that's good
10:22 Woodi moritz: but tell me one thing pls :) actual I::S::I.recv (from I::S role ) should block on reading 100 chars where only 50 is available for reading ?
10:23 moritz Woodi: I have no idea
10:24 Woodi there is TCP_NODELAY in place...
10:24 Woodi k, /me goes read...
10:28 Gothmog_ joined #perl6
10:29 moritz does .recv work with non-ASCII characters?
10:49 pnp joined #perl6
10:51 Woodi if 'nom 952b7b: OUTPUT«Buf<83845744>␤' are non-ASCII then works
10:52 Woodi will try some japan...
10:55 tadzik nom: my $a = "ziąb".encode; say $a.gist
10:55 p6eval nom 952b7b: OUTPUT«Buf:0x<7a 69 c4 85 62>␤»
10:55 tadzik nom: my $a = "ziąb".encode; say $a.decode
10:55 p6eval nom 952b7b: OUTPUT«ziąb␤»
10:55 tadzik looks ok
10:55 tadzik oh, .recv
10:55 tadzik nvm
10:56 Woodi if i pass to recv exact buffor lenght for what i want then it works (not blocks) and returns what was put into, eg: 良い朝
10:57 Woodi tadzik: select can return number of bytes to read from socket ?
10:58 Woodi s/(select) (can)/$2 $1/
11:00 Woodi s/bytes/bytes available/
11:03 huf i dont think select has that kind of information
11:04 Woodi huf: something have ? or just big buffer + non-blocking socket ?
11:05 tadzik Woodi: I don't think so
11:06 tadzik well, the system recv returns the number of bytes it read, right?
11:06 tadzik so I believe the high-level .recv returns only those bytes that make sense
11:06 tadzik so you can just call it until it returns something
11:07 tadzik may be worth looking how LWP::Simple does it
11:07 Woodi LWP is HTTP and HTTP close sockets and it works :)
11:08 tadzik ah :)
11:08 tadzik let me see
11:09 tadzik $sock.send($req_str); my $resp = $sock.recv(); $sock.close();
11:09 tadzik it would seem that recv() returns everything it has, at once
11:09 grondilu joined #perl6
11:09 huf how does it know when to stop reading?
11:09 huf data might arrive whenever
11:10 tadzik while $bufsize > $!buffer.bytes
11:10 tadzik that's what it does
11:11 tadzik where $bufsize defaults to Int
11:11 tadzik last unless $received.chars;
11:11 tadzik so it stops when it received nothing
11:11 Woodi for me it block line earlier on recv...
11:11 huf ah, so ti reads until the remote end is closed?
11:12 Woodi works for inter^H^H^H^H^H WWW :)
11:14 tadzik huf: until it receives nothing I suppose
11:14 * tadzik checks the state of LWP::Simple
11:17 Trashlord joined #perl6
11:18 tadzik perl6: my %a = grammar => 5;
11:18 p6eval pugs:  ( no output )
11:18 p6eval ..rakudo 7a5174: OUTPUT«===SORRY!===␤Malformed $*PKGDECL at line 1, near "=> 5;"␤»
11:18 p6eval ..niecza v9-32-g380d891: OUTPUT«Potential difficulties:â�¤  %a is declared but not used at /tmp/o02WrVecNi line 1:â�¤------> [32mmy [33mâ��[31m%a = grammar => 5;[0mâ�¤â�¤Â»
11:18 tadzik b: my %a = grammar => 5;
11:18 p6eval b 1b7dd1:  ( no output )
11:18 tadzik *sniff sniff* smells like a nom regression
11:20 masak argh.
11:20 * masak submits rakudobug
11:21 masak tadzik++ # finding it
11:21 tadzik and URI doesn't work anyway, so I won't check if LWP::Simple works :)
11:21 tadzik URI dies with Method 'at_key' not found for invocant of class 'Any'
11:22 tadzik current instr.: 'postcircumfix:<{ }>' pc 715655 (src/gen/CORE.setting.pir:179187) (src/gen/CORE.setting:1014)
11:22 tadzik called from Sub '_block1685' pc 1468 ((file unknown):434) (lib/URI.pm:10)
11:22 tadzik lib/URI.pm:10 is has $!path;
11:22 jnthn nom: my %a = class => 42
11:22 p6eval nom 7a5174: OUTPUT«===SORRY!===␤Malformed $*PKGDECL at line 1, near "=> 42"␤»
11:22 jnthn nom: class => 42
11:22 p6eval nom 7a5174: OUTPUT«===SORRY!===␤Malformed $*PKGDECL at line 1, near "=> 42"␤»
11:22 jnthn hm
11:22 jnthn No clue what changed.
11:22 jnthn Oh
11:22 jnthn Maybe something can't backtrack now that used to be able to.
11:23 * tadzik writes a spectest
11:24 fhelmberger_ joined #perl6
11:24 tadzik wtf. S02-builtin_data_types/ is full of *.rakudo, not a single .t in here
11:25 jnthn tadzik: leftovers after moritz++ did some renaming, perhaps?
11:25 jnthn std: class => 42
11:25 p6eval std c22b2ee: OUTPUT«ok 00:01 118m␤»
11:25 tadzik yeah, seems so
11:27 mberends joined #perl6
11:27 jnthn OK, no idea how STD handles it.
11:27 jnthn As in STD, the first thing is
11:27 jnthn { $*SCOPE ||= 'our'; }
11:27 tadzik nom: use Test; eval_lives_ok('my $rt = { grammar => 5 }', "can have a bareword 'grammar' as a hash key");
11:28 jnthn Which would terminate LTM before it even started, so it can't be that.
11:28 p6eval nom 7a5174: OUTPUT«(timeout)»
11:28 tadzik meh
11:28 tadzik nom: use Test
11:28 p6eval nom 7a5174:  ( no output )
11:29 jnthn oh, unless it's LTM, but on 'grammar => ' as the declarative prefix.
11:29 * jnthn -> lunch
11:31 woosley joined #perl6
11:33 dalek roast: 762eb26 | tadzik++ | S02-types/hash.t:
11:33 dalek roast: Test for RT #99854
11:33 dalek roast: review: https://github.com/perl6/roast/commit/762eb26315
11:36 Psyche^ joined #perl6
11:36 donri joined #perl6
11:40 wamba joined #perl6
11:41 jaldhar joined #perl6
11:49 jaldhar joined #perl6
11:53 dalek rakudo/nom: 09a598f | moritz++ | / (2 files):
11:53 dalek rakudo/nom: implement bitwise operators for Buf
11:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/09a598fed2
11:53 _jaldhar joined #perl6
11:53 colomon moritz++
11:56 masak not long now till RT #100000
11:56 * moritz hopes it won't be a spam ticket
11:56 tzhs joined #perl6
11:58 dalek roast: dea8e4d | moritz++ | S (2 files):
11:58 dalek roast: unfudge Buf tests (bit ops, IO)
11:58 dalek roast: review: https://github.com/perl6/roast/commit/dea8e4db63
11:58 _jaldhar joined #perl6
11:58 moritz b: Buf.new(1) ~ '1'
11:58 p6eval b 1b7dd1:  ( no output )
11:58 moritz b: say Buf.new(1) ~ '1'
11:58 p6eval b 1b7dd1: OUTPUT«Buf()<0x2fb7938>1␤»
11:59 mberends colomon: hi, here is a request for you: merge your Niecza mandelbrot script with this fractal GUI: https://gist.github.com/1235342
11:59 colomon oooh, interesting
11:59 * moritz would love to see that
12:00 colomon I suspect it means I'll finally have to get around to updating my niecza....
12:01 _jaldhar joined #perl6
12:01 pmurias joined #perl6
12:01 pmurias hi
12:02 _jaldhar joined #perl6
12:05 dalek roast: 55a2c9b | tadzik++ | S02-types/hash.t:
12:05 dalek roast: Fix plan
12:05 dalek roast: review: https://github.com/perl6/roast/commit/55a2c9b9ac
12:10 kaleem joined #perl6
12:11 masak hi pmurias
12:18 pmurias masak: when is sorear usually on irc?
12:21 grondilu left #perl6
12:23 * pmurias checks the irc log
12:23 masak pmurias: I'm not sure I can give a more succinct/accurate answer than the IRC logs :)
12:23 masak but it'd be an interesting data mining task to find out.
12:24 * moritz offers to run SQL queries and report the result here
12:24 masak \o/
12:25 moritz ... provided somebody tells me which queries to run :-)
12:25 moritz though you can get a good impression by going to one or two random #perl6 log pages, click on "Turn on filtering by nick" -> sorear
12:25 moritz and then look on the timestamps
12:26 masak aye.
12:26 masak wow, I hadn't noticed that feature before.
12:27 moritz masak: it's only online since July 2009 :-)
12:27 moritz bpetering++ did most of the work
12:28 moritz btw I have two not-quite-finished irclog branches on github
12:28 moritz one is for a summary view
12:28 moritz the second is for an improved search facility (based on KinoSearch)
12:28 masak yeah, things are developing so fast, I can barely keep up... :>
12:32 moritz are there any other features that Buf needs (besides pack and unpack) that I could implement now?
12:33 bluescreen10 joined #perl6
12:34 masak moritz: you could have a look at Str-as-Buf allomorphy.
12:34 masak I still haven't figgered out exactly how that will work.
12:35 moritz is that an S02 insanity?
12:35 masak don't know where the insanity is from.
12:35 masak we do have spectests for it, though.
12:36 moritz Bitwise operations on a "Str" generally fail unless the "Str" in question can provide an abstract "Buf" interface somehow.  Coercion to "Buf" should generally invalidate the "Str" interface.
12:37 moritz did you mean that part?
12:38 masak right.
12:38 masak heh. S03:962: "The use of coercion probably indicates a design error, however." -- don't do that, then! :P
12:39 moritz I looked at that part yesterday too
12:39 moritz I *can* make all the bit ops on Str return Buf instead, but it's going to be quite disappointing in terms of spectests :-)
12:43 sayu joined #perl6
12:49 masak what options are there for debugging a grammar in Niecza?
12:50 Util joined #perl6
12:51 pmurias masak: say statements?
12:52 pmurias masak: i don't think niecza has any fancy tools for that
12:53 PerlJam port jnthn's Grammar::Debugger?
12:53 masak not sure Niecza has enough MOP for that :)
12:53 masak I ended up doing say statements in the action methods, and that got me further.
12:53 masak thanks for your suggestions.
12:53 PerlJam oh, sorry .... port more of 6model to Niecza, then port jnthn's Grammar::Debugger   :)
12:55 pmurias masak: or port http://pugs.blogs.com/pugs/2​007/10/a-graphical-tra.html ;)
12:55 pmurias food&
12:59 masak your suggestions are great, but their scope is bigger than what I had in mind.
13:01 jnthn Port your grammar to...oh wait, nom grammars still suck :(
13:07 sayu joined #perl6
13:07 * PerlJam wonders if the next escalation involves cloning pmichaud or a time machine
13:17 pmurias joined #perl6
13:21 masak where can I learn more about .suppose in STD? it seems like an interesting invention.
13:24 * [Coke] suspects cloning has a more rapid turnaround time in the short term.
13:24 [Coke] Though short term does, of course, get wobbly when talking about time travel.
13:24 [Coke] git st
13:24 [Coke] ww.
13:29 dalek niecza: 10f1ad8 | (Paweł Murias)++ | lib/ (2 files):
13:29 dalek niecza: Added a dummy eval_perl5 op.
13:29 dalek niecza: eval(...,:lang<perl5>) uses it.
13:29 dalek niecza: review: https://github.com/sorear/niecza/commit/10f1ad83d7
13:29 pmurias masak: you are debugging STD?
13:32 Holy_Cow joined #perl6
13:32 Holy_Cow left #perl6
13:32 masak no. just idly browsing through it.
13:40 * pmurias is figuring out how to pluggably embed p5 in niecza
13:46 masak b: class A { method TOP($/) { my @x; for $<letter>.list { push @x, .ast }; make @x }; method letter($/) { if $/ eq "a" { make Nil } else { make ~$/ } } }; grammar G { regex TOP { <letter>* }; regex letter { \w } }; G.parse("bar", :actions(A.new)); say .WHAT for $/.ast.list
13:46 p6eval b 1b7dd1: OUTPUT«Str()␤Any()␤Str()␤»
13:46 masak hm.
13:47 moritz b: say Nil.item.WHAT
13:47 p6eval b 1b7dd1: OUTPUT«Seq()␤»
13:47 moritz b: say Nil.WHAT
13:47 p6eval b 1b7dd1: OUTPUT«␤»
13:47 jnthn Maybe somewhere the Nil gets assigned to a scalar
13:48 jnthn Which sets the scalar bck to its default value (whichcxs is Any)
13:48 jnthn argh, keyboard
13:48 moritz b: say (my $x = Nil).WHAT
13:48 p6eval b 1b7dd1: OUTPUT«Any()␤»
13:48 moritz jnthn++
13:51 nebuchad` joined #perl6
13:54 moritz btw, http://webcast.web.cern.ch/webcast/ for all who are interested in physics and have a bit of spare time
13:54 moritz supposed to start in 6 minutes
13:54 mux on that note
13:54 mux http://i.imgur.com/cDvnU.jpg
13:54 moritz (about the v > c neutrino experiment)
13:54 mux (that pis is about that too.)
13:54 mux pic*
13:55 moritz lots of pics in the paper :-)
13:55 mux but I guess they're not nearly as fun as this one :-P
13:55 mux it practically made me choke over my food
13:56 PerlJam moritz: http://xkcd.com/955 too  :)
13:56 moritz sigh
13:56 * moritz also reads xkcd
13:57 moritz I have no clue if the measurements are right or wrong
13:57 moritz but we shouldn't reject them just because they disagree with the theory
13:57 moritz after all the experiment is the final scientific validation or falsification
13:57 masak agreed.
13:58 mux as far as I'm concerned the only real question here - and it's an interesting one - is how did they fuck up.
13:58 PerlJam mux: you're such a pessimist  :)
13:58 mux call me a sceptic, but I can't even count the number of times I've read about claims of supraluminic speed observations
13:58 moritz for me another interesting question is who "they" are (the ones that fucked it up) -- the theoretists or the experimentalists :-)
13:59 moritz mux: well, most of them are rather obvious or unspectacular
14:00 PerlJam hold on a second ... I'm making cold fusion in my glass of tea
14:00 mux PerlJam: lol!
14:00 mux moritz: well I don't quite see how this one differs
14:00 mux because it's a six-sigma claim?
14:00 jnthn PerlJam: Ugh...I prefer my tea warm :P
14:01 PerlJam jnthn: I live where it's freaking *hot*, we need iced beverages.
14:01 moritz mux: because it's neither phase velocity vs. group velocity, nor speed-of-light-in-medium vs. speed-of-light-in-vakuum
14:01 jnthn Fine fine, you do cold fusiion in your tea, I'll do hot fusion in mine...
14:01 PerlJam moritz++ btw.  thanks for the link.
14:02 moritz cold fusion is only interesting if it doesn't stay cold :-)
14:02 mux moritz: well I guess I'm less easily enthusiastic than you are.
14:04 PerlJam mux: I think you're misattributing what he's enthusiastic about .
14:07 tadzik heh, and it's not long ago since I read why exactly nothing can be faster than a speed of light :)
14:07 tadzik what a disappointment
14:08 PerlJam tadzik: It's not that nothing can *be* faster than the speed of light, it's that nothing can accelerate to faster than the speed of light.
14:08 tadzik hmm, maybe
14:08 tadzik I barely passed my physics, what can I tell :)
14:08 mux PerlJam: I thought I got that pretty well but.. maybe? :-)
14:09 masak PerlJam: that's how I understood it too.
14:09 masak PerlJam: actually, nothing can accelerate *to* the speed of light either. if you're a photon, you're born at that speed, IIUC.
14:09 PerlJam right
14:09 moritz fwiw the special relativity allows particles with m > 0 and v > c, but they shouldn't be able to interact with the "normal" v < c particles
14:10 tadzik so they're like, in a different namespace? :)
14:10 koban` left #perl6
14:10 moritz right
14:10 mux scoped particles
14:10 tadzik . o O ( worldspace )
14:11 PerlJam oh great!! now the windows camp is going to blame linux whenever it's shown that this experiment was flawed in some way
14:11 moritz :-)
14:12 stepnem joined #perl6
14:18 dalek nqp: a6899ad | moritz++ | src/QAST/Compiler.nqp:
14:18 dalek nqp: [QRegex] do not quote method names in nqp
14:18 dalek nqp:
14:18 dalek nqp: no functional changes
14:18 dalek nqp: review: https://github.com/perl6/nqp/commit/a6899ad70d
14:18 tadzik heh, I got _so_ excited seeing "nqp: [QRegex]" :0
14:18 tadzik :)
14:18 moritz and then it says "no functional changes" :/
14:19 tadzik :)
14:19 alvis joined #perl6
14:19 tadzik I like a bit of excitement in the morning, either way :)
14:19 tadzik oh crap, it's afternoon already? Diem perdidi, again :\
14:24 mls_ hi perl6
14:24 mls_ seen jnthn
14:24 aloha jnthn was last seen in #perl6 23 mins 13 seconds ago saying "Fine fine, you do cold fusiion in your tea, I'll do hot fusion in mine...".
14:25 mls_ jnthn: is the $pblock<uninstall_if_immediately_used> used to make things faster?
14:25 * [Coke] does cold fusion in his computer, instead.
14:26 mls_ jnthn: why not just use the SC?
14:26 woosley left #perl6
14:27 jnthn mls_: iirc there's a bit more to it than that...
14:27 jnthn mls_: I suspect the optimizer may rely on that too...
14:27 jnthn It goes looking for PAST::Block with blocktype immediate.
14:28 jnthn And I think that mechanism is the only way we get such a thing.
14:29 jnthn I guess we could do it with an SC lookup *and* a node to immediately call the looked up thing.
14:29 jnthn But it's a bit of a pain to resolve.
14:30 espadrine joined #perl6
14:31 mls_ I changed the when_handler_helper to put the call to succeed outside of the block
14:31 jnthn hm
14:32 jnthn Why, ooc?
14:32 mls_ so that a caught exception still does the succeed
14:33 jnthn I feel like I'm missing something...
14:33 mls_ example: default { die; CATCH { default {} } }
14:33 mls_ the when handler used to change the code to (more)
14:34 mls_ default { die; succeed(); CATCH { default {} } }
14:34 jnthn oh
14:34 jnthn yeah, I see the issue.
14:34 jnthn But wait...
14:35 jnthn It should only succeed if the block is called?
14:35 jnthn I mean, if the when matches?
14:35 mls_ yes
14:35 jnthn Right, so long as you have it that way... :)
14:35 mls_ oh, the "if EXPR" is already outside of the block
14:35 mls_ (I mean if $_ ~~ EXPR)
14:35 jnthn Right, and the succeed is outside of the block but inside the if?
14:36 mls_ the succed was inside, which doesn't work with exceptions
14:36 mls_ so I changed the code so that it generates if $_ ~~ EXPR  succeed(call_block())
14:37 woosley joined #perl6
14:38 jnthn k
14:38 mls_ when {} and default {} are a bit different regarding the block
14:39 mls_ when has $pblock := pblock_immediate($pblock);...
14:40 mls_ default just uses $block<past_block>
14:41 * jnthn wonders if there's a good reason for that, and isn't convinced there is
14:50 TimToady note that S04:949 implies that the succeed evaluates the entire block
14:51 PerlJam http://johncostella.webs.com/neutrino-blunder.pdf   That was quick.
14:52 jnthn TimToady: "evaluates the entire block"?
14:53 jnthn TimToady: As in, we have to make it to the end of the block first?
14:53 shinobicl joined #perl6
14:53 jnthn Got an example where we might hit problems with the change mls++ is suggesting?
14:53 mls_ can't I use "leave 5" in that block?
14:54 TimToady succeed has to return value of the block; that implies evaluating every statement of the block
14:54 mls_ But that's like in every other block, right?
14:55 TimToady eh? I'm saying the spec supports mls_'s change, iiuc
14:55 jnthn TimToady: Oh, I see :)
14:55 jnthn TimToady: Sorry, bit slow today ;)
14:55 TimToady so leave 5 works fine, because it leaves the block inside the succeed
14:55 mls_ I also thought that you argued against it ;)
14:56 jnthn Maybe it's some strange physical effect where the words travel faster than their meaning :)
14:56 TimToady I don't remember when we changed it to be that way, but we can't get the value of the block correctly by rewriting the block innards, at least not without a great deal of fragility
14:57 TimToady I think the strange physical effect is in someone's brane :P
14:59 jnthn :P
15:03 mls_ I don't understand why you don't get block duplications with pblocks
15:04 mls_ I must be missing some tricky code
15:06 jnthn Actions.pm:55
15:07 jnthn Notice the .shift
15:07 mls_ oh, the shift as some extra meaning?
15:07 jnthn iirc it's making sure we don't dupiclately emit it.
15:08 mls_ tricky, tricky
15:09 jnthn It's probably me you need to blame for that.
15:12 woosley joined #perl6
15:14 molaf joined #perl6
15:25 im2ee joined #perl6
15:25 im2ee Hello! :)
15:26 masak im2ee: hej!
15:26 Chat0897 joined #perl6
15:28 mberends joined #perl6
15:34 ggoebel joined #perl6
15:35 rulker joined #perl6
15:38 simcop2387 joined #perl6
15:39 MayDaniel joined #perl6
15:43 Woodi when i chopped everything from IO::Socket.recv (role) it starts to work... and acording to pir, eg: buf = sock.'recv'() just works without params
15:43 masak niecza: sub infix:<@>($x,$y) is equiv<*> { $x * $y }; say 1 + 2 @ 3
15:43 Woodi still returns String
15:43 p6eval niecza v9-33-g10f1ad8: OUTPUT«7␤»
15:43 masak niecza++
15:45 TimToady what's equiv<*> supposed to mean?
15:46 TimToady ooh, it's specced :)
15:46 masak :P
15:46 TimToady doubtless I did that myself...
15:47 masak moritz: this explains it. 2011-06-18 was the weekend jnthn and I were organizing NPW. no wonder I don't recall the .gist discussion!
15:48 jnthn oh man, *that* weekend.
15:48 jnthn :)
15:48 jnthn It was a little distracting ;)
15:49 masak I've now read the backlog for that day. I still maintain breaking 'say = print + "\n"' is a bad idea.
15:49 masak so whatever say does, print should do too.
15:50 PerlJam wait ... what?  what's the proposed breakage?
15:50 jnthn At the moment, say calls .gist, and print does not.
15:50 PerlJam ah
15:50 PerlJam I agree with masak++ then.
15:50 jnthn Well, at first I thought it was just an oversight when in Rakudo.
15:50 sayu_ joined #perl6
15:50 jnthn s/when //
15:51 PerlJam (well, I agreed with him anyway, but whatever ;)
15:52 masak jnthn: TimToady says print and say will be different here: http://irclog.perlgeek.de/​perl6/2011-06-18#i_3953131
15:55 jnthn ugh.
15:55 thou joined #perl6
15:59 sayu joined #perl6
16:02 * masak decommutes
16:02 sftp joined #perl6
16:03 japhb Blubble.  Fleeble flubble.  Funf.
16:03 phenny japhb: 08:42Z <jnthn> tell japhb Hmm...seems that's what I implemented. Maybe it's not the most useful semantics for that case though...
16:03 japhb (Learning my lesson from yesterday ...)
16:04 japhb jnthn, Where and how would I go about fixing that case?
16:16 jnthn japhb: It really needs $capture ~~ $signature to work.
16:17 jnthn japhb: That bit is...tricky. I really didn't like the "solution" I had for it before, so I'd rather not tell you go look at that and copy it.
16:19 snarkyboojum fwiw, I like that say, gists, and print does something quite semantically different :)
16:20 jnthn japhb: The general problem is that to check a signature is going to bind - if it has where clauses - involves having a lexical scope around to really bind stuff in to.
16:21 jnthn japhb: At the moment there's no link from signature to code object so we could create such a scope.
16:21 mberends joined #perl6
16:22 snarkyboojum the difference between print and say being \n seemed too cute imo - this is a real graspable difference :)
16:22 jnthn In master I ended up "magically" creating one, but...it was beyond evil. I'm pondering just giving signature objects a backlink to a code object. And then have an op that does something a bit like how multidispatch.c disambiguates things with constraints.
16:23 mberends joined #perl6
16:23 jnthn Of course, this gives some fun with signature literals too.
16:23 japhb jnthn: Understood (mostly) so far.
16:25 japhb Here's the thing I'm missing: How is the only case different from the multi case?  Just the presence of the proto?
16:25 Vlavv_ joined #perl6
16:26 jnthn japhb: Well, just that we have a multi-dispatcher
16:26 jnthn japhb: And it knows how to do all of the checks in question
16:26 jnthn Oh!
16:26 japhb :-)
16:26 jnthn A simpler way would be to just magically create a dispatcher. :)
16:26 espadrine joined #perl6
16:27 jnthn japhb: Anyway, if you want to hack on this bit, I can guide you through it. If you'd rather continue with the USAGE work and assume I'll land a fix for this bit in the next day or so, that's also fine. Whichever you'd prefer. :)
16:29 japhb jnthn, hmmm.  I have to commute in a couple, and then by the time I decommute you will probably be close to sleep.  Let's go with option 2, and if I get blocked over the weeken, I'll try for option 1.  Sound good?
16:30 jnthn japhb: Works for me. :)
16:30 japhb thx!
16:30 japhb commuting &
16:32 Chillance joined #perl6
16:53 plobsing_ joined #perl6
17:12 alvis joined #perl6
17:18 Khisanth joined #perl6
17:18 cognominal joined #perl6
17:21 REPLeffect joined #perl6
17:24 pmurias joined #perl6
17:25 pmurias sorear: ping
17:25 colomon joined #perl6
17:30 kaleem joined #perl6
17:32 mls_ perl6: my $a = "xxx" ; { say $a ; my $a; }
17:32 p6eval niecza v9-33-g10f1ad8: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Lexical symbol '$a' is already bound to an outer symbol (see line 1);â�¤  the implicit outer binding at line 1 must be rewritten as $aâ�¤  before you can unambiguously declare a new '$a' in this scope at /tmp/JyLyJ9IBTk line 1:â�¤-…
17:32 p6eval ..rakudo 09a598: OUTPUT«Any()␤»
17:32 p6eval ..pugs: OUTPUT«*** ␤    Unexpected ";"␤    expecting word character, "?", "!", trait, "=" or infix assignment␤    Redeclaration of "$a" conflicts with earlier OUTER references in the same scope␤    at /tmp/z6Tp0xayCR line 1, column 33␤»
17:33 jnthn std for the win!
17:33 mls_ ;)
17:33 jnthn Should nab that for Rakudo :)
17:36 masak joined #perl6
17:36 mls_ Seems like I have to change pct a bit for the when{} handling
17:36 masak weekend! \o/
17:36 jnthn mls_: Oh? Why?
17:37 jnthn brb, going to shop to get ingredients for dinner :)
17:37 mls_ The block handlers need to be of type Past::Control, but Past::Control always does a .return
17:39 Tene joined #perl6
17:39 Tene joined #perl6
17:41 mls_ a way to tell :pasttype('try') which exceptions to catch would also work
17:42 mls_ (i.e. handle_types / handle_types_except)
17:44 mls_ for now I tried to emulate it with a block handler, as PAST::Stmts also allows block handlers
17:45 mls_ but for PAST::Stmts handlers PAST::Control is wrong
17:47 Tene mls_: PAST::Control is wrong for most things; I really screwed up the API when I added it.
17:47 mberends joined #perl6
17:49 mls_ But it's the only Node that takes handle_types / handle_types_except ...
17:50 mls_ (which is called by wrap_handlers)
17:53 mls_ (Btw, why is the handlers() method in Past::Node? Not that I mind...
17:53 jnthn back
17:53 jnthn Stuff tends to go in PAST::Node when it's meant to be availble on all nodes.
17:54 mls_ ok, but handlers() ?
17:55 mls_ oh wait, it's used in PAST::Node
17:56 mls_ (Actually that's also what I tried to use, but it didn't work because of PAST::Control)
17:57 mls_ I need a flag for PAST::Control to tell it not to do the return/rethrow thing
18:03 Tene mls_: Several people have mentioned that PAST::Control is insufficient for most uses.
18:03 Tene It could definitely use some changes.
18:04 japhb_ joined #perl6
18:04 [Coke] bah! I also fell for the qregex commit!
18:04 mls_ yes, I think I'll patch it a bit next week
18:04 mls_ ^tene
18:05 Tene You may consider asking around or posting to the mailing list to see what other people might want in there.
18:05 mls_ ask around on #parrot?
18:05 japhb_ Where is the val() function defined in Rakudo? (Or is it?) I'm failing in my search fu.
18:06 zby_home_ joined #perl6
18:06 jnthn [Coke]: qregex commit?
18:06 jnthn oh, I see it :)
18:06 mkramer1 joined #perl6
18:07 masak japhb_: NYI, I think.
18:07 * [Coke] ponders going through more RT tickets on lunch break.
18:08 kaare_ joined #perl6
18:08 [Coke] rakudo: class A {has @.s}; my %h='n'=><a1 a2 a3>; say %h<n>.perl;my A $x.=new(:s(%h<n>));say $x.s.perl
18:08 p6eval rakudo 09a598: OUTPUT«("a1", "a2", "a3")␤Array.new("a1", "a2", "a3")␤»
18:09 masak today's mini-challenge: two boxes A and B, initially filled with 40 matches each. flip a coin, remove a match from A if heads or B if tails. repeat until you pick the last match from one of the box. how many matches are left in the other box?
18:09 masak (yes, the answer is a distribution on the numbers 1..40)
18:09 [Coke] rakudo: sub foo(@a, $b) {}; foo(5)
18:09 p6eval rakudo 09a598: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Int instead␤  in sub foo at /tmp/cltorqQTN2:1␤  in <anon> at /tmp/cltorqQTN2:1␤  in <anon> at /tmp/cltorqQTN2:1␤␤»
18:12 mls_ afk -> weekend
18:15 japhb_ masak, thanks for the NYI confirmation
18:22 shinobicl left #perl6
18:24 [Coke] IWBNI we had an RT bot in here.
18:24 [Coke] Ticket opened, ticket closed, etc.
18:24 diakopter masak: may I ask how you came across that challenge/problem?
18:25 diakopter or did you invent it
18:28 * moritz thinks he knows an expression for the solution
18:29 moritz but the evaluation of that expression seems... like I don't want to do it by hand :-)
18:33 colomon if only we had automated tools capable of evaluating mathematical expressions!
18:33 [Coke] moritz: can you take a look at https://rt.perl.org/rt3/Ti​cket/Display.html?id=63596 ? the original null pmc is long gone. what's left to do?
18:33 moritz nom: say 0.5e0 ** 79
18:33 p6eval nom 09a598: OUTPUT«1.65436122510606e-24␤»
18:34 replore joined #perl6
18:35 moritz [Coke]: just needs tests
18:35 masak diakopter: through my acquaintance hakank++, as is often the case with this type of problem ;)
18:36 sorear good * #perl6
18:36 diakopter p
18:36 mberends hello sorear!
18:37 masak *, sorear
18:37 [Coke] moritz: annotating.
18:37 masak diakopter: actually, already a couple of days back I wrote a simulator for the problem: https://gist.github.com/1221405
18:38 japhb_ o/ sorear
18:38 masak first it looks like 2 or 3 matches is the most likely outcome, but that appears to be a coarseness artifact.
18:38 masak as one increases N to the millions it becomes 1.
18:39 sorear masak: the environment variables, NIECZA_{HIGHWATER,RX,LTM}_TRACE, can be set; this is what I used when getting STD to work, mostly
18:39 [Coke] rakudo: say 6 >== 2
18:39 p6eval rakudo 09a598: OUTPUT«Cannot assign to a non-container␤  in <anon> at /tmp/kWHoPknO_U:1␤  in <anon> at /tmp/kWHoPknO_U:1␤␤»
18:39 moritz masak: that seems... unlikely
18:39 masak sorear: ooh, nice.
18:39 masak moritz: what does?
18:39 masak moritz: 2 or 3?
18:39 moritz masak: that it approaches 1
18:39 masak moritz: 1 seems highly likely to me.
18:39 masak why doesn't it to you? :P
18:40 moritz masak: because the variance grows with sqrt(n)
18:40 sorear masak: which value is "N"?
18:41 moritz what was 40 in the original example, I think
18:41 [Coke] rakudo: my $x = package {...}
18:41 p6eval rakudo 09a598: OUTPUT«===SORRY!===␤The following packages were stubbed but not defined:␤    <anon>␤␤»
18:41 masak sorear: number of simulations.
18:41 sorear so MATCHES is fixed to 40?
18:41 masak aye.
18:41 masak moritz: sorear++ found our misunderstanding.
18:41 moritz oh
18:42 masak sorry for just calling something N. :)
18:42 masak should've said $RUNS like in https://gist.github.com/1221405
18:43 [Coke] is .PARROT gone now?
18:43 moritz yes
18:43 [Coke] what happened to it?
18:43 masak 6model :P
18:43 moritz it rests in peace
18:44 moritz [Coke]: we don't leak any non-6model objects to the userspace
18:45 [Coke] moritz: yay, kills a ticket.
18:46 moritz masak: have you calculated the expectation value of the number of remaining things?
18:47 moritz according to niecza, the answer is -Infinity
18:47 moritz :/
18:48 [Coke] https://rt.perl.org/rt3/Ti​cket/Display.html?id=68636 - can we just reject this as "no, no you can't"?
18:49 [Coke] ah, read in more detail, we might need to address that, nevermind.
18:49 masak moritz: so far I haven't been approaching the problem analytically at all.
18:50 pmurias joined #perl6
18:50 moritz masak: want to hear my analytical approach?
18:50 sorear I just wrote a nonrandomized solution
18:50 pmurias sorear: hi
18:51 sorear I wouldn't quite call it "analytical"
18:51 pmurias sorear: how can we have a pluggable C# module?
18:52 pmurias s/C# module/assembly
18:52 sorear pmurias: Assembly.Load?
18:53 moritz sorear: please share :-)
18:54 [Coke] rakudo: say 1.WHAT;
18:54 p6eval rakudo 09a598: OUTPUT«Int()␤»
18:54 [Coke] rakudo for 1,2,3 { say .WHAT }
18:54 [Coke] rakudo for: 1,2,3 { say .WHAT }
18:54 moritz rakudo: for 1,2,3 { say .WHAT }
18:54 [Coke] rakudo: for 1,2,3 { say .WHAT } #argh ;)
18:54 p6eval rakudo 09a598: OUTPUT«Int()␤Int()␤Int()␤»
18:54 p6eval rakudo 09a598: OUTPUT«Int()␤Int()␤Int()␤»
18:54 sorear moritz: mind if I debug it first?
18:54 moritz sorear: whatever you prefer
18:54 pmurias sorear: and how do we expose methods from the assembly?
18:55 [Coke] rakudo: for 1,2,3 { print .WHAT } #argh ;)
18:55 p6eval rakudo 09a598: OUTPUT«Use of uninitialized value in string context␤Use of uninitialized value in string context␤Use of uninitialized value in string context␤»
18:55 wamba joined #perl6
18:55 [Coke] so, is that an intended issue with print over say?
18:55 moritz yes, that conforms to current spec
18:55 mkramer1 left #perl6
18:56 masak moritz: sure.
18:56 [Coke] rakudo: for 1,2,3 { print ~.WHAT } #argh ;)
18:56 sorear pmurias: what?
18:56 p6eval rakudo 09a598: OUTPUT«Use of uninitialized value in string context␤Use of uninitialized value in string context␤Use of uninitialized value in string context␤»
18:56 moritz masak: lemme write it up...
18:56 [Coke] rakudo: for 1,2,3 { print .WHAT.gist } #argh ;)
18:56 p6eval rakudo 09a598: OUTPUT«Int()Int()Int()»
18:57 pmurias sorear: if we have the p5 interop in an assembly we load using Assembly.Load, we want to load it somehow right?
18:57 sorear http://pastie.org/2580782
18:57 sorear http://pastie.org/2580784
18:59 pmurias s/load/use sorry
18:59 masak sorear: nice. I thought of something like that, but hadn't gotten around to implementing it.
18:59 masak sorear: represent those as exact quotients, and we're done ;)
19:00 [Coke] we now have 36 tickets explicitly blocking on test coverage. chop chop. ;)
19:01 masak [Coke]++
19:02 sorear masak: my version is using exact numbers internally.  What output format would you like to see?
19:02 sorear pmurias: oh.  Well if you load an assembly like that, you need to use reflection to access it.
19:03 moritz sorear, masak: https://gist.github.com/1238173
19:05 pmurias sorear: Assembly.CreateInstance("P5Interpreter") with a cast to an interface?
19:05 masak moritz: yes, I had a feeling combinations'd be involved.
19:05 im2ee joined #perl6
19:05 moritz actually the 39**(40-N) / (40 -n)! isn't quite correct
19:05 masak moritz: and the factor 2 makes a lot of sense too, since by symmetry the distribution is essentially folded up on itself.
19:06 masak moritz: it isn't?
19:06 moritz should be (N chose (40 - N))
19:06 moritz *choose
19:06 masak right.
19:08 * moritz is too tired to compare that to sorear's solution
19:08 sorear pmurias: thats one approach
19:10 moritz std: $?USAGE
19:10 p6eval std c22b2ee: OUTPUT«ok 00:01 118m␤»
19:10 moritz std: $?FOO
19:10 p6eval std c22b2ee: OUTPUT«Potential difficulties:â�¤  Unrecognized variable: $?FOO at /tmp/RVskHAxvpJ line 1:â�¤------> [32m$?FOO[33mâ��[31m<EOL>[0mâ�¤ok 00:01 118mâ�¤Â»
19:11 mkramer joined #perl6
19:11 sorear std accepts $?FOO if something in the system has defined $main::FOO
19:11 moritz how should $?USAGE be scoped?
19:11 donri joined #perl6
19:11 sorear I thinkm it may be getting confused by the sub USAGE in the globabl package created by viv
19:12 sorear moritz: is $?USAGE a real thing?
19:12 moritz sorear: yes
19:12 moritz sorear: it holds the autogenerate usage message for MAIN
19:12 sorear mild ick
19:13 sorear I would make it the same scope as &MAIN
19:15 wallberg joined #perl6
19:15 masak wallberg: oh hai!
19:15 sorear Hello wallberg!
19:15 moritz sorear: makes sense-isch
19:16 sorear masak: who is wallberg?
19:17 sorear pmurias: depending on exactly what you're doing there may be a simpler way
19:17 pmurias sorear: what would be better?
19:18 sorear pmurias: what entry points are you including, besides eval?
19:19 masak sorear: he's a former classmate's colleague from Uppsala.
19:19 sorear masak: not from Utrecht?
19:19 pmurias sorear: i'm not sure what we will need
19:19 pmurias maybe loading a module
19:20 pmurias looking up stuff in a namespace?
19:20 sorear cast to interface probably best then
19:20 sorear more flexible
19:21 mberends sorear: is there a way to pass pointers to integers via CLR interop?  For example, $obj.GdkWindow.GetGeometry($winX, $winY, $width, $height, $depth); # to write into these scalars
19:21 mkramer left #perl6
19:22 masak sorear: not that I know.
19:22 mj41 joined #perl6
19:22 sorear mberends: https://github.com/sorear/niecza/issues/57
19:24 mberends sorear: thanks. I take that to mean "not yet".
19:25 * sorear puts #57 on the fix-before-v10 list
19:26 * mberends will try to fix #58 today or tomorrow
19:27 sorear mberends++
19:27 masak \o/
19:28 sorear in other questions, I wonder where CLR-interop-tests belong
19:29 mberends very good question. first instinct is: in Niecza, not Roast
19:30 pmurias but p5-interop tests belong in roast?
19:31 moritz pmurias: yes, that's specced
19:31 mberends pmurias: yes, that makes sense, because it should be possible on all implementations.
19:35 pmurias sorear: unless some other implementation does CLR interop having it roast as opposed to in niecza doesn't help
19:37 pmurias sorear: how do i make gmcs compile a .cs file into an assembly instead of an .exe?
19:39 masak sorear: Niecza is so fast! I love it!
19:40 mberends pmurias: -target:KIND where KIND can be one of: exe, winexe, library, module
19:41 mberends an assembly is a library
19:42 diakopter .exe are assemblies too
19:42 diakopter able to be loaded just like libraries
19:43 mberends yes, it's all the same 'MZ' file format
19:49 sorear in CLR, PE, and ELF alike, an executable is basically just a library with a main()
19:50 sorear you can dlopen executables; I haven't tried LoadLibrary
19:51 diakopter Assembly.Load can open .exe
19:51 sorear niecza/master uses Assembly.Load to load the CLR code generator, which is an .exe for bootstrapping reasons
19:53 pmurias sorear: where does Assembly.Load search for files?
19:54 sorear pmurias: http://msdn.microsoft.com/e​n-us/library/yx7xezcf.aspx
20:03 diakopter niecza: say eval("eval('eval(\\\"eval(\\\'42\\\')\\\")')")
20:03 p6eval niecza v9-33-g10f1ad8: OUTPUT«Unhandled exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤  at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename unkn…
20:03 masak diakopter++ # twisted!
20:04 dalek niecza: 24ecad7 | mberends++ | examples/gtk-sierpinski.pl:
20:04 dalek niecza: [examples/] add gtk-sierpinski.pl
20:04 dalek niecza: review: https://github.com/sorear/niecza/commit/24ecad7c1b
20:06 diakopter sorear: see above
20:08 sorear niecza: sub eval($x) { say $x; CORE::eval $x }; say eval("eval('eval(\\\"eval(\\\'42\\\')\\\")')")
20:08 p6eval niecza v9-33-g10f1ad8: OUTPUT«eval('eval(\"eval(\'42\')\"​)')␤eval(\"eval('42')\")␤Unhandled exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤  at Lexer.RunDispatch (Niecza.Frame fro…
20:08 sorear niecza: say eval q[eval(\"eval('42')\")]
20:08 p6eval niecza v9-33-g10f1ad8: OUTPUT«Unhandled exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤  at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename unkn…
20:08 TimToady masak: why does your CSV module do $output ~~ Any ?
20:08 sorear niecza: say eval(\"eval('42')\")
20:08 p6eval niecza v9-33-g10f1ad8: OUTPUT«Unhandled exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤  at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename unkn…
20:09 sorear niecza: say(\"eval('42')\")
20:09 p6eval niecza v9-33-g10f1ad8: OUTPUT«Unhandled exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤  at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename unkn…
20:09 sorear niecza: \"eval('42')\"
20:09 p6eval niecza v9-33-g10f1ad8: OUTPUT«Unhandled exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤  at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename unkn…
20:09 sorear niecza: "\"
20:09 p6eval niecza v9-33-g10f1ad8: OUTPUT«Unhandled exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤  at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename unkn…
20:09 sorear niecza: "
20:09 p6eval niecza v9-33-g10f1ad8: OUTPUT«Unhandled exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤  at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename unkn…
20:09 sorear wow
20:09 diakopter nice golfing
20:11 masak TimToady: I... I don't remember. at all.
20:11 * masak checks
20:12 diakopter std: "
20:12 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse double quotes at /tmp/FTSlguLwpC line 1:�------> [32m<BOL>[33m�[31m"[0m�Couldn't find final '"'; gave up at /tmp/FTSlguLwpC line 1 (EOF):�------> [32m"[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 117m�»…
20:13 masak TimToady: I see no good reason, for it, and I don't remember.
20:13 masak TimToady: my guess is that memory loss will correspond to some test failures.
20:13 dalek niecza: 2802b4e | mberends++ | examples/gtk-clock.pl:
20:13 dalek niecza: [examples/] add gtk-clock.pl
20:13 dalek niecza: review: https://github.com/sorear/niecza/commit/2802b4e7e8
20:13 masak luckily, it's not a lot of code, and should be easy to fix.
20:17 diakopter niecza: say eval("eval('eval(\"eval(\\\'42\\\')\")')")
20:17 p6eval niecza v9-33-g10f1ad8: OUTPUT«42␤»
20:19 sorear niecza: say eval q[eval q[eval q[q[42]]]] # more readable
20:19 p6eval niecza v9-33-g10f1ad8: OUTPUT«42␤»
20:20 diakopter niecza: say eval eval eval eval eval eval eval eval eval eval 42
20:20 p6eval niecza v9-33-g10f1ad8: OUTPUT«42␤»
20:20 bluescreen10 joined #perl6
20:20 pmurias sorear: does "mono run/Niecza.exe -C CORE" need to be run after every change to lib/Builtin.cs?
20:20 diakopter pmurias: oh, I have that question too
20:22 pmurias diakopter: are you hacking on niecza? ;)
20:23 diakopter obliquely
20:23 sorear pmurias: not every change, no
20:25 sorear pmurias: CORE.dll depends on CLRBackend.exe wich depends on Kernel.dll which depends on Builtins.cs
20:25 sorear if you make changes to Builtins.cs, it can affect the generation of code for CORE.dll
20:25 sorear for instance changing the signature of a nam-exposed method
20:25 pmurias where do i need to keep the Interpreter interface? it needs to be kept in a seperate assembly so it can be loaded by both the Perl5Interpreter.cs and Bulitins.cs?
20:26 sorear pmurias: I recommend putting it in Builtins.cs
20:27 pmurias ok
20:27 pmurias and how should i compile Perl5Interpreter.cs so that it can use that?
20:29 sorear /lib:obj /r:Kernel.dll
20:29 nebuchadnezzar joined #perl6
20:30 Sarten-X joined #perl6
20:33 pmurias sorear: so how do we call the interface?
20:33 TimToady masak: here https://gist.github.com/1238385 is all the changes I had to do to get the code to work on my data
20:34 pmurias sorear: ForeignLanguage?
20:34 masak TimToady: ok, excellent.
20:34 masak I'll see if I can turn that into a commit.
20:34 TimToady it's just a local copy without the Text:: on the front
20:35 TimToady oh, and it was running under niecza, not nom
20:35 masak fair enough.
20:36 masak TimToady: was the s/Text::// change necessary to make it work?
20:37 masak also, there seems to be debug output in the grammar ;)
20:38 TimToady yes, like it actual says where it stopped parsing this way :)
20:38 TimToady *ly
20:39 masak I think I'll have to use that gist more like a guideline than as material for a patch.
20:40 mkramer joined #perl6
20:40 mkramer left #perl6
20:40 masak but getting it to work on niecza could be my only sensible option -- b is old hat and nom doesn't do grammars properly yet.
20:41 jnthn :(
20:44 * jnthn is very frustrated that the one week pmichaud++ was around quite a bit of late was wasted on Parrot mess.
20:44 diakopter which week was that
20:45 sorear pmurias: sorry, I don't understand the question.
20:45 jnthn diakopter: The one the "Parrot needs to throw away its deprecation policy" email came out.
20:45 diakopter oh
20:48 dalek niecza: e5a3ec5 | (Paweł Murias)++ | / (4 files):
20:48 dalek niecza: Evaling perl5 code loads the Perl5Interpreter class.
20:48 dalek niecza: Perl5 interop support is built with "make perl5"
20:48 dalek niecza: review: https://github.com/sorear/niecza/commit/e5a3ec51ee
20:49 TimToady masak: also, \%hash wants to be item %hash
20:49 pmurias sorear: see the commit
20:50 sorear pmurias: looks fine
20:50 pmurias do we use the IForeignLanguage naming convention?
20:50 am0c joined #perl6
20:51 diakopter pmurias: does loading obj/Perl5Interpreter.dll work if the cwd is somewhere else?
20:51 donri joined #perl6
20:51 sorear pmurias: I am neutral
20:51 sorear oh
20:51 sorear you should just use Assembly.Load("Perl5Interpreter")
20:52 sorear the assembly loading path is already set to obj
20:52 pmurias ok
20:55 dalek niecza: 65732d5 | (Paweł Murias)++ | lib/ (2 files):
20:55 dalek niecza: prefix the name of the interface with an I
20:55 dalek niecza: review: https://github.com/sorear/niecza/commit/65732d57cd
20:55 dalek niecza: 87f66df | (Paweł Murias)++ | lib/Builtins.cs:
20:55 dalek niecza: Load the p5 interpreter assembly from the loading path.
20:55 dalek niecza: review: https://github.com/sorear/niecza/commit/87f66df0ab
20:56 pmurias diakopter,sorear: fixed
20:58 pmurias sorear: so the next problem is that for the real interop we need to compile a .c file into an .so one and load that
20:58 pmurias how do we do that portably?
20:58 pmurias or should i just assume gcc?
21:00 zby_home__ joined #perl6
21:00 sorear You should probably use the same C compiler Perl5 was compiled with
21:01 sorear perldoc ExtUtils::Embed
21:01 masak 'night, #perl6
21:01 pmurias masak: 'night
21:01 diakopter speedy
21:02 sorear I guess you want perl -V:cc too
21:02 * sorear reads perlembed
21:09 Reaganomicon joined #perl6
21:14 dalek niecza: 1e1a24e | (Paweł Murias)++ | / (6 files):
21:14 dalek niecza: Eval runs basic perl5 code. The Makefile needs review to check if it can
21:14 dalek niecza: be made more portable.
21:14 dalek niecza: review: https://github.com/sorear/niecza/commit/1e1a24ea86
21:14 TimToady \o/
21:15 sjn oh, nice
21:15 sorear \o/
21:17 Woodi niecza can mix v6 and v5 in one program ?
21:18 pmurias to a very basic degree
21:18 pmurias in the current revision only ;)
21:19 Woodi i am nearly sure will be better :)
21:22 sorear Woodi: rakudo can/could do better.
21:22 pmurias mildew too
21:23 sorear (keep in mind as I say this that pmurias++ has been working on niecza+p5 for, I guess a few hours now)
21:24 sorear niecza> my $r = 0; say CLR::System::Math.DivRem(100, 7, $r); say $r;
21:24 sorear 14
21:24 sorear 2
21:24 im2ee Good night! :)
21:24 Woodi gn
21:25 pmurias sorear: do you know how can i load the dll in a way it won't depend on the cwd?
21:25 dalek niecza: 3a80d56 | sorear++ | lib/NieczaCLR.cs:
21:25 dalek niecza: [CLR] Implement calling methods with ref-parameters
21:25 dalek niecza: review: https://github.com/sorear/niecza/commit/3a80d56530
21:26 sorear pmurias: Assembly.Load("Perl5Interpreter") will look first for $NIECZA_ROOT/obj/Perl5Interpreter.dll
21:26 sorear pmurias: specifically it looks in AppDomain.CurrentDomain.BaseDirectory
21:26 pmurias sorear: i meant the .so
21:27 pmurias the one we compile from c code
21:27 sorear good question, I've never tried it
21:28 sorear pmurias: how did mildew cope with users who don't have a libperl.so?
21:28 pmurias mildew depended on perl5
21:30 pmurias i did some tricks with the linker
21:30 sorear pmurias: perl 5.12.0 defaults to installing only perl and libperl.a, not libperl.so
21:30 sorear I don't know if they reversed that change in 5.14
21:31 y3llow_ joined #perl6
21:31 dalek niecza: bb5a7c3 | mberends++ | lib/Printf.cs:
21:31 dalek niecza: [lib/Printf.cs] implement minimum width for %s, fixes issue #58
21:31 dalek niecza: review: https://github.com/sorear/niecza/commit/bb5a7c3e1d
21:31 pothos_ joined #perl6
21:32 pmurias sorear: i have 5.12.0 and the embedding works
21:32 pmurias the embedding in niecza that is
21:32 sorear mberends: if you make your commits match /fixes #\d+/ then github will automatically clolse the issue.
21:33 pmurias sorear: you have a perl from perlbrew or a tampered one from the package system?
21:33 diakopter pmurias: I haven't checked; did you add the stuff to make clean?
21:33 sorear pmurias: I have a Perl I built myself from source with all default options
21:33 mberends sorear: I'm still getting used to github issue tracking
21:34 sorear pmurias: how did mildew/smop embed perl?
21:34 pothos_ joined #perl6
21:34 * sorear needs to track down an old version of gcc so ey can play with mildew/smop
21:34 y3llow joined #perl6
21:34 diakopter $ ./run/Niecza.exe -e 'eval("print \"Hello \";",:lang<perl5>)'
21:34 diakopter Aborted
21:36 pmurias diakopter: did you run make perl5?
21:36 diakopter yes
21:36 pmurias sorear: mildew/smop did it in the same way niecza does
21:37 pmurias the way it is describe in the manual page
21:37 pmichaud joined #perl6
21:37 jrockway_ joined #perl6
21:37 sorear pmurias: did mildew create a second .so file which links in Perl?
21:38 sorear pmurias: or did smop link Perl directly?
21:38 mberends \o pmichaud
21:38 pmurias sorear: directly, smop was written in c
21:39 pmurias sorear: make perl5 fails to compile on your perl?
21:39 diakopter pmurias: it fails the same way under both .NET and mono
21:39 sorear pmurias: blizkost (which uses exactly the approach you just did) does not compile with a default-built Perl 5.12.0
21:40 diakopter pmurias: it fails somewhat faster under .NET ;)
21:40 pmurias diakopter: it seems to be a segfault
21:40 pmurias with Aborted
21:40 diakopter I'm in cygwin
21:40 pmurias sorear: i have a default-built Perl 5.12.0
21:41 diakopter since niecza can't be built on windows without cygwin
21:41 sorear pmurias: what is perl -V:useshrplib?
21:41 pmurias useshrplib='false';
21:43 pmurias sorear: can you check if "make perl5" works on your perl?
21:43 sorear works
21:43 sorear but it's a bad test, because I'm on x86
21:44 pmurias same as me
21:45 sorear diakopter: are you on x86_64?
21:45 pmurias sorear: so we still suffer from no .so issues?
21:45 pmurias sorear: on x86_64?
21:45 sorear pmurias: 1. Perl can be compiled either as a shared library or as a static library
21:46 sorear pmurias: 2. on x86_64, any code which will be loaded at runtime needs to be compiled with -fPIC
21:46 sorear pmurias: 3. Perl does not use -fPIC when compiling as a static library
21:47 diakopter sorear: sorear: good question; how can I tell whether my perl is x86_64
21:47 sorear diakopter: file `which perl`
21:48 * sorear finds a copy of the x86_64 abi.pdf
21:48 diakopter sigh; this installation of cygwin doesn't have `file`. I'll try to install it.
21:48 TimToady perl -V might tell you something
21:49 diakopter /usr/bin/perl: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
21:50 diakopter same for mono
21:52 Guest52684 joined #perl6
21:52 Guest52684 Cal?
21:52 diakopter vary?
21:53 pmurias sorear: according to http://en.wikipedia.org/wiki/Posit​ion-independent_code#Windows_DLLs windows dlls are not position indepenent
21:54 pmurias sorear: in the worst case scenario we could embed both perl5 *and* mono in a wrapper C binary which would call niecza ;)
21:54 diakopter hee
21:55 diakopter might as well embed parrot too
21:56 sorear pmurias: I'm only talking about the Unix ABI; I don't have much knowledge of the Windows case
21:57 sorear I was thinking of that worst-case solution.
21:57 sorear My work on Blizkost has made me pessimistic.
21:58 colorspace joined #perl6
21:58 Woodi pmurias: is it hard to extract SMOP out of haskel ? i wanted two times look at it and stopped...
21:59 pmurias Woodi: SMOP doesn't use haskell any more
21:59 Woodi ?
21:59 Woodi on github somewhere ?
22:00 pmurias i don't understand
22:00 sorear diakopter: looks like host04 is running amd64 with a statically linked perl, now doing some experiments on it
22:01 sorear teeheeheee.  someone insinuated earlier that my problems were the result of using a packaged perl instead of perlbrew, but it's actually the other way around
22:02 sorear host04 has two perls, one perlbrew in /chroot, one distro; *only* the distro perl has a libperl.so
22:03 * pmurias still doesn't trust the distro perl ;)
22:04 pmurias what is host04?
22:05 arnsholt sorear: At least perlbrew lets you escape the shackles of old Perls =)
22:05 sorear pmurias: host04.appflux.net, runs p6eval and dalek
22:05 diakopter host04 runs p6eval in a chroot
22:05 sorear p6eval@host04:~/niecza$ cc -fPIC -shared -Wl,-soname,p5embed.so -o obj/p5embed.so lib/p5embed.c `perl -MExtUtils::Embed -e ccopts -e ldopts`
22:05 sorear /usr/bin/ld: /home/p6eval/perl5/perlbrew/perls/perl-5.14.1-RC​1/lib/5.14.1/x86_64-linux/CORE/libperl.a(op.o): relocation R_X86_64_32S against `PL_sv_yes' can not be used when making a shared object; recompile with -fPIC
22:05 jfried joined #perl6
22:06 pmurias sorear: did you ask on #p5p about that?
22:06 arnsholt At least I have 5.10 on my new workstation, but most of the machines at Oslo university have 5.8.8 (yay, Red Hat)
22:06 sorear pmurias: months ago
22:09 diakopter sorear: there's not a distro perl in the chroot?
22:13 sorear diakopter: there is
22:13 sorear but it's not first in #PATH
22:30 pmurias sorear: i think the sensible thing with the no .so on x86_64 by default is to require a custom compiled perl on that platform for now (untill we have a lot of users why have problems with that)
22:30 pmichaud joined #perl6
22:30 jrockway joined #perl6
22:32 Woodi compiling++ :)
22:32 Woodi oki, gn and gl
22:36 sorear pmurias: +1
22:37 jnthn ugh, too tired to hack
22:37 jnthn sleep &
22:47 dorlamm joined #perl6
22:50 pmurias sorear: re finding the .so it seems that we can either tweak the paths in the assembly using the reflection api or use platform specific tricks
22:52 pmurias the most basic trick for linux being LD_LIBRARY_PATH ;)
23:12 sorear pmurias: could you elaborate on the reflectionway?
23:18 pmurias sorear: i'm not entierly sure about that
23:18 pmurias sorear: google found http://www.codeproject.com/KB/dotnet​/DynamicDllImport.aspx?display=Print
23:19 pmurias sorear: but i think generating a .dll.config with the paths in full is a better idea
23:19 pmurias for mono it seems to be a much better idea
23:20 pmurias for .NET we (preferably someone else who uses .NET on windows) can insert a windows specific hack
23:25 pmurias sorear: or we might even manage to have it find the dll correctly by specifing a relative path if in the windows dll search path on http://www.mono-project.com/Interop_w​ith_Native_Libraries#Library_Handling step 1 searches in run/ instead of the directory the .NET vm is located
23:26 pmurias hmm under .NET on windows the niecza is run as run/Niecza.exe instead of mono run/Niecza.exe
23:26 pmurias so ../obj/p5embed.dll should be fine
23:28 wolfman2000 joined #perl6
23:31 pmurias sorear: there seems to be a couple of different solutions/hacks for windows/.net so i assume that can be handled seperatly
23:34 pmurias sleep&
23:41 Trashlord joined #perl6
23:52 replore joined #perl6
23:59 replore joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs