»ö« 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! Set by masak on 12 May 2015. |
|||
00:08
sirdancealot left
00:20
laouji joined
|
|||
Mouq | doc's htmlify.pl seems to be broken on perl6 version 2015.05-114-g5afe889 built on MoarVM version 2015.05-43-gdb72ab9 | 00:21 | |
Ah, perhasp only without Inline::Python. It currently dies with "const_iX NYI", but I suspect it'll work after installing I::P | 00:23 | ||
Hm. Nope | 00:27 | ||
00:33
vendethiel joined
00:39
laouji left,
laouji joined
|
|||
timotimo | huh? did you rebuild stuff? | 00:42 | |
grondilu just added '^arm' in Configure.pl to see if JIT would work on his Raspberry Pi | 00:43 | ||
timotimo | we shouldn't be emitting const_i8, const_i16 or const_i32 ops at all | ||
except maybe we do? | |||
00:44
atweiden left,
laouji left
|
|||
timotimo | didn't see anything of that sort | 00:45 | |
they are not even mapped on rakudo or nqp | 00:46 | ||
00:47
laouji joined
|
|||
timotimo | Mouq, the only way i could explain that would be a stale bytecode file or something .. ?! | 00:47 | |
ugexe | you might want to double check that regex. i made a pr before which corrected a similar regex meant for rpi which should have been ^earm | 00:49 | |
colomon | ah crap, updating rakudo broke one of my $work scripts | 00:54 | |
timotimo | dang! | 00:56 | |
can you tell us what went wrong? | 00:57 | ||
did you hit a fresh deprecation? | |||
00:58
vendethiel left
|
|||
timotimo | i hope you noticed it through a harmless action, or a test suite | 01:00 | |
and not by breaking something | |||
aaaah. much better. | 01:08 | ||
grondilu got a segfault. So no JIT for my Pi | 01:13 | ||
01:13
BenGoldberg joined
|
|||
timotimo | we can't jit arm in moarvm anyway | 01:17 | |
of course you can try to run x86_64 bytecode on your Pi ;) | 01:23 | ||
grondilu | that would not halt and catch fire, would it? :) | 01:26 | |
timotimo | dunno | ||
SIGBUS or something? :) | |||
dalek | kudo/nom: 166d04a | timotimo++ | src/Perl6/Optimizer.nqp: can optimize METAOP_ASSIGN even for attributes before this, we only "inlined" (manually) METAOP_ASSIGN if the target of the assignment is a $-sigil'd variable. now we also allow the target to be a callmethod - on anything, really. hopefully this is right. it doesn't break any spec tests, at least. |
01:30 | |
p: fb4892f | Coke++ | ports/macports/ (2 files): Add sample nqp port |
01:31 | ||
[Coke] | ^^ work in progress. Don't yet have a port created, so we can't do updates post release. Also, need to add nqp-jvm | ||
timotimo | used to be: | 01:34 | |
19.76user 0.03system 0:19.81elapsed 99%CPU (0avgtext+0avgdata 85432maxresident)k | |||
14.79user 0.01system 0:14.81elapsed 99%CPU (0avgtext+0avgdata 80348maxresident)k | |||
^- is now | |||
01:35
dayangkun joined
|
|||
timotimo | 36.76user 0.02system 0:36.80elapsed 99%CPU (0avgtext+0avgdata 96836maxresident)k | 01:38 | |
^- in the very beginning | |||
Mouq | timotimo: An edge case: | 01:39 | |
m: my class Foo { method bar is rw { (state $b)++; $b } }; my $f = Foo.new; Foo.bar += 15; say Foo.bar | |||
camelia | rakudo-moar c2a57e: OUTPUT«17» | ||
Mouq | Local, 18 | ||
Dunno how stupid that case is, but just noting it changes the behavior slightly | 01:40 | ||
timotimo | hold on, i'll investigate | ||
basically we used to evaluate Foo.bar twice? | |||
Mouq | Other way around | ||
timotimo | we used to evaluate it three times? | 01:41 | |
Mouq | haha | ||
timotimo | so we're actually doing better now, because of the optimizer | ||
Mouq | It used to be evaluate Foo.bar, then do += on the resulatant container. Now it's optimized to Foo.bar = Foo.bar + 15 | 01:42 | |
*resultant | |||
timotimo | ah | ||
dalek | p: 7a19c01 | Coke++ | ports/macports/Portfile: Add support for nqp-jvm subport |
||
Mouq | camelia is old | ||
timotimo | ah, "local" is your local machine that has the patch | ||
i thought you kept the old one | |||
[Coke] | Which fails during config time here since I don't have java 7 installed. | ||
Mouq | sorry for being unclear | ||
timotimo | it's all right | ||
[Coke] | will test that at work tomorrow and hopefully get it into the port system. | ||
timotimo | but i'm going to drive me and my guests home and have a sleep | ||
are you QAST::able? | 01:43 | ||
Mouq | me? | ||
01:44
yqt left
|
|||
timotimo | if you could QAST::Op( :op('bind'), QAST::Var.new( :name($some_qast_node.unique('metaop_assign_thingie')), :decl<local> ), $the_qast_of_the_thing_to_bind_to ) | 01:44 | |
er, hold on | |||
01:44
vendethiel joined
|
|||
timotimo | :decl(var), :scope('local') | 01:45 | |
and use that as the value to change, but then without the :decl | |||
that would be fantastic :) | |||
bbl or bbiab or bbtomorrow | |||
Mouq | I'll try to look into it. o/ timotimo | ||
timotimo | thank you! :) | 01:51 | |
--target=ast and --target=optimize are your friend | |||
o/ | |||
02:06
vendethiel left
02:18
llfourn joined
02:22
llfourn left
02:29
vendethiel joined
02:35
rmgk_ joined,
rmgk left,
rmgk_ is now known as rmgk
02:36
noganex_ joined
02:40
noganex left,
mr_ron joined
|
|||
mr_ron | m: my class Foo { my $b; method bar is rw { $b++ } }; my $f = Foo.new; Foo.bar += 15 | 02:41 | |
camelia | rakudo-moar c2a57e: OUTPUT«Cannot modify an immutable Int in block <unit> at /tmp/HRYSrmrUVM:1» | ||
mr_ron | not the best coding idea but LTA response | ||
02:42
mr_ron left
|
|||
hoelzro | I was thinking about a similiar issue just yesterday | 02:43 | |
m: sub foo(Str $in) { $in .= substr(0, 3) }; foo('baz') | |||
camelia | rakudo-moar c2a57e: OUTPUT«Cannot modify an immutable Str in block <unit> at /tmp/iE1ejxi3kn:1» | ||
hoelzro | I was wondering if Rakudo should recommend 'is copy' | ||
02:50
vendethiel left
|
|||
raydiak | .tell FROGGS weird thing...'say EVAL "(:a(1):b(2))"' gives 'a => 1 b => 2' as expected, but the same with $*RESTRICTED set only gives 'a => 1' | 03:18 | |
yoleaux | raydiak: I'll pass your message to FROGGS. | ||
03:19
BenGoldberg left
|
|||
skids | Maybe MAIN should "assume a separate argument" for things like "-k foo" iff they are defined as e.g. "Str:D :$k". Practically any script emulating legacy commandline syntax won't be able to use MAIN otherwise. | 03:54 | |
or maybe a trait. | 03:56 | ||
03:58
flaviusb left
|
|||
jdv79 | skids: huh? | 04:00 | |
skids | currently MAIN won't parse commandline arguments that are one-dash followed by a value as named parameters. | 04:01 | |
(sub MAIN I mean) | |||
jdv79 | ah | ||
04:20
molaf left
04:37
diana_olhovik_ joined
04:39
rurban joined
04:45
|Tux| left,
|Tux| joined
04:52
quester joined
04:53
skids left
05:04
flaviusb joined
05:11
rurban left
05:16
grondilu left
05:17
grondilu joined
05:21
kaare__ joined
05:27
diana_olhovik_ left
|
|||
dalek | ast: 8319ef6 | moritz++ | S02-names/is_default.t: RT# 125324: "is default" should distribute over a list of variables |
05:31 | |
05:34
jack_rabbit joined
|
|||
moritz | should "is default" work on attributes too? | 05:37 | |
05:42
jack_rabbit left
05:45
SevenWolf left,
domidumont joined
05:50
domidumont left
05:51
domidumont joined
05:52
jack_rabbit joined
05:56
llfourn joined
05:58
FROGGS joined
06:00
llfourn left
06:05
diana_olhovik joined
|
|||
FROGGS | good morning | 06:07 | |
yoleaux | 03:18Z <raydiak> FROGGS: weird thing...'say EVAL "(:a(1):b(2))"' gives 'a => 1 b => 2' as expected, but the same with $*RESTRICTED set only gives 'a => 1' | ||
FROGGS | raydiak: WAT | 06:08 | |
raydiak | that's what I thought, even double-checked to make sure I was using the right rakudo both times... | ||
06:10
jack_rabbit left
|
|||
raydiak | gist.github.com/raydiak/46b0727fddfd3c0b659e | 06:11 | |
06:12
RabidGravy joined
|
|||
FROGGS | that does not make sense | 06:13 | |
raydiak | yeah I looked at your moar commit, I totally don't get it either if it makes you feel any better :) | ||
FROGGS | raydiak: what about this: MVM_UNSAFE_DISABLE=1 perl6 -e 'say EVAL "(:a(1):b(2))"' | ||
raydiak | Unhandled exception: Operation 'stat' is not allowed in a restricted environment | 06:14 | |
FROGGS | hmmm, what does it try to stat? | ||
raydiak: are you on darwin? | 06:15 | ||
raydiak | it's in load_setting in ModuleLoader | ||
nope linux | |||
FROGGS | ohh, it... yeah | ||
I see it here too | 06:16 | ||
raydiak | pickes the env var up early enough to refuse to load core? | ||
*picks | |||
06:16
domidumont left
|
|||
FROGGS | probably yes | 06:17 | |
btw, your first example from the gist segfautls here :S | |||
MVM_string_ascii_decode (tc=tc@entry=0x603730, result_type=0x0, ascii=ascii@entry=0x7ffff5caffc8 "rakudo_scalar", bytes=13) at src/strings/ascii.c:6 | |||
6 MVMString *result = (MVMString *)REPR(result_type)->allocate(tc, STABLE(result_type)); | |||
raydiak | wow | 06:18 | |
FROGGS | so the rakudo scalar result type is NULL | ||
raydiak: did you recompile nqp and rakudo? | |||
raydiak | oh probably important to note I merged nom into the branch after I noticed this, seeing if it'd fix/change anything but it didn't | 06:19 | |
yes recmopiled all | |||
recompiled | |||
FROGGS | hmmm | ||
maybe the moarvm branch needs changes from master | |||
raydiak | by hand because rakudobrew was being fussy or I don't know how to use the triple command :) | ||
erm, right, not merged nom, but merged moarvm/master into moarvm/restricted | 06:21 | ||
FROGGS | yeah, realised that just a second ago | 06:22 | |
raydiak | haven't tried spectesting it | 06:24 | |
wonder if something is silently failing under restriction, deep in the bowels of who-knows-what | 06:25 | ||
jdv79 | moritz: interesting idea. is there a way now, without "is default", to get back the to an attr's default value? | ||
06:26
domidumont joined
06:30
espadrine joined
06:32
xinming_ joined
06:34
vendethiel joined
06:35
xinming left
|
|||
FROGGS | raydiak: that's also my suspicion | 06:38 | |
raydiak | FROGGS: sanity test is clean, spectest is clean up to S06 so far | ||
though, I guess it won't be triggered by any of the tests | 06:40 | ||
FROGGS | $ perl6 -e 'my $*RESTRICTED; say EVAL "(:a(1):b(2))"' | ||
getenvhash is unsafe | |||
a => 1 | |||
found it | |||
raydiak | \o/ | ||
nice catch | |||
FROGGS | fprintf debugging ftw | ||
I just put "fprintf(stderr, "%s is unsafe\n", info->name); \" in MoarVM/src/interp.c at line 36 | 06:41 | ||
now this one works: | |||
$ perl6 -e 'my $*RESTRICTED; say EVAL "(:a(1):b(2))"' | |||
a => 1 b => 2 | |||
raydiak | ah ha, cool | 06:42 | |
FROGGS | would be nice to not need that op though | ||
raydiak | are env var checks common in the code though? dunno how we'd handle that if they're scattered all over | 06:44 | |
FROGGS | there is not much that uses ENV at all... and none of them should be hit in our test case here | 06:45 | |
raydiak | also, shouldn't it like...break loudly when it hits one of those instead of silently doing something weird? | ||
FROGGS | ohh, found it | ||
rakudo/src/Perl6/Actions.nqp:4825: if nqp::getenvhash<COLONPAIR> eq 'trace' { say($/.dump) } | |||
06:46
_mg_ joined
|
|||
moritz | jdv79: not that I'm aware of | 06:46 | |
06:47
_mg_ left
|
|||
raydiak | FROGGS: maybe it'd be better for some of the ops to do something besides throw an exception...like return an empty env hash | 06:49 | |
06:53
llfourn joined,
Ven joined
06:57
Ven left
06:59
vendethiel left
07:05
kaare__ is now known as kaare_
07:06
mr-foobar left
07:07
Ven joined
07:11
uncleyear left,
uncleyear joined
07:14
Foxcool joined
07:19
dolmen joined
07:20
mr-foobar joined
07:21
_mg_ joined
|
|||
raydiak | \o g'night FROGGS, #perl6 | 07:21 | |
07:22
llfourn left
07:23
jack_rabbit joined
|
|||
Ven | o/ #perl6! | 07:24 | |
07:25
_mg_ left
07:29
salva joined
|
|||
jnthn | morning o/ | 07:31 | |
07:35
uncleyear left,
uncleyear joined
07:37
dolmen left
07:41
llfourn joined
07:46
_mg_ joined
07:47
labster left
|
|||
FROGGS | raydiak: yeah... we need to discuss that I think | 07:50 | |
morning Ven and jnthn | |||
07:50
_mg_ left
07:53
labster joined
|
|||
FROGGS | m: use nqp; my $v is default(42) = 21; say $v; say nqp::getattr($v,$v.VAR.WHAT.^mixin_base,'$!descriptor').default # jdv79: we potentially can make it available | 07:58 | |
camelia | rakudo-moar c2a57e: OUTPUT«2142» | ||
08:01
jack_rabbit left
08:06
g4 joined,
g4 left,
g4 joined
08:11
amurf left
08:12
darutoko joined
08:14
liztormato joined,
espadrine left
|
|||
liztormato waves from AMS | 08:14 | ||
08:15
liztormato left
08:23
flaviusb left
|
|||
jnthn | Yays, my 120 mbit/s internets are installed :) | 08:23 | |
nwc10 | could you even get that in Sweden? | 08:26 | |
are you trying to make everyone outside of South Korea and Japan jealous? | |||
(and obviously the appropriate part of Prague) | |||
jnthn | Somewhere in Sweden probably, where I was I don't think so :) | 08:27 | |
08:27
kaare__ joined
08:28
kaare_ left
|
|||
jnthn | Had something like 40 in Sweden. | 08:28 | |
And paid twice as much for it as I'm paying for the 120 here in Prague :) | |||
nwc10 | and we thought that you were only moving because of the beer | 08:29 | |
what speed is your beer connection? | |||
or is that still sneakernet? | 08:30 | ||
08:30
Ven left
|
|||
jnthn | Sneakernet, but the latency is way lower :) | 08:30 | |
There's a small bar with a 4-table outdoor terrace right outside of my building, which serves beer and, among over things, čevapčiči. :) | 08:32 | ||
FROGGS | jnthn: and you wife is from .cz? is that right? | 08:34 | |
your* | |||
moritz | jnthn: are you moving to Prague permanently? | ||
erm, wait, Prague was nwc10 | |||
FROGGS | moritz: he did... he's the first employee of the edument++ .cz office IIRC | 08:35 | |
moritz | cool | ||
but, but, but, "Czech Republic" doesn't match /^S/ | 08:36 | ||
moritz confused | |||
08:36
fhelmberger joined
|
|||
jnthn | FROGGS: No, .ua | 08:36 | |
moritz: Yes :) | |||
I...suspect *some* language manages the spelling enough to match /^S/ :) | 08:37 | ||
08:37
quester left
|
|||
FROGGS | that was what I was thinking :o) | 08:37 | |
jnthn | Hm...but none of the ones listed on Wikipedia | 08:38 | |
en.wikipedia.org/wiki/Name_of_the_C..._languages | |||
08:38
spider-mario left
08:39
rindolf joined
|
|||
nwc10 | I like čevapčiči | 08:39 | |
jnthn | .tell lizmat I get a failure on Windows in 55-use-trace.t; I thought it may just be line endings, but it looks like some weird path mangling issue... gist.github.com/jnthn/2b4565199f93e5f52cdd | 08:42 | |
yoleaux | jnthn: I'll pass your message to lizmat. | ||
08:48
Ven joined
08:49
Akagi201_ left,
Akagi201 joined
08:51
uncleyear left,
uncleyear joined
08:52
domidumont left
|
|||
bbkr_ | perl6 -e 'loop { $_ ~~ /.+/ }' # returns two different warnings randomly: "Use of uninitialized value of type Any in string context in block at -e:1" or "Use of uninitialized value of type Any in string context in method Str at /home/ppabian/.rakudobrew/moar-2015.05/install/share/perl6/runtime/CORE.setting.moarvm:1" | 08:52 | |
is one of them GC related? quite weird behavior | 08:53 | ||
08:56
domidumont joined
|
|||
jnthn | Looks odd indeed | 08:56 | |
Please RT it | 08:57 | ||
08:58
espadrine joined
08:59
Ven left
|
|||
bbkr_ | done | 09:00 | |
jnthn | Thanks! | 09:02 | |
09:05
flaviusb joined
|
|||
RabidGravy | is anyone that anyone knows of working on an XPath thing? I'm having a yak-a-day period | 09:07 | |
09:08
Ven joined
09:12
cognominal joined
|
|||
bbkr_ | how to properly free CPointer class in NativeCall? I have following code: gist.github.com/bbkr/4930c5bb9abaa2211756 and it never reaches DEMOLISH sub, just eats up all machine memory | 09:14 | |
09:20
uncleyear left
09:21
uncleyear joined
|
|||
bbkr_ | s/DEMOLISH/DESTROY/ #moose habits | 09:22 | |
FROGGS | RabidGravy: started to make bindings to libxml2... | 09:30 | |
09:31
laouji_ joined
09:33
Ven left
|
|||
cognominal | m: say Cool.^methods>>.WHAT | 09:34 | |
camelia | rakudo-moar c2a57e: OUTPUT«(Parcel)» | ||
cognominal | weird | ||
09:34
larion left
09:35
laouji left
09:36
kaare__ is now known as kaare_
09:46
telex left
09:48
telex joined
09:49
dayangkun left
|
|||
RabidGravy | FROGGS, yeah I've seen ;-) I may just work up an XPath expression grammar on the side | 09:49 | |
09:50
vendethiel joined
09:53
uncleyear left
09:54
uncleyear joined
10:00
amurf joined
10:04
Akagi201 left
10:05
amurf left
10:08
mr-foobar left
10:12
cschwenz joined
10:13
vendethiel left,
cschwenz left
10:14
mr-foobar joined
10:22
AlexDaniel joined
10:24
domidumont left
10:31
RabidGravy left
10:32
rurban joined
|
|||
Mouq | .tell timotimo BTW, gist.github.com/Mouq/815d79940dd964711e90 is my solution, but maybe you can make it more DRY? | 10:33 | |
yoleaux | Mouq: I'll pass your message to timotimo. | ||
10:34
meis joined
10:37
cognominal left
10:40
uncleyear left
10:41
uncleyear joined
10:42
larion joined
10:43
andreoss joined
|
|||
andreoss | is .sort(:by<key>) the same as .sort(*key)? | 10:45 | |
*.key | 10:46 | ||
dalek | ast: 5f50466 | jnthn++ | S15-nfg/many-combiners.t: Add tests to cover RT #125248. |
10:50 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125248 | ||
11:05
dakkar joined
11:07
ssqq joined
11:09
domidumont joined
11:14
smls_ joined
|
|||
smls_ | andreoss: I don't think .sort supports the :by adverb at all | 11:17 | |
11:21
mr-fooba_ joined,
mr-foobar left
11:29
uncleyear left
11:30
uncleyear joined
|
|||
ssqq | How to get all token name of grammar? | 11:31 | |
moritz | ssqq: tokens are just methods, so the typical introspection facilities (.^methods at all) apply | 11:32 | |
ssqq | p6: grammar G { token id { id } }; import G; say G.^methods | 11:35 | |
camelia | rakudo-moar c2a57e: OUTPUT«Method 'gist' not found for invocant of class 'NQPRoutine' in block <unit> at /tmp/tmpfile:1» | ||
moritz | p6: grammar G { token id { id } }; import G; say G.^methods>>.name | 11:36 | |
camelia | rakudo-moar c2a57e: OUTPUT«id parse parsefile subparse FAILGOAL upper CAPHASH CALL_SUBRULE !reduce_with_match !protoregex DYNQUANT_LIMITS !fresh_highexpect !DYNQUANT_LIMITS orig !cursor_start !protoregex_nfa !protoregex_table MATCH_SAVE RECURSE !cursor_more !cursor_pass !clear_highw…» | ||
11:37
_mg_ joined,
_mg_ left
|
|||
ssqq | moritz: thank you, | 11:39 | |
11:39
ssqq left
11:42
cognominal joined
11:47
fhelmberger left
11:49
amurf joined
11:50
ssqq joined
11:53
diana_olhovik left,
diana_olhovik joined
|
|||
andreoss | m: my @x = -1,2,-3,4,-5; say @x.sort(:by<abs>); | 11:53 | |
camelia | rakudo-moar c2a57e: OUTPUT«-5 -3 -1 2 4» | ||
andreoss | m: my @x = -1,2,-3,4,-5; say @x.sort(*.abs); | ||
camelia | rakudo-moar c2a57e: OUTPUT«-1 2 -3 4 -5» | ||
11:54
amurf left
|
|||
andreoss | m: my @x = -1,2,-3,4,-5; say @x.sort(:xyz<abc>); | 11:54 | |
camelia | rakudo-moar c2a57e: OUTPUT«-5 -3 -1 2 4» | ||
ssqq | When I use REPL, how to reset ENV just like `p6:` in IRC? | ||
timotimo | you mean "have all variables and everything cleared out"? | 11:58 | |
yoleaux | 10:33Z <Mouq> timotimo: BTW, gist.github.com/Mouq/815d79940dd964711e90 is my solution, but maybe you can make it more DRY? | ||
andreoss | ssqq: --setting=RESTRICTED | ||
11:59
uncleyear left
|
|||
moritz | ssqq: start a new REPL :-) | 11:59 | |
ssqq: camelia doesn't use the REPL feature; it write a temp file and runs it | |||
11:59
uncleyear joined
|
|||
andreoss | m: say %*ENV | 12:00 | |
camelia | rakudo-moar c2a57e: OUTPUT«HOME => /home/camelia, LANG => POSIX, LC_CTYPE => en_US.UTF-8, LOGNAME => camelia, MANPATH => /home/camelia/perl5/perlbrew/perls/perl-5.20.1/man:, PATH => /home/camelia/perl5/perlbrew/bin:/home/camelia/perl5/perlbrew/perls/perl-5.20.1/bin:/usr/local/sbin:/…» | ||
andreoss | --setting option is undocumented | 12:02 | |
12:21
mr-fooba_ left
12:22
mr-foobar joined
12:26
uncleyear left
|
|||
ssqq | timotimo: yes, then would not have 'redeclaration error'. | 12:27 | |
12:27
uncleyear joined
|
|||
cognominal | m: '' ~~ / <?before foo-bar> / | 12:27 | |
camelia | rakudo-moar c2a57e: OUTPUT«5===SORRY!5===Unrecognized regex metacharacter - (must be quoted to match literally)at /tmp/VVJxoE4xOL:1------> 3'' ~~ / <?before foo7⏏5-bar> /Unable to parse expression in metachar:sym<assert>; couldn't find final '>' at /tmp/VVJx…» | ||
ssqq | andreoss: p6 --setting=RESTRICTED | ||
12:28
andreoss left
|
|||
cognominal | m: '' ~~ / <?before <foo-ba>r> / | 12:29 | |
camelia | rakudo-moar c2a57e: OUTPUT«Method 'foo-ba' not found for invocant of class 'Cursor' in block <unit> at /tmp/qK9GGQvzTu:1» | ||
cognominal | better :) | ||
timotimo | > my $foo = 10 | ||
10 | |||
> my $foo = 20 | |||
20 | |||
no redeclaration error here :S | |||
12:30
Ven joined
12:31
ssqq_ joined
|
|||
smls_ | Why don't we have lazy Scalar's? :P | 12:32 | |
this: | 12:33 | ||
has $!attr = lazy do-some-calculation; | |||
would look nicer than this: | |||
has $!attr; method attr { $!attr //= do-some-calculation } | |||
moritz | because methods make it much more explicit when its being accessed | ||
scalars are evaluated on every type check, for example | 12:34 | ||
but there's a has $!attr will lazy do-some-calculation; | |||
smls_ | there is? | ||
moritz | possibly with parens around the calculation | ||
smls_ | When it's just done for performance reasons (don't do the calculation when the result is never accessed), I don't think it needs to be explicit | 12:35 | |
12:35
ssqq left,
yqt joined
|
|||
moritz | seems "will lazy" was backed out of core | 12:36 | |
timotimo | yes, to be put into a module | 12:37 | |
12:46
beastd joined
12:47
uncleyear left,
uncleyear joined
|
|||
hoelzro | o/ #perl6 | 12:50 | |
12:52
uncleyear left,
uncleyear joined
12:53
zakharyas joined,
FROGGS left
|
|||
timotimo | o/ hoelzro | 12:54 | |
hashtag-hoelzro | |||
hoelzro | ahoy timotimo | ||
12:54
ssqq joined
12:57
ssqq_ left
13:06
ssqq left
13:07
ggoebel left
|
|||
smls_ | Hm, has signal(SIGINT).tap({ }) stopped working? | 13:10 | |
13:12
bjz joined
|
|||
jnthn | works for me | 13:12 | |
smls_ re-rakudobrews | 13:13 | ||
jnthn just tried it :) | |||
I am on a not-yet-updated-to MoarVM | |||
13:15
uncleyear left
13:16
uncleyear joined
13:18
molaf joined
|
|||
smls_ | ➜ perl6 -e 'signal(SIGINT).tap({ say "SIGINT" }); prompt(":");' | 13:21 | |
:^C | |||
➜ | |||
jnthn: ^^ still no luck after 'rakudobrew triple nom master master' | |||
13:22
zakharyas left
|
|||
jnthn | smls_: Very odd...I try exactly that example and it works here | 13:22 | |
On Windows, fwiw. | |||
smls_ | Linux here | 13:23 | |
AlexDaniel | m: my $test; my $test | 13:24 | |
camelia | rakudo-moar c2a57e: OUTPUT«Potential difficulties: Redeclaration of symbol $test at /tmp/W51V_BtMB5:1 ------> 3my $test; my $test7⏏5<EOL>» | ||
AlexDaniel | is it possible to make it tell the line number of the first declaration? Should I report that? | 13:25 | |
13:25
cognominal left
13:29
RabidGravy joined
|
|||
geekosaur | it did, sort of? ":1" suffix | 13:35 | |
_itz | I think rt.perl.org/Ticket/Display.html?id=123728 can be closed as done (?) | ||
geekosaur | LTA perhaps though | ||
AlexDaniel | geekosaur: that's not the first declaration | 13:36 | |
geekosaur | hm, right | 13:37 | |
AlexDaniel | not that it is very critical, but still. I will report it then | 13:38 | |
m: my $foo = 'a'; my $bar = 'a'; say min(+$foo, +$bar); | 13:40 | ||
camelia | rakudo-moar c2a57e: OUTPUT«Inf» | ||
AlexDaniel | why Inf? | ||
arnsholt | m: say +"a" | 13:41 | |
camelia | rakudo-moar c2a57e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏) in block <unit> at /tmp/o8dIqJU3sY:1» | ||
geekosaur | that seems like it should report the conversion errors, at the very least | ||
arnsholt | Yeah, that's odd | ||
m: my $a = 'a'; say +$a; # What about this? | 13:42 | ||
camelia | rakudo-moar c2a57e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏) in block <unit> at /tmp/Xf7CaqKsIj:1» | ||
AlexDaniel | m: say min(+'a', +'a'); | ||
camelia | rakudo-moar c2a57e: OUTPUT«Inf» | ||
AlexDaniel | how short | ||
:) | |||
geekosaur | yug | ||
AlexDaniel | ok, gonna report that as well | ||
arnsholt | sub foo($x) { say $x }; foo(+'a'); # ? | 13:43 | |
m: sub foo($x) { say $x }; foo(+'a'); # ? | |||
camelia | rakudo-moar c2a57e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏) in block <unit> at /tmp/H8jBr_LI7i:1» | ||
13:47
fhelmberger joined
13:50
uncleyear left
13:51
uncleyear joined,
gfldex joined
|
|||
AlexDaniel | done | 13:52 | |
13:52
fhelmberger left
|
|||
AlexDaniel | m: say +"\b"; | 13:55 | |
camelia | rakudo-moar c2a57e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏' (indicated by ⏏) in block <unit> at /tmp/9Ce8_YOvw3:1» | ||
smls_ | m: Supply.interval(1).tap({ say $_ }); sleep 3 | 13:56 | |
camelia | rakudo-moar c2a57e: OUTPUT«0123» | ||
smls_ | ^^ jnthn: This produces no output for me either, locally | ||
AlexDaniel | that's kinda funny, on some terminals it removes ⏏ character | 13:57 | |
so you see in '' (indicated by ⏏), yeah, indicated by, but you can't see it :) | 13:58 | ||
and I'm thinking, is it a bug? | 14:00 | ||
moritz | if the terminal eats it, it's a bug in the terminal | ||
AlexDaniel | what do you mean by "eats it" | 14:01 | |
interprets it? | |||
moritz | removes it | ||
AlexDaniel | why? | ||
moritz | doesn't show it | ||
because it's supposed to show it :-) | |||
AlexDaniel | moritz: well, if you were a terminal, how would you print \b? | ||
moritz | AlexDaniel: what's ⏏ got to do with \b ? | 14:02 | |
AlexDaniel | well, \b is a backspace if I get it right, so it moves back by one character | ||
moritz | oh, now I understand | 14:03 | |
AlexDaniel | then prints more stuff on top of what existed | ||
moritz | you mean that rakudo should escape the \b in the error message? | ||
AlexDaniel | I feel like perl6 should actually print '\b' | ||
yeah | |||
moritz | yes, that's reasonable | ||
AlexDaniel | okay, gonna report that | ||
let's see what else can I find today :D | 14:04 | ||
14:12
rurban left
14:13
smls_ left
|
|||
masak | afternoon, #perl6 | 14:25 | |
PerlJam | masak: good morning from Texas :) | 14:27 | |
14:27
yqt left
14:29
rurban joined
|
|||
timotimo | i've just learnt there will be gulasch every day at the GPN | 14:29 | |
nwc10 | timotimo: that presumably is a good thing. As it justifies the G | 14:30 | |
timotimo | definitely | ||
during the last years there was only gulasch on a single day | 14:31 | ||
masak | what a planning mishap | 14:32 | |
PerlJam | Isn't "nacht" singular? Seems like they only promised one "day" | 14:35 | |
14:36
petercommand is now known as petercommand1
14:37
uncleyear left,
petercommand1 is now known as petercommand
14:38
uncleyear joined
14:40
laouji_ left
|
|||
timotimo | haha | 14:42 | |
well, the initial gpn was just a single night | |||
it also didn't have ~500 attendees | |||
14:48
smls joined
14:50
g4 left
14:52
smls_ joined,
smls left,
smls_ is now known as smls
|
|||
zostay | m: class { method postcircumfix:<( )>($test) { } }.^can('postcircumfix:<( )>').perl.say; | 14:56 | |
camelia | rakudo-moar c2a57e: OUTPUT«(method postcircumfix:<( )> (<anon> $: Any $test, *%_) { #`(Method|55958080) ... },)» | ||
zostay | m: class { method postcircumfix:<( )>($test) { } }.^can('postcircumfix:<()>').perl.say; | ||
camelia | rakudo-moar c2a57e: OUTPUT«()» | ||
zostay | m: class { method postcircumfix:<()>($test) { } }.^can('postcircumfix:<()>').perl.say; | ||
camelia | rakudo-moar c2a57e: OUTPUT«(method postcircumfix:<()> (<anon> $: Any $test, *%_) { #`(Method|56497088) ... },)» | ||
zostay | m: class { method postcircumfix:<()>($test) { } }.^can('postcircumfix:<( )>').perl.say; | ||
camelia | rakudo-moar c2a57e: OUTPUT«()» | ||
zostay | that feels like a bug to me | ||
Ven | m: say <()>.perl; say <( )>.perl; # zostay | 14:57 | |
camelia | rakudo-moar c2a57e: OUTPUT«"()"("(", ")")» | ||
14:59
hanekomu joined
|
|||
zostay | m: class { method postcircumfix:<( )>($test) { } }.^can('postcircumfix:<( )>').perl.say; | 14:59 | |
camelia | rakudo-moar c2a57e: OUTPUT«(method postcircumfix:<( )> (<anon> $: Any $test, *%_) { #`(Method|47934080) ... },)» | ||
ugexe | anyone know if a pure p6 gzip/deflate would likely be too slow to be useful for a useragent? | ||
zostay | i see | ||
nm | |||
smls | Also, I think classes are supposed to implement method CALL-ME instead of implementing method postcircumfix:<( )> directy. | ||
masak | zostay: probably there should at least be a warning at parse time for creating a method postcircumfix:<()> | 15:00 | |
warning or even error | |||
smls | m: sub postcircumfix:<()> { } | 15:01 | |
camelia | rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6aye1DAq2oNot enough symbols provided for categorical of type postcircumfix; needs 2at /tmp/6aye1DAq2o:1------> 3sub postcircumfix:<()>7⏏5 { }» | ||
zostay | why is CALL-ME preferred? | ||
Ven | zostay: because operators are defined as subs, usually | 15:02 | |
(the reasoning is that we can statically dispatch those. it has drawbacks, though) | |||
smls | I guess because there are other ways to invoke something than literally writing () parens after it | ||
and CALL-ME would make them work for your class like it does for buil-in callables | 15:04 | ||
zostay | that makes sense, documentation for CALL-ME, AT-POS, ASSIGN-KEY, etc. is conspicuously absent from docs.perl6.org and design.perl6.org | ||
smls | yeah | 15:05 | |
zostay | the old lowercase versions on S99, i think | ||
smls | I kind of figured out how to use the ones for postcircumfix:<{ }> by looking at the Rakudo source code | 15:06 | |
github.com/smls/undef/blob/master/...ivehash.p6 <-- used them here | |||
haven't played with the ones for [ ] and ( ) yet. | |||
zostay | yeah, most of what i've learned of perl6 has come from reading rakudo source... the docs are still too lean to depend on | 15:07 | |
or reading roast tests | |||
which are sort of part of the docs | 15:08 | ||
15:11
cognominal joined
15:18
mr-foobar left
|
|||
ugexe | i really like how the design docs link to approriate roast files | 15:23 | |
15:24
mr-foobar joined
|
|||
moritz | m: for <a b c>.kv -> $k, $v { say "$k: $v" } | 15:24 | |
camelia | rakudo-moar c2a57e: OUTPUT«0: a1: b2: c» | ||
ugexe | i also like golang's online docs where, method name headers for example, link to the source | 15:25 | |
15:27
amurf joined,
smls_ joined
|
|||
masak | I must say I found github.com/github/linguist/issues/2149 an interesting read | 15:28 | |
especially the p5ers who go "but p5 is so much more common, y u do this?" | |||
15:28
uncleyear left
15:29
uncleyear joined
|
|||
masak | (which is true, but not really adressing the actual problem of distinguishing well between Perl 5 and Perl 6 code.) | 15:29 | |
dalek | c: 73e57a9 | moritz++ | lib/ (2 files): Describe postcircumfix:<[ ]> in much greater detail |
||
15:29
smls__ joined
|
|||
AlexDaniel | m: my $x = "abc"; given $x { when 5 { say 'a' }; when "abc" { say 'b' }; when Bool { say 'c' }; } | 15:31 | |
camelia | rakudo-moar c2a57e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏abc' (indicated by ⏏) in block <unit> at /tmp/8oO28ZVK1r:1» | ||
AlexDaniel | what's wrong here? Is it a bug or I am doing it wrong? | ||
dalek | pan style="color: #395be5">perl6-examples: 49eeb3a | andreoss++ | lib/Pod/Htmlify.pm6: Explicit alphanumeric sorting of files and categories |
||
AlexDaniel | because I took that example from en.wikibooks.org/wiki/Perl_6_Progr...n_.2F_When | ||
15:31
smls left,
amurf left
|
|||
AlexDaniel | if it is supposed to throw an error then somebody has to fix that example, I guess? | 15:31 | |
moritz | AlexDaniel: you're checking 'abc' and 5 for numeric equality, which tries to coerce 'abc' to a number, which fails | 15:32 | |
yes | |||
should be when '5' I guess | |||
15:32
andreoss joined,
smls_ left
|
|||
ugexe | alternatively you can do an additional check | 15:34 | |
m: my $x = "abc"; given $x { when Int { when 5 { say 'a' }; }; when "abc" { say 'b' }; when Bool { say 'c' }; } | |||
camelia | rakudo-moar c2a57e: OUTPUT«b» | ||
15:34
smls__ left
|
|||
masak | _sri++ for contributing that github issues link, and for contributing to the general p5er dissatisfaction that "Perl 6 ruins Perl 5 stats" | 15:35 | |
I understand that a Bayesian filter might have a hard time distinguishing the two, but it doesn't sound like an unsolvable problem to me. just a generally interesting one. | 15:36 | ||
andreoss | m: my $x = 1; say $x.^methods.sort; | 15:37 | |
camelia | rakudo-moar c2a57e: OUTPUT«Code object coerced to string (please use .gist or .perl to do that) in any p6sort at src/vm/moar/Perl6/Ops.nqp:349Code object coerced to string (please use .gist or .perl to do that) in any p6sort at src/vm/moar/Perl6/Ops.nqp:349Code object coerce…» | ||
15:38
domidumont left
|
|||
AlexDaniel | ugexe: I edited it using your solution | 15:38 | |
andreoss | it segfaults | ||
grondilu | m: say (^1000).pick.polymod(2 xx *); | ||
camelia | rakudo-moar c2a57e: OUTPUT«0 1 0 1 0 0 0 1 0 1» | ||
grondilu | m: say .polymod(2 xx *) for ^100; | 15:39 | |
camelia | rakudo-moar c2a57e: OUTPUT«10 11 10 0 11 0 10 1 11 1 10 0 0 11 0 0 10 1 0 11 1 0 10 0 1 11 0 1 10 1 1 11 1 1 10 0 0 0 11 0 0 0 10 1 0 0 11 1 0 0 10 0 1 0 11 0 1 0 10 1 1 0 11 1 1 0 10 0 0 1 11 0 0 1 10 1 0…» | ||
grondilu | I have much weirder locally | ||
15:41
skids joined
|
|||
grondilu | gist.github.com/grondilu/d33f57b8820cc5fd4562 | 15:41 | |
15:41
domidumont joined
|
|||
andreoss | m: my @x = Method.new for 1..3; say @x.perl; | 15:43 | |
camelia | rakudo-moar c2a57e: OUTPUT«(signal SEGV)» | ||
andreoss | m: my $x = Method.new; say $x.perl; | ||
camelia | rakudo-moar c2a57e: OUTPUT«(signal SEGV)» | ||
ugexe | i ran that locally and do not get the same result as your gist either | ||
andreoss | m: Method.new.perl.say | ||
camelia | rakudo-moar c2a57e: OUTPUT«(signal SEGV)» | ||
andreoss | m: Method.new | 15:44 | |
camelia | ( no output ) | ||
AlexDaniel | m: say ^10; say 0..10 | 15:54 | |
camelia | rakudo-moar c2a57e: OUTPUT«0..^100..10» | ||
AlexDaniel | what's the difference? | ||
15:55
uncleyear left
|
|||
PerlJam | m: .say for 0..^10; | 15:55 | |
camelia | rakudo-moar c2a57e: OUTPUT«0123456789» | ||
PerlJam | m: .say for 0..10; | ||
camelia | rakudo-moar c2a57e: OUTPUT«012345678910» | ||
AlexDaniel | oh | ||
right | 15:56 | ||
ok | |||
15:56
uncleyear joined
|
|||
AlexDaniel | yay, smileys | 15:58 | |
m: .say for (6^..^9) | |||
camelia | rakudo-moar c2a57e: OUTPUT«78» | ||
AlexDaniel | what about ranges that are in the backward order? like | 16:00 | |
m: .say for 10..1 | |||
camelia | ( no output ) | ||
AlexDaniel | not even a warning | ||
hm, that's probably OK | 16:01 | ||
m: .say for Inf..1 | |||
camelia | rakudo-moar c2a57e: OUTPUT«(signal XFSZ)-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-922337203685…» | ||
AlexDaniel | what is this? | 16:02 | |
timotimo | range is strictly a minimum and maximum thing | ||
16:02
domidumont left
|
|||
AlexDaniel | okay, why does it hang on Inf..1 ? | 16:02 | |
timotimo | sequence still exists for backwards and more complex things | 16:03 | |
andreoss | m: say Inf after (Inf-1) | ||
camelia | rakudo-moar c2a57e: OUTPUT«False» | ||
andreoss | m: say (Inf - 1).succ | 16:04 | |
camelia | rakudo-moar c2a57e: OUTPUT«Inf» | ||
timotimo | it seems it uses the smallest integer it can find as the start point | ||
AlexDaniel | timotimo: bug? | ||
timotimo | dunno | ||
AlexDaniel | this one is also interesting: .say for -Inf..1 | ||
it prints Inf a couple of times and then starts printing -9223372036854775808 | |||
timotimo | ranges starting at negative inf are mostly useful for matching I imagine | ||
andreoss | shouldn't it go like Inf, Inf - 1 , Inf -2 ... 1? | 16:05 | |
AlexDaniel | andreoss: well, if 5..1 does not go 5 4 3 2 1 then no, it shouldn't | ||
timotimo | oh wait | ||
I misread your first code | |||
andreoss | m: .say for 5...1 | ||
camelia | rakudo-moar c2a57e: OUTPUT«54321» | ||
andreoss | m: .say for Inf...1 | ||
AlexDaniel | it works fine with three dots | 16:06 | |
camelia | rakudo-moar c2a57e: OUTPUT«(timeout)InfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfInfI…» | ||
timotimo | ... is smart | ||
it uses succ in this case | 16:07 | ||
i wonder what exactly .. did | |||
AlexDaniel | frankly speaking I don't know the difference, I'm just poking rakudo with a knife and look what happens | 16:08 | |
andreoss | m: .say for -5..1 | ||
camelia | rakudo-moar c2a57e: OUTPUT«-5-4-3-2-101» | ||
AlexDaniel | timotimo: -Inf..1 is even more interesting | ||
does not make any sense at all to me | 16:09 | ||
why would -Inf become -9223372036854775808 at some point... | |||
NaN..1 works exactly the same way | |||
whatever this is, I'm going to report it, it does not feel right | 16:11 | ||
it prints -9223372036854775808 exactly 1024 times :) | 16:15 | ||
andreoss | m: use nqp; say nqp::p6box_n(Inf) | ||
camelia | rakudo-moar c2a57e: OUTPUT«Inf» | ||
16:16
smls joined
|
|||
smls | m: say ((1, 2), (3, 4))>>.join.perl | 16:16 | |
camelia | rakudo-moar c2a57e: OUTPUT«("1", "2", "3", "4")» | ||
smls | ^^ Are hypers *supposed* to flatten? | ||
ugexe | m: say Parcel.new.max | 16:17 | |
camelia | rakudo-moar c2a57e: OUTPUT«-Inf» | ||
16:17
uncleyea1 joined,
uncleyear left
|
|||
AlexDaniel | Hahahaha! | 16:18 | |
This one actually counts up! .say for NaN..NaN | 16:19 | ||
m: .say for NaN..NaN | |||
camelia | rakudo-moar c2a57e: OUTPUT«(signal XFSZ)NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN…» | ||
colomon | smls: hypers are supposed to keep the same structure as the original | ||
AlexDaniel | ah no, first it prints 1024 NaNs | ||
andreoss | m: use nqp; say nqp::sub_n(Inf, 1e0); | 16:20 | |
camelia | rakudo-moar c2a57e: OUTPUT«Inf» | ||
colomon | m: say ((1, 2), (3, 4))>>++ | ||
camelia | rakudo-moar c2a57e: OUTPUT«Cannot assign to an immutable value in block <unit> at /tmp/GXPlY9dxkQ:1» | ||
colomon | m: say ((1, 2), (3, 4))>>.succ | ||
camelia | rakudo-moar c2a57e: OUTPUT«2 3 4 5» | ||
colomon | m: say ((1, 2), (3, 4))>>.succ.perl | ||
camelia | rakudo-moar c2a57e: OUTPUT«(2, 3, 4, 5)» | ||
16:21
smls left
16:27
uncleyea1 is now known as uncleyear
|
|||
andreoss | AlexDaniel: you might want to look at Range.pm | 16:27 | |
16:27
uncleyear left,
uncleyear joined
|
|||
Ven | AlexDaniel: Batman! | 16:27 | |
m: say NaN..NaN ~ ' batman` | |||
camelia | rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/voXocMsJonUnable to parse expression in single quotes; couldn't find final "'" at /tmp/voXocMsJon:1------> 3say NaN..NaN ~ ' batman`7⏏5<EOL> expecting any of: single quotes …» | ||
AlexDaniel | Ven: not batman, just -9223372036854775808 | ||
Ven | m: say NaN..NaN ~ ' batman' | ||
camelia | rakudo-moar c2a57e: OUTPUT«Earlier failures: Cannot convert string to number: trailing characters after number in 'NaN⏏ batman' (indicated by ⏏) in block <unit> at /tmp/PiNKtOIfwo:1Final error: Cannot call Real(Failure: ); none of these signatures match: (M…» | ||
andreoss | i did, and it seems to try using int if possible when reifies | 16:28 | |
AlexDaniel | andreoss: well, somehow I don't think that I am ready for this | 16:30 | |
andreoss | me neither | ||
but -9223372036854775808 comes from coercing to native integer for sure | 16:33 | ||
AlexDaniel | umm | ||
m: .say for Inf..0 | |||
.say for Inf..0.1 | |||
m: .say for Inf..0.1 | 16:34 | ||
camelia | rakudo-moar c2a57e: OUTPUT«(signal XFSZ)-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-9223372036854775808-922337203685…» | ||
rakudo-moar c2a57e: OUTPUT«(signal XFSZ)-9223372036854775808-9223372036854775807-9223372036854775806-9223372036854775805-9223372036854775804-9223372036854775803-9223372036854775802-9223372036854775801-9223372036854775800-9223372036854775799-922337203685…» | |||
andreoss | m: my int $x = 2 ** 63; say $x; | ||
camelia | rakudo-moar c2a57e: OUTPUT«-9223372036854775808» | ||
16:35
uncleyear left
16:36
uncleyear joined
|
|||
AlexDaniel | m: .say for 1...NaN; | 16:43 | |
camelia | rakudo-moar c2a57e: OUTPUT«(timeout)10-1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16-17-18-19-20-21-22-23-24-25-26-27-28-29-30-31-32-33-34-35-36-37-38-39-40-41-4…» | ||
AlexDaniel | why? | ||
tony-o_ | m: .say for NaN...1; | 16:44 | |
AlexDaniel | Nanananananana | ||
camelia | rakudo-moar c2a57e: OUTPUT«(timeout)NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNN…» | ||
tony-o_ | m: say 'batman' | 16:45 | |
camelia | rakudo-moar c2a57e: OUTPUT«batman» | ||
tony-o_ | perl6 bot game is tight | ||
AlexDaniel | tony-o_: what kinda bothers me is that it is not an infinite list | ||
so if you attempt to do something like my @a = NaN...1; | 16:46 | ||
it will just get stuck on it eating your memory | |||
tony-o_ | isn't that a lazy list? | ||
16:46
andreoss left
|
|||
AlexDaniel | I mean, yes, it should be lazy | 16:46 | |
but it isn't | |||
m: my @a = NaN...1; | |||
tony-o_ | oh, it's not | 16:47 | |
AlexDaniel | my @a = 1...NaN; | ||
m: my @a = 1...NaN; | |||
camelia | rakudo-moar c2a57e: OUTPUT«(timeout)» | ||
16:49
HuStmpHrrr joined
|
|||
HuStmpHrrr | hi guys, any recent benchmark on rakudo? | 16:50 | |
AlexDaniel | HuStmpHrrr: you mean that perlbench thing? | 16:51 | |
HuStmpHrrr | i mean the performance report type of thing on current rakudo implementation | 16:52 | |
16:53
meis left
|
|||
[Coke] | say uses .gist which doesn't print out infinite lists. | 16:53 | |
you'll get only the gist of it, not the whole thing. | |||
m: say (Inf...1)[20000] | 16:54 | ||
camelia | rakudo-moar c2a57e: OUTPUT«Inf» | ||
[Coke] | m: say (Inf...1)[Inf] | ||
camelia | rakudo-moar c2a57e: OUTPUT«Cannot coerce Inf or NaN to an Int in block <unit> at /tmp/96GKDBZIjW:1» | ||
AlexDaniel | [Coke]: how is this relevant? The problem is that NaN...1 is not a lazy list | 16:55 | |
oh wow, an error | |||
Inf...1 is not lazy as well | 16:58 | ||
17:06
uncleyear left
17:07
uncleyear joined
17:09
diana_olhovik left
|
|||
[Coke] | Someone was complaining that they only got X elements from the list. | 17:10 | |
m: my $a = NaN...1; | 17:11 | ||
camelia | rakudo-moar c2a57e: OUTPUT«(timeout)» | ||
[Coke] | m: my $a := NaN...1; | 17:12 | |
camelia | rakudo-moar c2a57e: OUTPUT«(timeout)» | ||
[Coke] | Yup, those should die asap, IMO. | ||
17:15
liztormato joined
|
|||
PerlJam | die? Or produce an infinite list of NaN? | 17:15 | |
liztormato waves from 38000 feet | |||
PerlJam waves back from approximately 20 feet | 17:17 | ||
geekosaur | arguably NaN should not participate in ranges | ||
PerlJam | those are sequences, not ranges | ||
AlexDaniel | geekosaur: what about Inf...1 ? | ||
17:17
espadrine left
|
|||
geekosaur | was trying to compose a "that's a harder question" | 17:17 | |
Ven | liztormato: that's pretty high :) | 17:18 | |
geekosaur | I think Inf has to not be part of a range or sequence as well, since there isn't really a meaningful *range* | ||
Ven | m: class Feet{has $.val}; say (^10000).map(Feet.new(val => *)).map(&say) | ||
camelia | rakudo-moar c2a57e: OUTPUT«Method 'count' not found for invocant of class 'Feet' in block <unit> at /tmp/SxGh2KwUf5:1» | ||
Ven | ( guess it should be Foot. | 17:19 | |
liztormato | Ven: courtesy of Delta | ||
17:20
yqt joined
|
|||
liztormato | Only 1:15 hour to go and I'm bored :-) | 17:21 | |
timotimo | super expensive and slow WiFi? | ||
liztormato | 4$ per hour | 17:22 | |
17:22
uncleyear left
|
|||
liztormato | Figured I'd be online for the last hour | 17:23 | |
17:23
uncleyear joined
|
|||
AlexDaniel | OH COME ON | 17:26 | |
m: my @a = 1...Inf | |||
camelia | ( no output ) | ||
AlexDaniel | cool, rightL | ||
? | |||
m: my @a = 1...-Inf | 17:27 | ||
17:27
salva left
|
|||
AlexDaniel | boom. | 17:27 | |
camelia | rakudo-moar c2a57e: OUTPUT«(timeout)» | ||
PerlJam | AlexDaniel: I don't see how that differs substantially from Inf...1 | ||
I mean if one behaves badly, I'd expect the other to do so as well. | 17:28 | ||
liztormato | m: my @a := -Inf ... 1 | ||
Hmmmmm... | |||
camelia | rakudo-moar c2a57e: OUTPUT«(timeout)» | ||
AlexDaniel | liztormato: rt.perl.org/Public/Bug/Display.html?id=125337 | 17:29 | |
liztormato: there is a small list of non-lazy stuff | 17:30 | ||
PerlJam | AlexDaniel: liz did binding though, not assignment. Do you mean she should add to the ticket? | ||
AlexDaniel | PerlJam: actually, I've not noticed it | 17:31 | |
and felt like "oh, I already tested that" | |||
sorry | |||
PerlJam | (I'mguessing that the GLR will take care of that particular wart though) | ||
liztormato | Yeah, please add to the ticket | ||
AlexDaniel | ok | ||
liztormato | Thanks! | 17:32 | |
17:34
liztormato left
17:35
liztormato joined
|
|||
liztormato | moritz: will lazy was removed before 2015.05 came out | 17:35 | |
17:37
liztormato left
17:38
liztormato joined
17:40
liztormato left
17:42
uncleyear left,
yqt left
17:43
uncleyear joined,
diana_olhovik joined
17:45
liztormato joined
|
|||
liztormato | Seems like the satellite is wonky | 17:46 | |
PerlJam | liztormato: how can you be bored with the excitement of potential network difficulty at any second? :) | 17:47 | |
17:47
_mg_ joined
|
|||
liztormato | :-). Yeah. DevOps heaven here ;-) | 17:47 | |
17:48
fhelmberger joined
17:53
fhelmberger left
17:54
espadrine joined
17:58
uncleyear left
17:59
uncleyear joined
18:01
_mg_ left,
Ven left
18:03
telex left
18:04
telex joined
18:05
liztormato left
18:08
liztormato joined
18:09
uncleyear left,
uncleyear joined
18:13
liztormato left
18:25
_mg_ joined
18:28
uncleyear left,
uncleyear joined
|
|||
hoelzro | does panda cause a segfault on Windows when installing one of its own dependencies (ex. panda install JSON::Tiny)? | 18:31 | |
I fixed that for *nix last night, but I'm not sure how one would approach a fix for Windows, if it's broken at all | |||
jnthn | hoelzro: Didn't last I tried it, but that was some days ago | 18:32 | |
hoelzro | jnthn: it's been doing it on Linux for about a week, I think | ||
according to others I've asked, anyway =) | |||
my Win32 fu is very weak | |||
interestingly enough, libuv allows other processes to delete files that uv_fs_open opens | 18:34 | ||
but I don't know if the reference counting POSIX semantics happen in this case on Win32 | |||
18:35
uncleyear left,
uncleyear joined
|
|||
dalek | p: 6da0dea | jnthn++ | tools/build/MOAR_REVISION: Bump MOAR_REVISION for event loop fixes. |
18:36 | |
18:36
liztormato joined,
_mg_ left
|
|||
liztormato waves from SLC | 18:36 | ||
18:36
liztormato left
|
|||
dalek | kudo/nom: 129a909 | jnthn++ | tools/build/NQP_REVISION: Get MoarVM with eventloop, normalization fixes. |
18:37 | |
kudo/nom: 97b27a5 | jnthn++ | t/spectest.data: Run S15-nfg/many-combiners.t. |
|||
skids | I never got a segv with panda yesterday. It is, however, currently doing something that results in a "cannot invoke null object" when it tries to strip pod out of Sum. | ||
18:38
_mg_ joined
|
|||
hoelzro | skids: I see the same issue with Linenoise | 18:39 | |
cognominal | skiids: got the same message when trying to install Linenoise | ||
hoelzro | that's been happening over the last few days | ||
18:39
_mg_ left
|
|||
jnthn | hoelzro: Panda passes tests and installs for me (on Win) | 18:40 | |
hoelzro | jnthn: that should work fine; try "panda install JSON::Tiny" with a freshly bootstrapped panda | ||
that triggered the segfault for me | |||
or sometimes it was a bytecode decoding freak out | 18:41 | ||
skids | I got the bytecode thing yesterday while trying to run doc/htmify.pm on Linux. | 18:42 | |
hoelzro | that's odd | 18:43 | |
then again, I don't fully understand how this just started happening recently | |||
18:43
labster left
18:45
rindolf left
|
|||
jnthn | hoelzro: No SEGV but I see things like this: | 18:45 | |
WARNING: unhandled Failure detected in DESTROY: | |||
Failed to copy 'C:\consulting\perl6\panda\.panda-work\1433529896_2\blib\lib\Panda\Ecosystem.pm.moarvm' to 'C:\consulting\MoarVM\install/share/perl6/site/lib\Panda\Ecosystem.pm.moarvm': Failed to copy file: unknown error | |||
hoelzro | eesh | ||
jnthn | When I install JSON::Tiny it then does something involving reverse deps? | 18:46 | |
And so goes re-installing Panda itself | |||
hoelzro | yeah, that's the part that would break for me | ||
jnthn | We mmap the bytecode file | ||
18:46
domidumont joined
|
|||
hoelzro | right, that's why it was segfaulting on *nix | 18:47 | |
jnthn | I *think* you can't go overwriting a file you're currently got mmap'd on Windows. | ||
How did you fix it on *nix? | |||
skids | Yeah same problem with a build made just before those last two commits -- same bytecode problem as gist.github.com/skids/7ba5cc3b031e69abcf83 ? | ||
hoelzro | the MapFileView docs say the behavior is undefined =( | ||
jnthn: unlink before the copy | |||
jnthn | Don't think that's going to work out on Windows... | 18:48 | |
hoelzro | open files are sort of reference counted on *nix, so you can delete a mmap'd file | ||
no, I don't think so =( | |||
I've been thinking about it all morning | |||
while eating lunch, I was thinking of instead creating entirely new files in the comp unit repo, and atomically updating the database to point to the new versions | 18:49 | ||
but that would then require some clean up of old files later =( | |||
hoelzro .oO( are we still using a JSONy database to resolve unit locations? ) | |||
jnthn | No, we us the serialization stuff for it now | ||
At least, I'm pretty sure that landed | 18:50 | ||
hoelzro | oh, ok | ||
jnthn: but it's still some sort of DB, right? | |||
jnthn | Right | 18:51 | |
hoelzro | ok, so we could go with that approach | ||
18:51
uncleyear left
18:53
uncleyear joined
|
|||
hoelzro | this article is interesting: www.catch22.net/tuts/self-deleting-executables | 18:53 | |
18:54
fernando___ left
19:00
FROGGS joined
|
|||
FROGGS | o/ | 19:03 | |
19:04
llfourn left
|
|||
hoelzro | o/ FROGGS | 19:05 | |
FROGGS | hi hoelzro :o) | ||
19:05
bin_005 joined
19:06
Sqirrel joined,
uncleyear left
19:07
uncleyear joined
|
|||
[Coke] | so, when installing nqp (moarvm) or nqp-jvm, we end up with no nqp, but an nqp-m or nqp-j - any suggestions on how to decide what ends up getting the coveted "nqp" executable, or if we should encourage using the vm specific name? | 19:07 | |
also, you can't tell macports to depend on particular versions of other macports. might end up with some upgrade pain there at some point. | 19:11 | ||
19:13
rurban left
|
|||
jnthn | [Coke]: Not sure this helps with macports much, but iirc the approach source builds take is that the one you mention first in the backends list is the one that gets the short alias | 19:14 | |
[Coke] | the wierd thing is that that file doesn't seem to get installed. | 19:15 | |
*weird* | |||
the config is specified by me in the portfile. pretty sure the defaults for building are "make" and "make install" | 19:16 | ||
it's not even in /opt/local/bin/nqp without exec bits, just not there. | |||
19:16
espadrine left
|
|||
[Coke] | I would be mostly ok with "last installed wins" | 19:17 | |
(and with ports, if you want both, you install them both. there isn't a nqp-moar&jvm port) | |||
19:21
[particle] left
|
|||
FROGGS | hmmmm, my first thought was that the nqp-* binaries suffice | 19:23 | |
geekosaur | the macports method is that you have a port foo_select which installs a template selection configuration; each port that can apply to that selection installs a selection data file, and then port select is used to select which selection configuration is used | ||
[Coke] | ah. | 19:24 | |
I can probably make that work. | 19:25 | ||
geekosaur | so for example nqp_select defines the nqp select group; nqp-jvm installs nqp-j and an nqp select data file pointing nqp to nqp-j; user uses port select to specify which if any of those gets to be nqp | ||
19:26
rurban joined
|
|||
geekosaur | see for example what the db* ports do (e.g. db46, db48; db_select) | 19:26 | |
19:27
uncleyear left,
uncleyear joined
19:34
bin_005 left
19:35
bin_005 joined
19:41
kaare__ joined
19:44
kaare_ left
19:46
uncleyear left
19:47
uncleyear joined
19:54
mephinet left
20:01
uncleyear left,
smls_ joined,
uncleyear joined
|
|||
FROGGS | $ perl6 -Ilib -e 'use IO::Pipe; my $p = pipe("wc", :in, :out); $p.in.say: "hello world\nabc"; say $p.in.close; say $p.out.slurp-rest' | 20:01 | |
Proc::Status.new(exitcode => 0, pid => Any, signal => 0) | 20:02 | ||
2 3 16 | |||
what'ya think, api wise? | |||
I think I like it | |||
jnthn | Is there a .err too? | ||
FROGGS | but I'm prejudiced | ||
20:02
preyalone left,
darutoko left
|
|||
FROGGS | jnthn: there is | 20:02 | |
jnthn | Is there a :err-out to make :err and :out be bound to the same thing? :) | 20:03 | |
FROGGS | $ perl6 -Ilib -e 'use IO::Pipe; my $p = pipe("dang", :in, :out, :err); $p.in.say: "hello world\nabc"; say $p.in.close; say $p.out.slurp-rest; say $p.err.slurp-rest' | 20:04 | |
Proc::Status.new(exitcode => 127, pid => Any, signal => 0) | |||
/bin/sh: 1: dang: not found | |||
20:04
kaare_ joined
|
|||
FROGGS | jnthn: no, since I dunno how to do that with libuv | 20:04 | |
hmmm, there seems to be a race condition... | |||
the last thing I posted sometimes print nothing | |||
hoelzro | I would prefer the module to not be called IO::Pipe, or the sub not to be called pipe | 20:05 | |
at first glance, I would expect the module just to deal in pipes, not necessarily in spawning processes | 20:06 | ||
</2c> | |||
20:06
kaare__ left,
mephinet joined,
smls_ left
|
|||
FROGGS | umm, wat? | 20:07 | |
that's the code btw: gist.github.com/FROGGS/257e55328027c3be0652 | |||
hoelzro: IO::Pipe wont be a module, but the class that pipe() returns | |||
hoelzro | but is that object really a pipe? it's more like a subprocess that has pipes attached to it, isn't it? | 20:08 | |
maybe I'm being overly pedantic | |||
FROGGS | yes, you are right | ||
but pipe is such a nice four letter word :S | |||
hoelzro | proc is a nice four letter word too! | 20:09 | |
but that might confuse Rubyists? | |||
ugh | |||
naming things is hard | 20:10 | ||
FROGGS | yes, but proc does not tell that you can read from it or write to it | ||
hoelzro | true | ||
well, other than the naming, I like the interface | |||
FROGGS | so it should line in with open(), shell() and run() | ||
\o/ | |||
hoelzro | run-pipe? | ||
FROGGS | too long | 20:11 | |
hoelzro | there's no select() interface for reading from both out and err yet, is there? | ||
FROGGS | I don't know what you mean tbh | ||
hoelzro | FROGGS: wrt. select()? | 20:12 | |
FROGGS | aye | ||
hoelzro | it's important to be able to check both out and err for activity, or at least poll them individually | ||
otherwise, you could create a run-pipe (for lack of a better name) construction that deadlocks | 20:13 | ||
FROGGS | btw, the current pipe() code could replace run() and shell() maybe..., in a way that when pipe() inherits the filehandles it acts like run/shell anyway | ||
hoelzro | true | ||
that's nice | |||
FROGGS | hoelzro: why should it deadlock? | ||
hoelzro | I like having a flexible process execution mechanism =) | ||
FROGGS | can you try to make that happen? | ||
hoelzro | yeah | 20:14 | |
hang on | |||
FROGGS | you need the openpipe3 branches though | ||
hoelzro | ok | ||
FROGGS | and... I'm tired ó.ò | ||
hoelzro | is Configure.pl in openpipe3 smart enough to build a MoarVM/NQP with openpipe3? | 20:15 | |
FROGGS | hoelzro: no | ||
hoelzro | =( | ||
don't stay up on my account; I can create a deadlocking example and you'll see it tomorrow | |||
jnthn | You can --gen-nqp=openpipe3 --gen-moar=openpipe3 iirc | ||
hoelzro | I'll try that | 20:16 | |
20:16
kaare_ left
|
|||
FROGGS | ahh, that's true | 20:17 | |
gnight | 20:18 | ||
jnthn | 'night, FROGGS++ | ||
20:19
uncleyear left
|
|||
hoelzro | night FROGGS | 20:20 | |
20:20
uncleyear joined,
kst joined
20:22
kst left,
kst joined
20:23
cognominal left
20:25
kst left,
rurban left,
kst joined
20:26
diana_olhovik left
20:27
domidumont left
|
|||
hoelzro | ok, I did not get it to segfault | 20:27 | |
er, deadlock | |||
and that's because I forgot libuv schedules work to be done rather than doing it right away! | |||
the idea was that if the parent is blocking on $p.out, and the child writes enough to $*ERR to fill the pipe, that should cause a deadlock. | 20:28 | ||
20:28
FROGGS left
20:35
[particle] joined
|
|||
jnthn | The may progress report I didn't get to: 6guts.wordpress.com/2015/06/05/tha...-and-more/ | 20:35 | |
*May | |||
20:40
isacloud joined,
fernando___ joined
20:43
uncleyear left
|
|||
[Coke] | m: my @a; say length @a; | 20:44 | |
camelia | rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GJbh7pTMw2Undeclared routine: length used at line 1. Did you mean 'elems', 'chars', 'graphs', 'codes'?» | ||
[Coke] | ^^ graphs is gone, yes? | ||
20:44
uncleyear joined
20:45
preyalone joined
20:48
llfourn joined
|
|||
jnthn | [Coke]: yes | 20:48 | |
20:52
llfourn left
|
|||
[Coke] | m: say "stuff".codes; | 20:52 | |
camelia | rakudo-moar c2a57e: OUTPUT«5» | ||
[Coke] | fixing... | 20:53 | |
20:53
dakkar left
|
|||
[Coke] | Looks like no tests depend on that particular wording. | 20:55 | |
20:58
HuStmpHrrr left
|
|||
[Coke] | ok. I changed src/core/Exception. rebuilt. it's still giving the same old error message. | 21:04 | |
21:04
bin_005 left
|
|||
jnthn | Odd | 21:05 | |
Time for sleep here...'night | 21:06 | ||
[Coke] | mmm. that text doesn't appear anywhere in src now. | ||
21:12
bin_005 joined
21:16
kurahaupo joined
21:29
Sqirrel left
21:31
kurahaupo left
21:36
Sqirrel joined
21:37
lizmat joined
21:45
uncleyear left,
uncleyear joined
21:49
Sqirrel left,
fhelmberger joined
21:54
fhelmberger left
21:55
Sqirrel joined
22:00
Foxcool left
22:03
ShimmerFairy left
|
|||
AlexDaniel | m: take 'foo' | 22:04 | |
camelia | rakudo-moar c2a57e: OUTPUT«take without gather» | ||
AlexDaniel | "take without gather"? And that's it? | ||
no line number, no nothing? | |||
22:05
uncleyear left
22:09
FROGGS joined
|
|||
lizmat | even with --ll-exception, the trace is weird :-) | 22:12 | |
yoleaux | 4 Jun 2015 23:01Z <Mouq> lizmat: So is #125312 (start 41 + 2) closable? | ||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125312 | ||
yoleaux | 08:42Z <jnthn> lizmat: I get a failure on Windows in 55-use-trace.t; I thought it may just be line endings, but it looks like some weird path mangling issue... gist.github.com/jnthn/2b4565199f93e5f52cdd | ||
lizmat | .tell Mouq #125312 can be closed | 22:13 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125312 | ||
yoleaux | lizmat: I'll pass your message to Mouq. | ||
AlexDaniel | lizmat: yea I created an issue already | ||
lizmat | AlexDaniel: I just saw it come in | 22:14 | |
AlexDaniel | m: my @a = gather { take; }; say @a[0]; | 22:15 | |
camelia | rakudo-moar c2a57e: OUTPUT«(Any)» | ||
AlexDaniel | Any? Interesting | 22:16 | |
(Mu) on my machine | |||
22:16
ShimmerFairy joined
22:17
spintronic joined
|
|||
AlexDaniel | what's the point of take; without arguments anyway? | 22:17 | |
lizmat | m: take 42' | ||
camelia | rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2bY5urW2G3Two terms in a rowat /tmp/2bY5urW2G3:1------> 3take 427⏏5' expecting any of: infix infix stopper postfix statement end statement …» | ||
lizmat | m: take 42 | ||
camelia | rakudo-moar c2a57e: OUTPUT«take without gather» | ||
AlexDaniel | maybe it should produce an error when your run take; without args? | 22:18 | |
spintronic | m: await do for 1 .. 100 { start { rand.sleep }} | 22:19 | |
camelia | rakudo-moar c2a57e: OUTPUT«Memory allocation failed; could not allocate 656 bytes» | ||
spintronic | m: for 1 .. 100 { start { rand.sleep } } | 22:20 | |
camelia | rakudo-moar c2a57e: OUTPUT«Memory allocation failed; could not allocate 656 bytes» | ||
spintronic | m: for 1 .. 100 { rand.sleep } | ||
camelia | rakudo-moar c2a57e: OUTPUT«(timeout)» | ||
spintronic | m: await do for 1 .. 4 { start { rand.sleep }} | 22:21 | |
camelia | rakudo-moar c2a57e: OUTPUT«Saw 1 occurrence of deprecated code.================================================================================Method sleep (from Real) seen at: /tmp/MUJhF1K9iT, line 1Deprecated since v2015.2, will be removed with release v2015.9!Plea…» | ||
spintronic | what are the maximum number of threads that can be started under Moar? | 22:22 | |
AlexDaniel | and I'm actually thinking about all of the other functions out there, why do we allow to run them without any args? | 22:24 | |
m: say min; | |||
camelia | rakudo-moar c2a57e: OUTPUT«Inf» | ||
AlexDaniel | great, Inf | ||
and if you wonder what max would return | 22:25 | ||
m: say max; | |||
camelia | rakudo-moar c2a57e: OUTPUT«-Inf» | ||
AlexDaniel | sure it makes sense internally, but why should it throw all of this internall stuff right into my face? :) | 22:26 | |
dalek | kudo/nom: 3b5c4a8 | lizmat++ | src/core/control.pm: Die on bare take/take-rw, AlexDaniel++ |
22:28 | |
AlexDaniel | lizmat: that was quick | 22:29 | |
lizmat | it was easy :-) | ||
AlexDaniel | lizmat: what about this min/max thing? | 22:30 | |
22:31
FROGGS left
|
|||
lizmat | that is a bit trickier, by the looks of it | 22:31 | |
AlexDaniel | m: my $x = min; #`{ some code here, but then we start calculating $x value } $x = min($x, 5); $x = min($x, 8); say $x | 22:32 | |
camelia | rakudo-moar c2a57e: OUTPUT«5» | ||
AlexDaniel | so if you plan to have some variable that will be the min value of something, then you can set it to min() without thinking at all | 22:33 | |
lizmat | m: multi a(*@a) { }; multi a(*@a,:$by!) { }; a | 22:34 | |
camelia | rakudo-moar c2a57e: OUTPUT«Ambiguous call to 'a'; these signatures all match::(*@a):(*@a, Any :by($by)!) in block <unit> at /tmp/zMH8POVKA0:1» | ||
AlexDaniel | but somehow I don't think that this kind of hacky bug-riding will be popular | ||
lizmat | that's what's stopping us to use a true MMD for min/max | ||
22:34
bin_005 left
22:35
bin_005 joined
22:36
FROGGS joined
|
|||
lizmat | I feel that this is a bug, but I have been wrong about MMD before, so I would like to hear what jnthn thinks about it first | 22:36 | |
AlexDaniel: I cannot just die on no params, as that is used internally | |||
AlexDaniel | I'll just submit a bug report then | 22:37 | |
otherwise we will just forget, I think | |||
m: say 1/-Inf; | |||
camelia | rakudo-moar c2a57e: OUTPUT«-0» | ||
AlexDaniel | oh, that negative zero thing is not fixed? | 22:38 | |
lizmat | shouldn't that be NaN ? | 22:39 | |
AlexDaniel | why? | ||
mathematically it is 0 | |||
22:40
FROGGS left
|
|||
lizmat | m: say 1/0 | 22:40 | |
camelia | rakudo-moar c2a57e: OUTPUT«Divide by zero in block <unit> at /tmp/Zjs8vNyV_4:1» | ||
lizmat | AlexDaniel: don't think so | 22:41 | |
I mean, if 1/Inf == 0 | |||
then 2/Inf would also == 0 | |||
then Inf/Inf would also be 0 | |||
AlexDaniel | no, Inf/Inf is not defined | 22:42 | |
lizmat | but N/N is defined as 1 | ||
AlexDaniel | lizmat: that thing en.wikipedia.org/wiki/Indeterminate_form | 22:44 | |
surprisingly 0/0 is an error and not NaN | 22:45 | ||
m: say 0**0 | 22:46 | ||
camelia | rakudo-moar c2a57e: OUTPUT«1» | ||
AlexDaniel | but should be NaN as well, huh | ||
22:47
vendethiel joined
|
|||
AlexDaniel | or should it | 22:47 | |
I'm confused now | |||
jercos | 0/0 should obviously return a Whatever :p | 22:51 | |
timotimo | AlexDaniel: i think it's very good that min() and max() return their neutral element | 22:52 | |
jercos | while other cases of x/0 being an Inf with the same sign as x is quite reasonable for most cases imo >.> | ||
lizmat has had a long day already, so is not thinking too clearly perhaps | |||
jercos | Of course, if you ask your friendly local JavaScript implementation what 1/-0 and 1/0 are... the answers are different :) | ||
(But no, 0/0 should totally be NaN in any case) | 22:54 | ||
AlexDaniel | timotimo: how is that useful? | ||
22:54
gfldex left
|
|||
AlexDaniel | and why? | 22:55 | |
timotimo | it gives you a sensible value that you can combine with other calls to min() | 22:56 | |
also, we have metaops that rely on operators telling their neutral element | |||
m: say &infix:<+>() | |||
camelia | rakudo-moar c2a57e: OUTPUT«0» | 22:57 | |
timotimo | m: say &infix:<*>() | ||
camelia | rakudo-moar c2a57e: OUTPUT«1» | ||
timotimo | m: say &infix:</>() | ||
camelia | rakudo-moar c2a57e: OUTPUT«No zero-arg meaning for infix:</> in block <unit> at /tmp/OPLUvc6jqU:1» | ||
dalek | kudo/nom: 501bad2 | lizmat++ | src/core/Any.pm: Make bare min/max/minmax fail Please note that min/max/minmax(my @) still returns Identity |
||
AlexDaniel | hm... | ||
lizmat | no spectest breakage with this | 22:58 | |
timotimo | though if you write it "just like that", not so helpful | ||
lizmat | please revert if not applicable :-) | ||
running errands& | |||
timotimo | i'll build it and check it out | 23:02 | |
23:11
RabidGravy left
23:12
uncleyear joined
|
|||
timotimo | hm. that "without parameters doesn't make sense" warning is hard to suppress | 23:12 | |
like, it's hard to get the zero-arg meaning without going indirect | 23:13 | ||
23:19
spintronic left,
AlexDaniel left
23:24
Sqirrel left
23:32
Sqirrel joined
|
|||
hoelzro | m: gist.github.com/hoelzro/01e63a89c104b2b50a7c | 23:34 | |
camelia | rakudo-moar c2a57e: OUTPUT«gist not found» | ||
hoelzro | m: gist.githubusercontent.com/hoelzro...failure.p6 | ||
camelia | rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/POaEorRvITConfusedat /tmp/POaEorRvIT:1------> 3https:7⏏5//gist.githubusercontent.com/hoelzro/01e expecting any of: colon pair» | ||
hoelzro | hmm | ||
oh, it's trying to parse the URL =P | |||
raydiak | that breaks every few months when something changes on github :P | 23:35 | |
(also, github seems to find a way to break our entire ecosystem about once every year or two) | 23:36 | ||
also...3-inch screws do not play well with pneumatic tires | 23:41 | ||
hoelzro | o_O | ||
bad luck? | |||
camelia: help | 23:42 | ||
camelia | hoelzro: Usage: <(std|prof-m|rakudo-moar|star-j|pugs|nqp-js|rakudo-jvm|p5-to-p6|debug-cat|nqp-jvm|nqp-parrot|star-m|nqp-moarvm|niecza|sm|rnP|nqp-q|Prn|r-jvm|star|sj|rn|nqp-j|p56|rakudo|nr|perl6|P|j|m|nqp|nom|Pnr|r-m|nPr|r|n|rPn|nrP|nqp-m|rm|p6|nqp-p|r-j|rj|nqp-mvm)(?^::\s) $perl6_program> | ||
hoelzro | camelia: source | ||
raydiak | aye...our irclog contains a nearly-complete history of my troubles with this particular vehicle, so I didn't want to leave today's fun out :) | ||
hoelzro | raydiak: you know, some people just keep a logbook in the glove compartment =) | 23:43 | |
raydiak | true true. but it's not intentional...or at least it didn't start out that way, it started with me whining, and somehow feels like I should keep the ball rolling on this epic saga now that I'm aware that I've started it :) | 23:45 | |
we all have our little traditions...I guess telling brilliant people across the world when my car breaks has emerged as one of mine | 23:47 | ||
23:49
llfourn joined
23:51
nebuchadnezzar joined
|
|||
geekosaur | well trained by twitter? >.> | 23:53 | |
hoelzro | hahah | ||
23:54
llfourn left
|
|||
hoelzro | m: sleep 60 | 23:55 | |
camelia | rakudo-moar c2a57e: OUTPUT«(timeout)» | ||
hoelzro | camelia doesn't run on hack.p6.org, does she? | 23:56 | |
23:58
nebuchadnezzar left
|
|||
timotimo | iirc nine hosts her | 23:59 | |
you can whois her to find out for sure |