»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31 Set by jnthn on 28 February 2015. |
|||
00:11
rurban left
|
|||
raydiak | .tell retupmoca github.com/retupmoca/P6-Compress-Zlib/pull/7 | 00:16 | |
yoleaux | raydiak: I'll pass your message to retupmoca. | ||
raydiak | .tell cosimo github.com/cosimo/perl6-string-crc32/pull/5 | 00:17 | |
yoleaux | raydiak: I'll pass your message to cosimo. | ||
00:17
airdisa left
00:20
cognominal left
00:29
BenGoldberg left,
BenGoldberg joined
|
|||
flussence | silly idea: most of the profiler json is a huge nested tree of callframe info, and a lot of that is just the same hash key strings repeated over and over. Maybe it'd be more sensible to use an array... could even put the keys at the beginning of the data so it's still self-describing. | 00:47 | |
flussence goes to experiment | |||
00:51
dayangkun joined
00:52
muraiki joined
00:54
laouji joined
01:16
koo6 left
01:26
Zoffix joined
|
|||
flussence | m: say 2949462 #`{ redundant hash keys and punctuation } / 5228772 #`{ total json filesize } | 01:30 | |
camelia | rakudo-moar d09e62: OUTPUT«0.5640831» | ||
flussence | yeah that's... quite a lot. | 01:31 | |
01:38
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:50
dayangkun left
01:54
raiph joined
02:01
pierrot left,
pierrot joined
02:17
dsm joined
02:21
noganex_ joined
02:24
noganex left,
rmgk_ joined,
rmgk left,
rmgk_ is now known as rmgk
02:33
tinyblak left
02:45
mr-foobar left
02:47
colomon left
02:48
colomon joined
02:51
perlvim joined,
vendethiel joined
02:52
adu joined
|
|||
perlvim | p6: 'string'.&'say' | 02:54 | |
camelia | rakudo-moar d09e62: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfileName must begin with alphabetic characterat /tmp/tmpfile:1------> 3'string'.&7⏏5'say' expecting any of: infix infix stopper statement end stat…» | ||
TimToady_ | m: 'string'.$('say') | 02:58 | |
camelia | rakudo-moar d09e62: OUTPUT«Cannot find method 'postcircumfix:<( )>' in block <unit> at /tmp/0rKbKUt59L:1» | ||
TimToady_ | m: 'string'.$::('say') | ||
camelia | rakudo-moar d09e62: OUTPUT«===SORRY!===No such symbol '$::say'» | ||
02:58
thou left
|
|||
TimToady_ | m: 'string'.&say | 02:59 | |
camelia | rakudo-moar d09e62: OUTPUT«string» | ||
TimToady_ | m: 'string'.&::('say') | ||
camelia | rakudo-moar d09e62: OUTPUT«string» | ||
TimToady_ | there you go | 03:00 | |
we intentionally make symbolic refs harder than, er, hard refs | |||
03:01
dsm left
03:05
dayangkun joined
03:06
konsolebox left
|
|||
perlvim | Thanks TimToday_ | 03:06 | |
03:06
konsolebox joined
|
|||
TimToady_ | hmm, I grew a tail... | 03:07 | |
03:07
TimToady_ is now known as TimToady,
TimToady left,
TimToady joined
03:11
dsm joined
03:16
dayangkun left
|
|||
perlvim | TimToady: if the method is not exported to CORE::, how to call it dynamically with name? | 03:17 | |
03:17
gfldex left
|
|||
TimToady | import to your current lexical scope | 03:17 | |
CORE is not special that way, it's just an outer lexical scope | 03:18 | ||
perlvim | TimToday: I see, import the symbols of object.^methods to MY::, then could call it with object.&::('name') | 03:20 | |
TimToady | well, but if you have object methods to begin with, and you merely wish to call a method of arbitrary name, just use object."say"() | 03:21 | |
m: 'string'."say"() | |||
camelia | rakudo-moar d09e62: OUTPUT«string» | ||
perlvim | yes, it is my want | 03:22 | |
03:24
jack_rabbit left
03:27
muraiki left
03:28
jack_rabbit joined
03:30
BenGoldberg left
03:33
tinyblak joined
03:38
tinyblak left
03:50
araujo joined,
araujo left
03:52
araujo joined
03:56
raiph left
04:02
pierrot left
04:03
pierrot joined
04:07
vendethiel left
04:20
laouji left
04:21
laouji joined
04:29
dayangkun joined
04:36
laouji left,
perlvim left,
laouji joined,
haroldwu joined
04:39
laouji left
04:40
konsolebox left
04:41
haroldwu left,
haroldwu joined
04:44
adu left
04:45
laouji joined
04:46
konsolebox joined
04:51
perlvim joined
04:55
kaare__ joined
|
|||
skids | .tell tadzik I sent you a pull request to Grammar::BNF that adds ABNF (popular in modern RFCs) | 05:09 | |
yoleaux | skids: I'll pass your message to tadzik. | ||
05:11
perlvim left
05:14
vendethiel joined
05:38
vendethiel left
05:59
skids left
06:06
dayangkun left
06:10
labster left
06:15
aborazmeh left
06:21
Ven joined,
diana_olhovik_ joined
06:26
labster joined
06:28
quester joined
06:29
hobbs left,
hobbs joined
06:30
laouji left
|
|||
[Tux] | still no Inline::Perl5 | 06:32 | |
06:35
laouji joined
|
|||
quester | Tux... are you still getting the same "No exception handler located for warn"? I just installed Inline::Perl5 on Rakudo Star 2015.03 at $work today and it was an... interesting... install, but I haven't seen that particular error. | 06:41 | |
[Tux] | i run from git, not from star | ||
(rakudobrew) | |||
06:45
Alina-malina left
|
|||
quester | I see... I build from git at home (not rakudobrew, but the using the a script with the manual installation commands from rakudo.org/how-to-get-rakudo/. | 06:48 | |
06:51
vendethiel joined
|
|||
quester | Using a week old Rakudo, panda install Inline::Perl5 runs okay. (Specifically, perl6 version 2015.04-106-g59b8935 built on MoarVM version 2015.04-24-g6ef0f8f). Let me fetch the latest Rakudo... perhaps the problem is there. Or in MoarVM... | 06:51 | |
s/week old Rakudo/two day old Rakudo/ | 06:52 | ||
06:53
hobbs left
06:55
brrt joined
|
|||
brrt | \o | 06:55 | |
06:55
hobbs joined
|
|||
brrt | uhm, let me ask it here. is there any way in which ASSIGN and DECONT can be overriden by user code | 06:55 | |
[Tux] | fail started yesterday (01:00 AM MET) | ||
time is a guess | 06:56 | ||
dalek | kudo/nom: c578247 | TimToady++ | src/core/ (2 files): fooled myself, don't need nodal on multis |
||
07:00
tinyblak joined
07:14
Foxcool joined
07:16
vendethiel left
07:37
alini joined
07:47
zakharyas joined
08:08
virtualsue joined
08:09
virtualsue_ joined
08:12
virtualsue left,
virtualsue_ is now known as virtualsue
|
|||
quester | m: say Any.^methods>>.gist; | 08:13 | |
camelia | rakudo-moar c57824: OUTPUT«invoke Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<…» | ||
08:13
zakharyas left
08:14
darutoko joined,
zakharyas joined
|
|||
quester | The reason that Inline::Perl5 blows up during initialization is that it tries to create many methods named "Method+{<anon>}.new". The second one blows up. | 08:18 | |
08:20
spider-mario joined
08:22
diana_olhovik_ left
08:23
domidumont joined
08:24
Foxcool_ joined
08:27
Foxcool left,
domidumont left,
Ven left
08:28
domidumont joined
08:31
pierrot left,
pierrot joined
08:37
Ven joined
08:44
mr-foobar joined
08:45
vendethiel joined
|
|||
lizmat | quester: |Tux| :I think TimToady's latest patch (revert actually) might fix that | 08:46 | |
rebootstrapping now | |||
and good *, #perl6! | |||
08:47
Rounin joined
|
|||
lizmat | alas :-( | 08:48 | |
jnthn | morning o/ | 08:49 | |
lizmat | jnthn o/ | ||
jnthn | m: say Any.^methods | 08:50 | |
camelia | rakudo-moar c57824: OUTPUT«invoke Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<…» | ||
08:50
koo6 joined
|
|||
lizmat | I thought this was the "is nodal" change, but apparently it isn't | 08:50 | |
jnthn | It still looks bust | 08:51 | |
lizmat | yeah | ||
jnthn | m: say Any.^methods.map(*.name) | ||
camelia | rakudo-moar c57824: OUTPUT«invoke exists_key EXISTS-KEY delete_key DELETE-KEY delete_pos DELETE-POS list flat eager hash Hash Parcel List elems end keys kv values pairs antipairs invert pairup squish rotor reverse sort reduce combinations permutations unique uniq pick roll classify …» | ||
jnthn | A method should always gist to its name | ||
quester | As a quick workaround, panda look Inline::Perl5; ./configure.pl6; mv lib/Inline ~/rakudo/install/share/perl6/lib; vim rakudo/install/share/perl6/lib/Inline/Perl5.pm6. Near line 17, change the declaration of $path... | ||
... to include the absolute patch to p5helper.so, something like state Str $path = "/home/ira/rakudo/install/share/perl6/lib/Inline/p5helper.so"; ...then... | 08:52 | ||
08:52
dolmen joined,
rurban joined
|
|||
lizmat | jnthn: oddly enough, that's the only thing that src/core/Method.pm | 08:52 | |
does | |||
jnthn | Yeah | ||
08:53
rindolf joined
|
|||
jnthn | I think the trait that gets shoved on many methods now mixes in to them before the Method class is fully defined, and then we get the usual method cache problems. | 08:54 | |
quester | ... about line 747, after for Any.^methods>>.gist -> $name { ... add a new line... next if $name ~~ / 'Method+{<anon>}.new' /; | ||
lizmat | jnthn: yeah, confirmed, it doesn't call the Method.name method | ||
jnthn: what trait is that anyway and where does it get shoved ? | 08:55 | ||
jnthn | lizmat: I suspect it's the "is nodal" but we had the same issue with "is hidden-from-backtrace | ||
lizmat: It's a related problem to the augment + subclass issue. | |||
quester | At that point it should be usable. The first patch works around the .files method of CompUnitRepo::Local::File apparently not returning anything. The second one works around the extra method names. | ||
lizmat | but "is nodal" was just removed ? | ||
jnthn | lizmat: from multis, but you never get multis from .^methods | 08:56 | |
lizmat | aha | ||
ok | |||
:-( | |||
TimToady's comment was "don't need is nodal on multis", still I see a lot of multis with "is nodal" | |||
quester | .oO( are we having O(fun) yet? ) |
08:57 | |
lizmat | specifically in array_slice | ||
jnthn | Guess I should bump the augment/cache issue a little further up my priority list :) | ||
lizmat tries to remove them from array_slice multis | 08:58 | ||
hmmm.. hash_slice actuallt | |||
*y | |||
jnthn | bbi30; got some erands to do before I can get on with Perl 6 things for the rest of the day | 08:59 | |
Apparently my body decided I needed a lot of sleep last night too... | |||
09:03
telex left
09:04
telex joined,
jack_rabbit left
|
|||
quester | Jnthn: Thanks for looking at that. I guess my second patch should have been to change line 747 from for Any.^methods>>.gist to for Any.^methods>>.name | 09:06 | |
dalek | kudo/nom: a073f5d | lizmat++ | src/core/hash_slice.pm: Remove some more "is nodal" from multis |
||
lizmat | quester: that feels like a valid work around | 09:07 | |
09:07
dolmen left
|
|||
lizmat | afk for a bit | 09:07 | |
quester | .tell [Tux] I have just posted a fairly awkward workaround if you are in a hurry, but it looks like jnthn and lizmat are looking into at least one of the underlying problems, so there is light at the end of the tunnel. | 09:09 | |
yoleaux | quester: I'll pass your message to [Tux]. | ||
quester | ... and to *.all a good night. | 09:10 | |
09:12
Ven left,
Ven joined,
quester left
09:14
RabidGravy joined
09:15
fhelmberger joined
09:16
tinyblak left
09:18
tinyblak joined
09:19
fhelmberger left
09:21
Ven left,
pierrot left,
pierrot joined
09:30
Akagi201_ left,
vendethiel left
09:32
laouji left
09:33
araujo left
09:48
brrt left
09:49
brrt joined
|
|||
RabidGravy | morning | 09:54 | |
masak | good noon, RabidGravy | 09:55 | |
09:59
pierrot left,
laouji joined
10:00
lolisa joined
10:06
pierrot joined
10:10
cdc left,
pecastro_ left
|
|||
|Tux| is not in a hurry | 10:13 | ||
10:20
brrt left
10:28
Ven joined
10:35
hobbs left,
tinyblak left
|
|||
Ven | m: multi f(Ijnt){}; multi f(Str){}; subset MultiSub of Sub where *.candidates.elems > 1; say &f ~~ MultiSub; | 10:35 | |
camelia | rakudo-moar a073f5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/V9gBhNDmQIInvalid typename 'Ijnt' in parameter declaration. Did you mean 'Int'?at /tmp/V9gBhNDmQI:1------> 3multi f(Ijnt7⏏5){}; multi f(Str){}; subset MultiSub of » | ||
Ven | m: multi f(Int){}; multi f(Str){}; subset MultiSub of Sub where *.candidates.elems > 1; say &f ~~ MultiSub; | ||
camelia | rakudo-moar a073f5: OUTPUT«True» | ||
10:35
tinyblak joined
|
|||
Ven | m: multi f(Int){}; multi f(Str){}; subset MultiSub of Sub where *.candidates.elems > 1; multi c(MultiSub $f) { say $f("hey"); } c(&f); | 10:36 | |
camelia | rakudo-moar a073f5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZDh45N2tILStrange text after block (missing semicolon or comma?)at /tmp/ZDh45N2tIL:1------> 3 multi c(MultiSub $f) { say $f("hey"); }7⏏5 c(&f); expecting any of: infix i…» | ||
Ven | m: multi f(Int){}; multi f(Str){}; subset MultiSub of Sub where *.candidates.elems > 1; multi c(MultiSub $f) { say $f("hey"); }; c(&f); # sigh | ||
camelia | rakudo-moar a073f5: OUTPUT«Cannot look up attributes in a type object in sub c at /tmp/uzOV2Y68Ga:1 in sub c at /tmp/uzOV2Y68Ga:1 in block <unit> at /tmp/uzOV2Y68Ga:1» | ||
10:37
hobbs joined
10:40
tinyblak left
|
|||
jnthn | Ven: *.is_dispatcher maybe | 10:41 | |
Ven | m: multi f(Int){}; multi f(Str){}; subset MultiSub of Sub where *.is_dispatcher; multi c(MultiSub $f) { say $f("hey"); }; c(&f); # sigh | ||
camelia | rakudo-moar a073f5: OUTPUT«Cannot look up attributes in a type object in sub c at /tmp/7JKZ7xuxx7:1 in sub c at /tmp/7JKZ7xuxx7:1 in block <unit> at /tmp/7JKZ7xuxx7:1» | ||
jnthn | Odd... | 10:42 | |
oh, wait | |||
That's a double-closure thing | |||
where already adds a layer of closure | |||
masak | say what? | 10:43 | |
I'm sure I've seen a {} block after `where` | |||
jnthn | Oh, though it should still work there I guess | ||
masak: yes, in that case it doesn't have to | |||
It still seems to get upset without the * though. I don't know why. | 10:44 | ||
lizmat | .tell nine would it be possible for me to get an Inline::Perl5 commit bit ? | 10:46 | |
yoleaux | lizmat: I'll pass your message to nine. | ||
lizmat | I just tried to push quester's workaround for the Inline::Perl5 is nodal breakage | ||
10:49
rindolf left
11:04
gfldex joined
11:08
pippo joined
|
|||
pippo | m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]"; say $str; | 11:09 | |
camelia | rakudo-moar a073f5: OUTPUT«Ḍ» | ||
pippo | m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]"; $str ~= "D"; say $str; | ||
camelia | rakudo-moar a073f5: OUTPUT«Ḍ̇» | ||
pippo | m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]"; $str ~= "DD"; say $str; | 11:10 | |
camelia | rakudo-moar a073f5: OUTPUT«Ḍ̇D» | ||
pippo | ^^ bug? | 11:12 | |
11:12
pippo left
|
|||
lizmat | m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]"; say $str.codes | 11:12 | |
camelia | rakudo-moar a073f5: OUTPUT«2» | ||
lizmat | m: my $str = "D\c[COMBINING DOT ABOVE]\"; say $str.codes | ||
camelia | rakudo-moar a073f5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9tgKI6t_RgUnable to parse expression in double quotes; couldn't find final '"' at /tmp/9tgKI6t_Rg:1------> 3c[COMBINING DOT ABOVE]\"; say $str.codes7⏏5<EOL> expecting any of: meth…» | ||
lizmat | m: my $str = "D\c[COMBINING DOT ABOVE]"; say $str.codes | ||
camelia | rakudo-moar a073f5: OUTPUT«1» | ||
lizmat | so it really appears its not combining the 2nd combining dot | 11:13 | |
I would say, bug indeed | |||
jnthn | I think .codes may still be wrong | 11:14 | |
lizmat | m: my $str = "D\c[COMBINING DOT ABOVE]"; say $str.NFD # where this the D go? | ||
camelia | rakudo-moar a073f5: OUTPUT«NFD:0x<0044 0307>» | ||
lizmat | m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]"; say $str.NFD | 11:15 | |
camelia | rakudo-moar a073f5: OUTPUT«NFD:0x<0044 0323 0307>» | ||
lizmat | hmm... NFD seems to be correct | ||
jnthn | .codes is about NFC though | ||
On a Str anyway | |||
lizmat | ah, ok... | ||
jnthn | But yeah, it's correct on Moar; I already did that | 11:16 | |
I think the concatenation thing is separate | |||
lizmat | m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]"; say $str.graphs | ||
camelia | rakudo-moar a073f5: OUTPUT«Method 'graphs' not found for invocant of class 'Str' in block <unit> at /tmp/P8MI0R9pgn:1» | ||
jnthn | I think we also decided .graphs will go away as it's just a .chars synonym so there's not much point. | ||
lizmat | ok | ||
m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]"; say $str.chars # 2 would be incorrect then? | 11:17 | ||
camelia | rakudo-moar a073f5: OUTPUT«1» | ||
lizmat | good thing it is 1 then :-) | ||
jnthn | 1 is the right answer for .chars there, yes | ||
2 is the right answer for .codes | |||
If you want to know how many codes in NFD then you need to say .NFD.codes | |||
m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]D"; say $str.chars; | 11:18 | ||
camelia | rakudo-moar a073f5: OUTPUT«2» | ||
jnthn | m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]D"; say $str; | ||
camelia | rakudo-moar a073f5: OUTPUT«Ḍ̇» | ||
jnthn | m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]D"; say $str.codes; | ||
camelia | rakudo-moar a073f5: OUTPUT«3» | ||
jnthn | Odd, the .chars and .codes are right there but something odd goes on at output | ||
m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]D"; say $str.NFD; | |||
camelia | rakudo-moar a073f5: OUTPUT«NFD:0x<0044 0323 0307 0044>» | ||
jnthn | That's correct too | ||
m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]D"; say $str.NFC; | |||
camelia | rakudo-moar a073f5: OUTPUT«NFC:0x<1e0c 0307 0044>» | ||
jnthn | As is that | ||
lizmat | yeah, it's only on output | 11:19 | |
11:19
WABSIAX joined
|
|||
lizmat | conversion to utf-8 maybe ? | 11:19 | |
jnthn | m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]D"; say $str.encode('utf-'); | ||
camelia | rakudo-moar a073f5: OUTPUT«Unknown string encoding: 'utf-' in block <unit> at /tmp/8m4lPRb9wN:1» | ||
jnthn | m: my $str = "D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]D"; say $str.encode('utf-8'); | ||
camelia | rakudo-moar a073f5: OUTPUT«utf8:0x<e1 b8 8c cc 87>» | ||
jnthn | m: say chr(87) | ||
camelia | rakudo-moar a073f5: OUTPUT«W» | ||
jnthn | Hmm | ||
lizmat | does chr() take hex ? | 11:20 | |
jnthn | oops | ||
lizmat | m: say chr(0x87) | ||
camelia | rakudo-moar a073f5: OUTPUT«» | ||
jnthn | And yeah, thinko :) | ||
Something is wrong in that utf-8 encoded output | |||
I'll investigate/fix/add test for it after lunch...which means shopping... At least I got my admin tasks done. :) | 11:21 | ||
lizmat | :-) | 11:22 | |
11:34
vendethiel joined
11:48
Ven left,
RabidGravy left
11:58
vendethiel left
11:59
cdc joined,
rurban left
|
|||
masak | I found this a fascinating read: boundvariable.org/press/tr-06-163.pdf | 11:59 | |
(and I'm guessing anyone connected with p6cc somehow will, too) | 12:00 | ||
so, today's mini-challenge: implement the Universal Machine from Figure 2 in Perl 6 :) | |||
DrForr pricks up his ear. | 12:01 | ||
12:03
vendethiel joined
|
|||
masak | I like the "(c) 19106" on the first page. I wonder if it's some kind of deliberate humor, or just a Y2K bug in the software that generated that string. | 12:04 | |
12:06
jlbhshluekg joined,
muraiki joined,
jlbhshluekg left,
jlbhshluekg joined,
jlbhshluekg left
|
|||
rarara | there is one thing which stumble me on this construct: my @fib := 1, 1, { $^a + $^b } ... *; why $^a and $^b? Wouldn't have been more general to pass the whole @fib (the calculated part) in an array? | 12:08 | |
masak | rarara: the block takes two parameters, so you get the last two values from the sequence. | ||
rarara: note that there's a difference between the *sequence* you're binding into the array, and the array itself. | 12:09 | ||
rarara | masak ok but if I wanted tribonacci instead of fibonacci I would have to add $^c ? | ||
masak | rarara: yes. | ||
rarara: I usually find it problematic (even with binding, as used here) to talk of the array that's being constructed. usually leads to infinite looping. | |||
rarara | @seq[n] := "The sum of all number from 0 to n? | 12:10 | |
what about this? | |||
masak | m: say [\+] 0..10 | ||
camelia | rakudo-moar a073f5: OUTPUT«0 1 3 6 10 15 21 28 36 45 55» | ||
rarara | this is nice of course; but not the same construct | ||
masak realizes he is not solving the problem on rarara's terms | |||
but that's part of my point: don't do it that way :) | |||
rarara | Ok, would have been nice if it was possble: could have been used for things like convolutions / integrations | 12:11 | |
which fine can be made in other ways | |||
masak | not saying it's impossible. | ||
saying it's not as wise an idea as you might think. | |||
12:12
mr-foobar left
12:14
Guest3343 is now known as felher
12:16
pecastro joined,
cschwenz joined
|
|||
jnthn | I've rejected RT #116525 and RT #117109; they wanted .reverse and .pick to flatten, but we decided in the GLR on a non-flattening policy. | 12:21 | |
synbot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=116525 | ||
jnthn | synbot6: Hey, you lazy git! Give *both* links! | ||
masak submits a pull request for that | 12:22 | ||
hm, where's synbot6's repo? | 12:23 | ||
oh, it's still github.com/tadzik/synopsebot | |||
12:23
brrt joined
|
|||
btyler | is there any way to serialize a sub + environment at runtime? I was thinking of a goofy project to hack up a thread scheduler that schedules things on remote boxes instead of threads. | 12:23 | |
brrt | m: my @a = qw[a b c]; if any @a eq 'b' { say "YAY"; } else { say "NOES"; } | ||
camelia | rakudo-moar a073f5: OUTPUT«NOES» | ||
btyler | just for kicks, mind you | 12:24 | |
brrt | m: my @a = qw[a b c]; if any(@a) eq 'b' { say "YAY"; } else { say | ||
"NOES"; } | |||
camelia | rakudo-moar a073f5: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat /tmp/LdMvyhyXMV:1------> 3any(@a) eq 'b' { say "YAY"; } else { say7⏏5<EOL>Missing blockat /tmp/LdMvyhyXMV:1------> 3any(@a) eq 'b' { say "YAY"; } else { say7⏏5<EOL>…» | ||
brrt | m: my @a = qw[a b c]; if any @a eq 'b' { say "YAY"; } else { say "NOES"; } | ||
camelia | rakudo-moar a073f5: OUTPUT«NOES» | ||
brrt | m: my @a = qw[a b c]; if any(@a) eq 'b' { say "YAY"; } else { say "NOES"; } | ||
camelia | rakudo-moar a073f5: OUTPUT«YAY» | ||
brrt | parsing thingy | ||
is this intended? | 12:25 | ||
jnthn | Not a bug. | ||
brrt | right :-) | ||
jnthn | Yes, list ops drop precedence pretty low :) | ||
brrt | hmm | ||
m: my @a = qw[a b c]; say @a.any eq 'b'; | |||
camelia | rakudo-moar a073f5: OUTPUT«any(False, True, False)» | ||
brrt | hence the preference for method calls i guess | ||
masak | speak for yourself | 12:26 | |
in this case, coulda solved it with `if 'b' eq any @a` | |||
brrt | i speak for... i don't... :-( | ||
yeah | |||
masak | just need to keep in mind that listops have one of them Haskell `$` invisibly attached to them | ||
like an invisible starting paren, with the ending paren coming at the end of the expr | 12:27 | ||
12:30
mj41 joined
|
|||
DrForr | Test::is_deeply() would be more useful with some way to point out where the difference starts. /me makes a note for later. | 12:30 | |
12:30
cognominal joined
|
|||
mj41 | mls: say "abc{Uni.new(0x1E0C, 0x0307).Str}abc" | 12:31 | |
yoleaux | 3 Apr 2015 23:45Z <hoelzro> mj41: the docker folk have added an official repo for rakudo-star | ||
masak just did something that made him go "oh, I've got to blog about this" | |||
jnthn | haha... | ||
char * MVM_string_utf8_encode_substr(MVMThreadContext *tc, | |||
MVMString *str, MVMuint64 *output_size, MVMint64 start, MVMint64 length) { | |||
/* XXX This is terribly wrong when we get to doing NFG properly too. One graph may | 12:32 | ||
* expand to loads of codepoints and overflow the buffer. */ | |||
Except the code is too robust to actually overflow the buffe | |||
So it doesn't, it just drops the codepoints instead :P | |||
masak | darn you, robust code. | ||
jnthn fixes it :) | |||
jepeway | m: use Test; my $s = sub {}; is $s, sub {}, "sub"; # what's the right way to do this? | 12:33 | |
camelia | rakudo-moar a073f5: OUTPUT«Code object coerced to string (please use .gist or .perl to do that) in sub is at lib/Test.pm:135Code object coerced to string (please use .gist or .perl to do that) in sub is at lib/Test.pm:135ok 1 - sub» | ||
mj41 | mls: say "abc{Uni.new(0x1E0C, 0x0307).Str}abc" | ||
moritz | jepeway: what are you trying to do? | ||
jnthn | mj41: Did you mean "m:" :) | ||
moritz | m: use Test; cmp_ok sub { }, &[===], sub { } | 12:34 | |
camelia | rakudo-moar a073f5: OUTPUT«not ok 1 - # Failed test at /tmp/LBBXtpGtq6 line 1Code object coerced to string (please use .gist or .perl to do that) in sub cmp-ok at lib/Test.pm:202# expected: ''Code object coerced to string (please use .gist or .perl to do that) in…» | ||
mj41 | yes, but don't know how it become mls | ||
jnthn | mj41: Tab completion? :) | ||
moritz | mj41: by tab completion :-) | ||
jepeway | test that two "subs" are the "same" | ||
moritz | jepeway: use === (or !===) for that | ||
m: use Test; cmp_ok sub { }, &[!===], sub { } | |||
camelia | rakudo-moar a073f5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DpSkWc2gc1Variable '&infix:<!===>' is not declared. Did you mean any of these? &infix:<===> &infix:<=:=>at /tmp/DpSkWc2gc1:1------> 3use Test; cmp_ok sub { }, &[!===]7⏏5, sub { }…» | ||
moritz | m: use Test; cmp_ok sub { }, { $^a !=== $^b }, sub { } | 12:35 | |
camelia | rakudo-moar a073f5: OUTPUT«ok 1 - » | ||
mj41 | yes, but I do not use <tab> ... probably some xchat bug | ||
mls: say 'ok' | |||
moritz | muhaha | 12:36 | |
12:36
rindolf joined
|
|||
jepeway | ok. er...moritz: ok, gotcha. | 12:36 | |
mj41 | m: say "abc{Uni.new(0x1E0C, 0x0307).Str}abc" | 12:37 | |
camelia | rakudo-moar a073f5: OUTPUT«abcḌ̇ab» | ||
mj41 | fixed, google++ | ||
jnthn | mj41: Yes, that's another case of the utf-8 encoder "I dunno NFG enough yet" thing I'm fixing at the moment :) | 12:38 | |
jepeway | moritz: should &is be smarter? or is it meant to do simple things, and cmp_ok with a comparator is where you're s'posed to go for trickier tests? | ||
mj41 | xchat: Preferences - Input box -> Automatic nick completion (without TAB key) | ||
12:39
laouji left
|
|||
moritz | jepeway: the latter | 12:39 | |
mj41 | thanks, jnthn++ | ||
moritz | jepeway: &is is supposed to do string comparisons, though recently we've made it a bit smarter when comparing to type objects | 12:40 | |
but it shouldn't become too smart, to be able to stay predictable | |||
jepeway | moritz: understood. | 12:41 | |
timotimo | o/ | ||
jepeway | moritz: thankee, btw. | 12:42 | |
moritz | jepeway: you're welcome | 12:43 | |
12:44
domidumont left
|
|||
jepeway | gone. | 12:44 | |
12:46
muraiki left
12:49
pippo joined
|
|||
masak | > I've rejected RT #116525 and botsnack and RT #117109; | 12:50 | |
]]] Link: rt.perl.org/rt3//Public/Bug/Displa...?id=116525 | |||
synbot6 | om nom nom | ||
masak | ]]] om nom nom | ||
]]] Link: rt.perl.org/rt3//Public/Bug/Displa...?id=117109 | |||
hehe | |||
jnthn: ^^^ | |||
submitting pull request now. | |||
jnthn | :) | 12:53 | |
masak++ | |||
masak | tadzik: github.com/tadzik/synopsebot/pull/6 | 12:58 | |
the "oh, I've got to blog about this" thing I did was, before I wrote this patch, I set up a small 11-line REPL that instrumented Synopsebot and with which I could debug it as I wrote the solution. | 12:59 | ||
could also have written tests in much the same way, but that felt a little overengineered in this case. | 13:00 | ||
13:01
lucasb joined
|
|||
lucasb | good friday to you o/ | 13:02 | |
masak | \o | ||
lucasb | m: Failure.new(Exception.new) | ||
camelia | rakudo-moar a073f5: OUTPUT«No exception handler located for catch at <unknown>:1 (/home/camelia/rakudo-inst-2/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295) from src/gen/m-CORE.setting:16475 (/home/camelia/rakudo-inst-2/share/perl6/runtime/CORE.setting.moarvm:si…» | ||
lucasb | m: Failure.new(Exception.new); 1 | 13:03 | |
camelia | rakudo-moar a073f5: OUTPUT«(signal SEGV)» | ||
lucasb | I don't know why the last statement is special for rakudo... | 13:04 | |
moritz | it's not evaluated in sink context | ||
lucasb | In "2;3;4", only 2 and 3 get warnings for useless use | ||
moritz | which is kinda a bug | ||
lucasb | moritz: oh, thanks | ||
moritz | in the general case, when you have code inside a block, the last statement is returned | 13:05 | |
hence it's not in sink context | |||
and we haven't fixed that for the mainline | |||
m: sub f { 2; 3; 4 }; say f() | |||
camelia | rakudo-moar a073f5: OUTPUT«4» | ||
moritz | it doesn't warn inside subs either :( | ||
jnthn | For the mainline, we didn't fix it 'cus the REPL wants it that way also... | 13:06 | |
moritz | right | ||
lucasb | Maybe this is helping hide some bugs, because I have to put one at the end "...; 1" | 13:08 | |
I thought maybe "sink Failure.new(Exception.new)" would give the same segfault, but maybe I don't know how to use sink | 13:09 | ||
jnthn will investigate the SEGV | 13:10 | ||
lucasb | jnthn: thanks! | ||
moritz | m: Failure.new(Exception.new).sink | ||
camelia | rakudo-moar a073f5: OUTPUT«(signal SEGV)» | ||
moritz | there ya go | ||
lucasb | moritz++ | ||
masak submits rakudobug | |||
jnthn largely re-did the UTF-8 encoder to it'll handle NFG and use less memory in the common case | 13:12 | ||
Currently spectesting. | |||
timotimo | wow, that's ... | ||
moritz | Exception.new leaves $!ex and $!bt undefined | 13:14 | |
pippo | jnthn++ | ||
moritz | but the rest of the code assumes that they are set | ||
13:14
skids joined
|
|||
moritz | and it's the catching/throwing code that generates a new exception and binds $!ex and $!bt into them | 13:15 | |
jnthn | moritz: Still shouldn't SEGV either way... | ||
hoelzro | o/ #perl6 | ||
jnthn | moritz: I'll fix the SEGV at Moar level and leave somebody else to figure out what it should actually do | ||
moritz | m: Failure.CREATE.sink | ||
camelia | rakudo-moar a073f5: OUTPUT«Method 'throw' not found for invocant of class 'Any' in block <unit> at /tmp/zypTeglcI2:1» | ||
masak | rt.perl.org/Ticket/Display.html?id=124434 | 13:16 | |
lucasb | masak++, thanks | 13:17 | |
cognominal | if you want to segfault moarvm rakudo : use rule :s | 13:28 | |
unimplemented pragma should not have license to segfault :) | 13:29 | ||
13:30
rurban joined
|
|||
hoelzro | my @values{1..*} creates a 1-indexed array, right? | 13:31 | |
cognominal | probably use could use some expertise. | ||
masak | cognominal: is this something you can reproduce on camelia? | ||
walk & | 13:32 | ||
13:33
kaare__ left
|
|||
cognominal | maybe I don't want to segfault camelia. What happens then | 13:33 | |
13:33
xfix joined,
xfix left,
xfix joined
|
|||
jnthn | cognominal: It creates a separate Rakudo process, so camelia is unharmed. | 13:36 | |
cognominal | it happens on the Perl 6 shell | ||
m: use rule :s | |||
camelia | rakudo-moar a073f5: OUTPUT«===SORRY!===Could not find rule in any of: /home/camelia/.perl6/2015.04-130-ga073f5d/lib, /home/camelia/.perl6/2015.04-130-ga073f5d, /home/camelia/rakudo-inst-2/share/perl6/lib, /home/camelia/rakudo-inst-2/share/perl6/vendor/lib, /home/camelia/rakudo-in…» | ||
cognominal | So it's Perl 6 shell specific | 13:37 | |
timotimo | perl6 shell? | 13:38 | |
oh, the REPL | 13:39 | ||
the REPL has some ... problems | |||
hoelzro: i don't think that's implemented yet | |||
cognominal | and it happens even if ones launch it as: perl6 --target=parse | ||
13:40
thou joined
13:41
skids left
|
|||
cognominal | timotimo: that's too bad because that's should be the best way for people to dip their toes in the Perl 6 ocean to test its water. | 13:41 | |
timotimo | that's true ;( | 13:42 | |
cognominal | if that clips their toes they will not come back. | ||
I can't understand why that behavior is REPL specific | 13:44 |