»ö« 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. |
|||
jnthn | diakopter: same ;-) | 00:00 | |
jnthn wonders off to bed | |||
diakopter | \ | ||
supernovus | night jnthn! | ||
00:03
replore_ joined
|
|||
sorear | TimToady: What should be the result of my $x = 'a'; $x ~= $x for ^1024; say $x.chars? | 00:04 | |
TimToady: I see options 1. dies in loop 2. dies at 'chars' 3. Inf 4. 2**1024 | |||
00:04
ZapZ joined
00:05
tokuhirom left,
wolfman2000__ joined
00:08
jferrero joined,
wolfman2000_ left
|
|||
supernovus | Okay, I sent a "pull request" for those changes to IO::Socket::INET. Now to see why recv() isn't working as it previously did. | 00:12 | |
00:14
patspam left
|
|||
TimToady | sorear: well, it depends on if you have enough memory ;) | 00:17 | |
you might need to run it on the simulator that runs the multiverse | |||
diakopter | I posit option 0: the compiler's optimizer recognizes the overrun | 00:18 | |
TimToady | I think option 1 is most likely even with most lazy rope implementations | 00:20 | |
diakopter: I suspect an optimizer that smart would generally use up more electrons than it was worth for typical Perl code | 00:21 | ||
colomon | hmmm. I guess I'd be very surprised if $x ~= $x for ^1024 were lazy. I mean, $x =. push: | 00:25 | |
argh | |||
$x .= push($_) for ^1024 isn't excepted to be lazy, is it? (is what I meant with the second bit there.) | 00:26 | ||
afk # putting H to bed | |||
supernovus | Okay, now if it wasn't weird enough, by changing recv() to get(), I can now send requests properly when telnetting to the port, but requests from Apache still aren't received until apache times out. Ah, the fun of socket stuff :-) | 00:32 | |
I'm calling it a night. Have a good * #perl6! | 00:34 | ||
00:35
supernovus left
00:39
lestrrat joined
|
|||
sorear | TimToady: my ropes are not lazy, but they require O(log min(a,b)) time for appends | 00:42 | |
TimToady: so for a sequence of N doublings, total time is O(N^2), and so is total allocations | |||
00:43
wolfman2000__ left
|
|||
sorear | option 1 would be implemented by adding extra code to the ~ operator to check if the logical string length has exceeded (u)int.MaxValue | 00:43 | |
option 2 would be implemented by adding extra code to .chars to detect overflow and throw | |||
option 4 requires bignums in the internal nodes | |||
#3 is probably easiest | 00:44 | ||
actually the order of difficulty is probably #4 > #2 = #3 > #1 | |||
00:47
uasi joined
|
|||
TimToady | I suspect 2^64 positions in a string will be sufficient for some time yet | 00:47 | |
so forget 4 :) | |||
sorear | heh. ok. | 00:48 | |
TimToady | well, depending on your bignum implementation... | ||
sorear | I wonder if what I'm doing technically counts as a "rope" | ||
TimToady | an implementation that steals pointer bits for ints could be very efficient :) | ||
(memory-wise) | 00:49 | ||
sorear | I'm using a structure much closer to Hinze & Patterson's 2-3 finger trees, than to Boehm et al's 197x original | ||
because it has much better bounds for many operations | |||
like O(log n) worst case appends and O(1) amortized single-character appends | |||
TimToady | I always invent my own data structures anyway, so don't ask me :) | ||
and I'm actually fine with any of those results... | 00:51 | ||
00:52
patspam joined
00:53
patspam left,
whiteknight left
|
|||
TimToady | as long as strings are relatively fast at representing everything from names to genomes | 00:54 | |
00:55
Moukeddar joined,
Moukeddar left
|
|||
cognominal | welcome to Gattaca :) | 00:56 | |
TimToady | TTAGGG & | 00:57 | |
01:05
patspam joined
01:06
whiteknight joined
01:14
wolfman2000 joined
01:19
Sarten-X joined
01:23
JimmyZ joined
|
|||
[Coke] | tadzik: the ping about the smolder server. | 01:28 | |
01:39
thou left
01:44
supernovus joined
01:45
whiteknight left
|
|||
supernovus | So, I think I know why my changes to IO::Socket::INET may not be working entirely right. The $.family, $.proto and $.type aren't being initialized in the new object, so when it builds its internal $!PIO, it doesn't have the same settings. I'm thinking someone more familiar with core work, NQP and the parrot socket library should probably take this one over. :/ | 01:49 | |
01:58
mkramer1 joined
02:04
supernovus left
02:05
patspam left
02:38
JimmyZ left
|
|||
sorear | jnthn: ping | 02:43 | |
jnthn: I am wanting to provide any necessary design assistance for the new NQP# | 02:46 | ||
03:03
frhodes joined
|
|||
sorear | colomon: ping too | 03:03 | |
03:03
frhodes left
|
|||
colomon | sorear: I'm about to head to bed, but I can spare a couple of minutes. what's up? | 03:03 | |
sorear | I have become aware of your mail | 03:04 | |
colomon | ah | ||
sorear | 1, why does it make a difference where the complex trig logic is? | ||
2, I'd be interested in switching to code generation for all the little operator functions | |||
03:06
envi joined
|
|||
colomon | 1. It's mostly a matter of simplicity / consistency. For instance, tan($z) is most easily defined as sin($z) / cos($z). That's easy to do at the Perl 6 level (as Rakudo does it), and it's easy to do at the C# level (as I'm proposing Niecza might). But it's tricky to do in a mixed setting, as tan(Variable) cannot easily call sin(Variable) and cos(Variable). (Or maybe it can and I just don't see how?) | 03:10 | |
also, based on a quick, very naive analysis it seems like doing it entirely in C# should be faster? | 03:11 | ||
2. Yeah, code generation can be very nice for that sort of repetitive code. | |||
afk # off to bed | 03:19 | ||
03:20
sftp joined
|
|||
sorear | phenny: tell colomon +1 to doing it all at the C# level. | 03:20 | |
phenny | sorear: I'll pass that on when colomon is around. | ||
03:44
daniel-s left
|
|||
TimToady is starting to think that an object may only have one write owner at a time, and the purpose of an rw parameter is to change ownership temporarily | 03:44 | ||
this would prevent both upstack and downstack write violations | 03:45 | ||
this also resonates with the notion that an object may be owned only be one thread at a time | 03:46 | ||
s/only be/by only/ | 03:47 | ||
and it would be extra bookkeeping only for rw binding and write operations | 03:49 | ||
(plus memory overhead of tracking current owner) | |||
03:54
matt3black joined
|
|||
TimToady | also, it would not really need to be strict identity; N random bits is sufficient to reduce the chance of of not catching a write violations to 1 in 2^N, with less chance if the task is repeated with different random ids | 03:55 | |
03:56
satyavvd joined
04:02
birdwindupbird joined
|
|||
TimToady | bbl & | 04:02 | |
04:04
kaare_ joined
04:15
matt3black left
04:45
daniel-s joined
05:07
sftp left
05:19
koban` joined,
koban` left
05:20
packetknife joined
05:23
Shozan joined
05:28
jevin joined
05:43
woosley joined
05:45
MayDaniel joined
05:54
packetknife left
05:58
packetknife joined
06:10
orafu joined
06:11
MayDaniel left
06:16
alvis left
06:19
cognominal_ joined,
REPLeffect joined
06:30
alvis joined
06:52
hanekomu joined
07:04
frhodes joined
07:22
skangas joined
07:26
mj41 joined
07:30
wtw joined
07:37
pjcj joined
07:42
pnu joined
07:43
packetknife left
07:47
kaare_ left
07:48
replore__ joined,
replore_ left
|
|||
moritz | good morning, #perl6 | 07:51 | |
07:53
wamba joined
|
|||
Shozan | happy programmer's day! | 07:55 | |
moritz | \o/ | 07:56 | |
snarkyboojum | that's awesome - wish we had a Programmers' Day :) | 07:59 | |
informal or no :) | 08:06 | ||
08:08
masak joined
|
|||
masak | Perl 6 Day! \o/ | 08:08 | |
moritz | rakudo: say (1, 6, 36 ... * <= 256)[*-1 | 08:09 | |
p6eval | rakudo bb2a5a: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 1» | ||
moritz | rakudo: say (1, 6, 36 ... * <= 256)[*-1] | ||
p6eval | rakudo bb2a5a: OUTPUT«1» | ||
moritz | rakudo: say (1, 6, 36 ... * <= 365)[*-1] | ||
p6eval | rakudo bb2a5a: OUTPUT«1» | ||
moritz | rakudo: say (1, 6, 36 ... * <= 365) | ||
p6eval | rakudo bb2a5a: OUTPUT«1» | ||
masak | the criterion is backwards, innit? | 08:10 | |
moritz | right | ||
rakudo: say (1, 6, 36 ...^ * > 365)[*-1] | |||
p6eval | rakudo bb2a5a: OUTPUT«216» | ||
moritz | that should be programmer's day :-) | ||
erm, Perl 6 programmer's day | |||
b: say Date.new('2011-01-01') + 215 | 08:11 | ||
p6eval | b 1b7dd1: OUTPUT«2011-08-04» | ||
08:11
wamba left
08:12
ranguard joined,
orafu left
08:13
orafu joined,
satyavvd left
08:15
Alias joined
|
|||
masak | moritz: but I'm a Perl 6 programmer every day :P | 08:15 | |
moritz | masak: congratulations. There are still days where I find my self doubting very much if I'm a Perl 6 programmer | 08:16 | |
because I feel I have a misunderstanding of some very fundamental language feature | |||
masak | I didn't say I was a *good* Perl 6 programmer. | 08:17 | |
In fact, I know I am not one. | |||
my code keeps getting new bugs without me changing it. | 08:18 | ||
08:19
wamba joined
|
|||
jnthn | *yawn* | 08:22 | |
morning, #perl6 | |||
moritz | good morning jnthn | ||
jnthn finds himself only mildly pleased to be concious again "so soon" after going to bed... | 08:23 | ||
masak | good Mornington, #jnthn | ||
er, jnthn* | 08:24 | ||
08:24
alvis left
|
|||
masak .oO( The #jnthn channel ) | 08:24 | ||
jnthn | oh my, what on earth would be discussed there? | ||
er, actually, don't answer that :P | |||
masak | beer! | 08:25 | |
Slavic languages! | |||
metaobject protocols! | |||
moritz | jnthn! | ||
masak | pun! | ||
08:25
daxim joined
|
|||
masak | puns* | 08:25 | |
actually, that sounds like an awesome channel. | |||
08:26
dakkar joined
|
|||
masak | all day, discussing MOP examples using Slavic beer-named variables, making subtle wordplays about it all. | 08:26 | |
moritz | ... in multiple languages, of course | ||
masak | it sounds like #perl6... | 08:27 | |
masak is reminded of the scene in "Being John Malkovich" where Malkovich has gone into the portal | 08:28 | ||
www.youtube.com/watch?v=xX9MtuqVrUQ | 08:30 | ||
moritz | nom: say Iterable.method(:local) | 08:35 | |
p6eval | nom bb2a5a: OUTPUT«Method 'method' not found for invocant of class 'Iterable' in <anon> at /tmp/meFzebBoRK:1 in <anon> at /tmp/meFzebBoRK:1» | ||
moritz | nom: say Iterable.^methods(:local) | ||
p6eval | nom bb2a5a: OUTPUT«elems infinite item fmt Int Num Numeric Str» | ||
moritz | oh, my local copy was out of date | 08:36 | |
masak | jnthn: did you write a spectest for Iterable.fmt? | 08:37 | |
08:37
kaare_ joined
|
|||
moritz | nom: say (1.3, 3.5, 3).fmt('%d', '_') | 08:38 | |
p6eval | nom bb2a5a: OUTPUT«Too many positional parameters passed; got 3 but expected between 1 and 2 in method fmt at src/gen/CORE.setting:1413 in <anon> at /tmp/7xv7t_jGKa:1 in <anon> at /tmp/7xv7t_jGKa:1» | ||
moritz | that too should work | ||
nom: say List ~~ Iterable | |||
p6eval | nom bb2a5a: OUTPUT«Bool::True» | ||
masak | b: say (1.3, 3.5, 3).fmt('%d', '_') | ||
p6eval | b 1b7dd1: OUTPUT«1_3_3» | ||
masak submits rakudobug | 08:39 | ||
moritz | (there's a failing spectest for that) | ||
masak | nom: say (1.3, 3.5, 3).WHAT | ||
moritz | nom: say (1.3, 3.5, 3).list.fmt('%d', '_') | ||
p6eval | nom bb2a5a: OUTPUT«Parcel()» | ||
nom bb2a5a: OUTPUT«1_3_3» | |||
masak | nom: say (1.3, 3.5, 3).^mro | ||
p6eval | nom bb2a5a: OUTPUT«Parcel() Cool() Any() Mu()» | ||
moritz wonders why Parcel !~~ Iterable | 08:40 | ||
that causes lots of code duplication or redispatches in Parcel.pm | |||
will ask pmichaud++ when he appears | |||
08:41
alvis joined
08:42
hanekomu left
08:46
koban` joined,
koban` left
|
|||
jnthn | masak: No. There's an RT ticket for it, so I figured somebody else would make sure of that before closing it. | 08:48 | |
moritz | masak: fwiw fmt.t has lots of rakudo skips (most of them LHF to implement, no doubt) | 08:50 | |
masak | jnthn: ah, ok. | ||
moritz | you *can* turn them all into tickets, but I'd doubt the utility of that approach | ||
masak | me too. | ||
my criterion for submitting RT tickets is something like "someone wants it". skipped spectests are slightly below that level. | 08:52 | ||
dalek | kudo/nom: ecce797 | moritz++ | src/core/Parcel.pm: Parcel.fmt |
08:53 | |
ast: faa58d4 | moritz++ | S02-names_and_variables/fmt.t: test Range.fmt, unfudge Parcel.fmt tests |
08:54 | ||
jnthn | sorear: (NQP# ;)) Great! :-) There's a bunch of things I'd like to ask at some point soonish (CPS vs stack reconstruction, efficient invocation, etc.) | 08:59 | |
09:06
alvis left
09:10
wamba left
09:13
daniel-s left
|
|||
pnu | goo.gl/8uKyk - (apparent) location of current #perl6 channel users | 09:14 | |
moritz | pnu++ | 09:15 | |
pnu | moritz: unfotrunately it's p5, not six.. | 09:16 | |
moritz | I'm not really surprised that it's lots of US and EU folks, just that there are so many in Europe | ||
moritz finds it amusing that szabgab is on the equator in the Atlantic Ocean :-) | 09:17 | ||
ah, might be (0, 0) for "no data obtained" or so | 09:18 | ||
pnu | yes, well that's what lookup.geo.opera.com gives for his ip.. | ||
jnthn | Nice :) | ||
pnu | 26 users didn't report ip address.. those are not shown but present in the kml (visibility hidden). | 09:19 | |
moritz | it might also make sense to filter out those with the 'voice' flag | 09:20 | |
(bots) | |||
pnu | i added the (p5) code and source data i used to the same gist.. gist.github.com/1213459 | 09:23 | |
mortiz: true.. | |||
09:23
alvis joined
|
|||
masak | wow, pnu++! | 09:23 | |
pnu | moritz: * | ||
TiMBuS | haha wow. i live in victoria. | 09:24 | |
but victoria, australia. not victoria, canada | |||
close though! | |||
moritz | lol | ||
b: say (a => 1).fmt('%s:%s') | 09:27 | ||
p6eval | b 1b7dd1: OUTPUT«a:1» | ||
moritz | b: say (a => 1).fmt('%s', '%s') | ||
p6eval | b 1b7dd1: OUTPUT«Too many positional parameters passed; got 3 but expected between 1 and 2 in 'Enum::fmt' at line 5610:src/gen/core.pm in main program body at line 22:/tmp/MPbUoIwfXU» | ||
TiMBuS | also laughed at where szabgab is located | 09:28 | |
maybe we should send a rescue boat... | |||
masak | no, he's managed until now. | ||
he'll let us know if he needs rescuing. | |||
bbkr | good localime() perl6 | 09:29 | |
masak | bbkr++! | ||
moritz | can't be so bad as long as his IRC is still working :-) | ||
masak | right, exactly. | ||
09:30
dakkar left,
replore__ left
09:37
daemon left,
shachaf left
09:38
takesako joined,
Util joined,
szbalint joined,
ingy joined,
odoacre joined,
dukeleto joined,
itz joined,
s1n1 joined,
senobmeht joined,
mattp_ joined,
daemon joined,
shachaf joined
09:39
dakkar joined
|
|||
dalek | kudo/nom: d97997e | moritz++ | src/core/Enum (2 files): implement .fmt in Enum and EnumMap |
09:39 | |
ast: c70a045 | moritz++ | S02-names_and_variables/fmt.t: rakudo unfudges (fmt) |
09:40 | ||
09:51
satyavvd joined,
satyavvd left
09:52
satyavvd joined
09:54
Alias_ joined
09:57
Alias left
10:06
daniel-s joined,
mj41 left
10:07
frhodes left
10:16
static_perl joined
10:18
replore joined
|
|||
masak | grrr. I still hate how array parameter binding works. | 10:26 | |
jnthn | How so? | 10:27 | |
masak | you take a named parameter :@a. you pass it on as a named arguemnt :@a to some constructor. | ||
suddenly you have another layer of array. | |||
scalars don't work like that. hashes don't work like that. but arrays do. | |||
yes, I've been upset about this before. | |||
jnthn | nom: class Foo { has @.a }; my @a = 1,2,3; Foo.new(:@a).a.perl.say | 10:28 | |
p6eval | nom d97997: OUTPUT«Array.new(1, 2, 3)» | ||
jnthn | nom: class Foo { has @.a }; my @a = 1,2,3; Foo.new(:@a).a.elems.say | ||
p6eval | nom d97997: OUTPUT«3» | ||
jnthn | masak: What am I missing? | 10:29 | |
masak | jnthn: I... I've changed my mind. it's a bug in Niecza. | 10:30 | |
rakudo++ | |||
perl6: sub foo(:@a) { say @a.elems }; foo | |||
p6eval | niecza v9-23-g1a8efca: OUTPUT«1» | ||
..pugs, rakudo d97997: OUTPUT«0» | |||
masak | sorear: ^^ | ||
masak submits nieczabug | 10:31 | ||
10:31
replore left
|
|||
jnthn | :P | 10:31 | |
bbkr | I cannot find that spec forbids many multi subs with the same signature: rt.perl.org/rt3/Ticket/Display.html?id=71536 - is this ticket still under discussion or should it be rejected? | 10:32 | |
masak | bbkr: it's probably not spec, no. but I think it's common sense. | 10:34 | |
I invoke "things that can be caught at compile-time, should be" | |||
jnthn | If the spec doesn't say we must, then it's not a bug. | 10:35 | |
It's a worthwhile feature request though. | |||
So, it shouldn't have the bug tag. | |||
But it's an OK ticket. | |||
Perhaps one of those things the optimizer can spot. | 10:36 | ||
Or maybe we do it at czech time | |||
masak removes the [BUG] tag | 10:38 | ||
bbkr | I agree with moritz here - having multis with the same name and signature is perfectly fine. That can be used in any plugin implementation, for example "role Twiitter { multi method broadcast( Str) {} }; role Facebook { multi method broadcast (Str) {} }; class Social does Twitter does Facebook {}". compile error in this case is harmful. | 10:41 | |
benabik | bbkr: You expect it to invoke both? | 10:43 | |
jnthn | bbkr: It's important to distinguish multi methods and multi subs here. | ||
bbkr: The multi method case is potentially useful. The multi sub case can almost certianly never actually work | 10:44 | ||
benabik: .*/.+ dispatchers probably would | |||
bbkr | yes, i expect both methods to be invoked if signature and name matches. | ||
jnthn | bbkr: *only* if you used .+ or .* to ask for that. | 10:45 | |
bbkr: Otherwise it's an ambiguous dispatch. | |||
masak | it's an interesting use case. but yes, the ticket was about multi subs. | 10:47 | |
bbkr | jnthn: ticket was about signatures in general. you're right about subs. but for methods I should be able to define multis like in my example, and it should throw "ambigous dispatch" for . | ||
but not for .* | |||
jnthn | bbkr: Yes, we're only suggesting compile time detection for multi subs, not multi methods. | 10:48 | |
masak | perl6: sub foo(:@a) { say @a[0]; say "alive" }; foo(:a["bar"]) | 10:49 | |
bbkr | ok, maybe it should be explicitly mentioned in ticket subject just for clarification? | ||
p6eval | pugs, rakudo d97997, niecza v9-23-g1a8efca: OUTPUT«baralive» | ||
masak | perl6: sub foo(:@a) { say @a[0]; say "alive" }; foo(:a("bar")) | ||
p6eval | rakudo d97997: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Str instead in sub foo at /tmp/an_6FTpM6d:1 in <anon> at /tmp/an_6FTpM6d:1 in <anon> at /tmp/an_6FTpM6d:1» | ||
..niecza v9-23-g1a8efca: OUTPUT«(timeout)» | |||
..pugs: OUTPUT«baralive» | |||
masak | sorear: ^^ | ||
masak submits nieczabug | 10:50 | ||
bbkr: yes, that's probably a good idea. | |||
bbkr | changed | 10:52 | |
masak <== @lunch | 10:54 | ||
10:55
mj41 joined
11:04
benabik left
11:06
wamba joined
11:16
uasi left
11:38
benabik joined
11:40
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
tadzik | yay, physics passed! \o/ | 11:46 | |
jnthn | tadzik++ | ||
tadzik | today's a good day | 11:47 | |
moritz | \o/ | ||
tadzik.physics++ | |||
11:48
wamba left
|
|||
tadzik | tadzik.physics.make_immutable | 11:48 | |
aaaaand we're done here :P | |||
masak | :P | 11:51 | |
12:00
woosley left
12:04
cognominal_ left,
cognominal_ joined
12:15
wamba joined
12:16
dalek joined,
ChanServ sets mode: +v dalek
12:18
aindilis joined
|
|||
colomon | tadzik++ | 12:31 | |
phenny | colomon: 03:20Z <sorear> tell colomon +1 to doing it all at the C# level. | ||
bbkr | nom: say 1.+WHAT # should this be allowed? | 12:33 | |
p6eval | nom d97997: OUTPUT«===SORRY!===Cannot use .+ on a non-identifier method call at line 1, near " # should "» | ||
12:33
bluescreen10 joined
|
|||
jnthn | bbkr: .WHAT is a macro, not a method call | 12:33 | |
moritz | not sure; .WHAT is a macro, not an ordinary methods | ||
s/s$// | |||
jnthn | So at best it'd compile, but explode at runtime | ||
(method WHAT not found) | |||
bbkr | ok, so this behaves correctly now, right? rt.perl.org/rt3/Ticket/Display.html?id=72818 | 12:34 | |
jnthn | The error ain't so helpful | ||
The ticket is wrong though | |||
It thinks .WHAT is a method call. :) | 12:35 | ||
bbkr | jnthn: that's why i'm asking to confirm it. it's an old ticket. | 12:36 | |
jnthn | nom: class A { method m { say 1 } }; class B is A { method m { say 2 } }; B.+m; B.*m; | ||
p6eval | nom d97997: OUTPUT«2121» | ||
jnthn | Looks like .* and .+ work just fine on actual methods. | ||
So +1 to close. | |||
With a note that WHAT isn't a method call. | |||
bbkr | jnthn: which file should I put tests in? i'm not sure if those belongs more to macros or to multi dispatch | 12:37 | |
s/those/it/ | |||
jnthn | bbkr: There already are a bunch of tests for .+ and .* | ||
calling_sets.t or something. | |||
moritz | S12-methods/calling_sets.t | 12:38 | |
tadzik | nice users map | ||
I'd like to see one which lists only the users who said something during the last year or so :) | |||
moritz | tadzik: do you want the user list? | 12:40 | |
bbkr | i've checked calling_sets.t and there is no test which checks "dies_ok {$foo.*MACRO }", IMO worth adding | ||
jnthn | bbkr: OK, +1 | 12:41 | |
bbkr: But it's actually a compile time error | |||
So it'd need eval_dies_ok orso | |||
tadzik | moritz: that'd be cool, yes | 12:42 | |
moritz | tadzik: I'll generate a list of all nicks that spoke in #perl6 this year, should be good enough for that purpose | ||
tadzik | moritz: thanks | 12:43 | |
moritz | tadzik: moritz.faui2k3.org/tmp/active_perl6_nicks.txt | ||
tadzik | whoa, that was fast | ||
the starred ones are the ones who spoke? | 12:44 | ||
moritz | tadzik: note that it contains "* $nick" for an action that $nick performed | ||
so you can grep 'em out | |||
tadzik | oh, explains a lot | ||
12:44
donri joined
|
|||
tadzik | huh, there are more of them than on the map | 12:44 | |
curl moritz.faui2k3.org/tmp/active_perl6_nicks.txt | wcl says '930' | 12:45 | ||
moritz | tadzik: the map was from a snapshot, iiuc | ||
tadzik | oh, ok | ||
12:45
satyavvd left
|
|||
moritz | tadzik: and at any given time there are < 200 nicks in here, but over the year a lot more assemble | 12:45 | |
tadzik | that's interesting | ||
ok, I'll give it a try in some near time | 12:46 | ||
benabik | 774 once I filter out dups. | ||
tadzik | I'd rather grep out those from the original list that do not appear on the activity list | 12:47 | |
moritz | that's probably the better approach | ||
benabik | (dups from actions, to be specific) | ||
There are a fair number of nick and nick_ "dups" as well. | |||
tadzik | yeah, /tadzik/ appears 5 times :) | 12:48 | |
12:49
wamba left
|
|||
jnthn | Probably easy to regex away the ogonky though :) | 12:49 | |
moritz | mysql knows nothing of identity, just of string comparison | ||
benabik | A few minutes of work could probably deal with the easy duplications. | 12:50 | |
If anyone really cared. (I don't.) | |||
12:50
satyavvd joined
|
|||
moritz | no deduplication necessary, when the list is ony used to filter the nicks in the map | 12:51 | |
tadzik | jnthn: ogonki :0 | 12:53 | |
benabik | The %:s/^* // dedup might be handy. :-D | ||
tadzik | :) | ||
jnthn | tadzik: oops, Slovak spelling ;) | 12:54 | |
moritz | perl -pe 's/^\* //' < nicks.txt | sort -u | ||
benabik | moritz: You can spell it that way too. I had opened it in vim. :-D | 12:55 | |
12:58
JimmyZ joined
|
|||
bbkr | masak: what is the expected behavior in rt.perl.org/rt3/Ticket/Display.html?id=72820 ? | 13:03 | |
moritz | std: &1 | 13:04 | |
p6eval | std bb4f150: OUTPUT«ok 00:01 121m» | ||
13:05
satyavvd left
|
|||
moritz | std: &foo | 13:05 | |
p6eval | std bb4f150: OUTPUT«ok 00:01 121m» | ||
benabik | &1? What's that mean? Does that return something like `-> { return 1 }`? | 13:06 | |
moritz | why doesn't that produce the same error as foo() ? | ||
benabik: &foo returns a reference to the routine named 'foo' | |||
benabik | moritz: Right. But I'm confused about it working on a number. | ||
moritz | benabik: so &1 would be a reference to a routine named '1' | ||
benabik: and I'm confused about it not being a compile time lookup | 13:07 | ||
benabik | std: sub 1 { … } | ||
p6eval | std bb4f150: OUTPUT«===SORRY!===Malformed block at /tmp/SBxx_WovI3 line 1:------> sub ⏏1 { … } expecting any of: name routine_def traitParse failedFAILED 00:01 117m» | ||
bbkr | you cannot name routine '1' | ||
benabik | std: sub 1 { ... } | ||
p6eval | std bb4f150: OUTPUT«===SORRY!===Malformed block at /tmp/_zoQ8AtasP line 1:------> sub ⏏1 { ... } expecting any of: name routine_def traitParse failedFAILED 00:01 117m» | ||
moritz | nom: Q:PIR { .lex '&1' }; say &1 | ||
p6eval | nom d97997: OUTPUT«Use of uninitialized value in string contextUse of uninitialized value in string context===SORRY!===error:imcc:syntax error, unexpected '\n', expecting COMMA in file '(file unknown)' line 841» | ||
benabik | std: sub '1' { ... } | ||
p6eval | std bb4f150: OUTPUT«===SORRY!===Malformed block at /tmp/U_Hs6qOCtu line 1:------> sub ⏏'1' { ... } expecting any of: name routine_def traitParse failedFAILED 00:01 117m» | ||
jnthn | std: @1 | 13:08 | |
p6eval | std bb4f150: OUTPUT«ok 00:01 118m» | ||
benabik | moritz: The syntax for .lex is .lex <variable name> <register> | ||
daxim | has anyone already written working shapely/eyedrops style P6 programs? code.google.com/codejam/japan/tshirt.html | ||
moritz | nom: Q:PIR { .lex '&1' $P0 }; say &1 | ||
p6eval | nom d97997: OUTPUT«Use of uninitialized value in string contextUse of uninitialized value in string context===SORRY!===error:imcc:syntax error, unexpected PREG, expecting COMMA ('$P0') in file '(file unknown)' line 137» | ||
jnthn | moritz: I think it may be parsed as an accidental side-effect of parsing $1, etc | ||
moritz | jnthn: sounds plausible-ish | ||
jnthn | nom: "foo" ~~ /(f)/; say $0 | 13:09 | |
p6eval | nom d97997: OUTPUT«f» | ||
jnthn | nom: "foo" ~~ /(f)/; say @0 | ||
p6eval | nom d97997: OUTPUT«f» | ||
jnthn | nom: "foo" ~~ /(f)/; say &0 | ||
p6eval | nom d97997: OUTPUT«f» | ||
jnthn | heh :) | ||
moritz did that, probably | |||
jnthn++ | |||
jnthn | b: "foo" ~~ /(f)/; say &0 | ||
bbkr | so this ticket should be rejected as not a bug? | ||
p6eval | b 1b7dd1: OUTPUT«f» | ||
jnthn | moritz: I think we may have always had it like that, just never realized ;) | ||
moritz | ok, I just reused it :-) | ||
jnthn | .oO( let's call it a feature ;-) ) |
||
Guess a [ <?{ $<sigil> eq '$'}> <.panic: '...'> ] or so in the right place would catch it though. | 13:11 | ||
moritz | of course it's a nice obfu | 13:12 | |
benabik | "Nice obfu" is not a good reason to keep it in the language. | ||
moritz | and @0 even makes sense, if the capture 0 is quantified | ||
benabik: not? :-) | |||
bbkr | i'll copy-paste this discussion to ticket and leave it open | 13:13 | |
benabik | moritz: :-P | ||
13:14
colomon joined
13:16
pernatiy joined
13:18
tzhs joined
13:20
clairvy joined
13:21
mjreed joined,
wolfman2000 left
|
|||
mls | good afternoon! | 13:24 | |
bbkr | nom: Int.() # parse bug? despite doing nothing useful it should be parsed as Int(), right? | 13:26 | |
p6eval | nom d97997: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Int' in <anon> at src/gen/Metamodel.pm:3023 in <anon> at /tmp/8_3SpbH8XF:1 in <anon> at /tmp/8_3SpbH8XF:1 in <anon> at /tmp/8_3SpbH8XF:1» | ||
moritz | good pm, mls | ||
jnthn | o/ mls | 13:28 | |
mjreed | Query: given a string $x, and an array @w containing a list of other strings, I want to test to see if every element of @w appears as a substring of $x. Is there a cleaner way than this? $x ~~ all( @w.map(-> $w { regex { $w } }) ) | ||
mls | about 50% of the perl6 startup time is spent in compose | 13:29 | |
jnthn | mls: That's not so surprising. | ||
mls: We do quite a lot of work in compose. | |||
mls: 50% is a bit more than I'd have expected; any hot-spots of worth knowing about. | 13:30 | ||
mls: But also see my blog post from yesterday on the serialization stuff | |||
moritz | mjreed: I'm sure there's a more concise solution involving index() | ||
jnthn | mls: Essentially, the problem will go away because we'll be serializing the composed objects. | ||
mls | (compute_mro / c3_merge are the hotspots) | 13:31 | |
moritz | mjreed: so $x.index(all(@substrings)).defined | ||
jnthn | mls: Really? | ||
mls: That's...a little surprising. | |||
moritz | rakudo: my @s = <foo bar>; say so 'foobarbaz'.index(all @s).defined | ||
p6eval | rakudo d97997: OUTPUT«Bool::True» | ||
moritz | rakudo: my @s = <foo bak>; say so 'foobarbaz'.index(all @s).defined | 13:32 | |
p6eval | rakudo d97997: OUTPUT«Bool::True» | ||
moritz | huh. | ||
mls | shall I try to optimize them a bit? | ||
moritz | rakudo: say 'foobarbaz'.index('bak') | ||
p6eval | rakudo d97997: OUTPUT«Str()» | ||
moritz | rakudo: say 'foobarbaz'.index('bak').defined | ||
p6eval | rakudo d97997: OUTPUT«Bool::False» | ||
mls | But, as you said, it's probably not worth it because of the serialization changes | ||
jnthn | moritz: .defined won't auto-thread there. | ||
moritz | jnthn: urks | ||
benabik | The junction is defined. | 13:33 | |
jnthn | right | ||
moritz | right | ||
PerlJam | moritz: you could do it with a reductio op | ||
er, reduction | |||
moritz | I want a way to say that stuff should (or should not) autothread | ||
PerlJam: the old imperative way, yes | |||
jnthn | mls: Well, it is in so far as any program that we just compile and immediately run will have to do that. | ||
benabik | rakudo: my @s = <foo bak>; say so 'foobarbaz'.index(all @s)>>.defined | ||
p6eval | rakudo d97997: OUTPUT«Bool::False» | ||
mls | ok, I'll have a look at the code... | 13:34 | |
benabik | rakudo: my @s = <foo bar>; say so 'foobarbaz'.index(all @s)>>.defined | ||
p6eval | rakudo d97997: OUTPUT«Bool::True» | ||
moritz | rakudo: my @s = <foo bak>; say [&&] @s.map({'foobarbaz'.index($_).defined}) | ||
p6eval | rakudo d97997: OUTPUT«Bool::False» | ||
moritz | rakudo: my @s = <foo baz>; say [&&] @s.map({'foobarbaz'.index($_).defined}) | ||
p6eval | rakudo d97997: OUTPUT«Bool::True» | ||
moritz | does >>. hyper descend into junctions? | 13:35 | |
jnthn | No | ||
Only into iterables. | |||
mjreed | rakudo: my $x = "this is a cat"; my @w = <this cat>; say $x.index(all @w)>>.defined | ||
moritz | when I don't see why benabik's solution should work | ||
p6eval | rakudo d97997: OUTPUT«all(True, True)» | ||
benabik | moritz: I wasn't sure if it would, but it appeared to. *shrug* | ||
jnthn | moritz: Yeah, I'm confused about that too... | ||
mjreed | hm. 2011.04 says "Method 'iterator' not found for invocant of class 'Integer' " | 13:36 | |
benabik | b: my @s = <foo bak>; say so 'foobarbaz'.index(all @s)>>.defined | ||
p6eval | b 1b7dd1: OUTPUT«Method 'iterator' not found for invocant of class 'Integer' in main program body at line 1:src/metamodel/RoleToInstanceApplier.nqp» | ||
PerlJam | perhaps the "randomization" that rakudo does accidentally listifies the junction | ||
jnthn | moritz: My only guess is that HYPER causes it to autothread. | ||
Or something | |||
PerlJam | (for >> I mean) | ||
jnthn | Yeah...looks like something in the >>. implementation is declared with Any. | 13:37 | |
moritz | src/core/metaops.pm uses implicit Any all over the place | 13:38 | |
13:38
shinobicl joined
|
|||
jnthn | There we go then. | 13:38 | |
shinobicl | nom: my Int $number = 0 {where 0..23}; | 13:39 | |
p6eval | nom d97997: OUTPUT«===SORRY!===Confused at line 1, near "my Int $nu"» | ||
jnthn afk a bit...walk | |||
benabik | It working is kinda handy, since it provides a way to force things like .defined to autothread. | ||
PerlJam | benabik: except that it isn't really autothreading | 13:40 | |
moritz | shinobicl: there 'where' must be outside block, for suer | ||
it's auto-hyper-threading :-) | |||
shinobicl | nom: my Int $number = 0 where 0 .. 23; | ||
p6eval | nom d97997: OUTPUT«===SORRY!===Confused at line 1, near "my Int $nu"» | ||
shinobicl | nom: my Int $number = 0 where {0 .. 23}; | ||
moritz | nom: my Int $number where (0..23) = 0; | ||
p6eval | nom d97997: OUTPUT«===SORRY!===Confused at line 1, near "my Int $nu"» | 13:41 | |
PerlJam | nom: my Int where 0..23 $number = 0; # there, that's my permutation :) | ||
p6eval | nom d97997: OUTPUT«===SORRY!===In "my" declaration, typename Int must be predeclared (or marked as declarative with :: prefix) at line 1, near " where 0.."» | ||
PerlJam | oh, that's interesting that it complains about Int | 13:42 | |
13:42
bluescreen10 left
|
|||
mjreed | I'm still back on the fact that defined() doesn't descend into junctions. How is one meant to test for all-defined, any-defined, one-defined, etc? | 13:45 | |
13:48
Shozan left
|
|||
mjreed | I'm also kinda thinking that index called in Boolean context should maybe return true if the string is found and false otherwise, rather than just letting the index boolify and this yielding false for a prefix.. | 13:53 | |
PerlJam | mjreed: I never have gotten it clear in my head what should/shouldn't autothread. Autothreading is meant to be one of the great features of junctions, so I'd wish that *everything* autothread and that there's be some syntactic marker that says "don't thread this operation" | ||
mjreed | Sure. But then you have trouble passing around junctions as junctions. I seem to recall the spec has gone back and forth on this a couple times... | 13:56 | |
PerlJam | If you can wrap a junction in a non-junctional package, it becomes easy to pass around without invoking autothreading | 13:57 | |
13:57
bluescreen10 joined
13:58
daxim left
13:59
daxim joined
|
|||
masak | rakudo: sub contains($big, $small) { defined $big.index($small) }; my @bigs = <food foolish eufooria kungfoo>; say so contains all(@bigs), 'foo' | 14:01 | |
p6eval | rakudo d97997: OUTPUT«Bool::True» | ||
masak | rakudo: sub contains($big, $small) { defined $big.index($small) }; my @bigs = <food foolish notthisone kungfoo>; say so contains all(@bigs), 'foo' | ||
p6eval | rakudo d97997: OUTPUT«Bool::False» | ||
masak | mjreed: almost like English! | ||
masak considers writing a blog post called "Don't let the junction get away!" | 14:02 | ||
mjreed | what's "so" doing there? | 14:03 | |
moritz | extra pionts for writing 'contains' as an infix | ||
masak | collapsing the junction. | ||
PerlJam | mjreed: emphasis ;) | ||
moritz | mjreed: boolean context | ||
masak | rakudo: sub contains($big, $small) { defined $big.index($small) }; my @bigs = <food foolish notthisone kungfoo>; say (contains all(@bigs), 'foo').perl | ||
p6eval | rakudo d97997: OUTPUT«all(True, True, False, True)» | ||
mjreed | synonym for ? then? | ||
masak | aye. | ||
moritz | but with looser precedence | ||
masak | like 'and' and '&&'. | 14:04 | |
jlaire | rakudo: sub infix:<contain>($big, $small) { defined $big.index($small) }; my @bigs = <food foolish eufooria kungfoo>; say so all(@bigs) contain 'foo' | 14:06 | |
p6eval | rakudo d97997: OUTPUT«===SORRY!===Confused at line 1, near "say so all"» | ||
jlaire | b: sub infix:<contain>($big, $small) { defined $big.index($small) }; my @bigs = <food foolish eufooria kungfoo>; say so all(@bigs) contain 'foo' | 14:07 | |
p6eval | b 1b7dd1: OUTPUT«Bool::True» | ||
moritz | jlaire++ # eufooria | ||
jlaire | I just copied masak++ :P | ||
jlaire-- | |||
masak | jlaire++ # honest ;) | 14:08 | |
14:08
mjreed left,
mjreed joined
|
|||
moritz | masak++ then, and jlaire++ for the infix implementation | 14:08 | |
mjreed | er, I would still call it infix:<contains>, with singular inflection. Won't always be called with all(). :) | 14:09 | |
masak | right. | ||
PerlJam | or reverse the $big and $small and call it infix:<in> :-) | 14:10 | |
mjreed | how pythonic! | ||
masak | PerlJam: ∈ | ||
mjreed | 'contains' reads pretty well as a method call on $big, actually. | ||
moritz | too general, if you ask me | ||
'contains' is a question you ask a Set, not a Str | 14:11 | ||
masak | rakudo: use MONKEY_TYPING; augment class Cool { method contains($small) { defined self.index($small) } }; my @bigs = <food foolish eufooria kungfoo>; say so all(@bigs).contains('foo') | ||
p6eval | rakudo d97997: OUTPUT«Bool::True» | ||
masak | \o/ | 14:12 | |
mjreed | Well, I'm not saying add it to core. But as long as you're defining a 'contains', it works as a method call as well as an infix. | ||
jlaire | was the parse fail a nom bug or shouldn't it work in b, either? | ||
masak | jlaire: I was surprised by it. | 14:13 | |
14:14
wtw left
|
|||
PerlJam | #p5p say the oddest things | 14:17 | |
jnthn | PerlJam: I'm sure we could compete quite well on oddness on #perl6, if we put our minds to it ;) | 14:18 | |
masak | news at 11! | ||
PerlJam | jnthn: in reference to your 6guts mention of reviving the CLR backend for rakudo ... <@Nicholas> and workng Perl 6 on $anything might be subvertable to compile Perl 5 | 14:20 | |
jnthn | ;) | ||
arnsholt | jnthn: In re "Bounded Serialization", will that most likely live in NQP or Rakudo land? | 14:30 | |
mls | jnthn: compute_mro is missing to "trivial" case, i.e. +@immediate_parents == 1 | 14:32 | |
jnthn | arnsholt: NQP for sure. | ||
14:33
sftp joined
|
|||
shinobicl | hi: how do i define a constraint in a variable without using a subset? | 14:33 | |
jnthn | arnsholt: There's a bigger underlying plan that other languages built on NQP will be able to use this too. | ||
arnsholt | Yeah, that's what I was hoping | ||
jnthn | In general, instead of writing Compiler/Grammar/Actions, you'll write Compiler/Grammar/Actions/[other thingy we don't have a good name for yet] | ||
Where that thingy handles the "model" of the program, including objects that should exist runtime and compile time. | 14:34 | ||
arnsholt | I've an on-again off-again relationship with a Prolog compiler, and to do things like assert and retract I probably want some kind proper serialisation facility | ||
14:34
uasi joined
|
|||
arnsholt | My current approach is more a long the lines of "if all you've got is a hammer..." | 14:35 | |
jnthn | "...every problem looks like a PAST tree" | 14:36 | |
:) | |||
arnsholt | How'd you guess? =) | ||
masak | because every problem *does* look like a PAST tree? | 14:37 | |
moritz | once you've parsed and action'ed it, yes | ||
14:37
mkramer1 left
14:40
Trashlord joined
14:42
thou joined
14:44
thou left
14:48
shinobicl left
|
|||
masak | Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type. | 14:50 | |
auuugh | |||
PerlJam | masak: is that niecza's "Null PMC" ? | 14:52 | |
dalek | ast: 2eddda3 | moritz++ | S02-names_and_variables/fmt.t: refudge fmt.t for rakudo |
||
moritz | nom: printf '%f', 5.6 | ||
p6eval | nom d97997: OUTPUT«5.600000» | ||
jnthn | PerlJam: That'd be NullReferenceException | 14:53 | |
moritz | is that... expected? normal? | ||
nom: printf '%15f', 5.6 | |||
p6eval | nom d97997: OUTPUT« 5.600000» | ||
[Coke] | rakudo: so say "we all" | ||
p6eval | rakudo d97997: OUTPUT«we all» | ||
moritz | nom: printf '%015f', 5.6 | ||
p6eval | nom d97997: OUTPUT«00000005.600000» | ||
moritz | nom: printf '%.15f', 5.6 | ||
p6eval | nom d97997: OUTPUT«5.600000000000000» | ||
moritz | b: printf '%f', 5.6 | ||
p6eval | b 1b7dd1: OUTPUT«5.600000» | ||
PerlJam | moritz: looks fairly normal to me. | ||
moritz | PerlJam: some spectests expect that to be 5.6 | 14:54 | |
masak | PerlJam: no, but I've gotten it twice in two days now, so I'm starting to dislike it. | ||
moritz | $ perl -wE 'printf "%f\n", 5.6' | ||
5.600000 | |||
moritz wonders what's up with the tests | |||
mjreed | $ printf "%f\n" 5.6 | 14:55 | |
5.600000 | |||
even bash agrees. | |||
[Coke] | is nom now also rakudo on p6eval? | ||
moritz | yes, they are aliases | 14:56 | |
PerlJam | rakudo: say "hi" | ||
p6eval | rakudo d97997: OUTPUT«hi» | ||
PerlJam | nom: say "hello" | ||
p6eval | nom d97997: OUTPUT«hello» | ||
14:56
dukeleto left
|
|||
mjreed | b: say "I'm getting too old for this." | 14:56 | |
p6eval | b 1b7dd1: OUTPUT«I'm getting too old for this.» | 14:57 | |
14:57
dukeleto joined
|
|||
[Coke] | p6devl: help! | 14:57 | |
p6eval: help | |||
p6eval | [Coke]: Usage: <(nom|pugs|perlesque|nqprx|yapsi|alpha|highlight|partcl|nqpnet|star|mildew|nqp|niecza|std|rakudo|b)(?-xism::\s) $perl6_program> | ||
masak | b: say "...but I still kick nom's butt in some regards" | ||
p6eval | b 1b7dd1: OUTPUT«...but I still kick nom's butt in some regards» | ||
[Coke] | Every time I do that, I'm surprised that partcl is in there. Every time. | ||
PerlJam thought for a second that Coke was invoking a perl 6 devil | |||
[Coke] | and there you are! | ||
moritz | [Coke]: well, giving partcl a $perl6_program might not be too smart :-) | ||
mjreed | I thought maybe p6devl forwarded to the perl6-dev mailing list. :) | 14:58 | |
moritz | our secret replacement for p6l | ||
mjreed | formed by the perl6 cabal. | ||
PerlJam | partcl: say hi | ||
p6eval | partcl 3977a9: OUTPUT«invalid command name "say" while executingHLL::Compiler::eval (file "<unknown file>" line 151)PCT::HLLCompiler::evalfiles (file "<unknown file>" <unknown line>)PCT::HLLCompiler::command_line (file "<unknown file>" <unknown line>)main (file "… | ||
PerlJam | (just making sure ;) | 14:59 | |
[Coke] | partcl: puts hi | ||
p6eval | partcl 3977a9: OUTPUT«hi» | ||
moritz | formed by the Perl 6 kobold | ||
masak shudders | |||
15:00
static_perl left
|
|||
[Coke] | partcl: puts [expr sqrt(64)] | 15:00 | |
p6eval | partcl 3977a9: OUTPUT«Invalid expression while executingexpr (file "<unknown file>" line 8)HLL::Compiler::eval (file "<unknown file>" line 151)PCT::HLLCompiler::evalfiles (file "<unknown file>" <unknown line>)PCT::HLLCompiler::command_line (file "<unknown file>" … | ||
[Coke] | now, that's odd. ah well. | ||
moritz | masak: can you confirm my observation that backtraces wrongly contain the name of the current script even for routines executed from modules defined in other files? | 15:02 | |
masak | moritz: no, I haven't seen that. | ||
haven't been looking for it either. | |||
I try to rely on backtraces as little as possible. | |||
moritz | why? | 15:03 | |
15:03
thou joined
|
|||
masak | because they're so *booooring* | 15:03 | |
[Coke] probably should not try to use JIRA web app shortcuts on every page he goes to. whoops. | |||
masak | moritz: when I do the dishes, I use my fingers to feel the surface of plates and cutlery, to see if they're clean. when I code, I do something similar. | ||
moritz | masak: you might need to come up with a module that makes backtraces more exciting | 15:04 | |
like, inluding animated ASCII art :-) | |||
masak | moritz: backtraces are like dishwasher fluid. too strong, too broad, inhuman. | ||
jnthn | ...and fairly useful when you're trying to reconstruct what just happened in code you wrote 2 years ago that failed. :) | 15:05 | |
masak | I'm not saying they're a bad thing. | ||
I'm saying I try to rely on them as little as I can. | |||
TimToady | backtraces should be written in HTML5, ovbiously | 15:06 | |
and I've always said they should probably go to disk by default, not the terminal | |||
or to a backtrace cacher of some sort | |||
masak | +1 | ||
benabik | Someone wrote a terminal program for OS X that used HTML5… It used JSON to communicate with "command line" apps running in it. It looked odd. | 15:07 | |
[Coke] | like on OS X, TimToady ? | ||
masak | especially in Niecza, they're too long. | ||
but nom is catching up, too. | |||
jnthn | \o/ | ||
oh, wait.. | |||
TimToady | [Coke]: how would I know anything about OS X? | ||
jnthn | :P | ||
[Coke] | TimToady: the same way I would know how you would know anything about OS X? | ||
TimToady | did anyone see my speculations at irclog.perlgeek.de/perl6/2011-09-13#i_4419513 | 15:08 | |
[Coke] | but, yes, OS X has a service that tracks dumps for you, so you have a central location to go through your (C) backtraces. | ||
moritz also wondered if backtraces should be gone by default, and only the calling location should be present, much like p5 | |||
TimToady | I think they should *appear* to be gone, by default :) | 15:09 | |
masak | benabik: this one? acko.net/blog/on-termkit | ||
[Coke] | I think by default, that's fine. I'd really like an easy way to turn on the full backtrace, though. | ||
benabik | masak: Looks like. | ||
masak | benabik: it's the closest I've come to wanting to leave the text-based CLI model. | ||
moritz | TimToady: sure. The full information should always remain somewhere behind the curtain. | ||
TimToady | [Coke]: I think you can turn it on retractively if it's been saved somewhere | ||
moritz | or rerun with a command line switch | 15:10 | |
like currently perl6 --ll-excpetion | |||
masak | benabik: I believe with slightly *less* eye candy -- or rather, something like a "feet still on the ground" attitude -- I might go for a project like that. | ||
moritz | thought that might become --bt=[none|concise|full] | ||
benabik | masak: It looked interesting, but it really needs to be a) cross platform and b) have a rich set of programs supporting it. | 15:11 | |
moritz | *though | ||
masak | benabik: right. it's a bit too much of a reinvention. like Smalltalk and Plan 9. | ||
benabik | masak: Mostly agreed, although I tend to use Alfred for basic stuff instead. Launcher bars FTW | ||
15:11
birdwindupbird left
|
|||
TimToady | I know, we'll send all backtraces to gist.github.com :) | 15:12 | |
the good ones end up there anyway ;) | |||
moritz | .oO( killing me hardly with this gist ) |
||
TimToady | "This program has terminated unexpectedly. Do you wish to send the backtrace to github?" | ||
moritz | (yes/no/show me already) | 15:13 | |
masak | benabik: I use Do. when I was on Mac OS X, I used Quicksilver. | ||
benabik: so, yes. I agree. | |||
benabik | masak: Alfred is Quicksilver but actively developed. :-D On Linux I haven't ventured past just a term window yet, but I don't live in it much. | 15:14 | |
TimToady | jnthn, sorear: what do you think of the idea of passing write ownership of mutable objects around via rw binding, and having only one scope at a time be the write owner? | 15:15 | |
then a write just fails unless you are the write owner | 15:17 | ||
jnthn | TimToady: Can you define "scope" a little more? | ||
TimToady | the lexical scope into which the rw parameter is temporarily bound | 15:18 | |
jnthn | So, routine-level scope, essentially? | ||
TimToady | more or less | ||
kinda fits with only one thread owning write access to an object at a time too | 15:19 | ||
jnthn | hm, it has the benefit of being lexically scoped, which goes well with code analysis. | ||
Yeah, I was just about to ask about that. | |||
TimToady | would have to figure out how elements of an array/hash delegate to the container object, I suppose | ||
jnthn | Well, I was about to ask about like @huge_thing>>++ | 15:20 | |
TimToady | but I like that overall direction | ||
moritz | my $a = []; sub f($x is rw) { gather { for 1..10 { take $_; $x.push($_) } }; my @b := f($a); # can I modify $a here? or does $f still hold the writing permissions? | ||
jnthn | Where we want to break the array over many threads and do data-parallel operations | ||
TimToady: I don't have any immediate reaction either way. I think I need to see a bunch of examples. | 15:21 | ||
TimToady | I think the write token is one aspect of a solution, but there needs to be some kind of dynamic delegation upward too, so that write access can be conferred on children too | 15:22 | |
jnthn | TimToady: Nothing immediately makes me think "oh, could never work". I like the lexical nature of it, since that's pretty good from an analysis/optimization point of view. | ||
masak | sorear: under what conditions should I expect to get "Unable to cast object of type 'Niecza.P6opaque' to type 'Cursor'." ? | ||
jnthn | TimToady: But I can imagine there's tricky edge cases. | ||
TimToady | there's always tricky edge cases :) | ||
jnthn | TimToady: Sure, I put it badly. I more meant, edge cases that users are going to bump in to a lot. | 15:23 | |
TimToady | anyway, that's the direction I'm thinking currently | ||
jnthn | TimToady: The other issue is who is responsible for restoring the old ownership. | ||
s/old/previous/ | 15:24 | ||
Things like gather/take could be interesting there too, as moritz++ pointed out. | |||
As you may have to set/restore them over coroutine boundaries...somehow. | |||
TimToady | but coro/threading is precisely where we'd like better control of that anyway | ||
jnthn | Well, there is that. :) | 15:25 | |
So long as we don't get ourselves into deadlock issues. | |||
15:26
supernovus joined
15:30
tzhs left
|
|||
mls | jnthn: startup is now 20% faster | 15:32 | |
jnthn | mls: o.O | 15:33 | |
mls++ | |||
15:33
thou left
|
|||
mls | gisting... | 15:33 | |
diff: gist.github.com/1214122 | 15:34 | ||
(I hope the code is correct, haven't run spectest yet) | |||
three changes: 1) the immediate_parents == 1 check, 2) call self.mro instead of self.compute_mro, 3) the publish_cache change | 15:35 | ||
same thing for nqp: gist.github.com/1214140 | 15:39 | ||
moritz spectests the rakudo changes | 15:40 | ||
mls | thanks! | ||
jnthn | moritz++ | ||
masak | mls: you, sir, rock. | 15:41 | |
mls | I just looked at the profile output | ||
benabik | mls: The profiling that you got to work in the first place? | ||
mls | yes | 15:42 | |
masak | mls++ mls++ | ||
benabik | mls++ | ||
mls | hey, calm down ;) | ||
jnthn | mls++ !!! | ||
:) | |||
masak | mls: we want to imbue you with positive emotions now, so that you'll do it again :P | 15:43 | |
mls | That's an old trick ;) | ||
masak | but it's working, right? :D | ||
mls | you'll see ;) | ||
masak bounces | |||
mls | the qregex fail in nqp's "make test" is normal, right? | 15:45 | |
jnthn | mls: The patch looks good to me, at a first glance. | ||
moritz | mls: right | 15:46 | |
rakudo spectest is fine so far (S03-sequence) | |||
mls | good. Now we just need to wait for the spectest result | ||
15:47
thou joined
|
|||
supernovus | multi postfix:<**> (Numeric $a is rw) { $a *= $a; }; mls**; | 15:47 | |
jnthn | If startup is 20% faster, should be a little less waiting ;) | 15:48 | |
mls | unfortunately it's just startup time... | ||
jnthn | mls: Yes, but the test run causes 100s of startups :) | 15:49 | |
mls | now a 20% faster setting compilation would be nice | ||
masak .oO( easy, just compile the setting at startup! oh wait ) | |||
jnthn | Well, we calculate the MROs during compiling the setting too, so it will have shaved a little off that at least. | ||
moritz | t/spec/S12-attributes/delegation.t ............................. Dubious, test returned 1 (wstat 256, 0x100) | ||
mls | (actually I can do 6% with my ugly parrot patch...) | ||
masak | "Dubious delegation" would be a great name for a rock band. | 15:50 | |
mls | huh | ||
moritz | t/spec/S12-introspection/parents.t also fails | ||
mls | debugging... | ||
jnthn | The latter one is probably most telling. | ||
[Coke] | hio. Anyone here getting data from: smolder.parrot.org/app/projects/smoke_reports/5 | 15:52 | |
moritz | mls: with your patch, Str.^parents returns (Str, Cool, Any, Mu) | 15:53 | |
mls: should be (Cool, Any, Mu) only | |||
jnthn | [Coke]: Haven't been, though it certainly looks useful. | 15:54 | |
moritz sometimes does, usually before releases | |||
[Coke] | Ok. in fine perl6 tradition, I'm rolling a new one. | 15:55 | |
(the administration of that service is a pita, trying to make one that is easier to drop in on a server.) | 15:56 | ||
jnthn gets curious why t/spec/S06-multi/type-based.rakudo fails on that box but not for him | |||
[Coke] | (and gives us more features). Comments welcome on the perl6-compiler thread (that's the right list, aye?) | ||
15:57
Holy_Cow joined,
kshannon joined
|
|||
[Coke] | jnthn: if you go to the report and click on "properties" you can see particulars about the test machine | 15:57 | |
jnthn | [Coke]: Well, it's been run on amd64 and fails consistently. The only pass I see was from a Win32 machine ;) | 15:58 | |
15:58
jevin left,
Holy_Cow left
|
|||
masak | "nested structural regular expressions" -- sounds familiar somehow. www-cs-students.stanford.edu/~blynn/nex/ | 15:58 | |
moritz produces lots of PASSes on amd64, but rarely remembers to submit | |||
jnthn has access to one and should try it at some point | 15:59 | ||
It's time to start getting The Beast set up tonight too :) | |||
masak | The Baest! | 16:00 | |
[Coke] | ? | ||
jnthn | [Coke]: I've got new hardware :) | 16:01 | |
masak | [Coke]: jnthn can haz a new bad-ass stationary computer. | ||
16:01
jevin joined
|
|||
jnthn | So I can be, like, productive and stuff. :) | 16:01 | |
mls | jnthn: I think it's because of that compute_mro -> mro change | 16:03 | |
jnthn | mls: ah. Hmm. | ||
mls | the code was self.compute_mro($_) | ||
is the "self" correct? | 16:04 | ||
I mean, compute_mro caches the result in self.!mro | |||
tadzik | say so all(@bigs) contain 'foo' # fantastic poetry :) | 16:05 | |
jnthn | mls: er, no | ||
mls: That'll be the issue. | 16:06 | ||
You may want to try $_.HOW.mro($_) | |||
mls | yes. | ||
(But I just copied code. So the old code was wrong, too?) | |||
jnthn | No, compute_mro cares more for $obj than self, iirc. | 16:07 | |
mls | but it stores the result in @!mro, so it uses self | ||
masak | moritz: I think you will like spikedmath.com/433.html | ||
jnthn | mls: Yeah. I guess we got lucky by then overwriting it again with the correct thing later... | ||
mls: So, a good discovery. | 16:08 | ||
16:08
simcop2387 left,
sayu joined
|
|||
mls | so, how to proceed? delete the $class argument from compute_mro and just use self? | 16:08 | |
masak | moritz: I figured some of them out before I saw the translation below ;) | 16:09 | |
16:10
simcop2387 joined
|
|||
jnthn | mls: In your patch where you've turned a self.compute_mro($_) into a call to mro, do it as $_.HOW.mro($_) | 16:10 | |
mls: that should hopefully do it. | 16:11 | ||
mls | yes. Testing... | 16:12 | |
16:16
jevin left
16:17
molaf joined
|
|||
mls | Hmm, Null PMC access in get_string() | 16:18 | |
daxim | perl6: one; loop { two; three; four; five; } | ||
p6eval | niecza v9-23-g1a8efca: OUTPUT«===SORRY!===The 'one' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/InICJnRYFo line 1:------> one⏏; loop { two; three; four; five; }Undeclared routines: 'five' used at … | ||
..rakudo d97997: OUTPUT«Could not find sub &two in block <anon> at /tmp/LIH_GuxKXT:1 in <anon> at /tmp/LIH_GuxKXT:1 in <anon> at /tmp/LIH_GuxKXT:1» | |||
..pugs: OUTPUT«*** No such subroutine: "&two" at /tmp/zO6_zkbpCx line 1, column 13-16» | |||
16:18
eternaleye left
16:21
jevin joined
|
|||
tadzik | funny. Why "&two"? | 16:21 | |
TimToady | interesting that niecza lists the undeclared routines in reverse order; so does std | ||
oh, maybe it's alphabetical | 16:22 | ||
yeah | |||
16:23
bluescreen10 left,
stephang joined
|
|||
TimToady | tadzik: I believe that's a run-time error; rakudo still does not check for undeclared subs at CHECK time like niecza does | 16:24 | |
but yes, it could strip the & | |||
tadzik | no, still. one() should be tried to be called before loop {}, no? | 16:25 | |
TimToady | one is a built-in, and may not be called without args, as niecza points out | ||
and nothing is called if an error is compile time, or check time | 16:26 | ||
if niecza says "SORRY!" nothing will be run (except beginish stuff) | |||
perl6: say "alive"; two | 16:27 | ||
p6eval | niecza v9-23-g1a8efca: OUTPUT«===SORRY!===Undeclared routine: 'two' used at line 1Unhandled 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)  a… | ||
..pugs: OUTPUT«alive*** No such subroutine: "&two" at /tmp/B5q4T3MfXQ line 1, column 14 - line 2, column 1» | |||
..rakudo d97997: OUTPUT«aliveCould not find sub &two in <anon> at /tmp/_E7WjWU4GE:1 in <anon> at /tmp/_E7WjWU4GE:1» | |||
TimToady | note niecza does not say "alive" | ||
that is corret | |||
*c | |||
16:28
MayDaniel joined
16:30
eternaleye joined
|
|||
jnthn | TimToady: I was pondering have the optimizer detect those, since it has to go over the various called routines anyway. | 16:33 | |
er, callsites, I mean. | |||
I guess we could do the mystery approach STD uses also, though. | 16:34 | ||
TimToady | the most import aspect is to check the visibility of post-declared routines from the lexical scope of the call | ||
pmichaud | good morning, #perl6 | 16:35 | |
TimToady | howdy | ||
jnthn | Right...by the time we're in the optimizer, we know all the declarations. | ||
hej, pmichaud :) | |||
16:35
mj41 left,
bluescreen10 joined
|
|||
[Coke] | ho, pmichaud | 16:35 | |
TimToady | but you have to know all the original scopes too; merely having a declaration out there is no good if it's not visible from the point of the call | 16:36 | |
mjreed | so we're generally opposed to things that numify to 0 but boolify to true these days, correct? | ||
[Coke] | I certainly am! | ||
TimToady | it's considered a design smell | ||
btw, .defined should autothread, but .DEFINITE should not | 16:37 | ||
jnthn | TimToady: So .defined should go in Any, not Mu? | ||
pmichaud | jnthn: I think .defined in Junction should autothread. | ||
jnthn | Oh, we should implement a .defined in Junction...OK. | ||
pmichaud | jnthn: I'd still expect to have a Mu.defined, I think. | ||
jnthn | wfm | ||
pmichaud is several days out on recent conversations, so modulo my responses with that. | 16:38 | ||
jnthn | So long as we don't go breaking the "auto-threading of method is just a method dispatcher fallback" | ||
:) | |||
TimToady: (know all the original scopes) yes, we very much still do in the optimizer. It has to know exactly what's going to be called, otherwise it's not going to be able to do inlining. | |||
TimToady | or candidates for that matter | 16:39 | |
jnthn | Right. :) | ||
We have that to hand in nom already. :) | |||
mjreed | I was asking because we don't have a trivial built-in way atm to do a yes/no "is X a substring of Y". have to either turn X into a regex and smartmatch or call .index.defined. Making .defined autothread makes the latter more palatable, though. | ||
TimToady | having the check in one spot does let us list all of the undefined routines together though | ||
jnthn | TimToady: Sure - I'd expect the optimizer to note down all of these sorts of things as it goes and then just give a report of anything it found at the end. | 16:40 | |
TimToady | wfm | ||
jnthn | TimToady: It'll no doubt detect a bunch of impossible type-based stuff too. | 16:41 | |
Of course, from the user's point of view, they don't much care which stage whines at them. :) | |||
They just want the info. | |||
mjreed | as long as the whining includes information meaningful to me... which low-level whinging often doesn't. | 16:42 | |
mls | how do I create a copy of an array in nqp? | ||
pmichaud | mls: deep copy or shallow? | ||
mls | shallow is enough | ||
pmichaud | my @new := nqp::clone(@old) | ||
mls | Thanks! | 16:43 | |
jnthn | mjreed: Yes, it'd tell you the name of the undeclared thing, where the call was, etc. | ||
16:45
dukeleto left
|
|||
mjreed | Oh, happy programmer's day, in case nobody mentioned it yet... | 16:45 | |
mls | jnthn: that was the issue with our last change: all classes shared the same @!mro cache afterwards | ||
jnthn | mls: oh! | 16:46 | |
mls: Well, ouch :) | |||
mls | yes ;) | ||
cotto_work | mls: how do you regard the sub profiling branch? Is it as good as it'll ever get or do you have further plans? | 16:47 | |
mls | It's not in a bad state ;). It just needs some cleanups: | ||
int -> correct type, it shouldn't write to stderr but in a file, and similar small changes | 16:48 | ||
cotto_work | also, tests | ||
mls | regarding the cla: our legal expert wasn't here today, will try tomorrow... | 16:49 | |
yes, tests would be nice | |||
16:49
alvis left
|
|||
cotto_work | mls: ok. Thanks for looking into that. | 16:50 | |
mls | jnthn: t/spec/S12-introspection/parents.t works again! and startup is still fast! | ||
jnthn | \o/ | ||
Well, faster ;) | |||
mls | gisting... | ||
I little bit, maybe ;) | |||
jnthn | mls: Does the delegation.t one pass also | ||
mls | yes | 16:51 | |
pmichaud | afk, errands | ||
mls | jnthn: gist.github.com/1214298 | 16:54 | |
note the strategic nqp::clone() ;) | |||
spectesting... | |||
jnthn | ah, yes :) | 16:55 | |
mls | (btw, the nqp patch was not affected, as it doesn't cache the mro) | ||
16:55
envi left
16:57
packetknife joined
|
|||
mls | argh, instants-and-durations hangs... | 17:01 | |
(stupid 32bit host...) | |||
17:02
alvis joined
17:03
dakkar left
17:06
Chillance joined
17:10
mjreed left,
localhost joined
17:11
daniel-s left
|
|||
supernovus | So, my SCGI library now has PSGI support. Now to get it working with apache's mod_scgi again. | 17:24 | |
mls | jnthn: spectest complete, only the 32bit tests seem to fail | ||
jnthn | mls: Great, thanks...will apply later today. | 17:25 | |
mls | thanks! | ||
afk -> home | |||
[Coke] really hopes versions in perl6 don't suck. | 17:26 | ||
17:30
packetknife left
|
|||
flussence | [Coke]: you were asking about TAP files the other day, do you still need them? | 17:37 | |
17:42
dukeleto joined,
stephang left
|
|||
[Coke] | I could use a few, sure. | 17:43 | |
juicy ones with failures and skips and things! ;_) | |||
flussence | have you got access to feather3? | ||
[Coke] | er, ;) | ||
just feather. | |||
17:45
molaf left
|
|||
flussence | hm, I'm not sure how to get them to you... | 17:45 | |
moritz: ping? | |||
17:45
benabik left
|
|||
[Coke] | you have access to feather3 but not feather? odd. | 17:46 | |
tell you what - just hang on to them, if you can, and I'll have you try to submit them via the webterface when that works. | |||
flussence | yeah, I only needed it to poke tryrakudo when it stops working... | ||
oh, most of these are getting uploaded to smolder.parrot.org too, I just happened to save them all locally | 17:47 | ||
[Coke] | I no longer have access there ;) | ||
no big deal. I'm days away from doing something with them anyway, and I can always generate my own if needed. | |||
thanks. | |||
Util | rakudo: class Wo { method look ($_:) { say $_.WHAT, ' ', self.WHAT; }; }; my $w = Wo.new; $w.look; | 17:48 | |
p6eval | rakudo d97997: OUTPUT«Wo() Wo()» | ||
Util | rakudo: class Wo { method look { say $_.WHAT, ' ', self.WHAT; }; }; my $w = Wo.new; $w.look; | ||
p6eval | rakudo d97997: OUTPUT«Any() Wo()» | ||
Util | Didn't the Specs (at some point in the past) say that methods auto-topicalize `self`, so that you can always say .method from within a method? | ||
Am I just imagining that history? | |||
flussence | [Coke]: depends how many you need... I have the whole nom branch here :) | ||
17:49
pernatiy left
|
|||
masak | Util: you are not imagining that history. | 17:51 | |
Util: it was changed to the current state in 2005. I have a blog post about why that was a good idea. | |||
flussence | rakudo: class Wo { method look ($_:) { say .WHAT; }; }; my $w = Wo.new; $w.look; # curious... | 17:52 | |
p6eval | rakudo d97997: OUTPUT«Wo()» | ||
masak | Util: strangelyconsistent.org/blog/the-do...test-sigil | ||
flussence | rakudo: class Wo { method look { say .WHAT; }; }; my $w = Wo.new; $w.look; | ||
p6eval | rakudo d97997: OUTPUT«Any()» | ||
flussence | no surprises here, good :) | 17:53 | |
Util | masak: tyvm | 17:54 | |
17:54
wamba joined
|
|||
[Coke] | flussence: ah, nifty. Might be fun to use that as a load to get data over time stuff working. | 17:55 | |
17:58
JimmyZ left
18:04
clairvy left
18:05
uasi left
18:10
zby_home joined
18:20
JodaZ joined
18:28
daxim left,
mj41 joined
|
|||
Util | `for` is eager in Perl 5, so this is safe: | 18:35 | |
my @GLOBAL_ARRAY = 1,2,3; sub_which_mutates_the_global_array($_) for @GLOBAL_ARRAY; | |||
`for` is lazy in Perl 6, so to be safe, I must do this: | |||
my @GLOBAL_ARRAY = 1,2,3; my @temp = @GLOBAL_ARRAY; sub_which_mutates_the_global_array($_) for @temp; | |||
Is there some single-statement syntax to make `for` eager? | |||
jnthn | Note that for in sink context is lazy. | 18:37 | |
gah | |||
Note that for in sink context is eager. | |||
18:38
pernatiy joined
|
|||
PerlJam | Util: modulo what jnthn said, you can use "eager" to force eagerness. :) | 18:40 | |
Util | PerlJam++ That is what I was looking for. | 18:41 | |
jnthn: Interesting. I cannot think of example syntax, though. | 18:42 | ||
thanks to you both | 18:43 | ||
jnthn | std: eager for 1..10 { } | 18:44 | |
p6eval | std bb4f150: OUTPUT«===SORRY!===Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/Tb7wJVdRED line 1:------> eager for 1..10 ⏏{ } expecting infix or meta-infixParse failedFAILED 00:01 120… | ||
jnthn | Thought not... | ||
eager map ... works though. | |||
Util | std: .say for eager 1..10 | 18:45 | |
p6eval | std bb4f150: OUTPUT«ok 00:01 120m» | ||
18:47
sayu left
18:52
daxim joined
|
|||
masak | Util: all the 'eager' would do in that context would be roll out the range into a list in memory before iterating over it. | 18:53 | |
the merits of that are questionable, though irrelevant in the case of 1..10 :P | |||
18:54
wallberg joined
18:55
mjreed joined,
frhodes joined
18:56
zby_home left
|
|||
mjreed | how do I do a destructuring bind? Something like my ($head, @rest) := @somearray.. | 18:57 | |
jnthn | *@rest | ||
mjreed | Ah, I was putting the star on the wrong side. Thanks. | 18:58 | |
jnthn | b: my @a = 1,2,3,5; my ($head, *@rest) := @a; say $head; say @rest | ||
p6eval | b 1b7dd1: OUTPUT«1 2 3 5» | ||
jnthn | er, hm | ||
mjreed | hm. | ||
indeed. | |||
jnthn | rakudo: my @a = 1,2,3,5; my ($head, *@rest) := @a; say $head; say @rest | ||
p6eval | rakudo d97997: OUTPUT«===SORRY!===Cannot use bind operator with this LHS at line 1, near " @a; say $"» | ||
jnthn | Yeah, didn't tackle that bit in nom yet. | 18:59 | |
mjreed | it seems like the syntax for that would be my ($head, @rest) := *@a; | 19:02 | |
jnthn | no. | ||
The LHS there is parsed as a signature. | |||
There's no prefix:<*> | |||
mjreed | Hw do you pass the elements of an array as individual parameters to a sub? | 19:03 | |
TimToady | prefix:<|> | 19:04 | |
Util | masak: The 1..10 is bad example; in the backscroll, you will see I was looking for `eager` to do this: | 19:06 | |
mjreed | so "my ($head, @rest) := |@a;" would seem to be the non-sub binding analogue.. | ||
Util | my @GLOBAL_ARRAY = 1,2,3; sub_which_mutates_the_global_array($_) for eager @GLOBAL_ARRAY; | ||
masak | hey! #phasers! | ||
Util | Whoops! | ||
masak | Util: as jnthn pointed out *that already does what you want*. | ||
Util: for loops are lazy (because maps are lazy), but sink context eagerifies them. | 19:07 | ||
Util | masak, (and anyone else who is questioning my sanity), @GLOBAL_ARRAY is just a placeholder for *anything* that I am trying to pre-read into memory before the `for` gets it. | 19:08 | |
I should have used $fh.lines for an example instead. | 19:09 | ||
Thanks. | |||
19:09
molaf joined
|
|||
masak | Util: sink context eagerifies for loops. | 19:10 | |
masak should perhaps change his way of saying this, since it hasn't worked so far | |||
Util | but /me was absent the day they taught sink context :( | 19:11 | |
masak | Util: the example, even with the modifications you propose, is not lazy. unless it's at the last statement of a routine and some other things hold. | ||
19:11
im2ee joined
|
|||
im2ee | Hello! :) | 19:11 | |
masak | im2ee: cześć! | 19:12 | |
jlaire | im2ee: terve | ||
im2ee | masak, witaj. | ||
tadzik | hej | ||
im2ee | jlaire, terve! :) | ||
tadzik, hej! :) | |||
Util | masak: So, like in Perl 5, it is always safe to say this? : | 19:13 | |
for IO.readdir -> $file { clone_the_file_into_the_same_dir($file) } | |||
masak | Util: unless it's the last statement of a routine and some other things hold, yes. | 19:14 | |
Util | Can you point me to the doc? I am writing example code, and I need to know those "other things" to be sure I don't err; this *is* being done as the last statement of a routine. | 19:15 | |
masak | rakudo: for 1..10 { .say } | ||
p6eval | rakudo d97997: OUTPUT«12345678910» | ||
masak | rakudo: sub foo { for 1..10 { .say } }; my @a := foo(); | 19:16 | |
p6eval | rakudo d97997: OUTPUT«12345678910» | ||
masak | hm. should that really evaluate? | ||
b: sub foo { for 1..10 { .say } }; my @a := foo(); | |||
p6eval | b 1b7dd1: OUTPUT«12345678910» | ||
TimToady | afaik rakudo still cheats on sink context | 19:17 | |
masak | Util: "other things": the call isn't in sink context. | ||
TimToady: oh. that would explain it. | 19:18 | ||
TimToady | niecza: sub foo { for 1..10 { .say } }; my @a := foo(); | ||
p6eval | niecza v9-23-g1a8efca: OUTPUT«Potential difficulties: @a is declared but not used at /tmp/I17hkYIkBJ line 1:------> sub foo { for 1..10 { .say } }; my ⏏@a := foo();12345678910» | ||
Util | masak: OK, thanks! | ||
masak | rakudo: my @a := gather for 1..10 { .say; take }; say "alive" | ||
p6eval | rakudo d97997: OUTPUT«alive» | 19:19 | |
masak | rakudo: my @a := gather for 1..10 { .say; take }; say "alive"; say @a[4] | ||
p6eval | rakudo d97997: OUTPUT«alive12345678910Nil» | ||
masak | Nil!? | ||
rakudo: my @a := gather for 1..10 { .say; take }; say "alive"; say '@a[4] = ', @a[4] | |||
p6eval | rakudo d97997: OUTPUT«alive12345678910@a[4] = Nil» | ||
masak | this is wrong, right? | 19:20 | |
b: my @a := gather for 1..10 { .say; take }; say "alive"; say '@a[4] = ', @a[4] | |||
p6eval | b 1b7dd1: OUTPUT«alive12345@a[4] = » | ||
masak | oh! | ||
rakudo: my @a := gather for 1..10 { .say; take $_ }; say "alive"; say '@a[4] = ', @a[4] | |||
p6eval | rakudo d97997: OUTPUT«alive12345@a[4] = 5» | ||
masak <-- very forgetful | |||
PerlJam | rakudo: my @a := gather for 1..10 { .say; .take }; say "alive"; say '@a[4] = ', @a[4] | 19:21 | |
p6eval | rakudo d97997: OUTPUT«alive1Method 'take' not found for invocant of class 'Int' in block <anon> at /tmp/cP1aes3Fv8:1 in method reify at src/gen/CORE.setting:3649 in method reify at src/gen/CORE.setting:3554 in method reify at src/gen/CORE.setting:3554 in method gimme at src/… | ||
masak | TimToady: what do you think of nom's tendency to give Nil back from indexings that didn't find anything. (as opposed to Any, that Beijing gives back) | ||
TimToady | rakudo: my @a := do for 1..10 { .say; $_ }; say "alive"; say '@a[4] = ', @a[4] | 19:22 | |
p6eval | rakudo d97997: OUTPUT«12345678910alive@a[4] = 5» | ||
TimToady | niecza: my @a := do for 1..10 { .say; $_ }; say "alive"; say '@a[4] = ', @a[4] | ||
p6eval | niecza v9-23-g1a8efca: OUTPUT«12345678910alive@a[4] = Any()» | ||
TimToady | Any seems a bit better to me if there's any chance it'll be used as a placeholder | 19:24 | |
(in a list) | |||
masak | I agree. | 19:26 | |
TimToady | well, it depends on what the default value for the array is | 19:27 | |
but most arrays default to Any | 19:28 | ||
19:28
mberends joined
|
|||
TimToady | more precisely, most arrays default to their type object, and untyped arrays have a type object of Any | 19:30 | |
perl6: my Int @array; say @array[1].WHAT | |||
p6eval | pugs: OUTPUT«Scalar» | ||
..rakudo d97997, niecza v9-23-g1a8efca: OUTPUT«Any()» | |||
19:30
kshannon left
|
|||
TimToady | I think that should probably be Int | 19:31 | |
jnthn | TimToady: Agree | ||
TimToady | but we want to be able to set a default separate from the type | ||
mathw | (wakes up) That seems sensible | 19:33 | |
masak | math! | 19:34 | |
er, mathw! \o/ | |||
mathw has been busy with new job | 19:35 | ||
been learning F# and C#, wishing for Perl 6 | |||
masak | P# | ||
TimToady | smile when you say that | ||
masak | P# :D | 19:36 | |
19:36
araujo joined
|
|||
mathw | actually been wishing for anything with macros, .NET seems to grow boilerplate randomly :( | 19:36 | |
19:36
benabik joined
|
|||
mathw would like to congratulate the nom developers on its promotion | 19:39 | ||
19:39
thou left
|
|||
masak | its promotion to... still being nom :P | 19:40 | |
mathw | well yes | 19:41 | |
but it is now the default branch | |||
which is a promotion :) | |||
PerlJam | masak: but now it's *the* nom | ||
masak | :P | ||
19:42
kshannon joined
|
|||
mathw | We're using Mercurial at $newjob, which is confusing me a bit because it's almost the same as git, but not quite... | 19:42 | |
masak | mathw: having played around with nom in the past week, I find it less ready to replace b than I thought. but it seems to be closing the gap quickly enough. | ||
mathw | masak: at some point the leap had to be taken, it's not like releasing a big new version of a popular app and leaving most of the functionality out. | 19:43 | |
Nobody ever does that, after all | |||
masak | surely not | ||
pmichaud | good afternoon, #perl6 | 19:44 | |
mathw | oh hai pmichaud | 19:45 | |
masak | pmichaud! \o/ | ||
just the Perl 6 List Expert I was looking for :) | 19:46 | ||
pmichaud: btw, #phasers! | |||
pmichaud | yeah, I just got in from @errands | 19:47 | |
mathw | on stun! | ||
(sorry) | |||
masak | peow peow | ||
19:47
frhodes left,
kshannon left
19:48
kshannon joined
19:49
MayDaniel left
19:51
frhodes joined,
mberends left
19:59
jevin left
20:02
jevin joined
20:03
skangas left
20:20
eiro joined
|
|||
supernovus | hmm, that's odd, if I run a script on the command line, it works fine, if I try to run it as a CGI script, it bails with "Method 'exists' not found for invocant of class 'Hash'". That's new one oO | 20:20 | |
eiro | hello | ||
20:21
soh_cah_toa joined
|
|||
jnthn | supernovus: Are you running an installed version, ooc? | 20:21 | |
supernovus | yup | 20:22 | |
tadzik | hello eiro | 20:23 | |
masak | salut, eiro. | ||
eiro: bonne chose vous êtes venu. du peuple polonais et finlandais ont été la prise sur le channel. :) | 20:25 | ||
tadzik es polonais | 20:26 | ||
20:27
wamba left
|
|||
arnsholt hands tadzik a t | 20:29 | ||
I think it's yours =) | |||
tadzik | est. Like ist :) | ||
yeah, it's me t | |||
arnsholt | Like ist, indeed. They're even etymologically related =D | 20:30 | |
masak | tadzik: och, nie mówił o *tobie* :) | ||
tadzik | :P | ||
arnsholt | I think the slavic copula is *Hes as well | 20:31 | |
masak | unless you're Russian, then it's '' | ||
arnsholt | Quite, quite | ||
I need to learn some kind of Slavic language | 20:32 | ||
Old Church Slavonic might be useful ^_^ | 20:33 | ||
jnthn | It looks pretty if nothing else :) | ||
arnsholt | Yup. And considering my Master's work used data from a Latin corpus, I can even make a case that I might even benefit from knowing it | 20:34 | |
Historical linguistics for the win =) | 20:35 | ||
masak | Ѧ! | ||
supernovus | Okay, so IO::Socket::INET works if I telnet into it, and manually send commands. If I use Apache or lighttpd to connect to it, they don't seem to send the data until the connection times out (or at least that seems to be the symptoms.) Anyone have experience with sockets? | 20:36 | |
arnsholt | Yeah, I should learn to read those things as well. I already know the Greek alphabet, so it should be mainly a matter of applying myself | ||
.u Ѧ | |||
phenny | U+0466 CYRILLIC CAPITAL LETTER LITTLE YUS (Ѧ) | ||
masak | supernovus: sounds like something to do with buffering. | ||
arnsholt: latin, greek, and cyrillic. learning them all is like looking at cubistic art :P | 20:37 | ||
arnsholt | Well, I don't know actual Greek (modern or ancient). I just know the letters of the alphabet | 20:38 | |
masak | aye. | ||
arnsholt | I learned half of it from doing maths too, TBH | ||
masak | same here. | ||
nodnod | |||
arnsholt | But not sure I see how it's like cubism | 20:39 | |
20:39
uasi joined
|
|||
arnsholt | You trying to say Classics aren't a useful real-world skill? ;p | 20:39 | |
masak | I would never claim that. | 20:43 | |
I learned Cyrillic before Greek. with each Greek letter I learned, I understood more about the Cyrillic ones. the perspective gained was almost like in cubism, with more observer angles than usually possible ;) | 20:45 | ||
20:48
kaare_ left
|
|||
mikemol | rosettacode.org/mw/index.php?title=...ldid=91998 | 20:48 | |
masak | rakudo: say '1' + 1 | 20:51 | |
p6eval | rakudo d97997: OUTPUT«2» | 20:52 | |
masak | this has little or nothing to do with "strong typing", at least in Perl 6. | ||
...where the operators themselves more often than not contain implicit type conversions. | |||
arnsholt | masak: Ah yes, I see what you mean now | ||
Sanskrit is mighty useful in that context as well. Lots of fun stuff going on with the verbs | 20:53 | ||
masak | d'oh, gotta learn Sanskrit. | ||
arnsholt | It's pretty cool. Thankfully I can just ask the missus in most cases if I need some kind of Sanskrit trivia answered =) | 20:54 | |
masak | a Sanskrit missus? oh mama. | 20:57 | |
arnsholt | Oh yeah =D | 20:59 | |
Incidentally, it turns out Sanskrit classes are an excellent way to meet people interested in Sanskrit =D | 21:00 | ||
supernovus | masak: Hmm, any idea how to work around buffering issues? I never came across these problems in ng or alpha. Always new and exciting things to find when new versions come along :-) | ||
im2ee | Uhh, it's time for me. Good night! :) | ||
21:01
im2ee left
21:02
MayDaniel joined
|
|||
masak | im2ee: dobranoc! | 21:02 | |
supernovus: I'm sorry, I have absolutely no idea. maybe mberends will know, he's done a bit in that area. | 21:03 | ||
supernovus | masak: okay, I'll ask mberends when he's around. | 21:04 | |
21:05
mberends joined
|
|||
masak | :) | 21:05 | |
he's around. | 21:06 | ||
supernovus | I'm cleaning up my old projects, I'm going to pull half of them from the active list, as I have no intentions of resurrecting them. Exemel, SCGI, WebRequest (soon to be renamed WWW::App) Temporal::Utils and Flower will likely be the only survivors of my project purge. | ||
mberends depubbed (pity, $work tomorrow) | |||
jnthn | mberends: aww. | 21:11 | |
mberends | supernovus: IO::Socket::INET initially had similar lack of buffer flushing in alpha and beijing, and each was patched after the initial implementation. Not sure, but perhaps the fixes are not portable enough between Rakudo branches. | 21:14 | |
21:16
MayDaniel left
|
|||
jnthn | I suspect the gist of them will be though. | 21:16 | |
mberends | yep, nom passes spectests, although networking is very hard to test thoroughly | 21:17 | |
supernovus | Ah, well, that likely explains the issue. I submitted a pull request with some changes that make the accept() method work properly in nom (still no buffer flushing though, I'm not sure where to find that.) | 21:18 | |
jnthn | Did anyone apply supernovus++ pull request? | ||
jnthn is just in the middle of setting up his new dev machine at the moment... :) | |||
mberends | jnthn: with Linux this time? ;) | 21:20 | |
jnthn | :P | ||
mberends | :Positive \o/ | ||
jnthn | Good luck with that :) | ||
I do have 16 GB of RAM to do something with though :) | |||
So I can certainly do a Linux VM :) | |||
Pondered, but didn't feel like the shock therapy of just installing that. ;) | 21:21 | ||
mberends | :) | ||
cotto_work | jnthn: is your boolification work in nqp any more complicated that it sees to be or is it just a way to specify how a 6model thingy gets turned into 1/0? | ||
supernovus | dual booting is always fun... games are on windows, work is on linux, keeps me undistracted during the day ;-) | 21:22 | |
cotto_work | s/sees/seems/ | ||
jnthn | cotto_work: It's basically that. | ||
cotto_work: It's a circularity saw in a sense. | |||
cotto_work: I wanted something that would (a) let me handle a bunch of common cases efficiently and (2) be easy to port. | 21:23 | ||
er, 1 and 2 :) | |||
cotto_work: Turns out it gave us a ~15% performance win :) | 21:25 | ||
cotto_work | nice find | ||
Is that from avoiding nested runloops? | |||
21:26
bbkr1 joined
|
|||
jnthn | cotto_work: Yes, but even if we didn't have to enter a nested runloop it'd still be faster for the common cases too. | 21:26 | |
21:27
dukeleto left,
wamba joined
21:29
frhodes left,
frhodes joined
21:30
frhodes left,
frhodes joined
21:31
frhodes left,
frhodes joined,
skangas joined
21:37
wallberg left
|
|||
jnthn | Ugh. | 21:39 | |
.\miniparrot.exe -Iruntime/parrot/include config_lib.pir > runtime/parrot/include/config.fpmc | |||
NMAKE : fatal error U1077: '.\miniparrot.exe' : return code '0xc0000005' | |||
...that's a segv. :( | |||
Hmm, I see your chosen INTVAL isn't the same size as your pointers. Parrot | 21:40 | ||
should still compile and run, but you may see a ton of warnings. | |||
...that's a giveaway... | 21:41 | ||
diakopter | new windows trouble? | ||
jnthn | diakopter: 64-bit windows trouble. | ||
cotto_work | Parrot doesn't do well in that situation | ||
jnthn | cotto_work: Yeah...wonder why it ends up configuring that way. | ||
21:44
benabik left,
mj41 left
|
|||
diakopter | jnthn: yeah, last I tried parrot/rakudo on 64-bit windows, I guess I downloaded the 32-bit parrot installer. | 21:45 | |
21:45
packetknife joined
|
|||
jnthn | cotto_work: Turns out configuring with --intval="long long" helps | 21:47 | |
21:48
benabik joined,
frhodes left,
frhodes joined
|
|||
bbkr1 | nom: my $::x = 3 # segfaults for me | 21:48 | |
p6eval | nom d97997: ( no output ) | ||
bbkr1 | nom: my $::x = 3; say "alive"; | ||
p6eval | nom d97997: ( no output ) | ||
cotto_work | jnthn: yeah. That's the workaround. | 21:49 | |
jnthn | cotto_work: Not quite sure how to update the configure probe. | ||
cotto_work | jnthn: what should it do? always use intval=long long on windows x64? | 21:50 | |
21:50
jevin left
|
|||
jnthn | cotto_work: "if it's Windows x64 on msvc, use long long" sounds like a sane starting point. | 21:50 | |
21:51
jevin joined
|
|||
cotto_work | jnthn: ok | 21:51 | |
21:53
thou joined
21:55
clairvy joined
|
|||
masak | 'night, #perl6 | 21:56 | |
21:56
clairvy left
|
|||
masak | keep it real :) | 21:56 | |
21:56
clairvy joined,
masak left,
bluescreen10 left
|
|||
dalek | osystem: 0df35d1 | (Timothy Totten)++ | META.list: Removed my old dead projects, and added WWW::App. |
21:57 | |
21:57
kfo_ joined
|
|||
flussence | .oO( keep it rat? ) |
21:57 | |
21:59
Limbic_Region joined
|
|||
cotto_work | jnthn: how does this work: nopaste.snit.ch/81313 | 22:00 | |
bbkr1 | what happened to ClassHOW type? are tickets related to it, such as rt.perl.org/rt3/Ticket/Display.html?id=73142 , still valid? | ||
cotto_work | jnthn: actually, I don' think that's sufficient | 22:01 | |
jnthn | bbkr1: It's all under Metamodel:: these days | 22:03 | |
22:03
supernovus left
|
|||
jnthn | cotto_work: Can try in a moment | 22:03 | |
cotto_work: Just getting a Rakudo build at all right now...and setting everything else up on here. | |||
(new machine) | |||
bbkr1 | jnthn: thanks, | 22:05 | |
22:06
donri left
|
|||
cotto_work | jnthn: try this one instead: nopaste.snit.ch/81314 | 22:06 | |
it's possible it'll break something | 22:07 | ||
22:08
benabik left
|
|||
jnthn | Will try when this spectest run is done :) | 22:12 | |
240 wallclock secs. Not bad. :) | 22:15 | ||
pmichaud: ^^ Who wins? ;) | |||
(spectest time) | 22:16 | ||
22:16
frhodes left
22:17
frhodes joined
|
|||
jnthn | cotto_work: For some reason the patch doesn't seem to apply. :S | 22:22 | |
22:23
Limbic_Region left
|
|||
cotto_work | jnthn: to parrot master? | 22:24 | |
jnthn | yeah | ||
not sure what's up with that, it looks like it should. | |||
cotto_work | ditto | 22:25 | |
dalek | kudo/nom: cca1166 | jnthn++ | t/spectest.data: Label a few more tests as needing ICU. |
22:27 | |
jnthn | Commit from $new-machine \o/ | 22:28 | |
tadzik | nice nice | ||
jnthn: you run spectest in 240 secs? | |||
cotto_work | jnthn: win64-workaround branch | 22:29 | |
jnthn | tadzik: yes | 22:31 | |
tadzik | jnthn: that's... quite unusual :) | ||
what kind of cpu is that beast? | |||
jnthn | Some quad core i7 :) | ||
I ran it with --jobs=4 | |||
diakopter | jnthn: try --jobs=8 | 22:32 | |
jnthn | cotto_work: Just tried the branch. Doesn't help :( | ||
cotto_work: Gives: | |||
init::hints - Load platform and local hints files...Use of uninitialized value in string eq at config/init/hints/mswin32.pm line 68. | |||
.............done. | |||
cotto_work: And then still has the INTVAL/pointer different sizes error | 22:33 | ||
diakopter: trying :) | |||
let's see if this slows things down | |||
:) | |||
no, machine still pretty responsive :) | 22:34 | ||
diakopter | heh | ||
jnthn | I wonder if it's doing HT... | ||
diakopter | run all your dev area on a ramdisk :) | 22:35 | |
jnthn | Already doing it on an SSD... :) | ||
22:35
packetkn_ joined
|
|||
jnthn | Got OS, compiler, and build all on the SSD | 22:35 | |
This seems to have the added bonus that it's *very* quiet in here now :) | |||
diakopter: Gets it down to 220. | 22:37 | ||
diakopter | hrm | ||
22:38
packetknife left
|
|||
sjohnson | perl consistently blows my mind with awesomeness every day | 22:48 | |
22:48
aloha joined
|
|||
cotto_work | jnthn: I'm pretty sure I'm not fixing this in the right place. I'll need to revisit this when I'm fresher. | 22:49 | |
22:49
packetkn_ left
|
|||
jnthn | cotto_work: OK, np. I have a workaround so I won't be blocked. | 22:53 | |
diakopter | 32-bit parrot installer? | 22:54 | |
22:57
aloha left
|
|||
jnthn | diakopter: No, one can just pass --intval="long long" to the Configure script and the build works out. | 22:58 | |
23:08
f00li5h joined
23:10
clairvy left
23:15
mattp_ left,
mattp_ joined
23:18
wamba left
23:23
tokuhirom joined,
bbkr1 left
23:24
bbkr1 joined
23:25
aloha joined
23:29
supernovus joined
|
|||
supernovus | mberends: I'm guessing HTTP::Server::Simple hasn't been ported to nom yet? | 23:30 | |
mberends | supernovus: correct, but only because of tuit shortage | 23:31 | |
supernovus | Ah, okay, I just updated my new WWW::App library so it can use either SCGI or HTTP::Server::Simple::PSGI as backends, but my attempt to test with the latter led me to the conclusion that it wasn't working in nom :-) | 23:32 | |
tadzik | mberends: may be Buf shortage as well :) | ||
mberends | tadzik: ouch! | 23:34 | |
tadzik | yeah, sometimes we have no bufs :) | 23:35 | |
jnthn | OK, seems I've got my dev environment on my shiny new hardware ready to go. :) | 23:36 | |
mberends | there is a round buf somewhere in fifo implementations :) | ||
jnthn | Too bad it's time to sleep now rather than hack... | ||
jnthn rests...on-site $dayjob during the day, but should get some Rakudo time in the evening, and I've got all day Thursday for it too :) | 23:38 | ||
night all o/ | |||
tadzik | 'night! | 23:39 | |
I should 'night too | |||
TimToady | mikemol: response to paddy at rosettacode.org/mw/index.php?title=...did=120438 | 23:40 | |
supernovus | I'm going to call it a night as well. WWW::App using SCGI is ready for action when IO::Socket::INET flushes its buffers, and will work with HTTP::Server::Simple::PSGI once that's running under nom. It should (not tested) work fine with both under the "ng" branch right now, in case anyone is still running that branch (and wants to write web apps for it?) | 23:44 | |
23:46
molaf_ joined
23:49
molaf left
23:52
whiteknight joined
23:55
packetknife joined
23:56
abercrombie joined
23:58
Chillance left
|