»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:01
pyrimidine joined
00:05
pyrimidine left
00:06
Cabanossi left
00:08
Cabanossi joined
00:10
jp_ left
00:14
cdg joined
00:17
cdg_ left
00:19
cdg left
00:27
wamba left
00:32
agentzh joined
00:37
pyrimidine joined
00:44
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:46
dugword joined,
ocbtec left
|
|||
Geth | oc: 29295940fe | (Will "Coke" Coleda)++ | 2 files Don't generate .png typegraph files |
00:47 | |
oc: 525e94eec1 | (Will Coleda)++ | 2 files Merge pull request #1131 from perl6/coke/pngless Don't generate .png typegraph files |
|||
00:51
dugword left,
cyphase left
00:56
cyphase joined
|
|||
Geth | oc: antquinonez++ created pull request #1171: added line breaks to grammar_tutorial |
00:57 | |
01:04
bpmedley joined
01:06
astj joined
01:11
astj left,
agentzh left,
cdg joined
01:12
LeCamarade joined,
LeCamarade left
|
|||
Geth | oc/master: 4 commits pushed by Altai-man++ | 01:12 | |
01:13
astj joined,
LeCamarade joined
01:15
sena_kun left
01:19
LeCamarade left
01:25
kyan left
01:33
labster left
01:40
agentzh joined
|
|||
brokenchicken | wtf.. travis just emailed me about a failed build... of a commit from JAN 19! | 01:40 | |
cale2 | So "grep" is perl's version of "filter" | 01:41 | |
I was wondering for the longest time why there was no filter | |||
brokenchicken | .oO( must've been delayed by Donald's administration... ) |
||
cale2 | as someone that doesn't have a background in unix admin stuff, that's something I found confusing | 01:43 | |
brokenchicken | Filter's a strange name since you're doing the opposite. | 01:44 | |
01:47
espadrine_ left
|
|||
cale2 | `'`'`'`'`'` filter onlySingleQuotes ''''' | 01:47 | |
Just depends on how you write your filtering function | |||
01:48
BenGoldberg joined
|
|||
cale2 | Like you're filtering out the bad stuff | 01:48 | |
where does "grep" even come from? | |||
"get representation" | |||
BenGoldberg | global regular expression print | 01:49 | |
cale2 | Is grep just one of those things that you'd never think to change? Because it's so loved and gives warm fuzzy feelings, etc | 01:50 | |
BenGoldberg | Perl has always had a grep builtin... | 01:51 | |
cale2 | Just wondering how many things are in the language because "it's always been that way" | 01:52 | |
BenGoldberg | You could of course add some sort of alias, like "filter", but most programmers are used to the name grep. | ||
cale2 | I guess P6 isn't necessarily about starting completely over. More like revolution rather than evolution | 01:53 | |
or the other way around haha | |||
BenGoldberg | The *feature* grep is important, the *name* grep slightly less so. Removing that feature entirely would be stupid. | ||
Renameing it, while possible, is kinda pointless. | |||
02:01
mst joined
02:02
mst left,
mst joined
|
|||
masak | TimToady: sorry about the miscategorization of your hat. can I call it an "Aussie hat" next time? :) | 02:06 | |
02:06
user__ joined
|
|||
masak | TimToady: any thoughts on BEGIN firing per expansion? do you mind the semi-consensus that emerged yesterday (that it does)? | 02:06 | |
another thing that pushed me in that direction was: we don't mind at all that END fires per expansion. | 02:07 | ||
02:09
kalkin- left
|
|||
brokenchicken | What's an expansion? | 02:12 | |
masak | brokenchicken: it's when code returned from a macro gets put in the code where the macro call was. | 02:13 | |
brokenchicken | Ah | ||
masak | it's an old Lisp term. | 02:15 | |
little bit misleading, since the result can be smaller, bigger, the same size or even divergent | 02:16 | ||
brokenchicken | No, makes sense to me :) | 02:18 | |
cale2 | the new rakudo star release says advanced macros aren't implemented yet. what does that mean exactly? | ||
masak | TimToady: also, there are two kinds of consistency at odds here for quasis with BEGIN blocks without unquotes. they could fire ASAP (once) or per expansion. | ||
cale2 | simple macros work, but advanced ones dont? | 02:19 | |
masak | cale2: there's no short answer. but somewhat simply, I wouldn't want to use the macros that are implemented so far. | ||
cale2: if you're *really* interested in Perl 6 macros, then the development of 007 is worth paying attention to. | |||
it has some cutting-edge insights into macros and slangs that sometimes leak over into this channel. | 02:20 | ||
implementation of all those new things will commence in Rakudo at some point. don't know exactly when. | |||
cale2: "advanced macros" are based off something called the Qtree. it's an AST structure for the program. | 02:21 | ||
02:21
cdg left
|
|||
cale2 | Is it basically Racket macros in perl6? | 02:22 | |
02:28
travis-ci joined
|
|||
travis-ci | Doc build errored. Will Coleda 'Merge pull request #1131 from perl6/coke/pngless | 02:28 | |
travis-ci.org/perl6/doc/builds/196794815 github.com/perl6/doc/compare/c17ac...5e94eec1d5 | |||
02:28
travis-ci left
02:30
lostinfog left
|
|||
brokenchicken | hmmm... moar configure failed :/ | 02:35 | |
02:35
Cabanossi left
|
|||
brokenchicken | don't really say why | 02:36 | |
Ahhh git error: fatal: unable to access 'github.com/libuv/libuv.git/': Failed connect to github.com:443; Connection timed out | |||
samcv | :\ | ||
02:37
LeCamarade joined,
Cabanossi joined
02:40
_28_ria left
02:41
hartenfels joined
02:42
_28_ria joined,
gregf_ left
02:45
MasterDuke joined
02:46
dugword joined
02:47
travis-ci joined
|
|||
travis-ci | Doc build errored. Altai-man 'Merge pull request #1165 from Altai-man/comments | 02:47 | |
travis-ci.org/perl6/doc/builds/196797707 github.com/perl6/doc/compare/525e9...efe96978ce | |||
02:47
travis-ci left
02:54
_28_ria left
02:56
_28_ria joined
02:58
LeCamarade left,
LeCamarade joined
03:06
Cabanossi left
03:08
Cabanossi joined
03:16
cibs left
03:18
cibs joined
03:19
agentzh left
03:20
dugword left
03:21
dugword joined
03:29
xtreak joined
03:32
LeCamarade left
03:34
LeCamarade joined
03:35
avuserow left
03:37
avuserow joined
03:39
noganex_ joined
03:43
noganex left
03:48
cdg joined
03:51
cale2 left
03:59
xtreak_ joined
04:01
xtreak left,
xtreak joined
04:02
Cabanoss- joined
04:04
xtreak_ left
04:05
solarbunny left
04:06
Cabanossi left,
Cabanoss- is now known as Cabanossi
04:12
solarbunny joined
04:18
LeCamarade left
04:20
itcharlie1 joined
|
|||
brokenchicken | POTATO! | 04:29 | |
04:32
khw left
04:36
BenGoldberg left
04:48
dugword left
04:53
_28_ria left
04:55
_28_ria joined
04:56
itcharlie1 left
04:57
dugword joined
05:00
Cabanoss- joined
05:02
agentzh joined,
cdg left
05:03
Cabanossi left,
Cabanoss- is now known as Cabanossi
05:05
Vynce left
05:27
astj left
05:30
labster joined
|
|||
samcv | brokenchicken, what's the best way to create all possible orderings of an array? | 05:32 | |
m: my @a = 1,2,3; @a.op # (1,2,3), (1,3,2), (3,2,1), (3,1,2) etc | 05:33 | ||
camelia | rakudo-moar 3e28b1: OUTPUT«No such method 'op' for invocant of type 'Array' in block <unit> at <tmp> line 1» | ||
masak | cale2: re "grep" -- I feel your confusion, FWIW. | 05:37 | |
cale2: I had that function/method as "grep" in 007 for a long while too, until I took a fresh look at it and decided that the name doesn't make sense unless you have a very specific (Unix-y) history. | 05:38 | ||
"filter" ain't perfect, no, but it's probably the least bad among the various contenders. | |||
samcv | a Grep is a goblin like creature | 05:39 | |
well that's what the name sounds like at least | |||
masak, any clue how to generate all possible orders of a list in p6? | |||
masak | my s/grep/filter/ commit at the time explains my reasoning: github.com/masak/007/commit/9097ba...1438bb9b77 | 05:40 | |
samcv: I believe that's a built-in these days | |||
m: say [1, 2, 3].permutations.perl | |||
camelia | rakudo-moar 3e28b1: OUTPUT«((1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1)).Seq» | ||
samcv | nice | 05:41 | |
masak | yeah, we're nice that way | ||
samcv | prolly gonna use that for my bitfield packing | ||
masak | Perl 6 no longer has the problem that there are too *few* built-ins :P | ||
I think sometimes we're slightly bad at holding back and looking for that wonderful generalization that could reduce the built-ins a tad more | 05:42 | ||
perhaps that's an inevitable consequence of the community having as much steerage as it does | |||
samcv | i think that's the most trivial way to do it. since it's much easier to write a function to compute how items in a bitfield will be padded than to write something to try and find the best possible ordering programmatically | ||
heh | |||
masak | also, I happened to see the .kxxv method name the other day, and was reminded how I wanted to institute an "ugliest built-in name ever" prize :P | 05:43 | |
05:43
agentzh left
|
|||
masak | (no, I don't have a better suggestion) | 05:43 | |
samcv | heh | ||
TEttinger | yay bitfields | 05:45 | |
is this for unicode stuff, samcv? | 05:46 | ||
samcv | yea | ||
05:50
agentzh joined
05:52
Vynce joined
05:55
_28_ria left
05:58
_28_ria joined,
CIAvash joined
|
|||
Geth | oc: antquinonez++ created pull request #1172: edits to exceptions pod |
06:20 | |
06:21
dugword left
06:25
bjz joined
06:29
agentzh left
06:31
agentzh joined
06:32
domidumont joined
06:35
hartenfels1 joined
06:36
bjz left
06:37
hartenfels left,
hartenfels1 is now known as hartenfels
06:38
domidumont left,
domidumont joined
06:40
domidumont left
06:41
jraglin left
06:44
agentzh left
06:52
RabidGravy joined,
xtreak left
06:53
travis-ci joined
|
|||
travis-ci | Doc build passed. Antonio Quinonez 'edits to exceptions pod' | 06:53 | |
travis-ci.org/antquinonez/doc/builds/196846373 github.com/antquinonez/doc/commit/bd26cbe7509b | |||
06:53
travis-ci left
06:55
xtreak joined
|
|||
masak | m: macro swap($a, $b) { quasi { ({{{$a}}}, {{{$b}}}) = {{{$b}}}, {{{$a}}} } }; my $w = 5; my $z = 10; swap $w, $z; say [$w, $z].perl | 07:00 | |
camelia | rakudo-moar 3e28b1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Use of macros is experimental; please 'use experimental :macros'at <tmp>:1------> 3macro7⏏5 swap($a, $b) { quasi { ({{{$a}}}, {{{$b» | ||
07:00
domidumont joined
|
|||
masak | m:use experimental :macros; macro swap($a, $b) { quasi { ({{{$a}}}, {{{$b}}}) = {{{$b}}}, {{{$a}}} } }; my $w = 5; my $z = 10; swap $w, $z; say [$w, $z].perl | 07:00 | |
m: use experimental :macros; macro swap($a, $b) { quasi { ({{{$a}}}, {{{$b}}}) = {{{$b}}}, {{{$a}}} } }; my $w = 5; my $z = 10; swap $w, $z; say [$w, $z].perl | 07:01 | ||
camelia | rakudo-moar 3e28b1: OUTPUT«[10, 5]» | ||
masak | \o/ | ||
07:04
aborazmeh left
|
|||
masak tried the corresponding macro in 007, and found a bug :P | 07:06 | ||
07:12
wamba joined
07:15
hchienjo joined
07:16
hchienjo left
07:17
jraglin joined
07:18
vendethiel left
07:20
darutoko joined
07:25
mr-foobar left
07:27
domidumont left
07:31
mr-foobar joined
07:35
domidumont joined
07:36
mr-foobar left
07:37
agentzh joined
07:47
agentzh left
07:48
e1 joined
|
|||
samcv | masak, i want to use a macro to simplify this: | 07:57 | |
macro dump($a) { $a.VAR.^name ~ $a.gist } | |||
i try this and i get "Too few positionals passed; expected 3 arguments but got 2" | |||
masak | m: my $a = [1, 2, 3]; say :$a.perl | 07:58 | |
camelia | rakudo-moar 3e28b1: OUTPUT«:a($[1, 2, 3])» | ||
masak | :) | ||
samcv | that doesn't answer my question | ||
masak | agreed | ||
samcv | tho :\ | ||
masak | I notice that your macro doesn't have a quasi | 07:59 | |
samcv | i know .perl, but i am doing some custom dumping, and want to macro it | ||
samcv has no clue what quasi does | |||
masak | they are the thing you put your generated code in | ||
otherwise the code just ends up running as part of the macro call | |||
samcv | m: macro dump($a) { quasi { $a.VAR.^name ~ $a.gist } }; my $var = 'test'; say dump($var) | ||
camelia | rakudo-moar 3e28b1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Use of macros is experimental; please 'use experimental :macros'at <tmp>:1------> 3macro7⏏5 dump($a) { quasi { $a.VAR.^name ~ $a.gi» | ||
samcv | m: use experimental :macros; macro dump($a) { quasi { $a.VAR.^name ~ $a.gist } }; my $var = 'test'; say dump($var) | 08:00 | |
camelia | rakudo-moar 3e28b1: OUTPUT«ScalarAST.new» | ||
samcv | :\ | ||
what's the closest to c's #define ? | |||
i literally only need verbatim insertion | |||
masak | m: use experimental :macros; macro dump($x) { quasi { say VAR({{{$x}}}).name, ": ", {{{$x}}}.perl } }; my $foo = "OH HAI"; dump($foo) | ||
camelia | rakudo-moar 3e28b1: OUTPUT«$foo: "OH HAI"» | ||
masak | there ya go | 08:01 | |
samcv | so many {{{}}} | ||
08:01
bwisti left
|
|||
masak | feel free to write it in any other way that works | 08:01 | |
samcv | what works ;P | ||
TimToady | masak: the consensus view seems fine to me | ||
samcv | ? | ||
masak | also, you're welcome ;) | ||
TimToady: cool | |||
geekosaur | samcv, quasi "quotes" code for later evaluation (at run time); {{{ }}} is what "unquotes" stuff to be substituted into the quoted code | 08:02 | |
masak | samcv: you're not the first person to complain about the {{{ }}} | ||
samcv: there's a lighter syntax being thrown around in 007 (though NYI): `unquote(...)` | |||
samcv | can we have a 'define'? | 08:03 | |
geekosaur | in common lisp, quasi is `() and {{ }}} is ,@ or , depending on whether lists are to be "flattened" or not (respectively) | ||
samcv | that can do less fancy things? | ||
masak | samcv: no :) | ||
samcv | :| | ||
masak | samcv: at least, I'm not going to implement one | ||
someone else might get a kick out of repeating C's mistakes. not me. | |||
samcv | i guess i'll just have to type lots of braces | ||
haha | |||
masak | no-one is forcing you to use macros | ||
samcv | well i can't reliably do .VAR.^name without them | 08:04 | |
if I make a sub even is pure i often get some random thing outputted that's not the variable's name | |||
masak | this is true | ||
VAR(...).name is a very macro-ish wish to have | 08:05 | ||
note that it's .name, too, not .^name as you wrote | |||
TimToady | goodness, it's tomorrow already | ||
samcv | no it is .name | 08:06 | |
m: my $var; say $var.VAR.^name; say $var.VAR.name; | |||
camelia | rakudo-moar 3e28b1: OUTPUT«Scalar$var» | ||
samcv | oh. yeah | ||
sorry i got mixed up | |||
i will take my macros where I can get them though ;) | 08:07 | ||
08:07
khw joined
|
|||
masak | samcv: I wouldn't be so cranky about `#define` if I didn't deeply believe that what Perl 6 is aiming for is strictly better ;) | 08:09 | |
samcv | agreed lol | ||
i just want less {{}} tbh | |||
geekosaur | perl6 specifically went with that because it was ugly (and therefore highly obvious that Something Weird is going on) | 08:10 | |
samcv | ah | ||
<----begin weirdness----> | |||
geekosaur | because $x means the $x at the time the expanded macro is evaluated, but {{{$x}}} is the $x at the time the macro is being expanded | ||
masak | "ugly" here can actually be taken to mean "doesn't collide with normal language syntax" | 08:11 | |
see strangelyconsistent.org/blog/macros...eholdeeers | |||
08:12
lolo78 joined
08:14
xtreak left
08:16
xtreak joined
|
|||
samcv | masak, are you implying perl 5 uses macros to do sprintf? | 08:20 | |
masak | no, not implying that | 08:22 | |
samcv | "Don't believe me when I say that all templating syntax sucks? Fine, I'll bring you examples:" not sure what you mean by this? | ||
geekosaur | no, the %-escapes in the format string are a similar templating notion | ||
samcv | it's just a bad way to template items into the string? | ||
ah | |||
yeah that's pretty bad | |||
geekosaur | and TT as the second example :) | 08:23 | |
08:24
TimToady left
|
|||
samcv | wow python's is really weird | 08:24 | |
08:25
tojo joined
|
|||
arnsholt | samcv: I know! What weirdness did you trip over today? | 08:25 | |
samcv | docs.python.org/3/library/string.h...matstrings | ||
08:26
TimToady joined
|
|||
tojo | how can I take class name from variable? something like this: my $obj = $classname.new | 08:27 | |
samcv | m: my $var = 'te'; say $var.WHAT.name; | ||
camelia | rakudo-moar 3e28b1: OUTPUT«No such method 'name' for invocant of type 'Str' in block <unit> at <tmp> line 1» | ||
samcv | m: my $var = 'te'; say $var.WHAT.^name; | ||
camelia | rakudo-moar 3e28b1: OUTPUT«Str» | ||
samcv | like that kind of class name? | ||
masak | m: my $var = 'te'; say $var.^name | 08:28 | |
camelia | rakudo-moar 3e28b1: OUTPUT«Str» | ||
masak | samcv: no need for .WHAT | ||
samcv | oh. ok | 08:29 | |
08:29
e1 left
|
|||
tojo | sorry, bad question.. i hold a class name in variable and want to use that to make object from that class name | 08:29 | |
for 'Foo', 'Bar' -> $t { my $obj = $t.new; } | 08:30 | ||
masak | m: for Int, Str -> $t { say $t.new } | 08:31 | |
camelia | rakudo-moar 3e28b1: OUTPUT«0» | ||
masak | m: for Int, Str -> $t { say $t.new.perl } | ||
camelia | rakudo-moar 3e28b1: OUTPUT«0""» | ||
CIAvash | tojo: ::($t).new | 08:32 | |
samcv | is there a page on perl 6 special methods and stuff? | 08:33 | |
like .^methods and uh, how to get the possible signatures of a method or sub | |||
tojo | CIAvash: yes! that worked, thanks :) | ||
samcv | tojo, docs.perl6.org/language/packages#i...A%3A%28%29 | 08:34 | |
08:35
dakkar joined
08:36
parv joined
|
|||
tojo | samcv: thx! that page didn't come up on my previous searches | 08:37 | |
gfldex | samcv: .^ is the same as .HOW, so you need to get the *HOW and look that up in the docs | 08:41 | |
most of the time you will be looking for docs.perl6.org/type/Metamodel$COLO...ONClassHOW | |||
samcv | what am i doing wrong here gist.github.com/b34f9f7a9a5ee6c9b6...56cae47b3d | 08:43 | |
stderr: Too few positionals passed; expected 2 arguments but got 1 | |||
gfldex | samcv: you are trying to call $c in line 9 | 08:45 | |
samcv | well i created the variable on line 7 | 08:46 | |
gfldex | samcv: try this gist.github.com/gfldex/006d385aa45...b5727cda17 | 08:48 | |
samcv | yeah i was about to try that | ||
08:49
KDr2 joined,
g4 joined,
g4 left,
g4 joined
|
|||
gfldex | samcv: actually, your version should have worked to | 08:50 | |
08:52
as__ joined
|
|||
as__ | radudo: my $x = 42; say $x[0]; | 08:52 | |
rakudo: my $x = 42; say $x[0]; | 08:53 | ||
camelia | rakudo-moar 3e28b1: OUTPUT«42» | ||
samcv | also what's the shortcut for getting the last element of an array? | ||
as__ | Guys is it because there is a default circumfix for []? | ||
gfldex | [*-1] | ||
or .tail(1) | |||
samcv | [*-1] seems a lot faster | 08:54 | |
gfldex | as__: yes | ||
method calls are always dynamic and can't be inlined | 08:55 | ||
moritz | they can, heuristically, at run time | ||
gfldex | does that depend on traits? | 08:56 | |
geekosaur | as__, it's because there's code to pretend that a scalar is a single-element list when used in a place that requires a list | 08:57 | |
as__ | aha ok thanks! | 08:58 | |
parv | is there any plan for ";" to be the implicit default on perl6 prompt (REPL), as "my $x = 2" gives error but not with ";"? | ||
09:00
KDr2 left
|
|||
hartenfels | parv: `my $x = 2` on the REPL doesn't give me any errors. | 09:02 | |
09:02
ocbtec joined
09:04
jonas2 joined
|
|||
parv | after definition+assignment with ";" (my $x = 2;), there is no problem afterwords. with any new variables sans end ";". | 09:07 | |
09:08
rindolf joined
|
|||
parv | where can i post screenshot without an account? | 09:08 | |
hartenfels | parv: you could post the text to pastebin. | 09:09 | |
09:10
aindilis` joined
09:12
aindilis left
|
|||
parv | error: pastebin.com/DTWXN2ws | 09:15 | |
09:16
mxco86 joined
|
|||
hartenfels | parv: It works fine for me, maybe your Perl 6 is really old? What do you get when you run `perl6 -v`? | 09:16 | |
parv | i am using rakudo ae9d517 | ||
09:16
domidumont left
09:17
domidumont joined
|
|||
hartenfels | I'm not sure then, because it's supposed to work I think. | 09:19 | |
parv | actual version output: pastebin.com/sEZ1NuW0 | 09:21 | |
thanks for trying, hartenfels | |||
09:24
rba__ left
09:25
wamba left
09:27
pyrimidi_ joined,
pyrimidine left
09:35
tojo left,
zakharyas joined
09:42
domidumont left
09:50
xtreak left,
user10 joined
09:51
xtreak joined
09:52
user9 left,
user10 is now known as user9
09:54
breinbaas joined
09:56
hartenfels left,
carl_ joined
|
|||
carl_ | working? | 09:56 | |
hello beings | |||
samcv | hello | 09:57 | |
hi carl_ | |||
carl_ | quick question... | 09:58 | |
want to do something like this: if $a.WHAT eq (Int) {} , but no good. | |||
moritz | if $a ~~ Int { } | ||
that's a type check that propery respects subtypes | 09:59 | ||
carl_ | ~~ ? I'll look it up | ||
moritz | it's the smart-match operator | ||
10:00
devtom30 joined
10:03
wamba joined
|
|||
parv | is there really no way to compile+install rakudo/star from github to get the latest rakudo/rakudo? | 10:06 | |
else, i woud need to gather & install the bits myself to add to plain rakudo install. | 10:08 | ||
samcv | ok this isn't going to work. using permutations. gonna have to actually write something to pack the bits myself :\ oh well | ||
yeah i guess i can see how they can add up... | 10:09 | ||
and sadly permutations is naive to repeated numbers | |||
m: (1,1).permutations | |||
camelia | ( no output ) | ||
samcv | m: (1,1).permutations.say | ||
camelia | rakudo-moar 3e28b1: OUTPUT«((1 1) (1 1))» | ||
stmuk_ | parv: there is a Task::Star which resembles Rakudo Star although I suspect the module is dsynced | ||
parv | stmuk_: thanks, i will check that. | 10:10 | |
geekosaur | desynched and currently broken | ||
stmuk_ | there is a report on twitter that 2017.01 release doesn't work in at least VS15 (fixed after release) | ||
doesn't compile I mean | 10:11 | ||
10:13
domidumont joined
|
|||
parv | rakudo/star/README is frankly misleading in that "perl Configure.pl" dies noting that I tried to run it from clone of the git repo. (of course | 10:13 | |
) | |||
samcv | .tell AlexDaniel East_Asian_Width property has just been merged into MVM | 10:14 | |
yoleaux | samcv: I'll pass your message to AlexDaniel. | ||
stmuk_ | parv: I don't see why it's misleading .. it's intended to catch a common mistake .. not handle people being "clever" :) | 10:15 | |
10:15
rba_ joined
|
|||
moritz | parv: in the early days of R*, people would regularly clone the star repo and expected it to behave like the tarball | 10:16 | |
hence the current behavior | |||
10:20
wamba left
|
|||
timotimo | eco: fig | 10:20 | |
ah, it's wig! | |||
.tell cale2 have a look at the wig module :) | 10:21 | ||
yoleaux | timotimo: I'll pass your message to cale2. | ||
10:21
geekosaur left
10:22
geekosaur joined
|
|||
parv | well, i am back to plain rakudo then: github.com/rakudo/star/issues/28 (--xform error on FreeBSD 11) | 10:22 | |
stmuk_ | you could install gmake from ports | ||
timotimo | um | 10:23 | |
parrot hasn't been in rakudo star for a few years | |||
10:23
zakharyas left
|
|||
timotimo | also, if it's only to be used by the release creator, what's your problem with it? | 10:24 | |
parv | timotimo: it's the tar option that causes the similar error (with MoarVM) | ||
timotimo | oh? but why do we need that? | ||
just to throw out the version number? | |||
stmuk_ | the easiest fix is to look for gnu make and die with an error saying to install it | ||
10:24
wamba joined
|
|||
timotimo | why would gnu make magically give your tar executable a --xform option? | 10:25 | |
stmuk_ | because it's a gnu make only option | ||
timotimo | parv: i think you're missing the point of rakudo star | ||
what. | 10:26 | ||
parv | timotimo: only the bug submitter mentions that "only to be used by the release creater" without any follow up | ||
timotimo | rakudo.org/2017/01/30/announce-raku...e-2017-01/ | ||
you download this | |||
parv | timotimo: i am aware of that release. | 10:27 | |
in any case, i am not trying any more to complile myself rokudo star. | |||
timotimo | what do you mean by "gather & install the bits"? | ||
you can also just install rakudo manually, and then use the "install all modules" part of rakudo star to get the modules | 10:28 | ||
parv | find zef/panda etc.; then install it locally. | ||
timotimo | not necessarily | ||
parv | ? | 10:29 | |
timotimo | oh, rakudo star does use zef for that | ||
my apologies | |||
10:29
wamba left
|
|||
Ulti | whoa tests down to 0.8s | 10:31 | |
timotimo | stmuk_: i still don't understand why installing gnu make would change how the tar command works. or does gnu make also come with gnu tar? | ||
parv | stmuk_: were the gmake comments meant for me? (at least gmake 4.2.1 is installed here, FWIW) | 10:32 | |
timotimo | yes, they were | 10:33 | |
10:34
labster left
|
|||
stmuk_ | it was a typo for gnu tar | 10:35 | |
need coffee | |||
parv | stmuk_: ah, ok. | ||
10:37
TEttinger left
10:42
wamba joined,
carl_ left
|
|||
timotimo | that makes more sense, then | 10:43 | |
10:44
wamba left
10:46
bjz joined
10:51
zakharyas joined,
patzim joined
|
|||
patzim | @SmokeMachine: Wrt. implementation of P6W: github.com/zostay/Smack | 10:53 | |
10:55
ufobat joined
|
|||
timotimo | a nonbreaking space would be a good idea in the title | 11:00 | |
it breaks just between Perl and 6 for me %) | |||
samcv | what is the best way to iterate through a list, possibly removing items from the list | 11:02 | |
11:02
astj joined
|
|||
samcv | doing for ^@array.elems will stop matching up when i remove elements, but i'm not sure how to remove an item from the array by doing `for @array` | 11:02 | |
timotimo | i'd just map, or even grep | 11:03 | |
jnthn | samcv: I'd probably @array .= grep: { ... } and hand back False to remove | ||
arnsholt | I think I'd do a grep removing elements, and then do the map | ||
samcv | well i need to do things to those elements | 11:04 | |
process those items | |||
not _just_ remove them | |||
jnthn | You can in a grep? | ||
samcv | ok you think that would be suited fine? | ||
seems a little weird to me | |||
arnsholt | If the processing is disjoint from the decision to remove or not, I'd filter first and then process | ||
(Incidentally, it might be easier to help with a bit more context about what the problem you're solving is) | 11:05 | ||
samcv | they are not disjointed | ||
11:05
parv left
|
|||
timotimo | if by "process, not just remove" you mean that you need to change individual values, i'd go with map and return Empty when you want to remove elements | 11:06 | |
samcv | ok i have an Array of numbers, and I need to go through the array of numbers, and remove all the easy numbers and put it into another array | ||
no changing values | |||
11:06
pyrimidi_ left,
pyrimidine joined
|
|||
samcv | trying to write something to pack a bitfield | 11:06 | |
timotimo | m: my @a = ^10; @a .= map({ $_ %% 3 ?? $_ ** 2 !! Empty }); say @a | ||
camelia | rakudo-moar 3e28b1: OUTPUT«[0 9 36 81]» | ||
11:06
astj left
|
|||
jnthn | Maybe .categorize? | 11:07 | |
(Which is for breaking a list into sub-lists matching conditions) | |||
samcv | hmm | ||
that may work | |||
11:08
devtom30 left
|
|||
samcv | let me try categorize | 11:09 | |
maybe that'll work for finding ones that are divisible by 8 cleanly, but then i will need to go through and find any complements | |||
such as 3 and 7 = 8 for example | |||
such as 3 and 7 = 8 for example | 11:11 | ||
oops sent that twice | |||
DrForr | www.youtube.com/watch?v=vYmhapbBrig | ||
11:12
rba_ left
|
|||
samcv | categorize is pretty cool | 11:13 | |
timotimo | it's very good | ||
samcv | i'm trying to think what to look up for mathematical theory on this sort of thing | 11:14 | |
timotimo | hm. bin packing? | ||
samcv | i mean if i take out all 8's and 16's for example, is there any chance of me losing some packing? | ||
well just this sort of thing | 11:15 | ||
like fitting certain numbers into another number | |||
most efficiently | |||
also fitting like 2d shapes into the smallest size | 11:16 | ||
timotimo | i would have assumed they fit like 1d shapes | ||
samcv | err | ||
yeah | |||
1d shapes but | |||
it would be nice to know for sure that taking out all 8's and 16's will never prohibit one best possible packing | 11:17 | ||
timotimo | what do you fit stuff into? | ||
samcv | pretty sure it will? but idk. there must be some way to prove it | ||
8 bits | |||
timotimo | ah | ||
then you can transform the problem into another problem | |||
arnsholt | Oh. You have a series of field bit-widths, and want an algorithm to find the smallest number of bytes needed to pack them | 11:18 | |
samcv | pretty sure divisible by 8 things will be fine | ||
yes | |||
more importantly the ordering | |||
timotimo | i.e. "fit all those 1, 2, 3, 4, 5, 6, 7 wide things into N 8-wide bins" | ||
samcv | of the smallest bytes | ||
timotimo | is the same as | ||
"fit all those 1, 2, 3, 4, 5, 6, 7, 8, or 16 wide things into N + 10 8-wide bins" | |||
i.e. just pretend those extra bins were never even there | |||
and just sprinkle your 8- and 16-bit wide things at the end or beginning | 11:19 | ||
samcv | yeah, also want to know if i take out 4+4 and 3+6, will that also definitevely be the best? | 11:20 | |
i mean i know by themself, but hmm. i'm thinking i may need to sort odd and even | |||
timotimo | you mean 3+5? | ||
samcv | yes | ||
timotimo | i'd say so | ||
there's this dynamic programming thing | |||
where a perfect sub-solution can be part of a perfect super-solution | 11:21 | ||
i.e. a solution that has one 8-bit bin filled up with 4 + 4 can be as perfect as that sub-solution for that single 8-bit bin | |||
samcv | yeah | 11:22 | |
i want to say that is true, but some part of me wants to look at a mathematical proof for it lol | 11:23 | ||
SmokeMachine | patzim: thanks! | 11:24 | |
11:26
xtreak left,
gregf_ joined
|
|||
jast | if you have M bins of size N each and ignore elements of size i*N (for integer i), that's equivalent to packing the remaining elements into M-i bins | 11:27 | |
in other words, these elements don't really contribute anything interesting to the result | |||
Ulti | samcv: so long as the number you're removing isnt prime it shouldn't be a big deal? | ||
because there's always some box that fits a different multiple | 11:28 | ||
samcv | many of them will be prime. but that is a good point | ||
so should do all the non-prime ones first | |||
then deal with the other ones last | |||
11:28
ufobat left
|
|||
Ulti | also I wasnt following what you're actually up to other than the abstract thought problem :3 | 11:28 | |
samcv | oh | ||
packing C bitfields in for our unicode database rewrite | 11:29 | ||
for MVM | |||
11:29
xtreak joined
11:30
rba_ joined
|
|||
Ulti | not sure im fully clear | 11:30 | |
is the problem the numbers are sparse? | |||
so like you have lots of integers where you could fit the variety into 5bits but they use integers 8bits wide? | |||
timotimo | something like that, yeah | 11:31 | |
samcv | i have bins of size 8, i need to fit a series of numbers, most of them 1-8 into the minimum nubber of bins | ||
so need to do like 4+4 = 8, 2+2+2+2 = 8, 2+6= 8, but then also deal with all the odd numbers | |||
11:32
rba_ left
|
|||
moritz | greedy approaches are typical | 11:32 | |
so you start with placing all the big chunks | |||
11:32
rba_ joined
|
|||
Ulti | so in that example you can think of addition as a hash digest is there a reason something like that wouldnt work | 11:33 | |
moritz | and when there's space left (for example when packing an 8-bin with 5, 3 remains), you do that recursively with all the chunks that are small enough to fit in the remaining space | ||
samcv | yeah | ||
DrForr | Keeping in mind that the optimal algorithm for bin packing is NP-hard, so from a practical standpoint heuristics are the only way to go. | ||
samcv | NP? | 11:34 | |
DrForr | Non-Polynomial. | ||
samcv | ah | ||
ok so just try and not find optimum and find close to optimum :) | |||
DrForr | Another way of saying the number of steps *rapidly* tends to infinity as the number of bins goes up. | ||
arnsholt | (Non-deterministic polynomial, actually) | ||
samcv | yeah | 11:35 | |
arnsholt | But in practical terms, non-polynomial, yes =) | ||
DrForr | I sit corrected. | ||
Ulti | samcv: is this meant to be an on the fly thing or you want to do it once to find a good representation for an encoding? | ||
timotimo | only once | ||
samcv | yeah it's done only once | ||
timotimo | well, whenever the unicode db source data changes | ||
Ulti | ahh thats a lot easier so you have all the data | ||
samcv | yep | ||
Ulti | if its all internal though you dont really need to keep the representation consistent between the db changes? | ||
DrForr | This also sounds close to packing a C bit struct :) | 11:36 | |
timotimo | correct, Ulti | 11:37 | |
samcv | well it should generate the same thing every time | ||
but it doesn't have to be consistent between the numbers changing | |||
that it packs in | |||
Ulti | any reason you dont just enumerate all the things :S | ||
surely thats easiest | |||
samcv | just try all combinations? | ||
is that what you mean? tried it. like | |||
over 9k years | |||
Ulti | yeah systematically enumerate whatever the space is | ||
samcv | was fine when it did like 8 different ones | ||
but then past like 15.... | 11:38 | ||
waited 20 minutes then killed the program | |||
there's gonna be like 30+ | |||
could be 50 | |||
Ulti | im assuming from recent things this is like all combos of combining emojii or something? | ||
samcv | well. like a lot of them are boolean, some are enums | ||
hold on let me find something to show you | 11:39 | ||
Ulti | also has no one come up with an encoding for this already? thats kind of surprising | 11:41 | |
samcv | Ulti, gist.github.com/samcv/1c2070ff0bb4...eld-h-L183 | 11:42 | |
an encoding? | |||
so if you know c, the :2 means that takes up only 2 bits width | 11:43 | ||
and binary properties take up only 1 bit | |||
and all the characters which have identical property values have rows in the bitfield deduplicated | |||
11:44
rba_ left,
sufrostico joined
11:45
sena_kun joined
|
|||
samcv | though to be honest what takes the most space in my proof of concept is storing the values of each cp -> bitfield row | 11:45 | |
like for every codepoint you have to store which bitfield row it is mapped to, for all the unicode codepoints, which is a huge number | 11:46 | ||
i have it fixed for the name lookup at least, but need to implement the same for the bitfield rows | |||
11:51
bjz left,
bjz_ joined,
xtreak left
|
|||
jast | example heuristic: pack all 8/16 bit fields. pack the largest unpacked field that will still fit in the currently open bin; leave bin incomplete if not possible. repeat until all fields are packed. the basic idea of this heuristic is the idea that large fields will not become easier to pack later, when there's less choice of what to pack them together with. it's easy to come up with examples for which it will perform poorly, but it should be okay if you have enough | 11:54 | |
11:54
ufobat joined
|
|||
timotimo | add a phase of wiggling stuff about randomly at the end in the hopes of finding something better :P | 11:55 | |
"okay, add an hour of random experimentation here, see if we find anything better" | |||
samcv | lol | 11:57 | |
jast | that's actually not that easy, you have to generate mutations that fulfill the constraints | ||
timotimo | nah, just check the constraints after generating each mutation | 11:58 | |
jast | virtually all of them will have to be eliminated, though | 11:59 | |
alternatively you could backtrack but chances are that the bad packings don't happen near the end of that process | |||
timotimo | *shrug* ;) | ||
jast | well I guess you could turn it into a search problem, change the heuristic into a score function and try the "best" packing first | 12:01 | |
then apply dynamic pruning rules and other fancy things like that | |||
and down the rabbit hole we go | 12:02 | ||
DrForr | Heuristics FTW. | 12:04 | |
jast | tree search is about optimizing brute force using heuristics and formal reasoning, it's pretty neat but easy to get wrong | 12:05 | |
12:05
rurban joined,
rurban left
12:06
astj joined
|
|||
samcv | i gotta go to bed now guys | 12:09 | |
thanks for all your help :) | |||
SmokeMachine | I've read constraints and heuristic and would propose to use modules.perl6.org/#q=ProblemSolver but that's nothing related... :( | 12:12 | |
12:14
parv joined
12:15
gregf_ left
|
|||
SmokeMachine | S/propose/suggest/ | 12:16 | |
12:18
parv left
|
|||
masak | TimToady: would you also be fine with BEGIN-in-quasi firing only at expand time, even if it could fire sooner? that is, which consistency do we aim for in that case? | 12:20 | |
12:25
xtreak joined,
xtreak left
12:27
rba_ joined
12:28
rba_ left
12:32
astj left
12:33
astj joined
12:34
gregf__ joined
12:36
lukaramu joined
12:38
bjz joined
12:39
bjz_ left,
andrzejku left
12:44
agentzh joined
12:48
agentzh left
12:51
rba_ joined
13:03
astj left
|
|||
lizmat clickbaits p6weekly.wordpress.com/2017/01/30/...e-mondays/ | 13:15 | ||
13:18
cdg joined
|
|||
brokenchicken clicks | 13:19 | ||
m: "\c[Grinning cat Face]".say | 13:20 | ||
camelia | rakudo-moar f22170: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unrecognized character name [Grinning cat Face]at <tmp>:1------> 3"\c[Grinning cat Face7⏏5]".say» | ||
13:20
cdg left,
cdg joined
|
|||
brokenchicken | star: class Foo::Bar {}; my Foo::Bar $a .= new; dd $a | 13:21 | |
camelia | star-m 2016.10: OUTPUT«Foo::Bar $a = Foo::Bar.new» | ||
brokenchicken | star: class Foo::Bar {}; class { my Foo::Bar $.a .= new }.new | ||
camelia | ( no output ) | ||
brokenchicken | star: class Foo::Bar {}; class { my Foo::Bar $.a .= new }.new.qa | ||
camelia | star-m 2016.10: OUTPUT«No such method 'qa' for invocant of type '<anon|62232192>' in block <unit> at <tmp> line 1» | ||
brokenchicken | star: class Foo::Bar {}; class { my Foo::Bar $.a .= new }.new.a | ||
camelia | ( no output ) | ||
brokenchicken | star: class Foo::Bar {}; class { has Foo::Bar $.a .= new }.new.a | 13:23 | |
camelia | star-m 2016.10: OUTPUT«===SORRY!===Could not locate compile-time value for symbol Foo::Bar» | ||
brokenchicken | ah | ||
13:34
wamba joined
13:35
mr-foobar joined
13:37
wamba left
13:41
ChoHag left
13:47
geekosaur left
13:48
geekosaur joined,
khw left
13:49
astj joined
13:51
khw joined,
b^_^d left
13:52
d^_^b joined,
d^_^b left,
d^_^b joined
13:54
astj left
14:00
KDr2 joined
14:16
skids joined
|
|||
SmokeMachine | I remember that! | 14:17 | |
brokenchicken | Well, it *was* just last week :P | ||
stmuk_ | anyone know if the ORA Perl 6 for CS book is available in any sort of ebook draft form? | 14:18 | |
perlpilot | shop.oreilly.com/product/0636920065883.do talks about "Early Release Ebook" | 14:20 | |
14:20
gregf__ left
|
|||
perlpilot | unless you also mean "free" | 14:20 | |
stmuk_ | yes I noticed that! maybe needs a safari (if it's caled that now) signup | 14:21 | |
14:25
mienaikage joined
|
|||
moritz read the first 120~ pages of an early version as a technical review | 14:25 | ||
like, before O'Reilly was involved | |||
lizmat | stmuk_: I understand that the first 7 chapters will become available as an early version ebook within days | 14:27 | |
fwiw, I've proofread the entire book | 14:28 | ||
brokenchicken | Is it good? | 14:30 | |
lizmat is slighlt biased | |||
brokenchicken | And is it for total programming beginners or all levels? | 14:31 | |
moritz | it's a very introductory book | ||
brokenchicken | Hmm. | ||
stmuk_ | its a port of a similarly named python book I think? | ||
moritz | it's about leraning to program, and Perl 6 takes a second place after that | ||
stmuk_: yes | |||
stmuk_ | actually it does look a bit Noddy | 14:32 | |
lizmat | chapter names are: | ||
1. The way of the program | |||
perlpilot | btw, I'm encouraged by all of the Perl 6 books out there. It gives me hope that many people will use Perl 6. | ||
DrForr | This explains a conversation I had a few weeks ago. | ||
lizmat | 2. | ||
Variables, expressions and statements | |||
3. Functions and subroutines | 14:33 | ||
4. Conditionals and recursion | |||
stmuk_ | python one is interactivepython.org/courselib/sta...index.html | ||
lizmat | 5. Fruitful subroutines | 14:34 | |
6. Iteration | |||
perlpilot | "fruitful subroutines"? That's an interesting title. | ||
lizmat | 7. Strings | ||
perlpilot | seems a bit out of place with the other, more boring titles | ||
moritz | vegetableful subroutines would be a bit weird | 14:35 | |
lizmat | m: sub a { say "Hello World" } # not fruitful | ||
camelia | ( no output ) | ||
brokenchicken | perlpilot: yeah, especially written by people who aren't regulars in this channel :) | ||
lizmat | m: sub a { "Hello World" } # fruitful | ||
camelia | ( no output ) | ||
brokenchicken | I also notice this channel's average usercount has grown by ~15 people since December | 14:36 | |
lizmat | regulars here would be people who know how to program :-) | ||
moritz | functions that return a value, rather than having a side effect, I guess | ||
stmuk_ | www.openbookproject.net/thinkcs/pyt.../ch05.html | 14:37 | |
yes | |||
14:39
jonas2 left,
ufobat left
14:41
mienaikage left,
cale2 joined,
user9 left
|
|||
stmuk_ | there are a bunch of "learn $foo the hard way" books as well | 14:41 | |
14:42
user9 joined
14:45
gregf_ joined
|
|||
SmokeMachine | lizmat: I'm not sure... I'm connected here all the time... | 14:46 | |
lizmat | :-) | 14:47 | |
14:51
Dandel_ joined
|
|||
Dandel_ | skids, you around? | 14:53 | |
14:54
mienaikage joined
|
|||
skids | o/ | 14:54 | |
brokenchicken | \o | 14:55 | |
Dandel_ | I was wanting to ask ya a few things about an old project that you where working on a few years back. | ||
cale2 | Think Perl 6 book says it delves into declarative programming and grammars even | ||
yoleaux | 10:21Z <timotimo> cale2: have a look at the wig module :) | ||
cale2 | wig module? huh? | 14:57 | |
brokenchicken | buggable: eco wig | ||
buggable | brokenchicken, wig 'where is grep: Make grep prettier, put a wig on it!': github.com/0racle/p6-wig | ||
lizmat | cale2: chap 14: regexes and grammars | 14:59 | |
cale2: chap 15: functional programming | 15:00 | ||
skids | Dandel_: which one? | 15:01 | |
Dandel_ | GGI. | ||
skids | Ahah. Yeah that was some time ago :-) | ||
Dandel_ | all I'm doing is trying to get in contact with the contributors so i can map things into git. | 15:02 | |
skids | Sure, what do you need? | ||
15:03
zakharyas left
|
|||
Dandel_ | Just the current contact information you want to use for git. | 15:03 | |
brokenchicken | What's the name of <>? As in $blah<>? Also, is its purpose just to decontarize or is that a sideeffect? | ||
15:03
zakharyas joined
|
|||
skids | skids is my git uid as well. | 15:03 | |
Dandel_ | I figured. | ||
skids | Or ... oh you mean email? | 15:04 | |
Dandel_ | ya | ||
I was wanting to get current email addresses... I plan on updating the tree once I get the map to also mention which old devs do not wish to be contacted again :) | 15:05 | ||
15:08
zakharyas left
|
|||
DrForr | On boston-pm there's a posting about rakudo.org/2017/01/30/announce-raku...e-2017-01/ being blocked by WBRS with 'Reason: BLOCK-MALWARE', 'Threat Type: othermalware' | 15:08 | |
brokenchicken | :( | 15:09 | |
15:09
pyrimidine left
15:10
pyrimidine joined
|
|||
brokenchicken | Um. WBRS being what? | 15:10 | |
DrForr | WBRS seems to be Cisco firewall filtering, not sure what else. Where should I forward the message? | ||
brokenchicken | WBRS 100.1 FM in google has "this site may be hacked" message under it | ||
DrForr | "Web Reputation Filters" appears in the message, there's really nothing else useful that I see in the message. | 15:11 | |
It's not appropriate for rakudo-bugs, where should it get sent? | |||
mspo | wordpress can get quietly hacked | 15:12 | |
brokenchicken | DrForr: well, does it even need to be sent? | ||
DrForr | (I suspect there's no real solution because it's bayesian.) | ||
brokenchicken | DrForr: wtf is WBRS? | ||
mspo | rakudo.org/how-to-get-rakudo/ doesn't have checksums and doesn't use https | 15:13 | |
DrForr | brokenchicken: The message doesn't mention what the filtering system is. I believe it's Cisco blocking, but I don't know. | 15:14 | |
brokenchicken | Yeah, it's pretty frustrating to have such a simple problem unsolved for months. | ||
DrForr: but what's WBRS? | |||
15:14
pyrimidine left
|
|||
mspo | www.cisco.com/c/en/us/support/docs/...sa-00.html | 15:14 | |
15:15
rurban joined
|
|||
DrForr | brokenchicken: You can repeat your question as often as you like. The message does *not* state what it is, all I can do is guess that it's a Cisco filter. | 15:15 | |
mspo | could be more related to the hosting IP and not specifically rakudo.org | ||
DrForr | All I'm asking is "Is there a security@ or admin@ email address that I should forward this to?" | ||
mspo | DrForr: is www.pmichaud.com/ also blocked? | 15:17 | |
15:17
wamba joined
|
|||
mspo | or www.pmwiki.org/ (wikis are also often quietly hacked) | 15:17 | |
DrForr | mspo: brokenchicken: I did not make this discovery, I have no more information than what I passed along. This is a report to boston.pm that I'm mentioning, I have no more information than that. | 15:18 | |
brokenchicken | DrForr: but what's WBRS? | ||
:) | |||
mspo | DrForr: I would send it to pmichaud guy | 15:19 | |
brokenchicken | DrForr: sorry, I thought WBRS was some organization at first :) | ||
mspo | and also consider ssl and checksums on rakudo :) | ||
brokenchicken | DrForr: and mention that we need Wordpress upgrade and HTTPs | ||
He's a bunch of bot messages. | |||
mspo | or maybe some kind of perl6-based blog | ||
DrForr | I know Patrick, I don't have his email to hand. What is it? | ||
15:20
cyphase left
|
|||
brokenchicken | Rakudo releases are signed, though I see not R*.. | 15:20 | |
15:21
wamba left
15:23
wamba joined
|
|||
DrForr | (privately if you like) It's not a download of a specific file, but it could very well simply be blocking the site because of a download link that's not over https, yes. | 15:25 | |
15:25
as__ left
|
|||
brokenchicken | [rakudo@power ~]$ grep wp-login access-logs/rakudoperl.org | wc -l | 15:25 | |
15:25
cyphase joined
|
|||
brokenchicken | 384 | 15:25 | |
[rakudo@power ~]$ grep downloads access-logs/rakudoperl.org | wc -l | |||
214 | |||
Wonder if our WP install is up to date... I know php is waaaay out of date :( | 15:26 | ||
moritz | it's not | 15:27 | |
brokenchicken | yeah :( | ||
15:27
CIAvash left
|
|||
brokenchicken | And more bots try the wp-login page than people downloading releases | 15:28 | |
DrForr | I've dealt with that on tau-station before, WP seems to be fairly stable but I'd still make sure to do a full backup of DB and web directory, because it may not come back. And breaking templates is *always* a concern. | ||
brokenchicken | wow "Akismet has protected your site from 872,376 spam comments already." :) | ||
15:31
dugword joined
|
|||
DrForr | Also, I don't see pmichaud's email address in the IRC logs, anyone willing to send it my way privately? | 15:33 | |
brokenchicken | There's one listed on github profile: github.com/pmichaud | 15:36 | |
15:40
AlexDaniel joined
|
|||
DrForr | sorry if I was a little churlish. News from home is not fun. | 15:42 | |
AlexDaniel | heh… somebody just wrote “poophole optimizer” | ||
yoleaux | 10:14Z <samcv> AlexDaniel: East_Asian_Width property has just been merged into MVM | ||
mspo | I use http simple auth on wp-login to stop a *ton* of bot traffic | 15:44 | |
but it didn't stop a sql injection (or something, i'm not sure really) from hitting one of my sites *badly* over this weekend | |||
15:45
wamba left
|
|||
cale2 | I like this: github.com/0racle/p6-wig | 15:45 | |
It feels like it belongs in the language with the "where" guards on parameters and subsets as well | 15:46 | ||
"where" in subsets and params is basically the same thing as grep anyway. `.where` shouldn't even be a method. It should just be re-used as a keyword for most types | 15:47 | ||
brokenchicken | 0.o | ||
AlexDaniel | samcv: great! Amazing! Now I have to find why I needed that… | 15:49 | |
15:49
dugword left
15:50
g4 left
|
|||
[Coke] | u { / ROMAN NUMERAL /} | 15:50 | |
AlexDaniel | u: { / ROMAN NUMERAL / } | 15:51 | |
hm, maybe not that | |||
u: { .uniname ~~ / ROMAN NUMERAL / } | |||
unicodable6 | AlexDaniel, gist.github.com/047dfa7d80ea019d36...e4a870ef23 | ||
AlexDaniel, Oops, something went wrong! | |||
AlexDaniel | hey why so slow | ||
[Coke] | u: { .uniname ~~ / 'ROMAN NUMERAL' /} | 15:52 | |
unicodable6 | [Coke], U+2160 ROMAN NUMERAL ONE [Nl] (Ⅰ) | ||
[Coke], U+2161 ROMAN NUMERAL TWO [Nl] (Ⅱ) | |||
[Coke], gist.github.com/5476fccd59fe9f5214...62c7801d28 | |||
brokenchicken | prints a billion of warnings, I'm guessing. | ||
Oh, just one. | 15:53 | ||
AlexDaniel | hm, but still it timed out for some reason | ||
ah, right | 15:54 | ||
u: ROMAN NUMERAL | |||
unicodable6 | AlexDaniel, U+2160 ROMAN NUMERAL ONE [Nl] (Ⅰ) | ||
AlexDaniel, U+2161 ROMAN NUMERAL TWO [Nl] (Ⅱ) | |||
AlexDaniel, gist.github.com/df0db785c43d5745c1...8e7b4891fb | |||
AlexDaniel | no need for a code block | ||
the one without a code block is optimized to do the whole thing in about two seconds | 15:55 | ||
the other one may be pretty slow, depends on what you write | |||
Geth | oc: df9d1155b8 | (Zoffix Znet)++ | doc/Language/operators.pod6 Formatting fix: Markdown -> POD |
15:56 | |
15:58
geekosaur left,
matt__ joined
16:00
geekosaur joined
|
|||
perigrin | w/ 48 | 16:01 | |
brokenchicken | m: say quietly ($ = 42) ~~ S/4/2/; say $/; say $_ | ||
camelia | rakudo-moar f94cb2: OUTPUT«Potential difficulties: Smartmatch with S/// is not useful. You can use given instead: S/// given $foo at <tmp>:1 ------> 3say quietly ($ = 42) ~~ 7⏏5S/4/2/; say $/; say $_False22(Any)» | ||
brokenchicken | You can't even quiet this warning? Laaame | ||
perlpilot | It's compile-time. quietly only works at run-time. | 16:03 | |
AlexDaniel | I'm not even sure why does it have to run at all | ||
16:04
wamba joined,
KDr2 left
|
|||
AlexDaniel | I mean, what's the point of proceeding when there's that? | 16:04 | |
brokenchicken | AlexDaniel: are you talking about my warning? | 16:05 | |
AlexDaniel | yea | ||
brokenchicken | AlexDaniel: then I don't follow. The warning is a lie. | ||
You can get the result from $/ | |||
AlexDaniel | but why not use given instead? | 16:06 | |
brokenchicken doesn't understand the question | 16:07 | ||
perlpilot doesn't understand either | |||
AlexDaniel | m: say S/4/2/ given ($ = 42); say $/; say $_ | 16:08 | |
camelia | rakudo-moar f94cb2: OUTPUT«2222(Any)» | ||
AlexDaniel | and look, you're not getting a useless False | ||
the error message says that smartmatching with S/// is not useful. What's useful about getting False here? | 16:09 | ||
Geth | oc: 08cfdd8e8a | (Zoffix Znet)++ | doc/Language/operators.pod6 Minor clarifications for S/// / s/// - Mention the operators set $/ - Reword the warning explanation: saying there's no way to get the result is a lie, as it can be obtained from $/. I'm not even sure why the warning exists at all. Feels the original design that set result into $/ did not prescribe a warning for S/// |
||
brokenchicken | AlexDaniel: but it's not useless. And your given reverses the arguments, making it read backwards and you did it just to avoid the warning that lies :) | 16:10 | |
AlexDaniel | /o\ | ||
the result of ~~ is useless | |||
brokenchicken | No, it tells you whether any changes were done | ||
16:10
pyrimidine joined
|
|||
brokenchicken | But you don't need to use it | 16:10 | |
AlexDaniel | brokenchicken: so what's False in this case? | ||
brokenchicken | $x ~~ s/a/b/; say $x | 16:11 | |
$x ~~ S/a/b/; say $/ | |||
I don't see why you think one version is useless and needs to be rewritten with `given` while the other is fine | |||
16:11
bwisti joined
|
|||
brokenchicken | AlexDaniel: return = "is result after changes the same as the original string" | 16:11 | |
It basically ends up being Str ~~ Str | 16:13 | ||
AlexDaniel | which is the opposite of what regexes usually do | ||
but at least I see your point now | |||
brokenchicken | hehe | ||
But my jorney to this point started with this: | 16:14 | ||
AlexDaniel | m: given $ = 42 { S/4/2/ }; say $/; say $_ | ||
camelia | rakudo-moar f94cb2: OUTPUT«22(Any)» | ||
brokenchicken | m: say <a1 a2 a3>.map({S/huh//}); | ||
camelia | rakudo-moar f94cb2: OUTPUT«(a1 a2 a3)» | ||
brokenchicken | m: say eager <a1 a2 a3>.map({S/huh//}); | ||
camelia | rakudo-moar f94cb2: OUTPUT«(a3 a3 a3)» | ||
brokenchicken | Note, this is NOT a bug :) | ||
Or | |||
m: my $fun = <a1 a2 a3>.map({S/huh//}); say $fun[^1]; say $fun[^2]; say $fun[^3]; | 16:15 | ||
camelia | rakudo-moar f94cb2: OUTPUT«(a1)(a2 a2)(a3 a3 a3)» | ||
brokenchicken | also not a bug :) | ||
AlexDaniel | why isn't it a bug by the way | ||
ah | |||
I see… | |||
brokenchicken | And pondering wtf S/// returns $/ anyway. And I came to conclusion original design intended for $/ to be obtained the result from, and no warning :) | 16:16 | |
Hm. OTOH it still doesn't need to return it | |||
16:16
ChoHag joined
|
|||
brokenchicken | And I was gonna say worth seeing if spectests explode, but now I remember we got like just a couple of tests for S/// | 16:18 | |
.seen FROGGS | |||
yoleaux | I saw FROGGS 17 Jan 2017 21:11Z in #perl6: <FROGGS> dataf3l: to this: hg.dyncall.org/pub/dyncall/dyncall/...allf.c#l91 | ||
AlexDaniel | c: 2015.07 say ($ = 42) ~~ S/4/2/; say $/; say $_ | 16:19 | |
committable6 | AlexDaniel, ¦«2015.07»: False22(Any) | ||
AlexDaniel | ok let's see what was the motivation behind it exactly | ||
bisect: old=2015.07 say ($ = 42) ~~ S/4/2/; say $/; say $_ | |||
bisectable6 | AlexDaniel, Bisecting by output (old=2015.07 new=f94cb21) because on both starting points the exit code is 0 | ||
AlexDaniel, bisect log: gist.github.com/3477b17991231dcdfe...afd0dad75e | |||
AlexDaniel, (2015-10-13) github.com/rakudo/rakudo/commit/f5...427990bada | |||
AlexDaniel | ok that commit message isn't super helpful | 16:20 | |
brokenchicken | hehe | ||
Well, kinda is. It proves my point the warning wasn't a part of original design :) | |||
perlpilot | yeah, you were being far too optimistic | ||
AlexDaniel | now I remember, the message was a bit different initially | 16:21 | |
and then was changed because of my complaints I think | |||
bisect: old=f54ff833 say ($ = 42) ~~ S/4/2/; say $/; say $_ | |||
bisectable6 | AlexDaniel, Bisecting by output (old=f54ff83 new=f94cb21) because on both starting points the exit code is 0 | ||
AlexDaniel, bisect log: gist.github.com/c5f49e9a3da6e94fda...823990b2a7 | |||
AlexDaniel, (2015-12-04) github.com/rakudo/rakudo/commit/58...a3ed6723f3 | |||
brokenchicken | bisect: old=2014.01 new=2015.12 S/4/2/.VAR.name.say given "x" | ||
bisectable6 | brokenchicken, Bisecting by exit code (old=2014.01 new=2015.12). Old exit code: 1 | ||
AlexDaniel | no… no… it only goes to 2015.07 | 16:22 | |
brokenchicken | oh, oops :) | ||
AlexDaniel | it will give you the best answer it can | ||
perlpilot | Getting rid of that worry will make compilation a tiny bit faster ;) | 16:23 | |
brokenchicken looks for the ABORT button | |||
abraxxa | great, libgd2 2.2.1 on Ubuntu doesn't install gdlib-config any more which is required by GD | ||
AlexDaniel | brokenchicken: it's fine, it should make it :) | ||
ilmari | abraxxa: I'd expect that to be in libgd-dev | 16:24 | |
abraxxa | ilmari: it was | ||
16:24
koki1 joined
|
|||
abraxxa | ilmari: search for gdlib-config: changelogs.ubuntu.com/changelogs/po.../changelog | 16:24 | |
2.2.1-1: Don't install obsolete gdlib-config | |||
ilmari | abraxxa: oh, when you said libgd2 I thought you meant libgd2, not some vaguely related other package | 16:25 | |
AlexDaniel | .oO( come on!! ) |
||
bisectable6 | brokenchicken, bisect log: gist.github.com/7d3988cf257d6eed63...9434dfb296 | ||
brokenchicken, There are 209 candidates for the first “new” revision. See log for more details | |||
abraxxa | what vaguely related other package? | ||
brokenchicken | wooo | ||
AlexDaniel | \o/ | ||
bisect: old=587f700e9 say ($ = 42) ~~ S/4/2/; say $/; say $_ | 16:26 | ||
bisectable6 | AlexDaniel, Bisecting by output (old=587f700 new=f94cb21) because on both starting points the exit code is 0 | ||
AlexDaniel, bisect log: gist.github.com/5f1c53cd786e200556...0458940705 | |||
AlexDaniel, (2016-01-05) github.com/rakudo/rakudo/commit/ac...ac9584db28 | |||
ilmari | abraxxa: libgd-dev | ||
AlexDaniel | haha… “Zoffix++, AlexDaniel++” | ||
brokenchicken | AlexDaniel: so I can still run my last query if I change 2015.12 to 2015.07? | ||
AlexDaniel | brokenchicken: you mean 2014.01 to 2015.07? | 16:27 | |
brokenchicken | mhm | ||
abraxxa | ilmari: moved to #perl-help as I've initially mixed up the channels | ||
AlexDaniel | commit: all S/4/2/.VAR.name.say given "x" | ||
what are you looking for exactly | |||
committable6 | AlexDaniel, gist.github.com/7280de5b08abec1b01...a5d603000e | 16:28 | |
brokenchicken | To see whether when S/// was implemented it was returning $/ | ||
Or more precisely, explanation for why it returns $/ :) | |||
AlexDaniel | brokenchicken: looking at committable output, it was implemented in 2015.06 and that's the initial behavior | 16:29 | |
brokenchicken | bisect: old=2015.05 new=2015.06 S/4/2/.VAR.name.say given "x" | ||
bisectable6 | brokenchicken, Bisecting by exit code (old=2015.05 new=2015.06). Old exit code: 1 | ||
AlexDaniel | that will give you the same 209 candidates, as it has nothing in between | ||
bisectable6 | brokenchicken, bisect log: gist.github.com/1eb6ff11bc6aba4b51...91b61d3e5e | ||
brokenchicken, There are 209 candidates for the first “new” revision. See log for more details | |||
brokenchicken | AlexDaniel: ah, so pre-Christmas only release commits have builds? | 16:30 | |
AlexDaniel | brokenchicken: 2015.07~HEAD and all tags are built | ||
so you can use 2014.02 but not 2014.02^ :) | |||
brokenchicken | Well, there's always New and Improved™ GitHub blame :) | 16:31 | |
16:31
wamba left,
wamba joined
|
|||
AlexDaniel | was it changed? | 16:31 | |
“view blame prior to this change” | 16:32 | ||
finally | |||
brokenchicken | Yeah, recently. They made it much easier to view previous commits | ||
perlpilot | brokenchicken: S/// returns $/ probably because s/// returns $/. The real problem is ... why isn't $/ a Match with S/// and why does it contain the entire string intead of just the matching part. | ||
16:33
dugword joined
|
|||
brokenchicken | perlpilot: because S/// returns the resultant string. | 16:33 | |
perlpilot | Sure, but that has nothing to do with $/ | 16:34 | |
16:34
zakharyas joined
|
|||
brokenchicken | I see what you're saying. | 16:34 | |
perlpilot | m: my $foo = "blah"; $foo ~~ s/a/u/; say $/; | 16:35 | |
camelia | rakudo-moar f8b346: OUTPUT«「a」» | ||
perlpilot | I'd expect the S/// variant to behave identically | ||
(I mean with respect to $/) | |||
brokenchicken | m: my $foo = "blaaaaaah"; $foo ~~ s:g/a/u/; say $/; | ||
camelia | rakudo-moar f8b346: OUTPUT«(「a」 「a」 「a」 「a」 「a」 「a」)» | ||
brokenchicken | Agreed. | ||
AlexDaniel | yea | 16:36 | |
brokenchicken | And that'll fix the .map({S///}) thing too | ||
brokenchicken will fix it after lunch | |||
And the warning on S/// will make sense :D | 16:40 | ||
on ~~ S/// | |||
perlpilot | brokenchicken++ | ||
brokenchicken | perlpilot++ | 16:42 | |
16:46
agentzh joined
16:48
domidumont left
16:49
pyrimidine left,
pyrimidine joined
16:50
agentzh left,
dugword left
16:51
lukaramu left
16:54
pyrimidine left
16:56
cdg left
16:58
Sound joined,
zakharyas left
17:01
zakharyas joined
17:02
noro joined
|
|||
TimToady | masak: I thought that was the consensus I was already agreeing to | 17:03 | |
17:07
wamba left,
ggoebel left
17:10
girafe joined
17:13
wizard_ joined
|
|||
perlpilot | brokenchicken: Here's a rough hack at fixing S/// gist.github.com/perlpilot/bb541544...64a6eb1b27 | 17:19 | |
17:19
matt__ left
|
|||
perlpilot | brokenchicken: I'd commit it, but I don't have the time to really test it out. | 17:20 | |
17:20
matt___ joined
|
|||
brokenchicken | awww, you took all the fun out of it :) I was *just* booting up my VM :) | 17:20 | |
17:20
ggoebel joined
|
|||
brokenchicken | Never heard of QAST::Node tho, so heh :) | 17:21 | |
What's it do? The my $Sname := QAST::Node.unique("__Sname"); part? | 17:22 | ||
perlpilot | makes a unique identifier. | ||
each call you'll get something like __Sname_1 __Sname_2 __Sname_3 etc. | |||
anyway, like I said, it's a rough hack. You'll do better I'm sure. | 17:23 | ||
:) | |||
brokenchicken | Now you put me under pressure to do better! :) | 17:33 | |
17:35
noro left
17:36
rba_ left
|
|||
Geth | oc: 0abaf2508f | (Christopher Bottoms)++ | doc/Language/5to6-perlfunc.pod6 Mention "chomp in-place" Also touched up definition to ensure it is clear that the target itself isn't returned. |
17:36 | |
perlpilot | brokenchicken: I figure you've been touching the code lately and I can't remember the last time I did anything more than update a string (though git tells me it's been | 17:40 | |
a while) | |||
brokenchicken | Yeah, but I barely know what I'm doing :P | 17:41 | |
perlpilot | fair enough :) | 17:42 | |
17:43
zakharyas left
17:45
domidumont joined
17:46
wamba joined
17:50
labster joined
17:55
dakkar left
|
|||
Geth | oc/master: 4 commits pushed by Altai-man++ | 17:59 | |
sena_kun | Hmm, shouldn't it show the original contributor, not the person who did a merging? | 18:00 | |
18:00
labster left
|
|||
brokenchicken | What do WANTED/wanted subs do in Perl6/Actions? | 18:00 | |
TimToady | tell things they're not in sink context | 18:01 | |
brokenchicken | Thanks. | 18:02 | |
TimToady | it's basically an interleaved top-down 2nd pass | ||
interleaved with the 1st bottom-up pass, that is | 18:03 | ||
(to the extent that the 1st pass is bottom-up, which it is from the standpoint of Actions, if not always from the parser's point of view) | |||
brokenchicken | sena_kun: it reports the pusher, which is accurate. On 1-2 commit merges, it'd report individual authors. | 18:08 | |
sena_kun | brokenchicken, oh, okay. | 18:09 | |
brokenchicken | sena_kun: this is the whole webhook: gist.github.com/zoffixznet/4e9304c...c38b821219 The pusher is given as a separate hash, and I'm unsure how reliable it'd be to pick through individual comits to find authors | ||
sena_kun: hmm... it could @all-authors.unique in the message maybe? Abridging them if they're too long | 18:10 | ||
This is the line in code github.com/perl6/geth/blob/master/...ub.pm6#L92 and that object is populated here: github.com/perl6/geth/blob/master/...6#L96-L114 | 18:11 | ||
Eh, looks simple enough :) I'll do it | 18:12 | ||
sena_kun | brokenchicken, it is rare(afaik) to have a crowd of people in one PR. I just thought that the actual contributor did more than pusher in this case. | ||
brokenchicken | Agreed :) | ||
sena_kun | brokenchicken, ah, I wanted to try it. | ||
After your proper explanation. | 18:13 | ||
18:15
Geth left,
Geth joined,
ChanServ sets mode: +v Geth
18:16
eroux_ joined,
Geth left
18:17
Geth joined,
ChanServ sets mode: +v Geth
|
|||
brokenchicken | .oO( need to add tests to it... ) |
18:17 | |
Geth | oc/master: 4 commits pushed by (Antonio Quinonez)++, (Antonio Quinonez)++, (Antonio Quinonez)++, Altai-man++ | ||
brokenchicken | oops, forgot unique :P | ||
18:17
Geth left
18:18
matt___ left,
Geth joined,
ChanServ sets mode: +v Geth
18:19
Geth left
18:20
Geth joined,
ChanServ sets mode: +v Geth,
eroux_ left
|
|||
Geth | oc/master: 4 commits pushed by (Antonio Quinonez)++, Altai-man++ | 18:20 | |
brokenchicken | yey | ||
sena_kun | It was quick! brokenchicken++ | ||
18:21
pyrimidine joined,
agentzh joined,
eroux_ joined
18:24
eroux_ left
|
|||
brokenchicken | My OCD senses are disturbed by that extra space before Geth's stuff :} | 18:26 | |
18:26
_eroux_ joined
|
|||
brokenchicken | AlexDaniel: how about sticking some fancy pants Unicode char there instead? :) | 18:26 | |
18:26
lolo78 left
|
|||
AlexDaniel | u: zero width space | 18:26 | |
unicodable6 | AlexDaniel, U+200B ZERO WIDTH SPACE [Cf] () | ||
AlexDaniel, U+FEFF ZERO WIDTH NO-BREAK SPACE [Cf] () | |||
brokenchicken | heh | 18:27 | |
u: box | |||
unicodable6 | brokenchicken, U+2327 X IN A RECTANGLE BOX [So] (⌧) | ||
brokenchicken, U+237D SHOULDERED OPEN BOX [So] (⍽) | |||
brokenchicken, gist.github.com/aa021254726f35a59e...520b7b328d | |||
AlexDaniel | u: bullet | ||
unicodable6 | AlexDaniel, U+2022 BULLET [Po] (•) | ||
AlexDaniel, U+2023 TRIANGULAR BULLET [Po] (‣) | |||
AlexDaniel, gist.github.com/63fd72e1328055bd1b...d05811ba8c | |||
brokenchicken | geth: f3eec4957b | (Zoffix Znet)++ | 2 files Report all authors when we don't print full commits |
18:29 | |
AlexDaniel | maybe ¦ ? | ||
brokenchicken | u: ¦ | ||
unicodable6 | brokenchicken, U+00A6 BROKEN BAR [So] (¦) | ||
AlexDaniel | that's even latin-1 | 18:30 | |
so should render like everywhere | |||
18:30
telex left
|
|||
brokenchicken | OK | 18:31 | |
18:32
telex joined,
Geth left
18:33
cdg joined,
Geth joined,
ChanServ sets mode: +v Geth
18:38
patzim left
18:39
FROGGS joined,
pyrimidine left
18:40
pyrimidine joined
|
|||
brokenchicken | What does QAST::Op.new( :op('p6scalarfromdesc'), QAST::Op.new( :op('null') ) ) do? That op is mentioned without any description in rakudo/docs | 18:42 | |
Makes a scalar from descriptor? What's a descriptor? | 18:43 | ||
18:43
labster joined
|
|||
El_Che | brokenchicken: on a perl5 channel? you're in a good mood :) | 18:43 | |
brokenchicken | brokenchicken: hm? | 18:44 | |
What? | |||
El_Che | brokenchicken: didn't you post a "screw you guys, I'm going home" some time ago? | ||
(it good to see you there, it's not a critique) | 18:45 | ||
brokenchicken | El_Che: where? | ||
El_Che | #perl | ||
brokenchicken | I'm not there | ||
El_Che | ah ok, someone with a similar nick | ||
18:45
pyrimidine left
|
|||
El_Che | not making sense, then | 18:45 | |
:) | |||
El_Che ignores El_Che | 18:46 | ||
18:46
domidumont left
|
|||
brokenchicken | ... and I thought *I* was sleep deprived :P | 18:46 | |
El_Che | sadly, that part is true | ||
18:47
avuserow left
18:52
avuserow joined
19:01
andrzejku joined,
cdg_ joined
19:04
cdg left
19:05
agentzh left
19:07
agentzh joined
|
|||
brokenchicken | Who's Github's ronaldxs on IRC? It's m-nom or something like that | 19:09 | |
don't seem to b ehere | 19:10 | ||
19:11
darutoko left
19:15
Sound left
19:19
zakharyas joined,
domidumont joined
19:22
rurban1 joined
19:25
rurban left
19:26
_eroux_ is now known as eroux
19:27
cibs left
19:29
cibs joined,
mr_ron joined
|
|||
mr_ron | ronaldxs - mr_ron | 19:30 | |
yoleaux | 24 Jan 2017 20:47Z <brokenchicken> mr_ron: now that I remember more specific test files, a lot of them depend on the test file located in t/spec. This is used for auxiliary files locations for some test files, like module loading ones, and the ones that include t/spec/packages | ||
brokenchicken | Ah, right :) | 19:31 | |
But I no longer have a question. Was just wondering what @already_fudged was about, but read the code :) | |||
19:31
pyrimidine joined
19:34
rurban joined
|
|||
brokenchicken | mr_ron: FWIW we also have #perl6-dev | 19:36 | |
19:37
wizard_ left
19:38
rurban1 left
19:40
labster left
19:41
TEttinger joined
|
|||
brokenchicken | What's QAST::Op.new( :op('locallifetime'), ? Don't see it in docs | 19:43 | |
19:44
zakharyas left,
agentzh left
19:45
rurban left
|
|||
brokenchicken | *crickets* :) | 19:46 | |
Maybe I should try learning this stuff from the other end... | 19:47 | ||
MoarVM -> nqp -> Perl 6 | 19:48 | ||
19:49
pyrimidine left
19:50
pyrimidine joined
|
|||
brokenchicken | wonder if you can write programs with just MoarVM, no other stuff | 19:50 | |
perigrin | if I understood right MoarVM was a very very thin layer beneath npq | 19:51 | |
perlpilot | You can make fire with two sticks, but why when there's other incendiary devices to help you? :) | 19:52 | |
brokenchicken | perlpilot: to discover how fire is made :) | 19:54 | |
19:54
agentzh joined,
pyrimidine left
|
|||
jdv79 | i have this in a role: "has Hash $!state; method !state { return-rw $!state }" | 19:55 | |
is there anthing wrong with that? | |||
brokenchicken | jdv79: well, why do you think somethiong's wrong with it? | 19:56 | |
jdv79 | eventually i get this error from a consuming class: P6opaque: no such attribute '$!state' in type Agent::AtomAgent when trying to get a value | ||
because that | |||
brokenchicken | jdv79: is it the same for method !state is rw { $!state } ? | ||
jdv79 | having trouble golfing it | ||
takes a while to manifest. i'll try that | |||
19:56
cdg joined
|
|||
brokenchicken | 0.o wow | 19:56 | |
jdv79 | nah. same error. | 19:59 | |
19:59
cdg_ left
|
|||
brokenchicken has no idea | 19:59 | ||
jdv79: "takes a while to manifest". So it works fine some of the time? Concurrent code? | 20:00 | ||
jdv79 | its concurrent, yes. | ||
well, the role is composed into half a dozen classes and its not always the same ones that bork | 20:01 | ||
forgot to try with max threads set to 1 y'day | 20:02 | ||
20:02
cdg_ joined
|
|||
brokenchicken | Does that even work? It'll prolly just deadlock. | 20:03 | |
20:04
astj joined
|
|||
jdv79 | its chugging along just fine. | 20:04 | |
brokenchicken | weird, I had deadlocks in roast when max threads was too low | ||
jdv79 | oh, a failed json parse segfaulted. well, that's at least probably not related | ||
brokenchicken | m: role Foo { has Hash $!state; method !state { return-rw $!state } }; for ^100000 .hyper: :batch { $ = class :: does Foo { method x { self!state } }.new.x }; say "nada" | 20:05 | |
jdv79 | I'm running something like two dozen start blocks at once | ||
camelia | rakudo-moar 015231: OUTPUT«(signal XCPU)» | ||
jdv79 | weird | ||
brokenchicken | maybe to do with await | ||
m: role Foo { has Hash $!state; method !state { return-rw $!state } }; for ^10000 .hyper: :batch { $ = class :: does Foo { method x { self!state } }.new.x }; say "nada" | 20:06 | ||
20:06
cdg left
|
|||
camelia | rakudo-moar 015231: OUTPUT«(timeout)» | 20:06 | |
brokenchicken | m: for ^20 { await start await start sleep 2 } | 20:08 | |
camelia | rakudo-moar 015231: OUTPUT«(timeout)» | ||
jdv79 | nope, even with 1 thread it can error | ||
cmon:( | |||
brokenchicken | m: use v6.d.PREVIEW; for ^20 { await start await start sleep 2 } | ||
hm.. weird. I thought that'd work | |||
camelia | rakudo-moar 015231: OUTPUT«(timeout)» | ||
jdv79 needs food | |||
lunch & | 20:09 | ||
20:09
astj left
|
|||
brokenchicken | m: use v6.d.PREVIEW; for ^5 { await start await start sleep 2 } | 20:09 | |
camelia | ( no output ) | ||
brokenchicken | m: use v6.d.PREVIEW; for ^5 { await start await start sleep 2 }; say now - INIT now; | ||
camelia | rakudo-moar 015231: OUTPUT«10.01377108» | 20:10 | |
brokenchicken | Oh, I'm dump | ||
m: await do for ^20 { start await start sleep 2 }; say now - INIT now | |||
camelia | rakudo-moar 015231: OUTPUT«8.008532624» | ||
brokenchicken | wonder how it ends up with 8s | 20:11 | |
m: await do for ^20 { start await start sleep 1 }; say now - INIT now | |||
camelia | rakudo-moar 015231: OUTPUT«3.007262» | ||
brokenchicken | m: await do for ^20 { start await start sleep 3 }; say now - INIT now | ||
camelia | rakudo-moar 015231: OUTPUT«9.00744710» | ||
brokenchicken | m: use v6.d.PREVIEW; await do for ^20 { start await start sleep 3 }; say now - INIT now | ||
camelia | rakudo-moar 015231: OUTPUT«6.009234» | ||
20:15
pyrimidine joined
|
|||
brokenchicken | m: use v6.d.PREVIEW; await do for ^100 { start await start sleep .01 }; say now - INIT now | 20:16 | |
camelia | rakudo-moar 015231: OUTPUT«0.1125727» | ||
brokenchicken | aha! | ||
m: await do for ^100 { start await start sleep .01 }; say now - INIT now | |||
there's the goodness of 6.d :P | |||
camelia | rakudo-moar 015231: OUTPUT«(timeout)» | ||
20:20
domidumont left,
ocbtec left
20:21
Tonik joined
|
|||
RabidGravy | what's the scope visibility of " use v6.d.PREVIEW;" ? CompUnit or global? | 20:24 | |
brokenchicken | compunit | 20:25 | |
you can have one file run 6.c and another 6.d.PREVIEW | |||
m: use lib </tmp/foo>; use c; use d; | 20:26 | ||
camelia | rakudo-moar 015231: OUTPUT«SETTING::src/core/asyncops.pmSETTING::src/core.d/await.pm» | ||
brokenchicken | :) | ||
RabidGravy | so if I have a module with 6.d.PREVIEW it doesn't matter what the code that uses ir does? | ||
brokenchicken | Right | ||
RabidGravy | cool that will make testing easier :) | 20:27 | |
brokenchicken | Not sure how far we can get away with it. E.g. your module returns a 6.c core `Str` object that's then operated by 6.d stuff that expects 6.d Strs with (potentially) different methods and stuff | ||
Geth | doc/coke/bughunt: 107764ae79 | (Will "Coke" Coleda)++ | README.md Update our symptoms |
20:28 | |
brokenchicken | m: '/tmp/foo/d.pm6'.IO.spurt: 「use v6.d.PREVIEW; sub EXPORT { { '&await' => &await } }」 | 20:29 | |
camelia | ( no output ) | ||
20:29
cibs left
|
|||
brokenchicken | m: use lib </tmp/foo>; use d; await start say "hi" | 20:29 | |
camelia | rakudo-moar 015231: OUTPUT«hi» | ||
brokenchicken | m: use lib </tmp/foo>; use d; say &await.file | 20:30 | |
camelia | rakudo-moar 015231: OUTPUT«SETTING::src/core.d/await.pm» | ||
brokenchicken | hehe | ||
a 6.d `await` in 6.c land.... | |||
20:31
lukaramu joined,
cibs joined
|
|||
brokenchicken | ooh | 20:32 | |
m: use lib </tmp/foo>; use d; say (start say "hi").^does("Awaitable") | |||
camelia | rakudo-moar 015231: OUTPUT«hiFalse» | ||
20:33
nowan_ joined
20:35
nowan left
|
|||
brokenchicken | m: '/tmp/foo/d.pm6'.IO.spurt: 「use v6.d.PREVIEW; sub EXPORT { { '&new-await' => &await.cando(\(class :: does Awaitable {method get-await-handle {}}.new))[0] } }」 | 20:35 | |
camelia | ( no output ) | ||
brokenchicken | m: use lib </tmp/foo>; use d; new-await start say "hi" | 20:36 | |
camelia | rakudo-moar 015231: OUTPUT«===SORRY!===When invoking 2 '', provided outer frame 0x2a117e8 (4 'EXPORT') does not match expected static frame 0x2a118f0 (3 '')» | ||
brokenchicken | Hehe. NOW it's starting to crack :P | ||
20:38
andrzejku left
|
|||
brokenchicken | Hm. That's weird really. 'Cause in that previous version, with &await' => &await... It's exporting the proto too, eh? | 20:40 | |
And since it didn't crap out, I'm guessing the await start called a 6.c candidate | |||
This is all mind-bending a bit :P | |||
And what else I realize. This use v6.*-per-file limitation needs a better eval bot... | 20:43 | ||
whoa.. it's quittin' time :o | |||
20:48
nowan joined
20:51
nowan_ left
20:54
Tonik left
20:56
cdg joined
20:57
andrzejku joined
20:59
cdg_ left
21:00
agentzh left
21:04
sufrostico left
21:08
eroux is now known as eroux[away],
pmurias joined,
cdg_ joined
21:11
labster joined
21:12
cdg left
21:13
cdg joined
21:14
pmurias left
21:16
cdg_ left
21:17
cdg left
21:21
eroux[away] left
21:30
jraglin left
|
|||
Geth | doc: aae50f7b9c | (Wenzel P. P. Peppmeyer)++ | doc/Language/variables.pod6 link to identifier |
21:31 | |
doc: 8553738991 | (Wenzel P. P. Peppmeyer)++ | doc/Language/syntax.pod6 doc interpolation of colon pairs in identifiers |
|||
samcv | morning all o/ | 21:32 | |
RabidGravy | Ooh the non-blocking await really breaks HTTP::Server::Tiny | 21:33 | |
mst | non blocking await? | 21:34 | |
El_Che | mst: github.com/rakudo/rakudo/pull/1004 | 21:35 | |
mst | aha! | 21:36 | |
RabidGravy | It winds up with a rather scary "Attempt to unlock mutex by thread not holding it" | 21:37 | |
Geth | doc: 938c8ea728 | (Wenzel P. P. Peppmeyer)++ | 2 files link to identifier |
21:39 | |
doc: 041c1591e1 | (Wenzel P. P. Peppmeyer)++ | doc/Language/terms.pod6 fix typo |
|||
doc: 1be171ca36 | (Wenzel P. P. Peppmeyer)++ | doc/Language/terms.pod6 more linking to identifier |
|||
21:41
labster left
21:42
labster joined
|
|||
cale2 | how do I search for the X operator? | 21:46 | |
it's not coming up on the docs search | |||
21:46
skids left
|
|||
RabidGravy | docs.perl6.org/language/operators#...perator%29 | 21:47 | |
"cross" | |||
21:47
skids joined
|
|||
cale2 | RabidGravy: it shows up in search when you type "xx" in the search box | 21:47 | |
could be something to look into | |||
21:48
skids left
|
|||
cale2 | wait it was the wrong routine | 21:48 | |
So there's no texas variant of the cross operator :/ | |||
21:49
espadrine_ joined
21:52
FROGGS left
|
|||
gfldex | cale2: it in the javascript definition, so it must be a javascript problem | 21:52 | |
21:54
andrzejku left
21:56
Vynce left
|
|||
samcv | m: 'a'.uniprop('East_Asian_Width').say | 21:56 | |
camelia | rakudo-moar 015231: OUTPUT«Na» | ||
samcv | cool | ||
21:58
pmurias joined
22:00
Actualeyes left,
curt_ joined
22:01
cdg joined
|
|||
AlexDaniel | samcv: what's “Na”? | 22:02 | |
samcv | uh | 22:03 | |
idk i forget | |||
i have my ucd rewrite resolving all the short names into long names at least, so hopefully it won't always be as unhelpful | |||
curt_ | m: try { my $proc = Proc::Async.new('cat', :r, :w); my $done = $proc.start; say "try sending"; await $proc.say("hi there"); say "worked"; $proc.close-stdin; await $done; CATCH { default { say "caught"; } } }; say "done"; | 22:04 | |
camelia | rakudo-moar 015231: OUTPUT«caughtdone» | ||
samcv | AlexDaniel, see unicode.org/Public/UNIDATA/Property...liases.txt | ||
it apparently means Narrow | |||
curt_ | m: try { my $proc = Proc::Async.new('nothing', :r, :w); my $done = $proc.start; say "try sending"; await $proc.say("hi there"); say "worked"; $proc.close-stdin; await $done; CATCH { default { say "caught"; } } }; say "done"; | ||
camelia | rakudo-moar 015231: OUTPUT«caughtdone» | ||
samcv | m: '≔'.uniprop('ea').say | ||
camelia | rakudo-moar 015231: OUTPUT«N» | ||
samcv | N is neutral | 22:05 | |
22:07
Vynce joined
22:08
cdg left,
cdg joined
|
|||
cale2 | I want to zip two strings of different length to Pairs | 22:11 | |
AlexDaniel | samcv: by the way, I want to teach unicodable to dump all properties of a character. Where do I get the list of properties? | ||
cale2 | m: 'cale'.comb Z 'helloworld'.comb | ||
camelia | rakudo-moar 015231: OUTPUT«WARNINGS for <tmp>:Useless use of "Z" in expression ".comb Z 'helloworld'.comb" in sink context (line 1)» | ||
cale2 | m: say 'cale'.comb Z 'helloworld'.comb | 22:12 | |
camelia | rakudo-moar 015231: OUTPUT«((c h) (a e) (l l) (e l))» | ||
samcv | AlexDaniel, second column unicode.org/Public/UNIDATA/PropertyAliases.txt | ||
or | |||
cale2 | m: say 'cale'.comb Z 'he'.comb | ||
camelia | rakudo-moar 015231: OUTPUT«((c h) (a e))» | ||
gfldex | m: 'cale'.comb «=>» 'helloworld'.comb | ||
camelia | ( no output ) | ||
AlexDaniel | m: say roundrobin 'cale'.comb, 'helloworld'.comb | ||
camelia | rakudo-moar 015231: OUTPUT«((c h) (a e) (l l) (e l) (o) (w) (o) (r) (l) (d))» | ||
samcv | or see here github.com/perl6/roast/issues/195 | ||
gfldex | m: dd 'cale'.comb «=>» 'helloworld'.comb | ||
camelia | rakudo-moar 015231: OUTPUT«(:c("h"), :a("e"), :l("l"), :e("l"), :c("o"), :a("w"), :l("o"), :e("r"), :c("l"), :a("d"))» | ||
cale2 | AlexDaniel: thanks | ||
samcv | so basically all the ones in the 2nd column plus Emoji | 22:13 | |
Emoji_Presentation | |||
Emoji_Modifier | |||
Emoji_Modifier_Base | |||
plus Numeric_Value_Numerator and Numeric_Value_Denominator | |||
cale2 | gfldex I need it to always favor one side. what the heck is that operator haha | ||
AlexDaniel | samcv: but… any way to get it from perl 6? | ||
samcv | no way | ||
AlexDaniel | :'( | ||
gfldex | => is the Pair constructor and «» is the hyper that doesn't care about length of arguments | 22:14 | |
22:14
RabidGravy left
|
|||
cale2 | «» <- not to be confused with something else, as I discovered | 22:15 | |
timotimo | cale2: but the cross operator is already texas? | ||
22:15
rba_ joined
|
|||
cale2 | timotimo, try searching for it in the docs | 22:15 | |
samcv | AlexDaniel, also there's NFG_QC too | ||
timotimo | aye, it's missing | ||
but that has nothing to do with the fact that X is in ASCII | |||
gfldex | timotimo: it's not, it's in the javascript index | 22:16 | |
cale2 | timotimo: type "xx" and you can find something similar | ||
gfldex | for whatever reason jquery is acting up | ||
timotimo | xx is very unsimilar, actually | ||
gfldex | "X " does work | ||
cale2 | yeah, but "xx" and you see the single "x" | ||
22:16
avuserow left
|
|||
timotimo | but x and X aren't the same thing | 22:16 | |
22:17
Actualeyes joined
|
|||
AlexDaniel | m: say ‘cale’.comb »=>» ‘helloworld’.comb | 22:17 | |
camelia | rakudo-moar 015231: OUTPUT«(c => h a => e l => l e => l)» | ||
cale2 | m: say 'cale'.comb Z 'he'.comb # I need the left side to remain the same length, but the right side to cycle forever | ||
camelia | rakudo-moar 015231: OUTPUT«((c h) (a e))» | ||
AlexDaniel | m: say ‘cale’.comb «=>« ‘helloworld’.comb | ||
camelia | rakudo-moar 015231: OUTPUT«(c => h a => e l => l e => l c => o a => w l => o e => r c => l a => d)» | ||
gfldex | the search is case insensitive | ||
22:17
bjz left
|
|||
gfldex | m: say ‘cale’.comb Z[=>] ‘helloworld’.comb | 22:17 | |
camelia | rakudo-moar 015231: OUTPUT«(c => h a => e l => l e => l)» | ||
cale2 | AlexDaniel: Sorry, I need the left side to be the one determining the length | ||
AlexDaniel | cale2: so use »=>» then | 22:18 | |
22:18
avuserow joined
|
|||
cale2 | gfldex: that's the solution | 22:18 | |
what is going on with that extra arrow next to Z? | |||
brokenchicken | makes a pair | 22:19 | |
cale2 | m: say ‘cale’.comb Z[=>] ‘he’.comb | ||
AlexDaniel | it's a pair operator | ||
camelia | rakudo-moar 015231: OUTPUT«(c => h a => e)» | ||
gfldex | it's the inner operator of the meta Z | ||
cale2 | wait, still doesn't work... | ||
gfldex | meta Z is not the same thing as Z | ||
AlexDaniel | »=>» is what you want | ||
brokenchicken | m: say ‘cale’.comb Z=> ‘he’.comb | ||
camelia | rakudo-moar 015231: OUTPUT«(c => h a => e)» | ||
cale2 | m: say ‘cale’.comb »=>» ‘he’.comb | ||
camelia | rakudo-moar 015231: OUTPUT«(c => h a => e l => h e => e)» | ||
brokenchicken | gfldex: what does the [] on it do? | ||
AlexDaniel | m: say 5 [+] 2 | ||
camelia | rakudo-moar 015231: OUTPUT«7» | ||
AlexDaniel | nothing | 22:20 | |
brokenchicken | OK | ||
cale2 | »=>» that doesn't work because it just repeats the last letter. I need the right list to cycle | ||
gfldex | brokenchicken: precedence, so it forces => to be the inner operator of the meta chain | ||
timotimo | Z=> and Z[=>] is the same thing, but the latter is more readable | ||
brokenchicken | meta chain? | ||
brokenchicken feels outta the loop :o | |||
AlexDaniel | m: say ‘cale’.comb »=>» ‘XY’.comb | ||
camelia | rakudo-moar 015231: OUTPUT«(c => X a => Y l => X e => Y)» | ||
AlexDaniel | cale2: are you reading it correctly? | 22:21 | |
cale2 | Yeah, that worked. I read it wrong haha | ||
m: say ‘cale’.comb»=>»‘XY’.comb | 22:22 | ||
camelia | rakudo-moar 015231: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Malformed postfixat <tmp>:1------> 3say ‘cale’.comb»7⏏5=>»‘XY’.comb expecting any of: method arguments postfix» | ||
brokenchicken | .tell RabidGravy be sure to report your breakages so we iron everything out in v6.d.PREVIEW and not leave it until v6.d ;) | ||
yoleaux | brokenchicken: I'll pass your message to RabidGravy. | ||
cale2 | m: say ‘cale’.comb»=>» ‘XY’.comb | ||
camelia | rakudo-moar 015231: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Malformed postfixat <tmp>:1------> 3say ‘cale’.comb»7⏏5=>» ‘XY’.comb expecting any of: method arguments postfix» | ||
AlexDaniel | cale2: nope, you need whitespace there | ||
cale2 | I thought hyper operator was supposed to butt up against | ||
list>>.map(stuff) | |||
AlexDaniel | that's not that | 22:23 | |
timotimo | that's hyper methodcall | ||
method calls have only allowed you to put a space in front since half a year or maybe a whole year | |||
22:23
rurban joined
|
|||
cale2 | m: say ‘cale’.comb >>=>>> ‘XY’.comb | 22:23 | |
camelia | rakudo-moar 015231: OUTPUT«(c => X a => Y l => X e => Y)» | ||
cale2 | m: say ‘cale’.comb >> => >> ‘XY’.comb | ||
camelia | rakudo-moar 015231: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unsupported use of >> to do right shift; in Perl 6 please use +> or ~>at <tmp>:1------> 3say ‘cale’.comb >>7⏏5 => >> ‘XY’.comb» | ||
timotimo | for that case you can use [ ] around => to make it more readable | ||
cale2 | m: say ‘cale’.comb >>[=>]>> ‘XY’.comb | ||
camelia | rakudo-moar 015231: OUTPUT«(c => X a => Y l => X e => Y)» | ||
cale2 | nice | ||
y'all are getting very haskelly with these operators | 22:24 | ||
gfldex | brokenchicken: see design.perl6.org/S03.html#Nesting_o...aoperators | ||
AlexDaniel doesn't see how adding another two non-letter characters is going to help with readability, but I'll note that… | |||
gfldex | ENODOC on nesting metaoperators btw | 22:25 | |
@a >>[>]>> $b # oh yeah | |||
cale2 | m: say ‘cale’.comb >>[=>]>> ‘QRSTUVQXYZ’.comb | ||
camelia | rakudo-moar 015231: OUTPUT«(c => Q a => R l => S e => T)» | ||
22:25
Vynce1 joined
|
|||
cale2 | perfect | 22:25 | |
brokenchicken | m: my @a <a b c>; my @b = 1, 2, 3; say @a [X+]= @b | 22:26 | |
camelia | rakudo-moar 015231: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Missing required term after infixat <tmp>:1------> 3my @a <a b c>7⏏5; my @b = 1, 2, 3; say @a [X+]= @b expecting any of: prefix term» | ||
brokenchicken | m: my @a = <a b c>; my @b = 1, 2, 3; say @a [X+]= @b | ||
camelia | rakudo-moar 015231: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏) in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
cale2 | I'm sure there is an intuitive explanation for the hyper operator. It's just not clear on first glance. | ||
22:26
Vynce left
|
|||
brokenchicken | m: my @a = 10, 20, 30; my @b = 1, 2, 3; say @a [X+]= @b | 22:27 | |
camelia | rakudo-moar 015231: OUTPUT«[11 12 13 21 22 23 31 32 33]» | ||
22:27
sena_kun left
|
|||
brokenchicken | m: my @a = 10, 20, 30; my @b = 1, 2, 3; say @a X[+=] @b | 22:27 | |
camelia | rakudo-moar 015231: OUTPUT«(11 13 16 21 23 26 31 33 36)» | ||
cale2 | Why not instead make a "cycle" method that repeats a list infinitely. Then you don't need "hyper" at all. | ||
brokenchicken | cale2: see rotor | ||
cale2 | brokenchicken: I did. I thought that was for chunking | 22:28 | |
lizmat | m: dd ((1,2,3) xx *)[^10] | ||
camelia | rakudo-moar 015231: OUTPUT«((1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3))» | ||
brokenchicken | lizmat++ | ||
lizmat | m: dd (|(1,2,3) xx *)[^10] | ||
camelia | rakudo-moar 015231: OUTPUT«(1, 2, 3, 1, 2, 3, 1, 2, 3, 1)» | ||
brokenchicken | gfldex: what about "meta Z is not the same thing as Z". I thought Z was just the meta Z with infix:<,> op | ||
samcv | do Augmenting built-in classes make executed code slower? | 22:29 | |
lizmat | brokenchicken: internally it works a bit more optimized, but otherwise Z is the same as Z, | ||
afaik | |||
samcv | or just compiling? also curious about custom operators | ||
22:29
agentzh joined
|
|||
samcv | aside from compilation speed, is there any speed reduction from using them? | 22:29 | |
lizmat | samcv: creating a custom operator means cloning the grammar | 22:30 | |
gfldex | i believe to remember that meta Z behaves differently with LoLs but that may just have been a bug | ||
lizmat | which is still a lot of work at compile time | ||
samcv | what about run-time? | ||
gfldex | the inliner should inline them | 22:31 | |
timotimo | hyper operators will attempt to mirror the incoming structure | ||
lizmat | I recall a check in the setting that makes sure we didn't clone the grammar during setting building | ||
brokenchicken | cale2: you're right; the `xx` is the right tool | ||
timotimo | (which is why they also work on hashes) | ||
brokenchicken | Also I notice a bug with .rotor: | ||
mc: m: dd (1,2,3).rotor(3 => -3)[^10] | |||
committable6 | brokenchicken, ¦«2015.12»: ((1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3)) | ||
brokenchicken | m: m: dd (1,2,3).rotor(3 => -3)[^10] | ||
camelia | rakudo-moar 015231: OUTPUT«Rotorizing gap is out of range. Is: -3, should be in -2..^Inf; Ensure a negative gap is not larger than the length of the sublist in block <unit> at <tmp> line 1» | ||
lizmat | because of its runtime ramifications, so I think there are some runtime ramifications as well | ||
brokenchicken | m: m: dd (1,2,3).rotor(3 => -3, :partial)[^10] | 22:32 | |
camelia | rakudo-moar 015231: OUTPUT«Rotorizing gap is out of range. Is: -3, should be in -2..^Inf; Ensure a negative gap is not larger than the length of the sublist in block <unit> at <tmp> line 1» | ||
timotimo | once the grammar is cloned, it's no performance issue | ||
brokenchicken | m: m: dd (1,2,3).rotor(3 => -2, :partial)[^10] | ||
camelia | rakudo-moar 015231: OUTPUT«((1, 2, 3), (2, 3), (3,), Nil, Nil, Nil, Nil, Nil, Nil, Nil)» | ||
jnthn | Only slightly longer startup time because of deserializing the extra stuff | ||
And even then you probably won't hit it unless you EVAL | |||
samcv | so this github.com/samcv/UCD/blob/master/l...rators.pm6 should not be acause of slowness? | ||
jnthn | 'cus we lazily deserialize | ||
samcv | unless EVAL? | ||
22:33
jp_ joined
|
|||
lizmat | brokenchicken: that last one feels wrong ? | 22:33 | |
ah, no, actually, that's correct | |||
brokenchicken | lizmat: yeah, seems an off-by-one | ||
jnthn | samcv: Those operator defs should only cuase compile-time slowdown; for runtime they'll dispatch just like normal operators | ||
cale2 | m: say |'brokenchicken'.comb xx 20 | ||
camelia | rakudo-moar 015231: OUTPUT«(b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i ...)» | ||
cale2 | m: say |'brokenchicken'.comb xx * | 22:34 | |
camelia | rakudo-moar 015231: OUTPUT«(...)» | ||
samcv | kk thanks jnthn | ||
gfldex | cale2: please note that `say` is a wee bit magic | ||
jnthn | samcv: About EVAL - I just mean that if you precompile a module with custom operators used in it, then it will include the language tweaks as part of its precompilation. | ||
lizmat | brokenchicken: off by one how ? | ||
brokenchicken | lizmat: Actually, not even an off-by-one, but it's checking the negative gap against the positive step instead of whether or not it went past the start of the list | ||
mc: dd (^10).rotor(5, 4 => -5, :partial)[^10] | 22:35 | ||
committable6 | brokenchicken, ¦«2015.12»: ((0, 1, 2, 3, 4), (5, 6, 7, 8), (4, 5, 6, 7, 8), (9,), Nil, Nil, Nil, Nil, Nil, Nil) | ||
jnthn | samcv: But since we lazily load stuff then you'll probably only pay for that if you actually need the language | ||
brokenchicken | lizmat: ^ like there it isn't even an infinite list | ||
jnthn | samcv: EVAL being something that needs it, because an EVAL is done in terms of the enclosing language. | ||
brokenchicken | mc: dd (^10).rotor(2, 1 => -2, :partial)[^10] | ||
committable6 | brokenchicken, ¦«2015.12»: ((0, 1), (2,), (1, 2), (3,), (2, 3), (4,), (3, 4), (5,), (4, 5), (6,)) | ||
brokenchicken | m: dd (^10).rotor(2, 1 => -2, :partial)[^10] | ||
camelia | rakudo-moar 015231: OUTPUT«Rotorizing gap is out of range. Is: -2, should be in -0..^Inf; Ensure a negative gap is not larger than the length of the sublist in block <unit> at <tmp> line 1» | ||
22:35
bjz joined
|
|||
brokenchicken | Sad that ain't any test for that behaviour :( | 22:36 | |
lizmat | yeah, otherwise I would have noticed during the refactor | ||
cale2 | What is more intuitive between these two: $secret.comb Z |$keyword.comb xx * OR $secret.comb >>[=>]>> $keyword.comb | 22:37 | |
22:37
Vynce joined
|
|||
brokenchicken | cale2: the first one | 22:37 | |
cale2: but I don't really program Perl 6... | |||
22:37
Actualeyes left
|
|||
cale2 | brokenchicken: you say that often, but you clearly do haha | 22:38 | |
gfldex | hyperops are candidates for autothreading, so asking for intuition is wrong | ||
timotimo | right, hyper operators are hyper, while Z and X metaops are lazy | 22:39 | |
brokenchicken | Hm. GitHub added repository "topics" for ease of discovaribility | ||
22:39
Vynce1 left
|
|||
timotimo | oh? interesting | 22:39 | |
22:39
rindolf left
|
|||
jp_ | Hi, I have a question. I don't understand why I have to add {;} in a regex to get the "correct" behavour. You can see my test case at : gist.github.com/anonymous/fca80723...c674c50469 | 22:39 | |
gfldex | github.com/blog/2309-introducing-topics | 22:40 | |
jp_ | If you have any idea ... | ||
timotimo | if that's the case, you might want to use || instead of | in some places | 22:41 | |
brokenchicken | m: say 84+131+84+63+153+4 | ||
camelia | rakudo-moar 015231: OUTPUT«519» | ||
timotimo | with {;} (even though {} should also work) you can force the declarative prefix to end earlier than it otherwise would | ||
jp_ | good to know... | ||
brokenchicken | cale2: well, in the past ~9 months I wrote 519 lines of Perl 6 code. All for a single project :) github.com/perl6/geth Hardly what'd I'd call "programming" | 22:42 | |
timotimo | the | alternation will first go into the branch that has the longest match in its declarative prefix | ||
jp_ | ok | ||
brokenchicken | What's a declarative prefix? | ||
timotimo | everything from the beginning to the first non-declarative piece | 22:43 | |
brokenchicken | OK :) | ||
brokenchicken has no idea which pieces are declarative :o | |||
timotimo | || for example is non-declarative | ||
it's imperative, because it has an "order of execution" to it | |||
{ say "hi" } is imperative, because nobody knows what a piece of code is able to do | 22:44 | ||
brokenchicken | some comp-sci stuff. | ||
timotimo | backreferences are also not declarative | ||
22:44
Actualeyes joined
|
|||
brokenchicken | OK. I think I get it. Thanks. | 22:44 | |
[ 'foo' | 'bar' ] is declarative. [ $meow ] ain't. [ .+ ] is | 22:45 | ||
timotimo | $meow could be declarative | ||
but for that we'd have to recompile the NFA every time we do a match | |||
brokenchicken | Ah | ||
timotimo | (in other words every time $meow could have changed) | ||
mr_ron | Warning on mixed | and || and related documentation needs github.com/perl6/doc/issues/1141 | 22:47 | |
brokenchicken | What's QAST::Op.new( :op('locallifetime'), ? It's not documented. | ||
22:48
bjz left
|
|||
brokenchicken | It's here: github.com/rakudo/rakudo/blob/nom/....nqp#L7845 | 22:48 | |
Geth | perl6.org: hankache++ created pull request #71: Link to "Think Perl 6" page on oreilly.com |
22:49 | |
timotimo | it's for defining when local variables can be considered dead | ||
Geth | perl6.org: dcfc23ce69 | (Naoum Hankache)++ | source/resources/index.html Link to "Think Perl 6" page on oreilly.com |
||
perl6.org: fcf6628f0f | lizmat++ | source/resources/index.html Merge pull request #71 from hankache/patch-1 Link to "Think Perl 6" page on oreilly.com |
|||
TimToady | brokenchicken: for instance, I think the temporary setting of $_ on the right side of ~~ uses that | 22:52 | |
Geth | perl6.org: 8afc235eb2 | (Zoffix Znet)++ | source/resources/index.html s{}{https://} Where sites offer it |
22:53 | |
timotimo | ^- good call | ||
Geth | perl6.org: ca5dfe73fa | (Zoffix Znet)++ | source/resources/index.html s{}{https://} |
22:54 | |
brokenchicken | Thanks. | ||
22:57
cdg left
22:58
lukaramu left
|
|||
jp_ | Hi again, I have another testcase with the same grammar parsing another text where this is when I activate the Grammar::Tracer that I get the result I want. You can find my testcase at gist.github.com/anonymous/27c7c108...c491a5064. | 23:04 | |
23:04
rurban left
|
|||
jp_ | ( Note this time this is when I drop the {;} that I get the "good" result ... | 23:05 | |
23:06
kyan joined
|
|||
lizmat | brokenchicken: re rotor allowing negative gap beyond the step forwar | 23:07 | |
d: that would imply that all values of the source iterator should be cached :-( | |||
brokenchicken | yup, which is why I didn't say it has to be fixed :P~ | 23:08 | |
23:08
RandalSchwartz joined
|
|||
brokenchicken | The merlyn has graced us with his presence! | 23:08 | |
RandalSchwartz | "rakudobrew build moar" doesn't seem to have updated anything in "bin/*" since January 3rd. | ||
is there something I should change? | |||
23:09
Actualeyes left
|
|||
brokenchicken | RandalSchwartz: maybe run rakudobrew rehash? | 23:09 | |
I dunno. It is meant to update bin/*? | |||
RandalSchwartz | that's what was building my copy of "perl6" | ||
brokenchicken | The rehash thing updates its shims | ||
RandalSchwartz | in "bin/*" | ||
brokenchicken | Hm. You can run perl6 -v to see which version you got | 23:10 | |
m: say $*PERL.compiler.version | |||
camelia | rakudo-moar 015231: OUTPUT«v2017.01.127.g.0152316» | ||
brokenchicken | should be something along those lines ^ with 127 being the number of commits since 2017.01 compiler release | ||
RandalSchwartz | This is Rakudo version 2017.01-127-g0152316f5 built on MoarVM version 2017.01-25-g70d4bd53 | ||
brokenchicken | Yup, You got HEAD | ||
RandalSchwartz | Ahh. So, somehow, that's newer than the bin. :) | ||
I was worried since the bin wasn't being updated | 23:11 | ||
thanks | |||
brokenchicken | Looks like ~/.rakudobrew/bin/perl6 is a Perl 5 script that just figures out The Right Thing to become and execs into it | ||
RandalSchwartz | ok | 23:12 | |
brokenchicken | lizmat: I mean, I guess it's useful to have X ways to use rotor than X-1 ways, but there weren't any tests and I'm guessing .rotor would need to be completely changed after your rewrite and there weren't any roast tests | 23:14 | |
lizmat | yeah, it would have to change rather significantly | 23:15 | |
but nothing unoverseeable | |||
it's just that none of the examples in the doc use this feature, and there are no tests for it | |||
brokenchicken | yeah | ||
lizmat | so I'm going to leave this up to TimToady to decide upon, as he wrote the original List.rotor handler | 23:16 | |
if my memory servers me correctly | |||
23:17
RandalSchwartz left
|
|||
lizmat | *serves | 23:17 | |
23:19
pyrimidine left
23:20
pyrimidine joined
23:21
wamba left,
Actualeyes joined
|
|||
lizmat | brokenchicken: perhaps the solution is to reinstate a separate candidate for List.rotor | 23:22 | |
brokenchicken | ¯\_(ツ)_/¯ up to you and TimToady :) | 23:23 | |
23:24
pyrimidine left
23:26
lep-delete left
23:28
lep-delete joined
|
|||
lizmat | hmmm.. appears List.rotor was a co-production of nine, brokenchicken and me | 23:30 | |
brokenchicken: in any case, it appears from the error message "Ensure a negative gap is not larger than the length of the sublist" | 23:31 | ||
that you should not be able to do 2 => -3 | |||
brokenchicken | Sounds good :) | ||
23:35
girafe left
23:41
as__ joined
|
|||
as__ | How can I redefine the $?TABSTOP in my code | 23:41 | |
? | |||
23:42
Actualeyes left
|
|||
brokenchicken | Never saw those redefined, since they're compile-time constants. | 23:42 | |
as__: how come you want to? | |||
[Coke] | m: $?TABSTOP=4; # nope | 23:44 | |
camelia | rakudo-moar b9d927: OUTPUT«Cannot assign to an immutable value in block <unit> at <tmp> line 1» | ||
timotimo | m: my constant $?TABSTOP = 8; | 23:45 | |
camelia | rakudo-moar b9d927: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Constants with a '?' twigil not yet implemented. Sorry. at <tmp>:1------> 3my constant $?TABSTOP = 87⏏5;» | ||
timotimo | seems to be allowed only in the core setting | ||
as__ | so kinda not possible | 23:46 | |
[Coke] | m: my constant $?HI = 3; $?HI=4; | ||
camelia | rakudo-moar b9d927: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Constants with a '?' twigil not yet implemented. Sorry. at <tmp>:1------> 3my constant $?HI = 37⏏5; $?HI=4;» | ||
as__ | it may be useful for heredocs with tabs instead of spaces | ||
timotimo | i'm not sure if heredocs and tabs mix well already | 23:47 | |
as__ | more precisely, with mixture of tabls and spaces | ||
timotimo | i.e. whether "\t \t \t" is the same as "\t\t\t" | ||
yeah | |||
as__ | a tab is assumed as 8 spaces | ||
brokenchicken | m: "\tx\n y".indent(-2).uninames.say | 23:48 | |
camelia | rakudo-moar b9d927: OUTPUT«(SPACE SPACE SPACE SPACE SPACE SPACE LATIN SMALL LETTER X <control-000A> LATIN SMALL LETTER Y)» | ||
lizmat | I seem to recall that the use of $?TABSTOP was for Str.indent and Str.de-indent | 23:49 | |
oops, scratch de-indent | |||
I'm not sure why Str.indent uses $?STABSTOP instead of a $*TABSTOP that gets its initial value from $?TABSTOP | 23:50 | ||
as__ | perl6advent.wordpress.com/2013/12/...docs-docs/ reads "(Tabs are considered to be 8 spaces long, unless you change $?TABSTOP. " | ||
brokenchicken | hehehe STABSTOP :P | 23:51 | |
lizmat | well, and there you go, you can't | ||
because before Christmas we weren't sure you *could* change something like $?FOO in your own code | |||
brokenchicken | And it's pretty easy to workaround it | ||
as__ | like how? | ||
lizmat | so we made it illegal until we figure it out | ||
brokenchicken | m: "\tx\n y".subst(:g, /^(\s+)/, { .[0].subst: "\t", " " x 4 }).indent(-2).uninames.say | 23:52 | |
camelia | rakudo-moar b9d927: OUTPUT«(SPACE SPACE LATIN SMALL LETTER X <control-000A> LATIN SMALL LETTER Y)» | ||
brokenchicken | Sorry, ^^ not ^ | ||
m: "\tx\n y".subst(:g, /^^(\s+)/, { .[0].subst: "\t", " " x 4 }).indent(-2).uninames.say | |||
camelia | rakudo-moar b9d927: OUTPUT«(SPACE SPACE LATIN SMALL LETTER X <control-000A> LATIN SMALL LETTER Y)» | ||
as__ | Yes but not in heredocs before the closing label | ||
or how do you call it? | |||
brokenchicken | as__: personally, I wouldn't be mixing tabs and spaces in my code so would never encounter that issue with heredocs | 23:54 | |
as__ | theory is more important for me than practice at the moment :) just figured out that you cannot mix it and wanted to know how to deal with that | 23:55 | |
brokenchicken | as__: we have an acronym for that: DITHWIDT—Doctor, It Hurts When I Do This | ||
You'd have to indent your heredoc with, say, a tab on one line, then not-8 spaces on another to ever encounter this. | 23:56 | ||
23:59
AlexDaniel left
|