»ö« 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. |
|||
TimToady | hypers aren't that smart yet | 00:00 | |
n00b_ | And I can't roll my own hypers yet, right? I know it's on the roadmpa | ||
TimToady | well, it's all written in p6/nqp already, so it's theoretically possible :) | 00:01 | |
00:01
mcmillhj joined
|
|||
n00b_ | I suppose I could try to roll my own rank operator in nqp, but I wasn't planning on getting my hands that dirty. | 00:01 | |
TimToady | but the current metaops are a bit hardwired, yes | 00:02 | |
we have the grammatical categories, but the action routines are not going to get auto-written for you, as they are with normal operators | |||
n00b_ | One meta-op which I think is worth consideration is rank: op"N expresses that the "natural cell" of op is an array of rank N, and so " breaks up an arrays > N into equal-sized shards of rank N, feeds them to op seriatim, and collects the results into a larger array (just concat) | 00:03 | |
I'm not sure if this needs to be so array-focused as in the APLs; N in Perl6 could just as easily be a Signature | 00:04 | ||
timotimo | hm, a bit like rotor? | ||
TimToady | we can express array shapes in declarations, but nothing is currently gonna do the pattern matching for you | 00:05 | |
n00b_ | secretly, / is just a shorthand for "(natural_cell_of_op, Inf) | ||
I don't know rotor, let me check that out. | |||
timotimo heads out | |||
TimToady | rotor is rather more procedural than declarational though | 00:06 | |
00:06
mcmillhj left
|
|||
TimToady | and only handles the top dimension like other listops | 00:06 | |
n00b_ | The top is also a useful choice, though I think bottom is more general (because it's easier write top in terms of bottom than vice versa) | 00:07 | |
TimToady | if we decide the current hypers aren't so useful, we can always tweak the semantics of hyper within a lexical scope too | ||
n00b_ | Wouldn't that require the ability to roll one's open hypers? | 00:08 | |
Without getting into nqp and actions, that is. | |||
TimToady | well, you'd have the actions call into other support routines | ||
n00b_ | Intuitively, that feels like it might not be sufficient to express the structural walking inversion from topmost to bottommost | 00:09 | |
00:09
psychoslave left
00:10
Kaiepi left,
Kaiepi joined
|
|||
TimToady is quite willing for someone smarter than him to do that, as long as it doesn't force mere mortals to understand before they need it :) | 00:11 | ||
n00b_ | m: say (1,2,3) X, (4,5,6) | 00:14 | |
camelia | ((1 4) (1 5) (1 6) (2 4) (2 5) (2 6) (3 4) (3 5) (3 6)) | ||
n00b_ | m: say ZX, (1,2,3) xx 2 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: ZX used at line 1 |
||
n00b_ | How can I create 2 copies of (1,2,3) and zip or insert X, between them? | ||
It's a ridiculously expensive but syntactically cheap way to get me closer to the idea I want to express | 00:15 | ||
TimToady | m: say [ZX,] (1,2,3) xx 2 | ||
camelia | (((1 1)) ((2 2)) ((3 3))) | ||
TimToady | m: say [ZX,] ((1,2,3) xx 2) xx 2 | ||
camelia | (((1 1) (1 2) (1 3) (2 1) (2 2) (2 3) (3 1) (3 2) (3 3)) ((1 1) (1 2) (1 3) (2 1) (2 2) (2 3) (3 1) (3 2) (3 3))) | ||
n00b_ | Oh. I may not even need the Z then. | ||
TimToady | m: say [X,] (1,2,3) xx 2 | ||
camelia | ((1 1) (1 2) (1 3) (2 1) (2 2) (2 3) (3 1) (3 2) (3 3)) | ||
n00b_ | m: say [X,] (1,2,3) xx 2 | ||
camelia | ((1 1) (1 2) (1 3) (2 1) (2 2) (2 3) (3 1) (3 2) (3 3)) | ||
TimToady | "insert" means you want to reduce | ||
n00b_ | Thanks, that's a useful distinction | 00:16 | |
00:17
esh left,
mcmillhj joined
|
|||
TimToady | the main problem you'll run into there is that reducing on a single list will explode the list instead of treating it scalarly | 00:17 | |
00:17
mcmillhj_ joined
|
|||
TimToady | due to the single-arg rule | 00:17 | |
so for some applications you might need a way to disable that rule | |||
00:18
esh joined
|
|||
n00b_ | I'm having the opposite problem. I want c_d to operator on every pair of lists, but my attempts with [] turn out to feed c_d every pair of scalars. | 00:19 | |
TimToady | it's a bit like regex matching /.* foo/ | 00:21 | |
00:22
mcmillhj left
|
|||
TimToady | finding the next-to-last of something is always a bit fraught :) | 00:22 | |
but I can see how it might be powerful | 00:23 | ||
n00b_ | Is there some form of boxing I can use to turn (4,5,6) into [4,5,6] in the P5 sense? | ||
00:23
w_richard_w joined
|
|||
TimToady | you mean, make it an item? | 00:24 | |
n00b_ | yeah | ||
TimToady | m: say $_ * 2 for 1,2,3, $(1,2,3,4) | 00:25 | |
camelia | 2 4 6 8 |
||
TimToady | like that? | ||
n00b_ | Yes, but I want to item-ify each list in a list of lists | ||
m: say $$_ for ( (1,2,3) , (4,5,6) ) | |||
camelia | (1 2 3) (4 5 6) |
||
n00b_ | m: say ($$_).perl for ( (1,2,3) , (4,5,6) ) | 00:26 | |
camelia | $(1, 2, 3) $(4, 5, 6) |
||
n00b_ | nah, that didn't help | ||
what I'm thinking is if I could "box" an array so it looked like a scalar, I might be able to access the second-to-last level with hypers | 00:27 | ||
by tricking them into thinking it's the last level | |||
TimToady | mebbe | ||
m: say ([$_,]).perl for ( (1,2,3) , (4,5,6) ) | 00:28 | ||
camelia | [(1, 2, 3),] [(4, 5, 6),] |
||
TimToady | or some such | ||
anyway, a real [] has scalars inside | 00:29 | ||
m: say ($[$_]).perl for ( (1,2,3) , (4,5,6) ) | |||
camelia | $[1, 2, 3] $[4, 5, 6] |
||
TimToady | hmm | ||
brane hertz... | |||
n00b_ | my brain doesn't have enough hertz | ||
TimToady | 'course one can go all nominal typing with objects, too | 00:30 | |
00:31
shareable6 joined,
ChanServ sets mode: +v shareable6
|
|||
n00b_ | I'm abusing the language enough as it is, I think adding objects in to force it to confess is a bridge too far | 00:31 | |
I'm not above cheating, but I'm above *icky* cheating. | 00:32 | ||
00:32
comborico1611 left
|
|||
TimToady | part of the problem here is that we're trying to use scalars as much more than just 0-dimensional arrays :) | 00:33 | |
so we don't have this pure view of dimensionality that you get in aplish languages | 00:34 | ||
n00b_ | you have to; having strings be rank 1 vectors in APL is a PITA, a mistake from the 70s we carry around | 00:35 | |
TimToady | Perl is much more interested in the singular/plural distinction of natural languages | ||
so at least we didn't make that mistake :) | |||
n00b_ | yes! though I'd like an easy facility to determine what's singular for me, without going all OOP | 00:36 | |
overtyping tempts me even further to overengineering | 00:37 | ||
TimToady | m: say $(1,2,3).WHAT | ||
camelia | (List) | ||
TimToady | m: say $(1,2,3).VAR.WHAT | ||
camelia | (Scalar) | ||
n00b_ | BTW, Ken Iverson shared your view that taking cues from natural languages is critical, but he was too Strunk and White about it | 00:38 | |
TimToady | omit needless symbols! | ||
n00b_ | Sure, I get the $() thing, but it's syntactic, which is limiting | 00:39 | |
TimToady | the main problem I have with APLish languages is that all the symbols look like each other in terms of weight | ||
n00b_ | One bit of syntax APL discarded as limiting was [] for indexing. Took a long time for everyone else to cop to that. | ||
00:39
mcmillhj_ left
|
|||
TimToady | which is why our metaops look "bigger" than normal ops | 00:39 | |
n00b_ | There's a different mindset in APL. We view the egalitarian nature of symbols as a virtue | 00:40 | |
TimToady | and we don't mind using larger symbols for larger or less-frequent ideas | ||
huffman coding, and all that | |||
n00b_ | And that ops not being bigger than functions erases a bias against doing things top-down | ||
APL also huffman-codes (no one uses {:: for example), but we have a different view on what (should be) "less frequent" | 00:41 | ||
TimToady | from a natural languages viewpoint, it's a foolish consistency | ||
but yeah, the math viewpoint tends to fight linguistics | |||
n00b_ | yep | 00:42 | |
TimToady | natural languages don't actually go in for much orthogonality | ||
and the most irregular forms are the commonest ones | 00:43 | ||
because that's where you need the extra redundancy | |||
n00b_ | John Wilkins, a 17th C philosopher, was an early proponent of trying to reduce argumentation to shuffling symbols, the first in a wave of pitting math against language | ||
the whole concept is misguided, but very attractive | 00:44 | ||
TimToady | sure, he's one of the chief villains of The Search for the Perfect Language, by Eco | ||
one of my favorite books | |||
n00b_ | I'll add it to my list. I've dipped into some of his work. | 00:45 | |
00:46
Actualeyes left
|
|||
n00b_ | For now, what's a straightforward way to generate all pairs of lists from a given list of lists? | 00:48 | |
00:51
mcmillhj joined,
Khisanth left
|
|||
lookatme | :) | 00:52 | |
00:55
mcmillhj left
|
|||
TimToady | m: say (<a b c>, <d e f>, <x y z>).combinations(2) | 00:57 | |
camelia | (((a b c) (d e f)) ((a b c) (x y z)) ((d e f) (x y z))) | ||
n00b_ | niiice | 00:59 | |
01:01
ryn1x joined
01:06
Khisanth joined
01:08
w_richard_w left,
w_richard_w joined
01:11
ryn1x left
01:12
ryn1x joined
01:13
zakharyas joined
01:17
w_richard_w left
01:20
ryn1x left,
mcmillhj joined
01:21
ryn1x joined
01:25
w_richard_w joined,
mcmillhj left
01:44
kurahaupo_ joined
01:46
kurahaupo left
01:47
ilbot3 left
|
|||
[Coke] yawns | 01:47 | ||
samcv | timotimo: we could add the strings length if we end up with a hash that is 0 | 01:48 | |
so then we will always have a non-zero hash | |||
well actually the length plus 1 | 01:49 | ||
though i guess we have to account for it going over 32bit signed int. though wouldn't be an issue when i make the hashes 64bit | |||
01:53
mcmillhj joined
01:56
ilbot3 joined,
ChanServ sets mode: +v ilbot3
01:58
mcmillhj left,
Actualeyes joined
02:28
tomaw left
02:33
tomaw joined,
ufobat_ left
02:37
mcmillhj joined
02:38
pilne left
02:41
mcmillhj left
02:48
ufobat joined,
raschipi joined
02:56
Actualeyes left
02:57
Actualeyes joined
03:11
mcmillhj joined
03:14
n00b_ left
03:16
mcmillhj left
03:29
mcmillhj joined
03:33
raschipi left
03:34
mcmillhj left
03:55
mcmillhj joined
03:59
mcmillhj left
04:00
skids left
04:01
Actualeyes left
04:02
Actualeyes joined
04:05
eliasr left
04:06
Actualeyes left,
zakharyas left
04:14
john_parr left
04:15
zakharyas joined,
john_parr joined
04:20
squashable6 left,
nightfrog left,
squashable6 joined
04:22
aborazmeh joined,
aborazmeh left,
aborazmeh joined
04:25
z0f joined
04:26
mcmillhj joined
04:28
z0f left
04:30
mcmillhj left
04:40
curan joined
04:56
mcmillhj joined
04:57
sergot left,
sergot joined
05:01
mcmillhj left
05:04
w_richard_w left
05:07
jmerelo joined
05:13
numbernine joined
05:14
mcmillhj joined
05:15
w_richard_w joined
05:18
atroxaper joined,
mcmillhj left
05:19
vivus-ignis joined,
vivus-ignis is now known as ignis__away
05:21
Actualeyes joined
05:23
sauvin joined
05:39
ignis__away is now known as vivus-ignis
05:41
mcmillhj joined
05:46
mcmillhj left
05:55
vivus-ignis is now known as ignis__away,
mcmillhj joined
|
|||
Geth | doc: 0927fc50aa | (JJ Merelo)++ | doc/Language/traps.pod6 Grammar correction |
05:59 | |
synopsebot | Link: doc.perl6.org/language/traps | ||
doc: fb337f39c3 | (JJ Merelo)++ | doc/Language/traps.pod6 Document Nil → Any trap closes #1135 |
|||
06:00
mcmillhj left
|
|||
Geth | doc: 92d045bee9 | (JJ Merelo)++ | doc/Language/traps.pod6 Document Nil → Any trap closes #1134 Uses also #1135 example to document it. |
06:00 | |
06:01
ignis__away left
06:06
shareable6 left
|
|||
Geth | doc: 5e1a7a5ed8 | (JJ Merelo)++ | doc/Type/Seq.pod6 sink method documented in Seqs. Closes #2028 |
06:12 | |
synopsebot | Link: doc.perl6.org/type/Seq | ||
06:12
numbernine left
06:14
AlexDaniel left,
aborazmeh left
|
|||
lookatme | How can I declare a sub/function type has specify signature ? | 06:16 | |
jmerelo | lookatme: what do you mean? | ||
lookatme | like C does : typedef int (*intfun_t)(void); intfun_t s; s is a function | ||
jmerelo | lookatme: pretty much in the same way docs.perl6.org/syntax/Constraining...0Callables | 06:17 | |
lookatme | Hmm, I am trying to use subset but not working | 06:18 | |
m: subset WalkCb of Callable where *.signature ~~ :(Int $a); my WalkCb $x = sub (Int $a) { return $a; }; | |||
camelia | Type check failed in assignment to $x; expected WalkCb but got Sub (sub (Int $a) { #`(Sub...) in block <unit> at <tmp> line 1 |
||
jmerelo | lookatme: would you mind to post it too in StackOverflow? It's the kind of thing that belongs there too. | 06:19 | |
m: subset WalkCb of Callable where *.signature ~~ :(Int $a); my WalkCb $x = sub (Int $b) { return $b; }; | 06:20 | ||
camelia | Type check failed in assignment to $x; expected WalkCb but got Sub (sub (Int $b) { #`(Sub...) in block <unit> at <tmp> line 1 |
||
jmerelo | m: subset WalkCb of Callable where *.signature ~~ :(Int $a); my WalkCb $x = -> Int $b { return $b; }; | ||
camelia | Type check failed in assignment to $x; expected WalkCb but got Block (-> Int $b { #`(Block|...) in block <unit> at <tmp> line 1 |
||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :(Int $a); my WalkCb $x = -> Int $b { return $b; }; | 06:21 | |
camelia | Type check failed in assignment to $x; expected WalkCb but got Block (-> Int $b { #`(Block|...) in block <unit> at <tmp> line 1 |
||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :(Int $a); my WalkCb $x = WalkCb.new(-> Int $b { return $b; }); | 06:22 | |
camelia | Default constructor for 'WalkCb' only takes named arguments in block <unit> at <tmp> line 1 |
||
El_Che | I don't think you can declare signatures as a type | ||
lookatme | Do you have any other suggestions ? | 06:23 | |
El_Che, :) | |||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :(Int $a); my WalkCb $x = (-> Int $b { return $b; }).WalkCb; | ||
camelia | No such method 'WalkCb' for invocant of type 'Block' in block <unit> at <tmp> line 1 |
||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :(Int $a); my WalkCb $x = -> Int $b { return $b; }; | ||
camelia | Type check failed in assignment to $x; expected WalkCb but got Block (-> Int $b { #`(Block|...) in block <unit> at <tmp> line 1 |
||
06:23
domidumont joined
|
|||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :(Int $a); my WalkCb $x = -> Int { return $_; }; | 06:24 | |
camelia | Type check failed in assignment to $x; expected WalkCb but got Block (-> Int $ { #`(Block|5...) in block <unit> at <tmp> line 1 |
||
06:24
mcmillhj joined
|
|||
jmerelo | lookatme: definitely StackOverflow | 06:24 | |
El_Che | there is one already | ||
but I can't find it | 06:25 | ||
jmerelo | El_Che: if you mean the one on using signatures as variables, I don't think that one fits here... | ||
lookatme | on the stackoverflow ? | ||
jmerelo | El_Che: you mean this one? stackoverflow.com/questions/415313...-in-perl-6 | 06:26 | |
El_Che | yes | 06:27 | |
jmerelo | m: my $x = -> Int { return $_; }; say $x.signature | ||
camelia | (Int) | ||
jmerelo | m: my $x = -> Int { return $_; }; say $x.signature ~~ Int | 06:28 | |
camelia | False | ||
jmerelo | m: my $x = -> Int { return $_; }; say $x.signature ~~ "Int" | ||
camelia | False | ||
jmerelo | m: my $x = -> Int { return $_; }; say $x.signature ~~ :(Int) | ||
camelia | True | ||
El_Che | stackoverflow.com/questions/440936...1#44097741 | ||
dunno is it's applicable | |||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :(Int); my WalkCb $x = -> Int { return $_; }; | ||
camelia | Type check failed in assignment to $x; expected WalkCb but got Block (-> Int $ { #`(Block|8...) in block <unit> at <tmp> line 1 |
||
06:29
mcmillhj left
06:30
domidumont left
|
|||
jmerelo | El_Che: it kinda is, but it implies it should work... | 06:30 | |
m: my $x = -> Int { return $_; }; say $x.^name | |||
camelia | Block | ||
lookatme | Seems like there's no way to do like C does :) | ||
06:31
domidumont joined
|
|||
jmerelo | lookatme: there is definitely one way. But whoever is around here now does not know the answer... That's why it's better if you post it on StackOverflow, where the most knowledgeable Perl6 people dwell | 06:31 | |
lookatme | I am not have time to post it on the StackOverflow | 06:33 | |
jmerelo | lookatme: OK, I'll do it for you then | ||
lookatme | Thanks, and hope you understand me :) | 06:34 | |
06:34
robertle joined
06:36
mcmillhj joined
|
|||
El_Che | I don't see in the answer where foo is called | 06:36 | |
ahah , I see it | 06:37 | ||
never mind :) | |||
if it's a solution, it's ugly | |||
if the signatures are the same, make a common sub/method and pass the parameters by a wrapper sub/method? | 06:38 | ||
the error would be less obvious for the user, but's it's only one indirection | |||
06:39
darutoko joined
|
|||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :(Int $); my WalkCb $x = -> Int { return $_; }; | 06:39 | |
camelia | Type check failed in assignment to $x; expected WalkCb but got Block (-> Int $ { #`(Block|7...) in block <unit> at <tmp> line 1 |
||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :($); my WalkCb $x = -> Int { return $_; }; | ||
camelia | Type check failed in assignment to $x; expected WalkCb but got Block (-> Int $ { #`(Block|7...) in block <unit> at <tmp> line 1 |
||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :(Int); my $x = -> Int { return $_; }; say $x.signature; my WalkCb $y = $x; | 06:40 | |
camelia | (Int) Type check failed in assignment to $y; expected WalkCb but got Block (-> Int $ { #`(Block|5...) in block <unit> at <tmp> line 1 |
||
jmerelo | OK, I think I know the answer | 06:41 | |
06:41
mcmillhj left
|
|||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :(Int, -> Int); my $x = -> Int { return $_; }; say $x.signature; my WalkCb $y = $x; | 06:41 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed parameter at <tmp>:1 ------> 3b of Block where *.signature ~~ :(Int, -7⏏5> Int); my $x = -> Int { return $_; }; s |
||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :(Int, --> Int); my $x = -> Int { return $_; }; say $x.signature; my WalkCb $y = $x; | ||
camelia | (Int) Type check failed in assignment to $y; expected WalkCb but got Block (-> Int $ { #`(Block|7...) in block <unit> at <tmp> line 1 |
||
jmerelo | m: subset WalkCb of Block where *.signature ~~ :(Int $a --> Int); my $x = -> Int $a { return $a; }; say $x.signature; | 06:42 | |
camelia | (Int $a) | ||
jmerelo | No I don't. | 06:43 | |
m: subset WalkCb of Block where *.signature ~~ :(Int $a --> Int); my WalkCb $x = -> Int $a { return $a; }; | |||
camelia | Type check failed in assignment to $x; expected WalkCb but got Block (-> Int $a { #`(Block|...) in block <unit> at <tmp> line 1 |
||
jmerelo | lookatme: Check it out in StackOverflow stackoverflow.com/questions/503848...in-general | 06:44 | |
06:49
mcmillhj joined
06:51
rindolf joined
06:53
abraxxa joined
06:55
mcmillhj left,
Ven`` joined
06:57
kurahaupo joined
06:58
kurahaupo_ left
|
|||
lookatme | jmerelo, I am not mean **using subset**, it's fine if we have any other way to do it :) | 06:59 | |
07:01
Ven`` left
|
|||
lookatme | It's like a function pointer of C, I just thought it's looks easy to do it with subset | 07:01 | |
07:01
shareable6 joined
|
|||
jmerelo | lookatme: that's why it's always better if you do it yourself :-) I have edited it, though | 07:02 | |
07:03
kurahaupo_ joined
|
|||
lookatme | jmerelo, haha, Never mind | 07:03 | |
07:04
kurahaupo left
07:05
mcmillhj joined
07:06
kurahaupo joined
07:08
kurahaupo_ left
|
|||
Geth | doc: e295315c72 | (JJ Merelo)++ | doc/Type/List.pod6 Aggregates sink, closes #1607 |
07:09 | |
synopsebot | Link: doc.perl6.org/type/List | ||
07:09
mcmillhj left
07:17
Ven`` joined
07:24
wamba joined
07:30
amalia___ joined
07:34
enheh joined
07:38
mcmillhj joined
07:40
ignis__away joined
07:43
ignis__away left,
mcmillhj left
07:46
ignis__away joined
|
|||
Geth | doc/master: 5 commits pushed by (JJ Merelo)++ | 07:49 | |
07:49
scimon joined
07:52
ignis__away is now known as vivus-ignis,
mcmillhj joined
07:55
shareable6 left
07:57
mcmillhj left
08:06
lookatme left
08:07
lookatme joined
|
|||
jmerelo | squashable6: status | 08:07 | |
squashable6 | jmerelo, Next SQUASHathon in 15 days and ≈1 hour (2018-06-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
08:17
Ven`` left
08:20
Ven`` joined,
dakkar joined
08:24
mcmillhj joined
08:26
Ven`` left
08:29
mcmillhj left
08:31
Ven`` joined
08:35
Ven`` left
|
|||
jmerelo | .tell lookatme The solution is here stackoverflow.com/questions/503848...1#50386481 (by LizMat) | 08:35 | |
yoleaux | jmerelo: I'll pass your message to lookatme. | ||
lookatme | . | 08:37 | |
tyil | weekly: www.reddit.com/r/ProgrammingLangua...out_perl6/ | ||
yoleaux | 08:35Z <jmerelo> lookatme: The solution is here stackoverflow.com/questions/503848...1#50386481 (by LizMat) | ||
notable6 | tyil, Noted! | ||
lookatme | jmerelo, hmm, I see thanks | ||
lizmat | tyil++ | 08:39 | |
tyil | lizmat: putting it straight into notable6 is easier than poking you every time I see or comment about Perl 6 and then have you do it :p | 08:40 | |
lookatme | But I wonder is this form should work fine ? `subset WalkCb of Callable where *.signature ~~ :(Int $a); ` | ||
lizmat | tyil: yeah, I would suggest other people do this as well, BTW :-) | ||
lookatme | or this is just a bug | ||
lizmat | lookatme: github.com/rakudo/rakudo/issues/1836 # I just opened an issue for it | ||
tyil | lizmat: I'll take make a note of it when I see it happen to tell other people to throw it into notable6 :> | 08:41 | |
lookatme | oh, I see lizmat | ||
lizmat | afk for a few hours& | 08:42 | |
El_Che | lizmat is fast, when I wanted to post something on SO she already did :) | 08:45 | |
08:46
mcmillhj joined
08:50
shareable6 joined,
ChanServ sets mode: +v shareable6
08:51
mcmillhj left
|
|||
jmerelo | weekly: twitter.com/raiph_mellor/status/99...8504270850 on Perl 6 and type systems. | 08:58 | |
notable6 | jmerelo, Noted! | ||
09:07
vivus-ignis is now known as ignis__away
09:10
ignis__away is now known as vivus-ignis
09:14
pmurias joined
|
|||
pmurias | to be honest the "gradual" typing of Perl 6 sucks compared to real gradual typing as is more of language weakness than a strength | 09:15 | |
hahainternet | i can't say i've ever fully understood HM | 09:16 | |
but strong typing does seem to be the right way to go whenever possible | 09:17 | ||
lookatme | :) I have another question now | 09:22 | |
m: use NativeCall; sub create-pointer(::T $a) is export { my CArray[T] $c = CArray[T].new; $c[0] := T.new(0); nativecast(Pointer[T], $c); } | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> An exception occurred while parameterizing CArray at <tmp>:1 Exception details: Type check failed in binding to parameter '<anon>'; expected Any but got T (?) in method parameterize at /ho… |
||
lookatme | Is there a better way create a nativecall pointer to something ? | 09:23 | |
seems like CArray can not work with parameter T | |||
09:23
pmurias left
|
|||
lookatme | I am off work now, have no time talk about it, just post question here | 09:24 | |
09:26
kurahaupo_ joined
09:28
kurahaupo left
09:29
FROGGS joined
|
|||
FROGGS | jnthn: should Perl6 be listed here too? reactivex.io/languages.html | 09:29 | |
09:31
kurahaupo joined
09:32
kurahaupo left
09:33
kurahaupo joined,
kurahaupo_ left
|
|||
jmerelo | lookatme: maybe just use CPointer? | 09:41 | |
FROGGS: most probably... | |||
09:42
HaraldJoerg joined
|
|||
jnthn | FROGGS: Probably. We liked it so much we built it in to the language's standard library. :-) | 09:53 | |
FROGGS | jnthn: that's what I mean... are you goiing to inform them, or shall I? | 09:55 | |
jnthn | FROGGS: If you're up for it, please do :) | 09:58 | |
jnthn has a few too many things to do at the moment | |||
10:00
wamba left,
zakharyas left
|
|||
FROGGS | k | 10:02 | |
10:03
vivus-ignis is now known as ignis__away
10:07
kurahaupo_ joined
10:09
kurahaupo_ left
10:10
kurahaupo_ joined
10:12
kurahaupo left
10:13
kurahaupo joined
10:14
kurahaupo_ left
|
|||
lizmat | pmurias: would you care to elaborate on the sucking of gradual typing in Perl 6 ? | 10:20 | |
jmerelo | lizmat: right. It's not Haskell, but it's good enough and very useful for lots of things. | 10:22 | |
buggable | New CPAN upload: Desktop-Notify-0.3.0.tar.gz by FRITH modules.perl6.org/dist/Desktop::Not...cpan:FRITH | ||
10:24
nightfrog joined
10:33
markong joined
10:40
xtreak joined
|
|||
lizmat | m: my constant A = :(Int $); # probably related to #1836 | 10:43 | |
camelia | ===SORRY!=== QAST::Block with cuid 1 has not appeared |
||
lizmat | R #1836 | ||
GH #1836 | 10:44 | ||
hmmm | |||
github.com/rakudo/rakudo/issues/1836 | |||
10:52
atroxaper left
10:57
ignis__away is now known as vivus-ignis,
w_richard_w left
11:03
Ven`` joined
11:07
w_richard_w joined
11:11
eliasr joined
11:12
Actualeyes left
11:22
w_richard_w left
11:40
enheh left
11:52
softmoth joined
11:57
ExtraCrispy left
12:01
mcmillhj joined
12:05
raschipi joined
12:11
titsuki_ left
12:14
ExtraCrispy joined
|
|||
robertle | .seen DrForr | 12:24 | |
yoleaux | I saw DrForr 13 Apr 2018 14:25Z in #perl6: <DrForr> My head isn't in that space right now otherwise I'd look for possible examples... | ||
El_Che | it's been a while | 12:29 | |
robertle | yeah, darn | ||
I need something like TT for perl6, and saw that he has started on that. but don't know what the state is and where things are going... | 12:30 | ||
lizmat | fwiw, he appears to be active on FB | ||
robertle | FB? | ||
lizmat | |||
timotimo | is tt template toolkit? | ||
robertle | ah, that! | ||
yeah tempalte toolkit | |||
timotimo | in such a case i'd suggest looking at the test suite | ||
robertle | I did! | 12:31 | |
so basically it looks as if the perl 6 version is some way there, but not entirely. probably about 50% of the features I need, less on the arcane ones | |||
timotimo | ah, that sucks i guess | 12:32 | |
time for Inline::Perl5 ;) | |||
robertle | I guess to contribute would be to port more of the tests from the perl5 version and then fix them :) | ||
but I am just wondering what his thoughts on the thing are. perhaps there is a reason for not going down that route? | |||
12:35
softmoth left
|
|||
lizmat suggests lack of tuits | 12:38 | ||
El_Che | lizmat: you could be a house with tuits | 12:41 | |
lizmat | hehe... | 12:42 | |
but first some time afk& | |||
12:43
lizmat left
12:50
xtreak left
12:56
xtreak joined
13:00
lalitmee joined,
jmerelo left
13:02
lizmat joined,
athenot joined
13:03
vivus-ignis is now known as ignis__away
13:04
ignis__away is now known as vivus-ignis
13:15
lizmat_ joined
13:16
lizmat left
13:17
HaraldJoerg1 joined
13:18
HaraldJoerg left,
mcmillhj_ joined
13:21
itaipu joined
13:24
lizmat_ is now known as lizmat
13:31
Ven`` left
13:32
skids joined
13:33
mcmillhj left
13:36
lucasb joined
13:40
Ven`` joined
13:41
Ven`` left
13:42
softmoth joined
13:44
softmoth left
13:45
softmoth joined
13:48
xtreak left
13:51
kurahaupo left,
kurahaupo_ joined
13:52
mahafyi joined
14:01
FROGGS left
14:03
mcmillhj_ left
14:04
Ven`` joined,
Zoffix joined,
Zoffix left
14:07
mcmillhj joined
14:09
lizmat left
14:10
curan left
14:11
wamba joined
14:12
mcmillhj_ joined
14:13
Ven`` left
14:15
Ven`` joined
14:19
vivus-ignis is now known as ignis__away
14:20
lalitmee left
14:25
ignis__away is now known as vivus-ignis
14:27
shareable6 left
14:31
vivus-ignis left
14:32
molaf joined
14:34
xinming_ left
14:35
xinming joined
14:37
colomon joined
14:39
Actualeyes joined
14:40
kybr left
14:42
Guest66362 joined
|
|||
ufobat | timotimo, something new regarding my jit error? | 14:47 | |
14:49
scovit left
|
|||
MasterDuke | ufobat: you have a one-liner to repro it, right? | 14:59 | |
ufobat | yap | ||
perl6 -e 'use LibCurl::HTTP; my $url= "1.eu.dl.wireshark.org/src/wireshar...1.tar.xz"; my $http = LibCurl::HTTP.new( :ssl-verifypeer(False), :ssl-verifyhost(False) ); $http.GET($url).setopt(:!failonerror).perform.say' | 15:00 | ||
it just happens with "larger" http get requests | 15:01 | ||
MasterDuke | ufobat: which libcurl do you have? apparently i have to choose between openssl, nss, and gnutls | 15:04 | |
15:06
robertle left
|
|||
ufobat | installed on my ubuntu is libcurl3, libcurl3-gnutls and libcurl4-oepnssl-dev | 15:11 | |
15:16
atroxaper joined
15:17
HaraldJoerg joined,
raynold left
15:18
HaraldJoerg1 left
|
|||
MasterDuke | ufobat: i don't have any fixes, but i created github.com/MoarVM/MoarVM/issues/862 | 15:20 | |
ufobat | okay | 15:22 | |
15:22
Ven`` left
15:25
shareable6 joined
15:35
skids left
|
|||
mahafyi | hi. I am looking to update rakudo-star-2017.10 to 2018.04? Is there an uninstallation step, or a howto guide for this? I am using debian 9. | 15:37 | |
15:39
softmoth left,
softmoth joined
|
|||
mahafyi | is it sufficient to simple install the latest version in a folder and change the $PATH, then delete the older version src folder? | 15:39 | |
MasterDuke | mahafyi: how did you install 2017.10? from a repo? | 15:41 | |
15:42
Guest66362 left
|
|||
mahafyi | MasterDuke : no, i downloaded it and installed | 15:42 | |
perl6intro.com/#_installing_perl_6 | |||
from source | 15:43 | ||
then, i added "/opt/rakudo-star-2017.10/bin:/opt/rakudo-star-2017.10/share/perl6/site/bin" in $PATH | 15:44 | ||
MasterDuke | yeah, what you said earlier should work | 15:46 | |
huggable: debs | |||
huggable | MasterDuke, CentOS, Debian, Fedora and Ubuntu Rakudo packages: github.com/nxadm/rakudo-pkg/releases | ||
MasterDuke | there're also those ^^^ | ||
and i think 9 actually has a rakudo package (not sure if star) in their repos | 15:47 | ||
15:51
skids joined
|
|||
mahafyi | thanks | 15:53 | |
15:56
amalia___ left,
ExtraCrispy left
|
|||
raschipi | MasterDuke: There's no star in Debian | 15:57 | |
No zef either | |||
15:58
mcmillhj_ left
|
|||
MasterDuke | ah, thanks | 15:58 | |
16:00
sno left
16:02
SysPete joined
|
|||
buggable | New CPAN upload: Test-Declare-0.0.1.tar.gz by DARRENF cpan.metacpan.org/authors/id/D/DA/...0.1.tar.gz | 16:02 | |
16:02
SysPete left
|
|||
El_Che | mahafyi: ping me if you have question about the rakudo-pkg repos and packaged | 16:03 | |
if you use debian, centos, fedora, opensuse or ubuntu the easiest way is to use the repos | |||
you'll get updates automatically | |||
16:04
softmoth left,
AlexDaniel joined
|
|||
El_Che | rakudo-pkg has rakudo and zef installed and a few scripts to install zef as a user, set the path and use it in de windows sbsystem for linux | 16:04 | |
16:04
softmoth joined
|
|||
El_Che | mahafyi: github.com/nxadm/rakudo-pkg#os-repositories | 16:06 | |
in case you want to use rakudo star, get it from the main rakudo page and compile the source | 16:07 | ||
mahafyi | El-Che : thank you | 16:10 | |
16:10
mahafyi left,
mahafyi joined
16:13
skids left
|
|||
jkramer | Is there a shorter way of flattening an array of arrays than @x.flatmap(*.flat)? | 16:20 | |
timotimo | m: my @aoa = <hi bye>, <foo bar>, <a b c>; say @aoa.map(*.Slip).List; | 16:21 | |
camelia | (hi bye foo bar a b c) | ||
timotimo | m: my @aoa = <hi bye>, <foo bar>, <a b c>; say @aoa.map(*.Slip).List.perl; | ||
camelia | ("hi", "bye", "foo", "bar", "a", "b", "c") | ||
timotimo | m: my @aoa = <hi bye>, <foo bar>, <a b c>; say @aoa.map(*.Slip).perl; | ||
camelia | ("hi", "bye", "foo", "bar", "a", "b", "c").Seq | ||
timotimo | m: my @aoa = <hi bye>, <foo bar>, <a b c>; say @aoa>>.Slip.perl; | ||
camelia | (slip("hi", "bye"), slip("foo", "bar"), slip("a", "b", "c")) | ||
timotimo | OK, the map does the magic | ||
m: my @aoa = <hi bye>, <foo bar>, <a b c>; say @aoa>>.Slip.List.perl; | |||
camelia | (slip("hi", "bye"), slip("foo", "bar"), slip("a", "b", "c")) | ||
timotimo | yeah, i think the map(*.Slip) is the shortest | ||
m: my @aoa = <hi bye>, <foo bar>, <a b c>; say @aoa.map(&slip).perl; | 16:22 | ||
camelia | ("hi", "bye", "foo", "bar", "a", "b", "c").Seq | ||
timotimo | that's one character shorter | ||
jkramer | :D | ||
Nice, thanks | 16:23 | ||
m: my @aoa = <hi bye>, <foo bar>, <a b c>; say @aoa.map(|*).perl; | 16:24 | ||
camelia | ("hi", "bye", "foo", "bar", "a", "b", "c").Seq | ||
jkramer | Saved 3 more chars :) | ||
El_Che | the last one is nice | ||
Geth | ecosystem: darrenf++ created pull request #396: Add github.com/darrenf/p6-test-declare |
16:25 | |
16:25
raschipi left
|
|||
timotimo | ah, of course | 16:26 | |
16:26
skids joined
16:28
domidumont left
16:30
Zoffix joined
|
|||
Zoffix | m: my @aoa := <hi bye>, <foo bar>, <a b c>; dd @aoa.flat | 16:30 | |
camelia | ("hi", "bye", "foo", "bar", "a", "b", "c").Seq | ||
Zoffix | Don't make them arrays in the first place :) | ||
m: my @aoa = <hi bye>, <foo bar>, <a b c>; dd |«@aoa | 16:31 | ||
camelia | [("hi", "bye"), ("foo", "bar"), ("a", "b", "c")] | ||
Zoffix | Would've though this'd work | ||
16:32
raschipi joined
|
|||
Zoffix | m: &prefix:<|> does role { method nodal { }}; my @aoa = <a b c>, <d e f>, <g h i>; dd |«@aoa | 16:33 | |
camelia | (slip("a", "b", "c"), slip("d", "e", "f"), slip("g", "h", "i")) | ||
Zoffix | m: &prefix:<|> does role { method nodal { }}; my @aoa = <a b c>, <d e f>, <g h i>; dd flat |«@aoa | ||
camelia | ("a", "b", "c", "d", "e", "f", "g", "h", "i").Seq | ||
16:34
scimon left
|
|||
El_Che | throw a .list somewhere :) | 16:34 | |
Geth | ecosystem: 9a9109876c | (Darren Foreman)++ (committed by Zoffix Znet) | META.list Add github.com/darrenf/p6-test-declare (#396) `Test::Declare` is a rudimentary way to express test scenarios in a fairly declarative sense. Assuming I understand the word 'declarative' properly. |
||
Zoffix | m: my @aoa = <hi bye>, <foo bar>, <a b c>; dd @aoa».list.flat | 16:35 | |
camelia | ("hi", "bye", "foo", "bar", "a", "b", "c").Seq | ||
16:36
wamba left
|
|||
Zoffix | m: my @aoa = <hi bye>, <foo bar>, <a b c>; dd @aoa»<>.flat | 16:37 | |
camelia | ("hi", "bye", "foo", "bar", "a", "b", "c").Seq | ||
16:37
dakkar left
|
|||
Zoffix | .oO( rocket operator ) |
16:38 | |
TimToady | for a more general but longer solution: | 16:39 | |
yoleaux | 12:22Z <lizmat> TimToady: opinions about github.com/rakudo/rakudo/commit/8ae82a558b ? | ||
TimToady | m: my @aoa = <hi bye>, <foo bar>, <a b c>; say gather @aoa.deepmap(*.take) | ||
camelia | (hi bye foo bar a b c) | ||
TimToady | m: my @aoa = <hi bye>, <foo bar>, <a b c>; say gather @aoa».take | 16:40 | |
camelia | (hi bye foo bar a b c) | ||
TimToady | I guess that works too | ||
m: my @aoa = <hi bye>, <foo bar>, <a b c>; say (gather @aoa».take).perl | |||
camelia | ("hi", "bye", "foo", "bar", "a", "b", "c").Seq | ||
Zoffix | TimToady: the .take destroys Pair objects | 16:42 | |
um | |||
Yeah, Pairs of Hashes | |||
m: my @aoa = <hi bye>, <foo bar>, %(:42foo, :100bar); say (gather @aoa».take).perl | |||
camelia | ("hi", "bye", "foo", "bar", 100, 42).Seq | ||
Zoffix | m: my @aoa = <hi bye>, <foo bar>, %(:42foo, :100bar); dd @aoa»<>.flat | 16:43 | |
camelia | ("hi", "bye", "foo", "bar", :foo(42), :bar(100)).Seq | ||
Zoffix | but the rocket operator does more or less the Right Thing™ | ||
(the .take stuff isn't a bug, but a WAT side of the DWIM for hypering stuff over hashes): | 16:45 | ||
m: dd %(:42foo, :100bar)».flip | |||
camelia | Hash % = {:bar("001"), :foo("24")} | ||
16:46
raschipi left
|
|||
Zoffix | m: sub postfix:<🚀> { $^v»<> }; my @aoa = <hi bye>, <foo bar>, %(:42foo, :100bar); dd @aoa🚀.flat | 16:49 | |
camelia | ("hi", "bye", "foo", "bar", :bar(100), :foo(42)).Seq | ||
Zoffix | ^_^ | ||
El_Che | it doesn't take long for Zoffix to end with emojis | 16:50 | |
he never disappoints :) | |||
16:50
Guest629 joined
|
|||
TimToady wonders what emotion is indicated by a rocket... | 16:50 | ||
16:51
atroxaper left
|
|||
TimToady | imminent burnout, perhaps... | 16:52 | |
Zoffix | excitement | 16:54 | |
😺🌟😺🚀😻🖖🚀😸🚀 | 16:55 | ||
16:56
softmoth left,
Zoffix left
16:57
softmoth joined
16:58
Guest629 left,
vivus-ignis joined
16:59
softmoth left
17:00
softmoth joined
17:05
domidumont joined
17:06
raynold joined,
raynold left
|
|||
b2gills | .tell tyil The problem is actually that ~~ doesn't participate in WhateverCode lambdas see: stackoverflow.com/a/50395077/1337 | 17:07 | |
yoleaux | b2gills: I'll pass your message to tyil. | ||
b2gills | m: subset WalkCb of Callable where .signature ~~ :(Int $); my WalkCb $x = sub (Int $a) { return $a }; say $x(42) | ||
camelia | 42 | ||
17:07
raynold joined
|
|||
tyil | b2gills: I am missing context | 17:08 | |
yoleaux | 17:07Z <b2gills> tyil: The problem is actually that ~~ doesn't participate in WhateverCode lambdas see: stackoverflow.com/a/50395077/1337 | ||
tyil | b2gills: I don't recall having issues with this | 17:09 | |
17:11
mcmillhj_ joined
|
|||
b2gills | m: my &f = *.signature | 17:12 | |
camelia | ( no output ) | ||
b2gills | m: my &f = *.signature ~~ :(;; $); # not a lambda so it fails | ||
camelia | Type check failed in assignment to &f; expected Callable but got Bool (Bool::False) in block <unit> at <tmp> line 1 |
||
b2gills | m: say *.signature ~~ :(;; $ is raw); # not a lambda so it fails | 17:14 | |
camelia | False | ||
b2gills | m: say [*.signature][0].signature ~~ :(;; $ is raw); | 17:17 | |
camelia | True | ||
17:22
mcmillhj_ left
17:23
mahafyi left
17:27
enheh joined
17:48
lichtkind joined
17:51
Zoffix joined
|
|||
Zoffix | Look what I got in mail: i.imgur.com/xT2LSW4.jpg | 17:51 | |
Zoffix collects a 100 nerd points, reaching a new level | |||
17:52
lucasb left
17:53
vivus-ignis is now known as ignis__away
|
|||
Juerd | Zoffix: Nice! | 17:53 | |
Zoffix | :) | 17:55 | |
TimToady | I hope that's a non-breaking space... | 17:58 | |
Zoffix | :D | ||
MasterDuke | cool | 17:59 | |
18:07
cpup joined
|
|||
El_Che | Zoffix: Oh, did we forget to tell you about the renamingM | 18:09 | |
M | |||
? | 18:10 | ||
Zoffix | I can always order another set of plates :P | ||
And it's not a rename, it's a creation of alias :) | |||
El_Che | Yeah, everyone know Carlos the Jackal by his real name Ilich Ramírez Sánchez | 18:11 | |
great geeky plates by the way | 18:13 | ||
18:13
[particle] left,
[particle] joined
18:17
pilne joined
|
|||
TimToady | Our tiobe index might go up if we renamed it "Trump"... | 18:19 | |
18:20
sauvin left,
ignis__away is now known as vivus-ignis
18:21
comborico1611 joined
|
|||
El_Che | tiobe index will go up if you rename it BlockChain6 | 18:21 | |
timotimo | TimToady: i imagine if we called it "TV" there'd be loads and loads of "tv programming" searches and results | 18:22 | |
18:23
wamba joined
|
|||
El_Che | lol | 18:25 | |
Zoffix | rofl | 18:26 | |
18:26
jmerelo joined
18:31
mcmillhj_ joined
|
|||
jmerelo | O/ | 18:31 | |
Kaiepi | \o | ||
18:32
cpup left
18:34
shareable6 left,
FROGGS joined
18:35
domidumont left
18:41
lizmat joined
18:48
vivus-ignis is now known as ignis__away
18:58
darutoko left
|
|||
jmerelo | A new question to stackoverflow, just in cae you can help stackoverflow.com/questions/503987...tion-calls | 18:58 | |
18:59
sno joined
|
|||
Geth | doc: 27b3eb7044 | (JJ Merelo)++ | doc/Language/contexts.pod6 Adds indexing for contexts |
19:09 | |
synopsebot | Link: doc.perl6.org/language/contexts | ||
19:10
colomon left
19:20
FROGGS left
19:21
ignis__away is now known as vivus-ignis
19:27
jmerelo left,
shareable6 joined,
ChanServ sets mode: +v shareable6
19:29
Guest26896 joined,
Guest26896 left
19:31
aindilis left,
aindilis joined
|
|||
ingy | can someone tell me how to do a string replace ($x ~~ s///) where rhs is a function? | 19:49 | |
ingy is glad laziness is a virtue here... | 19:50 | ||
moritz | m: $x = 42; $x ~~ s[\d+] = 2 * $/; say $x | 19:51 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$x' is not declared at <tmp>:1 ------> 3<BOL>7⏏5$x = 42; $x ~~ s[\d+] = 2 * $/; say $x |
||
moritz | m: my $x = 42; $x ~~ s[\d+] = 2 * $/; say $x | ||
camelia | 84 | ||
moritz | ingy: ^^ | ||
Zoffix | m: my $x = 42; say $x.subst: /\d+/, 2 * * | ||
camelia | 84 | ||
ingy | docs.perl6.org/routine/subst ? | ||
moritz | using a method when you could have used syntax is a boring cheat :-) | 19:52 | |
Zoffix | ingy: that's the method form of the op, yeah. The op is also available. Documented here: docs.perl6.org/syntax/s$SOLIDUS$SOLIDUS$SOLIDUS | ||
ingy | moritz: can that usage use a set of statements? | ||
Zoffix | ingy: you can use do {} | 19:53 | |
ingy | cool | ||
moritz: agreed | |||
19:53
cpup joined
|
|||
Zoffix | m: my $x = 42; $x ~~ s/\d+/{say "Looks like you want me to work with $0"; $0 × 2}/; say $x | 19:53 | |
camelia | Use of Nil in string context Looks like you want me to work with 0 in block at <tmp> line 1 Use of Nil in numeric context in block at <tmp> line 1 |
||
Zoffix | m: my $x = 42; $x ~~ s/\d+/{say "Looks like you want me to work with $/"; $/ × 2}/; say $x | 19:54 | |
camelia | Looks like you want me to work with 42 84 |
||
19:54
molaf left
|
|||
ingy | :) | 19:54 | |
Zoffix | m: my $x = "42 by 3"; $x ~~ s/(\d+).+(\d+)/{say "Looks like you want me work with $0 and $1"; $0 × $1}/; say $x | ||
camelia | Looks like you want me work with 42 and 3 126 |
||
ingy | how do I match [\-\w] in p6? | 20:04 | |
20:07
sno left
|
|||
ingy | ie p5 /[\-\w]/ to p6 | 20:07 | |
20:08
sno joined
|
|||
rjbs | eval: ("fo-o bar" ~~ /(\w | "-")+/).gist.say | 20:09 | |
evalable6 | 「fo-o」 0 => 「f」 0 => 「o」 0 => 「-」 0 => 「o」 |
||
rjbs | probably there's a better way | ||
ingy | rjbs: thanks. I agree but in a hurry... | 20:11 | |
rjbs: do you happen to know how to make it non-capturing? | 20:12 | ||
MasterDuke | [] are non-capturing groups | ||
rjbs | eval: ("fo-o bar" ~~ /[\w|"-"]+/).gist.say | 20:13 | |
evalable6 | 「fo-o」 | ||
ingy | well that's a mindf**k! | ||
rjbs | MasterDuke: thanks :) | ||
20:14
vivus-ignis is now known as ignis__away
|
|||
ingy | mostly like regexes except for the rest of the time :) | 20:14 | |
MasterDuke | m: say "fo-o bar" ~~ /<[-\w]>+/ | ||
camelia | 「fo-o」 | ||
ingy | MasterDuke: thanks. and thanks for forking my mind | ||
MasterDuke | np | ||
20:15
ignis__away is now known as vivus-ignis,
cpup left
|
|||
ingy | s:g/// messes up my vim hilighting | 20:17 | |
s:g/// #: fixes it | |||
20:20
[particle] left
|
|||
lizmat | decommute& | 20:23 | |
20:23
lizmat left
20:32
mcmillhj_ left
20:36
cpup joined
20:37
lucasb joined
|
|||
rindolf | ingy: hi, sup? | 20:43 | |
20:45
cpup left
|
|||
rindolf | ingy: did you see github.com/ingydotnet/spork-pm/issues/1 ? | 20:45 | |
ingy | rindolf: at my current rate, one of my digital grandchildren will get to that circa 2112 AD | 20:48 | |
rindolf | ingy: ah :| | 20:49 | |
20:54
sno left
21:00
kurahaupo_ left,
mcmillhj_ joined,
kurahaupo joined,
softmoth left
21:05
aindilis left
|
|||
Zoffix | Got my plates registered to may car and attached :) | 21:07 | |
I now officially own the coolest car in town: temp.perl6.party/perl6mobile-1.jpg | |||
:D :D :D | |||
(though I think I'll get better plate frames; these are too thick and get too close to the "♥" and the "6") | 21:08 | ||
AlexDaniel | this is awesome | ||
MasterDuke | i've heard good things about the civic si, do you like it? | 21:09 | |
Zoffix | I love it | ||
It's standard transmission and got a turbo. | 21:10 | ||
MasterDuke | oh, i thought they were NA. when did they start coming with a turbo? | 21:11 | |
Zoffix | Looks like since 2017 | ||
MasterDuke | i do like turbos though, my car is also standard and has a turbo (a WRX) | ||
Zoffix | (mine's 2018, but no changes from 2017 model) | ||
I like the sucking sound from the turbo when you release the throttle :) | |||
Or the spinning down sound. Whatever that sound is it's cool :) | 21:12 | ||
21:12
aindilis joined
|
|||
bartolin | indeed, very nice | 21:12 | |
21:15
squashable6 left,
reportable6 left,
statisfiable6 left,
unicodable6 left,
nativecallable6 left,
yoleaux left,
yoleaux joined,
ChanServ sets mode: +v yoleaux,
nativecallable6 joined,
unicodable6 joined,
statisfiable6 joined,
reportable6 joined,
squashable6 joined,
committable6 left
21:16
undersightable6 left
21:17
mcmillhj_ left
21:18
mcmillhj left
|
|||
lucasb | nice ride :) | 21:18 | |
21:19
mcmillhj joined
|
|||
tbrowder_ | Perl 6 on the town on fancy wheels! | 21:22 | |
21:22
vivus-ignis left
|
|||
timotimo | how do we do gaussian distributions in perl6? | 21:22 | |
21:23
vivus-ignis joined
|
|||
timotimo | rosettacode has my back | 21:24 | |
21:24
mcmillhj left
21:28
skids left,
jaush joined
21:29
sno joined
21:30
vivus-ignis left,
jaush left
21:32
thundergnat joined
21:34
espadrine_ joined
|
|||
thundergnat | Hey, I've been testing Rakudo HEAD against modules to find breakage before the release and I keep getting test failures from HTTP::UserAgent | 21:34 | |
Has anyone else tried installing that on a recent commit and succeeded? | 21:35 | ||
It _looks_ like it may be hash oder related, but I may just be overly sensitive. | |||
timotimo | did you look at the toaster results from the other day? | 21:36 | |
thundergnat | gist of the test failure: gist.github.com/thundergnat/13f731...661cb6226f | 21:37 | |
I didn't show up in the toaster run, but that doesn't necessarily mean it was good, just that it didn't fail then. | |||
*It | 21:38 | ||
retupmoca | do non-CPAN module updates get pulled into p6weekly automatically? | ||
thundergnat: looks like github.com/sergot/http-useragent/issues/197 | |||
thundergnat | retupmoca: Indeed. | 21:39 | |
Ok, aready noted. | |||
gah. already | 21:40 | ||
21:44
ChoHag joined
21:46
mcmillhj joined
21:49
ChoHag left
21:51
mcmillhj left
|
|||
comborico1611 | What does the 20 in 2018.20 mean on P6Weekly? | 21:52 | |
20th week? | |||
thundergnat | Hmm. Looks like the only problem with HTTP::UserAgent is some test routines need to change from is() to is-deeply(). | 21:56 | |
22:03
enheh left
|
|||
Zoffix | comborico1611: yes | 22:03 | |
22:03
enheh joined
|
|||
Zoffix | clear plate frames much better: i.imgur.com/Y2AmBYv.jpg | 22:03 | |
timotimo | i rewrote that gradient descent example where python, numpy, and nim are compared | 22:04 | |
it's not terribly fast | |||
Zoffix | timotimo: how much slower are we? | ||
timotimo | the fastest i could get it so far is 15s for 1000, whereas python does it in 35 seconds (comparing my machine against the blog author's machine, though, so that could be off, too) | ||
i'm sure there's a bit more to be gained by cleverly putting nqp ops in there. my first attempt to make the inner loops nqp::while loops made it about 75% slower instead | 22:05 | ||
gist.github.com/timo/2c0962ddb7e18...f59c9f1ab0 | |||
wanna give it a go? | |||
Zoffix | I'm on my phone | 22:06 | |
timotimo: 15s vs 35? that makes it faster than python | |||
15m? | |||
timotimo | oh | ||
sorry, that's for 1/10th the workload | |||
Zoffix | ah | ||
timotimo | so it'd be 150s vs 35s | ||
Zoffix | m: say 150/35 | 22:07 | |
camelia | 4.285714 | ||
Zoffix | not horribly bad :) | ||
timotimo | the absolutely naive version was almost 2x slower than what i made it with nqp ops | ||
so about 8.5x slower | 22:08 | ||
could be worse | |||
OK, on my machine it's 39.7 seconds | 22:10 | ||
so the factor isn't as bad | |||
22:10
rindolf left
|
|||
timotimo | also, the result seems to be wrong? | 22:11 | |
thundergnat | seen sergot | ||
.seen sergot | |||
yoleaux | I saw sergot 14 Mar 2018 21:46Z in #perl6: <sergot> ufobat_: ping | ||
22:12
dct joined
22:13
committable6 joined
|
|||
timotimo | there's a repository with the code in it so you don't have to copypaste the bits together | 22:13 | |
22:13
undersightable6 joined
|
|||
timotimo | github.com/henryiii/framework_comp...regression | 22:13 | |
OK, the code from that library (purepython.py) gives me not only the right results, but also just 30 seconds instead of 35. or maybe that's the difference between py2 and py3? | 22:14 | ||
22:14
mcmillhj joined
|
|||
timotimo | yup, that's what was wrong | 22:15 | |
maybe it was doing int division somewhere or so | |||
comborico1611 | zoffix: Thanks! | 22:16 | |
22:20
mcmillhj left
|
|||
comborico1611 | Does rakudo.org Debian prereq "libssl-dev" look like "libss1-dev", or is that just me? | 22:22 | |
22:28
mcmillhj joined
|
|||
Zoffix | copy-paste it somewhere with different font / or eq it | 22:30 | |
timotimo | Zoffix: should i look forward to your improvement, or are you leaving this one be? :) | ||
El_Che | comborico1611: what do you mean? | ||
comborico1611 | Yeah, I found out it was "L" after command not working, but wanted to say something for folks more newb than myself being confused by that. | ||
El_Che | ah the font? | 22:31 | |
comborico1611 | El_Che: in "libssl" the second "L" looks bigger or different on my screen. | ||
Gives the impression of a "1". | |||
timotimo | hm, ligatures? | ||
comborico1611 | Are you talking to me? | 22:32 | |
El_Che | :) | ||
22:33
dct left,
mcmillhj left
|
|||
comborico1611 is installing Rakudo 2018.04 for the first time, which is his 5th time to install using tar. So good newb feedback possible. | 22:33 | ||
One thing I didn't understand about the make test for Rakudo... There were some failures on my system, but it didn't seem to matter. | 22:36 | ||
...previously. | |||
El_Che | some tests are sadly enough floppers | ||
they fails once in a while | |||
comborico1611 | So it just seems as if the testing is not important. | 22:37 | |
Does failing some test actually stop the installation? | |||
El_Che | the testing is to make sure everthing is ok | ||
it does not change the installation | |||
comborico1611 | I see. | 22:38 | |
Thanks! | |||
El_Che | (my packages always have all tests passing, if one fail, I run the build again. if it keeps falling, I check with the devs) | ||
comborico1611 | Interesting! | ||
That's good to know. I'm just a budding 6er, so it's not crucial for me. But now I wish I did the tests -- just to see what the results were. | 22:40 | ||
El_Che | most of the time they are ok | ||
there are only a few that a | 22:41 | ||
lay fail 1/10 or less | |||
comborico1611 | Maybe one day my name will be on one of these lines for the Rakudo installation. Rakudo 2020 or something. Haha. | 22:42 | |
El_Che | there are lots of low hanging fruit | 22:43 | |
comborico1611 | Actually, I forgot, its 2018... So 2030. | ||
Interesting! | |||
22:43
mcmillhj joined
|
|||
El_Che | comborico1611: if you want to see failing tests, have a look at travis builds of rakudo-pkg travis-ci.org/nxadm/rakudo-pkg/builds | 22:44 | |
comborico1611 | Installed. About 20 minutes. | 22:45 | |
Maybe 15. | |||
Now I need to remember how I get the PATH thing going... Good thing I've done this recently. | 22:46 | ||
El_Che | export PATH=/the/place/where/you/installed/rakudo/bin:$PATH | ||
comborico1611 | Thanks! | 22:47 | |
I put it in my .profile file... | |||
I don't know if that's bad, but its the only place I know where to put it. | |||
22:49
mcmillhj left
|
|||
El_Che | the .profile is the right place for lots of shells | 22:49 | |
bash, sh, korn, etc | |||
in case you forget: github.com/nxadm/rakudo-pkg/blob/m...l6-to-path (replace the rakudo-pkg paths with the ones from your installation) | 22:53 | ||
22:53
HaraldJoerg left
|
|||
Zoffix | timotimo: leaving to be :) | 22:54 | |
comborico1611 | Thanks! Yup I think I got it going. I just need to restart the system to see if it took. | ||
22:55
softmoth joined,
raschipi joined
|
|||
El_Che | comborico1611: source .profile | 22:57 | |
comborico1611 | El_Che: Huh? | ||
is that a bash commnd? | |||
raschipi | yes | ||
it's so common there's a shortcut for it: "." | 22:58 | ||
comborico1611 | Ahh! Very good. (I need to get a book on Bash.) | ||
Ahh again! | |||
./ | |||
Yup! It is up and running. | 22:59 | ||
lucasb | type us a "perl6 -v" | 23:00 | |
23:01
mcmillhj joined
|
|||
comborico1611 | lucasb: This is Rakudo Star version 2018.04.1 | 23:02 | |
El_Che | going to bd | ||
bye! | |||
comborico1611 | Thanks for help! | ||
Goodnight. | 23:03 | ||
timotimo | oh, rakudo presents itself as actually rakudo star if you've got a star installed? | ||
lucasb | timotimo: I was intrigued by that too | ||
comborico1611 | This is Rakudo Star version 2018.04.1 built on MoarVM version 2018.04.1 | ||
implementing Perl 6.c. | |||
lucasb | that is strange. does the star distribution patches rakudo sources? :) | 23:06 | |
23:06
imcsk8 left
|
|||
lucasb | funny thing is, there isn't a Rakudo Star version 2018.04.1 | 23:06 | |
tarball name is rakudo-star-2018.04.tar.gz | 23:07 | ||
23:07
mcmillhj left
23:08
MasterDuke left
23:09
MasterDuke joined
|
|||
comborico1611 | Okay, so what's going on here? hastebin.com/ocemufupuv.pl | 23:10 | |
timotimo | true, that's the rakudo version, which is a little weird | ||
comborico1611: In Perl 6, please use "elsif' instead of "else if" | |||
comborico1611 | I did use "elseif". | 23:11 | |
timotimo | there's a bug in there, too | ||
it's supposed to say "instead of elseif" | |||
23:11
wamba left
23:13
imcsk8 joined,
zachk joined
|
|||
timotimo | i see where it went wrong | 23:13 | |
comborico1611 | OHH. ELSif... Weird. Okay. | 23:14 | |
23:14
zachk left,
zachk joined
23:23
mcmillhj joined
23:27
mcmillhj_ joined
23:28
mcmillhj left
23:31
zachk left,
zachk joined
23:33
aindilis left
23:34
aindilis joined
23:39
mcmillhj joined
|
|||
MasterDuke | timotimo: for your grad descent code a profile shows lots of time in AT-POS, but that it isn't being inlined. i turned on the inline log and there are three identical entries `Can inline AT-POS (5755) with bytecode size 88 into (4)` | 23:40 | |
timotimo | i rewrote the postcircumfix:<[ ]> into AT-POS and it didn't make things faster. in fact, it made it significantly slower instead | ||
MasterDuke | that...doesn't make sense? | 23:42 | |
timotimo | it can | ||
it didn't look like it prevented jitting, which was what i first suspected | |||
hm, perhaps time will show that it's wasting lots of time in spesh? | |||
i.e. OSR not working like i found in that other case | |||
23:44
mcmillhj left
|
|||
MasterDuke | 114.87ms in dynamic optimization (unmodified from your gist) | 23:44 | |
just turned the AT-POS in to [] and now the log says `can inline AT-POS into postcircumfix:<[]>` and then `can inline postcircumfix:<[]> into ` | 23:45 | ||
timotimo | oh, wait, what i had there was already with at-pos? hm. | ||
not sure what exactly i saw | |||
comborico1611 enters VIM for the second time in history. First time was like 17 years ago. First command :e ~/perl6/caesar-cipher.p6. Eww ahh -- colorful! | 23:47 | ||
timotimo | :syn off :) | ||
comborico1611 | Have a good evening! | 23:48 | |
timotimo | same to you | ||
comborico1611 | Oh, i will. Going to feed the chickens soon. It was so hot today. It will be nice playing with my dog in a bit. | 23:49 | |
timotimo | it's nice of you to play with your dog before you feed him to the chickens | 23:50 | |
wait did i misunderstand? | |||
comborico1611 | Heh | 23:53 | |
23:53
labster joined
23:54
mcmillhj joined
|
|||
lucasb | m: multi f($) {}; f(Mu) # ok, cannot resolve | 23:57 | |
camelia | Cannot resolve caller f(Mu); none of these signatures match: ($) in block <unit> at <tmp> line 1 |
||
Geth | doc: briandfoy++ created pull request #2029: Fix a pod directive in .comb |
||
23:59
mcmillhj left
|
|||
lucasb | m: proto f($) {}; multi f($) {}; f(Mu) | 23:59 | |
camelia | Type check failed in binding to parameter '<anon>'; expected Any but got Mu (Mu) in sub f at <tmp> line 1 in block <unit> at <tmp> line 1 |