»ö« 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:04
yqt left
00:11
cowens joined
00:14
eliasr left
|
|||
cowens | Is Uni intentionally a read-only type? | 00:16 | |
00:17
awwaiid left
00:18
awwaiid joined
|
|||
timotimo | yes | 00:33 | |
cowens | So, any Uni method should return a new Uni? | 00:38 | |
Which means methods like .chop are right out? | |||
or at least can’t work like their Str counterparts | 00:39 | ||
MasterDuke | .chop is non-mutating now | 00:41 | |
00:41
awwaiid left
|
|||
MasterDuke | m: my $a = "ab"; $a.chop; say $a | 00:41 | |
camelia | rakudo-moar 13f479: OUTPUT«ab» | ||
MasterDuke | m: my $a = "ab"; my $b = $a.chop; say $b | ||
camelia | rakudo-moar 13f479: OUTPUT«a» | ||
00:42
pierre_ joined
|
|||
cowens | Ah, I missed that. Must read more closely . | 00:43 | |
MasterDuke | SourceBaby: help | ||
SourceBaby | MasterDuke, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See modules.perl6.org/dist/CoreHackers::Sourcery | ||
MasterDuke | s: Str, 'chop' | ||
SourceBaby | MasterDuke, Sauce is at github.com/rakudo/rakudo/blob/13f4...ol.pm#L111 | ||
MasterDuke | s: "ab", 'chop' | 00:44 | |
SourceBaby | MasterDuke, Sauce is at github.com/rakudo/rakudo/blob/13f4...ol.pm#L111 | ||
p3rln00b | s: "ab", "chop", \() | 00:45 | |
SourceBaby | p3rln00b, Sauce is at github.com/rakudo/rakudo/blob/13f4...Str.pm#L78 | ||
MasterDuke | p3rln00b++ | ||
cowens: ^^^ | 00:46 | ||
00:47
awwaiid joined
|
|||
cowens | nqp::isgt_i is > for integers? | 00:47 | |
p3rln00b | Yes | ||
cowens | and nqp::sub_i is []? | ||
p3rln00b | cowens: subtraction of ints. See github.com/perl6/nqp/blob/master/d...s.markdown | 00:48 | |
cowens | ah | ||
I was thinking subscript | |||
MasterDuke | nqp::atpos i beliebe | 00:50 | |
*believe | |||
cowens | makes sense | ||
timotimo | cowens: the nqp::blah stuff maps mostly 1:1 to stuff in MoarVM's src/core/interp.c (how exactly they map can be found in nqp's src/vm/moar/QAST/QASTOperationsMAST.nqp) | 00:54 | |
but i'm quite late for bed right now, so i can't help further than that :( | 00:55 | ||
01:04
labster left
01:08
pierre_ left
01:10
awwaiid left
01:11
labster joined
01:12
awwaiid joined
01:16
pierre_ joined,
awwaiid left
01:18
awwaiid joined
01:21
pierre_ left
01:29
Derperperd left,
Derperperd_ joined,
canopus left,
bpmedley left
|
|||
dalek | c: a174105 | coke++ | doc/Language/ (2 files): e.g., not eg |
01:33 | |
01:34
pierre_ joined
|
|||
dalek | c/spellcheck: 15346a5 | coke++ | doc/ (11 files): use full word. |
01:34 | |
c/spellcheck: c83fe47 | coke++ | doc/Language/ (2 files): standardize on regexes |
|||
c/spellcheck: 1429a85 | coke++ | xt/.aspell.pws: moar words |
|||
c/spellcheck: a174105 | coke++ | doc/Language/ (2 files): e.g., not eg |
|||
c/spellcheck: f80414d | coke++ | doc/Language/ (2 files): Merge branch 'master' into spellcheck |
|||
01:35
rgrinberg joined,
edenc joined
01:36
canopus joined
01:37
awwaiid left
01:40
awwaiid joined
01:46
ilbot3 left
|
|||
dalek | c/spellcheck: a279942 | coke++ | xt/.aspell.pws: moar words |
01:47 | |
01:47
ilbot3 joined
01:58
bioduds joined
|
|||
bioduds | hi guys, sorry to disturb, what is this error telling me? Asked to remove 2 spaces, but the shortest indent is 0 spaces in any descend at gen/moar/m-Perl6-Actions.nqp line 473 | 01:58 | |
I didn't understand | |||
geekosaur | usually means you have an indented here document, but one line in it isn't indented enough | 02:01 | |
02:05
awwaiid left,
rgrinberg left
|
|||
bioduds | yes, thanks | 02:06 | |
geekosaur : tx | |||
p3rln00b | bioduds: got code that produced that? It's LTA the error is referencing guts | 02:08 | |
bioduds | p3rln00b : tx, solved with geekosaur hint :) | 02:09 | |
02:09
awwaiid joined
|
|||
geekosaur | yes, but p3rln00b is right, the error and the code that produced the error should probably be filed as an LTA ticket | 02:09 | |
p3rln00b | m: q:to/x/;y x | ||
camelia | rakudo-moar 13f479: OUTPUT«Asked to remove 2 spaces, but the shortest indent is 0 spaces in any trim_heredoc at gen/moar/m-Perl6-Actions.nqp line 499» | ||
geekosaur | because that's a lousy error message | 02:10 | |
bioduds | oh, so sorry, what should I do? | ||
02:10
dayangkun joined
|
|||
p3rln00b | bioduds: submit a bug report, with the code that produce your error | 02:12 | |
bioduds | yes, where, please? | 02:13 | |
p3rln00b | bioduds: send an email to [email@hidden.address] | ||
02:13
huggable joined
|
|||
bioduds | ok, sent! :) | 02:14 | |
02:14
awwaiid left
|
|||
p3rln00b | bioduds++ thanks | 02:14 | |
02:14
awwaiid joined
|
|||
bioduds | p3rln00b : much obliged :) | 02:21 | |
seatek | gosh, i don't know what to think about class names and method names with dashes. but i love them. and don't like them too. | 02:30 | |
p3rln00b | .oO( once you go kebab, you never go back ) |
02:34 | |
seatek | i'm so confused | 02:39 | |
p3rln00b | the names with dashes is called "kebab case" | 02:40 | |
(or "kebob case") | 02:41 | ||
seatek | that's not what confused me. it's the fact that i'm liking them. | 02:43 | |
AlexDaniel | I don't know what's so special about kebab case, but indeed, you never go back | 02:44 | |
p3rln00b | The special is that you don't have to jam SHIFT a billion times a day while coding. | ||
AlexDaniel | nah, that's not it | 02:45 | |
in fact, on my layout - is harder to press than _ | |||
seatek | it's that it's so wrong. and so right. | ||
p3rln00b | And normal-looking words use hyphens and not underscores. | ||
AlexDaniel | yeah, that. It just looks so much better | 02:46 | |
geekosaur | to me it reads more naturally (because ^) and easily (because thisIsHardToRead) | ||
seatek | yeah and underscores are awkward too | ||
AlexDaniel | geekosaur: yeah, but this_is_not_so_hard_to_read ? | ||
this-is-not-so-hard-to-read | 02:47 | ||
seatek | it's so good | ||
AlexDaniel | mhmmmm… kebab just looks significantly better | ||
I still find it weird that just moving the line a few pixels higher makes such a big difference | 02:48 | ||
geekosaur | the dashes one at least is something I will often encounter in normal reading | ||
seatek | it's like the continuity of the line, rather than being broken up into individual words | ||
geekosaur | neither is great, but there is no "great" solution really (there's also the SQL one, where you can put spaces in a symbol name if you double quote it) | 02:49 | |
AlexDaniel | what about this'is'not'so'hard'to'read ? | ||
seatek | it's abrasive, like a cheese grater | ||
BenGoldberg | It's perl4! | 02:50 | |
geekosaur | also especially bad here because I use a proportional font for IRC, so now it's squished | ||
or Ada | |||
AlexDaniel | seatek: not sure if you are aware: | ||
seatek | is that really perl4? i don't remembe rthat | ||
AlexDaniel | m: my $foo'bar'baz = 42; say $foo'bar'baz | ||
camelia | rakudo-moar c57a26: OUTPUT«42» | ||
geekosaur | perl 4 and earlier used ' as the namespace token (like :: in perl5) | ||
BenGoldberg | Before perl used :: to separate namespaces, it used ' | ||
02:51
noganex_ joined
|
|||
seatek | ahhh ok :) | 02:51 | |
vague vague recollection there | |||
AlexDaniel | can you use ' today? | ||
BenGoldberg | It's actually still valid (in perl5), but only used for silly stuff, like making a sub named isn't | ||
geekosaur | but prints back out in error /warning messages with the :: | 02:52 | |
pyanfar Z$ perl -e "use warnings; \$x'y = 1" | |||
Name "x::y" used only once: possible typo at -e line 1. | |||
02:54
noganex left
02:56
awwaiid left
|
|||
AlexDaniel | m: my $thisˉisˉnotˉsoˉhardˉtoˉread = 42; say $thisˉisˉnotˉsoˉhardˉtoˉread # well, let's move it even higher? | 02:57 | |
camelia | rakudo-moar 565b52: OUTPUT«42» | ||
02:57
awwaiid joined
|
|||
seatek | i kinda like that one | 02:58 | |
AlexDaniel | .oO( “upperscore case”? “overscore case” ?) |
03:01 | |
03:01
kenh83_ is now known as kenh83,
_slade_ left
|
|||
geekosaur | I find that if I'm looking up, I'm expecting magic. this may be because Haskell (where ' in a non-Char context often indicates TH or type level shenanigans) | 03:02 | |
p3rln00b | .tell El_Che JSON handler now fixed: rt.perl.org/Ticket/Display.html?id=129810 | 03:04 | |
yoleaux | p3rln00b: I'll pass your message to El_Che. | ||
AlexDaniel | m: my $f̅o̅o̅ˉ̅b̅a̅r̅ = 42; say $f̅o̅o̅ˉ̅b̅a̅r̅ # overline case? :o | ||
camelia | rakudo-moar 565b52: OUTPUT«42» | ||
p3rln00b | AlexDaniel: nope: i.imgur.com/0CjflhX.png | 03:05 | |
hah | |||
Now every line in chat is showing "rline case? :o" at the end ~_~ | 03:06 | ||
:) | |||
AlexDaniel | p3rln00b: actually, this looks almost right | ||
p3rln00b: compare it with this: files.progarm.org/2016-10-10-06065..._scrot.png | 03:07 | ||
this is completely wrong… | |||
seatek | that second is what i got | ||
p3rln00b | Terminal: i.imgur.com/5Gw1VR8.png | 03:08 | |
AlexDaniel | seatek: why does it decide to put it on the character to the right? | 03:09 | |
what is this? Why? Is there a bug report for that? | |||
This bug is there for more than 5 years I think | |||
seatek | AlexDaniel, you got me | ||
ugh. databases always make me do things i don't want to do. | 03:10 | ||
AlexDaniel | seatek: like? | 03:12 | |
seatek | AlexDaniel, well, right now i have some nice discreet files doing tests on individual tables, but now with the logic of relations, it's easiest to combine those nice neat test files all together into one big giant thing | 03:14 | |
03:16
aries_liuxueyang left
03:18
aries_liuxueyang joined
|
|||
p3rln00b | bioduds: in the future, it would be helpful if bug reports contained code that reproduces the issue, along with the version of information of Perl you're running | 03:21 | |
m: q:to/x/;y x | |||
camelia | rakudo-moar 3b5ef0: OUTPUT«Asked to remove 2 spaces, but the shortest indent is 0 spaces in any trim_heredoc at gen/moar/m-Perl6-Actions.nqp line 499» | ||
p3rln00b | bioduds: e.g. ^ that's a similar error, but it doesn't reference "descend" your error does. So I've no idea now how to produce *your* error. | 03:22 | |
03:22
dayangkun left
03:23
aries_liuxueyang left
|
|||
p3rln00b | bioduds: 'cause this is how it shows up on our end: rt.perl.org/Ticket/Display.html?id...et-history | 03:23 | |
03:25
Herby_ left
|
|||
geekosaur | I think it might? there's a text/plain inclusion before the message which may have gotten the source? | 03:26 | |
03:26
dayangkun joined
|
|||
geekosaur | oh, no, same thing :/ | 03:26 | |
03:26
aries_liuxueyang joined
|
|||
geekosaur | so yes, the source that triggered it and the perl6 --version output | 03:27 | |
03:32
awwaiid left
03:34
wamba joined
03:35
awwaiid joined
03:44
awwaiid left
03:46
awwaiid joined
03:52
labster left
03:59
khw left
04:00
Derperperd_ left
04:01
awwaiid left
04:03
awwaiid joined
04:09
Derperperd joined
04:20
skids left
04:21
dayangkun left
04:33
awwaiid left
04:34
dayangkun joined,
Actualeyes left,
awwaiid joined
04:35
seatek left
04:36
Derperperd left
04:39
ilken joined
04:40
Xliff left
04:41
Derperperd joined
04:42
Xliff joined,
robh2791 joined
04:43
wamba left
04:45
robh2791 left
04:46
Cabanossi left
04:47
Derperperd left
04:50
Cabanossi joined
04:52
Derperperd joined
04:55
dayangkun left,
pierre_ left,
stmuk joined
04:57
stmuk_ left
05:02
Actualeyes joined
05:03
pierre_ joined,
Derperperd left
05:06
awwaiid left
05:07
awwaiid joined
05:08
pierre_ left,
Actualeyes left
05:11
Derperperd joined
05:15
Derperperd_ joined
05:16
Derperperd left,
Derperperd_ is now known as Derperperd
05:19
cyphase left
05:20
BenGoldberg left
05:22
Actualeyes joined
05:23
cyphase joined
05:26
ewet joined,
aries_liuxueyang left
05:28
aries_liuxueyang joined
05:32
awwaiid left
05:33
awwaiid joined
05:38
hrob2791 joined
05:41
hrob2791 left,
hrob2791 joined,
domidumont joined
05:45
awwaiid left,
awwaiid joined
05:46
domidumont left,
dayangkun joined
05:47
domidumont joined,
hrob2791 left
05:51
domidumont left
06:04
pierre_ joined
06:05
pierre_ left
06:06
pierre_ joined
06:08
awwaiid left
06:10
neuraload joined,
awwaiid joined
06:14
domidumont joined
06:20
bpmedley joined
06:26
firstdayonthejob joined
06:30
Averna joined
06:37
domidumont left
06:39
domidumont joined
06:40
awwaiid left,
firstdayonthejob left
06:41
Lucas_One joined,
awwaiid joined
06:46
Derperperd left
07:00
darutoko joined
07:05
awwaiid left
07:07
CIAvash joined
07:08
ufobat joined
07:11
awwaiid joined
07:14
dayangkun left
07:15
cyphase left,
awwaiid left
07:18
awwaiid joined
07:20
cyphase joined
07:22
RabidGravy joined,
awwaiid left
07:24
awwaiid joined
07:25
ccakes left
07:29
awwaiid left,
awwaiid joined
07:32
pdcawley joined,
cyphase left
07:33
brrt joined
07:34
awwaiid left
07:37
cyphase joined
07:39
awwaiid joined
07:44
xinming_ joined
07:47
xinming left,
cyphase left
07:48
ccakes joined
07:49
eliasr joined
07:50
ccakes left,
ocbtec joined
07:52
cyphase joined
08:03
awwaiid left
08:04
awwaiid joined
08:10
cyphase left
08:15
cyphase joined
08:24
cyphase left
08:29
awwaiid left,
cyphase joined
08:30
awwaiid joined
08:34
ilken left
08:36
ilmari_ is now known as ilmari,
ilken joined
08:39
zengargoyle left,
gregf_ joined
08:43
ilken left
09:02
ilogger2 joined,
ChanServ sets mode: +v ilogger2,
akiym joined,
raydiak joined
09:04
darutoko joined
09:10
silug_ joined
|
|||
moritz enjoyed www.promptworks.com/blog/public-keys-in-perl-6 | 09:21 | ||
m: say :100(1, 2, 3) | 09:22 | ||
camelia | rakudo-moar d03459: OUTPUT«This call only converts base-100 strings to numbers; value $(1, 2, 3) is of type List, so cannot be converted!(If you really wanted to convert $(1, 2, 3) to a base-100 string, use $(1, 2, 3).base(100) instead.) in block <unit> at <tmp> line 1» | ||
09:22
g4 joined,
g4 left,
g4 joined
|
|||
moritz | m: say (1, 2, 3).base(100) | 09:22 | |
camelia | rakudo-moar d03459: OUTPUT«No such method 'base' for invocant of type 'List' in block <unit> at <tmp> line 1» | ||
moritz | m: say $(1, 2, 3).base(100) | ||
camelia | rakudo-moar d03459: OUTPUT«No such method 'base' for invocant of type 'List' in block <unit> at <tmp> line 1» | ||
moritz | this seems LTA :/ | ||
09:41
rudolfochrist joined
|
|||
moritz | m: say <1 2 3>.reduce: { $^a + 100 * $^b} | 09:41 | |
camelia | rakudo-moar d03459: OUTPUT«501» | ||
moritz | m: say <1 2 3>.reduce: { 100 * $^a + $^b} | ||
camelia | rakudo-moar d03459: OUTPUT«10203» | ||
09:42
awwaiid joined
09:46
flexibeast joined
09:47
pierre_ joined
09:48
pierre_ left
09:49
pierre_ joined
09:53
skids joined
10:01
awwaiid left
10:08
bjz joined
|
|||
gfldex | m: say (1, 2, 3)».base(100) | 10:18 | |
camelia | rakudo-moar d03459: OUTPUT«base argument to base out of range. Is: 100, should be in 2..36 in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
10:21
rudolfochrist left
|
|||
RabidGravy | boom! | 10:25 | |
10:27
bjz left
|
|||
RabidGravy | rebuilding rakudo on the faster of Raspberry Pi to test the RT #127194 | 10:30 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127194 | ||
RabidGravy | it does appear that it has improved without the suggested fix though | ||
yay, all good with FFI :) | 10:44 | ||
10:47
bjz joined
10:56
canopus joined
10:58
rindolf joined
11:02
wamba joined
|
|||
RabidGravy | right, now re-building for a third time | 11:03 | |
11:05
bjz_ joined,
bjz left
|
|||
RabidGravy | Hopefully it will fix the infelicity in the github.com/jonathanstowe/RPi-Device-PiGlow whereby it doesn't light up all the LEDs | 11:06 | |
11:15
skids left
12:05
pierre_ left
12:23
ssqq joined
12:31
salva0 joined
12:36
brrt joined
12:39
perlpilot joined
|
|||
dalek | c: d714636 | (Tom Browder)++ | doc/Language/exceptions.pod6: better grammar |
12:40 | |
12:40
rindolf left
12:45
zakharyas joined
12:46
rindolf joined
|
|||
[Coke] | bduggan++ | 12:46 | |
cowens | p6: 1[1]; | ||
camelia | rakudo-moar d03459: OUTPUT«Index out of range. Is: 1, should be in 0..0 in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
cowens | p6: (1)[1]; | ||
camelia | rakudo-moar d03459: OUTPUT«Index out of range. Is: 1, should be in 0..0 in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
cowens | p6: (1,)[1]; | 12:47 | |
camelia | ( no output ) | ||
cowens | A better error message is probably needed in the first two cases. | ||
12:47
rudolfochrist joined
|
|||
jnthn | What would you like it to say? | 12:49 | |
m: say 1[0] | |||
camelia | rakudo-moar d03459: OUTPUT«1» | ||
jnthn | m: say (1)[0] | ||
camelia | rakudo-moar d03459: OUTPUT«1» | ||
jnthn | The range it suggests is correct | ||
cowens | But it is likely an accident. | 12:50 | |
Lots of the other error messages have suggestions like: perhaps you meant (1,)[1] or 1 is not a list | |||
12:50
xinming joined
|
|||
lizmat | cowens: a scalar is like a shaped 1 element array | 12:51 | |
m: my @a[1]; say @a[1] | |||
camelia | rakudo-moar d03459: OUTPUT«Index 1 for dimension 1 out of range (must be 0..0) in block <unit> at <tmp> line 1» | ||
cowens | Is there a valid use for that feature? | ||
arnsholt | m: say (1,)[1] # What does that return, though? | ||
camelia | rakudo-moar d03459: OUTPUT«Nil» | ||
psch | m: List.new[0].say | ||
camelia | rakudo-moar d03459: OUTPUT«Nil» | ||
12:51
ssqq left
|
|||
lizmat | cowens: so you don't have to worry if something returns a scalar and you want to treat it as a list | 12:52 | |
m: say 42.elems | |||
camelia | rakudo-moar d03459: OUTPUT«1» | ||
cowens | hmm | ||
12:52
rudolfochrist left
|
|||
AlexDaniel | m: say +[42] # ;) | 12:52 | |
camelia | rakudo-moar d03459: OUTPUT«1» | ||
jnthn | We do, I believe, have enough context at runtime to point out that the out-of-bounds happened on an item that was then treated as a 1-item list for the sake of the indexing operation | 12:53 | |
And it may well be helpful | 12:54 | ||
cowens | I stumbled into this when checking to see if strings had [] implemented | ||
AlexDaniel | ooh | ||
jnthn | No, a string is an item | ||
cowens | the error messages was . . . a bit confusing to say the least | ||
jnthn | So will be treated as a 1-item list | ||
AlexDaniel | sure, but I see why someody would try that | ||
cowens | Yeah, I figured that out | 12:55 | |
perlpilot | jnthn: I think it would. Especially in the case of my $a = 42; $a[1]; | ||
AlexDaniel | m: say "hello"[3] | ||
camelia | rakudo-moar d03459: OUTPUT«Index out of range. Is: 3, should be in 0..0 in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
lizmat | perhaps we should implement a Str.AT-POS that dies with a more appropriate error message ? | 12:56 | |
cowens | I did immediately try “foo”[0] and got back “foo”, so the error message worked, but only because I was in the REPL playing | ||
jnthn | lizmat: No | ||
lizmat: But I'd be +1 to a patch to the AT-POS that does the item => 1-item list promotion giving a better error on out-of-range | |||
cowens | If that had been in a program, I would have spent a long time trying to figure out what went wrong with my string | ||
lizmat | jnthn: on it | 12:57 | |
jnthn | Not quite sure how to word it. | ||
AlexDaniel | cowens: yeah, it is LTA | ||
MasterDuke | i think i recently had some discussion with TimToady about that error message | ||
AlexDaniel | generally, any complaint or even just misunderstanding can be turned into a LTA ticket :) | 12:58 | |
jnthn | Maybe "Index out of range in Str treated as 1-item list." or so | ||
cowens | That sounds more reasonable | ||
AlexDaniel | “Did you mean .substr?” | ||
cowens | It gets the user thinking in the right direction | 12:59 | |
perlpilot | AlexDaniel: and no extra hint for non-Str? | ||
jnthn | Hm, not so sure about special-casing the error when it's Str, but I guess we could | ||
lizmat | ok, leaving LHF for someone else | ||
AlexDaniel | sounds like something MasterDuke would do ;) | 13:00 | |
lizmat | yeah... so looking forward to a PR or commit :-) | ||
Unavowed | m: say @(Set.new: 1, 2, 3) | 13:03 | |
camelia | rakudo-moar d03459: OUTPUT«(3 => True 1 => True 2 => True)» | ||
lizmat | Unavowed: yes, a set is a conceptually a List of True | 13:04 | |
jnthn | uh | ||
A hash whose keys are True, surely? :) | |||
13:04
Actualeyes joined
|
|||
jnthn | *values | 13:04 | |
gah :) | |||
m: say keys Set.new: 1,2,3 | 13:05 | ||
camelia | rakudo-moar d03459: OUTPUT«(3 1 2)» | ||
AlexDaniel | RT #129843 | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129843 | ||
lizmat | ok, a Hash of True, which listifies as a list with Pairs of True values | ||
jnthn | Right | ||
Which is to be consistent with things that do Associative | 13:06 | ||
MasterDuke | ahh, wasn't exactly the same situation, but a similar error irclog.perlgeek.de/perl6/2016-09-26#i_13285180 | ||
jnthn | So if you refactor from my %h to my %h is Set or my %h is Bag then you won't get surprises. | ||
Or even more importantly, if you write sub foo(%h) { for %h -> $pair { ... } } and somebody passes you a Set/Bag/Mix | 13:07 | ||
MasterDuke | jnthn: btw, i left you a question in #perl6-dev if you've got a minute | 13:08 | |
AlexDaniel | MasterDuke: what does this leading : mean in tokens? :O | 13:09 | |
MasterDuke | no real idea, but it seems to let you run code, so i take advantage of it | 13:11 | |
psch | m: grammar G { token TOP { :my $x = "foo"; <{ $x }> } }; G.parse("foo").say | ||
camelia | rakudo-moar d03459: OUTPUT«「foo」» | ||
MasterDuke | i was just flailing wildly at the keyboard and it worked out | ||
AlexDaniel | damn I wonder how I've never noticed | 13:12 | |
psch | it's just a "this is a %*LANG<MAIN> statement" marker i think | ||
AlexDaniel | is it something that only works with :my ? | ||
dalek | c/spellcheck: 6a24447 | (Tom Browder)++ | doc/Language/exceptions.pod6: better grammar |
||
psch | m: grammar G { token TOP { :state $x = do { say "well, matching"; "foo" }; <{ $x }> } }; G.parse("foo").say | 13:13 | |
camelia | rakudo-moar d03459: OUTPUT«well, matching「foo」» | ||
jnthn | Works with other declarators too, like :constant | ||
AlexDaniel | mmmhmm | ||
jnthn | It's a syntax for making declarations in vars | ||
Used quite heavily in the Perl 6 grammar | |||
Often for contextuals | |||
psch | right, only declarators, not all statements | ||
jnthn | MasterDuke: I think adding further methods to BOOTSTRAPATTR would be fine, or seeing if we can eliminate any of the users of it where it isn't absolutely needed | 13:14 | |
[Coke] | one of the files in docs/ is causing a 'but got null' error in xt/aspell.t (on doc's spellcheck branch) | 13:15 | |
gist at gist.github.com/coke/22c9c8af383b4...cb44e70f58 | |||
MasterDuke | adding methods is relatively straightforward, how would i eliminate users? | 13:16 | |
13:16
wamba left,
rudolfochrist joined
|
|||
jnthn | MasterDuke: See if there's anywhere that is using BOOTSTRAPATTER that could actually just use Attribute | 13:16 | |
(I don't know if there are any.) | |||
p3rln00b | .oO( a loaded machine gun would do... ) |
||
[Coke] wonders where 'but got null' comes from, doesn't see it in source. | 13:17 | ||
13:17
bjz_ left,
cygx joined
|
|||
AlexDaniel | [Coke]: it is low level, I think | 13:18 | |
13:18
bjz joined
|
|||
[Coke] | looked in nqp, moar, and rakudo. | 13:19 | |
13:20
rgrinberg joined
|
|||
AlexDaniel | [Coke]: maybe this? github.com/MoarVM/MoarVM/blob/2eed.../ops.h#L33 | 13:21 | |
psch | m: use nqp; class A { has str $!a; method BUILD { nqp::chars($!a) } }; A.new | ||
camelia | rakudo-moar d03459: OUTPUT«chars requires a concrete string, but got null in method BUILD at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
psch | there was something else that got a similar error, i forgot what though | ||
[Coke]: that ^^^ is #126492 btw | 13:22 | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126492 | ||
[Coke] | AlexDaniel, thanks. | ||
13:25
zakharyas left
13:29
pmurias joined
|
|||
pmurias | hi | 13:30 | |
DrForr | Afternoon. | ||
13:37
user9 joined
13:48
Actualeyes left
13:50
kaare_ joined
13:57
user9 left
13:58
Possum joined
13:59
cowens_ joined,
rudolfochrist left
14:00
cowens_ is now known as cowens,
rudolfochrist joined
14:01
bjz left
14:07
user9 joined
14:17
wamba joined
14:19
wamba left,
wamba joined
14:22
khw joined
14:23
dj_goku joined,
dj_goku left,
dj_goku joined
14:28
dj_goku left
|
|||
[Coke] | so, I think the root cause here is my run()'s - no matter what order I put the filesi n, I can only run 250 tests. | 14:30 | |
is there a resource here that isn't getting claimed? github.com/perl6/doc/blob/spellche....t#L25-L40 (wondering if I need to explicitly free up my run()) | 14:32 | ||
14:33
Derperperd joined
|
|||
[Coke] | ... if I just diag the exitcodes on the Proc's returned by those two runs, the test gets past 250 files. :| | 14:34 | |
dalek | c: b25a44a | (Luca Ferrari)++ | doc/Language/concurrency.pod6: Explain the Promise available statuses. |
14:35 | |
c: d084947 | RabidGravy++ | doc/Language/concurrency.pod6: Merge pull request #948 from fluca1978/master Explain the Promise available statuses. |
|||
14:37
matt_ joined,
matt_ is now known as Guest41776,
ptolemarch joined,
Guest41776 left
14:38
jast joined,
matt| joined
|
|||
lizmat | [Coke]: open file handles ? | 14:41 | |
AlexDaniel | [Coke]: what version of rakudo are you using? | 14:42 | |
asking just in case | |||
rindolf | Hi all! This code is much slower with "perl6" from rakudobrew than it is with its python2/python3 equivalent (even without pypy, which is even faster) - github.com/perl6/perl6-examples/bl...shlomif.p6 . What can I do? | 14:43 | |
AlexDaniel | mainly because :in → :out thing was broken before #129291 | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129291 | ||
lizmat | rindolf: lose the return statements that are not needed | 14:44 | |
El_Che | lizmat: thx for fixing the JSON error output bug | 14:45 | |
yoleaux | 03:04Z <p3rln00b> El_Che: JSON handler now fixed: rt.perl.org/Ticket/Display.html?id=129810 | ||
lizmat | El_Che: Zoffix did that, so Zoffix++ | ||
El_Che | oh, it was one of zoffix robots | ||
:) | |||
AlexDaniel | lizmat: how much do you win by doing this? | 14:46 | |
wasn't it optimized a it? | |||
14:46
smls joined
|
|||
rindolf | lizmat: which ones? | 14:46 | |
lizmat | m: sub a() { 42 }; for ^1000000 { a }; say now - INIT now | 14:47 | |
camelia | rakudo-moar 6531ef: OUTPUT«0.20082102» | ||
lizmat | m: sub a() { return 42 }; for ^1000000 { a }; say now - INIT now | ||
camelia | rakudo-moar 6531ef: OUTPUT«0.503920» | ||
[Coke] | AlexDaniel: This is Rakudo version 2016.08.1 built on MoarVM version 2016.08 | ||
lizmat | AlexDaniel: ^^^ | ||
rindolf: all the ones that are the last statement in a sub | 14:48 | ||
rindolf | lizmat: ah. | ||
lizmat | rindolf: add --> Nil to the signature for the ones with a bare 'return' | ||
rindolf | lizmat: what about the "return;" ones? | ||
14:48
wamba left
|
|||
lizmat | sub a(-->Nil) { ... no return needed } | 14:48 | |
[Coke] | AlexDaniel: updating to .09 | 14:49 | |
rindolf | lizmat: what's the exact notation? | ||
lizmat | sub a(-->Nil) { ... no return needed } | ||
rindolf | lizmat: ah, and what if there are arguments? | ||
AlexDaniel | [Coke]: yeah | ||
lizmat | sub a($a, $b -->Nil) { ... no return needed } | ||
actually, --> Nil would be better readable :-) | 14:50 | ||
AlexDaniel | hm, it does affect it | ||
14:58
girafe joined
|
|||
bioduds | how do I use a variable here? my $dbh = DBIish.connect( "SQLite", :database<$db-name> ); | 14:59 | |
on $db-name? | |||
it is getting the literal of it | |||
moritz | bioduds: :database($db-name) | 15:00 | |
the :name<...> form ie specifically for literals | |||
s/ie/is/ | |||
15:01
MilkmanDan joined
|
|||
rindolf | lizmat: thanks! But it's still very slow. | 15:01 | |
moritz | rindolf: have you profiled it? | 15:03 | |
perl6 --profile yourscript.p6 | |||
AlexDaniel | rindolf: you can also try using native ints to see if it is going to help | 15:04 | |
rindolf: these numbers are pretty small so it is proaly appropriate | |||
lizmat | rindolf: what AlexDaniel and moritz said | ||
bioduds | moritz : tx | ||
as usual, I'm having problems interpolating vars with | 15:05 | ||
withq | |||
with q, sorry | |||
moritz | q doesn't interpolate | ||
that might explain it | |||
15:06
hassoub joined
|
|||
bioduds | please, tell me how to do this? my $sth = $dbh.do( qq:to/STATEMENT/ ); DROP TABLE IF EXISTS $db-hashed STATEMENT | 15:07 | |
qqw? | |||
moritz | bioduds: looks fine to me as is | 15:09 | |
bioduds | weird, im getting this as error Use of uninitialized value $!last-sth-id of type Any in string context | 15:10 | |
moritz | doesn't seem related to what you pasted here at all | 15:11 | |
gfldex .oO( If you write a module, please consider :D ) | |||
moritz | it's possible to have more than one error in the same file :-) | ||
bioduds | oh, I think I got it | 15:12 | |
cant start table name with number | |||
moritz | you probably have to quote it if you want to do that | 15:14 | |
AlexDaniel | \o/ | ||
15:16
skids joined
|
|||
[Coke] | AlexDaniel: no love, still dies after 250. | 15:18 | |
[Coke] tries HEAD | |||
rindolf | moritz: AlexDaniel : lizmat : here is the profile information - www.shlomifish.org/Files/files/text...18954.html | ||
AlexDaniel | [Coke]: sounds great! | ||
[Coke]: meaning that you've proably stumbled upon another run() bug! | |||
maybe | 15:19 | ||
[Coke]: I'm not sure, but maye you can try .close()-ing some handles | 15:20 | ||
smls | \o/ | 15:21 | |
smls finally nailed down an elusive concurrency-related data corruption bug in a Perl 6 script | |||
AlexDaniel | yay! sounds great too! | ||
smls | It appears that &dir and/or IO::Path is not quite thread-safe... | ||
AlexDaniel | smls: ummm… maybe you want to take a look at… | 15:22 | |
smls | I have a golfed script, will RT shortly... :) | ||
AlexDaniel | smls: #129781 this? | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129781 | ||
15:22
g4 left
|
|||
smls | AlexDaniel: In my case, concurrent `dir` sometimes gives me an internally inconsistent IO::Path | 15:23 | |
whose .Str representation disagrees with everything else (.gist, .perl, .absolute...) | 15:24 | ||
moritz | rindolf: there's nothing that stands out overly much from a cursory glance at the profile, and I don't have time to dig deeper | ||
AlexDaniel | smls: … yeah. Submit a ticket for sure | 15:25 | |
15:25
dj_goku joined,
dj_goku left,
dj_goku joined
|
|||
bioduds | got it working, thanks :) | 15:25 | |
15:27
rudolfochrist left
15:28
skids left,
jonas2 joined
15:30
dj_goku left
|
|||
rindolf | lizmat: what happened to the perl6 JVM backend? It is not mentioned anywhere in the README.md of rakudobrew | 15:32 | |
p3rln00b | rindolf: Nothing happened to it. rakudobrew is a 3rd-party utility. See Rakudo's documentation. | 15:36 | |
15:36
girafe left
|
|||
p3rln00b | rindolf: github.com/rakudo/rakudo/blob/nom/...LL.txt#L36 | 15:36 | |
p3rln00b starts to share the sentiment of avoiding suggesting people use rakudobrew | 15:37 | ||
15:37
dataf3l joined
|
|||
dataf3l | p6: say 3 | 15:38 | |
camelia | rakudo-moar 92c092: OUTPUT«3» | ||
dataf3l | cool | ||
hey guys, after a weekend of google search and a bit of frustration, I come for help | |||
I’m a perl6 newbie | 15:39 | ||
p3rln00b | m: say ३३ | ||
camelia | rakudo-moar 92c092: OUTPUT«33» | ||
p3rln00b | dataf3l: join the club! :) | ||
dataf3l | I’d like to know how to setup a perl6 webserver, like nodejs or perhaps golang, examples I found online mentioning the HTTP Simple package didn’t work | ||
I need to listen to a port and return json, you know, the simple stuff | 15:40 | ||
nothing fancy | |||
I was considerinf using apache and CGI, but somehow it feels wrong to do that. | |||
p3rln00b | dataf3l: what HTTP Simple package do you mean? | ||
15:40
rgrinberg left
|
|||
bioduds | metaprogramming its own language is messy :) | 15:41 | |
RabidGravy | HTTP::Server::Tiny is probably the easist | ||
dataf3l | this one | ||
szabgab.com/http-server-in-perl-6.html | |||
p3rln00b | That's... from 2011 :) | 15:42 | |
dataf3l | yeah, that’s probably the reason :( | ||
p3rln00b | dataf3l: see github.com/tokuhirom/p6-HTTP-Server-Tiny and JSON can JSON portion can be done with modules.perl6.org/repo/JSON::Fast | 15:43 | |
RabidGravy | It's literally "use HTTP::Server::Tiny; HTTP::Server::Tiny.new.run(sub ($env) { return 200, [], ["something or other"] })" | ||
dataf3l | you mean this one, RabidGravy? use HTTP::Server::Tiny; | ||
github.com/tokuhirom/p6-HTTP-Server-Tiny | |||
?? | |||
RabidGravy | yes | ||
dataf3l | and I need to use panda to install it, correct? | 15:44 | |
RabidGravy | or zef | ||
dataf3l | never heard of zef, “to the googles!” | 15:45 | |
rindolf | p3rln00b: is there a better alternative to rakudobrew that is equally as convenient? | ||
dataf3l | installing zef... | 15:47 | |
to be honest, I kinda expected a web server to be a part of the standard perl6 library, just like on golang or in python. | 15:50 | ||
I fear for my future | |||
what will happen 10 years from now, will this module still be arround? | |||
ok, I installed zef, but it looks like it “failed to update p6c”, no idea what that means, perhaps that module (HTTP::Server::Tiny) does not exist as a zef module? | 15:51 | ||
15:52
dataf3l left
15:53
dataf3l joined
|
|||
[Coke] | dataf3l: are you behind a corporate firewall, by chance? | 15:57 | |
dataf3l | no, my friend, but my internet is sucky, do you think it may be a network failure? | 15:58 | |
[Coke] | don't know. just reminiscent of issues I've had with panda when trying to go through the firewall here. | ||
15:58
hassoub left
|
|||
dataf3l | I’m going to be honest, I moved to perl6 because golang didn’t offer the expressiveness I feel I need to write a specific type of sort-of-generic algorithm, however, I’m a little preoccupied by the size of the community. | 15:59 | |
I’m honestly worried about a couple things: #1: jobs #2: libraries | |||
[Coke] | AlexDaniel: same failure with 2016.09-163-g92c0921 | ||
dataf3l | should I worry at all, or should I wait, and in time, this will all be solved? | ||
[Coke] | dataf3l: sure, those are two very reasonable things to be worried about. | ||
dataf3l | I tried this command: panda install HTTP::Server::Tiny, it fails the unit tests. | 16:00 | |
Result: FAIL | |||
The spawned process exited unsuccessfully (exit code: 1) | |||
in sub run-and-gather-output | |||
[Coke] | If I was hoping to make a living learning something, I'd probably make sure I could do that before spending the time. | ||
dataf3l | in sub run-and-gather-output at /usr/local/Cellar/rakudo-star/2016.07/share/perl6/site/sources/24811C576EF8F85E7672B26955C802BB2FC94675 (Panda::Common) line 85 | ||
argh, all I needed was a simple webserver… :| | |||
[Coke] | dataf3l: what version of perl6 are you using? | ||
(perl6 --version) | 16:01 | ||
dataf3l | Felipes-MacBook-Pro:p6 a$ perl6 --version | ||
This is Rakudo version 2016.07.1 built on MoarVM version 2016.07 | |||
implementing Perl 6.c. | |||
[Coke] | ok. two months old, but should still be ok. | ||
dataf3l | I just installed it using “brew install perl6” which is kinda the “normal” way of installing stuff on osx | ||
[Coke] | I prefer macports, but sure. ;) | 16:02 | |
dataf3l | I’ll get the latest | 16:03 | |
[Coke] | (trying to install HTTP::Server::Tiny here with panda on 2016.09) | ||
dataf3l: I just had it fail a bunch of tests here. | 16:05 | ||
dataf3l | you have the latest as well? | ||
I’m reading online about something called Bailador | 16:06 | ||
should I be using that instead? | |||
[Coke] | I've used bailador for a work project, I've been happy with it. | ||
I think my tests are failing locally because I'm going through the corporate http proxy for the 127.0.0.1 tests. | 16:07 | ||
moritz | that might be a bad idea, yes :-) | ||
p3rln00b | rindolf: yes,the Rakudo Star package which is what we ship for regular users' consumption: rakudo.org/downloads/star/ Rakudobrew is for using multiple rakudo versions at the same time and isn't something designed for regular users. | ||
[Coke] | this worked: http_proxy= GIT_PROTOCOL=https panda install HTTP::Server::Tiny | 16:08 | |
rindolf | p3rln00b: I'm not a regular user. | ||
p3rln00b | rindolf: you sure sound like one. | ||
[Coke] | moritz: not sure how to whitelist certain hosts; think I got lucky that all the panda networking stuff is over https. | ||
so, dataf3l - the install did work here once I got the networking setup right. | 16:09 | ||
dataf3l | I’m installing Bailador | ||
looks closer to Sinatra | 16:10 | ||
p3rln00b | It is. | ||
dataf3l: it's at a much earlier stage of development though. Last I tried it half a year ago, it wasn't able to even support concurrent connections. | 16:11 | ||
dataf3l | but will it support concurren connections now?! :) | ||
p3rln00b | dataf3l: check the commit history :) | ||
dataf3l | fails to install using panda | 16:12 | |
p3rln00b | dataf3l: with you comparing Perl 6 to golang/python... keep in mind we're much younger (in terms of stability; we've just released last December) and the development is nearly entirely volunteer-driven (with no multi-billion company backing). | ||
16:13
MilkmanDan left
|
|||
p3rln00b | dataf3l: personally, I wouldn't use Perl 6 for anything web, at the moment. There's still a lot of work to do for optimization and memory leak hunting for it to be a suitable tool for the job. | 16:13 | |
Might be OK for a simple web service that serves JSON, but then, if you're writing something that simple, you won't get benefits of Perl 6's expressive power anyway. | 16:14 | ||
16:14
MilkmanDan joined
|
|||
moritz | p3rln00b: a thing doesn't has to be simple, just because it spits out JSON | 16:15 | |
p3rln00b | Sure. That's why I explicitly said for *simple* web service. | 16:16 | |
dataf3l: Bailador installs fine for me with zef on 2016.09-2-gc4fd9f5 | 16:17 | ||
dataf3l: zef being an alternate (and IMO better) installer: github.com/ugexe/zef | 16:18 | ||
[Coke] | dataf3l:(December release) focus this year from the perl6 devs is stability and performance improvements. | 16:19 | |
p3rln00b | Yeah, we got more than twice faster since Dec. | 16:20 | |
16:20
bazzaar joined
|
|||
bazzaar | o/ perl6 | 16:20 | |
16:20
wamba joined
16:21
dataf3l left
|
|||
p3rln00b | \o | 16:21 | |
RabidGravy | [Coke], was there actually a problem with HTTP::Server::Tiny or was it just your environment messing you up? | ||
16:22
dataf3l joined
|
|||
dataf3l | ==> Successfully installed Bailador | 16:22 | |
p3rln00b | \o/ | ||
dataf3l | I kinda hoped to be able to do web development with JUST the standard library, I guess golang spoiled me... | 16:23 | |
16:23
ptolemarch left
|
|||
p3rln00b | heh | 16:23 | |
Well, you *can* :) It's just won't be super fun. | |||
RabidGravy | I actually switched the Audio::StreamThing to using HTTP::Server::Tiny the week and it's working swimmingly | ||
bazzaar | hi, in writing a bit of code to parse a jumbled mess of text, I noticed that a syntax error in regex substitution, resulted in an error message way down the code | ||
m: my $b = "dummy code"; my $a = Bazzaar; $a ~~ s/"i"/; $b = "dummer code"; my $c = "dummy cod"; my $d = "dumb koft"; say $a; | 16:24 | ||
camelia | rakudo-moar 92c092: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '$c' is not declaredat <tmp>:1------> 3r; $a ~~ s/"i"/; $b = "dummer code"; my 7⏏5$c = "dummy cod"; my $d = "dumb koft"; s» | ||
p3rln00b | bazzaar: 'cause it thinks you' | ||
bazzaar: 'cause it thinks your code is part of the substitution string | 16:25 | ||
[Coke] | do we have a list of env vars that impact rakudo/moar? | 16:26 | |
16:26
dj_goku joined,
dj_goku left,
dj_goku joined
|
|||
[Coke] | RabidGravy: just my env | 16:26 | |
RabidGravy | cool | ||
p3rln00b | [Coke]: docs.perl6.org/programs/00-running..._VARIABLES | ||
bazzaar | yes, understood, but maybe if the error message were to say that the substitution string included several semicolons, it could help debug | ||
dataf3l | I ran apache’s ab on Bailador’s helloworld, but I think performance may be acceptable, but I’m not sure if I should intepret the results as “can concurrently handle requests” or not... | 16:27 | |
gist.github.com/dataf3l/2526fc1b18...b4c96afa1f | |||
I JUST ran it on my mac book pro, core i5 | 16:28 | ||
p3rln00b | dataf3l: it's easy to test. Stick sleep 30 into a route and try to get a response on another route | ||
dataf3l | ok | ||
[Coke] | not sure if it's desirable, but you can wrap your route handling block in a start {} to make it run async. | ||
p3rln00b | [Coke]: how would you respond then? | ||
[Coke] | (just the block; wouldn't make the route handler -itself- concurrent if it's not) | 16:29 | |
p3rln00b: in my case, it was for a github web hook - so I needed a quick response, and a long running async handler to do the heavy lifting. | |||
(not the normal case) | |||
RabidGravy | doesn't it take a Supply or a Channel as the response body? | 16:31 | |
dataf3l | preliminary tests show in my machine it was not multi-threaded. | ||
I ean the test you recommended. | |||
p3rln00b | RabidGravy: wasn't when I tried in April, but I think ufobat was planning on fixing that | ||
dataf3l | single thread. | ||
p3rln00b | Not sure if they did already | ||
16:31
dj_goku left
|
|||
dalek | c: a8e6e7d | titsuki++ | doc/Type/Attribute.pod6: Fix the example of the Attribute.type method |
16:32 | |
c: 9a5caec | titsuki++ | doc/Type/Attribute.pod6: Merge pull request #951 from titsuki/fix-type Fix the example of the Attribute.type method |
|||
RabidGravy | ah right, I knew there was a reason for using HST for the streaming server ;-) | ||
p3rln00b | :D | ||
dataf3l | so Tiny then? | ||
bazzaar | so my point was really to highlight the apparent 'un-relatedness' of the error message to the likely syntax error. | 16:37 | |
16:38
rudolfochrist joined
|
|||
p3rln00b | bazzaar: sure. It's even worse with heredocs: perl6.party/post/The-Awesome-Errors...rywheredoc | 16:38 | |
dataf3l | HTTP::Server::Tiny worked correctly on my machine, after I cloned it from the repository | ||
now all I need to do is learn how to use it | |||
RabidGravy | nothing to learn really | 16:39 | |
dataf3l | Thank you guys for your tremendous help, I feel this is an awesome community, hopefully, once I know more about Perl6, I’ll be able to contribute back! :) | ||
RabidGravy | use HTTP::Server::Tiny; HTTP::Server::Tiny.new.run(sub ($env) { return 200, [], ["something or other"] }); | ||
p3rln00b | bazzaar: I recall timotimo was trying to fix the heredoc problem, not sure if they succeeded. Similar issues may exist with s/// | ||
dataf3l | I need to learn about routing and also about file uploads... | ||
RabidGravy | you probably want to look at Crust for routing with HST | 16:40 | |
timotimo | oh | ||
yes, there was some problems with the fix | |||
and i couldn't come up with something satisfactory yet | 16:41 | ||
bazzaar | p3rln00b: nice article, nice blog, I do read it when something new is posted. | 16:43 | |
p3rln00b | Yeah, the guy who writes it is super awesome. | ||
timotimo | yes | 16:45 | |
dataf3l | I remember learning about go about a year ago or two, but I also remember trying out golang like, 5 years ago, I remember thinking “this isn’t ready”, and I also remember I dropped it back then. I kinda get the same feelings about Perl6 right now, I feel it quite isn’t ready for production, but If I wait 10 years for it to be, then I will have waited too long, I wonder If I should invest in Perl6 now, and see if it becomes popular in the future, or if I | ||
should wait a year or two for the dust to settle... | |||
bazzaar | timotimo: for s///, maybe the error message could report the number of lines of code tied up in the apparent substitution string? | ||
timotimo | bazzaar: the problem with my approach was that it put a worry into the list of worries, but it was unable to pop the worry off afterwards | 16:46 | |
so if there was an error due to a too-long heredoc, it'd show the worry as "potential issues" and it'd be fine | |||
but if there was no error afterwards, it'd also show up, even if the rest of the program was just fine | 16:47 | ||
p3rln00b | dataf3l: if your time is limited, waiting a year sounds like a plan, try out some other lang. Also an option: join the core development effort :) Lots of stuff to do! | ||
timotimo | it's also possible to donate some money that can go into the core development fund which currently funds jnthn to do lots of very good work | ||
i think it's about 50 euros per work-hour | |||
dataf3l | wow | 16:48 | |
timotimo | if you're interested in the kinds of things jnthn does in those work-hours, check out 6guts.wordpress.com/ | ||
AlexDaniel | dataf3l: I have a slightly different recommendation: start using it today, report bugs | 16:49 | |
bazzaar | timotimo: understood, a clean, efficient solution is what you want, so not easy to figure out the best way, unfortunately is beyond my level of experience | ||
RabidGravy | yeah, I'm with AlexDaniel | ||
AlexDaniel | dataf3l: basically, that's what I am doing. If I had to wait a year to start using it I'd kill myself | 16:50 | |
dataf3l | I don’t think I know enough about it to contribute meaningfully, but I’ll consider it | ||
timotimo | i can imagine multiple solutions. one would be to mix in a role that lets you "defuse" a worry, and a function to throw out any defused worries before going on | ||
dataf3l | also | ||
AlexDaniel | for me, it's not production ready, yes. But with every bug report I file it is getting closer | ||
16:50
dataf3l left
|
|||
timotimo | i suppose i could also find the same worry in the list and just splice it out | 16:50 | |
(then i'd have to make sure that multiple worries can be handled at the same time for this) | 16:51 | ||
16:51
skids joined
|
|||
timotimo | bazzaar: though i also think it's not so important for this solution to be extremely performant, since it'd only ever come into play when things get messed up | 16:52 | |
16:52
dataf3l joined
|
|||
bazzaar | dataf31: I'm a relative newby, but after using perl6 I wouldn't go back to perl5 (which I've used to solve data problems for nigh on 20 years) | 16:52 | |
AlexDaniel | bazzaar: haha! Got you! | ||
bazzaar: it's l not 1 :D | 16:53 | ||
16:54
FROGGS joined
|
|||
FROGGS | o/ | 16:54 | |
p3rln00b | \o | 16:55 | |
AlexDaniel | dataf3l: and maybe this will help you consider my recommendation: I submitted over 150 tickets, half of them are resolved | ||
dataf3l: so perl 6 team is doing a great job actually | |||
bazzaar | AlexDaniel: ?sorry am a bit slow, not sure I follow, but I'm happy to agree I've been gotten :) | ||
[Coke] | AlexDaniel: aha: if I use MVM_SPESH_DISABLE=1, my program works fine. | 16:56 | |
AlexDaniel | bazzaar: you wrote dataf31 when it is actually dataf3l | ||
dataf3l | that’s impressive, AlexDaniel | ||
sorry guys, everybody makes that mistake, but this is my handle, and I have to live with it. | |||
AlexDaniel | dataf3l: all that during the last year I think | ||
[Coke] | well, you're welcome to hang out here while you figure out if you like perl6 or not, we're happy to answer questions and fix bugs. | 16:57 | |
bazzaar | AlexDaniel: I'm also a complete novice at typing and irc chat, apologies for my mistake :) | 16:58 | |
AlexDaniel | that nickname is great. The only reason I noticed it is because it was not highlighted | ||
it's not just that l and 1 look similar, it's the fact that there's 3 in front of it | 16:59 | ||
maybe foobarl994 will have a similar effect? | 17:00 | ||
17:00
cowens left
|
|||
AlexDaniel still hopes that one day he will have enough free time to fix another half | 17:01 | ||
17:04
maybekoo2 joined
17:05
dataf3l left
17:07
dataf3l joined
17:09
lucasb joined,
firstdayonthejob joined
17:12
rudolfochrist left
|
|||
bazzaar | timotimo: yes for s///, apparently missing the final '/' before the first ';' is encountered in the code, is going to be a condition that is down to a coding bug most always. So building a flag for that condition would only impact performance for code development for the most part, I would say | 17:13 | |
17:13
matiaslina joined
|
|||
jnthn | bazzaar, timotimo: You might be able to build some error detection by noticing the code is inside a quote construct upon getting an undeclared variable error, and then doing some heuristics (is it on a different line and not a heredoc, for example) | 17:16 | |
17:22
dataf3l left
17:23
dataf3l joined,
bazzaar left,
bazzaar joined
|
|||
AlexDaniel | shouldn't it just say when s/// was started? | 17:24 | |
m: #`{ | |||
camelia | rakudo-moar f117a6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Couldn't find terminator } (corresponding { was at line 1)at <tmp>:20------> 3<BOL>7⏏5<EOL> expecting any of: }» | ||
AlexDaniel | ↑ notice how it says “corresponding { was at line 1” | 17:25 | |
17:25
rgrinberg joined
|
|||
AlexDaniel | m: #`[[[[ | 17:25 | |
camelia | rakudo-moar f117a6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Couldn't find terminator ]]]] (corresponding [[[[ was at line 1)at <tmp>:20------> 3<BOL>7⏏5<EOL> expecting any of: ]]]]» | ||
jnthn | AlexDaniel: Sure, but here we aren't missing a terminator, we're finding an undeclared variable because of the lack of terminator | ||
p3rln00b | It's not about finding the terminator, but about interpreting the code that isn't meant to be part of the replacement as part of it. | ||
AlexDaniel | ah | ||
right | 17:26 | ||
jnthn | So yes, we'd want to show the line where the quote started; I was just suggesting a way to guess when this situation is happening | ||
So that s/foo/$ba/ does not trip it, for example | |||
p3rln00b | bazzaar: that isn't true, as you can have code bugs in strings. s/foo/bar{ some; code; }/ isn't as rare a condition as you imply. | ||
jnthn | (where $ba shoulda been $bar) | ||
p3rln00b | s/bugs/blocks/; | 17:27 | |
heh | |||
17:27
dj_goku joined,
dj_goku left,
dj_goku joined
|
|||
bazzaar | p3rln00b: I see | 17:27 | |
17:32
dj_goku left
17:33
matiasli1a joined
|
|||
bazzaar | so maybe raise a flag if the s/// is not completed by the end of the outer block? | 17:35 | |
17:36
matiaslina left
|
|||
bazzaar | s/outer/enclosing/ | 17:37 | |
timotimo | how do you figure out the outer block if it's inside the s///? :) | 17:38 | |
17:40
dataf3l left
|
|||
bazzaar | I'm thinking the block that started prior to the s/// statement, it probably still wouldn't be ideal, as it might be a large block of code? | 17:42 | |
timotimo | if you're parsing malformed code, there may not be such a thing as "the end of the outer block" | ||
17:46
domidumont joined
|
|||
bazzaar | missing curly braces are easier to see than an embedded 's/regex/;' which on the face of it has a paired '/' and a terminating ';' | 17:49 | |
timotimo | and probably also a newline | ||
bazzaar | yes | 17:50 | |
timotimo | i can imagine wanting to replace something with the literal string ";\n}" | ||
17:52
telex joined
|
|||
DrForr | Well, *this* is a new error... "class *mumble*::Directive does not support inheritance" - It's admittedly an empty class (not even an attribute), would that be why it's not allowed to be inherited from? | 17:55 | |
ufobat | RabidGravy, p3rln00b that depends on the progress of the p6w/psgi draft. but in general of course there sould be propper concurrency | 17:56 | |
bazzaar | so that would be the end of the enclosing block right there, without the terminating '/', so a flag could be raised in case of error being generated in subsequent code? | ||
timotimo | could be | ||
are you interested in the code i've written so far so you can get a feel for what it could look like? | 17:57 | ||
github.com/rakudo/rakudo/commit/d1...656689d55c - this is the commit | 17:59 | ||
bazzaar | well I'd be happy to look, but it might be more than I can comprehend, but maybe I'd be able to ask the odd semi-pertinent question | 18:00 | |
timotimo: I'll take a look, thanks for the link | 18:01 | ||
timotimo | it completely lacks the "throw out the worry if the heredoc turned out all right" logic | ||
bazzaar | understood | ||
18:05
matiaslina joined,
matiasli1a left
18:06
kam_r joined
18:10
kam_r left
18:11
skids left
18:14
Derperperd left
|
|||
lizmat | rindolf: re www.shlomifish.org/Files/files/text...#/routines , looks like all of the top items are in Perl 6 itself, so it looks like not many improvements are possible (apart from using natives where possible) | 18:16 | |
rindolf | lizmat: ah. | 18:18 | |
18:20
dataf3l joined
18:28
dj_goku joined,
dj_goku left,
dj_goku joined
|
|||
DrForr | Okay, this is interesting. 'class Foo::Directive::If { also is Foo::Directive; }' throws the "class Foo::Directive cannot be inherited from" error, whereas "classs Foo::Directive::If is Foo::Directive {...}" doesn't. | 18:29 | |
18:30
matiaslina left
|
|||
bioduds | $row[2] ~~ s/\n//; | 18:31 | |
this is how you remove \n from a string? | |||
DrForr | $row[2].chomp # more portable, I assume you want the trailing \n removed. | 18:32 | |
18:33
dj_goku left
|
|||
bioduds | yes, I'm struggling to put a string back into json format | 18:34 | |
18:39
firstdayonthejob left
18:40
bazzaar left,
mniip joined
|
|||
DrForr | Then .chomp() should do it. | 18:41 | |
bioduds | I'm getting this back: "[{ "database": "futs", "ID": 1, "tables": "[{\n \"name\": \"Técnicos\",\n \"hash\": \"1de95e02d872f5b7900e40e3733\"\n},{\n \"name\": \"Times\",\n \"hash\": \"38eefeeae76046601073b604900\"\n},{\n \"name\": \"Campeonatos\",\n \"hash\": \"2eee6323ffcac49a3adca8007d4\"\n}]" },{ "database": "general", "ID": 2, "tables": "[{\n \"name\": \"Estados\",\n \"hash\": \"422c3cc84c65d120d12ee5234bf\"\n},{\n \"name\": \"Cida | 18:42 | |
see the \n ? | |||
also, it is bringing me \" | |||
p3rln00b | bioduds: what's the problem with it? | ||
bioduds | I only need " | ||
it won't parse on JSON.parse back on javascript front | |||
p3rln00b | bioduds: have you actually tried? | 18:43 | |
bioduds | yes | ||
18:43
firstdayonthejob joined,
dataf3l left
|
|||
bioduds | SyntaxError: Unexpected token u in JSON at position 0 | 18:43 | |
18:43
dataf3l joined
|
|||
p3rln00b | bioduds: and where are you getting this JSON from? | 18:43 | |
bioduds | retrived from sqlite and using use JSON::Class; | 18:44 | |
DrForr | Looks like someone's trying to nest a JSON file within a JSON key. | ||
18:44
dataf3l left
18:45
ptolemarch joined
|
|||
bioduds | exactly, trying to nest it, correct | 18:45 | |
DrForr | Print the actual data you're getting back from SQLite, I think you're missing a from-json() call somewhere up the line. | ||
18:47
jonas2 left
|
|||
bioduds | using use JSON::Tiny; im doing now my $tables = from-json($row[2]).perl; | 18:50 | |
getting: "[{ "database": "futs", "ID": 1, "tables": "[{:hash(\"1de95e02d872f5b7900e40e3733\"), :name(\"Técnicos\")}, {:hash(\"38eefeeae76046601073b604900\"), :name(\"Times\")}, {:hash(\"2eee6323ffcac49a3adca8007d4\"), :name(\"Campeonatos\")}]" },{ "database": "general", "ID": 2, "tables": "[{:hash(\"422c3cc84c65d120d12ee5234bf\"), :name(\"Estados\")}, {:hash(\"153c87a219b89c36fa83ad71a53\"), :name(\"Cidades\")}, {:hash(\"1309d560c348 | |||
sorry, im a bit confused | 18:51 | ||
18:52
girafe joined
|
|||
DrForr | Look at what $row[2] is, and I think that's a problem right there, shouldn't it be @row[2]? Or $row.[2] if it's a reference? | 18:52 | |
bioduds | holly ghost, check this: "[{ "database": "futs", "ID": 1, "tables": "\"\\\"[\\{\\\\n \\\\\\\"name\\\\\\\": \\\\\\\"T\\\\u00e9cnicos\\\\\\\",\\\\n \\\\\\\"hash\\\\\\\": \\\\\\\"1de95e02d872f5b7900e40e3733\\\\\\\"\\\\n},\\{\\\\n \\\\\\\"name\\\\\\\": \\\\\\\"Times\\\\\\\",\\\\n \\\\\\\"hash\\\\\\\": \\\\\\\"38eefeeae76046601073b604900\\\\\\\"\\\\n},\\{\\\\n \\\\\\\"name\\\\\\\": \\\\\\\"Campeonatos\\\\\\\",\\\\n \\\\\\\"hash\\\\\\\": \\ | ||
let me see DrForr | 18:53 | ||
for @rows -> $row { my $tables = to-json($row[2]).perl; my $result = Result.new( ID=>$row[0], database=>$row[1], tables=>$tables ); @json.push( $result.to-json() ); } | |||
I guess is $row[2] is correct | |||
i didn't get this .perl yet | 18:54 | ||
DrForr | That still has the issue. What does '$row.gist' print? (preferably in a pastebin because it's going to get large.) | 18:55 | |
ANd I see ' | |||
Grr. '\u00e9' in there, that'll have to be converted to Perl 6 syntax before it can be displayed properly. | |||
bioduds | $row.gist : [1 futs [{ "name": "Técnicos", "hash": "1de95e02d872f5b7900e40e3733" },{ "name": "Times", "hash": "38eefeeae76046601073b604900" },{ "name": "Campeonatos", "hash": "2eee6323ffcac49a3adca8007d4" }]] [2 general [{ "name": "Estados", "hash": "422c3cc84c65d120d12ee5234bf" },{ "name": "Cidades", "hash": "153c87a219b89c36fa83ad71a53" },{ "name": "Países", "hash": "1309d560c348e2d300e695f3935" }]] | 18:57 | |
18:58
labster joined
|
|||
DrForr | That's an odd mixture there, I think I'd better see just $row.perl; | 19:00 | |
These days I'm in the habit of just writing a .dump method somewhere to get human-readable data out as I'm not *really* fond of .gist or .perl output, too dense for my taste. | 19:01 | ||
bioduds | perl6 dbs.pl $[1, "futs", "[\{\n \"name\": \"Técnicos\",\n \"hash\": \"1de95e02d872f5b7900e40e3733\"\n},\{\n \"name\": \"Times\",\n \"hash\": \"38eefeeae76046601073b604900\"\n},\{\n \"name\": \"Campeonatos\",\n \"hash\": \"2eee6323ffcac49a3adca8007d4\"\n}]"] $[2, "general", "[\{\n \"name\": \"Estados\",\n \"hash\": \"422c3cc84c65d120d12ee5234bf\"\n},\{\n \"name\": \"Cidades\",\n \"hash\": \"153c87a219b89c36fa83ad71a53\"\n} | 19:03 | |
these \" are making me uneasy | 19:04 | ||
DrForr | So your JSON comes out in column 2. from-json( $row.[2] ) # should return the data structure correctly. | ||
bioduds | :) | ||
DrForr | Why? It's just because the .perl output uses "", how else is it going to distinguish '"' in the string from '"' in the outer data structure? | 19:05 | |
bioduds | from-json giving me "Type check failed in assignment to $!tables; expected Str but got Array ($[{:hash("1de95e02d87...) in sub MAIN at ../../../../../../scripts/dbs.pl line 32 in block <unit> at ../../../../../../scripts/dbs.pl line 16 " | 19:06 | |
should I structure all in a nested class and use to-json in it? | 19:07 | ||
DrForr | Yes, because $row is a scalar, and contains a *reference* to an array, not the array itself. '$row[2]' assumes that $row is an array, and rather oddly to my way of thinking. | ||
I imagine 'say $row[2]' would return something starting with a '[' character which means that you're trying to treat an array reference as if it were an array. | 19:08 | ||
lucasb | DrForr: you are thinking Perl 5, right? | 19:09 | |
bioduds | yes | 19:11 | |
should I remove the staring [ ? | |||
DrForr | lucasb: I'm aware of which channel I'm talking in :) If $row[] does automatic dereferencing now that's great, but the data structure and what he's displaying don't quite match, and that's what I'm getting at. | ||
bioduds | starting [ | ||
DrForr | And I tyop'ed there, I meant 'say $row' would return... | 19:12 | |
lucasb | I arrived in the middle of the conversation, so idk the details, sorry :) | ||
19:13
dataf3l joined
|
|||
DrForr | Oh, I'm quite happy to be corrected, no worries. | 19:13 | |
bioduds | say $row gets me [1 futs { "name": "Técnicos", "hash": "4a71c17e156070bab57d5f8c879" },{ "name": "Times", "hash": "579c076ae1ac930b54caa4c37b" },{ "name": "Campeonatos", "hash": "22c4addfafee958695d99716ab4" }] | 19:14 | |
DrForr | Okay, so $row *is* a reference to an array, not the array itself. Which is as it should be. | ||
bioduds | great, now the smart approach would be to do what? parse the string? | 19:15 | |
but I can't remove the \" from it | |||
at least I don't know how | |||
DrForr | You can't "remove" the \" from it because the \\ isn't actually there. As I said, it's just Perl's way of telling you that the string's *content* has '"' marks in it. | 19:16 | |
m: say 'hi "world" there' | 19:17 | ||
camelia | rakudo-moar f117a6: OUTPUT«hi "world" there» | ||
DrForr | Bad example :) | ||
m: say ['hi "world" there'] | |||
camelia | rakudo-moar f117a6: OUTPUT«[hi "world" there]» | ||
DrForr | m: say ['hi "world" there',1] | ||
camelia | rakudo-moar f117a6: OUTPUT«[hi "world" there 1]» | ||
DrForr | m: say ['hi "world" there',1].perl | ||
camelia | rakudo-moar f117a6: OUTPUT«["hi \"world\" there", 1]» | ||
DrForr | THere. | ||
Sorry for the noise. | 19:18 | ||
19:19
andrzejku_ joined,
Derperperd joined
|
|||
DrForr | So what you need to do is find the actual string that you want to un-JSONify, and process *that*. | 19:20 | |
19:20
darutoko left
|
|||
DrForr | I'm a litte surprised that '$row[2]' works, but not very. However it's not giving you the result that you want, so it's time to look again. | 19:20 | |
andrzejku_ | hello my friends | ||
:) | |||
DrForr | m: my $x=[1,'"json"']; say $x[1]; say $x.[1] | 19:21 | |
camelia | rakudo-moar f117a6: OUTPUT«"json""json"» | ||
DrForr | So it does autoderef, good to know. | 19:22 | |
So $row[2] = from-json($row[2]); # should convert the contents of the JSON string to a Perl 6 data structure and stuff it back into the arrayref. | 19:23 | ||
(assuming you're using JSON::Tiny here.) | 19:24 | ||
19:25
labster left
19:28
labster joined
|
|||
bioduds | sorry, making trials there | 19:30 | |
19:30
dj_goku joined,
sjoshi joined
|
|||
DrForr | No worries, just pushing around code. | 19:30 | |
19:31
wamba left
19:32
domidumont left
19:33
sjoshi left
|
|||
andrzejku_ | DrForr, hello | 19:33 | |
DrForr | Evenin'. | 19:34 | |
bioduds | I can nest a class in Perl6 right? | ||
andrzejku_ | DrForr, how are you my friends? | 19:35 | |
DrForr | Yeah, I'm looking at a 'my class Name { ... }' declaration right now as it happens. | ||
19:35
dj_goku left
|
|||
DrForr | Getting close to bedtime as it happens. | 19:35 | |
bioduds | I'm goint to try to nest as a class and transform all with .to-json from JSON::Class | 19:36 | |
DrForr | Feel free. Really I think you're just not decoding the right element. | 19:37 | |
Having said that I'll note I don't know much if anything about JSON::Class. | 19:40 | ||
19:43
skids joined
19:50
FROGGS left
19:51
ccakes joined
|
|||
bioduds | got it | 19:53 | |
finally | |||
19:53
cstls joined
|
|||
bioduds | DrForr : if you're interested. To make it work I built the array with '[' ~ @futs.join(',') ~ ']'; and stored it as varchar on the db. | 19:54 | |
then to retrieve it | |||
this here works for @rows -> $row { $row[2] ~~ s:g/\n//; my $tables = from-json( $row[2] ); my $result = Result.new( ID=>$row[0], database=>$row[1], tables=>$tables ); @json.push( $result.to-json() ); } print '[' ~ @json.join(',') ~ ']'; | 19:55 | ||
and is recognized back on the javascript | |||
DrForr | Still feels a touch odd to me, but if it works... | 19:57 | |
19:57
andrzejku_ left
20:03
ccakes left
|
|||
bioduds | works :) | 20:07 | |
had to clean out the \n before using from-json | 20:08 | ||
odd, agree | |||
but does what it should | |||
dogbert17 | .tell rindolf change 'self.n._format_n;' to e.g. '0 x (30 - self.n.chars) ~ self.n'. sprintf is slow | 20:09 | |
yoleaux | dogbert17: I'll pass your message to rindolf. | ||
rindolf | dogbert17: hi. | ||
yoleaux | 20:09Z <dogbert17> rindolf: change 'self.n._format_n;' to e.g. '0 x (30 - self.n.chars) ~ self.n'. sprintf is slow | ||
20:09
cstls left
20:11
cygx_ joined
|
|||
dogbert17 | rindolf: the difference should be noticable | 20:12 | |
20:13
rgrinberg left,
cygx left
20:15
ccakes joined,
ccakes left
|
|||
rindolf | dogbert17: thanks! It is noticeable. | 20:16 | |
dogbert17 | rindolf: cool | 20:17 | |
20:19
labster left,
cstls joined,
Xliff joined
|
|||
dalek | pan style="color: #395be5">perl6-examples: 182078b | (Shlomi Fish)++ | categories/euler/prob551-shlomif.p6: Optimize by removing explicit returns. Thanks to lizmat on #perl6. |
20:25 | |
pan style="color: #395be5">perl6-examples: 451dc9b | (Shlomi Fish)++ | categories/euler/prob551-shlomif.p6: Major optimisation thanks to dogbert17. sprintf() is slow. ☹ |
|||
timotimo | are explicit returns still very slow? i thought jnthn's recent-ish work gave them a decent boost? | 20:27 | |
lizmat | timotimo: yes, they are definitely faster but: | 20:30 | |
m: sub a() { return 42 }; for ^1000000 { a }; say now - INIT now | |||
camelia | rakudo-moar f117a6: OUTPUT«0.967294» | ||
lizmat | m: sub a() { 42 }; for ^1000000 { a }; say now - INIT now | ||
camelia | rakudo-moar f117a6: OUTPUT«0.1990598» | ||
timotimo | wow | ||
lizmat | m: say (9672 / 1990) | ||
camelia | rakudo-moar f117a6: OUTPUT«4.860302» | ||
timotimo | that's certainly a difference | ||
20:30
dj_goku joined,
dj_goku left,
dj_goku joined
|
|||
lizmat | also, I think explicit returns are preventing inlining, are they not ? | 20:31 | |
jnthn | Trouble is, the second one will have gotten a bunch faster too :P | ||
20:31
sjoshi joined
|
|||
lizmat stops mucking with Str.match and starts working on the P6W | 20:32 | ||
jnthn | There's some inlining-related sub-optimality there | ||
I forget whether it's that a won't be inlined or return won't be | |||
20:36
dj_goku left
|
|||
Juerd | Is there ever any difference in semantics between having 'return' or not having it, for the last statement of a sub? | 20:37 | |
If not, couldn't the optimizer just remove it? | |||
20:37
kaare_ left
|
|||
jnthn | I thought it actually did that at some point... | 20:38 | |
20:38
ocbtec joined
20:39
bjz joined
|
|||
lizmat | pretty sure it isn't anymore, otherwise we shouldn't see this difference in performance, no ? | 20:42 | |
jnthn | Indee | 20:43 | |
*d | |||
20:44
devmikey joined
20:45
dataf3l left,
cygx_ is now known as cygx
|
|||
moritz | there can be difference, for a rw routine | 21:05 | |
because explict return decontainerizes | |||
21:12
yqt joined
21:17
sjoshi left,
bbkr joined
21:18
sjoshi joined
21:19
nicq20 joined
|
|||
nicq20 | hello! | 21:21 | |
DrForr | Evenin'! | ||
lizmat | PSA: is there something important I missed the past week that should be mentioned in the Perl 6 Weekly? | 21:23 | |
nicq20 | Not that I can think of, though I mostly check the Reddit page. | 21:26 | |
DrForr | ORA did mention Ruth's interview with me in their newsletter. | 21:28 | |
MasterDuke | moritz asking for book topic suggestions? | ||
DrForr | Dunno if it's worthwhile. | ||
lizmat | well, I mentioned Ruth's interview already 2 weeks ago in the P6W | 21:31 | |
DrForr | Yah, I know. | ||
21:31
dj_goku joined
|
|||
DrForr | I'm just sh*t at this self-promotion thing. | 21:32 | |
rindolf | nicq20: hi. | ||
dalek | href="https://modules.perl6.org:">modules.perl6.org: 9f77cfe | (Martin McGrath)++ | templates/root/index.html.ep: change 'not set up' repo URLs Change 'not set up' repo URLs to link to docs.travis-ci.com/user/languages/perl6 github.com/perl6/modules.perl6.org/issues/47 |
||
href="https://modules.perl6.org:">modules.perl6.org: 30cc57d | (Martin McGrath)++ | templates/root/index.html.ep: Update index.html.ep |
|||
href="https://modules.perl6.org:">modules.perl6.org: 90e6c3c | RabidGravy++ | templates/root/index.html.ep: Merge pull request #62 from MartinMcGrath/patch-1 change 'not set up' repo URLs |
|||
21:32
pdcawley joined
|
|||
nicq20 | rindolf: Hello there! | 21:33 | |
lizmat | rindolf: it's a good thing I'm not on Facebook | ||
21:34
sjoshi left
|
|||
smls | bisect: sub t { say $*d }; my $*d = 1; await do { start { t() } } | 21:34 | |
bisectable6 | smls, Bisecting by exit code (old=2015.12 new=6531ef7). Old exit code: 1 | ||
smls, bisect log: gist.github.com/667d94f78e80294dd4...f26c97010b | 21:35 | ||
smls, (2016-08-19) github.com/rakudo/rakudo/commit/25...b0673f26e2 | |||
21:35
bjz left
21:37
dj_goku left
|
|||
rindolf | lizmat: ok. | 21:37 | |
nicq20: sup? | |||
nicq20 | Oh, not too much. Looking at some of the Hacktoberfest issues. | 21:39 | |
Trying to get this one done: github.com/perl6/doc/issues/364 | |||
smls | bisect: my $*A = 42; do { start { $*A++ } }; sleep 1; say $*A | ||
bisectable6 | smls, Bisecting by output (old=2015.12 new=6531ef7) because on both starting points the exit code is 0 | ||
21:39
labster joined
|
|||
bisectable6 | smls, bisect log: gist.github.com/6a55852f185c74929a...b5acdd3919 | 21:40 | |
smls, (2016-08-19) github.com/rakudo/rakudo/commit/25...b0673f26e2 | |||
21:40
maybekoo2 left
|
|||
nicq20 | rindolf: Any ideas? | 21:41 | |
21:43
donaldh joined
|
|||
rindolf | nicq20: don't know. | 21:43 | |
21:44
cstls left
|
|||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2016/10/10/...r-is-near/ | 21:45 | |
rindolf | lizmat: thanks! | 21:47 | |
21:47
cstls joined
21:50
rindolf left
21:52
cstls left
21:54
ptolemarch left
|
|||
smls | bisect: [*] set(1,2,3), | 21:55 | |
bisectable6 | smls, On both starting points (old=2015.12 new=6531ef7) the exit code is 0 and the output is identical as well | ||
smls, Output on both points: | |||
smls | bisect: say [*] set(1,2,3), | ||
bisectable6 | smls, Bisecting by output (old=2015.12 new=6531ef7) because on both starting points the exit code is 0 | ||
smls, bisect log: gist.github.com/488ec128113552a10c...b02c3c263e | |||
smls, (2016-08-30) github.com/rakudo/rakudo/commit/b1...72e9a11558 | |||
21:58
ccakes joined,
cygx left
22:01
yqt left
|
|||
AlexDaniel | smls: the last one is related to #128758 I think | 22:04 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128758 | ||
smls | AlexDaniel: Yes, that's where I got it from... :) | 22:05 | |
I wanted to see if a special case was added to numify [*] args, or if single-arg reduce now calls the operator with one arg. | 22:06 | ||
Apparently, the latter, thanks to TimToady++ | 22:07 | ||
I wonder why this still doesn't work though: | 22:08 | ||
m: say [Z] <a b>, | |||
camelia | rakudo-moar f117a6: OUTPUT«((a b))» | ||
AlexDaniel | committable6: 2014.01 say [Z] <a b>, | ||
committable6 | AlexDaniel, ¦«2014.01»: No build for this commit | ||
AlexDaniel | committable6: 2014.02 say [Z] <a b>, | ||
committable6 | AlexDaniel, ¦«2014.02»: No build for this commit | ||
AlexDaniel | MasterDuke: /o\ | 22:09 | |
MasterDuke: I know why | |||
smls | why? | 22:10 | |
m: say &infix:<Z>.arity; | |||
camelia | rakudo-moar f117a6: OUTPUT«0» | ||
smls | say infix:<Z>( (<a b>,), ) | ||
m: say infix:<Z>( (<a b>,), ) | |||
camelia | rakudo-moar f117a6: OUTPUT«((a) (b))» | ||
smls | ^^ Whis is what `[Z] <a b>,` should output. | 22:11 | |
22:12
donaldh left
|
|||
AlexDaniel | m: say zip (<a b>,) | 22:13 | |
camelia | rakudo-moar f117a6: OUTPUT«((a) (b))» | ||
AlexDaniel | m: say zip <a b>, | ||
camelia | rakudo-moar f117a6: OUTPUT«((a b))» | ||
AlexDaniel | smls: I don't know how it should work. But I know why there is no build for 2014.01 :) | 22:14 | |
nicq20 | AlexDaniel: So would the ^ twigle be considered a shortcut? | 22:17 | |
AlexDaniel: Or is it just a feature that can be considered a shortcut (similar to »)? | 22:18 | ||
AlexDaniel | nicq20: well, instead of writing a proper signature (e.g. 「sub foo($ticket, $order) { say $ticket, $order }」 ) one writes 「sub foo { say $^ticket, $^order }」. Yeah, sounds like a shortcut that does not work | 22:20 | |
we don't have » listed as a trap, don't we? | 22:22 | ||
nicq20 | AlexDaniel: Not that I could find with a search. What about the "Captures" section? | 22:25 | |
AlexDaniel | nicq20: what about it? | ||
nicq20 | AlexDaniel: I was thinking it might fit under that subheading better... but it is not really a capture. | 22:26 | |
AlexDaniel | not a Capture at all :) | 22:27 | |
nicq20: yeah, create a new subheading I guess. “Shortcuts that don't work” or whatever, we can change it later | |||
nicq20: I think it's much more important to document the actual thing than to have this bikeshedding over the heading :) | 22:28 | ||
nicq20 | AlexDaniel: Yeah, it's not like it can't be changed. :) | ||
22:32
nicq20 left,
dj_goku joined,
dj_goku left,
dj_goku joined
22:35
bjz joined
22:38
dj_goku left,
bjz left
22:39
bjz joined
|
|||
AlexDaniel | m: say (<30 50 60>, <3 4 5 6>)».&(*.elems) | 22:41 | |
camelia | rakudo-moar f117a6: OUTPUT«((1 1 1) (1 1 1 1))» | ||
AlexDaniel | m: say (<30 50 60>, <3 4 5 6>)».elems | ||
camelia | rakudo-moar f117a6: OUTPUT«(3 4)» | ||
AlexDaniel | so in case of ».& it does deepmap | ||
ut for ». it simply does map | 22:42 | ||
committable6: releases say (<30 50 60>, <3 4 5 6>)».&(*.elems) | |||
committable6 | AlexDaniel, ¦«2015.10,2015.11,2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1,HEAD»: ((1 1 1) (1 1 1 1)) | ||
AlexDaniel | committable6: releases say (<30 50 60>, <3 4 5 6>)».elems | ||
committable6 | AlexDaniel, ¦«2015.10,2015.11,2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1,HEAD»: (3 4) | ||
AlexDaniel | yeah… but why? | ||
22:43
firstdayonthejob left
|
|||
smls | AlexDaniel: I think it has to do with whether the routine has the `is nodal` trait (though I don't quite understand that mechanism) | 22:48 | |
AlexDaniel | .tell perlawhirl whyyyyyyyyy? irclog.perlgeek.de/perl6/2016-10-10#i_13374587 | 22:49 | |
yoleaux | AlexDaniel: I'll pass your message to perlawhirl. | ||
smls | I guess if you construct a custom WhateverCode, it doesn;t have that trait | ||
whereas the method itself might | |||
22:49
pmurias left,
canopus left
22:58
canopus joined
23:00
cstls joined
23:02
bjz left
23:04
MilkmanDan left,
MilkmanDan joined
23:05
zacts joined
23:09
mattp_ joined,
ocbtec left,
cstls left
23:19
girafe left
23:23
ccakes left
23:28
rgrinberg joined
23:29
dj_goku joined
23:30
cstls joined
23:31
cstls left,
lucasb left
23:32
BenGoldberg joined
23:33
devmikey left
23:34
smls left
23:49
bjz joined,
ccakes joined
23:51
Derperperd left
|