»ö« 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. |
|||
japhb | pTk is a *p*ortable version of the Tk part of TCL/TK. It was made so that people could do perl5 + Tk | 00:00 | |
timotimo | oh | ||
so the tcl portion ripped out and bound via XS? | |||
japhb | yeah, with a bunch of magic because Tk *really* didn't expect that particular ripping apart. | 00:01 | |
timotimo | hah | ||
i can imagine that | |||
i'm not sure i'd be excited for any Tk to be ported to perl6 | |||
it's just ... it's tk! :P | |||
japhb | Uh, no. | ||
This was far more interesting in the 90's than today. :-) | |||
timotimo | have you followed opengl in the recent years? | 00:04 | |
and looked at vulkan at all yet? | |||
japhb | I stopped watching OpenGL closely around the mid-3.x period | 00:05 | |
Basically, I don't know any 3D artists, and don't have time to become one myself, so an engine without cool content becomes kinda boring after your third or fourth one. :-) | 00:06 | ||
timotimo | 'k | ||
yeah, i can really imagine ;( | |||
just today i looked at godot; there's a silly benchmark that just spawns a bunch of bunnies that bounce around the screen like bouncy balls | 00:07 | ||
japhb | Heh | 00:08 | |
Today I recommended a very good graphics theory book to someone, and they said "Yeah, the person who wrote that was my thesis advisor" | |||
Talk about a deflating retort ... | 00:09 | ||
timotimo | and i apitraced it and it turns out it generates vector arrays for every single one of them and pushes them to the driver | ||
on the way redundantly setting state over and over again | |||
japhb | Eww. | ||
timotimo | t.h8.lv/godot_apitrace.png | 00:10 | |
that's the better part, there's worse parts :) | |||
japhb | Oh dear | ||
There are extensions (and heck, base APIs) for that ... | 00:11 | ||
timotimo | yes, absolutely | ||
this targets OpenGL ES 2, iiuc | |||
japhb | Oh ah. | ||
Yeah, ES 2 is barely in the shader era | 00:12 | ||
Lots of stuff people expect just isn't there. | |||
timotimo | oh, is that so? | ||
that's rough :\ | |||
japhb | I remember when ES 2 came out, wondering if I should get into handheld engine development, and then realizing if I did it on Android I'd have to do it in Java, and going "Nope, not gonna happen." | 00:13 | |
timotimo | you don't have to; you can do it in C or C++ | 00:14 | |
japhb | timotimo: Yes, now. | ||
timotimo | ok that may be new | ||
japhb | IIRC at the time that was not so well supported. | ||
That was years ago. | |||
geekosaur | even back then people were playing with android programming with other jvm languages (I recall helping someone figure out clojure for it) | 00:17 | |
and, hm, something else that ended up being a non-starter because the runtime glue was too big and they hadn't worked out a way to minimize to the stuff absolutely needed yet | 00:18 | ||
timotimo | scala? | ||
geekosaur | no | ||
00:19
cdg joined
|
|||
timotimo | well, mobiles are an "interesting" target for game development anyway, because the fill rates are just so abysmal on typical hardware | 00:21 | |
so overdraw is ridiculously costly | |||
skink | You ever write something, and not really know why you wrote it? | ||
$ dd if=/dev/urandom bs=1 count=8 of=/tmp/bin | 00:22 | ||
$ p6-pgp-words /tmp/bin | |||
wallet concurrent python vacancy ... | |||
00:23
vendethiel joined
00:24
BenGoldberg joined
|
|||
geekosaur can think of reasons for what that appears to be doing... | 00:25 | ||
although count=8 seems rather low entropy :p | |||
skink | The PGP wordlist is a set of 512 words, representing each byte in odd and even positions | 00:28 | |
Phonologically distinct, so you can transmit a key or fingerprint spoken | |||
timotimo | neat | 00:32 | |
geekosaur | international radio phonetic alphabet for pgp keys, cute >.> | ||
skink | I decided to make a Crypt::Misc to just throw random crap in | 00:34 | |
00:34
BenGoldberg left
00:35
BenGoldberg joined
|
|||
timotimo | Cryptic Mist | 00:39 | |
00:41
nbrown joined,
wamba left
|
|||
timotimo | ... helps to compile moarvm with an --optimize higher than 0 | 00:44 | |
00:46
cdg left
00:47
cdg joined
00:50
nbrown left
00:51
cdg left
00:52
vendethiel left
00:53
wamba joined
|
|||
skink | You know it's quality when you've got a 520-line module that's literally just a lookup table | 00:55 | |
00:57
arlenik joined
|
|||
skink | (Fun fact: the fastest library for interpreting HTML involves over 20k lines of hand-written lookup tables) | 00:58 | |
arlenik | I have a function that takes an argument whose type should only be of TypeA or TypeB. What would the signature of that function look like? | ||
psch | m: sub f($a where Int|Str) { $a }; f 5; f "foo"; f 5.4 | 00:59 | |
camelia | rakudo-moar a45224: OUTPUT«Constraint type check failed for parameter '$a' in sub f at /tmp/E77i0CBgCC line 1 in block <unit> at /tmp/E77i0CBgCC line 1» | ||
psch | hm, is that compile time foiling me? | 01:00 | |
i'd think so... | |||
m: sub f($a where Int|Str) { $a }; f 5; f "foo"; | |||
camelia | ( no output ) | ||
01:00
matiaslina joined
|
|||
psch | arlenik: anyway, generally that's the pattern | 01:00 | |
arlenik: the alternative is declaring a subset that fits exactly your two types | |||
m: subset StrInt of Any where Int|Str; sub f(StrInt $) { }; f "foo"; f 5 | 01:01 | ||
camelia | ( no output ) | ||
arlenik | psch: thanks. What if the functio had two arguments with the same exact constraints. Is there anyway to apply the constraint to both arguments without repeating 'where TypeA|TypeB' for both? | ||
psch | arlenik: although then you'd have to cheat (as i did) a bit | ||
as in, a subset needs a base type first, and that base type can be constraint further | 01:02 | ||
01:02
wamba left
|
|||
arlenik | psch: ok, i see. thanks very much. | 01:02 | |
psch | in my example, i'm using Any, which is our "root type", as in what everything inherits from if there's no specific parent type | ||
alternatively you could probably just create a new class that inherits from both of your allowed types | 01:03 | ||
unless they conflict in some manner | |||
m: class C { }; class D { }; class E is C is D { }; sub f(E $) { }; f C.new; f D.new | |||
camelia | rakudo-moar a45224: OUTPUT«Type check failed in binding <anon>; expected E but got C (C.new) in sub f at /tmp/nU0VgIJk2D line 1 in block <unit> at /tmp/nU0VgIJk2D line 1» | ||
psch | oh, no | 01:04 | |
psch is actually not great with OOP vOv | |||
maybe it'd work with subsets or some role shennanigans... | |||
ZoffixWin | Your E would fit into a C or D restriction, not the other way around. | 01:07 | |
psch | oh, right | ||
ZoffixWin | m: class C { }; class D { }; class E is C is D { }; sub f(C $) { }; sub x(D $) { }; f E.new; x D.new | ||
camelia | ( no output ) | ||
psch | m: class C { }; sub f(C $x, $y where *.isa($x.WHAT)) { }; f C.new, C.new # another somewhat weird way | 01:10 | |
camelia | ( no output ) | ||
psch | hm, i wonder if that can be parameterized... | ||
eh, no need, actually | |||
but the semantics are somewhat different anyway i suppose | |||
because that one means $y has to be of $x type or a subtype of the type of $x | 01:11 | ||
m: say Int.isa(Any) | |||
camelia | rakudo-moar a45224: OUTPUT«True» | ||
01:18
cpage_ left,
molaf_ joined
01:22
molaf left
|
|||
timotimo | m: say 9.9e0.Int | 01:24 | |
camelia | rakudo-moar a45224: OUTPUT«9» | ||
01:31
MasterDuke left
|
|||
skink | m: subset MyTypeA of Str where *.chars > 1; subset MyTypeB of Int where 1..10; sub thingy ($thing where MyTypeA|MyTypeB) { say $thing }; thingy 4 | 01:32 | |
camelia | rakudo-moar a45224: OUTPUT«4» | ||
01:33
kid51 joined
|
|||
skink | Ah, yeah, psch has the shorter, cheatier way | 01:34 | |
arlenik, Does the function do different things depending on the input type? You may be able to use a multi sub | |||
BenGoldberg | m: my ([$a]); $a.WHAT.say | 01:37 | |
camelia | rakudo-moar a45224: OUTPUT«Cannot call method 'say' on a null object in block <unit> at /tmp/FMj7GpxRQj line 1» | ||
BenGoldberg | m: my ([$a]); say $a.WHAT | ||
camelia | rakudo-moar a45224: OUTPUT«(Mu)» | ||
BenGoldberg wonders why it's Mu instead of Any. | 01:38 | ||
m: Mu.say | |||
camelia | rakudo-moar a45224: OUTPUT«(Mu)» | ||
BenGoldberg | m: my Mu $a; $a.say; | ||
camelia | rakudo-moar a45224: OUTPUT«(Mu)» | ||
01:47
adhoc joined
01:59
MasterDuke joined
02:00
kid51 left
02:07
MasterDuke left
02:09
MasterDuke joined
|
|||
BenGoldberg | m: my @a; say @a.splice: 0, 1; | 02:09 | |
camelia | rakudo-moar a45224: OUTPUT«[]» | ||
BenGoldberg | m: my @a; say @a.shift; | ||
camelia | rakudo-moar a45224: OUTPUT«Cannot shift from an empty Array in block <unit> at /tmp/_S4v8hLWS1 line 1Actually thrown at: in block <unit> at /tmp/_S4v8hLWS1 line 1» | 02:10 | |
02:10
BenGoldberg left,
pecastro joined
02:12
BenGoldberg joined
|
|||
ZoffixWin | m: my @a = [],; say @a.shift; | 02:17 | |
camelia | rakudo-moar a45224: OUTPUT«[]» | ||
BenGoldberg | m: my @a; say @a.shift; | 02:18 | |
camelia | rakudo-moar a45224: OUTPUT«Cannot shift from an empty Array in block <unit> at /tmp/AMtIHyCI_d line 1Actually thrown at: in block <unit> at /tmp/AMtIHyCI_d line 1» | ||
BenGoldberg | m: [].shift; | ||
camelia | rakudo-moar a45224: OUTPUT«Cannot shift from an empty Array in block <unit> at /tmp/ZufodnO_Bg line 1Actually thrown at: in block <unit> at /tmp/ZufodnO_Bg line 1» | ||
BenGoldberg | What's wrong with shifting from an empty array? | ||
What if I'm happy getting an (Any) or whatever? | 02:19 | ||
ZoffixWin | What would you return? | ||
m: my @a = Any,; say @a.shift; | |||
camelia | rakudo-moar a45224: OUTPUT«(Any)» | ||
ZoffixWin | it can be a legit element inside of an array and now you have an ambiguity | ||
You can do @a and @a.shift | |||
BenGoldberg | Seems silly. | 02:20 | |
ZoffixWin | Why? | ||
BenGoldberg | I'd also be happy with getting a failure object. | ||
Err, unless that's what it's doing? | 02:21 | ||
m: [].shift.WHAT.say; | |||
camelia | rakudo-moar a45224: OUTPUT«(Failure)» | ||
BenGoldberg | ooh | ||
ZoffixWin | :D | ||
BenGoldberg | m: so([].shift).say; | ||
camelia | rakudo-moar a45224: OUTPUT«False» | ||
BenGoldberg | m: gist.github.com/BenGoldberg1/467df...d16fb4af23 | 02:24 | |
camelia | rakudo-moar a45224: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 3…» | ||
02:24
vendethiel joined
|
|||
BenGoldberg | I know a falure in sink context creates an exception... and prefixing my '@!factors.shift' with 'so' defuses this... is there a better/more idiomatic way of doing this? | 02:26 | |
02:27
pecastro left
02:29
pecastro joined
02:30
pecastro left
02:31
pecastro joined,
pecastro left
|
|||
ZoffixWin | It's kinda weird there's .uniname*s* but no .uniprop*s* | 02:36 | |
02:38
pecastro joined,
pecastro left
02:39
noganex_ joined
|
|||
BenGoldberg | m: gist.github.com/BenGoldberg1/467df...d16fb4af23 | 02:41 | |
camelia | rakudo-moar a45224: OUTPUT«In 3 seconds, produced 9779 primes, from 2 to 102103» | 02:42 | |
02:42
pecastro joined
|
|||
BenGoldberg | m: my $howlong = 3; my $end = $howlong + now; my $cnt = 0; for ( ^Inf ) { ++$cnt if .is-prime; last if now > $end }; say $cnt; | 02:42 | |
camelia | rakudo-moar a45224: OUTPUT«1099» | ||
BenGoldberg grins. | |||
02:42
noganex left
|
|||
BenGoldberg | m: 9779 / 1099 | 02:42 | |
camelia | rakudo-moar a45224: OUTPUT«WARNINGS for /tmp/peG9nMYig5:Useless use of "/" in expression "9779 / 1099" in sink context (line 1)» | ||
BenGoldberg | m: say (9779 / 1099) | ||
camelia | rakudo-moar a45224: OUTPUT«8.898089» | ||
BenGoldberg 's prime generator is almost 9x faster than repeated primality generation. | 02:43 | ||
Err, repeated primality testing. | 02:44 | ||
02:44
pecastro left
02:45
pecastro joined
|
|||
ZoffixWin | cool | 02:45 | |
m: say (^Inf .grep: *.is-prime)[0..9779]; say now - INIT now; | 02:47 | ||
camelia | rakudo-moar a45224: OUTPUT«(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 …» | 02:48 | |
ZoffixWin | m: my $x = + eager (^Inf .grep: *.is-prime)[0..9779]; say now - INIT now; | ||
camelia | rakudo-moar a45224: OUTPUT«20.1472873» | 02:49 | |
sortiz_ | m: my @a; with @a.shift { say "data" } else { say .DEFINITE ?? "failure" !! "undef" } ; # with is good to handle failures | 02:51 | |
camelia | rakudo-moar a45224: OUTPUT«failure» | ||
03:05
_notbenh left
03:09
_notbenh joined
|
|||
BenGoldberg | m: (^Inf .grep: *.is-prime)[9779].say; say now - INIT now; | 03:18 | |
camelia | rakudo-moar a45224: OUTPUT«(timeout)» | ||
BenGoldberg | m: (^Inf .grep: *.is-prime)[0].say; say now - INIT now; | ||
camelia | rakudo-moar a45224: OUTPUT«20.00637310» | ||
BenGoldberg | m: (^Inf .grep: *.is-prime)[1099].say; say now - INIT now; | 03:19 | |
camelia | rakudo-moar a45224: OUTPUT«88311.35728061» | ||
BenGoldberg | m: (^Inf .grep: *.is-prime)[9000].say; say now - INIT now; | ||
camelia | rakudo-moar a45224: OUTPUT«9318720.1244585» | ||
BenGoldberg | m: say now - INIT now; | 03:20 | |
camelia | rakudo-moar a45224: OUTPUT«0.00159358» | ||
BenGoldberg | m: (^Inf .grep: *.is-prime && now < INIT { now + 3 } )[*-1].say; say now - INIT now; | 03:21 | |
camelia | rakudo-moar a45224: OUTPUT«Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block? in block <unit> at /tmp/7Cwhu2b0yB line 1Actually thrown at: in block <unit> at /tmp/7Cwhu2b0yB line 1» | ||
BenGoldberg | m: (^Inf .grep: { *.is-prime && now < INIT { now + 3 } } )[*-1].say; say now - INIT now; | ||
camelia | rakudo-moar a45224: OUTPUT«(timeout)» | 03:22 | |
BenGoldberg | m: (^Inf .grep(*.is-prime).first: now > INIT { now + 3 } ).say; say now - INIT now; | 03:23 | |
camelia | rakudo-moar a45224: OUTPUT«Cannot use Bool as Matcher with '.first'. Did you mean to use $_ inside a block? in block <unit> at /tmp/din7593oon line 1Actually thrown at: in block <unit> at /tmp/din7593oon line 1» | ||
BenGoldberg | m: (^Inf .grep(*.is-prime).first({ now > INIT { now + 3 } )).say; say now - INIT now; | ||
camelia | rakudo-moar a45224: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BNUa1cpbfaMissing blockat /tmp/BNUa1cpbfa:1------> 3s-prime).first({ now > INIT { now + 3 } 7⏏5)).say; say now - INIT now; expecting any of: statement end statement modi…» | ||
ZoffixWin | I wonder why this times out: m: (^Inf .grep: { *.is-prime && now < INIT { now + 3 } } )[*-1].say; say now - INIT now; | ||
Ah | |||
BenGoldberg | Cause it's ^Inf.grep | ||
ZoffixWin | Precedence | ||
Oh | 03:24 | ||
OK | |||
BenGoldberg | It's never going to create an end-of-list condition | ||
ZoffixWin | Right | ||
m: (^Inf .grep: { *.is-prime and now < INIT now + 3 } )[*-1].say; say now - INIT now; | |||
camelia | rakudo-moar a45224: OUTPUT«(timeout)» | 03:25 | |
BenGoldberg | m: my @naive := ^Inf .grep: *.is-prime; my $f = @naive.first: now > INIT now + 3; | ||
camelia | rakudo-moar a45224: OUTPUT«(timeout)» | 03:26 | |
BenGoldberg | m: my @naive := ^Inf .grep: *.is-prime; my $f = @naive.first: now > INIT (now + 3); | ||
BenGoldberg shrugs | |||
camelia | rakudo-moar a45224: OUTPUT«(timeout)WARNINGS for /tmp/JFqjN12hv3:Useless use of "+" in expression "now + 3" in sink context (line 1)» | ||
03:27
cpage_ joined
|
|||
BenGoldberg | m: my @naive := ^Inf .grep: *.is-prime; my $f = @naive.first: (now > INIT (now + 3)); | 03:27 | |
camelia | rakudo-moar a45224: OUTPUT«(timeout)WARNINGS for /tmp/YeFnSptnqR:Useless use of "+" in expression "now + 3" in sink context (line 1)» | 03:28 | |
BenGoldberg | m: my @naive := ^13 .grep: *.is-prime; my $f = @naive.first: (now > INIT (now + 3)); | ||
camelia | rakudo-moar a45224: OUTPUT«WARNINGS for /tmp/iGf5g3txYU:Useless use of "+" in expression "now + 3" in sink context (line 1)Type check failed in binding; expected Positional but got Seq ((2, 3, 5, 7, 11).Seq) in block <unit> at /tmp/iGf5g3txYU line 1» | ||
BenGoldberg | m: my @naive := ^13 .grep: *.is-prime; my $f = @naive.first: { now > INIT (now + 3) }; | ||
camelia | rakudo-moar a45224: OUTPUT«WARNINGS for /tmp/K1MDjvy0_r:Useless use of "+" in expression "now + 3" in sink context (line 1)Type check failed in binding; expected Positional but got Seq ((2, 3, 5, 7, 11).Seq) in block <unit> at /tmp/K1MDjvy0_r line 1» | ||
BenGoldberg | m: my @naive := ^13; my $f = @naive.first: { now > INIT (now + 3) }; | ||
camelia | rakudo-moar a45224: OUTPUT«WARNINGS for /tmp/cs7jtG2_tl:Useless use of "+" in expression "now + 3" in sink context (line 1)» | ||
BenGoldberg | m: my @naive := ^13 .grep: True; my $f = @naive.first: { now > INIT (now + 3) }; | 03:29 | |
camelia | rakudo-moar a45224: OUTPUT«WARNINGS for /tmp/6GO2CTxrQm:Useless use of "+" in expression "now + 3" in sink context (line 1)Earlier failure: Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block? in block <unit> at /tmp/6GO2CTxrQm line 1Fi…» | ||
03:29
vendethiel left
|
|||
BenGoldberg | m: my @naive := ^13 .grep: .so; my $f = @naive.first: { now > INIT (now + 3) }; | 03:29 | |
camelia | rakudo-moar a45224: OUTPUT«WARNINGS for /tmp/eJSB0BwKMj:Useless use of "+" in expression "now + 3" in sink context (line 1)Earlier failure: Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block? in block <unit> at /tmp/eJSB0BwKMj line 1Fi…» | ||
BenGoldberg | m: my @naive := ^13 .grep: *.so; my $f = @naive.first: { now > INIT (now + 3) }; | ||
camelia | rakudo-moar a45224: OUTPUT«WARNINGS for /tmp/pxZRbAvokI:Useless use of "+" in expression "now + 3" in sink context (line 1)Type check failed in binding; expected Positional but got Seq ((1, 2, 3, 4, 5, 6, 7,...) in block <unit> at /tmp/pxZRbAvokI line 1» | ||
BenGoldberg | m: 1.so.say | ||
camelia | rakudo-moar a45224: OUTPUT«True» | ||
BenGoldberg | m: my @naive := ^13 .grep: *.so; | 03:30 | |
camelia | rakudo-moar a45224: OUTPUT«Type check failed in binding; expected Positional but got Seq ((1, 2, 3, 4, 5, 6, 7,...) in block <unit> at /tmp/PF1i9JVKnA line 1» | ||
BenGoldberg | huh | ||
m: my @naive := flat ^13 .grep: *.so; | |||
camelia | rakudo-moar a45224: OUTPUT«Type check failed in binding; expected Positional but got Seq ((1, 2, 3, 4, 5, 6, 7,...) in block <unit> at /tmp/j9d3mDmDCQ line 1» | ||
BenGoldberg | m: my @naive := eager ^13 .grep: *.so; | ||
camelia | ( no output ) | ||
[Coke] | aigh. | ||
BenGoldberg | m: my \naive = ^13 .grep: *.so; | 03:31 | |
camelia | ( no output ) | ||
BenGoldberg | m: my \naive := ^13 .grep: *.is-prime; my $f = naive.first: { now > INIT {now + 3} }; | 03:32 | |
camelia | ( no output ) | ||
BenGoldberg | m: my \naive := ^13 .grep: *.is-prime; say naive.first: { now > INIT {now + 3} }; | ||
camelia | rakudo-moar a45224: OUTPUT«Nil» | ||
BenGoldberg | m: my \naive := ^Inf .grep: *.is-prime; say naive.first: { now > INIT {now + 3} }; | ||
camelia | rakudo-moar a45224: OUTPUT«15581» | ||
[Coke] | m: say " Gentle reminder, dear reader, that you can use camelia with private messages." | ||
camelia | rakudo-moar a45224: OUTPUT« Gentle reminder, dear reader, that you can use camelia with private messages.» | ||
skink | What's the Perl6 syntax for a value I don't care about? e.g. 'let _ = whatever' in OCaml | 03:42 | |
Timbus | $ = whatever() | 03:43 | |
doc.perl6.org/language/variables#T...4_Variable | 03:44 | ||
[Coke] | $ isn't quite nothing, it's an anonymous state variable. | 03:48 | |
skink: if you don't care about it, don't save it in a variable. | |||
skink | I had a given $x, $y where True, False and True, True did the same thing | 03:49 | |
So I wanted True, _ for that case basically | |||
03:51
pecastro left
|
|||
Timbus | so I think you want Any ? | 03:52 | |
03:52
matiaslina left
03:54
pecastro joined,
pecastro left
03:55
pecastro joined
|
|||
skink | Oh, hm | 04:02 | |
If I include a script in bin/ with a module, does it not see the same ?%RESOURCES as the modules? | |||
%? * | |||
04:03
SalamiTactics joined
04:07
aries_liuxueyang joined
|
|||
aries_liuxueyang | Hello, everyone. | 04:07 | |
I have a question: `my $a; my $b; $b := $a;` this can be run in script. but it can not be run on repl. | 04:08 | ||
whey. | |||
why | |||
04:10
skink left
|
|||
[Coke] | works fine in my repl. | 04:12 | |
what does your "perl6 --version" say? | |||
aries_liuxueyang | `This is Rakudo version 2016.03-119-ga452244 built on MoarVM version 2016.03-108-gca1a21a | 04:13 | |
implementing Perl 6.c.` | |||
this error: `===SORRY!=== Error while compiling <unknown file> | |||
Cannot use bind operator with this left-hand side | |||
at <unknown file>:1` | |||
04:14
Cabanossi left
|
|||
[Coke] | Are you doing anything other than typing "perl6" and then typing in that line between the `` on a single line on the REPL? | 04:14 | |
aries_liuxueyang | I type one line a time by hand. | 04:15 | |
04:16
Cabanossi joined
|
|||
[Coke] | I can duplicate that error message if I hit enter after each of the ; | 04:16 | |
aries_liuxueyang | Yes, I hit enter after each of the ; | 04:17 | |
why? does it because of the repl? | 04:18 | ||
04:18
skids joined
|
|||
[Coke] | I don't know exactly what the root cause there is, but in general, the REPL isn't quite the same as running a script. the context as you go from line to line isn't quite the same. | 04:18 | |
aries_liuxueyang | okay, thanks. | 04:20 | |
besides, anyone use vim? my vim can not show syntax highlight | 04:22 | ||
my vim version is 7.4 | |||
[Coke] | I do, but I don't use syntax highlighting, usually. You probably want: github.com/vim-perl/vim-perl/blob/.../perl6.vim | 04:29 | |
04:29
nige1 joined
|
|||
[Coke] | Note that it's so old it references a VM we no longer use, so it might be out of date. | 04:29 | |
aries_liuxueyang | [Coke]: thank you, I have seen that and will have a try now ;-) | 04:32 | |
04:34
sortiz_ left
04:37
nige1 left
04:45
molaf_ left
04:48
mr-fooba_ left
04:51
mr-foobar joined
05:09
skids left
05:11
BenGoldberg left
05:13
BenGoldberg joined
05:18
maybekoo2 left
05:27
pecastro left,
pecastro joined
05:33
pecastro left
05:35
rurban joined
|
|||
[Coke] | m: say nativecast.WHAT | 05:42 | |
camelia | rakudo-moar a45224: OUTPUT«5===SORRY!5=== Error while compiling /tmp/anO1BgKLLXUndeclared routine: nativecast used at line 1» | ||
[Coke] | nativecast is referenced in the NativeCall doc | ||
05:56
Vlavv_ left
06:05
wamba joined
06:08
cognominal_ joined
06:09
Vlavv_ joined
06:10
CIAvash joined
|
|||
aries_liuxueyang | [Coke]: did you use Pathogen to install vim-perl? | 06:17 | |
06:17
BenGoldberg left
|
|||
[Coke] | It was so long ago, I have no idea, sorry | 06:19 | |
I presume I did whatever the README told me. | |||
aries_liuxueyang | it's weird and it does not start to work by Pathogen way. | 06:21 | |
Maybe I can try another way. thank you. ;-) | 06:22 | ||
06:29
cognominal_ left,
Cabanossi left
06:31
cognominal joined
06:32
Cabanossi joined
06:35
wamba left
06:43
jjido joined
06:48
rindolf joined
|
|||
ZoffixWin | I'm guessing there's something special with exceptions when the caller is a sub in .nqp file? Looking at #127883 and see a call from load_module() in src/Perl6/World.nqp is involved. | 06:49 | |
m: CompUnit::RepositoryRegistry.head.need( CompUnit::DependencySpecification.new( :short-name<Foo> ) ); | 06:50 | ||
camelia | rakudo-moar a45224: OUTPUT«Could not find Foo in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-2/share/perl6/site /home/camelia/rakudo-m-inst-2/share/perl6/vendor /home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Repository::AbsolutePath<140328410…» | ||
ZoffixWin | ^ and that does have a line number, but with `use Foo`, there's no line number | ||
06:52
rurban left,
rurban joined
|
|||
ZoffixWin | Screw it. Over my head. | 06:55 | |
06:59
azawawi joined
|
|||
azawawi | hi | 06:59 | |
ZoffixWin: ping | |||
ZoffixWin | pong | ||
azawawi | ZoffixWin: my mind is attached to my email. i just woke up :) | 07:00 | |
ZoffixWin | lol | ||
azawawi | ZoffixWin: re no line number info, it is evident a lot when using atom perl6 editor tools plugin | 07:01 | |
ZoffixWin: generally the error is at line number 0 which is the default for undefined line numbers | |||
ZoffixWin: or line 1 | |||
ZoffixWin: the problem occur on scripts or not one liners also | 07:02 | ||
ZoffixWin | It occurs with one liners too | 07:03 | |
There's no line info at all. | |||
azawawi | i see | ||
07:04
SalamiTactics left,
KotH joined
|
|||
azawawi | ZoffixWin: github.com/rakudo/rakudo/blob/nom/....nqp#L2378 ... we're not passing line number information? | 07:09 | |
ZoffixWin: something like github.com/rakudo/rakudo/blob/nom/...d.nqp#L609 | 07:10 | ||
ZoffixWin | ¯\_(ツ)_/¯ it's over my head. I gave up :) | ||
azawawi | i bet we need to handle the exception inside the grammar instead of instead of the world | 07:11 | |
s/instead of// | |||
and that's what happens when you dont drink your morning coffee :) | 07:12 | ||
moritz | or pass $/ to world | ||
azawawi | moritz: good morning | ||
moritz | so that it knows the line number | ||
azawawi: \o | |||
azawawi | $*LINE_NO is not set though. that's is passed using $/ ? | 07:13 | |
my nqp foo is weak, master :) | |||
ZoffixWin | load_module() actually has my $line := self.current_line($/); but $line isn't used anywhere in it | 07:15 | |
moritz | azawawi: what do you mean by "it's not set though"? Is it set to an undefined value? Or is there a place where it's NQPMu or something? | 07:16 | |
azawawi | moritz: ignore my comment. im just woke up :) | 07:19 | |
moritz: s/im/i/ | |||
azawawi starts a rakudo fork to try to fix it :) | 07:22 | ||
ZoffixWin | m: ."\b\b\b\b\b\b"() | 07:25 | |
camelia | rakudo-moar a45224: OUTPUT«Method '' not found for invocant of class 'Any' in block <unit> at /tmp/WXndyRcnbX line 1» | ||
ZoffixWin | .oO( camelia ain't a terminal... ) |
07:26 | |
07:26
vendethiel joined
|
|||
vendethiel | masak: are you sure you know me? :P | 07:27 | |
07:32
Ven joined
07:34
jjido left
07:36
AlexDaniel left
|
|||
ZoffixWin | wow, Proxy is cool | 07:42 | |
07:43
CIAvash left
07:44
CIAvash joined
|
|||
ZoffixWin | m: my $s = 0; my $v := Proxy.new( FETCH => method () { $s }, STORE => method ($new) { $s = ^25 .pick } ); .say for ++$v, $v; say $v; .say for ++$v, $v; | 07:44 | |
camelia | rakudo-moar a45224: OUTPUT«6661919» | ||
ZoffixWin contemplates a text web browser using a Proxy... :P | 07:45 | ||
To go to a URL, you assign it to a variable and to view the results you simply read it | |||
Wait. That's the simplest LWP::Simple! :o | |||
07:46
jack_rabbit joined
07:49
Ven left
07:57
xfix joined
08:02
firstdayonthejob joined
08:03
ocbtec joined
08:19
darutoko joined
|
|||
ZoffixWin | m: (sub (FatRat) {})(class FatCat{}); | 08:24 | |
camelia | rakudo-moar a45224: OUTPUT«Type check failed in binding <anon>; expected FatRat but got FatCat (FatCat) in sub at /tmp/kYUx5sVasF line 1 in block <unit> at /tmp/kYUx5sVasF line 1» | ||
ZoffixWin | 😂 | ||
masak | vendethiel: enough to make the "hug a stranger" punchline ;) | 08:27 | |
08:33
_mg_ joined
08:35
RabidGravy joined
08:37
_mg_ left
|
|||
RabidGravy | harr | 08:38 | |
08:40
hankache joined
|
|||
masak ponders how compatible server-side events are with Bailador and PSGI | 08:43 | ||
RabidGravy | the WebSocket module is a PSGI app thingy | 08:45 | |
masak | ooh metacpan.org/pod/distribution/PSGI...aming-Body | ||
RabidGravy | you can alternatively return a Channel instead of content from a PSGI app | ||
masak | yes, this is what I want | 08:46 | |
finally a chance to use Channels! :D | |||
RabidGravy | :) | ||
08:46
vendethiel left
|
|||
RabidGravy | be a love amd make a an EventSource *client* too, I want to rip this rubbish implementation out of Sofa soon | 08:47 | |
masak | m: sub (FatRat) {}(class FatCat{}) | ||
camelia | rakudo-moar a45224: OUTPUT«Type check failed in binding <anon>; expected FatRat but got FatCat (FatCat) in sub at /tmp/9NBeKEEHAT line 1 in block <unit> at /tmp/9NBeKEEHAT line 1» | ||
masak | ZoffixWin: no need for that first set of parentheses | ||
RabidGravy: my client is in JS, though. | |||
RabidGravy | :-\ BOO | 08:48 | |
masak | heh | 08:55 | |
hm, only Bailador::Test mentions p6sgi.streaming... and it sets it to Bool::False | 08:58 | ||
ufobat: ...halp :) | |||
09:00
jjido_ joined
|
|||
RabidGravy | I'd make a quick example but I haven't had a coffee yet | 09:14 | |
azawawi | RabidGravy: Greetings from non-coffee land | 09:15 | |
RabidGravy | :-O | ||
09:15
Relsak joined
09:27
Relsak left
09:32
hankache left
|
|||
dogbert17 | hello #perl6 | 09:39 | |
continuing my documentation spree, it seems as if only about 75 % of the methods in Cool have been documented at this point ;( | 09:42 | ||
09:42
CIAvash left
|
|||
dogbert17 | on the plus side there is some low hanging fruit to be found here I think | 09:42 | |
moritz | dogbert17: many of the methods have been documented in the classes where the more specific variant lives | 09:44 | |
for example, .uc coerces to Str, so .uc is documented in Str | |||
09:44
lizmat joined
|
|||
dogbert17 | does that mean that we shouldn't document it in cool, I guess the difference is coercion of the invocant? | 09:45 | |
Stuff like that would be low hanging fruit but perhaps it doesn't have to go into Cool | 09:46 | ||
moritz | dogbert17: it can be documented in Cool, we'll just duplicate lots of stuff that way | 09:47 | |
dogbert17 | True, should I try to look at other methods instead, i.e. stuff that is not documented elsewhere? | 09:48 | |
RabidGravy | I guess one could knock up a quick script to find all the methods in cool that aren't over-ridden by sub-classes | ||
also there are probably some that are over-ridden by some sub-classes and not others | 09:49 | ||
moritz | dogbert17: and if ou haven't seen it yet, the Cool docs have a table of which method coerces to what type | ||
extendind that would be the real LHF | |||
09:49
TEttinger left
|
|||
moritz | dogbert17: yes, documenting stuff that hasn't been documented at all would be more beneficial | 09:50 | |
RabidGravy | I guess documenting *all* the methods in Cool would be a boon for anyone who had a desire to sub-class it themself for some reason | 09:51 | |
dogbert17 | moritz: I actually added a few methods to that table yesterday | ||
and removed one as well ... capitalize | |||
moritz | dogbert17: ok, great | 09:53 | |
just shows how much I'm out of the loop :/ | |||
dogbert17 | found a changelog claiming that capitalize was removed in 2013 | 09:54 | |
09:54
CIAvash joined
|
|||
moritz | yes, wordcase is the new capitalize | 09:55 | |
dogbert17 | I'll snoop around a bit in the docs, find something that is not documented, and then pester you with a suggestion :-) | ||
09:56
vendethiel joined
09:58
spider-mario joined
09:59
vendethiel left
10:00
Ven joined
|
|||
moritz | dogbert17: have you looked into the issue tracker? | 10:01 | |
dogbert17 | no (blushes) | 10:03 | |
rt.perl.org ? | |||
moritz | github.com/perl6/doc/issues?utf8=%...writing%22 | 10:04 | |
dogbert17 | thanks, will take a look | ||
moritz | dogbert17: some of them might be outdated (so the doc might already exists), do a git grep before actualling documenting stuff | 10:05 | |
dogbert17 | actually found one that should be closed, i.e. already implemented, github.com/perl6/doc/issues/113 | 10:07 | |
moritz | dogbert17: will you close it, or should I? | 10:08 | |
dogbert17 | can I close it? | 10:09 | |
I'll try :-) | |||
moritz | dogbert17: if you can push to the repo, you can also close issues | 10:10 | |
dogbert17: if it doesn't work, tell me | |||
dogbert17 | done :-) | 10:11 | |
moritz | dogbert17++ | ||
masak | RabidGravy: I'd really appreciate a quick example of SSE. | 10:18 | |
10:22
Ven left
10:25
dpk left
|
|||
azawawi | github.com/azawawi/rakudo/commit/c...749dc2ced2 # First attempt at fixing RT #127883 | 10:30 | |
feedback is welcome | 10:32 | ||
10:32
ssm_ is now known as ssm
|
|||
moritz | azawawi: I find $.line as the attribute a bit short | 10:38 | |
dogbert17 | do these suggested doc additions seem correct or am I in over my head? gist.github.com/dogbert17/6deed8b9...aaae08ebf1 | 10:39 | |
moritz | what kind of line is it? | ||
azawawi | $.line-number ? | ||
moritz | source-line-number? | ||
dunno | |||
dogbert17: the first three are good; the others not so much (more) | 10:40 | ||
azawawi | moritz: i used the same conventions as X::Comp | ||
10:40
Ven joined
|
|||
moritz | azawawi: yes, but in an exception, it's a bit clearer IMHO what it refers to | 10:40 | |
dogbert17 | argh | ||
moritz | dogbert17: coercion to Int is not soething that Int actually implements | 10:41 | |
dogbert17: it's more like, several types that implement Cool do it in a different way | |||
azawawi | moritz: ok... fixing ... thanks for the feedback | ||
moritz | for example Str.Int parses the str, Array.Int looks at the number of elements | ||
lizmat waits for azawawi++ to make changes and then will merge the PR | 10:42 | ||
dogbert17 | ah, I'd better remove these for the time being :-) got three right at least | ||
10:43
firstdayonthejob left
|
|||
dogbert17 | my proficiency in perl6 is still a bit sketchy, that's why I'm trying to find LHF | 10:44 | |
10:46
Ven left
|
|||
dogbert17 | one more question, Cool.pod documents a routine called EVALFILE but that does not show up when typing 'say Cool.^methods'. What am I missing here? | 10:50 | |
10:51
chris2_ is now known as chris2,
vendethiel joined
|
|||
lizmat | dogbert17: EVALFILE is a sub | 10:53 | |
dogbert17 | lizmat: thx | 10:54 | |
azawawi | lizmat: first green travis-ci.org/rakudo/rakudo/builds/123540811 :) | 11:08 | |
dalek | c: d8a76bd | (Jan-Olof Hendig)++ | doc/Type/Cool.pod: Added chomp, chop and codes to the method coercion table |
11:09 | |
11:09
kid51 joined
11:10
pecastro joined
|
|||
lizmat | azawawi: I had already tested it myself... :-) so it's merged now | 11:10 | |
azawawi | lizmat: supercomputer machine? :) | ||
lizmat | naaah... combination of looking at code and seeing it compiles :-) | 11:11 | |
azawawi dreams of ark.intel.com/products/85766/Intel-...e-2_10-GHz | 11:13 | ||
11:16
travis-ci joined
|
|||
travis-ci | Doc build errored. Jan-Olof Hendig 'Added chomp, chop and codes to the method coercion table' | 11:16 | |
travis-ci.org/perl6/doc/builds/123541890 github.com/perl6/doc/compare/8e218...a76bddbfe4 | |||
11:16
travis-ci left
|
|||
dogbert17 | nooooo | 11:16 | |
lizmat | azawawi: hmmm... some places don't specify the line number :-( | 11:17 | |
azawawi | spectest? | ||
dogbert17 | so how do I figure out what went wrong here, I could build the docs locally | 11:18 | |
azawawi | lizmat: EVAL? | ||
lizmat | not sure yet | ||
dogbert17 | strange, it complains that it couldn't build panda ?!? | 11:21 | |
11:25
jeek joined
|
|||
lizmat | azawawi: there are about 6 test files that fail with source-line-number being required: I made it optional for now | 11:25 | |
azawawi | ok :) | ||
dogbert17 | as a newbie it's not obvious to me why a change in doc/Type/Cool.pod could lead to a build failing with the msg 'The command "rakudobrew build-panda" failed and exited with 2 during .' | ||
11:26
jeek left
|
|||
lizmat | dogbert17: wasn't that caused by me mergening azawawi's PR ? | 11:29 | |
*merging | |||
dogbert17 | perhaps :-) | ||
it said something about # Looks like you planned 16 tests, but ran 14, t/02-shell-command.t .. | 11:31 | ||
azawawi | pasteboard.co/ec2dlgV.png # Finally... | ||
lizmat | if it was azawawi's PR, then it should be fixed now | 11:32 | |
11:32
rurban left
|
|||
dalek | rl6-most-wanted/add-bindings-for-nlp: b3fcfa3 | titsuki++ | most-wanted/bindings.md: Add "NLP and Machine Learning" to the list |
11:32 | |
dogbert17 | it is fixed, lizmat++ | 11:33 | |
azawawi | lizmat: so im a core contributor? :) | ||
lizmat | azawawi: yes :-) | 11:37 | |
psch | azawawi++ | 11:38 | |
azawawi | :) | ||
lizmat | azawawi: would appreciate it if you could check all occurrences of DependencySpecification in roast that lack a :source-line-number parameter | 11:40 | |
RabidGravy wonders if titsuki would also like the moon on a stick and a pony | 11:42 | ||
azawawi | lizmat: sure | 11:44 | |
dogbert17 | The round method/sub is defined in Real and Cool but I can't find any description of which tie-breaking rule is use, i.e how to round 2.5 or -0.5, is it documented somewhere? | ||
s/use/used/ | 11:45 | ||
psch | m: say Cool.^can('round').candidates>>.signature | 11:46 | |
camelia | rakudo-moar 674186: OUTPUT«Method 'candidates' not found for invocant of class 'List' in block <unit> at /tmp/CwGOMQtgmG line 1» | ||
psch | m: say Cool.^can('round')>>.candidates>>.signature | ||
camelia | rakudo-moar 674186: OUTPUT«(((Cool $: *%_) (Cool $: $base, *%_)))» | ||
psch | m: say Real.^can('round')>>.candidates>>.signature | ||
camelia | rakudo-moar 674186: OUTPUT«Too many positionals passed; expected 2 arguments but got 3 in block <unit> at /tmp/844TT2hxEd line 1» | ||
psch | ah, doesn't pun there | ||
m: say Real.new.^can('round')>>.candidates>>.signature | |||
camelia | rakudo-moar 674186: OUTPUT«(((Real:D $: *%_) (Real:D $: $scale, *%_)))» | ||
psch | m: say Cool ~~ Real; say Real ~~ Cool | ||
camelia | rakudo-moar 674186: OUTPUT«FalseTrue» | ||
psch | dogbert17: Real is Cool, so it's narrower | ||
11:47
jjido_ left
|
|||
psch | i also think :D would be narrower than no type smiley, but that doesn't matter here | 11:47 | |
11:47
jeek joined
11:48
MasterDuke left,
kid51 left
11:52
_mg_ joined
|
|||
lizmat goes enjoying the great outdoors again | 11:58 | ||
11:59
lizmat left
|
|||
dogbert17 | psch: interesting but I'm not sure how it helps me here, do the different types use different tie breaking rules en.wikipedia.org/wiki/Rounding#Tie-breaking | 11:59 | |
psch | ohh | 12:01 | |
yeah, i thought tie-breaking in a MMD sense, my bad | |||
dogbert17 | nah, I should have been clearer when i posted my question | 12:02 | |
s/i/I/ | |||
psch | dogbert17: in any case, Cool.round calls self.Numeric.round, and Real does Numeric | 12:03 | |
so they both essentially do the same thing, except for the fact that Cool.round first coerces to Numeric | |||
dogbert17 | psch: thanks, that's good to know | ||
looks as if the rule used is 'Round half away from zero' | 12:05 | ||
12:10
mane joined
|
|||
azawawi | .tell lizmat nothing so far but github.com/perl6/roast/blob/master...fication.t | 12:13 | |
yoleaux | azawawi: I'll pass your message to lizmat. | ||
12:14
azawawi left
12:17
molaf joined
12:19
mane left
|
|||
dogbert17 | Hmm, I must suffer from a serious lack of coffee, the rounding tie-breaker rule p6 uses is 'Round half up' not 'Round half away from zero' as I wrote earlier | 12:21 | |
12:23
rurban joined
|
|||
dogbert17 | m: say -1.5.round # this fooled me :( | 12:23 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«-2» | ||
psch | m: say (-1.5).round | 12:24 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«-1» | ||
psch | m: say -1.5 .round | ||
camelia | rakudo-moar 4b0e5b: OUTPUT«-1» | ||
dogbert17 | parenthesis FTW | 12:25 | |
psch: why did your last example return -1 ? | |||
psch | m: say -1.5\ .round | 12:26 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«-2» | ||
psch | dogbert17: there's slightly different precedence for postfix methodop and infix methodop i think | ||
dogbert17 | aha, I have a lot to learn it seems | 12:27 | |
12:29
Actualeyes joined
12:31
Ven joined
|
|||
psch finally got the chord variant stuff working | 12:32 | ||
RabidGravy | psch++ | 12:34 | |
psch | example.pl6 doesn't care about playing mode-unfitting chords, though, so sometimes there's stuff like Dminmaj7 in e.g. C major... vOv | 12:35 | |
12:37
CIAvash left
|
|||
dalek | rl6-most-wanted: b3fcfa3 | titsuki++ | most-wanted/bindings.md: Add "NLP and Machine Learning" to the list |
12:38 | |
rl6-most-wanted: 1a7abda | titsuki++ | most-wanted/bindings.md: Merge pull request #27 from perl6/add-bindings-for-nlp Add "NLP and Machine Learning" section to the list |
|||
RabidGravy | masak, server side events gist.github.com/jonathanstowe/cf91...37f7137427 | 12:57 | |
Now, that *appears* to send all that right things, but for some reason the node EventSource thingy doesn't recognise it, despite it being effectively the same response to one it *does* recognise | 12:59 | ||
oh wait, just edited | 13:02 | ||
that *does* work | 13:03 | ||
now, how one might integrate that with Bailador is left as an exercise for the reader | 13:05 | ||
[Coke] waves from Baltimore. | 13:24 | ||
(documenting things duplicatively - be nice if we documented it once and then built the docs so you could see it both ways) | 13:25 | ||
"I have no idea what I'm doing" - me in about 3.5 hours | 13:27 | ||
RabidGravy | that's me all the time | 13:28 | |
[Coke] wonders if baltimore has an IRC channel. | 13:29 | ||
[Coke] 's stomach is not happy about the coffee/food ratio atm. | 13:30 | ||
rjbs: let me be the first to publicly hope that your free time will now be spent hacking on Rakudo! ;) | 13:33 | ||
rjbs | 🙂 | 13:35 | |
13:36
Ven left
13:39
jameslenz joined
|
|||
[Coke] | .u 🙂 | 13:40 | |
yoleaux | No characters found | ||
13:48
Ven joined,
Ven left
13:54
sue joined
13:57
kid51 joined
14:14
colomon joined
|
|||
colomon | timotimo: octree, actually. | 14:14 | |
colomon thinks he can hack his way around the issue without an octree, based on looking more closely at an actual case. | 14:15 | ||
14:15
tharkun left
14:17
Ikke_ joined
14:19
Ikke_ left
14:23
tharkun joined
14:24
CIAvash joined
14:25
skids joined
14:32
skids left
|
|||
colomon | O(N^2) operations are bad when N=766, m’kay? | 14:35 | |
14:37
arlenik left
|
|||
[Coke] | Nice. the Perl 6 installfest had a few people who were interested in getting perl 6 installed, but that were basically able to get it done on their own. one panda snag from a week ago that magically worked today. | 14:43 | |
14:44
BenGoldberg joined
|
|||
RabidGravy | wahay! | 14:45 | |
14:51
_mg_ left
14:52
pecastro left
14:53
Skarsnik joined
|
|||
RabidGravy | Is something like "role Sofa::Document::All[::Doc = (Hash but Sofa::Document::Wrapper)] does JSON::Class {" a bit too weird? | 14:55 | |
Juerd | Yes. | 14:57 | |
14:58
colomon left
14:59
colomon joined
|
|||
arnsholt | It's definitely weird enough that it deserves an explanatory comment, but whether it's worth it or not depends on the interface you get to implement | 15:03 | |
15:05
kid51 left
15:07
jjido joined
|
|||
masak | RabidGravy: `::Doc =` -- I don't think I understand that bit. is it really two colons? | 15:07 | |
RabidGravy | Really two colons, a "type capture" | 15:08 | |
it works, the actual API is a bit nicer :) | 15:09 | ||
[Coke] | Hi to the people in baltimore who are seeing #perl6 on the board. | 15:10 | |
15:10
kid51 joined
|
|||
mst | _ _ ___ ____ _ _ _____ ___ __ __ ___ ____ _____ | 15:11 | |
| | | |_ _| | __ ) / \ | | |_ _|_ _| \/ |/ _ \| _ \| ____| | |||
| |_| || | | _ \ / _ \ | | | | | || |\/| | | | | |_) | _| | |||
| _ || | | |_) / ___ \| |___| | | || | | | |_| | _ <| |___ | |||
|_| |_|___| |____/_/ \_\_____|_| |___|_| |_|\___/|_| \_\_____| | |||
teatime | lol | 15:12 | |
teatime has a sudden urge to watch The Wire. | |||
15:16
kurahaupo joined
|
|||
TimToady | dogbert17: you apparently got warnocked yesterday..."capitalize" turned into "wordcase" quite some time ago, in part because some people can't remember how to spell it :) but mainly because tclc is just the default policy you might apply word by word | 15:18 | |
mst | TimToady: like, say, you. given it's spelled 'capitalise' :D | 15:19 | |
mst goes to fish his tea back out the harbour | |||
15:21
sue left
|
|||
ZoffixWin | #perl6 on the board? What board? | 15:28 | |
mst | I would presume the board in the room hosting the baltimore installathon | 15:29 | |
ZoffixWin | I see | ||
Also, you misspelt 'capitalize' | |||
15:31
sue joined
|
|||
mst | in soviet zoffix, ALL words spelled with Z | 15:33 | |
15:33
rurban left
|
|||
TimToady | dogbert17: oh, I see moritz unwarnocked you, moritz++ | 15:33 | |
ZoffixWin | :) | ||
15:34
rurban joined
|
|||
dogbert17 | TimToady: thanks for the capitali[s|z]e explanation, much appreciated | 15:34 | |
and I also learned the meaning of 'warnocked' :) | 15:35 | ||
RabidGravy | masak, did you see the gist of the really dumb SSE psgi app? | ||
ZoffixWin | m: ^0x1FFFF .grep({ .uniname ~~ m:i/web/ })».say | 15:39 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EWdvojzrDjMissing « or »at /tmp/EWdvojzrDj:1------> 031FFFF .grep({ .uniname ~~ m:i/web/ })».7⏏5say» | ||
ZoffixWin | bug? | ||
15:42
_mg_ joined
|
|||
TimToady | arguable both ways :) | 15:45 | |
ZoffixWin | TimToady, what's the non-bug argument? | ||
TimToady | . is an infix that is looser than ». so how is it supposed to figure out the head of that is really a method? | 15:46 | |
ZoffixWin | m: (^0x1FFF).grep({ .uniname ~~ m:i/web/ })».say | 15:47 | |
camelia | ( no output ) | ||
TimToady | when you write ^42 .grep it's really ^42 . grep | ||
ZoffixWin | Ah | ||
TimToady | so switching back from infix processing to postfix processing is a bit fraught | ||
otoh, people think of infix . as a way to write a funny postfix, hence the argument to fix it too :) | 15:48 | ||
ZoffixWin | :) | ||
BenGoldberg | m: (^0x1FFF).grep({ .uniname ~~ m:i/web/ }).map: .say | 15:50 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«(Any)Cannot call map(Seq: Bool); none of these signatures match: ($: Hash \h, *%_) (\SELF: █; :$label, :$item, *%_) (HyperIterable:D $: █; :$label, *%_) in block <unit> at /tmp/ukvrre4GEy line 1» | ||
BenGoldberg | m: (^0x1FFF).grep({ .uniname ~~ m:i/web/ }).map: { .say } | 15:51 | |
camelia | ( no output ) | ||
ZoffixWin is trying to find a good unicode char for "browser in a variable" thingie :) | 15:52 | ||
timotimo | 💻? | 15:54 | |
ZoffixWin | m: '💻'.uninames.say | ||
camelia | rakudo-moar 4b0e5b: OUTPUT«(PERSONAL COMPUTER)» | ||
ZoffixWin | That doesn't display neither in my IRC client nor in my code editor :) | ||
timotimo | hehe. | ||
TimToady | you need a better 💻 | 15:55 | |
ZoffixWin | heh | ||
timotimo | well, moar knows it, so it's not that new :) | ||
15:56
firstdayonthejob joined
15:57
_mg_ left
|
|||
ZoffixWin | m: sub term:<%💻> { 42 }; say "%💻[]" | 15:57 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«42» | ||
ZoffixWin | freaky :) | ||
timotimo | what's that character? | ||
is that the personal computer? | 15:58 | ||
ZoffixWin | Yes | ||
TimToady finds it fascinating that we spent millenia trying to reduce the number of ideographs in our writing system, but now that we can look things up on a computer, we're reinventing many new ideographs | |||
ZoffixWin: that's...freaky...yeah... | 15:59 | ||
overloading sigils via LTM seems like a bad idea for some reason | |||
m: say ${foo} | 16:01 | ||
camelia | rakudo-moar 4b0e5b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YQulP65BlpUnsupported use of ${foo}; in Perl 6 please use $fooat /tmp/YQulP65Blp:1------> 3say ${foo}7⏏5<EOL>» | ||
colomon | Is there a nice idiomatic way to initalize a Hash value to the empty array / list / whatever if the value doesn’t currently exist in the Hash? | ||
TimToady | though that's exactly what we're doing to get that error, I guess | ||
16:01
rurban left
|
|||
grondilu | m: say [1, 1] ~~ Array[Real] | 16:02 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«False» | ||
ZoffixWin | m: my %h = bar => 42; %h<foo> //= Empty; %h<bar> //= Empty; say %h; | 16:03 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«{bar => 42, foo => ()}» | ||
ZoffixWin | colomon, something like that, ^ perhaps? | ||
Hm, I guess that's "false" not "not exists" | |||
or not defined | |||
TimToady | note that .push will do something like this automagically | 16:04 | |
colomon | I think it will work either way? | ||
grondilu | m: subset Metric of Array where .all ~~ Real; say [1, 1i] ~~ Metric; say [1, 2] ~~ Metric | ||
camelia | rakudo-moar 4b0e5b: OUTPUT«FalseTrue» | ||
colomon | TimToady: right, but I’m dealing with the results of a classify call, and don’t actually want to add anything else to the list, I just want the Empty list to be there. | ||
TimToady | seems a bit X/Y to me | 16:05 | |
grondilu | m: subset Metric of Array where { .all ~~ Real and .map(&abs).all == 1 }; say [1, 1i] ~~ Metric; say [1, 2] ~~ Metric; say [1, -1] ~~ Metric | ||
camelia | rakudo-moar 4b0e5b: OUTPUT«FalseFalseTrue» | ||
colomon | X/Y? | ||
TimToady | S99:XY | 16:06 | |
or so | |||
ZoffixWin | colomon, x/y problem. You're trying to solve the wrong problem. | ||
timotimo | er. i need to find tuits to fix synopsebot6 | ||
16:07
synopsebot6 joined
|
|||
timotimo | S99:XY | 16:07 | |
synopsebot6 | Link: design.perl6.org/S99.html#XY | ||
RabidGravy | there | ||
timotimo | S99:XY Problem | ||
synopsebot6 | Link: design.perl6.org/S99.html#XY_Problem | ||
TimToady | if you only want to know the existence of a key, seems more like a Set | 16:08 | |
or are you overloading two different behaviors on one structure? | |||
colomon | TimToady: okay, here’s the problem. I have two lists of 3D coordinate systems, and a test that can classify whether or not a system is the standard global origin. I need to know how many of the systems are the standard global origin in each list, and get a list of all the ones which are not for each list. | 16:09 | |
TimToady | S99:MEGO | ||
synopsebot6 | Link: design.perl6.org/S99.html#MEGO | ||
TimToady | hah, found one that isn't there :) | 16:10 | |
ZoffixWin | colomon, you should probably using a Set and one of those fancy set operators | 16:11 | |
Check out these: docs.perl6.org/language/setbagmix | |||
TimToady | I suspect colomon++ already knows about those, which is why I said "seems" :) | ||
ZoffixWin | Alright :) | 16:12 | |
16:12
kid51 left
|
|||
colomon | TimToady: two different behaviors on one structure, as my longer message says. :) | 16:12 | |
TimToady | okay, though my eye gloze over | 16:13 | |
*eyes | |||
colomon | Quick version: Have list. Need to know how many things in the list pass a test, and get a list of all the ones that fail it. | 16:15 | |
… and when I put it like that, the answer is obvious. | |||
TimToady++ | |||
ZoffixWin | grep for failures and subtract the number you got from original number to get successes | 16:17 | |
colomon | ZoffixWin: right, like I said, obvious. | ||
16:17
Herby_ joined
|
|||
TimToady | 😹 | 16:17 | |
Herby_ | Morning, everyone! | ||
o/ | |||
colomon | ZoffixWin++ | 16:18 | |
stmuk | does anyone know any SF.pm names? | 16:19 | |
16:21
cdg joined
|
|||
TimToady | I believe so :) | 16:22 | |
stmuk | is Fred Moyer the best contact? | 16:25 | |
sue | sigh, typical perl geek response. let's get breakfast | 16:28 | |
TimToady | no clue; SF is on the other side of Palo Alto from me, which is too massive to transmit much | ||
sue | this is the way it works when people ask questions on the list. you get 20 different people saying they have no freaking idea | 16:29 | |
16:29
skink joined
|
|||
sue | CHEERS FOR THAT :-) | 16:29 | |
TimToady | well, I thought one such answer was okayish | ||
colomon | There’s more than one way not to know it. | ||
TimToady | just to be social and all | ||
16:30
CIAvash left
|
|||
colomon got the running time for his program from 20 minutes to 45 seconds with this round of changes. Hup! | 16:30 | ||
sue | i'm mostly joking | ||
TimToady | 😎 | 16:31 | |
skink | colomon, Reminds me of this i.imgur.com/U3kDo3W.png | 16:33 | |
dogbert17 | This usage description of sort is backwards, isn't it? sort LIST, SORT_BY | 16:34 | |
its from List.pod | 16:36 | ||
Usage: | |||
sort LIST | |||
sort LIST, SORT_BY | |||
LIST.sort | |||
LIST.sort(SORT_BY) | |||
ZoffixWin | Yeah | 16:37 | |
TimToady | if it's a named parameter, it doesn't matter where it goes really | ||
timotimo | the usage sections were not terribly well received and not too many of them were actually added | 16:38 | |
or reviewed for that matter | |||
dogbert17 | m: say sort &abs, (3, -4, 7, -1, 2, 0) | ||
camelia | rakudo-moar 4b0e5b: OUTPUT«(0 -1 2 3 -4 7)» | ||
16:38
sue left
|
|||
TimToady | if it's position, then it starts mattering more :) | 16:38 | |
*tional | |||
16:38
rurban joined
|
|||
dogbert17 | was thinking of changed that part of the docs | 16:39 | |
s/changed/changing/ | |||
I'll change it then :) | 16:41 | ||
timotimo: are you a p6 profiler virtuoso? | |||
timotimo | just a little bit | 16:42 | |
16:42
colomon left
|
|||
timotimo | what do you need? | 16:42 | |
dogbert17 | do you know why this fails perl6 --profile -e 'my @m[5]' | ||
timotimo | no, haven't looked into it yet | ||
could be because it doesn't run any code and the profiler doesn't expect the result set to be empty | 16:43 | ||
so maybe it's running into a null pointer and asplodes | |||
16:43
colomon joined
|
|||
dogbert17 | the above is a golfed version [Coke]++ a 'real' program | 16:44 | |
timotimo | what kind of failure are you seeing? "knowhow methods must be called on an object instance with repr KnowHOWREPR"? | 16:45 | |
and "don't know how to dump a BOOTCode"? | |||
16:45
araujo_ joined
|
|||
dogbert17 | I see the first one 'knowhow ...' | 16:46 | |
timotimo | i can try to look into it later today; for now i'll be AFK | ||
16:47
araujo_ left
16:48
araujo_ joined,
Herby_ left
16:49
araujo left,
araujo_ left
16:50
araujo_ joined
|
|||
dogbert17 | timotimo: thx, let me now if you need the code and I'll paste it | 16:50 | |
16:51
araujo_ left
16:52
araujo_ joined
16:55
Actualeyes left
17:03
BenGoldberg left,
riatre left,
riatre joined,
zakharyas joined
17:04
wamba joined,
BenGoldberg joined
|
|||
dalek | c: db65e03 | (Jan-Olof Hendig)++ | doc/Type/List.pod: Removed two typos and changed an inconsistency in the usage section for sort |
17:08 | |
17:08
colomon left
17:11
rurban1 joined
17:12
rurban1 left
|
|||
RabidGravy renames a bunch of tests so they are numbered 100 apart | 17:12 | ||
mst | the skills we learned from BBC BASIC will always be with us | 17:13 | |
17:14
rurban left
|
|||
Skarsnik | Hello | 17:14 | |
vendethiel | o/ | ||
timotimo | dogbert17: you can paste it right now, i'll look at it when i get to it | 17:15 | |
17:16
Emeric joined
|
|||
dogbert17 | timotimo: gist.github.com/dogbert17/c510cc42...8624acc66d | 17:17 | |
17:19
zakharyas left
|
|||
timotimo | dogbert17: if you're after performance, you can get a decent improvement by not using multi-dimensional arrays with fixed dimensions; those are not yet optimized at all | 17:19 | |
just drop the shape and it ought to be faster already | |||
dogbert17 | cool, will try | 17:20 | |
17:21
Ven joined
17:23
travis-ci joined
|
|||
travis-ci | Doc build passed. Jan-Olof Hendig 'Removed two typos and changed an inconsistency in the usage section for sort' | 17:23 | |
travis-ci.org/perl6/doc/builds/123584211 github.com/perl6/doc/compare/d8a76...65e03d930c | |||
17:23
travis-ci left
|
|||
skink | Hey ZoffixWin, if have bin/script in a module, can it see %?RESOURCES? | 17:23 | |
you* have | 17:24 | ||
ZoffixWin | No idea | ||
RabidGravy | I don't think it can, but it's easy to test | ||
timotimo | just make a tiny module that just returns %?RESOURCES :P | 17:25 | |
RabidGravy | yeah, that's what I've actually done | ||
17:27
kid51 joined
|
|||
RabidGravy | No, just tested and it doesn't appear that they can | 17:29 | |
skink | mhm | 17:30 | |
RabidGravy | but as timotimo says you can just have "module MyResources { sub resources() is export { %?RESOURCES }}" in your lib and jobs a good-un | 17:32 | |
skink | Yeah I can try that after fixing panda again | 17:35 | |
panda --force install . does not actually overwrite previous installations, even if you bump versions, so testing this is a tad annoying | 17:36 | ||
RabidGravy | A little gimmick I've used is github.com/jonathanstowe/Lumberjac...rovider.pm | ||
just specify the new version in the use | |||
skink | The script included with the module isn't using the module itself :D | 17:37 | |
17:37
kid51 left
|
|||
ugexe | it should have access to resources, afterall if you use a local module via -I its %?RESOURCES are still available to the local directory loaded copy of the module | 17:48 | |
i.e. if you can access a (possibly not-loaded) CompUnit you should be good | 17:49 | ||
17:50
kid51 joined
17:51
BenGoldberg left
17:52
Sgeo_ left,
mane joined
|
|||
grondilu | jeez the EVAL warning message is very dissuasive indeed. | 17:52 | |
17:52
BenGoldberg joined
|
|||
ugexe | perl6 -e 'EVAL()' \ "FUCK YOU!!! only kidding" | 17:54 | |
17:58
domidumont joined
18:05
djbkd joined
18:07
kid51 left
18:09
Ven left
18:11
Ven joined
18:12
Ven left
18:16
colomon joined
18:18
domidumont1 joined,
domidumont left
18:28
djbkd left,
domidumont1 left
18:31
kid51 joined
|
|||
[Coke] | "Brian Duggan"++ | 18:33 | |
colomon sort of knows a Bryan Duggan… | 18:36 | ||
18:43
mane left
|
|||
[Coke] hopes he seppled this Duggan's name right - he's giving a presentaitn on writing a web app in P6. | 18:44 | ||
colomon | Bryan is a tech guy, but I haven’t heard anything about him working with p6, and he lives in Ireland. | 18:45 | |
[Coke] | this guy is in Baltimore right now. :) | 18:46 | |
colomon | :) | ||
[Coke] likes This presentation so much better than the one Coke did! | |||
colomon | itunes.apple.com/us/app/tunepal/id...35033?mt=8 | ||
[Coke] | github.com/bduggan/hamna :) | 18:58 | |
19:02
colomon left
19:05
kid51 left
19:07
Ven joined,
Ven left
19:12
BenGoldberg left
19:13
BenGoldberg joined
19:15
jjido left
19:18
obfusk joined
19:29
colomon joined,
tharkun left,
tharkun joined
|
|||
colomon | [Coke]++ | 19:31 | |
19:31
dwarring joined
19:33
colomon left
19:34
regreg joined
|
|||
regreg | hello | 19:34 | |
i have a clean rakudo star installation | |||
I'm trying to run "panda install Readline" | |||
and I get a failure at the "==> Testing LibraryMake" step | |||
no such file or directory | 19:35 | ||
in sub run-and-gather-output at C:\rakudo\share\perl6\site\sources\5AEF9DA5AE15E5AB5CB2ADB58A455E007FA783 | |||
no such file or directory in sub run-and-gather-output at C:\rakudo\share\perl6\site\sources\5AEF9DA5AE15E5AB5CB2ADB58A455E007FA7839E line 85 | 19:36 | ||
19:36
djbkd joined
|
|||
regreg | any idea on how to proceed? | 19:36 | |
19:37
kaare_ left
19:38
kaare_ joined
19:39
Ven joined
|
|||
[Coke] | which version of rakudo star? | 19:47 | |
what OS, btw? | |||
19:56
jjido joined
|
|||
regreg | windows 10 64bit | 19:57 | |
rakudo-star-2016.01-x86_64 (JIT) | |||
19:58
jjido left
19:59
TimToady joined
|
|||
regreg | [Coke]: | 20:00 | |
20:01
jjido joined
20:02
kaare_ left
20:03
Ven left
|
|||
[Coke] | sorry, don't have a win box to test on at the moment. Anyone else? | 20:04 | |
20:04
colomon joined,
colomon left
|
|||
regreg | [Coke]: don't I need some sort of C compiler to install the Readline library? I have MSVC but probably it needs mingw- gcc | 20:05 | |
20:09
cpage joined
|
|||
regreg | i think i'll try perl6 in a linux vm then | 20:11 | |
20:24
mane joined
|
|||
timotimo | i need a beefier computer so i can play those DOS games | 20:31 | |
20:33
kurahaupo left
20:34
djbkd left
|
|||
geekosaur | regreg, if you can find a built readline.dll then NativeCall can use it directly | 20:35 | |
regreg | the point of Readline library is to offer a better console wrapper i think, not to be called from code | ||
geekosaur | it needs to be called from code to provide things like intelligent completion | 20:36 | |
rlwrap could be used to wrap an existing program (sort of; not sure that even flies on Windows) but it can't distinguish filename completion from command completion from variable completion from etc. | 20:37 | ||
20:37
kid51 joined
20:45
djbkd joined
|
|||
[Coke] | release process will start tomorrow about 9 am eastern | 20:47 | |
20:57
darutoko left
21:04
mane left
|
|||
[Coke] | .seen dha | 21:05 | |
yoleaux | I saw dha 11 Apr 2016 21:26Z in #perl6: <dha> That doesn't really look like Larry. | ||
[Coke] | dha was registered to be here at baltimore, but he's not. :( | ||
ZoffixWin | How many people are there? And is it all about P6? | 21:11 | |
21:13
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
21:15
AlexDaniel joined
21:19
sortiz joined,
kid51 left
|
|||
sortiz | \o #perl6 | 21:19 | |
ZoffixWin | \o | ||
skink | Anyone know any cool/neat/weird ideas for the crypto trashbag? | 21:24 | |
Got a passphrase generator and the PGP wordlist convert in so far | |||
sortiz | Digging into regreg problem with in R* on Windows found that a) LibraryMake needs an environment with cl and nmake, b) as Readline don't include readline's sources, the dependency on LibraryMake is needless. | 21:28 | |
21:29
Skarsnik left
21:32
wamba left
21:42
jjido left
21:45
TEttinger joined,
leont joined
21:50
BenGoldberg left
21:51
ZoffixLappy joined
|
|||
leont | jnthn: Test::Harness is so bad a being parallel on Windows you might as well not use the parallelism | 21:58 | |
Also, I think we're one bugfix away from parallel TAP::Harness in pure-perl6 | |||
22:05
ocbtec left
22:06
BenGoldberg joined
|
|||
timotimo | ooooh | 22:08 | |
leont: you got some details? :) | |||
well, for today i promised i'd look at a profiler invocation going boom | |||
ZoffixLappy | m: role Base { has $.name = 'Base; }; role Curiosity does Base { has $.name = 'Curiosity' }; my $curi = Curiosity.new; say $curi | 22:09 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bG0GyDWpIATwo terms in a rowat /tmp/bG0GyDWpIA:1------> 3ole Curiosity does Base { has $.name = '7⏏5Curiosity' }; my $curi = Curiosity.new;  expecting any of: infix infi…» | ||
ZoffixLappy | TTIAR?? | ||
22:09
khw joined
|
|||
leont | timetime: still working on figuring out if it's rakudo or moar, I suspect the latter | 22:09 | |
timotimo, | 22:10 | ||
ZoffixLappy | Ah, damn. missing quote. | ||
m: role Base { has $.name = 'Base'; }; role Curiosity does Base { has $.name = 'curiosity'; }; my $curi = Curiosity.new; say $curi | |||
camelia | rakudo-moar 4b0e5b: OUTPUT«Attribute '$!name' conflicts in role composition in any apply at gen/moar/m-Metamodel.nqp line 1974 in any compose at gen/moar/m-Metamodel.nqp line 2057 in any specialize_with at gen/moar/m-Metamodel.nqp line 2497 in any at gen/moar/m-Meta…» | ||
22:11
rindolf left
|
|||
ZoffixLappy | How can I make it so I have a $.name I can use in the Base, but other roles (like Curiosity here) can change the value of it? | 22:11 | |
leont | Proc::Async file handles don't give an EOF signal, so the Supplies never have their :done handlers called | 22:12 | |
22:12
cdg left
|
|||
ZoffixLappy | m: role Base { method foo { say self!name } }; role Curiosity does Base { has $!name = 'Curi'; }; say Curiosity.new.foo | 22:13 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«No such private method '!name' for invocant of type 'Curiosity' in method foo at /tmp/LPoj1_AvsP line 1 in block <unit> at /tmp/LPoj1_AvsP line 1» | ||
ZoffixLappy | Ah. I get it. | ||
Never mind me :) | |||
leont | Hmmm, it seems the problem is Rakudo after all. If my suspicion is correct I have a fix :-) | 22:15 | |
sortiz | m: role Base { has $.name = 'Base'; }; role Curiosity does Base { method new { self.bless(:name<curiosity>) }}; my $curi = Curiosity.new; say $curi | 22:17 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«Curiosity.new(name => "curiosity")» | ||
ZoffixLappy | Cool. Thanks. | 22:18 | |
timotimo | leont: sounds great! | 22:22 | |
22:24
zakharyas joined
|
|||
sortiz | ZoffixLappy, When B does A, all methods and attributes of A, even private ones, are now an integral part of your class/role B. | 22:25 | |
ZoffixLappy | 👍 I need to read up more on that stuff later on. | 22:29 | |
Curious, is there a away to specify either-or in the signature? e.g. sub query (Str :$sol, Str :$earth-day) { ... } and I want either $sol or $earth-day to be a required parameter. | 22:33 | ||
Right now I'm just checking in the body of the sub | |||
timotimo | no, but you can build two multi candidates | 22:34 | |
ZoffixLappy | ! timotimo++ right | ||
22:44
dolmen joined
|
|||
timotimo | dogbert17: did you get around to writing the diagonals-sum thing without shaped arrays yet? | 22:46 | |
22:52
firstdayonthejob left
|
|||
sortiz | Some of the ideas I've been testing in DBDish for search and load of libraries at runtime, now on an independent module, not ready for ecosystem yet but for comments and discussion: github.com/salortiz/NativeLibs | 22:53 | |
AlexDaniel | sortiz: that looks very promising | 22:54 | |
22:54
RabidGravy left
22:58
Emeric left
|
|||
sortiz | AlexDaniel, Thanks! | 22:59 | |
AlexDaniel | sortiz: any reason why this cannot be built into nativecall itself? | 23:01 | |
ZoffixLappy | m: sub foo (:$foo where { $_ > 0 } ) { say $foo ?? 'foo' !! 'no foo' }; foo | 23:11 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«Use of uninitialized value of type Any in numeric context in block at /tmp/nGdR66G6h_ line 1Use of uninitialized value of type Any in numeric context in block at /tmp/nGdR66G6h_ line 1Constraint type check failed for parameter '$foo' in sub f…» | ||
ZoffixLappy | This is kinda LTA, TBH. No `foo` parameter was passed to the sub, so it shouldn't be checked for validity | 23:12 | |
leont | The cycle of "change one bit, rebuild the entire prelude", repeat, repeat is a bit slow :-/ | 23:13 | |
ZoffixLappy | Especially since you can't `return` from within a where clause, so if you're writing neat subsets, they turn out awkward | ||
dogbert17 | timotimo: I changed my @mat[$size; $size]; to my @mat; instead but perf went down. Should I change the way I access the matrix as well? | 23:14 | |
23:15
dolmen left
|
|||
ZoffixLappy | Oh, it's actually failing the constraint ;/ | 23:15 | |
m: subset Foo of Any where { $_ ~~ Any ?? True !! ($_ > 5 or warn 'Need more than five') }; sub foo (Foo :$foo) { say $foo ?? 'foo' !! 'no foo' }; foo :2foo | 23:18 | ||
camelia | rakudo-moar 4b0e5b: OUTPUT«foo» | ||
ZoffixLappy | I can't master this. How do I define a subset for an optional named arg that also able to `warn`? | ||
m: subset Foo of Any where { .defined ?? ($_ > 5 or warn 'Must be more than 5') !! True }; sub foo (Foo :$foo) { say $foo ?? 'foo' !! 'no foo' }; foo :2foo | 23:19 | ||
camelia | rakudo-moar 4b0e5b: OUTPUT«Must be more than 5 in block at /tmp/v9LYrPAHDk line 1Must be more than 5 in block at /tmp/v9LYrPAHDk line 1Constraint type check failed for parameter '$foo' in sub foo at /tmp/v9LYrPAHDk line 1 in block <unit> at /tmp/v9LYrPAHDk line 1…» | ||
geekosaur | smartmatch against Any seems wrong | 23:20 | |
m: (5 ~~ Any).so.say | |||
camelia | rakudo-moar 4b0e5b: OUTPUT«True» | ||
ZoffixLappy | That's the answer ^. My original compaint still stand though. Unspecified named args should not be checked | ||
23:21
sue joined
23:22
zakharyas left
|
|||
ZoffixLappy | This can probably be addressed via module-space. | 23:23 | |
ZoffixLappy gets cracking | 23:25 | ||
23:28
molaf left
23:33
colomon joined
|
|||
sortiz | AlexDaniel, That is the plan, after intensive testing. | 23:33 | |
AlexDaniel | sortiz: cool | ||
timotimo | dogbert17: hm, dunno, should be all right | 23:34 | |
23:34
djbkd left
|
|||
timotimo | dogbert17: i put a piece of safety code in the right spot to make that code run under the profiler again | 23:34 | |
23:35
BenGoldberg left
|
|||
timotimo | dogbert17: you can pull the very latest nqp and compile a rakudo with that, it should work then | 23:35 | |
23:36
BenGoldberg joined,
spider-mario left
|
|||
timotimo | dogbert17: what $size did you use to get it to actually take enough time? :) | 23:41 | |
dogbert17 | timotimo: the problem calls for the size to be 1001, see projecteuler.net/problem=28 | 23:42 | |
timotimo | ouch :) | ||
ZoffixLappy | m: sub subset-is (&check, Str $message = '') { return sub ($v){ $v.defined ?? ( &check($v) or warn $message ~ " Got $v" and False ) !! True }; }; subset Positive of Int where subset-is { $_ > 0 }, "Must be a positive Int."; my Positive $x = -2; | 23:43 | |
camelia | rakudo-moar 4b0e5b: OUTPUT«Must be a positive Int. Got -2 in sub at /tmp/uRSn9hmKzP line 1Type check failed in assignment to $x; expected Positive but got Int (-2) in block <unit> at /tmp/uRSn9hmKzP line 1» | ||
ZoffixLappy | m: sub subset-is (&check, Str $message = '') { return sub ($v){ $v.defined ?? ( &check($v) or warn $message ~ " Got $v" and False ) !! True }; }; subset Positive of Int where subset-is { $_ > 0 }, "Must be a positive Int."; sub foo ( Positive :$foos ) { }; foo foos => -2; | ||
camelia | rakudo-moar 4b0e5b: OUTPUT«Must be a positive Int. Got -2 in sub at /tmp/KCxnFKVH0X line 1Must be a positive Int. Got -2 in sub at /tmp/KCxnFKVH0X line 1Constraint type check failed for parameter '$foos' in sub foo at /tmp/KCxnFKVH0X line 1 in block <unit> at /tmp/…» | ||
ZoffixLappy | Any idea what the 'must be a positive..' message is printed TWICE when using the subset as a sig in the sub? | ||
23:44
djbkd joined
|
|||
ZoffixLappy | s/what/why/; | 23:44 | |
leont | Managed to make Proc::Async call :done (and presumably :quit), but await on stdout still hands :-/ | ||
dogbert17 | yeah, it takes quite some time to run with the size set to 1001, hopefully things will improve in the coming months | 23:45 | |
there is also a high chance that I'm using a lousy method in order to solve the problem | 23:46 | ||
ZoffixLappy | m: sub foo ($foos where { $_ > 2 or warn "fail" }) {}; | 23:47 | |
camelia | ( no output ) | ||
ZoffixLappy | m: sub foo ($foos where { $_ > 2 or warn "fail" }) {}; foo -2 | ||
camelia | rakudo-moar 4b0e5b: OUTPUT«fail in block at /tmp/z3WXOD2Mgv line 1fail in block at /tmp/z3WXOD2Mgv line 1Constraint type check failed for parameter '$foos' in sub foo at /tmp/z3WXOD2Mgv line 1 in block <unit> at /tmp/z3WXOD2Mgv line 1» | ||
ZoffixLappy | Seems like sub signature subsets are evaluated TWICE :S | ||
dogbert17 | timotimo: thanks for looking into this problem, timotimo++ | 23:50 | |
23:51
colomon left
23:56
sue left
|
|||
leont | Ow wait, that was supposed to hang, because that cast doesn't make sense to me. | 23:58 |