»ö« 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 jaldhar joined 00:03 whiteknight left, risou is now known as risou_awy 00:04 whiteknight joined, lichtkind left 00:12 lichtkind joined
lichtkind nom: say 1..5 00:13
p6eval nom ebd495: OUTPUT«1..5␤»
djanatyn :) 00:14
lichtkind nom: say (1..5)
p6eval nom ebd495: OUTPUT«1..5␤»
lichtkind nom: say list(1..5)
p6eval nom ebd495: OUTPUT«1 2 3 4 5␤»
lichtkind nom: say list(1,2...5)
p6eval nom ebd495: OUTPUT«1 2 3 4 5␤»
lichtkind nom: say list(0,1, $^a + $^b ...13)
p6eval nom ebd495: OUTPUT«Nominal type check failed for parameter '$a'; expected Any but got Mu instead␤ in sub infix:<+> at src/gen/CORE.setting:1821␤ in <anon> at /tmp/6PUPDFS8t9:1␤ in <anon> at /tmp/6PUPDFS8t9:1␤␤» 00:15
lichtkind nom: say list(0,1, * + * ...13)
p6eval nom ebd495: OUTPUT«0 1 1 2 3 5 8 13␤»
lichtkind nom: say list(1,2, * * * ... 32)
p6eval nom ebd495: OUTPUT«1 2 2 4 8 32␤»
lichtkind too weird 00:16
nom: say list(1,2, $^a * * ... 32) 00:17
p6eval nom ebd495: OUTPUT«Nominal type check failed for parameter '$a'; expected Any but got Mu instead␤ in sub infix:<*> at src/gen/CORE.setting:1829␤ in whatevercode <anon> at /tmp/Hab2M6oaq0:1␤ in sub generate at src/gen/CORE.setting:6897␤ in sub coro at src/gen/CORE.setting:3728␤ in m…
lichtkind autogenerated positional should work here
niecza: say list(1,2, * * * ... 32) 00:18
p6eval niecza v8-65-g4e8d22a: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'list' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 685 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) ␤ …
lichtkind niecza: say list(1.. 32)
p6eval niecza v8-65-g4e8d22a: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'list' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 685 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) ␤ …
lichtkind good night 00:19
00:19 lichtkind left
ruz std: grammar G { <?.boo> } 00:23
p6eval std e3c970e: OUTPUT«ok 00:01 118m␤»
ruz std: grammar G { <.?boo> }
p6eval std e3c970e: OUTPUT«ok 00:01 118m␤»
00:29 frhodes left, frhodes joined
TimToady std: / <????????????????????????????????.boo> / 00:29
p6eval std e3c970e: OUTPUT«===SORRY!===␤Unable to parse metachar at /tmp/HRCr2dzk1Z line 1:␤------> / ⏏<????????????????????????????????.boo> /␤Couldn't find final '>'; gave up at /tmp/HRCr2dzk1Z line 1:␤------> / <???⏏???????????????????????…
TimToady std: / <!!!!!!!!!.boo> / 00:30
p6eval std e3c970e: OUTPUT«===SORRY!===␤Unable to parse metachar at /tmp/EQIJXwf3Pl line 1:␤------> / ⏏<!!!!!!!!!.boo> /␤Couldn't find final '>'; gave up at /tmp/EQIJXwf3Pl line 1:␤------> / <!!!⏏!!!!!!.boo> /␤Parse failed␤FAILED 00:01 11…
TimToady std: / <!!.boo> /
p6eval std e3c970e: OUTPUT«ok 00:01 120m␤»
TimToady std: / <!!!.boo> /
p6eval std e3c970e: OUTPUT«===SORRY!===␤Unable to parse metachar at /tmp/oH9ajkwWs6 line 1:␤------> / ⏏<!!!.boo> /␤Couldn't find final '>'; gave up at /tmp/oH9ajkwWs6 line 1:␤------> / <!!!⏏.boo> /␤Parse failed␤FAILED 00:01 119m␤»…
TimToady std: / <!!!> /
p6eval std e3c970e: OUTPUT«ok 00:01 119m␤»
00:31 thou left
ruz TimToady: <.?boo> is incorrect syntax, right? 00:33
TimToady std: say $_.?foo
p6eval std e3c970e: OUTPUT«ok 00:01 119m␤»
TimToady looks like an optional method call 00:34
00:34 frhodes left
TimToady not sure what its semantics should be, probably fail the match if the .? doesn't find a method 00:34
this is unspecced though 00:35
ruz TimToady: but it's not a code block
TimToady it's just a method call to a grammar method/rule
ruz then <?boo> should be optional function/code call
TimToady <? means something else
ruz yes
TimToady <. means method call
ruz <foo> can call sub/method, right? 00:36
TimToady yes, but it also captures
<.foo> doesn't capture
ruz all this kinda inconsistent even if it has some background 00:37
TimToady we've had it many other inconsistent ways, and this seems to work pretty well :)
ruz std: /<.foo=.bar>/ 00:38
p6eval std e3c970e: OUTPUT«ok 00:01 120m␤»
TimToady that's probably not doing what you think
std: /<.foo = .bar>/ 00:39
p6eval std e3c970e: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/44tpUUQHa6 line 1:␤------> /<.foo =⏏ .bar>/␤Can't call method "from" on unblessed reference at /usr/local/share/perl/5.10.1/STD.pm line 5378…
TimToady either that, or it's not doing what I think :)
00:39 wolfman2000 joined
ruz just trying a few bits from weekend spec/nqp code reading 00:39
00:46 envi joined
TimToady yeah, that parse is probably a bit infelicitous... 00:47
method should not be delegating to assertion 00:51
ruz std: / <?.?foo> / 00:57
p6eval std e3c970e: OUTPUT«===SORRY!===␤Unable to parse metachar at /tmp/ZT20RhddDu line 1:␤------> / ⏏<?.?foo> /␤Couldn't find final '>'; gave up at /tmp/ZT20RhddDu line 1:␤------> / <?.⏏?foo> /␤ expecting any of:␤ assertion␤ dotty me…
TimToady so <.?foo> is not being parsed like .?foo 00:58
ruz yep
TimToady if assertion:method parsed its own method, it would, and would also disallow <.foo=.bar>
so that's probably what oughta happen
niecza: / <.foo=.bar> / 00:59
p6eval niecza v8-65-g4e8d22a: ( no output )
ruz std: /<before>/ 01:06
p6eval std e3c970e: OUTPUT«===SORRY!===␤before requires an argument at /tmp/HfQLJwiFpw line 1:␤------> /<before⏏>/␤ expecting assertion␤Parse failed␤FAILED 00:01 119m␤»
01:07 woosley joined, silug left 01:08 silug joined
dalek ecza: 6c0c55a | sorear++ | docs/announce.v9:
Add v9 announce
01:15
sorear request for comments 01:16
01:17 abercrombie joined 01:20 jferrero left 01:24 whiteknight left 01:28 awwaiid joined
TimToady looks pretty good 01:30
01:39 agentzh joined, agentzh left, agentzh joined 01:44 yarp joined, sftp_ left
colomon so, slightly random point... I'm trying to run the ABC module in nom, and I'm getting an error. Okay, that's totally expected. What I hadn't expected is that the fatal error is getting printed to STDOUT, not STDERR. 01:49
01:54 uasi joined, araujo joined 02:02 sili left, bluescreen10 left 02:12 soh_cah_toa left 02:15 tokuhirom left 02:17 tokuhirom joined 02:21 lateau_ left 02:22 abercrombie left 02:27 soh_cah_toa joined 02:33 Sarten-X left, drbean joined 02:48 tokuhirom left 02:50 Sarten-X joined 02:53 drbean left 02:54 tokuhirom joined
djanatyn Is it currently possible to generate a windows executable for a perl6 program? 02:58
Or am I going to have to wait a few years for that? 02:59
plobsing djanatyn: how "real" does the executable need to be? 03:02
it should be fairly simple to make a stub executable that unpacks a perl6 implementation and your sourcecode and then executes it inplace 03:03
fwiw, that's how parrot generates rakudo's perl6 executable 03:04
more or less
djanatyn plobsing: How trivial would that be, and how large would the resulting executable (and any other files required) be, at minimum?
03:06 jferrero joined 03:07 eiro left, eiro joined
tadzik hello #perl6 03:08
plobsing djanatyn: there would be no other files (it self-extracts everything it needs) 03:09
as a result, probably very large
djanatyn Any estimates, in terms of megabytes? :) 03:10
I know py2exe, which turns python programs into windows executables, does something similar. 03:11
plobsing well, rakudo clocks in at 10M right off the bat
djanatyn: I was thinking of PAR 03:12
djanatyn It includes a tiny python distribution with the file.
Ah, I played with that for a bit.
I could never get it to work >_>
eventually, I had a friend help me out.
03:13 sili joined
djanatyn Hmm. 03:13
03:15 wolfman2000 left
plobsing how important is it to generate a true executable? you could always change the filetype association appropriately. 03:16
03:21 tokuhirom left 03:23 tokuhirom joined
djanatyn So, when you're using string interpolation and put a statement inside a bracket in perl6, it executes the code inside and replaces it with the return value? 03:31
PerlJam djanatyn: aye 03:32
djanatyn I was playing around with it, and if you put a statement inside with side effects that alter other variables, the return value is what is represented inside the string, but the other variables persist with whatever effect the statement had on them.
THat's cool.
I'm starting to think Perl 6 has the coolest string interpolation, like TimToady said :D
PerlJam Perl 6 is cool in many respects.
djanatyn Indeed. 03:39
sorear yeah, we almost don't need (s)printf 03:41
PerlJam almost
sorear Does Windows have a good solution for third-party shared libraries yet? 03:42
sorear wants to see an 8kb stub-executor that can be attached to Perl 6 programs and functions by downloading parrot.dll and perl6.pbc from the Internet 03:43
iff they are not already cached on the user's machine somewhere 03:44
without OS support it would have to be bigger, and less correctly working
03:47 yarp left
mberends many Windows applications begin with a setup.exe sized 1~3MB on your machine, which then phones home and pulls in the full product. 03:50
sorear djanatyn: incidentally, niecza v8 can create Windows .exe files
djanatyn :o 03:51
that's awesome.
One of the biggest difficulties I've had with programming is porting quickly and cleanly.
sorear not strictly standalone as they require at least 3 of the Niecza .dlls
note, this feature is not in v9
djanatyn I write code that works great and fine on my computer, but I can't get it working anywhere else.
sorear djanatyn: the technical term for that is "deployment"
porting is when you modify your program so that it will run on different *kinds* of computer 03:52
03:53 rlpowell joined
rlpowell p6eval: "hello { my $foo = 'world' }"; 03:53
03:53 tokuhirom left
rlpowell perl6: say "hello { my $foo = 'world' }"; 03:53
p6eval pugs, rakudo a55346: OUTPUT«hello world␤»
..niecza v8-66-g6c0c55a: OUTPUT«Potential difficulties:␤ $foo is declared but not used at /tmp/gGonNc_5tQ line 1:␤------> say "hello { my ⏏$foo = 'world' }";␤␤hello world␤»
PerlJam it's really weird to me that pugs gets that one right.
sorear hello and welcome, rlpowell 03:54
djanatyn Yep, that's the way it works, rlpowell.
He didn't believe me about string interpolation in perl 6 :D
rlpowell wow. My respect for p6 has just dropped through the floor.
djanatyn ...interesting.
rlpowell Sorry, I don't mean to be offensive, but without context that's really awful.
PerlJam rlpowell: why is that?
rlpowell Can someoen explain to me why that interpolation occurs, and how that doesn't boil down to "You can't ever have any special characters in any string ever because all strings interpolate theentire language? 03:55
I have no p6 context *at all*, so this is kind of drive-by dickery on my part; blame djanatyn :)
djanatyn I'm just spreading the perl 6 gospel! ^_^;
PerlJam rlpowell: the interpolation occurs because that's how it's designed.
03:56 tokuhirom joined
sorear Perl historically has had magic characters in "" strings 03:56
rlpowell Well, yes, I caught that. But is it just "any P6 in your strings gets evaluated"?, or is there more to it?
sorear Perl 6 has more of them
PerlJam rlpowell: and not ll strings interpolate the entire language. I'm not even sure what you mean by that.
sorear rlpowell: only the left brace introduces statements
djanatyn rlpowell: The P6 has to be within brackets.
ermm
rlpowell OK.
djanatyn curly braces
PerlJam rlpowell: and P6 inside of {} inside of double quoted strings gets evaled
rlpowell How do you avoid that? 03:57
PerlJam avoid what?
djanatyn rlpowell: I imagine there's an escape character
soh_cah_toa use single quotes?
sorear rlpowell: \{, or use single quotes
djanatyn or, you could just use regular strings.
single quotes, I mean. non-interpolating.
rlpowell What if I want variable interpolation, but also a literal { ?
sorear \{
PerlJam rlpowell: \{
rlpowell Got it. Thanks.
djanatyn Yeah, that seems very reasonable to me.
rlpowell I'd prefer a 2-character intro, but enh. 03:58
djanatyn there are sigils that have to be escaped - the curly braces isn't exactly a common thing you would put in a string.
PerlJam rlpowell: Ruby is very similar except they use #{...} in double quoted strings.
sorear it's also possible to pick and choose what kinds of interpolation you want, but I've only wanted to use that once.
niecza: my $var = 5; say q:s"$var { 2 + 2 }" 03:59
p6eval niecza v8-66-g6c0c55a: OUTPUT«5 { 2 + 2 }␤»
djanatyn Ah, cool.
sorear niecza: my $var = 5; say qs"$var { 2 + 2 }" # I wonder
rlpowell PerlJam: Yes, I rather prefer the second character there; having the { by itself be your metacharacter just seems to be asking to have to quote a lot.
p6eval niecza v8-66-g6c0c55a: OUTPUT«5 { 2 + 2 }␤»
03:59 tokuhirom left
djanatyn niecza: my $var = 5; say q:y"$var y 2 + 2 y" 04:00
rlpowell But that's a fairly minor issue; what I thought was happening originally was a lot worse. :)
p6eval niecza v8-66-g6c0c55a: OUTPUT«===SORRY!===␤␤Unrecognized quote modifier: y at /tmp/5yqmsuj8Lt line 1:␤------> my $var = 5; say q⏏:y"$var y 2 + 2 y"␤␤Potential difficulties:␤ $var is declared but not used at /tmp/5yqmsuj8Lt line 1:␤------> my […
PerlJam rlpowell: well ... so far it hasn't been a problem. :-)
djanatyn ...I suppose that's not how it works. ^_^;
PerlJam djanatyn: no.
djanatyn: the adverb describes what things can/can't be interpolated.
djanatyn rlpowell: Did you think that any text that perl 6 recognized as a statement inside an interpolating string would be evaluated and substited with the return value?
rlpowell djanatyn: I thought it was evalling all strings, yes. 04:01
djanatyn PerlJam: So, in the case of q:s, what can and cannot be interpolated?
rlpowell: Oof. That would be...just wrong.
sorear djanatyn: scalars
djanatyn ah 04:02
sorear djanatyn: like in Perl 5, q"" is the same as ''
rlpowell < djanatyn> rlpowell: Oof. That would be...just wrong. -- You understand my horror now?
sorear q:s or qs is '', with $foo interpolation
djanatyn rlpowell: Yep.
rlpowell: Do you still think Ruby's string interpolation is better?
sorear djanatyn: there's also qa (arrays), qh(hashes), qc (closures i.e. brace groups), qf (functions), qb (backslash escapes), maybe more 04:03
PerlJam sorear: does niecza grok the full set of adverbs?
oh, I'm guessing not :) 04:04
rlpowell Yes. I strongly prefer 2-char intros. Because for any singlee special character, sooner or later I've had to write text that has a bunch of them, and quoting them all has driven me nuts. IMO you shuold never have single-charter interp in a general languages general string syntax, ever.
sorear djanatyn: you can combine them: q:s:c[ $foo { bar } but not @baz ]
PerlJam For the full list see S02:3740
rlpowell Erm, that was all to djanatyn ^^ ; the rest of you can ignore it.
sorear PerlJam: niecza doesn't grok :x
I can't remember if it does :p 04:05
djanatyn should get a niecza setup to play with
04:05 birdwindupbird joined
sorear niecza: say qp|/etc/passwd|.perl 04:05
p6eval niecza v8-66-g6c0c55a: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class CallMethod␤ at /home/p6eval/niecza/src/NieczaActions.pm6 line 970 (NieczaActions C392_ANON @ 5) ␤ at /home/p6eval/niecza/src/NieczaActions.pm6 line 979 (NieczaActions NieczaActions…
sorear well, that's an interesting error
rlpowell: mm. Not a fan of \n are you? 04:06
PerlJam rlpowell: as I've said ... so far it hasn't been a problem. And several of us have been writing Perl 6 for a few years now. 04:07
sorear niecza: say '$x $y $z \qq[{2 + 2}] $a $b $c'
p6eval niecza v8-66-g6c0c55a: OUTPUT«===SORRY!===␤␤Action method backslash:qq not yet implemented at /tmp/DAvvOsOyqP line 1:␤------> say '$x $y $z \qq[{2 + 2}]⏏ $a $b $c'␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting lin…
sorear bah
rlpowell: according to spec, in a '' context you can still use general interpolation but it requires the \qq intro 04:08
PerlJam rlpowell: also, there's a strong correspondence between {} and "block of executable code" in Perl 6.
sorear nom: say '$x $y $z \qq[{2 + 2}] $a $b $c' 04:09
p6eval nom ebd495: OUTPUT«$x $y $z \qq[{2 + 2}] $a $b $c␤»
sorear perl6: say '$x $y $z \qq[{2 + 2}] $a $b $c'
p6eval niecza v8-66-g6c0c55a: OUTPUT«===SORRY!===␤␤Action method backslash:qq not yet implemented at /tmp/ydX4EhljGp line 1:␤------> say '$x $y $z \qq[{2 + 2}]⏏ $a $b $c'␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting lin…
..rakudo a55346: OUTPUT«$x $y $z \qq[{2 + 2}] $a $b $c␤»
..pugs: OUTPUT«$x $y $z 4 $a $b $c␤»
sorear heh, looks like pugs alone gets it right.
pugs++
PerlJam pugs++ indeed.
sorear btw, v9 announced. 04:10
04:10 kaare_ joined
PerlJam All we need now is audrey :) 04:11
04:12 molaf joined
sorear yeah, well 04:12
Rakudo is the only Perl 6 implementation that will survive past 2016 since Rakudo alone has attracted a second developer
PerlJam sorear: Are you already getting burnt out on Niecza? 04:13
sorear PerlJam: I wouldn't go so far as to say burnt out, but the enthusiasm is certainly fading. 04:14
04:14 satyavvd joined
PerlJam I doubt if I'll ever be a developer for niecza, but I'm certainly starting to use it more often. 04:17
mberends sorear: that would be very sad. Please do $whatever-works-for-you to avoid burnout, many people are just beginning to become interested in Niecza. 04:18
PerlJam sorear: what mberends said!
tadzik Niecza v9 no longer supports .NET. That's interesting
Tene orly? what's niecza running on instead?
04:19 mkramer joined
mberends mono, but I saw some Visual Studio files from diakopter++ in Niecza very recently 04:20
04:24 frhodes joined
mberends sorear: imho gaining file access tests versus losing .NET compatibility is a poor trade, especially in the context of wanting to attract more users and contributors. I'd buy a regression on that any time. 04:26
sorear that's what I wanted to hear
04:27 rlpowell left
djanatyn hmm 04:33
mberends sorear: regarding startup speed, would it be feasible to make a small loader daemonize a full Niecza process at first execution, and then connect to it as a client in subsequent executions? I could imagine doing it in C, not sure about CLR. 04:34
djanatyn well, I've been using mostly ghci and python for odd jobs around the desktop - just figuring out random questions and such.
I'm going to try to actively use rakudo for those now.
04:36 soh_cah_toa left
tadzik cool 04:37
mberends: I could imagine mono itself having that feature, maybe
mberends it would be a bit like mod_perl. You'd have to be thorough about cleaning up data after each execution, and be very careful to avoid memory leaks. 04:40
sorear mberends: that could work, but it's far too inelegant for my tastes 04:41
mberends :) there is that
sorear the major problem is that compiled-niecza is too big; the largest part of startup cost is spent loading assemblies 04:42
04:42 wamba joined
Tene I notice in S02, there's a few comments on macros for quote-like operations, but none discuss how to add a quoting adverb. 04:42
sorear I think it might be reasonable to have some kind of high-level bytecode for regexes
Tene: you need to augment the Q slang and add a multi candidate to tweak 04:43
04:50 frhodes left
Tene ahh, Q adverbs are roles applied to to the quoter there, in STD 04:54
so, augment slang Q { role A0 { token escape:sym<...> { ... } } } 04:55
oh, no, tweak 04:56
tweak just mixes in those roles 04:57
TimToady well, STD does the mixin using Moose internally
Tene TimToady: one thing that's not clear to me at all is, given a grammar modification like that, how do I indicate how it should be compiled? I assume I'd use a quasi somewhere, but where do I add that? 04:58
05:00 frhodes joined
Tene or, should I be defining that with a macro instead? 05:01
sorear Tene: I would think that if you are modifying the grammar, you need to specify how it is compiled by modifying the actions. *handwave* 05:02
TimToady I don't really know what you're trying t odo
sorear or, inline the &make call within a {} block
tadzik nqp: say("=begin END" ~~ /'=begin' [ <!before \h* \n> || { say "noez!" }]/) # huh? 05:06
p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤»
tadzik oh, ok
sorear TimToady: I'd like to see a complete example of a grammar modification that, say, makes "\ux" eq "X", "\uyy" eq "Yy" 05:08
TimToady: obviously part of the solution is augment slang Q { token backslash:u { <sym> . } } 05:09
TimToady: but where do I put the code that generates the uc call?
Tene that's approximately the question I was asking, yes 05:12
dalek ecza: 00ca678 | sorear++ | src/ (6 files):
mergeback
05:14
ecza: 5c9b8fd | sorear++ | src/niecza:
Implement \qq[] escape syntax
sorear 1 insertions(+), 0 deletions(-)
I love these commits
tadzik (: 05:15
05:17 wamba left 05:19 wamba joined
mberends sorear: is niecza/docs/compiler.pod out of date? 'Perl 5 pipeline', 'viv-generated parser'? I'll edit it if you give me just a few hints what to say. 05:23
sorear mberends: yow! almost none of what's there is useful 05:28
mberends we could simply delete most of it and start afresh 05:29
sorear probably for the best
it's so embarrasing to forget a doc even exists
mberends ok, I'll write something under the forgiveness license 05:30
sorear "forgiveness > permission"?
mberends yes
I know you'll correct whatever is wrong 05:31
breakfast & 05:33
dalek kudo/nom: 53b1d8f | tadzik++ | src/Perl6/Grammar.pm:
Fix S02-whitespace_and_comments/begin_end_pod.t
05:35
05:37 REPLeffect left 05:39 SHODAN joined 05:40 frhodes left 05:50 wamba left, REPLeffect joined 05:53 wamba joined 06:05 wtw joined 06:06 wamba left
dalek ecza: 1b855f7 | sorear++ | src/niecza:
Fix qp|| syntax
06:14
sorear out 06:20
06:20 koban` joined, koban` left 07:00 mkramer left 07:02 wk joined
dalek ecza: ce20cf8 | (Martin Berends)++ | docs/compiler.pod:
[docs/compiler.pod] begin refresh of content
07:07
07:17 TiMBuS left, TiMBuS joined
sorear mberends: sleep is not cooperating - consider me available 07:22
sorear is now attempting to make sense of nom's native types implementation 07:23
07:25 mj41 joined 07:36 wk left
sorear nom: my int $x; my $y := $x; $y = 5; say $x 07:44
p6eval nom 53b1d8: OUTPUT«Cannot assign to a non-container␤ in <anon> at /tmp/M07XTKmea6:1␤ in <anon> at /tmp/M07XTKmea6:1␤␤»
sorear nom: my int $x = 42; sub foo($y is rw) { $y++ }; foo($x); say $x; 07:45
p6eval nom 53b1d8: OUTPUT«Cannot assign to a non-container␤ in sub postfix:<++> at src/gen/CORE.setting:2127␤ in sub foo at /tmp/EamQxNR_8R:1␤ in <anon> at /tmp/EamQxNR_8R:1␤ in <anon> at /tmp/EamQxNR_8R:1␤␤»
sorear Correct?
07:45 daxim joined
mberends surely wrong, it looks NYI 07:46
sorear making that work would involve a lot of performance-sapping complications 07:47
r/w autoboxing requires extending the life of the lexpad indefinitely 07:48
and it will expose inlining behavior 07:49
loop (my $x = 0; $x < 10; $x++) { my int $y = $x; secretly_saves_a_reference($y); }
how many distinct references are saved? 07:50
where "distinct" is taken in the sense of operational distinguishability
mberends 10
sorear grats, you've just broken the single largest optimization in niecza 07:52
mberends native type are not going to perform faster than builtin types because of all this. The reason to use them has more to do with native code interop (structs etc).
sorear reusing lexical slots around loops is *huge*
mberends I cannot imagine how the code to reuse then would work 07:54
*them 07:55
sorear mberends: them=?
mberends lexical slots
sorear I think I understand now 07:59
mberends in !compile, where do the stages in @$.stages come from? 08:02
sorear the constructor 08:03
src/niecza line 168
moritz doesn't see how one can take a reference to a native int at all
sorear that code is slightly vestigal; I have an eye to removing the stage system 08:04
moritz good morning btw
sorear moritz: (CallFrame,Int) pair
mberends gm moritz
sorear o/ moritz
moritz huh. 08:05
you can't bind to a nativly-typed lexical, afaict
and natives are passed by value
so all you get out of callframe.my<$y> is an int 08:06
sorear *currently* natives are passed by value
moritz not a reference to an int
sorear I think mberends wants natives to be passed by reference
mberends certainly when we get to structs
sorear we want has int $.foo is rw to DWIM 08:07
moritz oh. 08:08
I think that'd come at too high a price. 08:09
08:10 im2ee joined
sorear moritz, mberends: I'd like the two of you to come to a consensus before I implement anything :D 08:13
moritz :-) 08:14
I can see how has int $.thing is rw is desirable for NCI
but maybe we need some cheating magic for that 08:15
08:15 wamba joined
mberends I think native types are not here for performance reasons. We have no use cases yet, but NCI will be the kind of application. Maybe Buf containing bytes has some overlap as well. 08:16
moritz I do think that performance is a major reason for native types. 08:17
mberends we should consider example usage first, then consider the spec, then implement.
moritz maybe we can cheat ourselves a way out
we could have a kind of Int rw-proxy 08:18
sorear moritz: in particular I want your thoughts on mberends' reply to irclog.perlgeek.de/perl6/2011-08-30#i_4344732
moritz that stores a reference to the object which has the int slot, and the slot offset
sorear moritz: that's what I meant by a (CallFrame,Int) pair 08:19
moritz sorear: ah.
sorear: if we all that just for user-space objects with int slots, and not for lexpads, we can still get lots of optimizations 08:21
sorear the most important thing we can't get, is loop optimization
moritz IMHO it's OK to forbid 'is rw' on native routine parameters -- if you want that kind of magic, you use a boxed type instead
sorear but on reflection that isn't necessarily a big loss
since you can always hoist variables out of loops, C89-style 08:22
a loop body with no native variables doesn't suffer the unique storage penalty
even if it closes over native variables
did that make any sense
mberends only if you can *always* hoist, I'm not sure how that works 08:23
sorear mberends: I mean manual hoisting
mberends ok, I get it
moritz doesn't 08:25
but that's probably OK
mberends I think it means the "my int $y" is repositioned before the loop and "$y = $x" remains inside the loop. 08:27
08:28 wk joined, baest joined 08:40 dakkar joined 08:45 im2ee left 08:59 im2ee joined 09:09 wamba left 09:10 im2ee left, im2ee joined, im2ee left 09:11 im2ee joined 09:14 orafu left 09:15 orafu joined 09:17 Mowah_ joined 09:26 Sarten-X left
lue [looking at old euler problems in mu] what's Benchmark, and why am I expected to have it? 09:31
moritz lue: it's probably one of the old pugs-based modules that is also included in mu
lue that'd make sense, considering the plethora of /usr/bin/env pugs shebangs in those problems :) 09:32
09:33 renormalist left, Sarten-X joined, renormalist joined
moritz (they are probably in ext/ ) 09:35
lue is the inability to accept the line module Benchmark-0.1; nom's fault? [I have a feeling it is]
moritz lue: no, the naming spec has changed
iirc
lue ah, one would do well to s/-0.1/:ver<0.1>/, correct? :) 09:36
moritz thinks so
lue I'm glad I got bored and decided to peruse mu [specifically the euler problems] . It's like an archaeological dig! :) 09:38
09:38 pernatiy left
lue [I have the urge to upgrade the Pod in Benchmark to Pod6. I think I shall do so] 09:41
moritz lue: feel free to go wild in mu
09:42 cexsum left
mberends :) 09:42
lue
.oO(just not "decimate entire subdirectories" wild, I would imagine ...)
moritz lue: well, it would make sense to leave misc/dalek-* in tact 09:43
09:43 cexsum joined
moritz lue: and camelia should be preserved 09:43
lue: otherwise much of mu is wasteland 09:44
09:44 woosley left
lue I'd only do it if the subdirectory were named something like "remove-after-Jan-13-2001" . Other than that, I'd reach for Community Consensus™ first 09:44
.oO(then again, f>p)
09:45
moritz and it's version-controlled after all.
mberends Citizen Lue is a Good Citizen indeed 09:46
09:53 am0c joined 09:54 cexsum left, Mowah_ left 09:56 wamba joined
lue [S26.html] somehow, I don't think the original header was titled "The FormattingCode<121451920> block" 09:56
Benchmark coughs on this line: my @s = (time, times); I wonder what 'times' once meant [I know what 'time' means] 09:59
At least the module can be loaded, and it doesn't choke on the Pod (AFAICT). I think I should commit, and worry about the *code* working later :) 10:05
mberends lue: perldoc -f times
10:06 koban` joined
lue let me guess, it's one of those things that's "the same as it was in P5", so it wasn't mentioned in the synopses (from what I could grep, at least) 10:06