»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:00 shinobicl_ left, shinobicl_ joined 00:11 risou_awy is now known as risou 00:14 pmichaud left, hugme left, jrockway_ left 00:20 pmichaud joined, hugme joined, jrockway_ joined, zelazny.freenode.net sets mode: +v hugme 00:23 maguro left, pmichaud left, hugme left, jrockway_ left
cotto_work benabik: when you say Rakudo master, you mean nom, right? 00:26
benabik cotto_work: Er, umm, yes. 00:27
cotto_work benabik: ok.
00:28 donri left 00:34 risou is now known as risou_awy, pmichaud joined, hugme joined, jrockway_ joined, zelazny.freenode.net sets mode: +v hugme, uasi joined 00:36 mkramer joined
benabik Yes, my merge does appear to have worked. \o/ 00:38
00:38 perlygatekeeper left 00:43 pmichaud left, hugme left, jrockway_ left 00:55 Chillance left 01:12 risou_awy is now known as risou 01:13 frhodes left, frhodes joined 01:25 wolfman2000 joined 01:29 whiteknight left 01:30 woosley joined 01:32 REPLeffect left 01:34 REPLeffect joined 01:36 risou is now known as risou_awy 01:44 thou joined 01:48 abercrombie joined 02:02 am0c joined 02:32 envi joined 02:35 kthakore_ is now known as kthakore 02:37 abercrombie left 02:41 japhb_ left
sorear good * #perl6 03:30
03:49 frhodes left 03:59 ZapZ left 04:03 birdwindupbird joined 04:07 shinobicl_ left 04:11 ZapZ joined, JimmyZ joined 04:12 djanatyn left
diakopter o/ 04:12
04:13 djanatyn joined 04:20 satyavvd joined
sorear o/ diakopter 04:22
04:25 alvis left 04:37 carlin left 04:38 alvis joined 04:39 ZapZ left
TimToady you guys talk too fast 04:41
japhb
.oO( I ... have ... tortoise ... nervosa ... )
04:42
sorear hello japhb 04:43
japhb o/ 04:44
04:46 alvis left 04:52 wolfman2000 left
moritz good morning 04:53
japhb o/
JimmyZ good moritz :) 04:58
JimmyZ wonders where append_inplace is defined 05:00
sorear it appears likely I will not have niecza/serialize done in time for v10
does anyone have specific changes they would like to see in master for v10? 05:01
JimmyZ what does niecza/serialize do? improve startup time? 05:02
05:03 mberends left 05:05 REPLeffect left
TimToady I'd like the ability to shell out 05:06
mostly so's I can run stty 05:09
05:15 sftp left
cognominal what is v10? 05:17
japhb
.oO( release 10 ? )
05:18
05:19 REPLeffect joined 05:20 molaf joined
moritz yes 05:20
cognominal I see indeed that last niecza release was v9 05:21
05:21 lue left 05:22 alvis joined, SHODAN joined 05:25 packetknife joined 05:26 mberends joined, packetknife left
JimmyZ perl 10 will be released 05:31
05:31 soh_cah_toa left
moritz but not Perl 10 05:31
05:32 molaf left
sorear not related to PerlIO. 05:32
JimmyZ: the single biggest improvement will be adding BEGIN support
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
er, CORE.setting 05:34
moritz japhb: I usually prototype methods and functions outside of CORE first
but yes, it's quite annoying 05:35
japhb moritz, yeah, I may have to do that. :-/ 05:37
moritz japhb: what are you hacking on? 05:39
05:40 packetknife joined
japhb MAIN_HELPER 05:40
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
05:41 MayDaniel joined
moritz example? 05:41
(USAGE was quite hacky in master, I hope you're doing it more according to the spec :-) 05:42
05:42 mberends left
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
05:43 packetknife left
japhb So a range from tiny bugs to normal-sized bugs to code cleanliness 05:43
First I'm resurrecting what's there, then I'm planning to iterate towards correct. 05:44
05:50 wtw joined 05:53 kaleem joined 05:56 mberends joined 05:57 koban` joined, birdwindupbird left 06:06 orafu left, orafu joined, REPLeffect left 06:17 MayDaniel left 06:20 REPLeffect joined 06:25 packetknife joined
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.
japhb ^^ source of a surprising bug in my code 06:44
06:52 mberends left 07:02 alvis left 07:04 packetknife left 07:13 awwaiid joined 07:19 mberends joined 07:26 mj41 joined 07:41 pochi joined
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
sleep &
(^^ above is in my local copy; have not pushed yet) 07:43
really &
JimmyZ good night
07:48 mberends left 07:49 Tene left, djanatyn left 08:07 Chat7297 joined
Chat7297 hii 08:07
what u doin 08:08
08:08 Chat7297 left
moritz reading arxiv.org/ftp/arxiv/papers/1109/1109.4897.pdf 08:09
08:12 pmichaud joined, hugme joined, jrockway_ joined, zelazny.freenode.net sets mode: +v hugme 08:14 masak joined
masak sorear: +1 on TimToady's suggestion "shelling out". I missed that the other day. 08:14
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:␤------> sub MAIN⏏() { say "OH HAI" }␤␤»
..pugs: ( no output )
..rakudo 952b7b: OUTPUT«OH HAI␤»
masak sorear: MAIN would be nice, too.
08:15 Trashlord left
masak oh, and please fix github.com/sorear/niecza/issues/58 :) 08:17
niecza: sub MAIN(); say "OH HAI" 08:18
p6eval niecza v9-32-g380d891: OUTPUT«===SORRY!===␤␤Malformed block at /tmp/FvF6kyOM84 line 1:␤------> sub MAIN()⏏; say "OH HAI"␤␤Parse failed␤␤»
masak std: sub MAIN(); say "OH HAI" 08:19
p6eval std c22b2ee: OUTPUT«===SORRY!===␤Malformed block at /tmp/ORaCXiQi5a line 1:␤------> sub MAIN()⏏; say "OH HAI"␤ expecting any of:␤ new name to be defined␤ param_sep␤ routine_def␤ signature␤ trait␤Parse failed␤FAILED 00:01 119m␤»…
masak TimToady: ^^
moritz what should 'sub MAIN()' do?
make the rest of the file the sub MAIN?
08:21 bbkr1 joined 08:23 bbkr left
masak moritz: aye. 08:31
S06:3296 08:33
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)
moritz jnthn o/
08:40 Vlavv` left 08:41 Trashlord joined
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
masak jnthn: mornnn 08:45
Woodi nom: sub a( Int $b ) { say $b }; a( "123" );
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␤␤»
Woodi nom sub a( Int $b ) { say $b }; a( "123" );
jnthn Woodi: That's a type *constraint*, not a type coercion 08:49
Use "$b as Int" if you want a coercion.
08:49 MayDaniel joined
Woodi k 08:50
08:51 striking joined
striking hi #perl6 o/ 08:51
moritz or Cool $b as Int
what a striking appearance!
SCNR
:-)
striking Is there any example for IO.read?? 08:52
moritz nom: say $*IN.read(5)
p6eval nom 952b7b: OUTPUT«Buf:0x<4c 61 6e 64 20>␤»
moritz nom: say $*IN.read(5).decode
p6eval nom 952b7b: OUTPUT«Land ␤»
moritz say $*IN.get
nom: say $*IN.get 08:53
p6eval nom 952b7b: OUTPUT«Land der Berge, Land am Strome,␤»
moritz (that's the first line of the input stream)
dalek ecs: 953a85b | moritz++ | S32-setting-library/IO.pod:
[S32::IO] all .read methods should return a Buf. This is not C.
08:56
moritz ... now it even conforms to the spec :-) 08:57
Woodi moritz: is .eof working on sockets ?
moritz Woodi: I have no idea. Does it work?
Woodi no in b
how to not block without kind of .eof in read or recv ? 08:58
moritz you can't do non-blocking in b
Woodi if i give to big buffer it hangs. or Buf resolve this ?
moritz there's IO::Select for nom
Woodi can i check how many to read in socket before perform read/recv ? 09:00
moritz I don't think so :( 09:01
though I'm not really good with sockets; bbkr1 can probably help you much better than I 09:02
Woodi ok
masak striking: hi! 09:05
striking hi masak
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
moritz why do you want to use IO.read? What do you want to achieve?
striking just print 09:09
moritz rakudo: say 'this is printed out'
p6eval rakudo 952b7b: OUTPUT«this is printed out␤»
moritz that's how you print stuff.
you don't need IO.read for printing.
09:09 am0c left
JimmyZ nom: print $*IN.read(5) 09:10
p6eval nom 952b7b: OUTPUT«Buf<95687496>»
striking moritz: where is your example?
JimmyZ nom: say $*IN.read(5)
p6eval nom 952b7b: OUTPUT«Buf:0x<4c 61 6e 64 20>␤»
moritz striking: irclog.perlgeek.de/perl6/2011-09-23#i_4468060 and the following lines 09:11
$*IN is an IO object
JimmyZ what? say is different from print?
moritz JimmyZ: sure, say() uses .gist, print() uses .Stringy
09:12 cotto left
JimmyZ I thought difference is " 09:12
\n"
moritz not anymore
09:13 daxim joined
masak also did not know this o.O 09:14
jnthn either :)
09:14 REPLeffect left
mux can't wait for people to 'wtf?!?' over that one 09:14
masak wtf.. I mean why is there a difference?
jnthn wtf...why?
.oO( that's mux satisfied... ;-) )
09:15
masak say = print + \n is so easy to understand.
mux is silently chuckling
moritz where have you folks been in the last 3 month?
masak jnthn: I didn't do it for mux, I was already writing it. :/
jnthn moritz: Clearly, nowhere that we use print. ;)
mux I'm scared shitless of perl 6 already
masak moritz: I admit to being slightly distracted when .gist appeared.
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
masak spaces in lists, for example.
but I'm curious why print and say would use different underlying stringifications. 09:18
nothing so far in this discussion has convinced me, or even given a hint, that they should.
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
mux oh shit.
masak while we're at it, please compare and contrast .Str, .Stringy, and .gist.
moritz .gist is for humans
masak why are there three of them?
moritz .perl for perl
and .Stringy for IO
mux humans and IO overlap 09:20
moritz mux: partially
mux nods
moritz nom: say 0.5.Str, 0.5.gist
p6eval nom 952b7b: OUTPUT«0.50.5␤»
09:20 mberends joined
moritz nom: say 0.5.perl 09:20
p6eval nom 952b7b: OUTPUT«1/2␤»
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.
but yes, I will backlog before saying anything more.
wait, "up to"?! 09:22
how far back? :(
moritz the discussion has been going for days or weeks
I'm pretty surprised you don't remember any of it
masak I remember bits and pieces.
I certainly wasn't conscious when .gist was born.
moritz I'm not quite sure I how much I like or dislike the change 09:23
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
masak moritz: haven't you ever printed parts of a line of output in a loop or so? 09:24
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
masak moritz: I'm just presenting my use case for using print/say interchangeably to you, wondering whether you've encountered it too.
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
masak since that's the use case I see that currently looks problematic, I wanted to bring it up.
as far as I can see, it's the spec change that's the root cause of the problems.
not the expectation that 'say = print + \n'. 09:27
but here I go again. :/
masak shuts up
09:27 thou left
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
masak: so upto now it wasn't a pain point for me, but that doesn't mean anything yet
09:28 REPLeffect joined
moritz also note that if you do output of the form say "a big $interpolated $string"; 09:28
it continues to work as it did before
striking moritz: good example! thanks! 09:30
09:34 cotto joined
moritz striking: you're welcome 09:35
jnthn fwiw, I think I'd prefer print to .gist too. It'll catch too many people out. 09:36
moritz and require explicit prefix ~ or .Str or .Stringy for the old mode? 09:37
09:37 kaleem left 09:38 kaleem joined, woosley left 09:39 MayDaniel left
jnthn moritz: Right, and people can use that with say too if they want the newline and the old mode. 09:40
I mostly see the use of Stringy being string operations though
e.g. it's what concatenation uses if it needs to get two strings to concatenate. 09:41
09:41 MayDaniel joined
moritz (fwiw most uses of .Str in the setting should really be .Stringy) 09:42
09:43 c1sung joined
JimmyZ +1 09:47
09:47 striking left
JimmyZ nom: print $*IN.read(5).gist 09:48
p6eval nom 952b7b: OUTPUT«Buf:0x<4c 61 6e 64 20>»
moritz should .Str and .Stringy on Buf die?
to avoid accidental concatenation of Str and Buf, that is
JimmyZ nom: say $*IN.read(5)
p6eval nom 952b7b: OUTPUT«Buf:0x<4c 61 6e 64 20>␤»
JimmyZ nom: say ~$*IN.read(5)
p6eval nom 952b7b: OUTPUT«Buf<83845744>␤»
moritz or should print() iterate over its argument, and write Buf's contents directly to the stream? 09:49
JimmyZ moritz: where append_inplace method defined in Buf.pm? ~= use it , but I can't find 09:52
moritz JimmyZ: it's gone, and ~= should be gone too 09:54
JimmyZ: you'll notice that if you write ~=, it still works, because that candidate is never picked up
still it's dead code, and should be removed... 09:55
dalek kudo/nom: 7a51746 | moritz++ | src/core/Buf.pm:
[Buf] remove cruft noticed by JimmyZ++
JimmyZ rakudo doesn't support that candidate?
09:56 koban` left
tadzik it just becomes a = a ~ b 09:59
moritz JimmyZ: the metaop wins 10:00
see yesterday's logs
masak I never did submit a rakudobug about that. 10:02
someone else is welcome to.
tadzik oh, good morning :)
masak otherwise I'll get to it tonight.
tadzik fwiw, I don't like the magic about say and print too :) 10:03
10:06 djanatyn joined 10:09 koban` joined
Woodi like nom IO::Socket::INET.recv :) 10:12
maybe not... 10:15
moritz was a bit surprised by that :-) 10:17
10:17 mberends left
Woodi moritz: realy, i must dig into networking programming and not expect to much automagic :) 10:18
or documentation would be nice :) 10:19
moritz indeed
Woodi assuminig behavior is C-like -> parrot -> rakudo
moritz did you see S32::IO ?
there's *some* docs, though not much
Woodi but my recv-test.pl is much faster on nom 10:20
moritz that's good 10:21
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:22
10:23 Gothmog_ left
moritz Woodi: I have no idea 10:23
Woodi there is TCP_NODELAY in place... 10:24
k, /me goes read...
10:28 Gothmog_ joined
moritz does .recv work with non-ASCII characters? 10:29
10:49 pnp joined
Woodi if 'nom 952b7b: OUTPUT«Buf<83845744>␤' are non-ASCII then works 10:51
will try some japan... 10:52
tadzik nom: my $a = "ziąb".encode; say $a.gist 10:55
p6eval nom 952b7b: OUTPUT«Buf:0x<7a 69 c4 85 62>␤»
tadzik nom: my $a = "ziąb".encode; say $a.decode
p6eval nom 952b7b: OUTPUT«ziąb␤»
tadzik looks ok
oh, .recv
nvm
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:56
tadzik: select can return number of bytes to read from socket ? 10:57
s/(select) (can)/$2 $1/ 10:58
s/bytes/bytes available/ 11:00
huf i dont think select has that kind of information 11:03
Woodi huf: something have ? or just big buffer + non-blocking socket ? 11:04
tadzik Woodi: I don't think so 11:05
well, the system recv returns the number of bytes it read, right? 11:06
so I believe the high-level .recv returns only those bytes that make sense
so you can just call it until it returns something
may be worth looking how LWP::Simple does it 11:07
Woodi LWP is HTTP and HTTP close sockets and it works :)
tadzik ah :) 11:08
let me see
$sock.send($req_str); my $resp = $sock.recv(); $sock.close(); 11:09
it would seem that recv() returns everything it has, at once
11:09 grondilu joined
huf how does it know when to stop reading? 11:09
data might arrive whenever 11:10
tadzik while $bufsize > $!buffer.bytes
that's what it does
where $bufsize defaults to Int 11:11
last unless $received.chars;
so it stops when it received nothing
Woodi for me it block line earlier on recv...
huf ah, so ti reads until the remote end is closed?
Woodi works for inter^H^H^H^H^H WWW :) 11:12
tadzik huf: until it receives nothing I suppose 11:14
tadzik checks the state of LWP::Simple
11:17 Trashlord left, Trashlord joined
tadzik perl6: my %a = grammar => 5; 11:18
p6eval pugs: ( no output )
..rakudo 7a5174: OUTPUT«===SORRY!===␤Malformed $*PKGDECL at line 1, near "=> 5;"␤»
..niecza v9-32-g380d891: OUTPUT«Potential difficulties:␤ %a is declared but not used at /tmp/o02WrVecNi line 1:␤------> my ⏏%a = grammar => 5;␤␤»
tadzik b: my %a = grammar => 5;
p6eval b 1b7dd1: ( no output )
tadzik *sniff sniff* smells like a nom regression
masak argh. 11:20
masak submits rakudobug
tadzik++ # finding it 11:21
tadzik and URI doesn't work anyway, so I won't check if LWP::Simple works :)
URI dies with Method 'at_key' not found for invocant of class 'Any'
current instr.: 'postcircumfix:<{ }>' pc 715655 (src/gen/CORE.setting.pir:179187) (src/gen/CORE.setting:1014) 11:22
called from Sub '_block1685' pc 1468 ((file unknown):434) (lib/URI.pm:10)
lib/URI.pm:10 is has $!path;
jnthn nom: my %a = class => 42
p6eval nom 7a5174: OUTPUT«===SORRY!===␤Malformed $*PKGDECL at line 1, near "=> 42"␤»
jnthn nom: class => 42
p6eval nom 7a5174: OUTPUT«===SORRY!===␤Malformed $*PKGDECL at line 1, near "=> 42"␤»
jnthn hm
No clue what changed.
Oh
Maybe something can't backtrack now that used to be able to.
tadzik writes a spectest 11:23
11:24 fhelmberger_ joined
tadzik wtf. S02-builtin_data_types/ is full of *.rakudo, not a single .t in here 11:24
jnthn tadzik: leftovers after moritz++ did some renaming, perhaps? 11:25
std: class => 42
p6eval std c22b2ee: OUTPUT«ok 00:01 118m␤»
tadzik yeah, seems so
11:27 mberends joined, fhelmberger left
jnthn OK, no idea how STD handles it. 11:27
As in STD, the first thing is
{ $*SCOPE ||= 'our'; }
tadzik nom: use Test; eval_lives_ok('my $rt = { grammar => 5 }', "can have a bareword 'grammar' as a hash key");
jnthn Which would terminate LTM before it even started, so it can't be that. 11:28
p6eval nom 7a5174: OUTPUT«(timeout)»
tadzik meh
nom: use Test
p6eval nom 7a5174: ( no output )
jnthn oh, unless it's LTM, but on 'grammar => ' as the declarative prefix. 11:29
jnthn -> lunch
11:31 woosley joined
dalek ast: 762eb26 | tadzik++ | S02-types/hash.t:
Test for RT #99854
11:33
11:36 Psyche^ joined, donri joined 11:39 Patterner left, Psyche^ is now known as Patterner 11:40 wamba joined, jaldhar left 11:41 jaldhar joined 11:49 jaldhar left, jaldhar joined
dalek kudo/nom: 09a598f | moritz++ | / (2 files):
implement bitwise operators for Buf
11:53
11:53 _jaldhar joined, jaldhar left
colomon moritz++ 11:53
masak not long now till RT #100000 11:56
moritz hopes it won't be a spam ticket
11:56 tzhs joined
dalek ast: dea8e4d | moritz++ | S (2 files):
unfudge Buf tests (bit ops, IO)
11:58
11:58 _jaldhar left, _jaldhar joined
moritz b: Buf.new(1) ~ '1' 11:58
p6eval b 1b7dd1: ( no output )
moritz b: say Buf.new(1) ~ '1'
p6eval b 1b7dd1: OUTPUT«Buf()<0x2fb7938>1␤»
11:58 MayDaniel left
mberends colomon: hi, here is a request for you: merge your Niecza mandelbrot script with this fractal GUI: gist.github.com/1235342 11:59
colomon oooh, interesting
moritz would love to see that
colomon I suspect it means I'll finally have to get around to updating my niecza.... 12:00
12:01 _jaldhar left, _jaldhar joined, pmurias joined
pmurias hi 12:01
12:02 _jaldhar left, _jaldhar joined
dalek ast: 55a2c9b | tadzik++ | S02-types/hash.t:
Fix plan
12:05
12:06 kaleem left 12:10 kaleem joined
masak hi pmurias 12:11
pmurias masak: when is sorear usually on irc? 12:18
12:21 grondilu left
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 :)
but it'd be an interesting data mining task to find out.
12:24 pnp left
moritz offers to run SQL queries and report the result here 12:24
masak \o/
moritz ... provided somebody tells me which queries to run :-) 12:25
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
and then look on the timestamps
masak aye. 12:26
wow, I hadn't noticed that feature before.
moritz masak: it's only online since July 2009 :-) 12:27
bpetering++ did most of the work
btw I have two not-quite-finished irclog branches on github 12:28
one is for a summary view
the second is for an improved search facility (based on KinoSearch)
masak yeah, things are developing so fast, I can barely keep up... :>
moritz are there any other features that Buf needs (besides pack and unpack) that I could implement now? 12:32
12:33 bluescreen10 joined
masak moritz: you could have a look at Str-as-Buf allomorphy. 12:34
I still haven't figgered out exactly how that will work.
moritz is that an S02 insanity? 12:35
masak don't know where the insanity is from.
we do have spectests for it, though.
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:36
did you mean that part? 12:37
masak right. 12:38
heh. S03:962: "The use of coercion probably indicates a design error, however." -- don't do that, then! :P
moritz I looked at that part yesterday too 12:39
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 12:45 Util left 12:46 hugme left
masak what options are there for debugging a grammar in Niecza? 12:49
12:50 Util joined, satyavvd left
pmurias masak: say statements? 12:51
masak: i don't think niecza has any fancy tools for that 12:52
PerlJam port jnthn's Grammar::Debugger? 12:53
masak not sure Niecza has enough MOP for that :)
I ended up doing say statements in the action methods, and that got me further.
thanks for your suggestions.
PerlJam oh, sorry .... port more of 6model to Niecza, then port jnthn's Grammar::Debugger :)
pmurias masak: or port pugs.blogs.com/pugs/2007/10/a-graphical-tra.html ;) 12:55
food&
12:57 pmurias left
masak your suggestions are great, but their scope is bigger than what I had in mind. 12:59
jnthn Port your grammar to...oh wait, nom grammars still suck :( 13:01
13:04 sayu left 13:07 sayu joined
PerlJam wonders if the next escalation involves cloning pmichaud or a time machine 13:07
13:17 pmurias joined
masak where can I learn more about .suppose in STD? it seems like an interesting invention. 13:21
[Coke] suspects cloning has a more rapid turnaround time in the short term. 13:24
Though short term does, of course, get wobbly when talking about time travel.
git st
ww.
dalek ecza: 10f1ad8 | (Paweł Murias)++ | lib/ (2 files):
Added a dummy eval_perl5 op.
13:29
pmurias masak: you are debugging STD?
13:32 Holy_Cow joined, Holy_Cow left
masak no. just idly browsing through it. 13:32
13:36 _jaldhar is now known as jaldhar
pmurias is figuring out how to pluggably embed p5 in niecza 13:40
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()␤»
masak hm.
moritz b: say Nil.item.WHAT 13:47
p6eval b 1b7dd1: OUTPUT«Seq()␤»
moritz b: say Nil.WHAT
p6eval b 1b7dd1: OUTPUT«␤»
jnthn Maybe somewhere the Nil gets assigned to a scalar
Which sets the scalar bck to its default value (whichcxs is Any) 13:48
argh, keyboard
moritz b: say (my $x = Nil).WHAT
p6eval b 1b7dd1: OUTPUT«Any()␤»
moritz jnthn++
13:51 nebuchadnezzar left, nebuchad` joined 13:52 SHODAN left
moritz btw, webcast.web.cern.ch/webcast/ for all who are interested in physics and have a bit of spare time 13:54
supposed to start in 6 minutes
mux on that note
i.imgur.com/cDvnU.jpg
moritz (about the v > c neutrino experiment)
mux (that pis is about that too.)
pic*
moritz lots of pics in the paper :-) 13:55
mux but I guess they're not nearly as fun as this one :-P
it practically made me choke over my food
PerlJam moritz: xkcd.com/955 too :) 13:56
moritz sigh
moritz also reads xkcd
I have no clue if the measurements are right or wrong 13:57
but we shouldn't reject them just because they disagree with the theory
after all the experiment is the final scientific validation or falsification
masak agreed.
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 :)
mux call me a sceptic, but I can't even count the number of times I've read about claims of supraluminic speed observations
moritz for me another interesting question is who "they" are (the ones that fucked it up) -- the theoretists or the experimentalists :-)
mux: well, most of them are rather obvious or unspectacular 13:59
PerlJam hold on a second ... I'm making cold fusion in my glass of tea 14:00
mux PerlJam: lol!
moritz: well I don't quite see how this one differs
because it's a six-sigma claim?
jnthn PerlJam: Ugh...I prefer my tea warm :P
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
jnthn Fine fine, you do cold fusiion in your tea, I'll do hot fusion in mine...
PerlJam moritz++ btw. thanks for the link.
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:02 nebuchad` is now known as nebuchadnezzar
PerlJam mux: I think you're misattributing what he's enthusiastic about . 14:04
14:06 wtw left
tadzik heh, and it's not long ago since I read why exactly nothing can be faster than a speed of light :) 14:07
what a disappointment
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
I barely passed my physics, what can I tell :)
mux PerlJam: I thought I got that pretty well but.. maybe? :-)
masak PerlJam: that's how I understood it too. 14:09
PerlJam: actually, nothing can accelerate *to* the speed of light either. if you're a photon, you're born at that speed, IIUC.
PerlJam right
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 stepnem left
tadzik so they're like, in a different namespace? :) 14:10
14:10 koban` left
moritz right 14:10
mux scoped particles
tadzik . o O ( worldspace )
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
dalek p: a6899ad | moritz++ | src/QAST/Compiler.nqp:
[QRegex] do not quote method names in nqp

no functional changes
14:18
tadzik heh, I got _so_ excited seeing "nqp: [QRegex]" :0
:)
moritz and then it says "no functional changes" :/
tadzik :) 14:19
14:19 alvis joined
tadzik I like a bit of excitement in the morning, either way :) 14:19
oh crap, it's afternoon already? Diem perdidi, again :\
14:24 tzhs left
mls_ hi perl6 14:24
seen jnthn
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...".
mls_ jnthn: is the $pblock<uninstall_if_immediately_used> used to make things faster? 14:25
[Coke] does cold fusion in his computer, instead.
mls_ jnthn: why not just use the SC? 14:26
14:26 woosley left
jnthn mls_: iirc there's a bit more to it than that... 14:27
mls_: I suspect the optimizer may rely on that too...
It goes looking for PAST::Block with blocktype immediate.
And I think that mechanism is the only way we get such a thing. 14:28
I guess we could do it with an SC lookup *and* a node to immediately call the looked up thing. 14:29
But it's a bit of a pain to resolve.
14:30 espadrine joined
mls_ I changed the when_handler_helper to put the call to succeed outside of the block 14:31
jnthn hm
Why, ooc? 14:32
mls_ so that a caught exception still does the succeed
jnthn I feel like I'm missing something... 14:33
mls_ example: default { die; CATCH { default {} } }
the when handler used to change the code to (more)
default { die; succeed(); CATCH { default {} } } 14:34
jnthn oh
yeah, I see the issue.
But wait...
It should only succeed if the block is called? 14:35
I mean, if the when matches?
mls_ yes
jnthn Right, so long as you have it that way... :)
mls_ oh, the "if EXPR" is already outside of the block
(I mean if $_ ~~ EXPR)
jnthn Right, and the succeed is outside of the block but inside the if?
mls_ the succed was inside, which doesn't work with exceptions 14:36
so I changed the code so that it generates if $_ ~~ EXPR succeed(call_block())
14:37 woosley joined
jnthn k 14:38
mls_ when {} and default {} are a bit different regarding the block
when has $pblock := pblock_immediate($pblock);... 14:39
default just uses $block<past_block> 14:40
jnthn wonders if there's a good reason for that, and isn't convinced there is 14:41
14:42 jaldhar left 14:49 pmurias left
TimToady note that S04:949 implies that the succeed evaluates the entire block 14:50
PerlJam johncostella.webs.com/neutrino-blunder.pdf That was quick. 14:51
jnthn TimToady: "evaluates the entire block"? 14:52
TimToady: As in, we have to make it to the end of the block first? 14:53
14:53 shinobicl joined
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
mls_ But that's like in every other block, right?
TimToady eh? I'm saying the spec supports mls_'s change, iiuc 14:55
jnthn TimToady: Oh, I see :)
TimToady: Sorry, bit slow today ;)
TimToady so leave 5 works fine, because it leaves the block inside the succeed
mls_ I also thought that you argued against it ;)
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
I think the strange physical effect is in someone's brane :P 14:57
jnthn :P 14:59
mls_ I don't understand why you don't get block duplications with pblocks 15:03
I must be missing some tricky code 15:04
jnthn Actions.pm:55 15:06
Notice the .shift 15:07
mls_ oh, the shift as some extra meaning?
jnthn iirc it's making sure we don't dupiclately emit it.
mls_ tricky, tricky 15:08
jnthn It's probably me you need to blame for that. 15:09
15:12 woosley left, woosley joined 15:14 molaf joined 15:16 mberends left 15:21 kaleem left 15:25 im2ee joined
im2ee Hello! :) 15:25
masak im2ee: hej! 15:26
15:26 Chat0897 joined 15:27 Chat0897 left 15:28 mberends joined 15:34 ggoebel joined 15:35 rulker joined 15:36 simcop2387 left 15:38 simcop2387 joined 15:39 MayDaniel joined
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
Woodi still returns String
p6eval niecza v9-33-g10f1ad8: OUTPUT«7␤»
masak niecza++
15:44 mj41 left
TimToady what's equiv<*> supposed to mean? 15:45
ooh, it's specced :) 15:46
masak :P
TimToady doubtless I did that myself...
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:47
jnthn oh man, *that* weekend. 15:48
:)
It was a little distracting ;)
masak I've now read the backlog for that day. I still maintain breaking 'say = print + "\n"' is a bad idea. 15:49
so whatever say does, print should do too.
PerlJam wait ... what? what's the proposed breakage? 15:50
jnthn At the moment, say calls .gist, and print does not.
PerlJam ah
I agree with masak++ then.
jnthn Well, at first I thought it was just an oversight when in Rakudo.
15:50 sayu_ joined
jnthn s/when // 15:50
PerlJam (well, I agreed with him anyway, but whatever ;) 15:51
15:52 sayu left
masak jnthn: TimToady says print and say will be different here: irclog.perlgeek.de/perl6/2011-06-18#i_3953131 15:52
jnthn ugh. 15:55
15:55 thou joined 15:59 sayu joined 16:00 sayu_ left
masak decommutes 16:02
16:02 sftp joined, masak left
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...
japhb (Learning my lesson from yesterday ...)
jnthn, Where and how would I go about fixing that case? 16:04
16:08 mberends left 16:13 espadrine left
jnthn japhb: It really needs $capture ~~ $signature to work. 16:16
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:17
snarkyboojum fwiw, I like that say, gists, and print does something quite semantically different :) 16:19
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:20
16:21 woosley left
jnthn japhb: At the moment there's no link from signature to code object so we could create such a scope. 16:21
16:21 mberends joined
snarkyboojum the difference between print and say being \n seemed too cute imo - this is a real graspable difference :) 16:22
16:22 mberends left
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:22
16:23 mberends joined, alvis left
jnthn Of course, this gives some fun with signature literals too. 16:23
japhb jnthn: Understood (mostly) so far.
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
16:25 Vlavv_ joined
jnthn japhb: Well, just that we have a multi-dispatcher 16:26
japhb: And it knows how to do all of the checks in question
Oh!
japhb :-)
jnthn A simpler way would be to just magically create a dispatcher. :)
16:26 espadrine joined
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:27
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:29
jnthn japhb: Works for me. :) 16:30
japhb thx!
commuting &
16:32 Chillance joined 16:48 wamba left 16:50 mberends left 16:53 plobsing_ joined 16:56 plobsing left 16:58 dakkar left 17:00 george_z0rwell left 17:05 colomon left 17:08 risou_awy is now known as risou, REPLeffect left 17:12 alvis joined 17:18 Khisanth joined, cognominal joined 17:21 REPLeffect joined 17:25 pmurias joined
pmurias sorear: ping 17:25
17:25 colomon joined 17:28 cotto left 17:30 kaleem joined
mls_ perl6: my $a = "xxx" ; { say $a ; my $a; } 17:32
p6eval niecza v9-33-g10f1ad8: OUTPUT«===SORRY!===␤␤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:␤-…
..rakudo 09a598: OUTPUT«Any()␤»
..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 espadrine left
jnthn std for the win! 17:33
mls_ ;)
jnthn Should nab that for Rakudo :)
17:36 masak joined
mls_ Seems like I have to change pct a bit for the when{} handling 17:36
masak weekend! \o/
jnthn mls_: Oh? Why?
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, Tene left, Tene joined 17:40 envi left
mls_ a way to tell :pasttype('try') which exceptions to catch would also work 17:41
(i.e. handle_types / handle_types_except) 17:42
for now I tried to emulate it with a block handler, as PAST::Stmts also allows block handlers 17:44
but for PAST::Stmts handlers PAST::Control is wrong 17:45
17:46 sayu left
Tene mls_: PAST::Control is wrong for most things; I really screwed up the API when I added it. 17:47
17:47 mberends joined 17:49 daxim left
mls_ But it's the only Node that takes handle_types / handle_types_except ... 17:49
(which is called by wrap_handlers) 17:50
(Btw, why is the handlers() method in Past::Node? Not that I mind... 17:53
17:53 pmurias left
jnthn back 17:53
Stuff tends to go in PAST::Node when it's meant to be availble on all nodes.
mls_ ok, but handlers() ? 17:54
oh wait, it's used in PAST::Node 17:55
(Actually that's also what I tried to use, but it didn't work because of PAST::Control) 17:56
I need a flag for PAST::Control to tell it not to do the return/rethrow thing 17:57
18:00 risou is now known as risou_awy
Tene mls_: Several people have mentioned that PAST::Control is insufficient for most uses. 18:03
It could definitely use some changes.
18:04 japhb_ joined
[Coke] bah! I also fell for the qregex commit! 18:04
mls_ yes, I think I'll patch it a bit next week
^tene
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?
japhb_ Where is the val() function defined in Rakudo? (Or is it?) I'm failing in my search fu.
18:06 zby_home_ joined
jnthn [Coke]: qregex commit? 18:06
oh, I see it :)
18:06 mkramer1 joined 18:07 mkramer left
masak japhb_: NYI, I think. 18:07
[Coke] ponders going through more RT tickets on lunch break.
18:08 kaare_ joined
[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")␤»
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
18:09 JimmyZ left
masak (yes, the answer is a distribution on the numbers 1..40) 18:09
[Coke] rakudo: sub foo(@a, $b) {}; foo(5)
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␤␤»
mls_ afk -> weekend 18:12
japhb_ masak, thanks for the NYI confirmation 18:15
18:22 shinobicl left
[Coke] IWBNI we had an RT bot in here. 18:24
Ticket opened, ticket closed, etc.
diakopter masak: may I ask how you came across that challenge/problem?
or did you invent it 18:25
18:27 donri left
moritz thinks he knows an expression for the solution 18:28
but the evaluation of that expression seems... like I don't want to do it by hand :-) 18:29
colomon if only we had automated tools capable of evaluating mathematical expressions! 18:33
[Coke] moritz: can you take a look at rt.perl.org/rt3/Ticket/Display.html?id=63596 ? the original null pmc is long gone. what's left to do?
moritz nom: say 0.5e0 ** 79
p6eval nom 09a598: OUTPUT«1.65436122510606e-24␤»
18:34 replore joined
moritz [Coke]: just needs tests 18:35
masak diakopter: through my acquaintance hakank++, as is often the case with this type of problem ;)
sorear good * #perl6 18:36
diakopter p
mberends hello sorear!
masak *, sorear 18:37
[Coke] moritz: annotating.
masak diakopter: actually, already a couple of days back I wrote a simulator for the problem: gist.github.com/1221405
japhb_ o/ sorear 18:38
18:38 kaleem left
masak first it looks like 2 or 3 matches is the most likely outcome, but that appears to be a coarseness artifact. 18:38
as one increases N to the millions it becomes 1.
18:39 uasi left
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
p6eval rakudo 09a598: OUTPUT«Cannot assign to a non-container␤ in <anon> at /tmp/kWHoPknO_U:1␤ in <anon> at /tmp/kWHoPknO_U:1␤␤»
moritz masak: that seems... unlikely
masak sorear: ooh, nice.
moritz: what does?
moritz: 2 or 3?
moritz masak: that it approaches 1
masak moritz: 1 seems highly likely to me.
why doesn't it to you? :P 18:40
moritz masak: because the variance grows with sqrt(n)
sorear masak: which value is "N"?
moritz what was 40 in the original example, I think 18:41
[Coke] rakudo: my $x = package {...}
p6eval rakudo 09a598: OUTPUT«===SORRY!===␤The following packages were stubbed but not defined:␤ <anon>␤␤»
masak sorear: number of simulations.
sorear so MATCHES is fixed to 40?
masak aye.
moritz: sorear++ found our misunderstanding.
moritz oh
masak sorry for just calling something N. :) 18:42
should've said $RUNS like in gist.github.com/1221405
[Coke] is .PARROT gone now? 18:43
moritz yes
[Coke] what happened to it?
masak 6model :P
moritz it rests in peace
[Coke]: we don't leak any non-6model objects to the userspace 18:44
[Coke] moritz: yay, kills a ticket. 18:45
moritz masak: have you calculated the expectation value of the number of remaining things? 18:46
according to niecza, the answer is -Infinity 18:47
:/
[Coke] rt.perl.org/rt3/Ticket/Display.html?id=68636 - can we just reject this as "no, no you can't"? 18:48
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
moritz masak: want to hear my analytical approach? 18:50
sorear I just wrote a nonrandomized solution
pmurias sorear: hi
sorear I wouldn't quite call it "analytical" 18:51
pmurias sorear: how can we have a pluggable C# module?
18:51 im2ee left
pmurias s/C# module/assembly 18:52
sorear pmurias: Assembly.Load?
moritz sorear: please share :-) 18:53
[Coke] rakudo: say 1.WHAT; 18:54
p6eval rakudo 09a598: OUTPUT«Int()␤»
[Coke] rakudo for 1,2,3 { say .WHAT }
rakudo for: 1,2,3 { say .WHAT }
moritz rakudo: for 1,2,3 { say .WHAT }
[Coke] rakudo: for 1,2,3 { say .WHAT } #argh ;)
p6eval rakudo 09a598: OUTPUT«Int()␤Int()␤Int()␤»
sorear moritz: mind if I debug it first?
moritz sorear: whatever you prefer
pmurias sorear: and how do we expose methods from the assembly?
[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
[Coke] so, is that an intended issue with print over say? 18:55
moritz yes, that conforms to current spec
18:55 mkramer1 left
masak moritz: sure. 18:56
[Coke] rakudo: for 1,2,3 { print ~.WHAT } #argh ;)
sorear pmurias: what?
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␤»
moritz masak: lemme write it up...
[Coke] rakudo: for 1,2,3 { print .WHAT.gist } #argh ;)
p6eval rakudo 09a598: OUTPUT«Int()Int()Int()»
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 pastie.org/2580782
pastie.org/2580784
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 MayDaniel left
masak sorear: represent those as exact quotients, and we're done ;) 18:59
[Coke] we now have 36 tickets explicitly blocking on test coverage. chop chop. ;) 19:00
masak [Coke]++ 19:01
sorear masak: my version is using exact numbers internally. What output format would you like to see? 19:02
pmurias: oh. Well if you load an assembly like that, you need to use reflection to access it.
moritz sorear, masak: gist.github.com/1238173 19:03
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
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.
moritz: it isn't? 19:06
moritz should be (N chose (40 - N))
*choose
masak right.
moritz is too tired to compare that to sorear's solution 19:08
sorear pmurias: thats one approach
moritz std: $?USAGE 19:10
p6eval std c22b2ee: OUTPUT«ok 00:01 118m␤»
moritz std: $?FOO
p6eval std c22b2ee: OUTPUT«Potential difficulties:␤ Unrecognized variable: $?FOO at /tmp/RVskHAxvpJ line 1:␤------> $?FOO⏏<EOL>␤ok 00:01 118m␤»
19:11 mkramer joined
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
sorear I thinkm it may be getting confused by the sub USAGE in the globabl package created by viv 19:11
moritz: is $?USAGE a real thing? 19:12
moritz sorear: yes
sorear: it holds the autogenerate usage message for MAIN
sorear mild ick
I would make it the same scope as &MAIN 19:13
19:15 wallberg joined
masak wallberg: oh hai! 19:15
sorear Hello wallberg!
moritz sorear: makes sense-isch
sorear masak: who is wallberg? 19:16
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?
masak sorear: he's a former classmate's colleague from Uppsala. 19:19
sorear masak: not from Utrecht?
pmurias sorear: i'm not sure what we will need
maybe loading a module
looking up stuff in a namespace? 19:20
sorear cast to interface probably best then
more flexible
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
19:21 mkramer left
masak sorear: not that I know. 19:22
19:22 mj41 joined
sorear mberends: github.com/sorear/niecza/issues/57 19:22
mberends sorear: thanks. I take that to mean "not yet". 19:24
sorear puts #57 on the fix-before-v10 list 19:25
mberends will try to fix #58 today or tomorrow 19:26
sorear mberends++ 19:27
masak \o/
19:27 donri left
sorear in other questions, I wonder where CLR-interop-tests belong 19:28
mberends very good question. first instinct is: in Niecza, not Roast 19:29
pmurias but p5-interop tests belong in roast? 19:30
moritz pmurias: yes, that's specced 19:31
mberends pmurias: yes, that makes sense, because it should be possible on all implementations.
pmurias sorear: unless some other implementation does CLR interop having it roast as opposed to in niecza doesn't help 19:35
19:37 kaare_ left
pmurias sorear: how do i make gmcs compile a .cs file into an assembly instead of an .exe? 19:37
masak sorear: Niecza is so fast! I love it! 19:39
19:39 mj41 left
mberends pmurias: -target:KIND where KIND can be one of: exe, winexe, library, module 19:40
an assembly is a library 19:41
diakopter .exe are assemblies too 19:42
able to be loaded just like libraries
mberends yes, it's all the same 'MZ' file format 19:43
19:47 replore left
sorear in CLR, PE, and ELF alike, an executable is basically just a library with a main() 19:49
you can dlopen executables; I haven't tried LoadLibrary 19:50
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
pmurias sorear: where does Assembly.Load search for files? 19:53
19:54 molaf left
sorear pmurias: msdn.microsoft.com/en-us/library/yx7xezcf.aspx 19:54
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…
masak diakopter++ # twisted!
dalek ecza: 24ecad7 | mberends++ | examples/gtk-sierpinski.pl:
[examples/] add gtk-sierpinski.pl
20:04
diakopter sorear: see above 20:06
20:08 bluescreen10 left
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…
sorear niecza: say eval q[eval(\"eval('42')\")]
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…
TimToady masak: why does your CSV module do $output ~~ Any ?
sorear niecza: say eval(\"eval('42')\")
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…
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…
sorear niecza: \"eval('42')\"
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…
sorear niecza: "\"
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…
sorear niecza: "
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…
sorear wow
diakopter nice golfing
masak TimToady: I... I don't remember. at all. 20:11
masak checks
diakopter std: " 20:12
p6eval std c22b2ee: OUTPUT«===SORRY!===␤Unable to parse double quotes at /tmp/FTSlguLwpC line 1:␤------> <BOL>⏏"␤Couldn't find final '"'; gave up at /tmp/FTSlguLwpC line 1 (EOF):␤------> "⏏<EOL>␤Parse failed␤FAILED 00:01 117m␤»…
masak TimToady: I see no good reason, for it, and I don't remember. 20:13
TimToady: my guess is that memory loss will correspond to some test failures.
dalek ecza: 2802b4e | mberends++ | examples/gtk-clock.pl:
[examples/] add gtk-clock.pl
masak luckily, it's not a lot of code, and should be easy to fix.
diakopter niecza: say eval("eval('eval(\"eval(\\\'42\\\')\")')") 20:17
p6eval niecza v9-33-g10f1ad8: OUTPUT«42␤»
sorear niecza: say eval q[eval q[eval q[q[42]]]] # more readable 20:19
p6eval niecza v9-33-g10f1ad8: OUTPUT«42␤»
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 Sarten-X left, bluescreen10 joined
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
pmurias diakopter: are you hacking on niecza? ;) 20:22
diakopter obliquely 20:23
sorear pmurias: not every change, no
pmurias: CORE.dll depends on CLRBackend.exe wich depends on Kernel.dll which depends on Builtins.cs 20:25
if you make changes to Builtins.cs, it can affect the generation of code for CORE.dll
for instance changing the signature of a nam-exposed method
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?
sorear pmurias: I recommend putting it in Builtins.cs 20:26
pmurias ok 20:27
and how should i compile Perl5Interpreter.cs so that it can use that?
sorear /lib:obj /r:Kernel.dll 20:29
20:29 nebuchadnezzar left, nebuchadnezzar joined 20:30 Sarten-X joined
pmurias sorear: so how do we call the interface? 20:33
TimToady masak: here gist.github.com/1238385 is all the changes I had to do to get the code to work on my data
pmurias sorear: ForeignLanguage? 20:34
masak TimToady: ok, excellent.
I'll see if I can turn that into a commit.
TimToady it's just a local copy without the Text:: on the front
oh, and it was running under niecza, not nom 20:35
masak fair enough.
TimToady: was the s/Text::// change necessary to make it work? 20:36
also, there seems to be debug output in the grammar ;) 20:37
TimToady yes, like it actual says where it stopped parsing this way :) 20:38
*ly
masak I think I'll have to use that gist more like a guideline than as material for a patch. 20:39
20:40 mkramer joined, mkramer left
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:40
jnthn :( 20:41
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
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.
diakopter oh
dalek ecza: e5a3ec5 | (Paweł Murias)++ | / (4 files):
Evaling perl5 code loads the Perl5Interpreter class.
20:48
TimToady masak: also, \%hash wants to be item %hash 20:49
pmurias sorear: see the commit
sorear pmurias: looks fine 20:50
pmurias do we use the IForeignLanguage naming convention?
20:50 am0c joined, am0c left
diakopter pmurias: does loading obj/Perl5Interpreter.dll work if the cwd is somewhere else? 20:51
20:51 donri joined
sorear pmurias: I am neutral 20:51
oh
you should just use Assembly.Load("Perl5Interpreter")
the assembly loading path is already set to obj 20:52
pmurias ok
dalek ecza: 65732d5 | (Paweł Murias)++ | lib/ (2 files):
prefix the name of the interface with an I
20:55
ecza: 87f66df | (Paweł Murias)++ | lib/Builtins.cs:
Load the p5 interpreter assembly from the loading path.
pmurias diakopter,sorear: fixed 20:56
20:56 wamba left
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
how do we do that portably?
or should i just assume gcc?
21:00 zby_home__ joined
sorear You should probably use the same C compiler Perl5 was compiled with 21:00
21:01 zby_home_ left
sorear perldoc ExtUtils::Embed 21:01
masak 'night, #perl6
pmurias masak: 'night
diakopter speedy
sorear I guess you want perl -V:cc too 21:02
21:02 masak left
sorear reads perlembed 21:03
21:09 Reaganomicon joined
dalek ecza: 1e1a24e | (Paweł Murias)++ | / (6 files):
Eval runs basic perl5 code. The Makefile needs review to check if it can
21:14
TimToady \o/
sjn oh, nice 21:15
sorear \o/
Woodi niecza can mix v6 and v5 in one program ? 21:17
pmurias to a very basic degree 21:18
in the current revision only ;)
Woodi i am nearly sure will be better :) 21:19
sorear Woodi: rakudo can/could do better. 21:22
pmurias mildew too
sorear (keep in mind as I say this that pmurias++ has been working on niecza+p5 for, I guess a few hours now) 21:23
niecza> my $r = 0; say CLR::System::Math.DivRem(100, 7, $r); say $r; 21:24
14
2
im2ee Good night! :)
21:24 im2ee left
Woodi gn 21:24
pmurias sorear: do you know how can i load the dll in a way it won't depend on the cwd? 21:25
dalek ecza: 3a80d56 | sorear++ | lib/NieczaCLR.cs:
[CLR] Implement calling methods with ref-parameters
sorear pmurias: Assembly.Load("Perl5Interpreter") will look first for $NIECZA_ROOT/obj/Perl5Interpreter.dll 21:26
pmurias: specifically it looks in AppDomain.CurrentDomain.BaseDirectory
pmurias sorear: i meant the .so
the one we compile from c code 21:27
sorear good question, I've never tried it
pmurias: how did mildew cope with users who don't have a libperl.so? 21:28
pmurias mildew depended on perl5
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
I don't know if they reversed that change in 5.14
21:31 y3llow_ joined
dalek ecza: bb5a7c3 | mberends++ | lib/Printf.cs:
[lib/Printf.cs] implement minimum width for %s, fixes issue #58
21:31
21:31 pothos_ joined
pmurias sorear: i have 5.12.0 and the embedding works 21:32
the embedding in niecza that is
sorear mberends: if you make your commits match /fixes #\d+/ then github will automatically clolse the issue.
pmurias sorear: you have a perl from perlbrew or a tampered one from the package system? 21:33
21:33 pothos left, pmichaud left, jrockway_ left
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
mberends sorear: I'm still getting used to github issue tracking
21:34 y3llow left, pothos_ left
sorear pmurias: how did mildew/smop embed perl? 21:34
21:34 y3llow_ left, pothos_ joined
sorear needs to track down an old version of gcc so ey can play with mildew/smop 21:34
21:34 y3llow joined, pothos_ is now known as pothos
diakopter $ ./run/Niecza.exe -e 'eval("print \"Hello \";",:lang<perl5>)' 21:34
Aborted
pmurias diakopter: did you run make perl5? 21:36
diakopter yes
pmurias sorear: mildew/smop did it in the same way niecza does
the way it is describe in the manual page 21:37
21:37 pmichaud joined, jrockway_ joined
sorear pmurias: did mildew create a second .so file which links in Perl? 21:37
pmurias: or did smop link Perl directly? 21:38
mberends \o pmichaud
pmurias sorear: directly, smop was written in c
sorear: make perl5 fails to compile on your perl? 21:39
diakopter pmurias: it fails the same way under both .NET and mono
sorear pmurias: blizkost (which uses exactly the approach you just did) does not compile with a default-built Perl 5.12.0
diakopter pmurias: it fails somewhat faster under .NET ;) 21:40
pmurias diakopter: it seems to be a segfault
with Aborted
diakopter I'm in cygwin
pmurias sorear: i have a default-built Perl 5.12.0
diakopter since niecza can't be built on windows without cygwin 21:41
sorear pmurias: what is perl -V:useshrplib?
pmurias useshrplib='false';
sorear: can you check if "make perl5" works on your perl? 21:43
sorear works
but it's a bad test, because I'm on x86
pmurias same as me 21:44
sorear diakopter: are you on x86_64? 21:45
pmurias sorear: so we still suffer from no .so issues?
sorear: on x86_64?
sorear pmurias: 1. Perl can be compiled either as a shared library or as a static library
pmurias: 2. on x86_64, any code which will be loaded at runtime needs to be compiled with -fPIC 21:46
pmurias: 3. Perl does not use -fPIC when compiling as a static library
diakopter sorear: sorear: good question; how can I tell whether my perl is x86_64 21:47
sorear diakopter: file `which perl`
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.
TimToady perl -V might tell you something
diakopter /usr/bin/perl: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows 21:49
same for mono 21:50
21:52 Guest52684 joined
Guest52684 Cal? 21:52
diakopter vary?
pmurias sorear: according to en.wikipedia.org/wiki/Position-inde...ndows_DLLs windows dlls are not position indepenent 21:53
21:53 Guest52684 left
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
might as well embed parrot too 21:55
sorear pmurias: I'm only talking about the Unix ABI; I don't have much knowledge of the Windows case 21:56
21:57 wallberg left
sorear I was thinking of that worst-case solution. 21:57
My work on Blizkost has made me pessimistic.
21:58 colorspace joined
Woodi pmurias: is it hard to extract SMOP out of haskel ? i wanted two times look at it and stopped... 21:58
pmurias Woodi: SMOP doesn't use haskell any more 21:59
Woodi ?
on github somewhere ?
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
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:01
host04 has two perls, one perlbrew in /chroot, one distro; *only* the distro perl has a libperl.so 22:02
pmurias still doesn't trust the distro perl ;) 22:03
what is host04? 22:04
arnsholt sorear: At least perlbrew lets you escape the shackles of old Perls =) 22:05
22:05 jfried left
sorear pmurias: host04.appflux.net, runs p6eval and dalek 22:05
diakopter host04 runs p6eval in a chroot
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`
/usr/bin/ld: /home/p6eval/perl5/perlbrew/perls/perl-5.14.1-RC1/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
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)
sorear pmurias: months ago
diakopter sorear: there's not a distro perl in the chroot? 22:09
sorear diakopter: there is 22:13
but it's not first in #PATH
22:14 cyfi left 22:24 pmichaud left, jrockway_ left
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
22:30 pmichaud joined, jrockway joined
Woodi compiling++ :) 22:32
oki, gn and gl
sorear pmurias: +1 22:36
jnthn ugh, too tired to hack 22:37
sleep &
22:47 dorlamm joined
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:50
22:50 donri left
pmurias the most basic trick for linux being LD_LIBRARY_PATH ;) 22:52
23:09 colorspace left
sorear pmurias: could you elaborate on the reflectionway? 23:12
23:13 dorlamm left
pmurias sorear: i'm not entierly sure about that 23:18
sorear: google found www.codeproject.com/KB/dotnet/Dynam...play=Print
sorear: but i think generating a .dll.config with the paths in full is a better idea 23:19
for mono it seems to be a much better idea
for .NET we (preferably someone else who uses .NET on windows) can insert a windows specific hack 23:20
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 www.mono-project.com/Interop_with_N...y_Handling step 1 searches in run/ instead of the directory the .NET vm is located 23:25
hmm under .NET on windows the niecza is run as run/Niecza.exe instead of mono run/Niecza.exe 23:26
so ../obj/p5embed.dll should be fine
23:28 wolfman2000 joined
pmurias sorear: there seems to be a couple of different solutions/hacks for windows/.net so i assume that can be handled seperatly 23:31
sleep& 23:34
23:34 pmurias left 23:40 Trashlord left 23:41 Trashlord joined 23:52 replore joined 23:56 replore left 23:59 replore joined