»ö« 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:07
thou left
00:10
yertalert joined
00:25
pjcj left
|
|||
dalek | osystem: e28fb6a | (Solomon Foster)++ | META.list: Add Math::ContinuedFractions. |
00:33 | |
00:33
pjcj joined
|
|||
timotimo | what's the shortest/prettiest way for this: multi fib(Int $x where * < 0) { die "negative numbers not allowed"; } ? | 00:51 | |
00:51
aindilis joined
|
|||
sorear | Use a subset type and let the dispatcher error for you | 00:52 | |
timotimo | when i did that, the dispatching failed, because now the normal implementation and the memoized function became "equally special" to the dispatcher | ||
or something | |||
(and the error message wasn't pretty. it just said Cannot call 'fib'; none of these signatures match: :(Int $x) :(Int $x) | 00:53 | ||
japhb | timotimo, try not putting a where clause on the error case, just on the success cases. Then the error case is more general, and would only match when the other ones don't. Er, I would think. | ||
timotimo | yeah, now i get "these signatures all match" | 00:54 | |
i have subset Positive of Int and subset InMemo of Positive | 00:55 | ||
japhb | timotimo, hmmm. How about making the failure case: multi fib($) { die "Non-negative integers only, please." } | 00:56 | |
timotimo | i did that now, yes | ||
but now the distinction between "normal positive int" and "int that's also in my memo" | |||
here, let me show the code | |||
japhb | timotimo, gist it | 00:57 | |
timotimo | gist.github.com/1932925 | ||
01:00
Vespakoen joined
|
|||
japhb | Ah, I see, as soon as the first fib routine works its way back to the memoized numbers, then boom. | 01:01 | |
01:01
FACEFOX left
|
|||
timotimo | yup | 01:02 | |
01:02
Timbus|Away joined,
Timbus left,
Timbus|Away is now known as Timbus
|
|||
japhb | Hmmm, it certainly *intuitively* seems that your program should DWIM, but I'm not sure if it's specced that way. | 01:03 | |
01:03
FACEFOX joined
|
|||
timotimo | heh. | 01:03 | |
it would need to be in the spec, that a restriction on a subset is less specific than a restriction on a subset of that same subset | |||
01:04
integral left,
integral joined,
integral left,
integral joined
|
|||
colomon | Yeah, I'd be surprised if that ever worked | 01:04 | |
timotimo | so, how is it fixed? | 01:05 | |
one way is to put the error case first, so that it would match immediately | |||
01:06
envi_ left
|
|||
japhb is still searching the specs | 01:07 | ||
timotimo | i also put a die unless into fib(Int $x), but that's pretty ugly | 01:08 | |
japhb | Hmmm, S06:2389-2409 seems to indicate subsets get flattened away when building the signature objects | 01:09 | |
timotimo | how about the Positive subset + an extra where clause to match InMemo | 01:10 | |
01:12
scott__ joined
01:14
lumi__ left,
lumi__ joined
|
|||
japhb | Bah. | 01:15 | |
Yeah, S12:1140 and following confirm it, especially the paragraph at 1163-1169. | 01:16 | ||
The fact that there *are* constraints matters. *How many* constraints is not considered. | |||
I argue that that breaks POLA when it comes to subsets though: the reality leaks through the sugar a little too strongly. | 01:17 | ||
colomon | I'm inclined to think it's just asking too much of the multi dispatch. | ||
though note that memoization should be built-in with "is cached" (though as far as I know it's not yet) | 01:18 | ||
01:19
sudokode left
|
|||
japhb | re: 'is cached', sure. But I'm just seeing his code as an example of subset usage, without regard to his implementation of memoization. | 01:20 | |
colomon | gist.github.com/2026007 (does away with multi dispatch) | 01:21 | |
01:21
sudokode joined
|
|||
japhb | Oooh, S12:1214-1222. So perhaps this is just a nom bug? | 01:23 | |
colomon | gist.github.com/2026007 (now with second script, super-short and efficient) | ||
japhb chuckles | 01:24 | ||
colomon | japhb++ | ||
I think you're right that this is a nom bug | |||
which immediately leads to the question... | 01:25 | ||
niecza: gist.github.com/1932925 | |||
p6eval | niecza v15-4-g1f35f89: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/RbkGEJymsa line 17:------> multi fib(Int ⏏$x) {Usage: /tmp/RbkGEJymsa <fib>» | ||
japhb | Need to be able to do args for gist eval | ||
And ... | 01:26 | ||
benabik | If it runs equally constrained versions in order declared, then it would never reach the `fib(InMemo $x)` multi | ||
japhb | Given S12:1214-1222, the candidates should appear in the source in the opposite order they are now. | ||
exactly. | |||
And the failing case should be 'multi fib($) {...} | 01:27 | ||
colomon | ------> multi fib(Int ⏏$x) { | ||
Unhandled exception: non-negative arguments required | |||
bah, reversing the mutlis doesn't help. :( | 01:28 | ||
japhb | S12:1214-1222 does have the interesting effect of requiring that information about order of declaration of multis be saved into compiled modules, so that when the module is imported, the multis can be folded into the declaration order list properly. | 01:30 | |
01:31
havenn left
|
|||
japhb | Hmmm ... but then how does that interact with the scoping rule of Tiebreaker A (S12:1202-1204) | 01:31 | |
What is the relative scope of an imported module for this purpose? | 01:32 | ||
01:32
havenn_ joined
|
|||
japhb | phenny, ask jnthn Does Rakudo constant-fold bit math on integer constants? Which is to say, can I assume that +|'ed together bit flag constants will turn into a single bitmask in the compiler output? | 01:38 | |
phenny | japhb: I'll pass that on when jnthn is around. | ||
01:38
leprevost joined
01:42
havenn_ left
01:51
araujo left
01:54
isBEKaml left
02:00
whiteknight left
02:02
araujo joined
02:04
Vespakoen left,
Vespakoen joined
02:12
pernatiy left
02:19
skyheights joined
02:24
Vespakoen left,
Vespakoen joined
02:28
benabik left
02:29
araujo left,
benabik joined
02:31
pernatiy joined
02:35
Vespakoen left,
araujo joined,
araujo left,
araujo joined
02:39
gilm left
02:41
skyheights left
02:42
att joined,
att is now known as att_
03:06
orafu left
03:08
orafu joined
03:10
brxue left
03:30
pochi left
03:31
lestrrat left,
lestrrat joined
03:34
leprevost left
03:37
NamelessTee left
03:38
sftp left
04:02
FACEFOX left,
FACEFOX joined
04:17
skids left
04:20
japhb left
04:21
jaldhar joined
04:24
lestrrat left
04:26
lestrrat joined,
japhb joined
04:32
envi_ joined
04:45
nnunley left
05:05
nnunley joined
05:19
kaleem joined,
yertalert left
05:22
tyatpi left
05:33
thou joined,
nnunley left
05:35
nnunley joined
05:37
envi_ left
05:47
imarcusthis left
05:48
imarcusthis joined
05:59
mucker joined
06:00
localhost left
06:01
localhost joined
|
|||
moritz | seems it doesn't :( | 06:08 | |
well, if you write constant a = 1 +| 4 then it's constant folded | 06:09 | ||
06:09
scott___ joined
06:10
scott__ left
|
|||
moritz | but a simple my $foobar = 1 +| 4; doesn't constant-fold it | 06:10 | |
though it inlines the +| operator | |||
06:14
NamelessTee joined
06:15
imarcusthis left
06:17
imarcusthis joined
06:24
birdwindupbird joined
06:26
rsimoes1 joined
06:30
rsimoes1 left
06:33
aindilis left,
rsimoes1 joined
06:34
[particle]1 joined
06:35
buubot_backup left,
_ilbot left
06:36
[particle] left,
buubot_backup joined,
_ilbot joined,
rsimoes left,
gfldex left,
TimToady left,
gfldex joined
06:37
NamelessTee left,
FACEFOX left,
REPLeffect left,
colomon left,
krunen left,
adnauseam left,
ranguard_ left,
PZt left,
ranguard joined,
thou left,
Trashlord left,
apejens left,
krunen joined
06:38
mathw left,
adnauseam joined,
mathw joined
06:39
apejens joined
06:40
mucker left
06:42
FACEFOX joined
06:43
thou joined
06:44
TimToady joined
06:50
NamelessTee joined
06:52
rsimoes joined
06:56
FACEFOX left
06:57
wtw joined,
NamelessTee left
07:00
FACEFOX joined
07:05
thou left
07:12
FACEFOX left
07:19
agentzh joined
|
|||
jnthn | good mornin' | 07:26 | |
phenny | jnthn: 01:38Z <japhb> ask jnthn Does Rakudo constant-fold bit math on integer constants? Which is to say, can I assume that +|'ed together bit flag constants will turn into a single bitmask in the compiler output? | ||
07:26
preflex left,
preflex_ joined
|
|||
jnthn | phenny: tell japhb not yet *but* the bs branch landing was the blocker for that and I already have some constant folding code, just not wired up yet. So you can expect it to be in place soon. | 07:26 | |
phenny | jnthn: I'll pass that on when japhb is around. | ||
07:27
preflex_ is now known as preflex
|
|||
tadzik | hello #perl6 | 07:31 | |
moritz | \o tadzik, jnthn | 07:32 | |
at least the call is inlined | |||
jnthn | moritz: true | ||
But really the answer should be. :) | 07:33 | ||
Currently that needs explicit use of the constant syntax though | |||
moritz | why are all those WHAT ( PIROP perl6_box_int__PI ( ... things on the string heap? | 07:34 | |
erm, s/WHAT/WANT/ | |||
sorear | o/ tadzik , jnthn , moritz | ||
tadzik | hi sorear | 07:35 | |
jnthn | moritz: Inlining info | ||
moritz | jnthn: ok | ||
jnthn | moritz: the inliner currently encodes some ASTs to a little DLS because we can't serialize PAST | ||
Soon we'll have QAST and that will be 6model based and then we'll be able to serialize it though | 07:36 | ||
o/ sorear | |||
moritz: That said, the string heap certainly contains some stuff that bothers me | |||
Like, the reference to Perl6::Compiler | |||
Somewhere, somehow, the serializer is finding things it probably should not. | 07:37 | ||
07:37
FACEFOX joined
|
|||
moritz commutes | 07:38 | ||
07:38
FACEFOX left
07:42
FACEFOX joined
08:01
lestrrat left
08:02
drbean left,
lestrrat joined
08:03
FACEFOX left,
FACEFOX joined
08:08
drbean joined
08:12
alim joined
08:19
icwiener joined
|
|||
moritz | www.perlmonks.org/?node_id=959260 that was a fun p5 question to answer, though not hard | 08:21 | |
the p6 solution looks mostly the same | |||
though of course there's a different, cute way in Perl 6 | 08:24 | ||
r: gist.github.com/2027585 | 08:25 | ||
p6eval | rakudo bd6742: OUTPUT«6» | ||
moritz | n: gist.github.com/2027585 | ||
p6eval | niecza v15-4-g1f35f89: OUTPUT«Unhandled exception: Excess arguments to Cool.match, unused named g at /home/p6eval/niecza/lib/CORE.setting line 0 (Cool.match @ 1)  at /tmp/hF6B9e70pe line 9 (mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3)  at /home/p6e… | ||
moritz | p: gist.github.com/2027585 | ||
p6eval | pugs b927740: OUTPUT«***  Unexpected "0" expecting operator or ")" at /tmp/gnQD2DWDb7 line 14, column 34» | ||
moritz | ah, pugs doesn't like the series operator | 08:26 | |
08:30
mj41 joined
08:32
tyatpi joined
08:37
birdwindupbird left
08:38
Trashlord joined
08:42
icwiener left,
icwiener joined,
icwiener left,
icwiener joined
08:45
birdwindupbird joined
08:49
sisar joined,
alim left
08:55
icwiener left
09:08
stepnem left
09:09
stepnem joined
|
|||
eiro | hello there | 09:09 | |
jnthn | o/ eiro | 09:10 | |
moritz | \o * | 09:11 | |
09:18
FACEFOX left,
FACEFOX joined
09:36
alim joined
09:38
Vespakoen joined,
Vespakoen left,
dakkar joined
09:40
lestrrat left
09:41
lestrrat joined
|
|||
dalek | ast: 1faa73d | moritz++ | S03-operators/value_equivalence.t: test lexical roles and === |
09:44 | |
cognominal | perl6: say "$_: " ~ (try { say $_; eval $_ }).WHAT.perl for < [] {} () \() :() [] !@@% > | 09:45 | |
p6eval | niecza v15-4-g1f35f89: OUTPUT«[][]: Array{}{}: Hash()(): Parcel\()\(): Capture:():(): Any[][]: Array!@@%!@@%: Any» | ||
..pugs b927740: OUTPUT«pugs: Missing required parameters: $_» | |||
..rakudo bd6742: OUTPUT«Any()[]: X::AdHocAny(){}: X::AdHocAny()(): X::AdHocAny()\(): X::AdHocAny():(): X::AdHocAny()[]: X::AdHocAny()!@@%: X::AdHoc» | |||
moritz | rakudo: say WHAT eval '[]' | 09:47 | |
p6eval | rakudo bd6742: OUTPUT«Array()» | ||
moritz | rakudo: say WHAT eval $_ for < [] {} > | ||
p6eval | rakudo bd6742: OUTPUT«Array()Hash()» | ||
moritz | rakudo: say WHAT eval $_ for < [] {} \() () > | ||
p6eval | rakudo bd6742: OUTPUT«Array()Hash()Capture()Parcel()» | ||
moritz | rakudo: say WHAT eval $_ for < [] {} \() () :()> | 09:48 | |
p6eval | rakudo bd6742: OUTPUT«Array()Hash()Capture()Parcel()Signature()» | ||
cognominal | moritz: thx for trying to golf it :) | ||
jnthn | r: say "$_" for 1..2; | 09:49 | |
p6eval | rakudo bd6742: OUTPUT«12» | ||
moritz | rakudo: say WHAT try eval $_ for < [] {} \() () :()> | ||
p6eval | rakudo bd6742: OUTPUT«List()» | ||
jnthn | r: say "{$_}" for 1..2; | ||
p6eval | rakudo bd6742: OUTPUT«12» | ||
cognominal | nom: < [] {} () \() :() [] !@@% >.map: { say "$_: " ~ (try { eval $_ }).WHAT.perl } | ||
p6eval | rakudo bd6742: ( no output ) | ||
moritz | so, the try seems to make the difference | ||
09:49
simcop2387 left,
overrosy left,
ruoso left,
takesako left,
sirhc left
|
|||
moritz | rakudo: say try eval $_ for < [] {} \() () :()> | 09:49 | |
p6eval | rakudo bd6742: OUTPUT« Signature<-1765137524978402461>» | ||
moritz | rakudo: say try { eval $_ } for < [] {} \() () :()> | 09:50 | |
cognominal | the .map form works correctly | ||
p6eval | rakudo bd6742: OUTPUT«Nominal type check failed for parameter '$code'; expected Str but got Any instead in sub eval at src/gen/CORE.setting:442 in block <anon> at /tmp/qrm9UcCSFz:1Nominal type check failed for parameter '$code'; expected Str but got Any instead in sub eval at sr… | ||
cognominal | rakudo: < [] {} () \() :() [] !@@% >.map: { say "$_: " ~ (try { eval $_ }).WHAT.perl } | ||
p6eval | rakudo bd6742: ( no output ) | ||
moritz | does try mess with $_ ? | ||
cognominal | hum. | ||
moritz | nom: try { say $_ } for <1 b> | ||
p6eval | rakudo bd6742: OUTPUT«Any()Any()» | ||
jnthn | Don't think so | ||
cognominal | not that one | ||
moritz thinks so | |||
jnthn | nom: do { say $_ } for <1 b> | 09:51 | |
p6eval | rakudo bd6742: OUTPUT«===SORRY!===Unsupported use of do...for; in Perl 6 please use repeat...forat /tmp/Gdrlr5w4iq:1» | ||
jnthn | nom: blah { say $_ } for <1 b>; sub blah($c) { $c() } | ||
p6eval | rakudo bd6742: OUTPUT«1b» | ||
jnthn | Hmm, does seem hard to find a non-try case. | ||
Still don't see why it should be special though | |||
moritz | nom: for <1 b> { try { say $_ } } | 09:52 | |
p6eval | rakudo bd6742: OUTPUT«1b» | ||
moritz | so, only in the statement modifying case | ||
moritz submits rakudobug | |||
n: try { say $_ } for <1 2> | 09:53 | ||
p6eval | niecza v15-4-g1f35f89: OUTPUT«12» | ||
moritz | n: try say $_ for <1 2> | ||
p6eval | niecza v15-4-g1f35f89: OUTPUT«12» | ||
moritz | r: try say $_ for <1 2> | ||
p6eval | rakudo bd6742: OUTPUT«12» | ||
moritz | r: try { say $_ } for <1 2> | ||
p6eval | rakudo bd6742: OUTPUT«Any()Any()» | ||
09:53
FACEFOX left
|
|||
moritz | ok, only the block case | 09:53 | |
jnthn | I'm sure there's another ticket a bit like thsi but not the same | 09:54 | |
moritz | well, at least we have it golfed quite a bit | ||
jnthn | aye | 09:55 | |
moritz | r: try { say $_ } given 2 | ||
p6eval | rakudo bd6742: OUTPUT«Any()» | ||
09:55
simcop2387 joined,
overrosy joined,
ruoso joined,
takesako joined,
sirhc joined
|
|||
jnthn | I think it's to do with nested blocks plus statement modifiers | 09:55 | |
moritz | sounds about right | ||
cognominal | yes, I think so | ||
09:56
FACEFOX joined
|
|||
jnthn | It's a pain to handle. | 09:56 | |
The blocks get attached to the outer they are actually written in | |||
moritz | but need to get the $_ from the contextualizer, not from the block | ||
jnthn | But then the statement modifier forces a block to be later generated that has to go "around" them | ||
And we dont' know about it until too late. | |||
So it needs special casing. | |||
moritz | submitted as [perl #111704] | 09:57 | |
jnthn | And every way I think of to fix this issue feels like a hack :/ | ||
moritz | sounds like the codegen of the statement needs to be defered until the statement modifier has done its magic | 09:59 | |
09:59
sporous left
|
|||
moritz | or... something :/ | 09:59 | |
10:01
FACEFOX left
|
|||
dalek | ast: c070484 | moritz++ | S04-statements/try.t: test for RT #111704, try-blocks plus statement modifiers gobble up $_ |
10:01 | |
10:02
FACEFOX joined,
FACEFOX left,
Guest80268 joined
|
|||
cognominal | perl6: perl 1 | 10:03 | |
p6eval | pugs b927740: ( no output ) | ||
..niecza v15-4-g1f35f89: OUTPUT«===SORRY!===Undeclared routine: 'perl' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1362 (die @ 3)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33)  at /home… | |||
..rakudo bd6742: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&perl' called (line 1)» | |||
cognominal | perl6: gist 1 | ||
p6eval | pugs b927740: OUTPUT«*** No such subroutine: "&gist" at /tmp/zAgis9XNb0 line 1, column 1 - line 2, column 1» | ||
..rakudo bd6742, niecza v15-4-g1f35f89: ( no output ) | |||
10:03
Trashlord left
10:04
FACEFOX joined
10:12
kaleem left
10:15
envi_ joined,
ab5tract joined
10:16
scott___ left
10:24
colomon joined
10:29
pernatiy left
10:33
xinming left,
sisar left
10:35
xinming joined
10:41
PZt joined
|
|||
masak | www.perlmonks.org/?node_id=959260 -- "I would be so grateful! -- Pics? ;)" -- I'm thinking of acquiring a sexism gag reflex, like the one sorear has. :( | 10:41 | |
oh, hai, #perl6 | |||
moritz | masak: yes, that part annoyed me too | 10:42 | |
oh hai masak | |||
10:42
benabik left
|
|||
huf | did that seriously happen?! | 10:42 | |
colomon | o/ | ||
huf | sweet jesus | ||
tadzik | :) | 10:43 | |
masak | I'm glad it's not just me. | 10:45 | |
10:48
daxim joined
10:50
xinming left
|
|||
masak replied: www.perlmonks.org/?node_id=959264 | 10:51 | ||
moritz | fwiw I've considered that node for editing (you need a minimum XP level to vote on the consideration) | ||
colomon | masak++ | 10:52 | |
moritz | masak++ | ||
10:52
Trashlord joined
|
|||
masak | thank you. still made me sad, though. :( | 10:53 | |
on a brighter note, japhb++ found a buglet in gist.github.com/2021108 | 10:54 | ||
tadzik | I'm wondering if you don't it too seriously though | ||
moritz | well, nobody ever writes such a comment in response to a man | 10:55 | |
tadzik | that's true | ||
moritz | and treating men and women differently is the first step to alienating women | ||
10:56
xinming joined
|
|||
masak | tadzik: the comment implies that katarinahm should express her gratitude to the replier by sending him pictures. | 10:58 | |
tadzik | well, right | 10:59 | |
masak | tadzik: (1) what moritz said. (2) expressing the idea, even as a joke, means we somehow don't accept women as first-class citizens. | ||
arnsholt | It's just in bad taste, IMO | ||
masak | yeah, basically. | ||
11:05
xinming left
|
|||
masak | the polarisation between "you're reading too much into it" and "well, consider what this means" seems fundamental to almost any debate on sexism in the programming communities. | 11:06 | |
11:06
xinming joined
|
|||
eiro | tadzik, ack. | 11:06 | |
masak, jnthn, tadzik: i asked cognominal to create a repo "perl6 course" and add us at contributors | 11:07 | ||
11:08
odoacre left
|
|||
moritz | shouldn't we just make one in the perl6 organization? | 11:08 | |
and give everyone who wants commit access, just like with roast, the websites etc. | |||
eiro | moritz, you tell me :) you guys decide something and i just follow you | 11:09 | |
cognominal | eiro: it is not yet in the repo, but as a gist. gist.github.com/2028115 | 11:10 | |
eiro | cognominal, can a gist become a repo ? can i clone ? branch ? | ||
moritz | yes, it can, though with some command line involvement | 11:11 | |
11:12
aindilis joined
11:13
rsimoes1 left,
lestrrat left
|
|||
eiro | bbl | 11:14 | |
11:14
lestrrat joined
|
|||
moritz | now at github.com/perl6/course | 11:14 | |
tadzik | eiro: course? | ||
eiro | moritz, thx | 11:15 | |
arnsholt | Oooh, French Perl | ||
eiro | tadzik, yep! it's a complete training session we're planning. | ||
really have to go! bbl | |||
arnsholt, yup :) | |||
arnsholt | I should read it, if nothing else to brush up on my French =D | ||
tadzik | oh nice | 11:16 | |
cognominal | beware, it is still raw. there are a lot of typos. That's why it was a gist and not yet a depot. | ||
moritz | commit early, repo often :-) | 11:17 | |
arnsholt | cognominal: Don't worry. It's been so long since I read any French that I probably won't notice any typos =) | ||
moritz | one thing we can do is set up some perl 6 examples by category, and those can be shared between different courses | 11:18 | |
like, examples for classes, roles, regexes, ... | |||
cognominal | maintenant, je me re_pose_ un peu. I will pause a bit and get a lunch. | 11:19 | |
11:23
bruges_ is now known as bruges,
bruges left,
odoacre joined
|
|||
lumi__ | Is there a useful way for me to run spectests nightly? | 11:24 | |
moritz | lumi__: you mean, if there's an automatic smoker client? or a good way to submit the results? or if it's useful for us at all? | 11:27 | |
11:27
bruges joined
|
|||
lumi__ | More or less any of these | 11:28 | |
moritz | yes, would be useful | ||
11:28
NamelessTee joined
|
|||
moritz | you can run 'make spectest_smolder' to submit the reports | 11:28 | |
and you'll probably need to write your own cron script | |||
lumi__ | moritz: Thanks, exactly what I needed :) I'll set it up | 11:30 | |
11:33
pmurias joined
11:38
benabik joined
11:43
grondilu joined,
grondilu left
11:47
grondilu joined
|
|||
grondilu | nom: macro talk($s) { quasi { say {{{{$s}}}} } }; talk "hello"; | 11:48 | |
p6eval | rakudo bd6742: OUTPUT«Block.new()» | ||
11:48
mdupont joined
|
|||
grondilu | pugs: macro talk($s) { quasi { say {{{{$s}}}} } }; talk "hello"; | 11:48 | |
p6eval | pugs b927740: OUTPUT«<SubBlock(<anon>)>» | ||
grondilu | pugs: macro talk($s) { quasi { say {{{$s}}} } }; talk "hello"; | ||
p6eval | pugs b927740: OUTPUT«<SubBlock(<anon>)>» | ||
grondilu | is it too early for these stuffs? | ||
jnthn | Yes | 11:49 | |
The quasi interpolation ain't impl yet | 11:50 | ||
(the {{{$s | |||
}}} bit) | |||
grondilu | ok | ||
mikec wonders what that does | |||
grondilu | do you guys know about wikicreole? They have a EBNF grammar that I'd love to see implemented in perl6: www.riehle.org/2008/01/09/an-ebnf-g...creole-10/ | 11:51 | |
jnthn | mikec: Lets one chunk of AST be embedded within another | 11:52 | |
12:04
mtk joined
|
|||
cognominal | moritz, do I have the proper rights to push to github.com/perl6/course? I got a 403. | 12:09 | |
I should learn more about github depot adminstration. | 12:10 | ||
jnthn | depot? :) | 12:13 | |
cognominal | repository | ||
jnthn | :) | ||
cognominal | or dépôt | 12:14 | |
…which should not be a dépotoir (dumping ground). | 12:15 | ||
12:15
sporous joined
|
|||
moritz | cognominal: well, you need to use the ssh URL | 12:24 | |
cognominal: ... and I've added you to the perl6 group, so now you should have commit access | 12:25 | ||
wow, did you never ever patch roast or the specs or so? | |||
12:26
PacoAir joined
|
|||
moritz | hugme: add eiro to perl6 | 12:26 | |
hugme | moritz: You need to register with freenode first | ||
moritz | hugme: add eiro to perl6 | 12:27 | |
hugme hugs eiro. Welcome to the perl6 github organization | |||
moritz | anyone else missing? | ||
cognominal is looking french people with an interest in Perl 6 and a github account : maddingue, book, dams, franckcuny, fperrad | 12:34 | ||
grondilu is french, has a github account, but is not a good perl6 programmer yet :( | 12:37 | ||
benabik | He did say interest in Perl 6, not proficiency in. | ||
moritz | hugme: add grondilu to perl6 | ||
hugme hugs grondilu. Welcome to the perl6 github organization | |||
grondilu | :) | ||
moritz | resistance is futile. You have been assimilated :-) | 12:38 | |
12:38
alim left
|
|||
cognominal | sorry grondilu to have forgotten you. | 12:38 | |
grondilu | check out my offline wikipedia implementation using perl5: www.perlmonks.org/?node_id=958466 It works but Text::Mediawiki's rendering kind of sucks. I'm pretty sure a Perl6 grammar could help parsing the wiki markup. Thus my remark about wikicreole. Any help welcome. | 12:42 | |
12:43
sporous left,
sporous joined
|
|||
dalek | p/b64-lookup-table: 1859ad1 | moritz++ | src/6model/base64.c: base64 decoding now uses a lookup table, not repeated branching |
12:44 | |
moritz | phenny: tell jnthn at your convenience, please profile the nqp/b64-lookup-table branch to see if it has made any difference. My own experiments with rakudo startup time remain inconclusive | ||
phenny | moritz: I'll pass that on when jnthn is around. | ||
12:44
tokuhiro_ joined
12:45
preflex left,
preflex_ joined
|
|||
masak | it's hard to tell if one Anonymous Monk is infix:<===> to another, but www.perlmonks.org/?node_id=959296 was perhaps not entirely unexpected. basically a nonsensical reply. as for me, I'm not digging further down that thread. | 12:45 | |
12:46
preflex_ is now known as preflex,
NamelessTee left
|
|||
moritz | I've just downvoted and otherwise ignored it | 12:47 | |
masak | good. | ||
12:56
sisar joined
12:57
Chillance joined
13:13
[particle] joined
13:15
[particle]1 left
|
|||
au | grondilu: I've been working at $job on www.mediawiki.org/wiki/Parsoid#Getting_started -- the core pegTokenizer.pegjs.txt is written in PEG.js pegjs.majda.cz/documentation and perhaps a PEGjs->Perl6Rules translator would be useful | 13:19 | |
or PEGjs<->Perl6Rules, even. | 13:20 | ||
grondilu checks this out | 13:22 | ||
13:25
drbean left
13:27
drbean joined
|
|||
masak | nice, simple syntax. | 13:32 | |
also, an interesting way to inline actions into grammar. | |||
13:33
Vespakoen joined
|
|||
grondilu | au: I installed npm on my sid machine but it doesn't seem to work :( Isn't there a tar ball for the whole thing instead? | 13:33 | |
au | npm 1.0+? | 13:34 | |
also, if "it doesn't seem to work" means "it fails hundreds of tests on 'make test'", then it's quite normal :) | 13:35 | ||
grondilu | no, even a simple "npm -v" throws an exception | 13:36 | |
au | grondilu: no tarballs atm afaik; you might want to install nodejs.org/dist/v0.6.12/node-v0.6.12.tar.gz from source to get npm working; then it should be possible to checkout only the svn.wikimedia.org/svnroot/mediawiki...ualEditor/ part and "cd tests/parser ; make test". | ||
(feel free to continue this conversation at #wikimedia-dev) | 13:37 | ||
grondilu | ok | 13:38 | |
13:39
pernatiy joined
13:40
skids joined
|
|||
moritz | phenny: tell jnthn MiniDBI fails to build on newest rakudo: 'Missing serialize REPR function'. Do the NCI stuff needs to be update to deal with bs? | 13:48 | |
phenny | moritz: I'll pass that on when jnthn is around. | ||
jnthn | moritz: sounds lajk yes :) | ||
phenny | jnthn: 12:44Z <moritz> tell jnthn at your convenience, please profile the nqp/b64-lookup-table branch to see if it has made any difference. My own experiments with rakudo startup time remain inconclusive | ||
jnthn: 13:48Z <moritz> tell jnthn MiniDBI fails to build on newest rakudo: 'Missing serialize REPR function'. Do the NCI stuff needs to be update to deal with bs? | |||
jnthn | Guess we ain't lucky enough to know which REPR was missing it.... | 13:49 | |
Hmm. I didn't think that would happen. | |||
oh, wait...I know. | |||
Though can't fix here... | 13:50 | ||
13:50
aindilis left
13:52
aindilis joined
|
|||
moritz | no hurry | 13:53 | |
flussence | seems to be just MiniDBI, my NativeCall-using code seems to work | 13:59 | |
(then again I'm not doing anything particularly exciting in it...) | |||
moritz | flussence: well, 'make' in MiniDBI precompiles stuff | ||
flussence | oh, that'd be why :) | ||
jnthn | It'll just show up in precomp | ||
moritz | without precomp... | 14:01 | |
ok 2 - MiniDBD::mysql version 0.01 | |||
Segmentation fault | |||
felher | After i had a problem with a program i golfed down the issue for quite some time. But i don't get why the two golfed-down one-liners produce different output: | 14:04 | |
@g.push(3); | |||
my @g = @g => 'x'; | |||
@g. | |||
... | |||
nom: my $x; my @a = 1,2; $x = Array.new(@a) => 'x'; $x.key[0]; @a.pop(); say $x; | |||
p6eval | rakudo bd6742: OUTPUT«[1, 2] => "x"» | ||
felher | nom: my $x; my @a = 1,2; $x = Array.new(@a) => 'x'; @a.pop(); say $x; | 14:05 | |
p6eval | rakudo bd6742: OUTPUT«[1] => "x"» | ||
felher | Might this be a bug? | ||
moritz | the difference is just the $x.key[0]; in sink context, right? | ||
felher | moritz: yes | 14:06 | |
flussence | nom: my $x; my @a = 1,2; $x = Array.new(@a) => 'x'; $x.key[0]; say $x; | ||
p6eval | rakudo bd6742: OUTPUT«[1, 2] => "x"» | ||
moritz | probably is a bug, yes | ||
felher | Ah, okay. This was quite funny to debug, since everytime i added debugging-output everything worked (because i printed it). And everytime i deleted the print statements for debugging it failed again :) | 14:08 | |
colomon is really happy with the next stage of the continued fractions project... | 14:10 | ||
masak | felher++ # nice golf! | ||
felher: should I submit it? | 14:11 | ||
felher | masak: sure. Press your "masak submits rakudobug"-Button. | ||
masak submits rakudobug | |||
felher | masak: you do have that button, don't you? | ||
masak smiles mysteriously | 14:12 | ||
felher | :D | ||
moritz smiles too | |||
jnthn | moritz: Hm. I only tested the mysql thing on Windows. :) | 14:15 | |
moritz: Can I have a stacktrace? | |||
moritz | jnthn: gist.github.com/2029048 | 14:17 | |
jnthn | wtf... | 14:18 | |
moritz | that's a good comment. | 14:19 | |
jnthn | Innevitably heap corruption of soem kind. | ||
*some | |||
I guess many things allocate out of Parrot pools, but bigint and NCI do with malloc | 14:20 | ||
masak | nom: my @a = 1,2; my $x = [@a] => 'x'; $x.key[0]; @a.pop(); say $x; | 14:22 | |
p6eval | rakudo bd6742: OUTPUT«[1, 2] => "x"» | ||
masak | nom: my @a = 1,2; my $x = [@a] => 'x'; @a.pop(); say $x; | ||
p6eval | rakudo bd6742: OUTPUT«[1, 2] => "x"» | ||
masak | oh, 'course. | ||
moritz | nom: my @a = 1,2; my $x = @a => 'x'; @a.pop(); say $x; | 14:23 | |
p6eval | rakudo bd6742: OUTPUT«[1] => "x"» | ||
moritz | that part seems to make sense | ||
jnthn | That bit looks right. | ||
masak | aye. | ||
nom: my @a = 1,2; my $x = @a => 'x'; $x.key[0]; @a.pop(); say $x; | 14:24 | ||
p6eval | rakudo bd6742: OUTPUT«[1] => "x"» | ||
masak | so Array.new is a necessary component of it all. | ||
jnthn | ah | ||
I guess Array.new probably ain't exercised a great deal | 14:25 | ||
moritz | aye | ||
14:25
pernatiy left
|
|||
moritz | and it's probably written by me, in a rather naive way | 14:25 | |
14:25
pernatiy joined
|
|||
jnthn | nom: say Array.new(1,2,3).WHAT | 14:26 | |
p6eval | rakudo bd6742: OUTPUT«Array()» | ||
14:27
tyatpi left
|
|||
jnthn wonders if Array.new can't just be written method new(*@a) { @a } | 14:27 | ||
Well, besides subclassing... | |||
But the current implementation gets that wrong too anyway | 14:28 | ||
oh | |||
no, it doesn't... | |||
But it looks like it may well be doing soemthing too shallow | |||
14:29
tokuhiro_ left
14:30
kaleem joined
14:48
att_ left
14:51
envi_ left
14:57
tokuhiro_ joined
15:05
plutoid joined
15:07
mj41 left
15:12
JimmyZ joined,
JimmyZ left
15:23
mj41 joined
15:27
colomon left
15:32
sftp joined
15:35
grondilu left,
tokuhiro_ left
15:37
plutoid left
|
|||
masak | std: sub foo($0) {} | 15:38 | |
p6eval | std 1ad3292: OUTPUT«===SORRY!===Cannot declare a numeric parameter at /tmp/G65mBZ4rAk line 1:------> sub foo($0⏏) {}Parse failedFAILED 00:01 109m» | ||
jnthn | nom: sub foo($0) {} | ||
p6eval | rakudo bd6742: OUTPUT«===SORRY!===Cannot declare a numeric variableat /tmp/36eFpJi7Yr:1» | ||
jnthn | Close E. Nuff | 15:39 | |
masak | :D | ||
moritz | nom: try eval 'sub foo($0) { }'; say $!.perl | ||
p6eval | rakudo bd6742: OUTPUT«X::Syntax::Variable::Numeric.new(what => "parameter", filename => "eval_0", line => 1, column => Any)» | ||
jnthn | oh wow, the exception info even knows it's a parameter | 15:40 | |
moritz++ | |||
moritz | now it should also say so :-) | ||
jnthn | Probably just tweaking method message to get to what STD has | ||
moritz | aye | ||
mikec | wow, that's cool | ||
moritz compiles a fix | 15:41 | ||
one thing I want to add soonish is the context | |||
we might not get it as accurately as STD, but should still be better than nothing | 15:42 | ||
jnthn | "the context"? | 15:43 | |
15:43
wtw left
|
|||
moritz | the surrouding text from the parse | 15:44 | |
jnthn | aha | ||
moritz | "context" is a totally overloaded word in here :-) | ||
masak .oO( its meaning depends on a lot of things surrounding its use ) | 15:45 | ||
15:46
Patterner left
|
|||
jnthn should start using www.contexteditor.org/ just to make things worse :P | 15:47 | ||
15:47
colomon joined
|
|||
dalek | kudo/nom: fee8919 | moritz++ | src/core/Exception.pm: awesomize error message for numeric parameters |
15:47 | |
15:50
agentzh left
15:56
bluescreen10 joined,
sftp_ joined
15:57
sftp left
16:00
att joined
16:01
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
masak | I believe I have what is the final word in the search for an even-distribution balanced string generator. | 16:05 | |
r: sub c { state @c = 1; return @c[$^n] if @c > $n; 2 * (2 * $n - 1) / ($n + 1) * c($n - 1) }; sub b($l) { return "[]" x $l if $l < 2; my $r = (^c($l)).roll; my $s; for reverse(^$l) Z ^$l -> $l1, $l2 { $s += c($l1) * c($l2); return [~] "[", b($l1), "]", b($l2) if $r < $s } }; say b 5 | |||
p6eval | rakudo fee891: OUTPUT«[][][][[]]» | ||
moritz | r: sub c { state @c = 1; return @c[$^n] if @c > $n; 2 * (2 * $n | ||
- 1) / ($n + 1) * c($n - 1) }; sub b($l) { return "[]" x $l if | |||
$l < 2; my $r = (^c($l)).roll; my $s; for reverse(^$l) Z ^$l -> | |||
$l1, $l2 { $s += c($l1) * c($l2); return [~] "[", b($l1), "]", | |||
p6eval | rakudo fee891: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 2» | ||
moritz | eeks | ||
c&p fail | 16:06 | ||
masak | I'd say. | ||
&c calculates catalan numbers. | |||
&b calculates balanced strings recursively. | |||
the important part is the dice throw $r, which is then compared against a cumulative sum of products of catalan numbers. | 16:07 | ||
the details of this comparison guarantee an even distribution, because the cumulative sum takes into accound how many strings of the form "[X]Y" there are for X and Y of various lengths. | 16:08 | ||
account* | |||
it's a bit of a waste to be making a new roll on each recursive call -- the first $r really has enough bits to pin down a string entirely. but it doesn't hurt either. | 16:10 | ||
moritz suspects it's not quite the final say after all :-) | 16:11 | ||
masak | so in the end, it turns out that the distribution can be mapped down to (a recursive) [\+] of the catalan numbers. | ||
moritz decommutes | 16:14 | ||
16:15
wolfman2000 left
16:18
sisar left
|
|||
masak | r: sub c { state @c = 1; return @c[$^n] if @c > $n; 2 * (2 * $n - 1) / ($n + 1) * c($n - 1) }; sub b { return "[]" x $^l if $l < 2; my $r = (^c($l)).roll; return "[&b($l - 1 - $_)]&b($_)" if $r < (my $s += c($l1) * c($l2)) for ^$l }; say b 5 | 16:19 | |
p6eval | rakudo fee891: OUTPUT«===SORRY!===Variable $l1 is not declaredat /tmp/9yek541Jg4:1» | ||
masak | r: sub c { state @c = 1; return @c[$^n] if @c > $n; 2 * (2 * $n - 1) / ($n + 1) * c($n - 1) }; sub b { return "[]" x $^l if $l < 2; my $r = (^c($l)).roll; return "[&b($l - 1 - $_)]&b($_)" if $r < (my $s += c($l - 1 - $_) * c($_)) for ^$l }; say b 5 | ||
p6eval | rakudo fee891: OUTPUT«[[[]][[]]]» | ||
masak | r: sub c { state @c = 1; return @c[$^n] if @c > $n; 2 * (2 * $n - 1) / ($n + 1) * c($n - 1) }; sub b { return "[]" x $^l if $l < 2; my $r = (^c($l)).roll; return "[&b($l - 1 - $_)]&b($_)" if $r < (my $s += c($l - 1 - $_) * c($_)) for ^$l }; say b 10 | ||
p6eval | rakudo fee891: OUTPUT«[[][[[]]][]][][][][]» | ||
masak | \o/ | ||
note: no implicit or explicit computation of a big triangular matric required. | 16:20 | ||
16:20
kaleem left
|
|||
masak | matrix* | 16:23 | |
16:24
thou joined,
NamelessTee joined
16:30
Patterner left
16:31
birdwindupbird left
16:39
vytas joined
|
|||
japhb | perl6: ?(all() ~~ /^ \d+ $/) | 16:39 | |
phenny | japhb: 07:26Z <jnthn> tell japhb not yet *but* the bs branch landing was the blocker for that and I already have some constant folding code, just not wired up yet. So you can expect it to be in place soon. | ||
p6eval | rakudo fee891: OUTPUT«This type cannot unbox to a native string in any <anon> at src/gen/BOOTSTRAP.pm:105 in any !cursor_init at src/stage2/QRegex.nqp:881 in method ACCEPTS at src/gen/CORE.setting:8275 in block <anon> at /tmp/aKQYyCuIaz:1» | ||
..pugs b927740, niecza v15-4-g1f35f89: ( no output ) | |||
japhb | phenny, tell jnthn Ah, great, thanks! | 16:40 | |
phenny | japhb: I'll pass that on when jnthn is around. | ||
16:40
vytas left,
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
japhb | perl6: ?(all() ~~ /./) | 16:40 | |
p6eval | rakudo fee891: OUTPUT«This type cannot unbox to a native string in any <anon> at src/gen/BOOTSTRAP.pm:105 in any !cursor_init at src/stage2/QRegex.nqp:881 in method ACCEPTS at src/gen/CORE.setting:8275 in block <anon> at /tmp/wBfthRSBT2:1» | 16:41 | |
..pugs b927740, niecza v15-4-g1f35f89: ( no output ) | |||
japhb | ^^ Any more golfing that anyone can see for the above bug? | ||
16:46
alester left
|
|||
japhb | r: all() ~~ /./ | 16:47 | |
p6eval | rakudo fee891: OUTPUT«This type cannot unbox to a native string in any <anon> at src/gen/BOOTSTRAP.pm:105 in any !cursor_init at src/stage2/QRegex.nqp:881 in method ACCEPTS at src/gen/CORE.setting:8275 in block <anon> at /tmp/3G3E2ZywtM:1» | ||
japhb | Another 3 chars off | 16:48 | |
:-) | |||
For some reason, I enjoy golfing errors more than working code. :-) | |||
masak | there's more feedback in golfing errors :) | ||
japhb: should I submit this? | |||
japhb | masak, Yeah, it's probably small enough to be clear at this point. | 16:49 | |
masak submits rakudobug | |||
japhb | Thanks! | ||
masak bows | |||
japhb | BTW, when did r: and n: get added to p6eval? Very nice. | 16:50 | |
moritz | 9 days ago | 16:51 | |
japhb | Thank you. | ||
masak | p: say "And meeeee!" | 16:52 | |
p6eval | pugs b927740: OUTPUT«And meeeee!» | ||
japhb | How could I forget you, Pugs? | 16:53 | |
moritz did, too | |||
16:54
ab5tract left
|
|||
japhb | So ... S17-concurrency -- it looks like it was redesigned (more than once?), but it still looks like a collection of ideas rather than something that's had any implementation behind it. Is my assessment correct here? And is anyone attached to the current design? | 16:55 | |
moritz | yes, and no | 16:56 | |
japhb | Ah, good. | ||
moritz | sorear++ has implemented a tiny bit of concurrency, but I don't know how well that corresponds to S17 | 16:57 | |
japhb | What did he implement? | ||
(sorear, are you around?) | |||
16:58
overrosy left
|
|||
japhb | I remember back a long time ago, one of the compilers (Pugs?) experimented with STM, but I recall that being at most a mixed success. | 16:58 | |
masak decommutes | 17:01 | ||
17:08
kaare_ joined
17:15
MayDaniel joined
17:18
MayDaniel left
17:22
fglock joined
|
|||
[Coke] | r: say "" ~~ /./ | 17:29 | |
p6eval | rakudo fee891: OUTPUT«#<failed match>» | ||
[Coke] | r: say Mu() ~~ /./ | 17:30 | |
p6eval | rakudo fee891: OUTPUT«Method 'Mu' not found for invocant of class 'Parcel' in <anon> at src/gen/BOOTSTRAP.pm:805 in <anon> at src/gen/BOOTSTRAP.pm:802 in any <anon> at src/gen/BOOTSTRAP.pm:797 in block <anon> at /tmp/aButAF_v15:1» | ||
[Coke] | r: say Mu ~~ /./ | ||
p6eval | rakudo fee891: OUTPUT«use of uninitialized value of type Mu in string context#<failed match>» | ||
[Coke] | I'm not sure why any() ~~ /./ is worse than that. | ||
er, all() | 17:31 | ||
(what does all() mean, anyway?) | |||
(that is, what is a junction of everything of nothing?) | 17:33 | ||
r: say all() ~~ 10 | |||
p6eval | rakudo fee891: OUTPUT«all()» | ||
japhb | I'm guessing it's junction autothreading that makes one()/any()/all() worse than Mu in this case. | ||
[Coke] | r: say Nil ~~ /./ | ||
p6eval | rakudo fee891: OUTPUT«#<failed match>» | ||
moritz | nom: say nqp::unbox_s(Junction) | 17:34 | |
p6eval | rakudo fee891: OUTPUT«Cannot unbox a type object as a native str in block <anon> at /tmp/PEbdxSyZx0:1» | ||
japhb | And for the purposes of this bug, it doesn't matter whether the junction composers have arguments or not. | ||
moritz | nom: say nqp::unbox_s(all()) | ||
p6eval | rakudo fee891: OUTPUT«This type cannot unbox to a native string in block <anon> at /tmp/C3_koKdTvx:1» | ||
[Coke] shuts off the part of his brain that's thinking about this. | |||
japhb | r: nqp::unbox_s(all()) | ||
p6eval | rakudo fee891: OUTPUT«This type cannot unbox to a native string in block <anon> at /tmp/eZYLZwBom3:1» | ||
japhb | 'say' not necessary | ||
[Coke] | we're not suggesting that unbox_s(junction) should do something, though, are we? | 17:35 | |
just that ~~ should autothread better? | 17:36 | ||
japhb | Right. | ||
[Coke] | hokay | ||
japhb | The tests with unbox_s are just to check if that's what caused the exact error message we're getting, I think. | ||
17:37
MayDaniel joined,
mj41 left
17:41
Vespakoen left
17:44
simcop2387 left
17:46
pmurias left
17:47
simcop2387 joined
|
|||
[Coke] | +# 03/13/2012 - rakudo++ ; niecza (96.22%); pugs (38.97%) | 17:51 | |
+"niecza", 20309, 1, 757, 1540, 22607, 23763 | |||
+"pugs" , 8227, 0, 3022, 1344, 12593, 23572 | |||
+"rakudo", 21106, 31, 626, 1888, 23485, 24026 | |||
niecza inches up 2 tests while everyone else holds. | |||
17:55
mj41 joined,
dakkar left
18:00
mj41 left
18:06
MayDaniel left
18:07
NamelessTee left
|
|||
cognominal | error golfing, we should propose that sport to the olympic committee | 18:09 | |
japhb | I can just see the events: fewest strokes to demonstrate a given error, fewest strokes to trigger a VM-native error, fewest strokes to a segfault ... | 18:11 | |
18:14
awwaiid left
|
|||
japhb | phenny, ask sorear What have you implemented in the way of concurrency support in Niecza? (I mean that in the general sense, including threads, AIO, event loops, STM, actors, ....) | 18:20 | |
phenny | japhb: I'll pass that on when sorear is around. | ||
TimToady | perl6: say (<[ ]> xx 10).pick(*).join | 18:21 | |
p6eval | niecza v15-4-g1f35f89: OUTPUT«[][[]][[][]]]][[[]][» | ||
..pugs b927740: OUTPUT«[]]][[]]][[][][][[[]» | |||
..rakudo fee891: OUTPUT«[][][][][][][][][][]» | |||
TimToady | rakudo feyl | ||
moritz | should it flatten all those parcels? | 18:23 | |
TimToady | that's the default for most listy methods, which is why we need .lol | 18:25 | |
admittedly the spec could be clearer here | |||
japhb | TimToady, how "deep" a concurrency model are you really looking for? Right now the best feel I've got is "1. In general syntax, give the programmer ways to specify that things *can* be done concurrently, but leave reality to the implementations (e.g. hyper, race). 2. If the user wants to have greater control, give them features that allow them to do "native" threading, events, etc. but with a portable veneer that hides platform dependent | 18:26 | |
details." Is that about right? | |||
TimToady | perl6: say (<[ ]> xx 10).map(~*).join | ||
p6eval | pugs b927740: OUTPUT«*** Cannot cast from VList [VStr "Inf"] to VCode (VCode) at /tmp/LSDUtFmiID line 1, column 5 - line 2, column 1» | ||
..rakudo fee891, niecza v15-4-g1f35f89: OUTPUT«[][][][][][][][][][]» | |||
TimToady | you'll note rakudo flattens there, so it's being inconsistent | 18:27 | |
perl6: say (<[ ]> xx 10).lol.map(~*).join | |||
p6eval | niecza v15-4-g1f35f89: OUTPUT«Unhandled exception: Unable to resolve method lol in class List at /tmp/dbGphD48ko line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3839 (module-CORE @ 65)  at /home/p6… | ||
..pugs b927740: OUTPUT«*** No such method in class Array: "&lol" at /tmp/hxg5aZza1N line 1, column 5 - line 2, column 1» | |||
..rakudo fee891: OUTPUT«Method 'lol' not found for invocant of class 'List' in block <anon> at /tmp/jZqVfffvUO:1» | |||
TimToady | perl6: say (<[ ]> xx 10).tree.map(~*).join | 18:28 | |
p6eval | niecza v15-4-g1f35f89: OUTPUT«Unhandled exception: Unable to resolve method tree in class List at /tmp/vp42Bk4zo1 line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3839 (module-CORE @ 65)  at /home/p… | ||
..rakudo fee891: OUTPUT«[ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]» | |||
..pugs b927740: OUTPUT«*** No such method in class Array: "&tree" at /tmp/BSEAjlSVcZ line 1, column 5 - line 2, column 1» | |||
18:47
tyatpi joined
|
|||
TimToady | japhb: yes, that's pretty close to the mark, though I'd view events more in category 1, with some way to say "each dispatch to this object/multi spawns a thread" | 18:50 | |
18:54
overrosy joined
18:57
birdwindupbird joined
19:02
overrosy left
|
|||
japhb | TimToady, ah, OK, thank you. | 19:04 | |
[Coke] | so, now that i'm trying to run pugs ona mac, I have the same problem ... benabik? had. all the test files seem to be in a utf-8 or us-ascii charset. so why is pugs complaining about utf-8 (and requiring iso8859-1 on linux?) | 19:06 | |
benabik | [Coke]: I'm pretty sure GHC is reading the file and pre-processing the UTF8 | 19:07 | |
I have no idea if this is caused by version of GHC, OS, or what. | |||
[Coke] | benabik: what version of ghc are you using on os x? | 19:08 | |
(I'm using 6.10.4) | |||
benabik | [Coke]: 7.0.4 from haskell-package | ||
*-platform | 19:09 | ||
19:09
overrosy joined
|
|||
[Coke] tries to find a test file that complains. | 19:11 | ||
sorear | good driveby #perl6 | 19:15 | |
phenny | sorear: 18:20Z <japhb> ask sorear What have you implemented in the way of concurrency support in Niecza? (I mean that in the general sense, including threads, AIO, event loops, STM, actors, ....) | ||
colomon | \o | ||
[Coke] | benabik: so I just ran it with no setting, and didn't get that many failures. | 19:16 | |
(and more TODO passes than failures) | |||
benabik | No setting? | 19:17 | |
[Coke] | LC_ALL is not set | ||
sorear | japhb: that which is in lib/Threads.pm6, no more, no less | ||
japhb: it's just Java/CLR style threads+monitors concurrency primitives | 19:18 | ||
benabik | [Coke]: I do that too but still get lots of decodeUTF8 warnings. Is LANG set? | ||
[Coke] | (I didn't save the output, so I don't know if I got a lot of the warnings, but it doesn't seem to impact the tests on this box.) | ||
sorear | I want somthing realistic written on top of it | ||
[Coke] | benabik: can you tell me a file you get the warnings in? | ||
benabik | t/spec/integration/advent2009-day07.t | ||
[Coke] | benabik: LANG is set to en_US.UTF-8 | ||
nope, seems fine. | 19:19 | ||
weird. | |||
19:19
overrosy left
19:21
ascrazy joined
19:24
havenn joined
|
|||
japhb | sorear, Just to be clear, you mean "monitors" in the sense of "object with all methods implicitly run under mutex", not as in "registered event listeners", yes? | 19:26 | |
japhb has discovered in the last week that the concurrency literature is anything but consistent in the use of certain common words .... | |||
19:27
pernatiy left
|
|||
arnsholt | japhb: Welcome to academic literature. Everyone uses their preferred terminology =) | 19:30 | |
TimToady | japhb: I might argue that event dispatch to an object should behave as a monitor because objects are implicitly stateful, but dispatch to a multi should not, on the assumption that the multi code is likelier to be FP oriented | 19:33 | |
so should probably handle its own atomic {} bits | 19:34 | ||
japhb | arnsholt, The last time I went deep on fundamental concepts (as opposed to tight specializations, e.g. GPU programming), I was an undergrad, and my professors seemed to do a decent job of agreeing on common terminology. With this kind of stuff? Not so much. | ||
19:34
pochi joined
|
|||
TimToady | in this case I'm scoping the "monitor" to the object, not the class, so I guess it's not a classical monitor | 19:34 | |
npi | 19:35 | ||
heavy revision to all but first entry in rosettacode.org/wiki/Balanced_brackets#Perl_6 | 19:36 | ||
japhb | arnsholt, though given that it's been a couple decades since college, perhaps the academics have just had more time to come up with diversity of definition. :-) | 19:38 | |
TimToady | but certainly per-object locking/queueing will scale better than per-class, which doesn't even make a lot of sense under inheritance | 19:41 | |
japhb | TimToady, I'm not entirely sure I buy that dispatch to a multi should require the programmer to know when to atomic {}. There may be a use case I haven't thought of yet, but it seems at present that's mental load that needn't be there, if you're already fine with single method dispatch for events using monitor semantics | ||
TimToady, agreed with that last statement (and honestly, I can't see a strong need for per-class locking that isn't better served with a different WTDI) | |||
TimToady | I'd also like to be able to easily write code with multiple transactions running through it simultaneously, though it doesn't necessarily have to be default | 19:42 | |
but I'd like some way of marking the proto, so you don't have to throw async into every body | 19:43 | ||
proto foo () is atomic vs proto foo () is async, I suppose | |||
we also need a way to dispatch that doesn't expect a response, or that manages any response via some callback mechanism | 19:45 | ||
sink context isn't good enough, since you need to distinguish a sequence point at the ; boundary for imperative programma\ing | 19:46 | ||
19:47
awwaiid joined
|
|||
japhb | TimToady, can you expand what you mean by that last statement? | 19:47 | |
TimToady | foo; bar has to wait for foo to finish | ||
send foo; bar doesn't | |||
fsdo send | |||
felher really likes the FP-oriented solution of rosettacode.org/wiki/Balanced_brackets#Perl_6 :) | 19:48 | ||
TimToady++ | |||
japhb | Oh I see what you mean, you're saying that sink context shouldn't imply asynchrony automatically. | ||
TimToady | yes, we need to mark the 'go' routine calls :) | ||
19:49
thou left
|
|||
TimToady | we need a shorter verb for fire-and-forget | 19:49 | |
faf foo :) | |||
japhb | BTW, I noted an attempt in the existing S17-concurrency to try to do some of that "async return" via CONTROL exceptions. What are your thoughts on that? | 19:50 | |
TimToady | maybe it's another contextualizer...maybe I already added it, and it's 'race foo' | 19:51 | |
19:51
thou joined
|
|||
TimToady | well, race in sink context, to thorw away the return | 19:52 | |
japhb: I think that's probably insane | |||
unless we teach exceptions to work like that anyway | 19:53 | ||
we do need a story for where thread exceptions go | |||
japhb | I think I had roughly the same sequence of thoughts. | 19:54 | |
TimToady | but merely blowing up the spawner when the spanee goofs up seems a bit untoward | ||
19:54
araujo left
|
|||
japhb | Eh, what's a little blowing up between friends? | 19:54 | |
TimToady | druther have a bit more error encapsulation there somehow | ||
much like a waitpid() can tell you how the child process finished | 19:55 | ||
19:56
daxim left
|
|||
TimToady | but possible propagation to the parent might be a default, in the absense of other handling | 19:56 | |
hafta think about that | |||
japhb | Maybe "child thread needs to report an error" is just another event you can listen to | 19:58 | |
(going with the SIGCHLD path) | |||
TimToady | or if you are emulating call/return, could callback with a failure value | 20:02 | |
more the "you made a promise and then broke it" model | 20:03 | ||
20:04
araujo joined
|
|||
TimToady | if we allow async routines to return lazily via promises | 20:04 | |
another way of breaking the sequence pointness of ; | |||
but we've avoided scalar laziness for the most part till now | 20:05 | ||
but you can view a promise as a scalar feed, a pipe with one value coming on it | 20:06 | ||
so certainly promises can be emulated, if not native | |||
in any case, feeds are very much *not* sequence points | 20:07 | ||
hmm, nobody ever fed me lunch... | 20:08 | ||
no wonder my head feels strange(r) | |||
20:16
Guest80268 left
20:17
overrosy joined
20:19
retup_work left
|
|||
masak submits (<[ ]> xx 10).pick(*).join rakuobug | 20:22 | ||
TimToady: '\\' «leg« $s.comb # that's sick/cool :P | 20:23 | ||
TimToady | darn, missed the chance for a Xleg pun though | ||
and X can be lazy, so we could reject a string in the middle that hits gambler's ruin without combing it all out | 20:24 | ||
masak | I think merlyn would go on a rampage if he saw the results of infix:<leg> being summed by [\+] -- or is it just summing boolean values that he doesn't like? | 20:25 | |
TimToady | assuming .none is also sufficiently lazy | ||
yes, well, he would not like the interchangability of map/for either, I suspect | 20:26 | ||
masak | I remember one p6l email where he said something like "Bool::True should be 42 or something to dissuade people from doing this kind of stuff!" | ||
TimToady | but we all change our views over time, so I don't want to prevent anyone from repenting earlier views :) | ||
masak | nodnod | 20:27 | |
it just stayed with me for some reason. | |||
nom: constant True = 42; say True | |||
p6eval | rakudo fee891: OUTPUT«True» | ||
masak | hm. | ||
benabik | r: constant True = 42; say +True | ||
masak submits rakudobug | |||
p6eval | rakudo fee891: OUTPUT«1» | ||
benabik | Huh | ||
masak | good rakudobug day today ;) | ||
benabik | Oh, I was thinking it was an enum not getting numified. blah. | 20:28 | |
jnthn | Great, not being able to change the truth is a bug :P | 20:30 | |
phenny | jnthn: 16:40Z <japhb> tell jnthn Ah, great, thanks! | ||
20:31
retup_work joined
|
|||
TimToady | the opposite of OUTER truth is INNER truth... :P | 20:31 | |
ranguard | Hi, is there someone who looks after perl6.org? - basically I'd like to redirect dev.perl.org/perl6/* somewhere and didn't know if you want to create an archive and host it? | 20:32 | |
20:32
pmurias joined
|
|||
ranguard isn't sure what is useful / what's not etc | 20:33 | ||
masak | ranguard: hi, we all look after perl6.org -- some more than others. | ||
are you saying dev.perl.org/perl/* is going away? | |||
TimToady | if you have a github account, you could put it there yourself | ||
jnthn | masak: perl6/* | 20:34 | |
masak | uhm. meant that. | 20:35 | |
ranguard | masak: hthe stuff in /perl6/ is not current, and just a bit confusing, I'd like to just link to it on the perl6.org site then you've got everything in one place | ||
20:35
birdwindupbird left
|
|||
masak | sounds like a generally good idea to collect things under perl6.org, yes. | 20:35 | |
ranguard | TimToady: ok, will do :) | ||
TimToady | hugme: add ranguard to perl6 | 20:36 | |
hugme | TimToady: You need to register with freenode first | ||
masak | I've always loved this page: dev.perl.org/perl6/architecture.html | ||
[Coke] | hugme: add ranguard to perl6 | ||
hugme | [Coke]: sorry, you don't have permissions to change 'perl6' | ||
[Coke] | hugme: biteme | ||
TimToady | hugme: add ranguard to perl6 | ||
hugme hugs ranguard. Welcome to the perl6 github organization | |||
ranguard | thanks :) | 20:37 | |
TimToady | uh, assuming that's your github nick | ||
ranguard | it is | ||
TimToady | have the appropriate amount of fun | ||
hopefully not negative | |||
ranguard | I'll call it /archive/ and put everything in there - can be pulled out by someone who knows what stuff actually is :) | 20:38 | |
TimToady | thanks | 20:39 | |
ranguard | github.com/perl6/perl6.org is still readonly for me :( | 20:41 | |
TimToady | checking | 20:43 | |
jnthn | iirc, you need [email@hidden.address] in order to push | ||
arnsholt | You do. HTTP isn't really a write-y protocol | 20:44 | |
But if you've cloned from HTTP, you can switch over to the SSH one by editing .git/config | 20:45 | ||
ranguard | Sorry, I mean if I goto that URL github only shows me the read-only URLs | 20:46 | |
20:46
overrosy left
|
|||
TimToady | they had some security issues recently, so maybe passwords got reset of something | 20:46 | |
japhb | You *can* do write access via HTTPS to git in general, but perhaps just not github. | ||
TimToady | it's making me say I forgot my passowrd... | ||
doy | fairly sure you can write to github over https | 20:47 | |
japhb | The passwords didn't get reset, but all of the SSH keys got de-trusted. You have to manually re-trust them. | ||
arnsholt | TimToady might be onto something. They had hole that let people upload keys, so you have to audit your keys | ||
japhb | arnsholt, exactly. | ||
20:47
mj41 joined
|
|||
TimToady | I'm guessing hugme is not considered trusted | 20:49 | |
and I seem to have misplaced the button to add new users on the website o_O | 20:53 | ||
okay, you're added | 20:55 | ||
(I think) | |||
ranguard | TimToady: wonderful, thanks :) | ||
20:56
vlkv joined
|
|||
dalek | href="https://perl6.org:">perl6.org: c210507 | (Leo Lapworth)++ | README: Fix spelling |
20:57 | |
20:57
vlkv is now known as gv
|
|||
TimToady | obviously it worked \o/ | 20:57 | |
ranguard | guess it worked, I'll sort it in the next couple of days :) | ||
masak | ++ranguard | ||
20:59
ksi joined
21:00
fglock left
|
|||
japhb | (backlogging) TimToady, going back and reading S06's section on the feed operator, it looks like you had already specced feed to a scalar to be relatively smart: spawning a thread on a the blunt end, making the scalar contain a lazy, fully structured output from that thread. As long as we say that exceptions from that subthread are not thrown immediately but instead show up in the feed result, that gets us halfway there. | 21:08 | |
21:11
pernatiy joined
21:16
bluescreen100 joined
21:18
skids left
21:26
bluescreen100 left,
bluescreen10 left
21:40
sudokode left
21:42
havenn left
|
|||
masak | does `my @nums of Int` mean the same as `my Int @nums`? | 21:42 | |
ah; S09 seems to indicate it does. | 21:43 | ||
21:44
kaare_ left
|
|||
jnthn | Yes | 21:45 | |
Though not in Rakudo yet.l | |||
Also, why are you calling it @nums if it's full of Ints :P | 21:46 | ||
21:47
thou left
|
|||
japhb | @lies | 21:48 | |
pyrimidine | @stars | ||
masak .oO( because I'm a p6cc contestant, and my code is being ruthlessly deconstructed by strangers ) | |||
benabik | my @it of Star | ||
masak | nom: my Int @a = 1, 2, "HAHAHA", 4; say "alive" | 21:49 | |
p6eval | rakudo fee891: OUTPUT«alive» | ||
masak | nom: my Int @a = 1, 2, "HAHAHA", 4; say @a | ||
p6eval | rakudo fee891: OUTPUT«1 2 HAHAHA 4» | ||
21:49
donaldh joined
|
|||
masak | nom: my @a of Int = 1, 2, "HAHAHA", 4; say @a | 21:49 | |
p6eval | rakudo fee891: OUTPUT«1 2 HAHAHA 4» | ||
masak | neither works in enforcing type, it seems. | ||
jnthn | masak: Only for indexing. | ||
masak | so I don't see what jnthn means by "not in Rakudo yet" :) | ||
oh, indexing. | |||
nom: my Int @a; @a[0] = "HAHAHA"; say "alive" | |||
p6eval | rakudo fee891: OUTPUT«Type check failed in assignment to '$v'; expected 'Int' but got 'Str' in block <anon> at /tmp/RuJsGGlCTw:1» | 21:50 | |
masak | nom: my @a of Int; @a[0] = "HAHAHA"; say "alive" | ||
p6eval | rakudo fee891: OUTPUT«alive» | ||
masak | ah. | ||
jnthn | I think I didn't do it for the assignment because I expected pmichaud++ to be fixing that up at some point "soon". :/ | ||
21:55
thou joined
|
|||
jnthn | (iirc there is still some buglet in assignment, but it's a corner case) | 21:55 | |
It's the one that very occasionally means you see whinings about splicing Mu. | |||
masak | ah. | ||
21:59
ksi left
22:08
att left
22:09
FACEFOX left
22:10
FACEFOX joined,
att joined
|
|||
masak | nom: my $s = "ha ha ha haaa ha haa"; say ($s ~~ m:g/ha+/).WHAT | 22:17 | |
p6eval | rakudo fee891: OUTPUT«Bool()» | ||
masak | "if you want the list of matches in Perl 6, use .comb", right? | ||
22:17
retup_work left
|
|||
masak | it's not reasonable of me to expect m:g// to return a list of things, right? | 22:18 | |
benabik | r: (m:g/ha+/).WHAT.say | ||
p6eval | rakudo fee891: OUTPUT«Method 'match' not found for invocant of class 'Any' in block <anon> at /tmp/zHslu2LtBQ:1» | ||
22:19
retup_work joined
|
|||
masak | nom: my $s = "ha ha ha haaa ha haa"; say $s.comb(/h(a+)/) | 22:19 | |
p6eval | rakudo fee891: OUTPUT«ha ha ha haaa ha haa» | ||
22:20
pmurias left
|
|||
masak | nom: my $s = "ha ha ha haaa ha haa"; say $s.comb(/h(a+)/, :match) | 22:21 | |
p6eval | rakudo fee891: OUTPUT«ha ha ha haaa ha haa» | ||
masak | nom: my $s = "ha ha ha haaa ha haa"; say $s.comb(/h(a+)/, :match)>>[0] | ||
p6eval | rakudo fee891: OUTPUT«=> <a> => <a> => <a> => <aaa> => <a> => <aa>» | ||
masak | nom: my $s = "ha ha ha haaa ha haa"; say $s.comb(/h(a+)/, :match)>>[0]>>.Str | ||
p6eval | rakudo fee891: OUTPUT«a a a aaa a aa» | ||
jnthn -> sleep, night | |||
felher | o/ | 22:23 | |
22:23
mdupont left
|
|||
masak | 'night, jnthn-san. | 22:25 | |
22:26
tyatpi left
22:28
FACEFOX left
22:38
jlaire left
22:39
jlaire joined,
Jerkwad joined
22:40
Jerkwad left
|
|||
masak | 'night, #perl6 | 22:41 | |
tadzik | 'evening #perl6 | 22:44 | |
felher | night masak, welcome tadzik :) | ||
tadzik | huh, am I a night owl or what :) | 22:45 | |
22:45
tr-808_ joined
22:46
tr-808_ left
|
|||
felher | sure ;) | 22:46 | |
tadzik | I was looking for a new phone today; I have a feeling that I only like things that angular (edgy?) | 22:48 | |
22:49
att left
|
|||
felher | and, were you lucky? | 22:50 | |
tadzik | well, I think I'll settle for Nokia N900, which is not available in Poland anymore it'd seem :) | ||
22:51
overrosy joined
|
|||
felher | tadzik: now that i see you and you are into all the POD-stuff: how do the specs get converted to html? | 22:51 | |
ah, i phone with a real keyboard, not just touch :) | 22:52 | ||
tadzik | felher: using github.com/perl6/Pod-To-HTML/blob/...To/HTML.pm | ||
felher: essentialy, it looks like when it'd collide with a car, the car will turn out more damaged ;) | 22:53 | ||
felher | tadzik: that is _only_ real kind of phone :D | 22:54 | |
tadzik++ # pod2html | |||
tadzik | yeah, a true descendant of good, ol' 3310 | ||
flussence++ for all the real work | |||
felher | flussence++ :) | ||
22:55
mj41 left,
overrosy left
23:01
donaldh left
23:02
skids joined,
Vespakoen joined
23:05
wentam joined
23:06
sudokode joined
23:07
benabik left
23:10
PacoAir left
|
|||
wentam | how would I match anything except for a particular character in a regex? | 23:12 | |
tadzik | <-[c]> | 23:13 | |
23:14
Vespakoen left
|
|||
tadzik | that is "every character but not »c«" | 23:14 | |
wentam | tadzik, ty | ||
tadzik | yw | ||
welcome to #perl6, we have cookies | 23:15 | ||
moritz returns from a lost table tennis game, and wants a cookie | |||
tadzik | poor moritz. Have a cookie! | ||
moritz -> sleep | 23:18 | ||
moritz waves to the cookie monster | |||
tadzik waves back | |||
have a nice rest | |||
23:30
benabik joined
|
|||
colomon | cookies? | 23:35 | |
23:35
whiteknight joined
|
|||
tadzik | yeah, go ahead | 23:35 | |
colomon | what kind? | ||
tadzik | whatever you want, I'm paying today :) | 23:36 | |
colomon | \o/ | ||
benabik | solid gold. :-D | ||
colomon | uck, too chewy | ||
tadzik | cookie gold at least | ||
flussence | .oO( hey now wait a minute, I only wrote part of a thing that does stuff with a Pod AST, tadzik++ wrote the parser - that's the hard part! ) |
||
tadzik | flussence: from us two, you're the only who knows HTML :P | 23:37 | |
colomon: have another, today we party :) | |||
colomon | mmmm, peanut butter | 23:38 | |
tadzik | . o O ( much butter ) | ||
23:44
thou left
23:45
wolfman2000 joined
23:52
gv left
|