»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:02
AlexDaniel joined,
firstdayonthejob left
00:04
virtualsue joined
00:05
wamba joined
00:07
firstdayonthejob joined
00:10
apiw joined
00:13
Fleurety joined
00:14
firstdayonthejob left
00:17
addison_ left
00:18
Actualeyes joined
00:20
cdg left
00:21
addison joined
00:23
bioexpress left
00:28
squach1 joined
00:30
squach left
00:31
SCHAAP137 left
00:38
ocbtec left
00:39
sufrostico left
00:54
apiw left
00:55
BenGoldberg joined,
MadcapJake joined,
MadcapJake is now known as Guest27967,
Guest27967 left,
kurahaupo left
00:57
virtualsue left
01:00
MadcapJake joined,
MadcapJake left
01:01
raiph joined
01:06
newbie left,
cmh-fn joined
01:07
MadcapJake joined
01:09
kid51 joined
01:10
apiw joined
01:11
apiw is now known as Guest16387
01:12
apiw joined
01:15
Guest16387 left
01:24
leont left
01:36
Actualeyes left
01:37
BenGoldberg left
01:40
captain-adequate left,
BenGoldberg joined
01:44
apiw left
01:45
kurahaupo joined,
apiw joined
01:48
kurahaupo_ joined
01:49
dfcarpenterak left,
kurahaupo left
01:52
protium left,
kurahaupo_ left
01:57
Ben_Goldberg joined
|
|||
dalek | c: cf44bb7 | raiph++ | doc/Language/performance.pod: More tweaking Examples of using native types still missing. |
01:58 | |
01:58
apiw left,
BenGoldberg left
|
|||
AlexDaniel | j: say $*PERL.compiler | 02:04 | |
camelia | rakudo-jvm f99bdb: OUTPUT«rakudo (2015.10.134.g.273.e.895)» | ||
AlexDaniel | can we get that updated? | ||
02:05
_PiL_ joined
02:08
addison left
02:11
protium joined
02:14
wamba left
02:24
jolts joined
|
|||
AlexDaniel | When I run tests locally how can I skip fudged tests? Right now I'm getting lots of failures which pollutes the output. | 02:25 | |
02:28
bpmedley left,
noganex joined
02:29
lokien_ left
02:31
klapperl_ left,
noganex_ left
02:32
Ben_Goldberg is now known as BenGoldberg,
yqfvwal joined
|
|||
ugexe | i dont think it actually works yet | 02:36 | |
it just builds | |||
02:36
protium left,
partly_ joined
|
|||
AlexDaniel | ah, it seems like I have to use 「fudge」 script | 02:36 | |
02:38
klapperl joined
02:39
partly left
02:40
mr-foobar left
02:41
mr-foobar joined
02:47
isBEKaml left
|
|||
MadcapJake | is there anything like ruby's freeze? As in, can I modify a hash, then after completed, "freeze" it preventing further modification | 02:48 | |
masak | MadcapJake: pour it into a Map, maybe? | 02:50 | |
MadcapJake | Cool, thanks! | 02:52 | |
02:53
adu left
02:56
bpmedley joined
|
|||
gfldex | m: my %h; my $m = %h.Map; | 02:56 | |
camelia | rakudo-moar d68c30: OUTPUT«Method 'Map' not found for invocant of class 'Hash' in block <unit> at /tmp/ZTAi7l5yR1 line 1» | ||
gfldex | m: my @a; my $l = @a.List; | 02:58 | |
camelia | ( no output ) | ||
dalek | c: be235bf | raiph++ | doc/Language/performance.pod: Yet more tweaks |
02:59 | |
03:00
Sqirrel left
|
|||
MadcapJake | m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(|%h); m<e> = 5; | 03:00 | |
camelia | rakudo-moar d68c30: OUTPUT«Cannot modify an immutable Nil in block <unit> at /tmp/UvS1rDTdHe line 1» | ||
MadcapJake | m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(|%h); say m; | 03:01 | |
camelia | rakudo-moar d68c30: OUTPUT«Map.new(())» | ||
03:01
jeek left
|
|||
MadcapJake | m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); say m; | 03:01 | |
camelia | rakudo-moar d68c30: OUTPUT«Map.new((:a(1),:b(2),:c(3),:d(4)))» | ||
MadcapJake | m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m<e> = 5; | 03:02 | |
camelia | rakudo-moar d68c30: OUTPUT«Cannot modify an immutable Nil in block <unit> at /tmp/Ra0T4m6QRU line 1» | ||
MadcapJake | m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m<a> = 'foo'; | ||
camelia | ( no output ) | ||
MadcapJake | m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m<a> = 'foo'; say m; | ||
camelia | rakudo-moar d68c30: OUTPUT«Map.new((:a("foo"),:b(2),:c(3),:d(4)))» | ||
MadcapJake | dang you can still modify it | 03:03 | |
raiph | .tell jnthn with apologies for .tell'ing you but just an fyi, for anyone reading this, 2 days, no comments/answer for stackoverflow.com/questions/3524652...ns-pointer (I don't feel equipped to answer it) | 03:04 | |
yoleaux | raiph: I'll pass your message to jnthn. | ||
03:04
jeek joined
|
|||
MadcapJake | masak, are a Map's pairs supposed to be immutable too? | 03:05 | |
03:08
mr-foobar left
|
|||
MadcapJake | m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m<a>.WHAT.say; | 03:08 | |
camelia | rakudo-moar d68c30: OUTPUT«(Int)» | ||
MadcapJake | m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m[0].WHAT.say; | ||
camelia | rakudo-moar d68c30: OUTPUT«(Map)» | ||
MadcapJake | m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m[1].WHAT.say; | 03:09 | |
camelia | rakudo-moar d68c30: OUTPUT«(Failure)» | ||
MadcapJake | m: my %h = a => 1, b => 2, c => 3; %h<d> = 4; my \m = Map.new(%h.pairs); m.perl.say; | ||
camelia | rakudo-moar d68c30: OUTPUT«Map.new((:a(1),:b(2),:c(3),:d(4)))» | ||
MadcapJake | why are the pairs surrounded by parentheses? | 03:10 | |
03:11
kid51 left
03:12
mr-foobar joined,
noganex_ joined
|
|||
gfldex | MadcapJake: without forcing a list, the named arguments would be considered as being unspecified in the method that is new. | 03:12 | |
m: role FinalHash { multi method ASSIGN-KEY(Hash:D: Str:D \key, Mu \assignval) is raw { die 'boohoo' }; multi method BIND-KEY(Hash:D: Str:D \key, Mu \assignval) is raw { die 'boohoo' }; multi method ASSIGN-KEY(Hash:D: \key, Mu \assignval) is raw { die 'boohoo' } }; my %h = a => 1; %h but FinalHash; dd %h; %h<b> = 2; dd %h; | 03:13 | ||
camelia | rakudo-moar d68c30: OUTPUT«Hash %h = {:a(1)}Hash %h = {:a(1), :b(2)}» | ||
gfldex | i'm confused that this doesn | ||
't work | |||
AlexDaniel | star: 2 ** 4553535345364535345634543534 | 03:14 | |
camelia | star-m 2015.09: OUTPUT«WARNINGS:Useless use of "**" in expression "2 ** 4553535345364535345634543534" in sink context (line 1)» | ||
AlexDaniel | star: say 2 ** 4553535345364535345634543534 | ||
camelia | star-m 2015.09: OUTPUT«0» | ||
AlexDaniel | ah, okay | ||
j: 2 ** 4553535345364535345634543534 | |||
camelia | rakudo-jvm f99bdb: OUTPUT«WARNINGS:Useless use of "**" in expression "2 ** 4553535345364535345634543534" in sink context (line 1)» | ||
AlexDaniel | j: say 2 ** 4553535345364535345634543534 | ||
camelia | rakudo-jvm f99bdb: OUTPUT«Inf» | ||
03:15
noganex left
03:20
Sqirrel joined
|
|||
gfldex | MadcapJake: thanks for spotting another hole in the docs that I shall plug after waking up | 03:20 | |
dalek | ast: f163812 | (Dan Kogai)++ | S32-num/power.t: introduce X::Numeric::Overflow |
03:21 | |
ast: ccff90d | (Aleks-Daniel Jakimenko-Aleksejev)++ | S32-num/power.t: Merge pull request #96 from dankogai/master introduce X::Numeric::Overflow |
|||
03:23
TimToady left
03:24
TimToady joined
03:25
vendethiel joined
03:35
_PiL_ left
|
|||
BenGoldberg | j: say exp(4553535345364535345634543534) | 03:39 | |
camelia | rakudo-jvm f99bdb: OUTPUT«Inf» | ||
BenGoldberg | star: say exp(4553535345364535345634543534) | ||
camelia | star-m 2015.09: OUTPUT«Inf» | ||
BenGoldberg | m: my %h = a => 1, b => 2, c => 3; my %m := %h.map; %m.say; | 03:41 | |
camelia | rakudo-moar d68c30: OUTPUT«Cannot call map(Hash: ); none of these signatures match: ($: Hash \h, *%_) (\SELF: █; :$label, :$item, *%_) (HyperIterable:D $: █; :$label, *%_) in block <unit> at /tmp/mcDIMeYI0a line 1» | ||
03:42
psy_ joined
|
|||
dalek | ast: 2da35ad | (Aleks-Daniel Jakimenko-Aleksejev)++ | S32-num/power.t: Fudge/unfudge tests according to ccff90d JVM behavior of returning Inf is no longer considered correct. |
03:43 | |
03:49
Actualeyes joined
|
|||
dalek | c: 111695e | raiph++ | doc/Language/performance.pod: Last tweaks? Sorry about tweak stream raiph-- |
03:51 | |
BenGoldberg | m: my %p := :foo<bar>; %p.say; | ||
camelia | rakudo-moar d68c30: OUTPUT«foo => bar» | ||
BenGoldberg | m: my %p := :foo<bar>; %p<foo>.say; | ||
camelia | rakudo-moar d68c30: OUTPUT«bar» | ||
BenGoldberg | m: my %p := :foo<bar>; %p<other>.say; | ||
camelia | rakudo-moar d68c30: OUTPUT«(Mu)» | ||
BenGoldberg | m: my %p := :foo<bar>; %p<other> = 'baz'; %p.say; | 03:52 | |
camelia | rakudo-moar d68c30: OUTPUT«Cannot modify an immutable Mu in block <unit> at /tmp/m2_qVtruBd line 1» | ||
BenGoldberg | m: my %h = a => 1, b => 2, c => 3; my %m := %h.Map.clone; %m.say; | 03:53 | |
camelia | rakudo-moar d68c30: OUTPUT«Method 'Map' not found for invocant of class 'Hash' in block <unit> at /tmp/ZA1PWgUVAZ line 1» | ||
BenGoldberg | m: my %h = a => 1, b => 2, c => 3; my %m := Map.new(%h).clone; %m.say; | ||
camelia | rakudo-moar d68c30: OUTPUT«Map.new((:a(1),:b(2),:c(3)))» | ||
BenGoldberg | m: my %h = a => 1, b => 2, c => 3; my %m := Map.new(%h).clone; %m.say; my %i := %m<a> :p; %i.say; ++$i.value; %i.say; (%h<a>:p).say; | 03:58 | |
camelia | rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nyZWbrXIGhVariable '$i' is not declared. Did you mean '%i'?at /tmp/nyZWbrXIGh:1------> 3e; %m.say; my %i := %m<a> :p; %i.say; ++7⏏5$i.value; %i.say; (%h<a>:p).say;» | ||
BenGoldberg | m: my %h = a => 1, b => 2, c => 3; my %m := Map.new(%h).clone; %m.say; my %i := %m<a> :p; %i.say; ++%i.value; %i.say; (%h<a>:p).say; | ||
camelia | rakudo-moar d68c30: OUTPUT«Map.new((:a(1),:b(2),:c(3)))a => 1a => 2a => 2» | ||
BenGoldberg | m: my %h = a => 1, b => 2, c => 3; my %m := Map.new(map *.clone, %h); %m.say; my %i := %m<a> :p; %i.say; ++%i.value; %i.say; (%h<a>:p).say; | 04:00 | |
camelia | rakudo-moar d68c30: OUTPUT«Map.new((:a(1),:b(2),:c(3)))a => 1a => 2a => 1» | ||
04:00
xdg left
04:02
vendethiel left
04:05
Herby_ joined
|
|||
Herby_ | Evening, everyone! | 04:05 | |
\o | |||
BenGoldberg | Good evening. | 04:11 | |
m: 2⁴⁵⁵³⁵³⁵³⁴⁵³⁶⁴⁵³⁵³⁴⁵; | 04:13 | ||
camelia | rakudo-moar d68c30: OUTPUT«Numeric overflow in block <unit> at /tmp/_NohIc1Wxq line 1Actually thrown at: in block <unit> at /tmp/_NohIc1Wxq line 1» | ||
04:34
adu joined
04:36
raiph left
04:44
jeek left
04:46
Vitrifur left
|
|||
AlexDaniel | m: for "A\nB\nC\nD".lines() -> $x, $y { say "$x, then $y" } | 04:50 | |
camelia | rakudo-moar d68c30: OUTPUT«A, then BC, then D» | ||
04:51
mr-foobar left
04:57
perlawhirl left
04:59
Herby_ left,
revhippie left
05:07
kaare_ joined
05:21
BenGoldberg left
05:28
khw left
05:29
skids left
05:32
yqfvwal left,
jeek joined
05:39
vendethiel joined
05:46
hankache joined
|
|||
hankache | hello | 05:47 | |
05:49
Cabanossi left
05:51
Cabanossi joined
05:52
psy_ left
05:55
psy_ joined
05:57
lokien_ joined,
nakiro joined,
psy_ left
05:58
psy_ joined
06:00
vendethiel left
|
|||
hankache | where are the modules installed? is there a dynamic variable to get hold of the repo? | 06:15 | |
jdv79 | $*REPO is the head of the list i think | 06:16 | |
oh, just a guess | 06:17 | ||
m: say $*REPO.repo-chain | |||
hankache | m: say $*REPO | ||
camelia | rakudo-moar d68c30: OUTPUT«(inst#/home/camelia/.perl6/2015.12-307-gd68c304 inst#/home/camelia/rakudo-m-inst-2/share/perl6/site inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Repository::AbsolutePath.new(next-repo => Com…» | ||
rakudo-moar d68c30: OUTPUT«inst#/home/camelia/.perl6/2015.12-307-gd68c304» | |||
hankache | jdv79 thanks | 06:19 | |
06:23
xiaomiao left,
xiaomiao joined
06:40
hankache left,
kmel joined
06:43
kmel left
06:48
hankache joined
|
|||
hankache | rakudobrew build moar-2016.01.1 what am i missing? | 06:48 | |
oh no hyphen. it should be rakudobrew build moar 2016.01.1 | 06:49 | ||
07:01
geraud left
07:09
Sqirrel left
|
|||
MadcapJake | how would you do the pattern where you have a base class that has a default (overridable) `new` method that creates an instance of "Base::Default" | 07:12 | |
07:13
adu left
|
|||
MadcapJake | either my Base class can't find the Base::Default or my Base::Default can't find the Base it's inheriting from | 07:13 | |
(depending on which comes first in a file) | |||
07:23
vendethiel joined
07:29
FROGGS joined
07:37
firstdayonthejob joined
|
|||
MadcapJake | What does "cannot invoke code type object" mean? why can't it? | 07:39 | |
07:40
virtualsue joined
|
|||
nine | Because it's undefined? | 07:40 | |
m: my Code $c; $c(); | 07:43 | ||
camelia | rakudo-moar d68c30: OUTPUT«Can not invoke a code type object in block <unit> at /tmp/I7QbsaX2fZ line 1» | ||
07:44
CIAvash joined,
vendethiel left
|
|||
MadcapJake | ok, thanks for the lead, was really stumped :P | 07:45 | |
07:46
sortiz left
07:50
vendethiel joined
07:56
apiw joined
|
|||
MadcapJake | what reason would there be for an exception to not print the message method's result? | 07:58 | |
I get this «exception produced no message» | 07:59 | ||
FROGGS | MadcapJake: maybe it failed to construct the text that is generated by .message()? | 08:02 | |
like, if an attribute of the exception cannot be stringified | 08:03 | ||
08:05
fireartist joined
|
|||
MadcapJake | FROGGS, thanks! That was it! | 08:07 | |
08:11
vendethiel left,
domidumont joined,
darutoko joined
08:16
domidumont left,
Laurent_R joined,
apiw left
08:17
domidumont joined
08:19
lokien_ left
08:20
Celelibi left
08:26
zakharyas joined
08:27
apiw joined
08:31
uruwi_ joined
08:32
lokien_ joined
08:33
pdcawley joined
08:34
ely-se joined,
uruwi left
08:38
firstdayonthejob left
|
|||
MadcapJake | Working on a port of Github's new Scientist Ruby library into Perl 6. Most of the legwork is done, still not working though (many bugs). after the bugs, I'll try to perl6ify the interface a bit github.com/MadcapJake/Test-Lab | 08:51 | |
08:53
[Sno] left,
risou is now known as risou_awy,
Actualeyes left,
risou_awy is now known as risou
08:55
RabidGravy joined
08:56
eyck left,
dakkar_ joined,
mathw left,
dpk left,
yoleaux left,
eyck joined
08:57
keithbro joined,
Zero_Dogg left
08:58
Zero_Dogg joined,
Zero_Dogg left,
Zero_Dogg joined
09:01
satisfaction joined
09:02
satisfaction left
09:06
keithbro left
|
|||
dalek | c: 4eaf3e7 | Nat++ | doc/Language/regexes.pod: Fix example grammar to allow leading spaces so that it parses the example text |
09:09 | |
c: 7460b29 | sylvarant++ | doc/Language/regexes.pod: Merge pull request #386 from tenatus/master Fix example grammar to allow leading spaces so that it parses the exa… |
|||
09:12
dpk joined
09:16
CurtisOvidPoe joined
|
|||
moritz | \o | 09:19 | |
everybody, if you see the same person repeatedly opening pull requests on perl6/* repos, please let me know so I can give them direct commit access | |||
I try to follow them myself, but I get several hundred notifications from github per day and can't keep up anymore | 09:20 | ||
09:20
ChoHag left
|
|||
CurtisOvidPoe | I have some very simple code, using Rats, which throws the exception "Type check failed in assignment to $w; expected Rat but got Num" gist.github.com/Ovid/74ffc49d1b8450036e80 | 09:26 | |
Background: it models a funtion that *should* coverge on 6, but every known floating point implementation causes it to converge on 6, and then go crazy and converge on 100. Perl 6 Real numbers exhibit this behavior, so I was hoping Rats would do the right thing, but they don’t. Advice? | 09:28 | ||
lizmat | confirmed here | 09:29 | |
fwiw, it doesn't appear to be spesh or jit related | |||
and the error really happens in line 7 | |||
(so not something inside of the setting) | 09:30 | ||
partly_ | i stumbled over some code which access PIO::PF_INET6(), but I can not find any documentation on PIO | 09:32 | |
lizmat | CurtisOvidPoe: it looks like it is running out ouf Rat precision: | ||
Int $n = 26 | 09:33 | ||
Rat $v = <21024692798570322907/3494181358965822047> | |||
*of | |||
CurtisOvidPoe | lizmat: that makes sense. It’s a weird case, but given that it’s an example of showing how pathologically wrong floating point math can be, I was hoping it would just work. I need to switch to FatRats? | ||
lizmat | that appears to have its issues as well: Type check failed in assignment to $u; expected FatRat but got Rat | 09:36 | |
my FatRat ($u,$v) = (FatRat(2.0), FatRat(-4.0)); # converges on 6, Perl 6 FTW ! | 09:37 | ||
CurtisOvidPoe | lizmat (and anyone else curious): perso.ens-lyon.fr/jean-michel.mull...pitre1.pdf is chock full o’ examples of floating point math going disastrously wrong, with code written in C. Would be nice to make all of them work. | 09:38 | |
lizmat | I'll make sure it gets mentioned in the next P6W | ||
CurtisOvidPoe | lizmat: cool. I think we’re so close, in many ways, to making these things work nicely. | 09:39 | |
Any reason why Rats can’t be auto-promoted to FatRats on demand? | 09:40 | ||
lizmat | m: my FatRat $a = 2.0 # too bad this fails | ||
camelia | rakudo-moar d68c30: OUTPUT«Type check failed in assignment to $a; expected FatRat but got Rat in block <unit> at /tmp/z8rFJ2i4Io line 1» | ||
09:40
uruwi joined
09:41
uruwi_ left
09:43
apiw left
|
|||
FROGGS | lizmat++ | 09:43 | |
lizmat | CurtisOvidPoe: not sure why they're promoted to floats | ||
perhaps someone with more history in the Perl 6 project can tell | 09:44 | ||
moritz | m: my FatRat() $a = 2.0; | 09:45 | |
camelia | rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zyxNGxsOmoCoercion FatRat(Any) is insufficiently type-like to qualify a variableat /tmp/zyxNGxsOmo:1------> 3my FatRat() $a7⏏5 = 2.0; expecting any of: constraint» | ||
moritz | CurtisOvidPoe: basically, that's what coercion types are for, and they aren't pervasively enough implemented (yet?) | ||
09:49
apiw joined
|
|||
moritz | note that we don't auto-promote other numerical types either | 09:50 | |
m: my Num $x = 1; | |||
camelia | rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/trm_NwZRdRCannot assign a literal of type Int (1) to a variable of type Num. You can declare the variable to be of type Real, or try to coerce the value with 1.Num or Num(1), or just write the value as 1e0…» | ||
09:55
AlexDaniel left
|
|||
lizmat | moritz: put going from Rat to FatRat is not really promoting? doesn't feel like it to me | 09:56 | |
masak | <lizmat> perhaps someone with more history in the Perl 6 project can tell | 09:58 | |
yes. | |||
dalek | p: 6ec14a5 | lizmat++ | tools/build/MOAR_REVISION: Bump MOAR_REVISION |
||
09:58
leont joined
|
|||
masak | this is trying to learn from the mistakes of ABC/Python, where rational precision was kept at all costs, causing programs to fail by being unreasonably slow or running out of memory. | 09:59 | |
09:59
TEttinger left,
sjoshi joined
|
|||
masak | I agree that there should be an easy way to opt back into keeping all of that nice precision. not sure the opt-in needs to be more fancy than just using FatRat in the first place. | 09:59 | |
CurtisOvidPoe, lizmat: ^ | 10:00 | ||
lizmat | my FatRat $a = 2.0 # masak: should that work? | ||
moritz | lizmat: from a type model point of view, there's no direct relation between Rat and FatRat that could make autopromotion work | 10:01 | |
that is, FatRat doesn't inherit from Rat | |||
CurtisOvidPoe | It would be nice if we could use FatRat as a standard type, even if we don’t auto-promote Rat to FatRat. It would also be nice if we had an “auto-promote” pragma to make things easier in this problem space. | ||
moritz | what do you mean by "use FatRat as a standard type"? | 10:03 | |
have a literal syntax for it? | |||
FROGGS .oO( 2F0 ) | |||
FROGGS .oO( or 2R0 ? ) | |||
masak | lizmat: Perl 6's type system is nominal, not structural. which means you can't fit a FatRat value into a Rat variable, even when it's evident to you by inspection that it'd work. | ||
moritz | masak: fwiw lizmat and CurtisOvidPoe are talking about the other direction: fitting a Rat value into a FatRat variable (though you point still stands) | 10:04 | |
jnthn | A structural type system wouldn't do it either, no? Because the structure of a FatRat is two bigints, not a bigint and a 64-bit int. | ||
masak | lizmat: taking a longer perspective, your question is yet another instance of a long-running discussion in Perl 6-land: do we have enough coercion by default in Perl 6's numeric types? | 10:05 | |
jnthn: I was talking about the more general phenomenon of "the shape is enough, don't worry about names and inheritance" | |||
moritz | well, my proposed solution would be to make explicit coercion types work on variables as well | 10:06 | |
masak | moritz: oh, I meant it in that direction. sorry 'bout le confusion. | ||
moritz | and then we can tell people "if you want coercion to FatRat, declare it as my FatRat() $r and all is as you want" | ||
masak | moritz: agreed. though that doesn't seem to be enough for a contingency, spearheaded by CurtisOvidPoe. | ||
at least last time I checked in on this discussion. | 10:07 | ||
jnthn | Short of coercion types, where you ask for coercy semantics, I don't see us breaking the "types are constraints" general rule. | ||
lizmat | jnthn: you're suggesting something like an AnyRat ? | 10:08 | |
jnthn | lizmat: No | ||
timotimo | yo | ||
jnthn | I'm suggesting that my Rat() $foo = ... (that is, you explicitly ask for coercion) | ||
Otherwise it's a constraint. | |||
As today | 10:09 | ||
lizmat | my FatRat(Rat) $foo = 2.0 | ||
jnthn | That'd do it, yes | ||
lizmat | BTW, is yoleaux awol ? | ||
jnthn | I see the problem as this: people want DWIM, but people also want to put types into their programs to check various expectations are met, but the more DWIM you stick into a type system the harder it is to trust what it's checking. | 10:11 | |
Not to mention that it'd make it harder for Perl 6 compilers to reason about, hurting our ability to do static analysis, and similar for VMs, which derive a good amount of performance from understanding what types have showed up. | 10:13 | ||
Case in point: when it was decided that we should make Failure allowed to slip through return type constraints, the initial implementation broke inlining of nearly everything, and it still costs us to this day. | 10:14 | ||
10:15
ecocode joined,
rindolf joined
10:16
wamba joined
|
|||
moritz isn't too happy with that | 10:16 | ||
masak | me either, but it's apparently a done thing in type theory too :/ | 10:18 | |
cf ⊥ | 10:19 | ||
moritz | you mean by having a bottom type? | ||
CurtisOvidPoe | FWIW: though I sometimes want different behavior from what I experience in Perl 6, I’m also (generally) not beating a drum about it. jnthn’s points are well taken. | ||
jnthn | "Bottom type" and all that... | ||
masak | aye | ||
dalek | kudo/nom: 470be03 | lizmat++ | tools/build/NQP_REVISION: Bump NQP_REVISION |
||
moritz | but the bottom type type-checks against all types | ||
Nil/Failure do not | |||
CurtisOvidPoe | Though I still want “my Rat $foo = 3;” to work ;) | ||
jnthn | CurtisOvidPoe: Is it specifically the literals case that bothers you? | ||
moritz | CurtisOvidPoe: I don't think you'll be successful with that | ||
lizmat | jnthn: rakudo is now on MoarVM HEAd | ||
jnthn | CurtisOvidPoe: What if it was my Rat $foo = sub-that-returns-int() ? | ||
lizmat: Cool, Inline::Perl5 built fine for you with HEAD? | 10:20 | ||
lizmat | yup and tested ok | ||
CurtisOvidPoe | For me, it’s the literal case, yes. Though I see your point about return types and the confusion that could cause. | ||
lizmat | there's only one spectest fail now in: t/spec/S32-num/power.t | ||
but it feels related to recent roast changes | |||
jnthn | CurtisOvidPoe: The WAT from trying to be special about literals is that people trying stuff out with a literal value can get a surprise when they replace it with some computation that produces such a value. That is, we'd break "you can think of computations as reducing to values". | 10:22 | |
masak | I think people's intuitions are led wrong because they expect "integers embed into rationals" etc from math to translate into subtyping relationships in Perl 6 | ||
10:22
apiw left
|
|||
masak | m: say Real ~~ Complex | 10:23 | |
camelia | rakudo-moar d68c30: OUTPUT«False» | ||
masak | but the subtyping relationships in Perl 6 for the numeric types express something other than that. | ||
CurtisOvidPoe | Fair enough. I’ll crawl back into my hole now :) | 10:24 | |
geekosaur | this stuff is why numeric literals in Haskell are polymorphic --- which leads to people becoming confused when they replace the literal with a function, yeh | ||
10:24
apiw joined
|
|||
timotimo | CurtisOvidPoe: did you see the helpful error message you get when you have a literal of the wrong kind? | 10:24 | |
geekosaur | there aren't any good solutions; once again every DWIM comes with a WAT, and all of them suck one way or another | ||
jnthn suspects there's no perfect answers here, you just pick your trade-offs | 10:25 | ||
CurtisOvidPoe | What does “WAT” stand for? | ||
masak | I have a great deal of sympathy for the DWIM contingency, even though I switched allegience years ago | ||
CurtisOvidPoe: it's not an acronym | 10:26 | ||
10:26
NZKindest left
|
|||
masak | CurtisOvidPoe: only an interjection, like a panicked "WHAT!?" | 10:26 | |
jnthn | CurtisOvidPoe: www.destroyallsoftware.com/talks/wat is the origin | ||
geekosaur | reference to an Internet meme where someone was so startled by a ridiculous assertion they misspelled "what?!" | ||
CurtisOvidPoe | Thanks. | ||
jnthn | Or afaict, the origin in programming language circles. | ||
geekosaur | it was around before that, was making the rounds on tumblr etc. | 10:27 | |
jnthn | Basically an amusing lightning talk on well-intentioned language features causing surprises :) | ||
geekosaur: ah, OK :) | |||
Roamer`_ | hm, am I doing something wrong? www.nntp.perl.org/group/perl.perl6....36587.html says that we should "use 6.c" instead of "use v6.c", but my Rakudo doesn't seem to understand that; 2016.01.1 and moar-nom both say "Undeclared routine: use" | ||
geekosaur | sounds like you're missing a semicolon somewhere before that maybe | ||
Roamer`_ | geekosaur, perl6 -e 'use 6.c' complains about it | 10:28 | |
10:28
Roamer`_ is now known as Roamer`
|
|||
jnthn | m: use 6.c; | 10:28 | |
camelia | rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WDwZdcBv2FUndeclared routine: use used at line 1» | ||
jnthn | m: use v6.c; | ||
camelia | ( no output ) | ||
geekosaur | hrrr | ||
jnthn | You need the v there, no? :) | ||
Roamer` | jnthn, that's what I thought, but somebody said I didn't, so I tried... | ||
moritz | Roamer`: don't believe everything yary writes :-) | ||
geekosaur | oh | ||
yary confusing use with META6.json? | 10:29 | ||
lizmat | afk for a few hours& | ||
moritz | though it's a bit sad we can't use the same syntax in both | ||
peteretep | Does pmurias hang out here? | 10:30 | |
moritz | peteretep: often, but not always | ||
peteretep | under that nick? | ||
moritz | yes | ||
peteretep | Thanks :-) | 10:31 | |
moritz | irclog.perlgeek.de/perl6/search/?ni...ias&q= :-) | ||
10:31
espadrine joined
|
|||
Roamer` | BTW (and I guess you guys may be getting this all the time) what's the preferred migration path from META.info to META6.json? Create a META6.json copy of META.info, file an ecosystem PR to switch, then remove META.info? | 10:33 | |
10:34
luiz_lha joined,
luiz_lha is now known as Guest3389
10:35
Guest3389 is now known as luiz_lha
|
|||
RabidGravy | Roamer`, some variant like that | 10:37 | |
Roamer` | RabidGravy, thanks | 10:38 | |
|Tux| | <drumroll> | 10:40 | |
test 21.755 | |||
test-t 11.750 | |||
csv-parser 50.024 | |||
</drumroll> | |||
NEAT! | |||
stmuk_ | who can I email about talking at GPW? | 10:42 | |
10:49
kurahaupo joined
|
|||
timotimo | stmuk_: probably moritz | 10:49 | |
10:52
[Sno] joined
|
|||
masak | |Tux|: something improved greatly? | 10:53 | |
|Tux| | ask lizmat | ||
10:53
yoleaux joined,
ChanServ sets mode: +v yoleaux
|
|||
masak | lizmat: something improved greatly? :) | 10:53 | |
masak suspects a lizmat++ is in order | |||
10:53
leont left
|
|||
|Tux| | lizmat++ | 10:54 | |
10:58
apiw left
10:59
ralo joined
11:00
kurahaupo left
11:05
apiw joined,
ocbtec joined
11:08
ely-se left
11:23
ely-se joined
11:27
apiw left
11:36
ely-se left
11:37
apiw joined
11:48
kid51 joined
11:49
hippie1 joined,
hippie left
|
|||
dalek | osystem: 3f5c49c | (Naoum Hankache)++ | META.list: add Acme::Cow to ecosystem |
11:49 | |
osystem: 2bae951 | RabidGravy++ | META.list: Merge pull request #148 from hankache/patch-1 add Acme::Cow to ecosystem |
|||
11:52
wamba left
|
|||
ralo | perl6: 'a,a,a' ~~ /a+ % ','/ | 11:58 | |
camelia | ( no output ) | ||
ralo | perl6: say 'a,a,a' ~~ /a+ % ','/ | ||
camelia | rakudo-moar 470be0, rakudo-jvm f99bdb: OUTPUT«「a,a,a」» | ||
ralo | perl6: say 'a,a,a,' ~~ /a+ % ','/ | ||
camelia | rakudo-moar 470be0, rakudo-jvm f99bdb: OUTPUT«「a,a,a」» | ||
ralo | this seems contrary to what is described in the regex docs: doc.perl6.org/language/regexes#Modi...ntifier:_% | 11:59 | |
hankache | m: 'a,a,a' ~~ /a+ % ','/ | 12:00 | |
camelia | ( no output ) | ||
hankache | m: say 'a,a,a' ~~ /a+ % ','/ | ||
camelia | rakudo-moar 470be0: OUTPUT«「a,a,a」» | ||
ralo | the string with the trailing ',' should not match. or am I wrong? | 12:01 | |
jnthn | It didn't match the training , | 12:02 | |
yoleaux | 03:04Z <raiph> jnthn: with apologies for .tell'ing you but just an fyi, for anyone reading this, 2 days, no comments/answer for stackoverflow.com/questions/3524652...ns-pointer (I don't feel equipped to answer it) | ||
DrForr | It matches 'a,a,a', so yes, it should. It'll also match 'a,a,aBOOGER'. | ||
jnthn | But the regex wasn't anchored to the start/end | ||
12:03
domidumont left
|
|||
jnthn | m: say 'a,a,a,' ~~ /^ a+ % ',' $/ | 12:03 | |
camelia | rakudo-moar 470be0: OUTPUT«Nil» | ||
jnthn | m: say 'a,a,a' ~~ /^ a+ % ',' $/ | ||
camelia | rakudo-moar 470be0: OUTPUT«「a,a,a」» | ||
ralo | I see. sorry, my mistake | 12:04 | |
DrForr | No worries. | ||
12:07
domidumont joined,
sena_kun joined,
sena_kun left
12:08
ralo left
12:09
apiw left
12:11
adu joined,
hankache left
12:14
Ven joined
12:15
adu left
12:16
apiw joined,
espadrine_ joined,
espadrine left
12:17
espadrine_ is now known as espadrine,
sufrostico joined
12:18
ChoHag joined
|
|||
Ven | hi, #perl6 | 12:21 | |
12:24
pmurias joined
|
|||
pmurias | Ven: hi | 12:24 | |
12:27
wamba joined
|
|||
lizmat | [Tux]: is that before or after the NQP bump? if before, yes, than it's most likely my fault. If after, it also could be jnthn's fault :-) | 12:29 | |
12:29
sftp left,
lokien_ left
12:30
sftp joined
|
|||
|Tux| | check yourself, I built arounf 11:30 MET | 12:30 | |
s/nf/nd/ | 12:31 | ||
lizmat | ok, that's after the bump | 12:32 | |
perhaps we were both responsible then :-) | 12:33 | ||
12:35
kid51 left
|
|||
jnthn just fixed leaks :) | 12:36 | ||
Though less memory pressure can help all kinds :) | |||
pmurias | it's great that the individual improvements actually combine to improving more complex brenchmark :) | 12:39 | |
* benchmarks | |||
timotimo | well, leaked memory is mostly inert, rather than actively hindering performance "directly" | 12:41 | |
12:41
domm__ left
12:42
cognominal left
|
|||
moritz | it leads to more allocations instead of reuse | 12:42 | |
(allocation from the OS, that is) | |||
timotimo | right, but that's comparatively cheap | 12:43 | |
12:43
cognominal joined
|
|||
timotimo | as opposed to having to sweep over unhelpful objects via the GC, for example | 12:43 | |
stmuk_ | if anyone has got edit access to rosettacode.org/wiki/Image_noise#Perl_6 the libSDL2 reference is now SDL2 | 12:46 | |
12:46
domm_ joined
|
|||
timotimo | oi! this is terrible! | 12:47 | |
stmuk_ | and it should use SDL2::Raw :) | ||
timotimo | especially since you can literally just create a buffer instead and pass it into sdl to be rendered | ||
github.com/timo/SDL2_raw-p6/blob/m...pl#L63-L88 - here's an example with cairo | 12:48 | ||
but all you need to do is make sure the mode is proper | |||
lizmat | m: use nqp; my %h = a => 42; if nqp::getattr(%h,Map,q/$!storage/) -> $storage { say nqp::atkey(nqp::decont($storage),"a") } # timotimo jnthn: there's no way to get rid of the decont there, is there? | ||
camelia | rakudo-moar 470be0: OUTPUT«42» | ||
timotimo | i don't know, but decont is extremely cheap if it's not actually needed, because spesh knows how to get rid of it | 12:49 | |
(that is, if the type of the thing is stable and spesh can figure that out) | |||
(which in this case it might not be able to) | |||
peteretep | pmurias: hi | 12:51 | |
pmurias: if TPF don't give you the JS grant, please get in contact with me | |||
timotimo | i'm not sure, lizmat :( | ||
12:52
zamolxes left
|
|||
timotimo | do attributes actually have a container to go with them? | 12:52 | |
lizmat | no, I guess it's part of the code gen of the if on a nqp type of thing | 12:53 | |
moritz | lizmat: you could do -> \storage { } in the singature, no? | ||
timotimo | ooooh | 12:54 | |
good point, moritz, that sounds sensible | |||
lizmat | moritz++ # /me not awake yet | ||
m: use nqp; my %h = a => 42; if nqp::getattr(%h,Map,q/$!storage/) -> \storage { say nqp::atkey(storage,"a") } # moritz++ | |||
camelia | rakudo-moar 470be0: OUTPUT«42» | ||
timotimo also not awake yet | 12:55 | ||
that'll also save us allocating a scalar container <3 | |||
lizmat sees another round of optimizations coming up | 12:56 | ||
timotimo | ooooh | ||
12:56
sufrostico left
|
|||
moritz mostly harmless | 12:57 | ||
13:00
ely-se joined
|
|||
pmurias | peteretep: hi | 13:00 | |
dalek | p: b223c44 | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files): [js] Add a $to_bool to hashes rather then special casing them. |
13:02 | |
p: 412c477 | (Pawel Murias)++ | src/vm/js/nqp-runtime/array.js: [js] Make nqp::bindpos work with negative indexes. |
|||
p: 7991bdb | (Pawel Murias)++ | src/vm/js/ (3 files): [js] Stop wrapping js Arrays on method calls. |
|||
p: eedc255 | (Pawel Murias)++ | src/vm/js/ (2 files): [js] Stop passing raw Arrays to nqp::deserialize. |
|||
p: c0eed50 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js: [js] Rename object to obj everywhere instead of using an obj/object mix. |
|||
p: d003e33 | (Pawel Murias)++ | src/vm/js/ (5 files): [js] Avoid special casing Array. Make nqp::radix* ops return NQPArrays. |
|||
13:04
apiw left
13:08
Actualeyes joined
13:11
adu joined
13:12
apiw joined
|
|||
dalek | p: 48af163 | (Pawel Murias)++ | src/vm/js/nqp-runtime/array.js: [js] Implement nqp::atpos_n and nqp::atpos_s with indexes out of bounds. |
13:15 | |
p: 12dd2e9 | (Pawel Murias)++ | t/nqp/59-nqpop.t: Test nqp::atpos_i, nqp::atpos_n, nqp::atpos_s access with indexes out of bounds. |
|||
13:16
espadrine_ joined,
adu left
13:17
adu joined
13:20
espadrine left
|
|||
dalek | p: d652e27 | (Pawel Murias)++ | t/nqp/59-nqpop.t: Test nqp::atpos_i, nqp::atpos_n, nqp::atpos_s with negative indexes. |
13:24 | |
13:29
molaf joined
|
|||
dalek | ar: ca23d40 | (Steve Mynott)++ | ports/darwin_dmg/ (4 files): fix icon placement in dmg and tweak docs and filenames |
13:39 | |
13:42
zakharyas left
13:43
zakharyas joined
13:47
sufrostico joined
13:48
sufrosti1o joined
13:50
virtualsue left
13:52
sufrostico left
13:54
sufrostico joined
13:57
brrt joined
14:07
cdg joined
|
|||
stmuk_ | sergot: can you take a look at github.com/sergot/openssl/pull/18 when you get a minute please? | 14:08 | |
14:09
sjoshi left
|
|||
lizmat | timotimo jnthn: something seriously off with optimization of named parameters: | 14:10 | |
14:10
ecocode left,
ecocode joined
|
|||
lizmat | m: class A { multi method a($a) { }; multi method a($a,:$B!) { }; multi method a($a,$b) { } }; my $a = A.new; $a.a(42) for ^10000; say now - INIT now | 14:10 | |
camelia | rakudo-moar 470be0: OUTPUT«0.0062036» | ||
lizmat | m: class A { multi method a($a) { }; multi method a($a,:$B!) { }; multi method a($a,$b) { } }; my $a = A.new; $a.a(42,:B) for ^10000; say now - INIT now | 14:11 | |
camelia | rakudo-moar 470be0: OUTPUT«0.33642852» | ||
lizmat | m: class A { multi method a($a) { }; multi method a($a,:$B!) { }; multi method a($a,$b) { } }; my $a = A.new; $a.a(42,666) for ^10000; say now - INIT now | ||
camelia | rakudo-moar 470be0: OUTPUT«0.00866823» | ||
lizmat | named parameter is 40x slower ? | ||
14:12
NZKindest joined
|
|||
moritz | yes | 14:12 | |
14:12
hippie1 left,
hippie joined
|
|||
moritz | iirc named params are not part of the toplogical sorting | 14:12 | |
and only count as constraints | 14:13 | ||
timotimo | i wonder why the dispatch cache doesn't handle that? | ||
moritz | because hard, I suspect | 14:14 | |
jnthn | Well, and because slwoing down all the common cases by making the cache a bunch more complex isn't so desirable | 14:15 | |
You're getting a double blow there too; the stuff in the cache is inlinable by spesh | |||
lizmat | but putting such a penalty on something like %h<a>:exists ? | 14:16 | |
[Coke] | nine++ # merging back to nom | 14:17 | |
jnthn | lizmat: That's the wrong way to look at it | ||
We don't put a penalty on it. That's the *normal* unoptimized performance of multi-dispatch. | 14:18 | ||
lizmat | jnthn: in the setting we use a :SINK to optimize native splice, but at that cost, I wonder whether removing it wouldn't be a better choice | ||
jnthn | Well, depends how big the array is | ||
Also | |||
You're comparing a routine that does nothing | |||
But splice doesn't do nothing | |||
brrt | good * #perl6 | 14:19 | |
lizmat | well... a simple benchmark shows that %h<a>:exists is 100x slower than %h.EXISTS-KEY("a") | 14:21 | |
that feels very wrong to me | 14:22 | ||
jnthn | I suspect we may end up re-writing postcircumfix calls in Optimizer.nqp | ||
lizmat | well, perhaps... | ||
jnthn | If there's no overloads imported. | ||
lizmat | anyway, I was just blown away by the difference | ||
jnthn | Yeah...well, every single operator application is a postiional multi-dispatch | 14:25 | |
So we've optimized them pretty heavily. | |||
I'd be nice to handle the nameds better. | 14:26 | ||
But as moritz noted...it's some effort :) | |||
Though slowing down the cache lookups now is a bit less of an issue on Moar | 14:27 | ||
Because we eliminate the cache lookups during spesh in good cases anyway | |||
And spesh is already smart-ish about nameds | 14:28 | ||
(In some cases it rewrites named argument passes to positional ones.) | |||
(At a low enough level you can't actually catch it :)) | 14:29 | ||
14:31
lonewolf28 left
|
|||
moritz wonders if a special case for one named argument would give a good balance between performance and complexity | 14:32 | ||
sergot | stmuk_: yes, of course :) | ||
jnthn | moritz: Very possibly | ||
moritz | like, have a special slot for a single required named in the method cache, and store the name there | ||
brrt | can't we lower single required nameds into positional | 14:33 | |
timotimo | we have code to do that, but apparently it doesn't trigger there | ||
moritz | brrt: there might be several candidates with different single required named | ||
sergot | stmuk_: do the tests pass? | ||
brrt | good point | 14:34 | |
14:43
gcole left
14:44
sufrosti1o left,
sufrostico left
|
|||
[Coke] | t/04-nativecall/13-union.t failing on OS X | 14:45 | |
14:45
gcole joined
|
|||
dalek | kudo/nom: e7ccc99 | lizmat++ | src/core/Hash.pm: Scrape a few % off of Hash.DELETE-KEY - don't bother with the :SINK candidate, the current overhead kills it - don't bother allocating storage if there is none yet - don't bother getting value if the key isn't there |
14:46 | |
Roamer` | hm, do any of the package management tools - zef, panda, etc - understand some GitHub tag format so that I can install a specific tagged version of a module? | ||
[Coke] | seems fine when run by hand, though. | ||
lizmat | [Coke]: fwiw, make test is flawless for me | ||
timotimo | Roamer`: none of them do yet. but it might not be very difficult to add :) | ||
Roamer` | I know the ideology is "always use the latest one", just curious how should I tag my releases so that people can install earlier ones (or stable ones) if they want to | ||
timotimo, I might actually try to do that, yes | 14:47 | ||
maybe not right now | |||
timotimo | the ideology is actually "you can specify the exact version your code needs and we'll get that for you" | ||
[Coke] | lizmat: aaaaand it's not repeatable. ah well | ||
timotimo | but we're not there yet, sadly | ||
14:47
psy_ left
|
|||
Roamer` | timotimo, right, yes, sorry, I misspoke there... yes, I know about the version in the identity | 14:47 | |
timotimo | ;) | 14:48 | |
14:48
adu left
|
|||
[Coke] uses a perl6 snippet to randomly add combining chars to his chat blurb at work, and has gotten one person to ask how he did that so he could show them some perl 6. | 14:48 | ||
timotimo | hah, nice. | 14:49 | |
Ven | pmurias: what's this for? github.com/perl6/nqp/commit/412c47793d | ||
14:49
apiw left,
brrt left,
lokien_ joined
|
|||
Ven | nqp: my @a = 1, 2, 3; say @a[-1]; | 14:50 | |
14:50
camelia left
|
|||
Ven | oh. whoops. | 14:50 | |
timotimo | probably has to be nqp::list(1, 2, 3); | ||
and probably also has to be nqp-m: | |||
Ven | :( sorry, camelia | ||
14:51
camelia joined
|
|||
timotimo | :S | 14:52 | |
moritz | nqp: my @a = 1, 2, 3; say(@a[-1]); | ||
Ven | nqp-m: my @a = nqp::list(1, 2, 3); say @a[-1]; | ||
oh yea. no implicit () as wel. | |||
well* | |||
timotimo | oh, yes | ||
that bites me all the time | |||
flussence | \nqp: ought to be an alias for nqp-m:, like perl6: is, imho | ||
camelia | nqp-moarvm: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 2, near " 1, 2, 3; " at gen/moar/stage2/NQPHLL.nqp:521 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:panic:105) from <unknown>:1 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/nqp…» | ||
..nqp-jvm: OUTPUT«(signal ABRT)» | |||
..nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 206.exec (./rakudo-inst/bin/nqp-p /tmp/tmpfile) failed: No such file or directoryServer error occurred! Closing Link: ns1.niner.name (Quit: camelia)Lost connect…» | |||
14:53
ChanServ sets mode: +v camelia
|
|||
camelia | nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 206.exec (./rakudo-inst/bin/nqp-p /tmp/tmpfile) failed: No such file or directory#perl6 <Ven> nqp-moarvm: my @a = nqp::list(1, 2, 3); say @a[-1];Lost connection…» | 14:53 | |
timotimo | i just want to put a debug statement in, why do i have to do it properly? :P | ||
camelia | ..nqp-moarvm: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 2, near " 1, 2, 3; " at gen/moar/stage2/NQPHLL.nqp:521 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:panic:105) from <unknown>:1 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/nqp…» | ||
..nqp-jvm: OUTPUT«(signal ABRT)## There is insufficient memory for the Java Runtime Environment to continue.# pthread_getattr_np# An error report file with more information is saved as:# /tmp/jvm-20627/hs_error.log» | |||
timotimo | what even ... | ||
moritz | nqp-m: my @a := [1, 2, 3]; say(@a[-1]); | ||
camelia | nqp-moarvm: OUTPUT«3» | ||
14:53
nige1 joined
|
|||
timotimo | i never knew we had that | 14:53 | |
nige1 | hi o/ | ||
14:54
apiw joined
|
|||
nige1 | I need a bit of help with something | 14:54 | |
I'm developing a daily email - called "sixfix" - a daily dose of perl 6 | 14:55 | ||
the catch is you need to answer a question to get your next "fix" | |||
timotimo | oh that's neat | 14:56 | |
nige1 | It is in early beta state at the moment and I need early adopters who may be able to give feedback on questions / answers - before they reach a more general audience | ||
timotimo | also, daily is quite a challenge to keep up for a long time | ||
nige1 | indeed | 14:57 | |
i've only done a few days and its a challenge | |||
maybe weekly is more sustainable | |||
moritz | nige1: I'm happy to review the list; I don't know if I'm motivated to let the mails dribble to me | ||
nige1 | ok cheers moritz | ||
timotimo | we also haven't done anything big with the perlhex account | 14:58 | |
twitter account* | |||
moritz | (for the record, I like the idea. I just don't think I'm in the target audience) | ||
nige1 | sec bbiab | ||
flussence | I'd suggest operate it as if it were daily but release them weekly; that way you have a massive buffer whenever you hit writer's block ;) | ||
14:59
espadrine_ is now known as espadrine
|
|||
nige1 | yes - thanks flussence - good suggestion | 15:00 | |
perlpilot | sixfix sounds like something that would work better as a webapp/game | ||
[Coke] | I am happy to give the keys to perlhex to someone who will do something with it. I only very occasionally dabble with twitter. | ||
15:00
NZKindest left,
Actualeyes left
|
|||
timotimo | give the keys to ... everyone! | 15:00 | |
on the other hand ... if every perl6 dev has the key, bystander effect will activate | 15:01 | ||
[Coke] | no, that's a bad idea. :) | ||
actually, maybe it's not a bad idea. i actually don't know | |||
MadcapJake | [Coke], I'd be happy to post articles and such with it | ||
nige1 | if you would like to help curate/preview the sixfix questions / answers please email me at nige (at) nigelhamilton.com - and can give you early access | 15:02 | |
timotimo | hm. is perlhex really something to post articles with? | 15:03 | |
MadcapJake | Something along the lines of these other PL accounts: twitter.com/MadcapJake/lists/progr...-languages | ||
15:03
Actualeyes joined
|
|||
[Coke] | timotimo: it's been dead for months, we can do whatever we want with it. | 15:03 | |
nige1 | moritz, can organise bulk dose of sixfix - no problems there ;-) | ||
15:03
domidumont left
|
|||
MadcapJake | timotimo, more like tidbits about happenings in the community, a new article, an interesting convo, a new module release, a new optimization in rakudo, etc. | 15:04 | |
pmurias | Ven: negative indexes on arrays is likely something that should be removed from nqp (and is likely just cargo culted from parrot) | ||
MadcapJake | (that's at least what I would like to see and have been thinking of doing) | ||
moritz | MadcapJake: that would be very nice; then the curators of the p6weekly would just have to follow it :-) | ||
MadcapJake | moritz, xD | 15:05 | |
Ven | pmurias: ah; okay :). I didn't know nqp had that – was surprised, because 6 doesn't. | ||
timotimo | MadcapJake: i definitely won't stand in your way! :) | ||
15:06
sufrostico joined,
sufrosti1o joined
|
|||
MadcapJake | Well I'd be willing to take over p⬢ if [Coke] is looking to keep the account active, otherwise I'll start a new one | 15:06 | |
MadcapJake looks at account and sees the intent is different | 15:07 | ||
15:07
wamba left
|
|||
[Coke] | "was" . :) | 15:07 | |
lizmat scratches an optimization idea that didn't work out | 15:08 | ||
MadcapJake | heh | ||
hoelzro | morning #perl6! | ||
lizmat | hoelzro o/ | ||
hoelzro | howdy lizmat! | ||
MadcapJake tries to think of something as clever as "p⬢" | |||
[Coke] | note that the last tweet was a year+ ago. | ||
15:09
pmqs_ left
|
|||
[Coke] grabbed the creds in case the team wanted to do somethign with it. | 15:09 | ||
timotimo | a year+ or a year⬢? | ||
moritz | p6⌣ | ||
MadcapJake notices there is a @perlsix that has never tweeted... | |||
hoelzro | MadcapJake: what's wrong with using p⬢? | 15:10 | |
you can always change the intent =) | 15:11 | ||
hoelzro is invested because he helped come up with the name ;) | |||
MadcapJake | hoelzro, totally fine with it! Thought that maybe others wanted to keep it up as a code snippet account | ||
moritz | MadcapJake: just /msg [Coke] and ask for the credentials | ||
[Coke] | moritz: we're working on it. :) | 15:12 | |
hoelzro | I guess the whole "hex" pun fits with tips and tricks better | ||
moritz | [Coke]: ok, great | ||
geekosaur | (just as long as it's not like @crawlcode >.> ) | ||
hoelzro | is there a way to create a Perl 6 subclass of an NQP class? | 15:15 | |
moritz | nope | ||
hoelzro | I figured out | ||
er | |||
I figured not | |||
thanks for confirming, moritz! | |||
moritz | but you can consume NQP roles from Perl 6 classes, iirc | ||
hoelzro | I'll probably just need to figure out a way for NQP methods to call Perl 6 code | 15:16 | |
moritz | $code() | ||
15:16
xinming_ left
|
|||
moritz | or call a method with a fixed name on a Perl 6 object | 15:16 | |
15:17
xinming joined,
hankache joined
|
|||
hoelzro | yeah, that'll do | 15:17 | |
thanks! | |||
15:17
prammer joined
|
|||
hankache | does anyone remember cowsay? | 15:18 | |
hoelzro | hankache: yes! | ||
hankache | hoelzro then github.com/hankache/Acme-Cow needs your PR | 15:19 | |
:) | |||
Roamer` | OK, a couple more stupid module style questions :) I noticed Test::Meta declares "module Test::Meta:ver<...>:auth<github:...>"... is it considered a good practice to do that? And, hm, S22 says to use directly :0.2.1, while Test::Meta has :ver<0.2.1>... which one's better? :) | 15:22 | |
15:23
skids joined
|
|||
masak is delighted to see a bunch of new names on the channel | 15:23 | ||
15:24
wamba joined
|
|||
Roamer` | (oof, of course, Test::Meta has :ver<0.0.3>, 0.2.1 is what I intend to use for the next bunch of pushed commits to Serialize::Naive) | 15:28 | |
15:28
khw joined
|
|||
MadcapJake | is there anyway to declare multiple same-named classes in a test file? I tried just enblockenating them but still getting redeclaration error | 15:32 | |
jnthn | my | 15:33 | |
MadcapJake | oh xD | ||
moritz | oh my :-) | 15:34 | |
hankache | so is nom still considered the bleeding edge branch? | 15:35 | |
lizmat | hankache: yes | ||
tadzik | why is Cow in Acme? I thought Acme is for useless stuff :P | ||
hankache | thanks lizmat | 15:36 | |
tadzik i didn't know where to put it :) | |||
jnthn | .oO( ProductionReady::Cow :P ) |
||
hankache | hehe | ||
well cow needs your help | 15:37 | ||
i added a camelia template but i reckon it needs a bit of tweaking | 15:38 | ||
and the binary is 'cow-say' so it doesn't interfere with the initial one | 15:39 | ||
perigrin | tadzik: have you ever seen a cow actually do any work? | 15:40 | |
hankache | plus we get to use kebab casing and annoy everyone else ;) | ||
perigrin | they just sorta sit there turning grass into methane. | ||
Roamer` | perigrin, hm, I was going to accuse you of not seeing many "Milka" chocolate ads recently, but then again, your point still stands, they don't actually do much in the ads, either | 15:42 | |
*not having seen, pfth | |||
hankache | one can do alot with methane..... :P | 15:43 | |
15:43
domidumont joined
15:44
fireartist left
|
|||
stmuk_ | sergot: it fixes os x tests and they still pass linux (despite what travis said) | 15:47 | |
15:48
nige1 left
|
|||
jnthn reads recent backlog and starts pondering making beef kebabs... | 15:48 | ||
15:48
apiw left
|
|||
stmuk_ | pancakes surely? | 15:49 | |
DrForr | Today's Culture Ship Name: GOU Pancake Day. | 15:50 | |
Roamer` visualizes beef kebab pancakes and... quite likes it, in fact. | |||
sergot | stmuk_++: merged, thanks a lot! :) | 15:52 | |
15:53
apiw joined
|
|||
stmuk_ | sergot: np | 15:53 | |
16:01
apiw left
16:03
FROGGS left,
robinsmidsrod left
|
|||
MadcapJake | any ideas why an attribute would be empty inside of a method but when you access it outside of the method, it's all there... | 16:04 | |
16:04
ely-se left
|
|||
MadcapJake | this attribute is declared in a role, i should add | 16:05 | |
(as is the method) | |||
masak | MadcapJake: golf it and show it on camelia? | ||
MadcapJake | wait, i think i know what i've done... :) | 16:07 | |
16:08
perlpilot left
16:09
robinsmidsrod joined
16:10
perl6newbee joined
|
|||
MadcapJake | how do you take a hash and turn it into named parameters for a method? | 16:11 | |
i tried %h.pairs.Slip and !%h but they both still come out as positional params | 16:14 | ||
ugexe | .method(|%hash) | ||
MadcapJake | oops, i meant, i tried that | ||
|%h still gives me positional params error | |||
16:14
musiKk joined
|
|||
ugexe | something is off with your class or hash then | 16:14 | |
gfldex | MadcapJake: can you provide the Signature of that method? | ||
16:16
kurahaupo joined,
Laurent_R_ joined,
domidumont left
|
|||
MadcapJake | gfldex, «method context(*%ctx) {...}» | 16:17 | |
and I get «Too many positionals passed; expected 1 argument but got 2» | 16:18 | ||
16:19
apiw joined,
Laurent_R left,
Laurent_R_ is now known as Laurent_R
|
|||
gfldex | m: sub f(*%h){ say %h.perl }; my %h = <a b> Z=> (1,2); f(|%h) | 16:19 | |
camelia | rakudo-moar e7ccc9: OUTPUT«{:a(1), :b(2)}» | ||
gfldex | m: sub f(*%h){ say %h.perl }; my %h = <a b> Z=> (1,2); f(%h) | 16:20 | |
camelia | rakudo-moar e7ccc9: OUTPUT«Too many positionals passed; expected 0 arguments but got 1 in sub f at /tmp/UVQKKkS0mU line 1 in block <unit> at /tmp/UVQKKkS0mU line 1» | ||
MadcapJake | doing «|%hash» actually gets me a different error «Attempted to push to Nil.» | ||
so i'm looking in the wrong place for the bug | |||
16:22
kurahaupo left
|
|||
gfldex | MadcapJake: did you try --ll-exception ? | 16:22 | |
sjn | \o | 16:24 | |
MadcapJake | gfldex, i figured it out, was a private attr and I specified a setter but that setter was inadvertently returning Nil when called as a setter | 16:25 | |
dalek | osystem: eefe61e | (Peter Pentchev)++ | META.list: Switch to META6.json for Serialize::Naive. |
||
osystem: 2b1fce1 | (Zoffix Znet)++ | META.list: Merge pull request #149 from ppentchev/ppentchev-meta6-serialize-naive Switch to META6.json for Serialize::Naive. |
|||
MadcapJake | when called as a *getter* | ||
16:29
perlpilot joined
|
|||
hankache | why is everyone switching to META6.json? anything wrong with META.info? | 16:30 | |
[Coke] sees jnthn making beef kebabs and regrets his pork rind snack! | 16:31 | ||
japhb | hankache: Apparently they never META6 they didn't like | ||
hankache | hahahahaha | 16:32 | |
japhb apprently it's too 6xy and they know it | |||
japhb | :-D | 16:33 | |
stmuk_ | pl6anet.org/drop/Rakudo_2016-01-RC0.dmg | ||
thats a R* binary installer which seems to work on OS X 10.9 and 10.11 | |||
16:33
autarch left
|
|||
hankache | stmuk_++ | 16:34 | |
lizmat | hankache: using META6.json will allow for uploading to CPAN | ||
stmuk_ | hmmm I should put star in the name | 16:35 | |
hankache | lizmat i do like the current way of doing things, github & travis etc.. ;( | 16:36 | |
am i the only one? | |||
lizmat | hankache: it's about providing *more* options, not less :-) | ||
dalek | ar: d210150 | (Steve Mynott)++ | ports/darwin_dmg/package_darwin_dmg.pl: name as windows msi |
||
16:36
autarch joined
|
|||
lizmat | some people aren't happy with github, for that matter | 16:36 | |
we lost a few modules in the ecosystem that way already :-( | 16:37 | ||
hankache | lizmat if you say so. I never used CPAN so I'll take your word for granted | 16:38 | |
it would be fun to do some statistics about People using Perl 6 | |||
MadcapJake | first round of tests ported to github.com/MadcapJake/Test-Lab | 16:40 | |
16:42
ecocode left
|
|||
MadcapJake | If anyone hasn't seen it yet, I'm porting githubengineering.com/scientist/ to Perl 6 | 16:42 | |
16:45
hankache left
16:47
apiw left
16:49
zakharyas left
16:50
abaugher_ left,
sufrosti1o left,
abaugher_ joined,
sufrostico left
16:51
virtualsue joined
16:55
apiw joined
16:56
nige1 joined
|
|||
timotimo | www.youtube.com/watch?v=4KcX9wHjVTM - i'd like someone to implement this :) | 16:57 | |
moritz | m: say 'a꣭'.chars | 16:59 | |
camelia | rakudo-moar e7ccc9: OUTPUT«1» | ||
moritz | m: given "a\c[COMBINING DEVANAGARI LETTER NA]" { .say; say .elems } | 17:00 | |
camelia | rakudo-moar e7ccc9: OUTPUT«a꣭1» | ||
ilmari | m: say "foo".elems # that might not be what you meant | 17:02 | |
camelia | rakudo-moar e7ccc9: OUTPUT«1» | ||
17:04
apiw left
17:05
sufrostico joined
|
|||
perl6newbee | hi | 17:06 | |
how can I coerce a Str to Numeric? | |||
timotimo | m: say "1234".Numeric | ||
camelia | rakudo-moar e7ccc9: OUTPUT«1234» | ||
perl6newbee | :-) | ||
lizmat | m: dd +"42" | ||
camelia | rakudo-moar e7ccc9: OUTPUT«42» | ||
lizmat | m: dd 666, +"42" | 17:07 | |
camelia | rakudo-moar e7ccc9: OUTPUT«66642» | ||
lizmat | hmmmm... | ||
m: say "abc".perl | |||
camelia | rakudo-moar e7ccc9: OUTPUT«"abc"» | ||
lizmat | m: dd "42", +"42" | 17:08 | |
camelia | rakudo-moar e7ccc9: OUTPUT«"42"42» | ||
17:16
pmurias left
|
|||
perl6newbee | thanks. that helps. but if the variable is a string I get an exception. how can I check that there is a numeric scalar? $response ~~ Numeric doesn not work | 17:16 | |
gfldex | m: my $s = "1234"; say so $s ~~ /\d+/; | 17:17 | |
camelia | rakudo-moar e7ccc9: OUTPUT«True» | ||
17:18
apiw joined
|
|||
timotimo | that's not generic enough | 17:18 | |
i'd suggest using "try" | |||
m: say try { +"hello" } // "oh no" | |||
camelia | rakudo-moar e7ccc9: OUTPUT«oh no» | ||
timotimo | m: say try { +"99999" } // "oh no" | ||
camelia | rakudo-moar e7ccc9: OUTPUT«99999» | ||
perl6newbee | nice, but the string can be Numeric. So, Rat und Int is possible | ||
17:19
musiKk left
|
|||
perl6newbee | timotimo thx! | 17:19 | |
timotimo | you're welcome! | ||
gfldex | perl6newbee: you are mixing input validation with coercion. That may not work well. | 17:20 | |
17:20
dakkar_ left
|
|||
perl6newbee | That's true, but in this case I see no alternatives. See: github.com/pnu/io-prompt/blob/mast...pt.pm#L165 | 17:22 | |
17:23
sufrostico left
17:25
abraxxa left
17:28
Ven left
17:32
sufrostico joined
17:34
Celelibi joined
|
|||
perl6newbee | w00t. it works! thx | 17:36 | |
17:36
sufrostico left
17:38
Guest11571 left
17:39
sufrostico joined
17:42
Vitrifur joined
|
|||
dalek | c: f9387b7 | (Wenzel P. P. Peppmeyer)++ | doc/Language/exceptions.pod: fix typo |
17:43 | |
c: 861648f | (Wenzel P. P. Peppmeyer)++ | doc/Language/exceptions.pod: show that try blocks are normal blocks (timotimo++ for the nice idiom) |
|||
timotimo | :3 | 17:45 | |
dalek | osystem: 2204e22 | RabidGravy++ | META.list: Add Oyatul See github.com/jonathanstowe/Oyatul |
||
RabidGravy | Another yak bites the dust | 17:47 | |
Hotkeys | is there a shorter way to zip two sequences flat without calling flat on them | ||
m: say (flat (0,1,*+*...*)Z(2,1,*+*...*))[^10] | |||
camelia | rakudo-moar e7ccc9: OUTPUT«(0 2 1 1 1 3 2 4 3 7)» | ||
Hotkeys | for example | ||
er the flat should be outside the parens for 1 byte savings | 17:48 | ||
timotimo | you can abuse that say will only give you the first few items in a list so you can leave out the [^10] btw | 17:49 | |
m: say 1, 1, *+* ... * | |||
camelia | rakudo-moar e7ccc9: OUTPUT«(...)» | ||
timotimo | damn you! :D | ||
m: say (0, 1, *+* ... *) Z (1, 1, *+* ... *) | |||
camelia | rakudo-moar e7ccc9: OUTPUT«(...)» | ||
timotimo | m: say flat (0, 1, *+* ... *) Z (1, 1, *+* ... *) | ||
camelia | rakudo-moar e7ccc9: OUTPUT«(0 1 1 1 1 2 2 3 3 5 5 8 8 13 13 21 21 34 34 55 55 89 89 144 144 233 233 377 377 610 610 987 987 1597 1597 2584 2584 4181 4181 6765 6765 10946 10946 17711 17711 28657 28657 46368 46368 75025 75025 121393 121393 196418 196418 317811 317811 514229 514229 832…» | ||
timotimo | there we go. | ||
all you need to know is it doesn't infiniloop when you say it | 17:50 | ||
when you put or print it, however, that's a different story | |||
Hotkeys | right | ||
I just was wondering if there was a way to not use flat() | |||
but still get a flat list | |||
Hotkeys is trying to find alternate solutions to a golf problem | |||
this is my current shortest | 17:51 | ||
m: my &f = {(0,1,1,4,{$^b;$^d;3*$^c-$^a}...*)[0..$_]}; say f(10) | |||
camelia | rakudo-moar e7ccc9: OUTPUT«(0 1 1 4 3 11 8 29 21 76 55)» | ||
Hotkeys | the lucas-nacci numbers | ||
timotimo | m: say '.head($_)'.chars; say '[0..$_]'.chars | 17:52 | |
camelia | rakudo-moar e7ccc9: OUTPUT«97» | ||
timotimo | too bad | ||
17:53
apiw left
|
|||
b2gills | m: #`(Hotkeys: my shortest was 57 bytes) say {([-1,1],[0,2],{[$^a[0,1]Z+$^b[1,0]]}...*)[1..$_+1]»[0]}(10) | 17:55 | |
camelia | rakudo-moar e7ccc9: OUTPUT«(0 1 1 4 3 11 8 29 21 76 55)» | ||
Hotkeys | that's cray | 17:56 | |
I like my 42 byte count | |||
b2gills | Hotkeys is reffering to this: codegolf.stackexchange.com/a/71465/1147 | ||
Hotkeys | a fun number | ||
and short | |||
:p | |||
I don't like how I discard those positionals I wish ther was a nicer way | |||
but that's okay | |||
lizmat | afk for a few hours& | 17:57 | |
b2gills | the post was closed or deleted when I tried to post it | ||
Hotkeys | weird | ||
man I kind of hate golfing langs | 17:58 | ||
b2gills | m: #`(originally I had) say {flat flat((0,1,*+*...*)Z(2,1,*+*...*)).rotor(1=>2,1=>0)[0..$_]}(10) | ||
camelia | rakudo-moar e7ccc9: OUTPUT«(0 1 1 4 3 11 8 29 21 76 55)» | ||
Hotkeys | I feel like it ruins the fun of codegolf | ||
ah | |||
I was gonna do | |||
b2gills | m: say {flat ((0,1,*+*...*)Z(2,1,*+*...*)).kv.map({$^b[$^a%2]})[0..$_]}(10) # this was the same length | ||
camelia | rakudo-moar e7ccc9: OUTPUT«(0 1 1 4 3 11 8 29 21 76 55)» | ||
timotimo | flat flat? ugh :) | 17:59 | |
b2gills | The short one I came up with was a translation of the Jelly example | ||
Hotkeys | m: {flat((0,1,*+*...*)Z(2,1,*+*...*))[0,2...2*$_]}(10) | ||
camelia | ( no output ) | ||
Hotkeys | m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))[0,2...2*$_]}(10) | ||
camelia | rakudo-moar e7ccc9: OUTPUT«(0 1 1 2 3 5 8 13 21 34 55)» | ||
17:59
SCHAAP137 joined
|
|||
Hotkeys | that was gonna be my alternative | 17:59 | |
oh wait | |||
whoops | |||
m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))[^20] | |||
camelia | rakudo-moar e7ccc9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7UOMbGM6hxMissing blockat /tmp/7UOMbGM6hx:1------> 3 {flat((0,1,*+*...*)Z(2,1,*+*...*))[^20]7⏏5<EOL> expecting any of: statement end statement modifier stateme…» | ||
Hotkeys | m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))(20) | ||
camelia | rakudo-moar e7ccc9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mvhiT8jqs1Missing blockat /tmp/mvhiT8jqs1:1------> 3y {flat((0,1,*+*...*)Z(2,1,*+*...*))(20)7⏏5<EOL> expecting any of: statement end statement modifier stateme…» | ||
Hotkeys | m: say flat((0,1,*+*...*)Z(2,1,*+*...*))[^20] | 18:00 | |
camelia | rakudo-moar e7ccc9: OUTPUT«(0 2 1 1 1 3 2 4 3 7 5 11 8 18 13 29 21 47 34 76)» | ||
Hotkeys | oh | ||
I wanted the odd ones | |||
m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))[1,3...2*$_]}(10) | |||
camelia | rakudo-moar e7ccc9: OUTPUT«(2 1 3 4 7 11 18 29 47 76)» | ||
Hotkeys | nopes | ||
m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))[9,2...2*$_]}(18) | |||
camelia | rakudo-moar e7ccc9: OUTPUT«()» | ||
Hotkeys | m: say {flat((0,1,*+*...*)Z(2,1,*+*...*))[0,2...2*$_]}(18) | 18:01 | |
camelia | rakudo-moar e7ccc9: OUTPUT«(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584)» | ||
Hotkeys | uh | ||
I have no idea what I'm doing | |||
I'll stick with my original | |||
I have 5 upvotes on my lucas-nacci answer | 18:02 | ||
that's the most I'vegotten on a codegolf so far | 18:03 | ||
b2gills | I just up-voted it | ||
Hotkeys | tyty | ||
b2gills | I keep a tab open on codegolf.stackexchange.com/questio...ort=newest | ||
timotimo | stackoverflow.com/questions/352650...and-perl-6 - this here is an interesting thing | 18:05 | |
18:07
RabidGravy left,
musiKk joined
18:10
nakiro left
|
|||
b2gills | Hotkeys: I wrote a program to count the bytes of the currently selected text that I use for CG which you might be interested in: gist.github.com/b2gills/93d1e2aa6583b95315b2 It makes it real quick to find out if I managed to create shorter code. | 18:12 | |
Hotkeys | oh I've just been using mothereff.in/byte-counter | 18:13 | |
18:13
sortiz joined
|
|||
Hotkeys | because I'm lazy | 18:13 | |
timotimo | you know about jnthn's code golf assistant? | ||
one of the example programs for GTK::Simple and supplies and such | |||
Hotkeys | I do not | 18:14 | |
timotimo | it even evaluates your code for you! | ||
and of course it also shows you exactly how many characters your code has | |||
(but it does not have something cool for when your code accidentally infini-loops :( ) | |||
Hotkeys | lol | 18:15 | |
I just write all my code in the repl pretty much | |||
for golf anyway | |||
18:16
RabidGravy joined
|
|||
Hotkeys | again because I'm lazy | 18:19 | |
b2gills | I have one tab in Tilda that is the rlwrapped REPL and another that I just press up+enter in to get the byte count ( because the last thing I ran was the code that I linked earlier ) | ||
Hotkeys | neat | 18:20 | |
lucs | m: say <k d r w b t>.sort({$^a cmp 'w' || $a cmp $^b}); # The sorting function makes no sense, still, why is the undeclared 「$a」 not raising an error? | ||
camelia | rakudo-moar e7ccc9: OUTPUT«(k d r b t w)» | ||
hoelzro | I'm wondering if the REPL should try to detect if it's running under rlwrap, and if so, not display the "use Linenoise, Readline, or rlwrap" message | ||
I'm also wondering if that message should be displayed by default; maybe have a --beginner switch or something | |||
interactive help in the REPL might not be bad either | 18:21 | ||
hoelzro has spent a lot of time thinking about the REPL lately | |||
b2gills | lucs you did declare $a as $^a earlier | ||
lucs | b2gills: Nope, as the example evaluated by m: shows. | 18:22 | |
b2gills | m: { $^a; say $a }("Hello") | ||
camelia | rakudo-moar e7ccc9: OUTPUT«Hello» | ||
Hotkeys | actually by putting the $^a somewhere | ||
you make a fn that takes $a | |||
lucs | Hmm... | ||
Hotkeys | m: say {$^a} | ||
camelia | rakudo-moar e7ccc9: OUTPUT«-> $a { #`(Block|65807976) ... }» | ||
Hotkeys | I assume $^a has to be the first instance of the thing | 18:23 | |
b2gills | lucs the code you wrote will put them in the same order if they are on the same side of 'W | ||
Hotkeys | m: say {$a;$^a} | ||
camelia | rakudo-moar e7ccc9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NtU3N3FkfKVariable '$a' is not declaredat /tmp/NtU3N3FkfK:1------> 3say {7⏏5$a;$^a}» | ||
Hotkeys | yeah | ||
thought so | |||
m: say {$^a;$a} | |||
camelia | rakudo-moar e7ccc9: OUTPUT«-> $a { #`(Block|68025544) ... }» | ||
Hotkeys | $^a is like a magic declaration of $a | ||
I didn't actually realize that | 18:24 | ||
That will let me write shorter things in future maybe | |||
lucs | b2gills: Yeah, the sorting itself is irrelevant in my example -- I just wanted something with both $^a and $a. | ||
In conclusion, could we say that this is correct (albeit a bit unexpected) behaviour? | 18:25 | ||
b2gills | It's correct, and the way I would expect it. | 18:26 | |
Placeholder parameters confused new Perl 6 programmers regularly though | |||
lucs | b2gills: Hmm... Your expectations appear to match the language better than mine :) | ||
I'm not totally new to Perl 6, but to placeholders, yeah, rather. | 18:27 | ||
18:27
leont joined
18:28
samb1 left
|
|||
Hotkeys | I say again | 18:28 | |
I hate golf langs | |||
b2gills | perhaps I should have said "confuse programmers new to that feature regularly" | ||
lucs | Right :) | ||
b2gills | Hotkeys: I'm right there with you, though I think I have occasionally written programs in Perl 6 that beat every language though | 18:29 | |
Hotkeys | I usually can't beat things like CJam etc. | ||
I don't see the point in trying to write code in a language specifically designed to write short code | 18:30 | ||
takes all the fun out of it | |||
now that isn't to say I want to golf in java | |||
but yknow | |||
huf | not being able to golf in a proglang is a bit like not being able to write poetry in a natural language | 18:31 | |
Hotkeys | it's more of a "look at this golf lang I designed!" more than anything | ||
huf | do i want the instructions for my drain cleaner to be in verse? no | ||
Hotkeys | lol | ||
huf | but i *do* want *some* things to be in verse, it's fun | ||
Hotkeys | right, golfing != good code | ||
but it is fun | |||
well | |||
not good code most of the time | 18:32 | ||
I quite like my lucas-nacci solution thouhg | |||
perl 6 sequences are one of my fav things | |||
b2gills | Hotkeys: here is an example where I beat every language handily codegolf.stackexchange.com/a/66125/1147 | 18:33 | |
The ... sequence operator does help reduce code by a few bytes. I think I have several CGs where I have three of them in the same code block | 18:34 | ||
often the shortest way to write something is the way I would write it anyway, except with fewer spaces | 18:37 | ||
Hotkeys | wow | ||
CJam was at 517 | |||
harsh | |||
nice solution though | 18:39 | ||
18:45
dolmen joined
18:49
Actualeyes left
|
|||
timotimo | i kind of feel like it'd be all right to add ^... and ^...^ to 6.d | 18:50 | |
gfldex | m: my @a[5;5]; for @a.values <-> $v { $v = (0..99).pick }; dd @a; for @a[1..4;1..14].values <-> $v { $v = 0 }; dd @a; | 18:51 | |
camelia | rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 5), [86, 2, 71, 50, 52], [79, 53, 42, 75, 10], [25, 56, 54, 36, 45], [89, 25, 78, 38, 81], [17, 66, 73, 62, 18])Partially dimensioned views of arrays not yet implemented. Sorry.  in block <unit> at /tmp/sMNQyexl45 line 1» | ||
gfldex | grrr | ||
timotimo | yes, rather. | 18:52 | |
gfldex | m: my @a[5;5]; say @a.elems; | 18:54 | |
camelia | rakudo-moar e7ccc9: OUTPUT«5» | ||
18:54
musiKk left
|
|||
gfldex | shouldn't that be a list with 2 elements? | 18:54 | |
timotimo | er, shouldn't it actually be 25 elements? | 18:55 | |
gfldex | or 25 if it shouldn't be a list | ||
m: my @a[5;5]; say @a.values.elems; | |||
camelia | rakudo-moar e7ccc9: OUTPUT«25» | ||
timotimo | m: my @a[5;5]; say @a.list.perl; | ||
camelia | rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 5), [Any, Any, Any, Any, Any], [Any, Any, Any, Any, Any], [Any, Any, Any, Any, Any], [Any, Any, Any, Any, Any], [Any, Any, Any, Any, Any])» | ||
timotimo | humpf. | ||
gfldex | how do i get hold of the dimensions of a shaped Array? | ||
timotimo | you .shape | ||
what does roast say about shaped array's .elems? | 18:56 | ||
gfldex | m: my @a[5;5]; dd @a.shape; | ||
camelia | rakudo-moar e7ccc9: OUTPUT«List $shape = $(5, 5)» | ||
18:56
addison joined
|
|||
timotimo | it's potentially about "how many things can you get from []-ing | 18:56 | |
gfldex | what is the expert opinion on @a.elems == @a.values.elems ? | 18:57 | |
timotimo | well, .values gives you all the values in the shaped array. so i *know* for a fact that it's right | ||
m: my @a[5;5]; say @a[3].perl; | |||
camelia | rakudo-moar e7ccc9: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry.  in block <unit> at /tmp/zNsKskq00K line 1» | ||
timotimo | ^- if this were implemented, it'd be a good reason for having .elems work that way | 18:58 | |
because @a[24] ain't gonna work | |||
gfldex | sounds right | ||
m: my @a[5;5]; for @a.values <-> $v { $v = (0..99).pick }; dd @a; for 1..@a.shape[0]-1 -> $x { for 1..@a.shape[1]-1 -> $y { @a[$x;$y] = 0 } }; dd @a; | 18:59 | ||
camelia | rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 5), [56, 19, 91, 32, 2], [1, 77, 83, 25, 52], [49, 68, 85, 59, 23], [10, 69, 91, 16, 66], [2, 3, 92, 41, 24])Array.new(:shape(5, 5), [56, 19, 91, 32, 2], [1, 0, 0, 0, 0], [49, 0, 0, 0, 0], [10, 0, 0, 0, 0], [2, 0, 0, 0, 0])» | ||
timotimo | cute | ||
gfldex | for @a[1..4;1..14].values <-> $v { $v = 0 }; # would be much better but is sadly NYI | 19:00 | |
for @a[1..4;1..4].values <-> $v { $v = 0 }; # would be much better but is sadly NYI | |||
timotimo | yeah ;( | 19:01 | |
19:03
leont left
|
|||
[Coke] | stmuk_: the readme should mention that this will ONLY work in /Applications. (~/Applications is another common place to install things.) | 19:03 | |
dalek | osystem: c82770d | wbiker++ | META.list: Add new module IO::Prompt |
||
osystem: c911b6e | (Zoffix Znet)++ | META.list: Merge pull request #150 from wbiker/master Add new module IO::Prompt |
|||
19:03
dolmen left
|
|||
gfldex | m: my @a[5;5]; for @a.values <-> $v { $v = (0..99).pick }; dd @a; for 1..@a.shape[0]-1 { $^x; for 1..@a.shape[1]-1 { @a[$x;$^y] = 0 } }; dd @a; | ||
camelia | rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 5), [75, 16, 35, 64, 79], [88, 94, 47, 11, 6], [71, 92, 31, 46, 12], [78, 23, 20, 53, 58], [34, 45, 96, 46, 8])Array.new(:shape(5, 5), [75, 16, 35, 64, 79], [88, 0, 0, 0, 0], [71, 0, 0, 0, 0], [78, 0, 0, 0, 0], [34, 0, 0, 0, 0])» | ||
stmuk_ | [Coke]: yes good point | ||
dalek | : 4ab82aa | (Zoffix Znet)++ | misc/SHELTER/io-prompt/META.info: Remove IO::Prompt from SHELTER It was been adopted by wbiker: github.com/perl6/ecosystem/pull/150 |
19:04 | |
[Coke] | stmuk_++ | 19:05 | |
dalek | ar: 8090c51 | (Steve Mynott)++ | ports/darwin_dmg/HOW_TO_INSTALL.txt: needs root apps folder coke++ |
19:06 | |
19:06
apiw joined,
firstdayonthejob joined
|
|||
sortiz | \o #perl6 | 19:07 | |
dalek | ar: 4bb9c25 | (Steve Mynott)++ | ports/darwin_dmg/HOW_TO_INSTALL.txt: hand wave about signing security settings |
||
timotimo | m: my @a[5]; for @a.kv -> $k, $v is rw { } | 19:08 | |
camelia | rakudo-moar e7ccc9: OUTPUT«Parameter '$v' expected a writable container, but got Any value in block <unit> at /tmp/y3M2F4_Sje line 1» | ||
timotimo | why :< | ||
19:09
bowtie joined,
apiw left,
bowtie is now known as Guest60441,
lostinfog joined
|
|||
timotimo | m: my @a[5;5]; for @a.pairs -> $p { $p.value = 0; $p.value = (^99).pick if any(|$p.key) == any(0, 4); }; say @a.perl | 19:10 | |
camelia | rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 5), [8, 65, 30, 49, 77], [4, 0, 0, 0, 28], [84, 0, 0, 0, 64], [51, 0, 0, 0, 60], [26, 16, 14, 26, 58])» | ||
dalek | ar: aa89b9c | (Steve Mynott)++ | ports/darwin_dmg/HOW_TO_INSTALL.txt: lower expectations about GUIness of perl 6 |
||
MadcapJake | could anyone help me figure out how to do a "default" derived class that the base class's `new` blesses? | 19:11 | |
timotimo | gfldex: how do you like that code? ^ | 19:12 | |
19:12
apiw joined
|
|||
MadcapJake | If I place the Cls::Default before the Cls decl, it says it doesn't know what Cls is, if I place it after, Cls' `new` says it doesn't know what Cls::Default is | 19:13 | |
timotimo | you can just have a "class Cls { ... }" up front | ||
gfldex | timotimo: nice but doesn't fit to codegolf.stackexchange.com/question...t-an-array | ||
timotimo | a forward declaration, that is | ||
too long, eh? | |||
ah, it's supposed to do rectangular, not just square | 19:14 | ||
gfldex | i want it to be a complete program, so the init of @a needs to be separated (and come from stdin) | ||
timotimo | well, that'd be easy to pull out | ||
it may be shorter code-wise if .kv would give rw containers for the values | 19:15 | ||
i wonder if it doesn't because of design reasons | |||
gfldex | m: my @a[5;6]; for @a.pairs -> $p { $p.value = 0; $p.value = (^99).pick if any(|$p.key) == any(0, @a.shape[1]-1); }; say @a.perl | 19:16 | |
camelia | rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(5, 6), [93, 25, 31, 56, 20, 81], [96, 0, 0, 0, 0, 40], [35, 0, 0, 0, 0, 68], [3, 0, 0, 0, 0, 94], [46, 0, 0, 0, 0, 37])» | ||
MadcapJake | what's the difference between fail and die and when would you use each? | 19:17 | |
the language/Exceptions page only shows «die» being used | |||
timotimo | fail will return a Failure object from the enclosing routine | 19:18 | |
perlpilot | die is a worse failure :) | ||
timotimo | whereas die will immediately throw | ||
moritz still doubts the use case of fail() | |||
MadcapJake | actually I might have a good use-case with my current project: github.com/MadcapJake/Test-Lab | 19:19 | |
*maybe* | |||
19:20
ocbtec left,
laz78 joined,
apiw left
|
|||
perlpilot | moritz: we seem to use fail in src/core about twice as much as die. | 19:21 | |
MadcapJake | perlpilot, wow! do the Failures end up arriving at a die sub eventually? | 19:22 | |
or where do they go? :P | |||
timotimo | when you try to use the Failure object for stuff, it gets thrown | 19:23 | |
perlpilot | MadcapJake: that is left as an exercise for someone who wants to do more than just a simple ack :) | ||
MadcapJake | o_O | ||
timotimo, you can't inspect it at all? | |||
19:23
rdleon_ is now known as rdleon
|
|||
timotimo | no, you can | 19:23 | |
definedness and boolness and such all work | |||
and type checks | |||
MadcapJake | sweet, that's perfect | ||
moritz | perlpilot: yes, because the specs mandate it | 19:25 | |
perlpilot: I think all of these use cases could be converted to die in v6.d for example | 19:26 | ||
19:26
pmqs joined
|
|||
moritz | afaict there are two main reasons for fail() | 19:26 | |
1) to avoid having exceptions that cross thread boundaries | |||
19:27
perl6newbee left
|
|||
moritz | 2) to not invalidate a huge parallel computation just by having one data error somewhere | 19:27 | |
MadcapJake | is this accurate: fail is for when you **don't** want to pass an Exception to CATCH handlers? | ||
moritz | my counter point to 1) is that we already catch exceptions in start { } blocks, and rethrow them on Promise.result | ||
19:28
cdg left
|
|||
moritz | and to 2) is that if your application isn't prepared to handle data erros in a huge parallel computation, it likely isn't prepared to handle them in resulting data structure either | 19:28 | |
19:28
vendethiel joined
|
|||
llfourn | is there a reason Proc::Async doesn't support .new(:in($iohandle)) like Proc does -- NYI? | 19:29 | |
MadcapJake | the docs utilize the verbiage «throw» and «unthrow»; do these terms have to do with passing execution to CATCH handlers (or exiting the program where there are none)? | ||
19:29
lokien_ left
|
|||
moritz | MadcapJake: it's much simpler | 19:30 | |
MadcapJake: if &foo fails, you can write my $res = foo() | |||
and there is no exception yet | |||
and only if you use $res without checking it first (for truth or definedness) are you getting an exception | 19:31 | ||
MadcapJake | oh, so like a lazy exception? | ||
timotimo | yeah. we call it "unthrown exception" | 19:32 | |
19:36
mr-foobar joined
|
|||
skids | To pick a nit, Exception.new is an "unthrown exception" :-) | 19:37 | |
gfldex | m: my @a[2;2]; @a = 1,2,3,4; | ||
camelia | rakudo-moar e7ccc9: OUTPUT«Assignment to array with shape 2 2 must provide structured data in block <unit> at /tmp/HfN1KuUT9T line 1» | ||
gfldex | is there any short way to assign a flat list to a shaped array? | ||
dalek | ar: 7218fc3 | (Steve Mynott)++ | ports/darwin_dmg/HOW_TO_INSTALL.txt: more tweaking of the final README |
19:39 | |
gfldex | i'm silly and don't need the shaped array at all. I just need the shape. | ||
I need the shaped Array without the Array. :) | |||
19:42
dbrunton joined
19:43
[TuxCM] joined
|
|||
skids | m: my @a[2;2]; @a.values.cache[*] = 1,2,3,4; @a.perl.say; | 19:46 | |
camelia | rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(2, 2), [1, 2], [3, 4])» | ||
perlpilot | skids++ that's neat | 19:48 | |
19:49
AlexDaniel joined
19:50
mr-foobar left,
Guest60441 left
19:51
dbrunton left,
bowtie_ joined
|
|||
skids | m: m: my @a[2;2]; @a.values.cache = 1,2,3,4; @a.perl.say; # Don't need the slice apparently | 19:51 | |
camelia | rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(2, 2), [1, 2], [3, 4])» | ||
19:53
mr-foobar joined
19:57
mr-foobar left
20:01
keithbro joined
|
|||
skids | m: my @a[2;2]; eager @a.values[0,1,2,3] = 1,2,3,4; @a.perl.say; | 20:02 | |
camelia | rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(2, 2), [1, 2], [3, 4])» | ||
skids | m: my @a[2;2]; eager @a.values = 1,2,3,4; @a.perl.say; # Hrmf | ||
camelia | rakudo-moar e7ccc9: OUTPUT«Cannot modify an immutable Seq in block <unit> at /tmp/dtKOj4yVQF line 1» | ||
skids | m: my @a[2;2]; eager @a.values[] = 1,2,3,4; @a.perl.say; # Double Hrmf | 20:03 | |
camelia | rakudo-moar e7ccc9: OUTPUT«Cannot modify an immutable Seq in block <unit> at /tmp/Dwm2mneuvV line 1» | ||
skids | m: my @a[2;2]; eager @(@a.values) = 1,2,3,4; @a.perl.say; # Ahh, makes more sense now. | 20:04 | |
20:04
mr-foobar joined
|
|||
camelia | rakudo-moar e7ccc9: OUTPUT«Array.new(:shape(2, 2), [1, 2], [3, 4])» | 20:04 | |
sortiz | BTW, I found some contradictions in roast with .elems: github.com/perl6/roast/blob/master...rray.t#L45 seems to expect that @foo.elems returns the number of _assigned_ elements. | ||
b2gills | m: sub foo { fail "hello" }; say foo() // "world"; # I prefer fail so that I don't have to use try as often | 20:05 | |
camelia | rakudo-moar e7ccc9: OUTPUT«world» | ||
skids | sortiz: what's that contradict with? | 20:07 | |
b2gills | m: my $a = [[67,4,-8,5,13],[9,13,42,4,-7],[1,1,3,-9,29],[16,99,8,77,0]];{.[1..*-2]»[1..*-2] »=»0}($a); say $a.perl | 20:08 | |
camelia | rakudo-moar e7ccc9: OUTPUT«$[[67, 4, -8, 5, 13], [9, 0, 0, 0, -7], [1, 0, 0, 0, 29], [16, 99, 8, 77, 0]]» | ||
sortiz | skids, In other places, seems to expect the elements of the first dimension, let me check... | 20:09 | |
20:09
musiKk joined
20:10
keithbro left
|
|||
skids | b2gills: problem is the current Failure will spew garbage if it is thrown away unhandled, when it is GCd. | 20:10 | |
20:11
NZKindest joined
|
|||
sortiz | skids, see github.com/perl6/roast/blob/master...hods.t#L11 | 20:11 | |
skids | (There'd be an easy fix of overriding Failure.DESTROY in a subclass but it didn't work last time I tried) | 20:12 | |
20:13
S41D0 joined
|
|||
skids | sortiz: Maybe a difference between fully shaped and partially shaped arrays? | 20:13 | |
Though, that second behavior I'm dubious as to the utility of. | 20:14 | ||
sortiz | I don't now, but is in my "things that need clarification" list. | ||
b2gills | skids maybe if you had 「submethod DESTROY { self.defined }」 in your subclass | 20:15 | |
skids | (and if you write a test to see that the first dimension is what is being returned, probably the other one should not also be 2) | ||
b2gills: I tried that it kinda blew up. But maybe things are better now. | |||
sortiz | skids, I agree. | 20:16 | |
20:16
telex left
|
|||
timotimo | b2gills: wow, your solution is beautiful | 20:17 | |
b2gills | I don't know if I want the result to print to STDERR if I don't use it, and it happens to be a Failure | ||
b2gills takes a bow | 20:18 | ||
20:18
telex joined
20:19
espadrine left
20:23
darutoko left
|
|||
Hotkeys | hello I'm back perl friends | 20:24 | |
sortiz | o/ Hotkeys | 20:25 | |
Hotkeys | Just had a linguistics midterm | 20:26 | |
was ezz | |||
ezpz* | |||
20:29
CIAvash left,
laz78 left,
musiKk left
20:34
bowtie_ left
20:35
bowtie joined,
bowtie is now known as Guest10744,
grondilu left
20:36
S41D0 left
|
|||
nemo | m: 1 ≠ 2 | 20:36 | |
camelia | rakudo-moar e7ccc9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/px2r4VbbCoConfusedat /tmp/px2r4VbbCo:1------> 0317⏏5 ≠ 2 expecting any of: infix infix stopper statement end statement modifier statement…» | ||
nemo | hm | ||
Hotkeys | don't have those nemo | 20:37 | |
at least not yet | |||
same for ≤ ≥ | |||
nemo | Hotkeys: you guys considered configurable mappings? I guess it could get messy unless the script could define a cheat sheet | ||
20:37
grondilu joined
|
|||
jnthn | m: sub infix:<≠>($a, $b) { $a != $b }; say 4 ≠ 3 | 20:37 | |
camelia | rakudo-moar e7ccc9: OUTPUT«True» | ||
Hotkeys | nemo ^^ | ||
nemo | ah neat | ||
that's really cool. had no idea it was so easy | 20:38 | ||
jnthn | If you stick that in a module and shove "is export" on it, then you can just use that module and have the mappings :) | ||
nemo | but why wouldn't it be I guess | ||
Hotkeys | yep | 20:39 | |
all ops are just functions | |||
some of them have categories slapped on them | |||
like infix or postfix etc. | |||
functions that is | 20:40 | ||
20:41
ely-se joined
20:42
kaare_ left
|
|||
sortiz | What is the expected way for handling things like "2;4" for indexing? A new kind of object in the Capture? | 20:43 | |
20:44
yqt joined
|
|||
AlexDaniel | So I was slightly disappointed by the fact that 「hyper」 does not really work, but whatever. So I decided to do some stuff with plain 「start { }」 and guess what? “double free or corruption (fasttop): 0x00007f68c3048f90”… that's after like 30 minutes of hard work. I've tried running it several times but it always crashes for one reason or another… :/ The problem is that I don't even know how to golf that down… what can I do? | 20:44 | |
skids | sub infix:<≠>($a, $b) is prec(:equiv<=>) { $a != $b }; say 4 ≠ 3 + 1 # Not quite THAT easy, you do need to also set precedence. | 20:45 | |
moritz | and you probably want equiv to ==, not = | 20:47 | |
ely-se | I mistook it for <=> initially | 20:48 | |
skids | Oh yes surely :-) | ||
20:49
Guest10744 left,
jolts left
|
|||
skids | m: sub infix:<≠>($a, $b) is prec(:equiv<==>) { $a != $b }; say 4 ≠ 3 + 1 # hmm. | 20:49 | |
camelia | rakudo-moar e7ccc9: OUTPUT«2» | ||
Hotkeys | why not equiv to != | ||
ely-se | I also want e̶q̶ | 20:50 | |
Hotkeys | lol | ||
20:50
virtualsue left
|
|||
Hotkeys | how do you even type that | 20:50 | |
I can't guess the compose sequence for a combining line like that | |||
ely-se | m: sub infix:<e̶q̶>($a, $b) is prec(:equiv<eq>) { $a ne $b }; say '1' e̶q̶ '01' | 20:51 | |
camelia | rakudo-moar e7ccc9: OUTPUT«True» | ||
skids | Hotkeys: != should work too. | ||
20:51
bowtie_ joined
|
|||
ely-se | Hotkeys: strikethrough combining characters | 20:51 | |
skids | oh. | ||
m: sub infix:<≠>($a, $b) is equiv<!=> { $a != $b }; say 4 ≠ 3 + 1 | |||
camelia | rakudo-moar e7ccc9: OUTPUT«False» | ||
Hotkeys | ely-se: I guess I'll look at my compose list | ||
20:52
SCHAAP137 left
|
|||
Hotkeys | I don't think I have a sequence for that | 20:52 | |
hm | |||
I'll deal with that later | |||
20:53
[Sno] left,
cdg joined
|
|||
jnthn | sortiz: [2;4] calls a different multi, postcircumfix:<[; ]>, which is how they're handled | 20:55 | |
That is, it's a syntactic distinction | 20:56 | ||
20:56
SCHAAP137 joined
|
|||
sortiz | jnthn, and in my Indexable's AT-POS, what can I expect to receive? | 20:57 | |
jnthn | sortiz: Multiple parameters | ||
One per indice | 20:58 | ||
sortiz | jnthn, thanks! | ||
21:02
bowtie_ left
|
|||
sortiz | jnthn, a last question: and in ASSING-POS and BIND-POS the new value should be the last if many args? | 21:04 | |
*of | |||
21:04
[TuxCM] left,
bowtie_ joined
|
|||
Hotkeys | heh | 21:05 | |
ASSING | |||
21:05
revhippie joined,
sufrostico left
|
|||
jnthn | The number of times I did that typo... :) | 21:05 | |
sortiz: Correct | |||
@a[1;2] = 3 calls @a.ASSIGN-POS(1, 2, 3) | 21:06 | ||
sortiz | But that need an specific signature depending of the dimensions, no? | 21:07 | |
Or an *@args, and ask for the last one. | 21:10 | ||
A little LTA, imo. | 21:11 | ||
21:12
dolmen joined
21:16
bowtie_ left
|
|||
sortiz | And too late for changing to ASSIGN-POS(??:CLASS:D: \new, *@indexes) I suppose. | 21:17 | |
21:17
bowtie_ joined,
sno joined
|
|||
jnthn | sortiz: It was fairly deliberately picked | 21:17 | |
sortiz: Largely for performance reasons | 21:18 | ||
sortiz: The overwhelmingly common cases are 2 and 3 dimensions. | |||
21:18
SCHAAP137 left
|
|||
sortiz | jnthn, Yes I understand. | 21:18 | |
jnthn | Which we'll later provide special candidates for in Rakudo's Array/native_array | 21:19 | |
But yeah, it's one of those places we picked easy optimizability over convenience. | |||
21:19
geraud joined
|
|||
jnthn | Largely 'cus implementing multi-dim data strucutres won't be that common. | 21:20 | |
sortiz | The only complication that I see is when $new is typed. | ||
skids | Wouldn't (@, $) be able to be added pretty easily, given you'd not end up passing a Positional as an element normally? | ||
jnthn | skids: That one fails the "make it perform easily" test. | 21:21 | |
It forces construction of something for the @foo | |||
Which in turn forces allocation | |||
skids | So the indices aren't already in a Positional post-parse? | 21:22 | |
21:22
patrickz joined
|
|||
jnthn | No, but compile time isn't what matters, the point is you'd have to construct said positional per indexing | 21:23 | |
Most of the time | |||
'cus arrays are normally indexed with dynamic indices, in loops | |||
21:23
virtualsue joined
21:24
sufrostico joined
|
|||
skids | Wouldn't shallow immutability be able to take care of that? | 21:25 | |
21:25
SCHAAP137 joined
|
|||
jnthn | I don't really see it. | 21:25 | |
@foo[$a;$b] can (with a bit more analysis that we do right now) compile into @foo.AT-POS($a, $b) | 21:26 | ||
If we passed a positional it'd be more like @foo.AT-POS(make-something-positional($a, $b)) | |||
Where make-something-positional would need to return something that refers to $a and $b | 21:27 | ||
skids was thinking ENTER(or whatnot) { make-something-positional }; something-positional[0] = $a; something-positional[1] = $b; @foo.AT-POS(@something-positional) | 21:28 | ||
21:28
sufrosti1o joined,
sufrostico left
|
|||
timotimo | that'd require a pretty difficult piece of optimization technology | 21:29 | |
jnthn | skids: Yeah, trouble is that this sneaky bit of storage can easily escape | ||
21:29
virtualsue left
21:30
sufrostico joined
|
|||
jnthn | skids: If you don't try to lift it out of a closure, then it's useless for the block of a for loop, since we ENTER it every time. If you do lift, and the closure gets passed to something that runs it on another thread, you're in bother. | 21:30 | |
21:31
jolts joined
|
|||
jnthn | So it's not as easy as it looks to do it without getting caught. We likely will do escape analysis in MoarVM in not too long, but the analysis is, as timotimo notes, highly non-trivial. | 21:31 | |
skids | interesting. Thanks. | 21:32 | |
timotimo | if, on the other hand, the user writes the code just like that, it's fine. because if the *user* gets caught, that's likely their fault :) | ||
sortiz | Indeed, Thank you jnthn. | ||
21:40
virtualsue joined
21:45
lsm-desktop left
21:50
leont joined
21:52
TEttinger joined
|
|||
lizmat | m: my %h = a => 42; %h.pairs[0].value = 666; dd %h # should we consider this a bug or not, jnthn timotimo ? | 21:52 | |
camelia | rakudo-moar e7ccc9: OUTPUT«Hash %h = {:a(666)}» | ||
lizmat | jnthn timotimo: or is it a feature ? | 21:53 | |
timotimo | seems like a feature to me | ||
21:53
rindolf left,
mr-foobar left
|
|||
timotimo | just today i used a for loop over a multi-dimensional array with .pairs in order to set its values via $p.value | 21:53 | |
jnthn | lizmat: Feature; it's the hash parallel of things like for @a <-> { } | 21:54 | |
lizmat | oki | ||
jnthn | uh, for @a <-> $x { } | ||
timotimo | jnthn: how do we feel about .kv giving you something where you can't write the value? | ||
21:54
perlpilot left,
mr-foobar joined
|
|||
jnthn | timotimo: It doesn't already? | 21:55 | |
timotimo | gimme a sec | ||
m: my @a[5]; for @a.kv -> $k, $v is rw { } | |||
camelia | rakudo-moar e7ccc9: OUTPUT«Parameter '$v' expected a writable container, but got Any value in block <unit> at /tmp/Cwblq5pyOZ line 1» | ||
jnthn | m: my %h = a => 1, b => 2; for %h.kv -> $k, $v is rw { $v++ }; say %h | ||
camelia | rakudo-moar e7ccc9: OUTPUT«a => 2, b => 3» | ||
timotimo | oh, sorry, why was i not saying "array" there | 21:56 | |
jnthn | Yeah, but that looks like an accident | ||
I'd have thought it'd do the same as with a hash | |||
timotimo | good | ||
next step will be doing the eggshell-dance with regards to roast | |||
21:57
lsm-desktop joined
|
|||
jnthn | Was gonna be surprised with %foo.kv was busted for that, as I'm sure I've used it a few times :) | 21:57 | |
timotimo | would it be possible to add a test for that and make that an errata-related thing? | ||
jnthn | timotimo: We only need to care for it errata-wise if there's a spectest we *break* by fixing the bug. | ||
timotimo | ah | ||
in that case, let me see if something b0rks when i try it | |||
m: my @a = 1, 2, 3; for @a.kv -> $k, $v is rw { } | |||
camelia | ( no output ) | ||
timotimo | ah, only broken for shaped arrays, it seems | 21:58 | |
and adding a roast test for it, does that require a fudge for 6.c.1? | |||
jnthn | No; 6.c is a tagging | ||
Errata will be a 6.c-errata branch | |||
Off that tag | |||
master is "current work" | |||
Or "candidate for the next language version" | 21:59 | ||
timotimo | i meant adding a new test that ensures it works that way with @a[5] | ||
not for changing an existing test | |||
jnthn | Right, that's what I was answering. No need to fudge. | ||
Because the 6.c test suite is the tag | |||
That is, if you want to check an implementation for 6.c compliance, you checkout the 6.c tag | |||
timotimo | right-o | 22:00 | |
jnthn | (Or more likely 6.c-errata in the future) | ||
*sigh* My TL;DR blog post on versioning is going to be longer than the darn versioning doc at this rate :P | |||
22:01
skids left
|
|||
timotimo | hah | 22:02 | |
MadcapJake | is there a simple syntax for running a block multiple times? Best I can seem to get is `{...}() xx n` | ||
jnthn | for ^10 { ... } :P | ||
timotimo | i'm having some difficulty with moar's "make install" | ||
22:02
perlpilot joined
|
|||
MadcapJake | ahh i knew there was something | 22:02 | |
jnthn | Note that if you wrap that in parens it's an expression too | 22:03 | |
timotimo | timo 32153 0.0 0.0 0 0 pts/4 Z Feb03 0:00 | \_ [moar] <defunct> | ||
:o | |||
jnthn | m: say (for ^10 { 2 * $_ }) | ||
camelia | rakudo-moar e7ccc9: OUTPUT«(0 2 4 6 8 10 12 14 16 18)» | ||
timotimo | this is preventing make install from copying over the moar binary properly | ||
and make install still doesn't fail >:( | |||
jnthn | :S | ||
MadcapJake just noticed that upto's need syntax adjustments in perl6fe | 22:04 | ||
jnthn | .oO( what de funct ) |
||
AlexDaniel | m: say (^10)».&(*×2) # hmmm anything shorter? | ||
camelia | rakudo-moar e7ccc9: OUTPUT«(0 2 4 6 8 10 12 14 16 18)» | ||
MadcapJake | AlexDaniel, cool never seen that &(...) syntax | 22:05 | |
lizmat | AlexDaniel: did you verify that Dan Kogai's tests actually pass ? | ||
AlexDaniel: they're failing for me :-( | 22:06 | ||
AlexDaniel | lizmat: I did | ||
lizmat: but holy… | |||
m: my $big-e = 4553535345364535345634543534; say (-2) ** $big-e | 22:07 | ||
camelia | rakudo-moar e7ccc9: OUTPUT«Numeric overflow in block <unit> at /tmp/xpfA0bGNp0 line 1Actually thrown at: in block <unit> at /tmp/xpfA0bGNp0 line 1» | ||
22:07
cmh-fn left,
cmh-fn joined
|
|||
timotimo | anyway. i recently did an update that included a new kernel and graphics card drivers | 22:07 | |
AlexDaniel | m: use Test; my $xno = X::Numeric::Overflow; my $big-e = 4553535345364535345634543534; throws-like { EVAL qq[(-2) ** $big-e] }, $xno, "-2 ** $big-e"; | ||
camelia | rakudo-moar e7ccc9: OUTPUT« 1..2 ok 1 - code dies ok 2 - right exception type (X::Numeric::Overflow)ok 1 - -2 ** 4553535345364535345634543534» | ||
timotimo | so i might as well just reboot right now | ||
AlexDaniel | lizmat: which one fails exactly? | 22:08 | |
lizmat | t/spec/S32-num/power.rakudo.moar (Wstat: 1536 Tests: 76 Failed: 6) | ||
Failed tests: 13-15, 68-70 | |||
AlexDaniel | all 6??? | ||
jnthn | MadcapJake: btw, I'm now a happy Atom user for Perl 6 and various other things :) | ||
22:08
cmh-fn left
|
|||
jnthn | Largely thanks to your perl6-fe work giving me the nudge to give it another try :) | 22:09 | |
MadcapJake | jnthn, great to hear! | ||
AlexDaniel | lizmat: what OS do you have? | ||
lizmat | OS X | ||
AlexDaniel | okay, then we have a problem with OS X I guess… | ||
22:09
cmh-fn joined
|
|||
lizmat | 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64 | 22:10 | |
AlexDaniel | lizmat: so what do you get? Inf or 0? | ||
timotimo | 'k | 22:11 | |
MadcapJake | jnthn: awesome! :D it's a great editor and I think I did a pretty good job with perl6fe | ||
lizmat | m: my $xno = X::Numeric::Overflow; my $big-e = 4553535345364535345634543534; say (-2) ** $big-e | 22:12 | |
camelia | rakudo-moar e7ccc9: OUTPUT«Numeric overflow in block <unit> at /tmp/GyOgEl7JHD line 1Actually thrown at: in block <unit> at /tmp/GyOgEl7JHD line 1» | ||
lizmat | AlexDaniel: ^^^ gives me 1 | ||
AlexDaniel | lizmat: which is blatantly wrong, isn't it? | ||
22:13
jpoehls_ joined
|
|||
lizmat | well, yes, but it doesn't die, so it makes the test fail | 22:13 | |
AlexDaniel | lizmat: “#?rakudo.moar skip 'big exponents RT #124798: passes on OSX, fails on Linux'” so now I see why this test passes… | ||
lizmat: OK geez, how can I undo the mess? Is there any way to fudge it for OS X only? | |||
MadcapJake | I know that azawawi is working on the excellent atom-perl6-editor-tools, but I still plan on continuing with linter-perl6 and autocomplete-perl6 as they'll both take a slightly different angle (in the back and front end, actually) | ||
22:13
dolmen left
22:14
cmh-fn left
|
|||
jnthn | MadcapJake: +1, there's more than one way to do it :) | 22:14 | |
lizmat | AlexDaniel: not sure :-( | ||
22:15
cmh-fn joined
22:16
pdcawley left
|
|||
AlexDaniel | lizmat: well… I guess that I'll just fudge these tests and submit a rakudobug… | 22:16 | |
jnthn | AlexDaniel: Do so, it may be a semantic difference at a level Moar should be hiding. | 22:17 | |
lizmat | that's perhaps best :-( | ||
jnthn | (Most likely that's where we'll want to fix it) | ||
22:17
ely-se left
|
|||
AlexDaniel | such a pity. OK | 22:17 | |
jnthn wonders if the next hardware he buys should be from apple, so he can hunt these darn OSX bugs :P | |||
22:17
jpoehls_ left
|
|||
AlexDaniel | .oO( well, maybe we should ask lizmat to fix these bugs :) ) |
22:19 | |
jnthn | Well, lizmat++ did give me an OSX shell account at some point in the past so I could track down a horrible memory corruption GC issue that only seemed to show up on OSX... :) | 22:20 | |
dalek | kudo/nom: b542946 | lizmat++ | src/core/Hash.pm: Refactor object hashes completely Before: Hash[Any,Any] |-- $!keys | |-- object \-- $!storage |-- value After: Hash[Any,Any] \-- $!storage \-- Pair.new(object,value) Sample benchmarks showed about 10% less memory usage, and a few percent less CPU usage. More importantly, methods such as kv, pairs, antipairs have become much simpler and faster, whereas methods such as keys/values didn't suffer much This should also make it easier to subclass Bags/Mixes from object hashes. |
22:21 | |
MadcapJake | can you override an object's methods after class instantiation? | 22:22 | |
22:22
Celelibi left
|
|||
lizmat | m: my $a = 42 but False; say $a; say ?$a | 22:22 | |
camelia | rakudo-moar e7ccc9: OUTPUT«42False» | ||
lizmat | MadcapJake: ^^^ | ||
more elaborately: | 22:23 | ||
m: my $a = 42 but role { method Bool { False } }; say $a; say ?$a | |||
camelia | rakudo-moar e7ccc9: OUTPUT«42False» | ||
gfldex | MadcapJake: see design.perl6.org/S14.html#Run-time_Mixins | ||
22:24
Celelibi joined
|
|||
MadcapJake | sweet, thanks lizmat, gfldex ! | 22:24 | |
22:24
RabidGravy left
22:27
ramon joined,
ramon is now known as Guest46973,
pmurias joined
|
|||
lizmat | jnthn: that account is still there, should you need access :-) | 22:31 | |
jnthn | lizmat: Could well do so. It's cheaper than a hex-core trash can :) | 22:32 | |
22:32
addison left
|
|||
jnthn | Well, more me it is :D | 22:32 | |
lizmat | yeah, that, I *have* been thinking of getting one recently | ||
22:32
kurahaupo joined
|
|||
jnthn | Yeah, was buying a couple of small items last night online and noticed they had those on alza.cz...for 120,000 CZK :) | 22:33 | |
22:33
mr-foobar left
|
|||
jnthn | I don't know off the top of my head what that is in euros, but I know it's "enough" :) | 22:35 | |
lizmat | ~ 4500 euro | ||
jnthn | :) | ||
jnthn is curious what the upcoming Intel i7 with 10 cores will cost | 22:36 | ||
That'd run spectests pretty sweet. Especially if it does turn out to have 25MB of cache on the chip. | |||
diakopter | lizmat++ # good refactor | 22:37 | |
dalek | ast: 2ff9b09 | (Aleks-Daniel Jakimenko-Aleksejev)++ | S32-num/power.t: Fudge tests (X::Numeric:Overflow is not thrown on OS X) |
||
AlexDaniel | lizmat: done, I think. Thank you | 22:38 | |
jnthn | .oO( I should keep this hardware until I make Rakudo fast enough it doesn't matter... :) ) |
22:39 | |
diakopter | I like the ().list | ||
surely we can cache an empty list somewhere tho :D | |||
AlexDaniel | 10 cores, that's pretty sweet. Still far from GPU-like core count though! :D | ||
22:40
leont left
|
|||
lizmat | jnthn: there's already a trash-can with 12 cores, though | 22:40 | |
but that would set you back at least 7000 US$ | |||
22:42
addison joined
|
|||
jnthn | lizmat: Wow. They didn't even stock that. :) | 22:42 | |
AlexDaniel | 127500 is a really nice number, by the way | 22:43 | |
22:43
pmurias left
|
|||
flussence saw something recently about a workstation-oriented POWER8 board with insane specs; shame it's a few years late to consider running OS X on... | 22:44 | ||
(iirc: 12 cores * 8 threads, $4000) | 22:45 | ||
diakopter | flussence: /. | ||
flussence | diakopter: figures it'd be on there, I only heard it third- or 4th-hand :) | 22:46 | |
diakopter | www.phoronix.com/scan.php?page=arti...orkstation | ||
timotimo | hmm | ||
lizmat: you're probably better at this than i am; can you figure out why .kv on a sized/shaped array will not give us writable values? | 22:48 | ||
diakopter | maybe it does now! | ||
22:50
virtualsue left
|
|||
jnthn finally blaught: 6guts.wordpress.com/2016/02/09/a-f...atibility/ | 22:54 | ||
gfldex | jnthn++ # for many words | ||
lizmat | timotimo: do you know where that method kv lives ? | 22:56 | |
Hotkeys | Anybody know the best way to get Linenoise on windows? | ||
timotimo | yeah, i *think* that one's in List.pm | ||
hoelzro | Hotkeys: panda install Linenoise *should* work | ||
timotimo | line 474 | ||
jnthn | Array.pm inside the Shaped or so role | ||
iirc | |||
timotimo | the Shaped role doesn't have a method for that i think | 22:57 | |
jnthn | ah | ||
But wait, .kv on shapeds must be different | |||
Hotkeys | hoelzro: apparently not in ecosystem | ||
hoelzro | wat | ||
jnthn | Oh, I think there's a Rakudo::Internals role maybe | ||
hoelzro | that's the error you're getting? | ||
when's the last time you did a panda update? | |||
jnthn | That has shared things between native and non-native shaped arrays | ||
Hotkeys | ah | 22:58 | |
jnthn | But the keys of a multi-dim array are indice lists | ||
Hotkeys | I didn't realize I needed to do panda update | ||
timotimo | oh! | ||
Hotkeys | I thought it was just install and go | ||
timotimo | i didn't look at RakudoInternals | ||
hoelzro | I f'ed up Linenoise in the ecosystem the other night, and MadcapJake had to fly in to my rescue | ||
Hotkeys | ah | ||
sortiz | lizmat, I *think* that using Any-iterable-methods.pm | ||
timotimo | 425 in Rakudo/Internals.pm | ||
Hotkeys | hm | 22:59 | |
Should this allow me to edit multiline in repl | |||
or is that not a thing | |||
hoelzro | it is if you use my experimental branch | ||
(please do, it needs eyes) | |||
Hotkeys | lol | ||
how? | |||
timotimo | yeah! go hoelzro, go hoelzro, go! | ||
hoelzro | www.reddit.com/r/perl6/comments/44...r_testing/ | ||
lizmat | timotimo: does values or pairs on a shaped array give you writeable containers ? | ||
hoelzro | Hotkeys: ↑ | ||
Hotkeys | ok ty | 23:00 | |
I assume i should remove the panda one | |||
hoelzro | mhmm | ||
timotimo | lizmat: i haven't looked yet, but it's a good idea to do that | ||
m: my @a[5] = 1, 2, 3, 4; for @a.values <-> $a { $a = 5 }; say @a | |||
camelia | rakudo-moar b54294: OUTPUT«[5 5 5 5 5]» | ||
Hotkeys | er | ||
hoelzro | it's still a WIP; history doesn't work as multiline just yet | ||
Hotkeys | panda doesn't have a remove option | ||
timotimo | pairs does | ||
m: my @a[5] = 1, 2, 3, 4; for @a.pairs <-> $a { $a.value = 5 }; say @a | |||
camelia | rakudo-moar b54294: OUTPUT«Parameter '$a' expected a writable container, but got Pair value in block <unit> at /tmp/yoyzf9K26n line 1» | ||
hoelzro | and it fails a few roast tetsts | ||
timotimo | m: my @a[5] = 1, 2, 3, 4; for @a.pairs -> $a { $a.value = 5 }; say @a | ||
camelia | rakudo-moar b54294: OUTPUT«[5 5 5 5 5]» | ||
timotimo | there we go | 23:01 | |
only kv doesn't work like that | |||
hoelzro | Hotkeys: oh, when I said "mhmm", I meant "blow away your current rakudo install" | ||
Hotkeys | lol | ||
alright | |||
timotimo | could it be that slip(...) doesn't work right with this? | ||
lizmat | timotimo: then I guess it's the slip() in 425 causing the problem | ||
timotimo | probably is | ||
Hotkeys | why can't panda remove things though | 23:02 | |
timotimo | m: my $a = 10; my @lol = slip(10, $a); @lol[1] = 99; say $a | ||
camelia | rakudo-moar b54294: OUTPUT«10» | ||
Hotkeys | seems like a reasonable thing to do | ||
timotimo | m: my $a = 10; my @lol = Slip.new(10, $a); @lol[1] = 99; say $a | ||
camelia | rakudo-moar b54294: OUTPUT«10» | ||
timotimo | so the constructor of Slip needs to have an "is raw" or so? | ||
23:02
kid51 joined
|
|||
hoelzro | Hotkeys: agreed | 23:02 | |
I think it's just NYI | |||
timotimo | but Slip just derives its constructor from List | ||
Hotkeys | ah | ||
timotimo | m: my $a = 10; my @lol := List.new(10, $a); @lol[1] = 99; say $a | 23:03 | |
camelia | rakudo-moar b54294: OUTPUT«10» | ||
timotimo | oh, and List.new also reconts it seems like? | ||
lizmat | m: my $a = 42; sub a(+@a) { $_++ for @a }; a($a); dd $a # timotimo: think this is the underlying issue | ||
camelia | rakudo-moar b54294: OUTPUT«Int $a = 42» | ||
timotimo | oh, these things | ||
TBH i don't know how exactly these prefixes work in signatures for the most precise details | 23:04 | ||
23:05
pmqs left
|
|||
Hotkeys | oh wait hoelzero I didn't actually read this | 23:07 | |
is this an entire branch of rakudo | |||
lizmat | timotimo: I guess the only way around it, would be to no use .map and slip() in that candidate | ||
Hotkeys should pay more attention | |||
lizmat | *not | ||
jnthn | Rest time...'night, #perl6 | 23:08 | |
hoelzro | Hotkeys: yup =) | ||
lizmat | gnight, jnthn! | ||
hoelzro | night jnthn | ||
23:09
prammer left
|
|||
timotimo | hm | 23:12 | |
23:15
leont joined
|
|||
Hotkeys | hoelzro: i.imgur.com/0XXnbY2.png | 23:20 | |
:D | |||
hoelzro | \o/ | ||
does powershell provide a line editor for you to use? | |||
eg. do the arrow keys work? | |||
lizmat | timotimo: testing a fix | 23:21 | |
Hotkeys | kinda | ||
it treats the * lines like any other line | |||
so i can go left and right | |||
but up and down just go through history | |||
hoelzro | ok, that's good | ||
well, it's good in that it's consistent with how cmd.exe works =) | |||
I'm going to work on getting history to respect multi-line entries | 23:22 | ||
Hotkeys | I wish I could properly edit the multiple lines but that might be a bigger change than what you're currently doing | ||
like go up and down | |||
or is that what you meant | |||
hoelzro | Hotkeys: what exactly do you mean but edit the multiple lines? | ||
like if you enter for ^10 {\n.say\n, hitting up will edit the full for loop? | 23:23 | ||
Hotkeys | i.imgur.com/IwL5QnW.png | ||
lets say I'm hear and see that typo | |||
and want to fix it | |||
s/hear/here | |||
23:24
partly_ left
|
|||
hoelzro | ok | 23:24 | |
23:25
partly_ joined
|
|||
Hotkeys | I suppose you might not be able to in powershell | 23:25 | |
or cmd | |||
I am trying the python repl right now and it can't either | |||
so that's fine | |||
hoelzro | well, I don't want to settle for fine ;) | 23:26 | |
Hotkeys | I was thinking like | ||
how in python's IDLE | |||
it's a repl but also you can edit like I'm talking about | |||
hoelzro | ok | ||
I'll try IDLE | |||
lizmat | timotimo: gist.github.com/lizmat/873470fb147185176642 # my line of thought for @a[5].kv | 23:27 | |
Hotkeys | like if I'm in this situation i.imgur.com/aLu4cG4.png | ||
I can just hit up arrow and I can edit that line | |||
like I'm in any text editor | |||
hoelzro | hmm | 23:28 | |
well, with a CLI REPL, that'll be a little trickier | |||
Hotkeys | this also isn't command line though | ||
yeah | |||
hoelzro | I think anything that requires Curses or a GUI belongs in a module that provides an alternative REPL interface | ||
Hotkeys | fair enough | 23:29 | |
lizmat | good night, #perl6! | ||
Hotkeys | even this multi-line setup is a good improvement though | ||
so hoelzro++ | |||
also night lizmat | |||
hoelzro | night lizmat | ||
I think I'll pull a jnthn and summarize my thoughts on the REPL experience | 23:30 | ||
post it here tomorrow | |||
23:33
sufrosti1o left,
sufrostico left
23:34
NZKindest left
23:35
partly_ left
23:36
FreezerburnV joined
|
|||
diakopter | m: use v6v6v6v6v6v6v6v6v6 | 23:37 | |
camelia | rakudo-moar b54294: OUTPUT«5===SORRY!5=== Error while compiling /tmp/d0INZGHHZxNo compiler available for Perl v6v6v6v6v6v6v6v6v6at /tmp/d0INZGHHZx:1------> 3use v6v6v6v6v6v6v6v6v67⏏5<EOL>» | ||
23:38
lostinfog left,
vendethiel left
23:40
Xor_ left
|
|||
AlexDaniel | indeed, sorry :) | 23:40 | |
23:40
partly_ joined,
Yary joined
|
|||
Yary | Hi all... think I found a bug, this bit of code caused R* 2016.01 to eat up memory and make my 64-bit Windows laptop slow to a crawl: | 23:41 | |
perl6 -e "say Real.new == 0" | |||
23:42
BenGoldberg joined
|
|||
gfldex | m: say Real.new == 0 | 23:42 | |
camelia | rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 57792 bytes» | ||
gfldex | m: say so Real.new == 0 | ||
camelia | rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 81920 bytes» | ||
BenGoldberg | m: say 'alive'; | ||
camelia | rakudo-moar b54294: OUTPUT«alive» | ||
revhippie | neat | ||
gfldex | m: say Real.new() == 0 | 23:43 | |
camelia | rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 58000 bytes» | ||
BenGoldberg | m: say Real.new | ||
camelia | rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 81920 bytes» | ||
BenGoldberg | m: say 0.f; | ||
camelia | rakudo-moar b54294: OUTPUT«Method 'f' not found for invocant of class 'Int' in block <unit> at /tmp/c6xtbLn4v7 line 1» | ||
timotimo | lizmat: i was afraid it might end up looking like that ... well, it's probably a bunch faster than what we had so far, which is probably nice | ||
BenGoldberg | m: say 0e0; | ||
camelia | rakudo-moar b54294: OUTPUT«0» | ||
Yary | thanks for the simplification ++BenGoldberg | ||
BenGoldberg | m: say 0e0.WHAT; | 23:44 | |
camelia | rakudo-moar b54294: OUTPUT«(Num)» | ||
Yary is still trying to kill the hung Moar instance using the Task Manager | |||
BenGoldberg | m: my Real $x; say $x; | ||
camelia | rakudo-moar b54294: OUTPUT«(Real)» | ||
BenGoldberg | m: my Real $x; say so $x; | ||
camelia | rakudo-moar b54294: OUTPUT«False» | ||
FreezerburnV | Why is the error "Constraint type check failed for parameter '$precomp-id'" still a thing? :( | ||
BenGoldberg | m: my Real $x; $x .= new; | ||
camelia | ( no output ) | ||
gfldex | star: say Real.new() | ||
camelia | star-m 2015.09: OUTPUT«Memory allocation failed; could not allocate 58768 bytes» | ||
BenGoldberg | m: my Real $x; $x .= new; say $x; | ||
camelia | rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 81920 bytes» | ||
BenGoldberg | m: my Num $x; $x .= new; say $x; | ||
camelia | rakudo-moar b54294: OUTPUT«0» | ||
BenGoldberg | Is Real a role? | 23:45 | |
gfldex | r: so Real.new | ||
Yary | m: say Real.^WHAT | ||
camelia | rakudo-jvm f99bdb: OUTPUT«WARNINGS:Useless use of "so " in expression "so Real.new" in sink context (line 1)» | ||
..rakudo-moar b54294: OUTPUT«WARNINGS for /tmp/tmpfile:Useless use of "so " in expression "so Real.new" in sink context (line 1)Memory allocation failed; could not allocate 81920 bytes» | |||
rakudo-moar b54294: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SDQf5yVNJQCannot use .^ on a non-identifier method callat /tmp/SDQf5yVNJQ:1------> 3say Real.^WHAT7⏏5<EOL> expecting any of: method arguments» | |||
BenGoldberg | m: role Foo { }; say Foo.new; | 23:46 | |
camelia | rakudo-moar b54294: OUTPUT«Foo.new» | ||
BenGoldberg | m: role Foo { }; say so Foo.new; | ||
camelia | rakudo-moar b54294: OUTPUT«True» | ||
gfldex | r: say Real.WHAT | ||
camelia | rakudo-moar b54294, rakudo-jvm f99bdb: OUTPUT«(Real)» | ||
Yary | m: say Real.HOW | ||
camelia | rakudo-moar b54294: OUTPUT«Perl6::Metamodel::ParametricRoleGroupHOW.new» | ||
BenGoldberg | Ahh, now we're getting somewhere. | 23:47 | |
Yary | m: say Real.WHICH | ||
camelia | rakudo-moar b54294: OUTPUT«Real» | ||
23:47
vendethiel joined
|
|||
BenGoldberg | m: role Foo [Str $i] { }; say so Foo[2].new; | 23:48 | |
camelia | rakudo-moar b54294: OUTPUT«No appropriate parametric role variant available for 'Foo' in any specialize at gen/moar/m-Metamodel.nqp line 2600 in any specialize at gen/moar/m-Metamodel.nqp line 2194 in any compose at gen/moar/m-Metamodel.nqp line 2979 in any make_pun …» | ||
Yary power cycles laptop | |||
BenGoldberg | m: role Foo [Str $i] { }; say so Foo["baz"].new; | 23:49 | |
camelia | rakudo-moar b54294: OUTPUT«True» | ||
23:49
jameslen_ left
|
|||
BenGoldberg | m: role Foo [Str $i] { }; say Foo["baz"].new; | 23:49 | |
camelia | rakudo-moar b54294: OUTPUT«Foo[Str].new» | ||
BenGoldberg | m: role Foo [] { }; say Foo[].new; | 23:50 | |
camelia | rakudo-moar b54294: OUTPUT«Foo.new» | ||
BenGoldberg | m: role Foo [] { }; say so Foo[].new; | ||
camelia | rakudo-moar b54294: OUTPUT«True» | ||
BenGoldberg | m: role Foo [] { }; say Foo[]; | ||
camelia | rakudo-moar b54294: OUTPUT«(Foo)» | ||
23:51
cognominal left,
cognominal joined
|
|||
BenGoldberg | m: role Foo [] does Numeric { }; say Foo[]; | 23:52 | |
camelia | rakudo-moar b54294: OUTPUT«(Foo)» | ||
BenGoldberg | m: role Foo [] does Numeric { }; say Foo[].new; | ||
camelia | rakudo-moar b54294: OUTPUT«Foo<140521962559784>» | ||
BenGoldberg | Oooh, now we're getting somewhere! | ||
m: role Foo [] does Numeric { }; say so Foo[].new; | |||
camelia | rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 82944 bytes» | ||
23:52
skids joined
|
|||
BenGoldberg | m: role Foo does Numeric { }; say so Foo.new; | 23:53 | |
camelia | rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 58624 bytes» | ||
23:53
brabo left
|
|||
BenGoldberg | m: say Numeric.new; | 23:53 | |
camelia | rakudo-moar b54294: OUTPUT«Numeric<140265779704888>» | ||
BenGoldberg | m: say Numeric.new; | ||
camelia | rakudo-moar b54294: OUTPUT«Numeric<139842821289016>» | ||
BenGoldberg | m: say so Numeric.new; | ||
camelia | rakudo-moar b54294: OUTPUT«Memory allocation failed; could not allocate 82944 bytes» | ||
revhippie | dumb q: what's the number in <> there? | ||
BenGoldberg | It's what you get when you read from an uninitilized memory location, methinks. | 23:54 | |
revhippie | eek! | ||
timotimo | lizmat: in any case, thank you for working on this! | ||
BenGoldberg | Or it's a pointer address. | 23:55 | |
m: say so Numeric; | |||
camelia | rakudo-moar b54294: OUTPUT«False» | ||
BenGoldberg | m: say Numeric.HOW; | 23:56 | |
camelia | rakudo-moar b54294: OUTPUT«Perl6::Metamodel::ParametricRoleGroupHOW.new» | ||
23:56
brabo joined
|
|||
AlexDaniel | m: my $x = Numeric.new; say $x; say $x.WHERE | 23:56 | |
camelia | rakudo-moar b54294: OUTPUT«Numeric<140157736129848>140157736129848» | ||
AlexDaniel | that's ok | ||
23:57
espadrine joined
23:58
Laurent_R left
|
|||
AlexDaniel | jnthn: please use another delimiter for LTS versions. 2016.02.10 will look like an exact date :) 2016.02-10 is probably fine | 23:59 |