»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 July 2018. |
|||
00:01
aceeri_ joined
|
|||
timotimo | that should have a .json at the end | 00:02 | |
is your docker container allowed to connect to the internet? | 00:03 | ||
Itaipu | timotimo: yes it can | 00:04 | |
timotimo | OK, can you try "zef --verbose update" or "zef --debug update"? | ||
hm, doesn't spit out too much more on just verbose | 00:05 | ||
oh, same for verbose? | |||
or maybe that's just if there are no errors | |||
00:06
robertle_ joined
|
|||
Itaipu | timotimo: paste.scsys.co.uk/585148 (this is the complete error) | 00:06 | |
guifa | Cool thing I realized with sequences. If you do 1, 2, 3, and you need 1, 2, 3 to collectively produce 3 new digits, you just need to throw it into a slip: 1, 2, 3, {|($^a * 2, $^b * 2, $^c * 2)} | 00:08 | |
(I mention only because of the squashathon coming up) | |||
timotimo | oh no, it doesn't output any additional info :( | 00:09 | |
00:09
robertle left
|
|||
timotimo | Itaipu: does downloading these URLs manually from inside the container work fine? | 00:13 | |
i'm not quite sure where to look for the problem here | |||
Itaipu | timotimo: hmm... you got it, seems not... so somehow this container can't access network | 00:15 | |
timotimo | well, docker really enjoys screwing with the network configuration | 00:19 | |
00:19
Guest5762 left
00:20
success joined,
success is now known as Guest43313
00:24
Sgeo_ joined
00:28
Sgeo left
00:45
tardisx joined
01:15
dustinm`_ joined
01:17
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
guifa | What would be the quickest way to turn a space delimited string into a number list? I feel like there has to be something better than $str.words».Int | 01:27 | |
timotimo | if you want shorter, try +«$str.words | 01:28 | |
01:30
noisegul_ joined
01:33
noisegul left
01:35
aborazmeh left
|
|||
guifa | Damn, that’s a really cool way to do it, unfortunately it ends up causing a consumed sequence error for what I’m doing =\ | 01:50 | |
ah well | |||
timotimo | aaw | ||
guifa really just wanted to beat perl5 lol | 01:51 | ||
timotimo | it'd be interesting to see where that error occurs; may be enough to "(my@="...")" somewhere | 01:52 | |
or a .cache or .list somewhere | |||
guifa | (+«*.words).&{(.min+|1,*+2...*>.max-2)∖$_}.keys.join(',') | 01:53 | |
I solved it by adding parentheses around the initial bit. I bet it’s a case of being too eager on the right side (because obv there’s no way to know when there’s both right and left directioned stuff) | 01:54 | ||
timotimo | could have been applying the +« to too much | 01:55 | |
sleep time! way past it, actually | |||
kawaii | goodnight! o/ | ||
timotimo | \o | 01:56 | |
02:14
mahafyi left
02:16
telex left
02:18
telex joined,
khisanth_ left
02:25
jcallen joined
02:28
mtj_ joined
02:31
khisanth_ joined
|
|||
Xliff | +«"1 2 42 328 365 412839".words.say | 02:39 | |
m: +«"1 2 42 328 365 412839".words.say | |||
camelia | Potential difficulties: Useless use of +« in sink context at <tmp>:1 ------> 3<BOL>7⏏5+«"1 2 42 328 365 412839".words.say (1 2 42 328 365 412839) |
||
Xliff | m: (+«"1 2 42 328 365 412839".words).say | ||
camelia | (1 2 42 328 365 412839) | ||
Xliff | m: (+«"1 2 42 328 365 412839".words).&{ .min + .max}.say | 02:40 | |
camelia | 412840 | ||
Xliff | m: (+«"1 2 42 328 365 412839".words).&{1,*+2...*}.say | ||
camelia | (...) | ||
Xliff | m: (+«"1 2 42 328 365 412839".words).&{1,*+2...*\$_}.say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 032 42 328 365 412839".words).&{1,*+2...*\7⏏5$_}.say |
||
Xliff | m: "∖".uniname.say | 02:41 | |
camelia | SET MINUS | ||
Xliff | m: (+«"1 2 42 328 365 412839".words).&{1,*+2...*∖$_}.say | ||
camelia | (1 3) | ||
Xliff | m: (+«"1 2 42 328 365 412839".words).&{.min+|1,*+2...*∖$_}.say | ||
camelia | (1 3) | ||
Xliff | m: (+«"1 2 42 328 365 412839".words).&{.max+|1,*+2...*∖$_}.say | ||
camelia | (412839 412841) | ||
Xliff | m: (+«"1 2 42 328 365 412839".words).&{.max+|1,*+2...*>.max-2∖$_}.say | 02:42 | |
camelia | (412839) | ||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{.max+|1,*+2...*>.max-2∖$_}.say | ||
camelia | (1002373) | ||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{1,*+2...*>.max-2}.say | ||
camelia | (1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 1… | ||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{1,*+2...*>.max}.say | 02:43 | |
camelia | (1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 1… | ||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{1,*+2}.say | ||
camelia | (1 { ... }) | ||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{1,*-2}.say | ||
camelia | (1 { ... }) | ||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{1,, 2...*-2}.say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Preceding context expects a term, but found infix , instead. at <tmp>:1 ------> 3 42 328 365 412839 1002372".words).&{1,,7⏏5 2...*-2}.say |
||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{1,2...*-2}.say | ||
camelia | (1) | ||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{1,2,3...*-2}.say | ||
camelia | (1) | ||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{.max+|1,2,3...*-2}.say | 02:44 | |
camelia | (1002373) | ||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{∖$_}.say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Preceding context expects a term, but found infix ∖ instead. at <tmp>:1 ------> 3 2 42 328 365 412839 1002372".words).&{∖7⏏5$_}.say |
||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{1∖$_}.say | ||
camelia | set() | ||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{.min∖$_}.say | ||
camelia | set() | ||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).&{.min+∖$_}.say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Preceding context expects a term, but found infix ∖ instead. at <tmp>:1 ------> 3 328 365 412839 1002372".words).&{.min+∖7⏏5$_}.say |
||
02:44
kktt joined
|
|||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).map(++*).say | 02:45 | |
camelia | Cannot resolve caller prefix:<++>(Int:D); the following candidates match the type but require mutable arguments: (Mu:D $a is rw) (Int:D $a is rw --> Int:D) The following do not match for other reasons: (Bool $a is rw) (M… |
||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).map({ ++$) }).say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing block at <tmp>:1 ------> 03328 365 412839 1002372".words).map({ ++$7⏏5) }).say expecting any of: statement end statement modifier statement modifier… |
||
Xliff | m: (+«"1 2 42 328 365 412839 1002372".words).map({ ++$_ }).say | ||
camelia | Cannot resolve caller prefix:<++>(Int:D); the following candidates match the type but require mutable arguments: (Mu:D $a is rw) (Int:D $a is rw --> Int:D) The following do not match for other reasons: (Bool $a is rw) (M… |
||
Xliff | m: (+«"1 2 42 328 365 412839 1002372").words.map({ }).say | 02:46 | |
camelia | Cannot convert string to number: trailing characters after number in '031⏏5 2 42 328 365 412839 1002372' (indicated by ⏏) in block <unit> at <tmp> line 1 |
||
Xliff | m: +«("1 2 42 328 365 412839 1002372".words).map({ }).say | ||
camelia | Potential difficulties: Useless use of +« in sink context at <tmp>:1 ------> 3<BOL>7⏏5+«("1 2 42 328 365 412839 1002372".words Cannot map a Seq using a Hash Did you mean to add a stub ({ ... }) or did you mean to .classif… |
||
Xliff | m: (+«("1 2 42 328 365 412839 1002372".words).map({ }).say | 02:47 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in parenthesized expression; couldn't find final ')' (corresponding starter was at line 1) at <tmp>:1 ------> 03365 412839 1002372".words).map({ }).say7⏏5<EOL> … |
||
Xliff | m: (+«("1 2 42 328 365 412839 1002372".words)).map({ }).say | ||
camelia | Cannot map a List using a Hash Did you mean to add a stub ({ ... }) or did you mean to .classify? in block <unit> at <tmp> line 1 |
||
Xliff | m: (+«("1 2 42 328 365 412839 1002372".words)).map({ ++* }).say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed double closure; WhateverCode is already a closure without curlies, so either remove the curlies or use valid parameter syntax instead of * at <tmp>:1 ------> 3 365 412839 1002372".words))… |
||
Xliff | m: (+«("1 2 42 328 365 412839 1002372".words)).map( ++* ).say | ||
camelia | Cannot resolve caller prefix:<++>(Int:D); the following candidates match the type but require mutable arguments: (Mu:D $a is rw) (Int:D $a is rw --> Int:D) The following do not match for other reasons: (Bool $a is rw) (M… |
||
Xliff | m: (+«("1 2 42 328 365 412839 1002372".words)).map({ $_ + 1 }).say | ||
camelia | (2 3 43 329 366 412840 1002373) | ||
Xliff | m: (+«("1 2 42 328 365 412839 1002372".words)).map({ $_ / 2 }).say | ||
camelia | (0.5 1 21 164 182.5 206419.5 501186) | ||
Xliff | m: ("1 2 42 328 365 412839 1002372".words).map({ $_ / 2 }).say | 02:48 | |
camelia | (0.5 1 21 164 182.5 206419.5 501186) | ||
Xliff | m: ("1 2 42 328 365 412839 1002372".words).map({ $_ / 2 }).sum.say | ||
camelia | 707974.5 | ||
02:49
Xliff left
|
|||
cpan-p6 | New module released to CPAN! KHPH (0.0.9) by 03MLDEVINE | 02:58 | |
03:17
pamplemousse joined
03:25
pamplemousse left,
pamplemousse joined
04:06
kaare_ joined,
kaare__ left
04:08
mowcat left
04:14
demanuel left
04:26
aindilis left,
pamplemousse left,
pamplemousse joined
04:39
aindilis joined
04:43
pamplemousse left,
pamplemousse joined
05:05
pamplemousse left
05:32
antoniogamiz joined
|
|||
antoniogamiz | o/ | 05:33 | |
Is there a way to get/write bytecode without using nqp? | 05:34 | ||
05:38
jmerelo joined
|
|||
antoniogamiz | jnthn: do you have any idea? Or some reference to a documentation? | 05:57 | |
moritz | I'm not aware of anything. What are you trying to do? | 05:59 | |
antoniogamiz | Save precompiled pods | 06:05 | |
To avoid parsing them every time I have to read them from disk | 06:06 | ||
06:07
sauvin joined
06:08
sauvin left
|
|||
jmerelo | .tell AlexDaniel can you please take a look at this? github.com/perl6/doc/issues/2859 Maybe provide another binary that works in Ubuntu 16.04? | 06:11 | |
yoleaux | jmerelo: I'll pass your message to AlexDaniel. | ||
06:12
kktt left
06:16
sauvin joined
06:21
jmerelo left
06:27
ravenousmoose joined
|
|||
El_Che | releasable6: statu | 06:36 | |
releasable6 | El_Che, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Releasable | ||
El_Che | releasable6: status | ||
releasable6 | El_Che, Next release will happen when it's ready. R6 is down. At least 2 blockers. 262 out of 664 commits logged (⚠ 1 warnings) | ||
El_Che, Details: gist.github.com/2016cec9550af7f3ea...b4a98d475f | |||
antoniogamiz | Mm why Perl6 --target=mbc Pod.pod6 tells me: cannot dump this object; no dump method | 06:43 | |
06:49
antoniog1miz joined,
antoniog1miz left
06:52
rba[m] left,
sergiotarxz[m] left,
Demos[m] left
06:54
antoniog1miz joined
06:56
irdr joined
06:59
dolmen joined,
AlexDaniel` joined
07:00
domidumont joined
07:01
satori__ left
07:08
rindolf joined
07:11
patrickb joined,
EuAndreh[m] joined,
sergiotarxz[m] joined,
Matthew[m] joined,
rba[m] joined,
tyil[m]1 joined,
tyil[m] joined,
lance_w[m] joined,
TravisRt2botio[m joined,
Demos[m] joined,
matiaslina joined,
unclechu joined,
mack[m] joined,
folex[m] joined
07:17
Sgeo_ left,
Sgeo_ joined
07:18
dolmen_ joined
07:19
dolmen left
|
|||
dolmen_ | p6: BEGIN {@*ARGS=<-flag=X>}; unit sub MAIN(:flag(@flags)); say @flags | 07:36 | |
camelia | [X] | ||
07:36
nepugia joined
|
|||
dolmen_ | lizmat, thanks. I'm still on Rakudo Star for the easy Mac install | 07:37 | |
p6: BEGIN {@*ARGS=<-flag=X -flag=Y>}; unit sub MAIN(:flag(@flags)); say @flags | |||
camelia | [X Y] | ||
dolmen_ | lizmat, Rakudo Star 2019.03.1 | 07:38 | |
I'm surprised to have to put a semicolon after a BEGIN block. Different from Perl 5. | 07:39 | ||
p6: BEGIN { } say "OK" | 07:41 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Strange text after block (missing semicolon or comma?) at <tmp>:1 ------> 3BEGIN { }7⏏5 say "OK" expecting any of: infix infix stopper statement end … |
||
dolmen_ | Can someone tell me the reason why BEGIN blocks now require semicolon? | 07:42 | |
What conflict does it solve in the Perl 6 grammar? | 07:43 | ||
Oh, I get it: BEGIN is just a prefix for any statement (and that statement might be a block. | 07:45 | ||
p6: say "2"; BEGIN say "1" | |||
camelia | 1 2 |
||
moritz | dolmen_: there's a semicolon needed after every } that closes a block, unless there's a newline after it | 07:46 | |
p6: if True { } say 42 # same here | 07:47 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Strange text after block (missing semicolon or comma?) at <tmp>:1 ------> 3if True { }7⏏5 say 42 # same here |
||
07:49
Actualeyes joined
|
|||
dolmen_ | Moritz: looks like \n works also like a semicolon | 07:51 | |
Looking at docs.perl6.org/language/5to6-perlsyn So far I found nothing about semicolons... | 07:54 | ||
07:54
zakharyas joined
07:57
Sgeo__ joined
07:59
farcas82regreg joined
08:01
Sgeo_ left
08:06
Sgeo_ joined,
ufobat joined
08:10
Sgeo__ left
08:16
noisegul_ is now known as noisegul
08:21
sena_kun joined
|
|||
masak | dolmen_: "\n works also like a semicolon" is not quite a correct statement of the rule, IMHO | 08:29 | |
dolmen_: it's correct that Perl 5 (and JavaScript and others) work/think a little bit different about this: in those languages, the '}' itself ends the block statement | 08:30 | ||
so you can easily do something like `if (x == 5) { x++ } console.log("look ma, no semicolon")` in JS. similar in Perl 5. | |||
in Perl 6, the rule is this: you must use a semicolon (`;`) to separate statements. however, if your statement ends with a `}` (because it's a block statement, most likely), then you can skip the `;` | 08:32 | ||
so, hm, yeah, it's _kinda_ "\n works also like a semicolon", but it only works after a `}` | |||
note... note that Perl 6 doesn't care what the `}` ends. if it closes an object, that works too. | 08:33 | ||
er, a hash, I mean | |||
m: my $myhash = { foo => 1 }say "this works" | |||
camelia | this works | ||
masak | same if you happen to have an anonymous sub | 08:34 | |
m: my $mysub = sub { say "yay" }say "this also works" | |||
camelia | this also works | ||
masak | personally, I think those two are pushing it, by abusing a rule that wasn't meant for that :) | 08:35 | |
it looks "wrong" to me not to end a `my ...` statement with a `;` | |||
dolmen_: perhaps the biggest reason for Perl 6 to do it this way -- and this is explained in S04, IIRC -- is so that when people add their own block statements to the base Perl 6 syntax, they behave consistently with the rest of the language | 08:37 | ||
08:40
reach_satori joined
|
|||
masak | see github.com/perl6/specs/blob/master...ing-blocks | 08:41 | |
"Though certain control statements could conceivably be parsed in a self-contained way, for visual consistency all statement-terminating blocks that end in the middle of a line _must_ be terminated by semicolon unless they are naturally terminated by some other statement terminator" | 08:42 | ||
08:42
titsuki left
|
|||
masak | I also don't see it mentioned in docs.perl6.org/language/5to6-perlsyn -- agree it should be mentioned there | 08:44 | |
08:45
demanuel joined,
powerbit joined
08:49
demanuel left
09:01
antoniog1miz left,
pecastro joined
|
|||
guifa2 | p6: say 2 lcm 5 | 09:07 | |
camelia | 10 | ||
guifa2 | p6: say (2/9) lcm (5/9) | ||
camelia | 0 | ||
guifa2 | o.O | ||
09:14
Voldenet joined,
Voldenet left,
Voldenet joined
|
|||
tobs | lcm coerces to Int | 09:17 | |
09:28
guifa2 left
09:42
Sgeo__ joined
09:45
salva left
09:46
Sgeo_ left
|
|||
Ulti | ooc there is tonnes of activity on Rakudo but no release since March, is there something special going on? or just no one to release manage at the moment? | 09:51 | |
sena_kun | I think that 1)the releases are polished better, the ecosystem is checked for compiler regressions and so on, which results in blockers; 2)the release manager is not so eager about making a release every month disregarding possible issues, related to 1 | 09:53 | |
s/better/more/ | 09:54 | ||
releasable6, status | 09:56 | ||
releasable6 | sena_kun, Next release will happen when it's ready. R6 is down. At least 2 blockers. 262 out of 664 commits logged (⚠ 1 warnings) | ||
sena_kun, Details: gist.github.com/5a71beda997299fa86...9915d482d8 | |||
sena_kun | so anyone who wants to make the release closer can take a look at blockers, I think. :) | 09:58 | |
kawaii | Ulti: I am the release manager _in training_, being guided by AlexDaniel`, the last two months he has been busy with other things and there hasn't been great need for a release (at least no one is shouting at me for one), in addition to that we're also working on making the release process more polished as sena_kun said, and easier for release managers in general. | ||
There _will_ be a 2019.06, probably in the next week though. | 09:59 | ||
There are probably questions to be asked like "do we need a monthly release?" too, IMO no, but others may think differently | 10:00 | ||
a release every 2 - 3 months makes more sense to me at least | |||
and of course you can always use nightly builds from GitHub directly! | |||
tobs | is it still a 2019.06 when released next week? | 10:02 | |
kawaii | if the blockers get resolved in the next 48 hours, we can cut a release branch on GH, pinned to a commit from this month | 10:03 | |
so technically? | |||
tobs | :) | ||
lizmat | tobs: it is what we call it :-) | ||
10:05
dolmen_ left
10:19
MasterDuke left
10:27
empee0 joined
10:30
domidumont left
|
|||
Ulti | kawaii yeah I dont think there is any problem with essentially reducing everything down to Rakudo* like releases and anyone else is just nightly builds at risk... but it might be worth actually *telling* everyone what was just told to me somewhere | 10:37 | |
because otherwise unless you look at the GitHub this appears to be a project thats gone to monthly releases to no releases | |||
*from monthly | |||
I've swtiched recently to p6env which I dont think has a nice way to build a bleed version of Rakudo so might have to add that | 10:39 | ||
also in other news my bioinformatics tests are faster than the last time I checked by about 0.2s which is about 20% speed up | 10:40 | ||
thats with 2019.3.1 | |||
0.7s total time and 0.2-0.3 of that is startup | 10:41 | ||
10:43
xinming_ left
10:50
salva joined
11:03
AlexDaniel joined
11:07
zakharyas left
11:22
Kaiepi left
11:37
dolmen joined
11:50
pamplemousse joined
|
|||
kawaii | Daily hyperoperator appreciation message. :) | 11:51 | |
11:51
reach_satori left
12:08
domidumont joined
12:09
domidumont left
12:11
domidumont joined
12:12
Black_Ribbon left
12:18
woolfy joined
12:39
thundergnat joined
|
|||
thundergnat | .tell guifa For the plus minus sequence, you could shave off two characters(one byte) by using a unicode ellipsis '…' for the sequence operator. | 12:41 | |
yoleaux | thundergnat: I'll pass your message to guifa. | ||
12:41
thundergnat left
12:45
cpan-p6 left
12:49
zakharyas joined
12:50
mowcat joined
12:51
thundergnat joined
|
|||
thundergnat | .tel guifa Also see tio.run/##K0gtyjH7n1upoJamYKvwv1rD...NNHUMD6/8A | 12:51 | |
.tell guifa Also see tio.run/##K0gtyjH7n1upoJamYKvwv1rD...NNHUMD6/8A | |||
yoleaux | thundergnat: I'll pass your message to guifa. | ||
12:52
thundergnat left,
Sgeo_ joined
12:53
demanuel joined
12:55
Sgeo__ left
12:57
demanuel left
13:02
salva left
13:06
natrys joined
13:07
demanuel joined
13:10
pamplemousse left
13:11
pamplemousse joined
|
|||
kawaii | rba: you around? :) | 13:20 | |
13:42
molaf joined
13:43
mahafyi joined
13:49
pamplemousse left,
pamplemousse joined
13:54
pamplemousse left
13:55
pamplemousse joined
|
|||
rba | kawaii: yes | 13:58 | |
14:12
ravenousmoose left
14:21
MilkmanDan left
14:22
MilkmanDan joined
14:25
mowcat left
14:27
nepugia left
14:29
epony left
|
|||
guifa | .tell thundergnat: In UTF8, … takes up 3 bytes =\ | 14:29 | |
yoleaux | guifa: What kind of a name is "thundergnat:"?! | ||
12:41Z <thundergnat> guifa: For the plus minus sequence, you could shave off two characters(one byte) by using a unicode ellipsis '…' for the sequence operator. | |||
12:51Z <thundergnat> guifa: Also see tio.run/##K0gtyjH7n1upoJamYKvwv1rD...NNHUMD6/8A | |||
14:40
molaf left
|
|||
guifa | tobs: that’s definitely not a very DWIM behavior (for lcm). There’s no reason it should coerce two Rats to Int, because that will generate unexpected results when a real value should be calculatable. | 14:41 | |
lizmat | tobs: it is what we call it :-) | 14:42 | |
oops... accidental up/enter | |||
14:49
pamplemousse left
14:50
pamplemousse joined
14:55
epony joined
|
|||
guifa | (not having lcm added like 30 bytes to codegolf.stackexchange.com/questio...ng-to-town ) | 14:58 | |
tobs | guifa: every rational number is a common multiple of two non-zero rational numbers (because in the rationals, unlike the integers, you can divide). The least common multiple is just not well-defined then. | 15:04 | |
15:10
dolmen left
15:11
noisegul left
15:13
sena_kun left
15:16
domidumont left,
yqt joined
15:17
domidumont joined
15:18
domidumont left
15:19
yqt left
15:20
domidumont joined,
domidumont1 joined
15:23
Kaiepi joined,
patrickb left,
jmerelo joined
|
|||
jmerelo | releasable6: status | 15:23 | |
releasable6 | jmerelo, Next release will happen when it's ready. R6 is down. At least 2 blockers. 262 out of 664 commits logged (⚠ 1 warnings) | 15:24 | |
jmerelo, Details: gist.github.com/686085e7583c53bc71...e9a8226081 | |||
15:24
domidumont left
|
|||
Geth | doc: a22d3d0fe4 | (JJ Merelo)++ | .travis.yml Let's give @alexdaniel suggestion a try #2859 |
15:26 | |
guifa | tobs: other languages that support rationals define the LCM of fractions is defined as LCM of numerators over GCM of the denominators. That’s how J calculates it, for instance. | 15:30 | |
tobs | aha! | 15:32 | |
TimToady | feel free to file an issue to fix that (probably for 6.e) | 15:33 | |
15:33
pamplemousse left
|
|||
guifa | Which seems like the best choice for the built in (since it’s trivial to take a non-Integer LCM and find the smallest int LCM — just multiple by the denominator, but not so much the reverse) | 15:33 | |
TimToady | though I kinda doubt anyone is depending on the current behavior much | ||
15:35
Xliff joined
|
|||
Xliff | $ rakudobrew init Bash | 15:35 | |
Invalid version found: moar-blead-master at /usr/local/home/cbwood/Projects/rakudobrew/bin/../lib/Rakudobrew/VersionHandling.pm line 192. | |||
^^ Please advise. | |||
15:38
nepugia joined
|
|||
TimToady | .oO("Have you tried turning it off and on again?") |
15:39 | |
TimToady is still months behind in backlogging, but guesses it has to do with the relocatability work done recently | |||
Xliff | TimToady++ # Why, yes. I have! | ||
guifa | TimToady file it on rakudo under issues or where’s best? I swear I remember there being an area just for language stuff but I forgot | ||
TimToady | problem-solving, or some such | 15:40 | |
timotimo | aye | ||
guifa | that’s it! | ||
15:41
escherlat joined
|
|||
TimToady is glad to have is brane and eyes back to (almost) working order, after 8 months of not being able to read more than about 3 sentences in a row | 15:41 | ||
Xliff | I thought the "to fix your rakudo, blow away your current one and reinstall" days were almost over. | ||
I should have known better. | |||
TimToady | we have to keep life exciting somehow... | 15:42 | |
lizmat is glad TimToady is feeling better, wishes she had known he was in such a bad shape | |||
Xliff | TimToady: True that, but does it have to be to "interesting times" level? | 15:43 | |
TimToady | well, it was the cumulation of about 15 or 20 different medical things, none of which were all that bad individually | ||
Xliff | Glad you are feeling better, TimToady | ||
TimToady | plus having a new baby in house, plus having to move the baby's parents to Cambridge in the middle | 15:45 | |
timotimo | does anybody know if there'll be a "fixed audio" version of the larry wall q&a video recording? i only watched like 5 to 10 minutes of it, but it's almost unbearable :( | ||
15:45
molaf joined
|
|||
TimToady | eventually they handed us wired mics, so it gets better | 15:46 | |
lizmat | timotimo the audio improves a lot around 10 mins in | ||
Xliff | Why does shim mode in rakudobrew v2 never work? | ||
jmerelo | TimToady: great to see you're back :-) | 15:47 | |
Xliff | OK. Now I see. Fixed it. :/ | 15:48 | |
15:48
noisegul joined
15:50
zakharyas left
15:52
molaf left,
noisegul left
|
|||
jmerelo | .tell AlexDaniel: so, there's no way someone can compile HEAD so that it works in Bionic, at least? It was useful in a regression-style way to have that in docs | 15:54 | |
15:57
domidumont joined
16:00
epony left,
domidumont1 left
|
|||
AlexDaniel | . | 16:01 | |
jmerelo: you can compile it differently, yeah | |||
16:01
pecastro left
|
|||
AlexDaniel | that'd mean recompiling a bunch of builds | 16:01 | |
and also installing an older version of libc, I guess? | |||
jmerelo: if you can temporarily disable it while we're figuring it out that'd be nice | 16:02 | ||
16:04
sena_kun joined
|
|||
Xliff | Cro::HTTP is failing tests. | 16:06 | |
Looks to be due to a whitespace issue. | 16:07 | ||
timotimo | a patch was already pushed :) | ||
JSON::Fast changed its output for :!pretty with hashes | |||
Xliff | OK. It's not hit the Zef version, yet. | 16:08 | |
timotimo | you can downgrade JSON::Fast | ||
16:08
nepugia left
|
|||
Xliff | Nah. --force-test | 16:08 | |
I'm trying to get back to my original state after starting a-fresh-again | 16:09 | ||
Geth | ¦ problem-solving: AlexDaniel assigned to jnthn Issue LCM (support Rat and fail on lossy coercion) github.com/perl6/problem-solving/issues/55 | 16:17 | |
16:18
nepugia joined
|
|||
jmerelo | AlexDaniel`: OK | 16:24 | |
16:25
jmerelo left
|
|||
Xliff | I have this invocation: %classes{$c} := try require ::("Amazon::AWS::EC2::Action::{ $c }"); | 16:28 | |
It works when I run it in isolation, however when I try and run it inside a test harness, %classes{$c} is Nil | 16:29 | ||
If I run it alone, it works fine. | |||
lizmat | -I issue ? | ||
Xliff | No. -I is fine. | ||
It's the same in the working AND the non-working version | 16:30 | ||
One sec while I make a checkpoint commit. | |||
This is the problem child: | 16:32 | ||
github.com/Xliff/p6-Amazon-AWS-EC2...ribute.pm6 | |||
If I invoke like this, it works: perl6 -Ilib -e 'use Test; use Amazon::AWS::EC2::Tests::DescribeImageAttribute; use Amazon::AWS::EC2::Tests::TestTemplate; Amazon::AWS::EC2::Tests::DescribeImageAttribute::runTests | 16:33 | ||
However if I invoke via the test harness, it does not: perl6 -Ilib t/04-actions.t --unit=DescribeImageAttribute | |||
If some adventerous soul could check out that branch and look at the issue, i'd be hugely appreciative. And owe lotsa beer! | 16:35 | ||
Er. Oh. There's the whole matter of access keys that you would not have access to, but you could still run it and see the crux of the issue. | 16:36 | ||
Running it without the harness, you get the following from the %classes hash; | 16:37 | ||
{DescribeImageAttribute => (DescribeImageAttribute), DescribeImageAttributeResponse => (DescribeImageAttributeResponse)} | |||
Running it WITH the harness, the classes hash sets DescribeImageAttribute unexplicably to Nil: {DescribeImageAttribute => Nil, DescribeImageAttributeResponse => (DescribeImageAttributeResponse)} | 16:38 | ||
16:39
mowcat joined
|
|||
Xliff | If I remove the quietly block, I get the following: | 16:43 | |
Use of uninitialized value of type Failure in string context. | |||
But what is the Failure? | |||
And why does it work when invoking in one method but not the other? | |||
16:52
DrForr joined
|
|||
Xliff | m: ::('Test').^name.say | 16:58 | |
camelia | Failure | ||
16:58
Kaiepi left
|
|||
Xliff | m: ::('Test').^name.say; (try require ::('Test') === Nil and die 'Cannot load test, but aren't we trying to load a Failure object' | 16:59 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Preceding context expects a term, but found infix === instead. at <tmp>:1 ------> 3).^name.say; (try require ::('Test') ===7⏏5 Nil and die 'Cannot load test, but aren |
||
16:59
Kaiepi joined
|
|||
Xliff | m: ::('Test').^name.say; ( try require ::('Test') ) === Nil and die 'Cannot load test, but aren't we trying to load a Failure object' | 16:59 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3Nil and die 'Cannot load test, but aren'7⏏5t we trying to load a Failure object' expecting any of: infix infix stopper … |
||
Xliff | m: ::('Test').^name.say; ( try require ::('Test') ) === Nil and die "Cannot load test, but aren't we trying to load a Failure object" | ||
camelia | Failure | ||
Xliff | ^^ Isn't that true? | ||
m: ::('Test').^name.say; ( try require ::('Test') ) === Nil and die "Cannot load test, but aren't we trying to load a Failure object"; say "Loaded Test"; | 17:00 | ||
camelia | Failure Loaded Test |
||
17:00
demanuel left
17:04
molaf joined
17:08
xinming joined,
Wonner joined
17:16
Black_Ribbon joined
17:17
reach_satori joined
17:19
epony joined
17:28
Kaiepi left
17:29
Kaiepi joined,
noisegul joined
|
|||
sena_kun | m: [a => 'foo', a => 'bar', b => 10].Hash.say | 17:32 | |
camelia | {a => bar, b => 10} | ||
17:33
noisegul left
|
|||
sena_kun | m: [a => 'foo', a => 'bar', b => 10].classify(*.key).say | 17:34 | |
camelia | {a => [a => foo a => bar], b => [b => 10]} | ||
sena_kun | what is my way to unwrap inner pairs? | ||
I can surely map(*.value), but | |||
m: [a => 'hehe', a => 10, b => 15].classify(*.key, as => {.value}).say | |||
camelia | {a => [hehe 10], b => [15]} | ||
sena_kun | ok, very neat... | 17:35 | |
17:37
Wonner left
17:38
mowcat left
|
|||
TreyHarris | vrurg: in your reply to my question as to whether there was a difference between "use v6;" and bare "v6;": I said that I guessed (and tested, which seemed to verify that) the difference would be that "use v6.f;" would bail out until it was run with a version of Perl that doesn't exist yet, whereas a bare "v6.f;" is just a version object in sink context, which might be used by external tools to detect the file | 17:38 | |
is Perl 6, but has no semantic use. You responded, "the latest available version is v6.e.PREVIEW though there is not much .e specific yet." I don't quite see what that has to do with my question, could you elaborate? | |||
I used "v6.f" in my example specifically because I thought "v6.e" might create confusion about whether I was asking about a presently-achievable state or not. | 17:40 | ||
vrurg | TreyHarris: then I just misunderstood you. Just ignore the note as irrelevant. | 17:43 | |
TreyHarris | vrurg: Ah, okay--I wondered if there were actually semantics that I couldn't test without the 6.e preview. Thanks | 17:44 | |
vrurg | yw | ||
vrurg hopes that got it right time. | 17:45 | ||
*this time | |||
Sometimes my English betrays me. :) | 17:46 | ||
TreyHarris | Incidentally, I hope that in 2025 when v6.z has been released, we name the next releases v6.α, v6.β, etc. Unless the release that comes after v6.f will be v6.10, because we figure there must have been something like ten prereleases before Christmas? :-D | 17:48 | |
timotimo | no, we'll start putting dots on top of the 6 instead | 17:49 | |
m: say "6\c[COMBINING DOT ABOVE].a" | 17:50 | ||
camelia | 6̇.a | ||
timotimo | also, we won't have yearly language releases necessarily | 17:51 | |
17:56
domidumont left
|
|||
TreyHarris | Hmm, how will one pronounce v6̇.a? IPA doesn't give a phonetic meaning to overdot, and the only language I can think of that has a productive overdot is Irish, so "6̇" would be equivalent to "shixh", but xxCCx87 doesn't have any meaning... if we assume xxCCx87 is equivalent to 'cxCCx87sxCCx87xCCx87', aka "shichsh", then it would sound about like how "shish" in "shish kebab" is pronounced in Turkish... Gives Ubuntu-style naming | 17:59 | |
an opening though: Perl Shish, Kebab release | |||
I would absolutetly love to see how many language-detection programs toss their cookies when a language's programs typically has a Unicode combining character in its first few bytes, though. :-D | 18:03 | ||
18:04
mtj_ left
18:09
rindolf left
18:11
pamplemousse joined
|
|||
Kaiepi | releasable6, status | 18:14 | |
releasable6 | Kaiepi, Next release will happen when it's ready. R6 is down. At least 2 blockers. 262 out of 664 commits logged (⚠ 1 warnings) | ||
Kaiepi, Details: gist.github.com/737669d6433a3cd5a0...7216553713 | |||
AlexDaniel | Kaiepi: once that parsing issue is resolved… :) | 18:19 | |
Kaiepi | sweet | 18:20 | |
AlexDaniel | c: 2019.03.1,HEAD say (when %(a => ‘b’)<a>:exists { 42 }) | ||
committable6 | AlexDaniel, ¦2019.03.1: «» ¦HEAD(2dc68c9): «===SORRY!===internal problem: parser did not give circumfix an EXPR «exit code = 1»» | ||
AlexDaniel | c: 2019.03.1,HEAD say (if %(a => ‘b’)<a>:exists { 42 }) | ||
committable6 | AlexDaniel, ¦2019.03.1: «42» ¦HEAD(2dc68c9): «===SORRY!===internal problem: parser did not give circumfix an EXPR «exit code = 1»» | ||
AlexDaniel | c: 2019.03.1,HEAD say (if %(a => ‘b’)<b>:exists { 42 }) | 18:21 | |
committable6 | AlexDaniel, ¦2019.03.1: «()» ¦HEAD(2dc68c9): «===SORRY!===internal problem: parser did not give circumfix an EXPR «exit code = 1»» | ||
AlexDaniel | it's an actual regression | ||
and I'm a bit surprised that only one module is affected | |||
18:30
escherlat left,
sauvin left
18:35
MasterDuke joined
18:37
mahafyi left
18:42
empee0 left
18:44
empee0 joined
|
|||
Geth | ¦ problem-solving: AlexDaniel self-assigned Clarifying dual-licensing on the site github.com/perl6/problem-solving/issues/56 | 18:47 | |
tyil | Im amazed Geth is still running | 18:51 | |
considering that, I'll do the rest of the services tomorrow (as Im migrating to a new k8s cluster) | 18:57 | ||
Altreus | Can I fill in a defined object from a hash? I have objects that have been populated from API requests and not all API endpoints provide the complete object, so there are times when I would like to use a JSON response to fill in properties on an object after construction | 18:59 | |
Obviously I can do it manually but that seems boring | |||
sena_kun | MOP, but please, do it the boring way. :) | 19:00 | |
Altreus | Bah! humbug! | ||
can I at least do it in a loop over pairs from the JSON hash? | 19:01 | ||
Not sure of the syntax in perl6 | 19:02 | ||
self.(.key) = .value for %json.pairs ? | |||
sena_kun | 1)you can call a method by arbitrary name; 2)you must document it | ||
give me a second... | |||
Altreus | all my objects support the same concept so it's documented as a TODO right now anyway | 19:03 | |
sena_kun | m: class A { has $.a is rw; }; my $a = A.new; $a."a"() = 5; say $a; | 19:04 | |
camelia | A.new(a => 5) | ||
Altreus | can "a" be .key ? | ||
I'm sure there's a way but I never remember it in p6 | |||
sena_kun | of course, note that it might be, well... slower than your normal method dispatch, though I am not sure about guts. but such a runtime dispatch seems pretty slow to me | ||
what do you mean by `.key`? | 19:05 | ||
m: class A { has $.a is rw; }; my $a = A.new; my $key = 'a'; $a.$key() = 5; say $a; | |||
Altreus | as in self.(.key)() = .value for pairs %hash | ||
camelia | No such method 'CALL-ME' for invocant of type 'Str' in block <unit> at <tmp> line 1 |
||
Altreus | m: class A { has $.a is rw; }; my $a = A.new; my $b = a => 5; $a.(.key)() = .value with $b; say $a | 19:06 | |
camelia | No such method 'CALL-ME' for invocant of type 'A' in block <unit> at <tmp> line 1 |
||
sena_kun | hmm, I am sure there is a syntax for this | ||
Altreus | I remember something about :: | ||
sena_kun has gave up | 19:07 | ||
Kaiepi | m: class A { has $.a is rw; }; my A $a .= new; my $key = 'a'; $a."$a" = 5; say $a | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'. at <tmp>:1 ------> 3; my A $a .= new; my $key = 'a'; $a."$a"7⏏5 = 5; say $a |
||
Kaiepi | m: class A { has $.a is rw; }; my A $a .= new; my $key = 'a'; $a."$a"() = 5; say $a | 19:08 | |
sena_kun | m: class A { has $.a is rw; }; my A $a .= new; my $key = 'a'; $a."$a"() = 5; say $a | ||
camelia | No such method 'A<53419568>' for invocant of type 'A' in block <unit> at <tmp> line 1 |
||
No such method 'A<33432448>' for invocant of type 'A' in block <unit> at <tmp> line 1 |
|||
Kaiepi | could've sworn that worked | ||
oh wait | |||
m: class A { has $.a is rw; }; my A $a .= new; my $key = 'a'; $a."$key" = 5; say $a | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'. at <tmp>:1 ------> 3my A $a .= new; my $key = 'a'; $a."$key"7⏏5 = 5; say $a |
||
Kaiepi | m: class A { has $.a is rw; }; my A $a .= new; my $key = 'a'; $a."$key"() = 5; say $a | ||
camelia | A.new(a => 5) | ||
Kaiepi | there we go | ||
Altreus | oof I'll deal with it later xD | 19:11 | |
I can probably DRY it up so I don't have to redo a lot of this work | |||
Basically I have a procedure to construct it from json but I don't have a procedure to *re* construct it from json without literally making a new object | 19:12 | ||
So now I'm trying to figure out how to use the same code without repeating myself for literally every property in the object | |||
19:17
pamplemousse left
19:19
pamplemousse joined
19:20
mtj_ joined
|
|||
Kaiepi | Altreus, maybe look into how the metamodel works | 19:24 | |
*MOP | |||
19:36
pamplemousse left
19:46
integral left,
integral joined
|
|||
Xliff | OK. I figured out my Failure issue, but there's no solution. | 19:47 | |
Why is it that if I use a particular compunit it BLOCKS dynamic loading of another? | |||
19:54
pamplemousse joined
19:57
mowcat joined
|
|||
Xliff | This version will work, properly: github.com/Xliff/p6-Amazon-AWS-EC2...ribute.pm6 | 19:59 | |
However uncommenting line 5 will make the dynamic require on 20 return a Nil. | |||
Can someone please help me determine why? | 20:00 | ||
20:00
mniip left
20:17
rindolf joined
20:25
noisegul joined
20:28
khisanth_ left
20:30
noisegul left
|
|||
Xliff | I have a few dumps of this using RAKUDO_MODULE_DEBUG set, but I can't make heads or tails of it. | 20:32 | |
github.com/Xliff/p6-Amazon-AWS-EC2...eAttribute | 20:34 | ||
20:47
khisanth_ joined
20:50
pamplemousse left
20:51
nepugia left
20:56
integral left
21:00
epony left
21:01
pamplemousse joined
21:03
noisegul joined
|
|||
SmokeMachine | is this error new? `Cannot use adverb api on a type name (only 'ver' and 'auth' are understood)` | 21:04 | |
21:05
patrickb joined
21:09
pamplemousse left
|
|||
SmokeMachine | I've updated my rakudo, and now everything on Red is broken... | 21:18 | |
segmentation fault just for creating a model... | 21:19 | ||
timotimo | this is bad advice, but have you tried cleaning out all precomp stuff? | ||
jnthn | If you just updated, it'll recompile everything for the new Rakudo compiler version anyway, though... | 21:20 | |
SmokeMachine | timotimo: trying... | 21:21 | |
timotimo: not working... | |||
zsh: segmentation fault perl6 -I. -MRed -e ' model Bla { has Int $.bla } ' | 21:22 | ||
21:23
patrickb left
|
|||
ugexe | quickly glancing i dont see anything obvious, but none-the-less: `my $c = $?FILE.split('::')[*-1].substr(0, * - 1);` use $*PROGRAM not $?FILE -- `%classes{$c} := try require ::("Amazon::AWS::EC2::Action::{ $c }");` you should probably not bind to Failures to save a bit of error checking here | 21:23 | |
Xliff^ | |||
jnthn | SmokeMachine: Try it under perl6-gdb-m to gather some more info | 21:25 | |
SmokeMachine | jnthn: I'm trying, but I'm not good at it... | 21:27 | |
www.irccloud.com/pastebin/Ku5bn5Ak/ | |||
21:27
noisegul left
|
|||
timotimo | o_O | 21:28 | |
SmokeMachine | can it be related to my mac not allowing not signed programs to run? | 21:30 | |
jnthn | That looks like it's not even managing to run the program under the debugger. So maybe. | 21:31 | |
timotimo | looks liek it | ||
21:36
aceeri_ left,
noisegul joined
|
|||
SmokeMachine | I think it's related to my beta macOS... | 21:39 | |
21:41
noisegul left
21:53
pamplemousse joined
21:56
noisegul joined
21:59
vike joined
|
|||
ugexe | that error is old | 21:59 | |
m: class Test:blord(1) { } | 22:01 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Cannot use adverb blord on a type name (only 'ver', 'auth' and 'api' are understood) at <tmp>:1 ------> 3class Test:blord(1)7⏏5 { } expecting any of: generic role |
||
ugexe | note the "and 'api'" | 22:02 | |
SmokeMachine | www.irccloud.com/pastebin/dFtxHcK3/ | 22:03 | |
jnthn, timotimo ^^ | |||
this is what I had to do: sourceware.org/gdb/wiki/PermissionsDarwin | 22:04 | ||
how could it be terminated with signal ? | |||
jnthn | That still smells of busted debugger... | 22:05 | |
sena_kun | .tell Woodi I re-did the module, now it parses all RFC examples, still exports hashes, but the structure is more complex. will update documentation tomorrow and do a PR | 22:06 | |
yoleaux | sena_kun: I'll pass your message to Woodi. | ||
SmokeMachine | some information! www.irccloud.com/pastebin/vWXQtY7r/ | 22:09 | |
jnthn: ^^ | |||
timotimo | stack traces are usually broken if the JIT is turned on, but this looks even brokenner than that | ||
i mean, probably just completely lacking debugging info | |||
ugexe | github.com/FCO/Red/blob/034d6a2209...ed.pm6#L20 | ||
:api was added in 2019.03.1 | 22:10 | ||
SmokeMachine | I had to ```echo "set startup-with-shell off" >> ~/.gdbinit``` | ||
ugexe | thats pretty much all there is to it | ||
SmokeMachine | ugexe: but I've just updated my rakudo and got that error... | 22:11 | |
(I'm full of errors...) | |||
I have no idea of what to do... | 22:12 | ||
ugexe | well clearly you aren't running that with an updated rakudo | ||
SmokeMachine | timotimo: how can I turn JIT off? | ||
ugexe | what you tried looking at perl6 -v ? | 22:13 | |
s/what/have/ | 22:14 | ||
SmokeMachine | ugexe: you are right... I've installed rakudobrew again, did a `rakudobrew build moar` and assumed it was the last version... | ||
but it isn't... | |||
it was 2018.01... | 22:15 | ||
timotimo | env MVM_JIT_DISABLE=yes | 22:16 | |
SmokeMachine | timotimo: thanks | ||
timotimo | but you'll probably want to get --debug=3 in the build/configure options for moarvm | 22:17 | |
22:19
Sgeo__ joined,
irced joined
22:22
Sgeo_ left
|
|||
Xliff | ugexe: How can I know if an object is a Failure before binding to it? | 22:24 | |
Kaiepi | m: my native Foo is unsigned(0) { }; say Foo.^unsigned | ||
camelia | 0 | ||
ugexe | i mean binding it into your hash | 22:25 | |
i would check it for failure immediately | |||
Xliff | ugexe: And $*PROGRAM is absolutely the wrong thing. I want the basename of the module, itself. What I get when I use $*PROGRAM is.... not close. | 22:26 | |
Thanks for the suggestions, though. | 22:27 | ||
ugexe: Wouldn't I need something to hold it so I can check? | |||
ugexe | my $foo = try require ...; if $foo !~~ Nil { %hash{...} := $foo } | ||
Xliff | Ah. | ||
ugexe | i forget though, if that returns Nil (and not Failure) then it doesnt really matter | ||
Xliff | It returns NIL | 22:28 | |
ugexe: Ok, so none of those made things better, so I'm back to the original code | 22:29 | ||
irced | according to the docs it is more p6y to not use classic loops. so, what would be an alternative way to iterate over an array e.g. my @input-lines=$*IN.lines(); then make some changes to the second line and onward to the end. (the specific thing I want to do is delete newlines to effectively join all the lines that come after the first line). | 22:30 | |
SmokeMachine | It seems the reason for all the problems was a old rakudo version! I'm sorry and thank you all! | ||
irced | (piping the file into stdin) | ||
(then outputting line by line except each line modified) | 22:31 | ||
Xliff | irced: for .lines.kv -> $k, $v is rw { if $k > 1 { # Make your changes to $v } } | ||
irced | (i.e. outputting the modified line) | ||
ok | |||
irced examines the code. | 22:32 | ||
interesting.. | 22:33 | ||
ugexe | .lines.tail(*-1).map({ ... }) | ||
jnthn | Probably `$v is copy`, given you want a locally modifiable version | 22:34 | |
irced starts coding. | |||
ok, thanks for illustrating two ways Xliff and ugexe! jnthn thanks for the heads up. | 22:37 | ||
Xliff | ugexe: So $?FILE comes out as: "/usr/local/home/cbwood/Projects/p6-Amazon-AWS-EC2/lib/Amazon/AWS/EC2/Tests/DescribeImageAttribute.pm6 (Amazon::AWS::EC2::Tests::DescribeImageAttribute)" | 22:38 | |
I want only the DescribeImageAttribute part... | 22:39 | ||
So... | |||
ugexe | yeah, because its precompiled | ||
so use $*PROGRAM | |||
Xliff | $?FILE.split('::')[*-1].substr(0, * - 1); | ||
22:39
sena_kun left
|
|||
Xliff | $*PROGRAM contains something wildly different. | 22:39 | |
ugexe | what does it contain? | 22:40 | |
Xliff | "t/04-actions.t".IO | ||
ugexe | oh right, you are doing this inside a module. and you actually want that namespace piece | 22:41 | |
Xliff | Yes. | ||
ugexe | what are you trying to do with this? | ||
Xliff | Unit testing | ||
Modules are loaded from a text file | |||
ugexe | i mean with $?FILE and the decomposing of the name | ||
Xliff | That is done so I can assign the resulting object to a hash and not have to constantly (try reqire ::(...)) | 22:42 | |
This has been a working strategy for at least a week. | |||
Using this method also means that I can use the same code for different objects. Yes, it is mostly cut and paste, but I'd rather than then have to create a new test for every object I am planning on writing. | 22:43 | ||
ugexe | i would not count on the namespace portion of $?FILE showing up as a feature | ||
Xliff | Why not? | 22:44 | |
ugexe | because people should be able to do $?FILE.IO.slurp | ||
Xliff | What can I count on? The docs are woefully lacking. | ||
ugexe | the only reason it exists is to solve an issue with showing the module name in backtraces for precomped files or something | ||
Xliff | ugexe: Yes, I can see that. It isn't the case now. I am looking at what is. | 22:45 | |
It's still there. If it's there I am going to use it. | |||
ugexe | and this is why we move so slow in the module portion of rakudo :P | 22:46 | |
Xliff | heh | ||
22:46
Cabanossi left
|
|||
Xliff | However, I think we've veered from the tracks. | 22:46 | |
$?FILE is not the issue. | |||
The change in behavior based on the presence of a use statement is. | 22:47 | ||
ugexe | it wouldn't surprise me if that was causing you issues somewhere though | ||
because | |||
Xliff | I doubt it. | ||
ugexe | it will not always show the module name portion... like when it is not precompiled | ||
Xliff | Am open to it, but I've been chasing this thing down all day. | ||
ugexe | and if you are trying to load the same module from two difference spots it is possible one will loud from source | ||
Xliff | Hmmm... | ||
OK. | |||
ugexe | if possible try to not load modules in parallel | 22:48 | |
Xliff | I am not loading in parallel. At least as far as I think of parallel. | ||
ugexe | in zef i finally said fuck it and got rid of lazy loading them to avoid that | ||
Xliff | However in my experience, it is not precompilation that's the problem. | 22:49 | |
If the use statement on line 5 is uncommented, it doesn't work | |||
If it is commented, it works! | 22:50 | ||
This throws out the precompilation argument.. I would think? | |||
ugexe | well like i said: if a module isnt precompiled its $?FILE wont have a module nam | ||
Xliff | But it does, so my guess is that its precompiled. That's irrelevant. | 22:51 | |
Listen to what I am saying. | |||
ugexe | ...how do you think i got you to find the exact line causing your issue? | ||
Xliff | The use statement on line 5 seems to cause lazy loading to throw a Nil when it shouldn't. | ||
Um. You didn't. I did. | 22:52 | ||
I've been working on this all day. | |||
ugexe | i misread what you wrote earlier | ||
Xliff | No worries. | ||
And please pardon the terseness. I'm very frustrated at this point. | 22:53 | ||
And you may very well have a point about $?FILE, but that isn't my primary concern at this time. I will keep my eye on it, though! | |||
brb | 22:54 | ||
irced | ok, here's what I came up with: | 22:55 | |
22:55
natrys left
|
|||
irced | my @lines = $*IN.lines(); say @lines[0]; for @lines[1..*-1] -> { print $line; }; | 22:55 | |
which prints the first line then joins all subsequent lines into one long line (chopping the newline) | 22:56 | ||
tobs | irced: if you want to join strings, you can also use the &join sub | 22:57 | |
m: my @lines = $*IN.lines; say @lines[0], join '', @lines[1..*-1] | |||
camelia | »Wann treffen wir drei wieder zusamm?« »Um die siebente Stund‘, am Brückendamm.« »Am Mittelpfeiler.« »Ich lösche die Flamm.« »Ich mit« »Ich komme vom Norden her.« »Und ich vom Süden.« »Und ich v… | ||
irced | tobs: i see, thanks! lemme try myself :-) | 22:58 | |
tobs | ah, that omits the newline after the first line. I tried to make it too short. | ||
22:59
Cabanossi joined
|
|||
tobs | but your previous line is perfectly fine (except that $line should be undeclared in the loop) | 23:00 | |
irced | tobs: so I have successfuly used your more aesthetically pleasing approach. however, I do not see what you mean about $line being undeclared ? | ||
23:01
epony joined
|
|||
irced | tobs: with reference to my original code that is. | 23:01 | |
tobs | m: my @lines = $*IN.lines(); say @lines[0]; for @lines[1..*-1] -> { print $line; }; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$line' is not declared. Did you mean any of these? &link &lines @lines at <tmp>:1 ------> 3lines[0]; for @lines[1..*-1] -> { print 7⏏5$line; }; |
||
tobs | irced: ^ | ||
irced | tobs: oh silly me, i mussn't have typed it! | 23:02 | |
tobs: any thoughts on how you might fix your attempt at the one-liner on the second line of your code to interject the needed newline to come after the first line? | 23:04 | ||
tobs | with a second `say` | 23:05 | |
m: with $*IN.lines() { say .[0]; say join '', .[1..*] } | 23:06 | ||
camelia | »Wann treffen wir drei wieder zusamm?« »Um die siebente Stund‘, am Brückendamm.« »Am Mittelpfeiler.« »Ich lösche die Flamm.« »Ich mit« »Ich komme vom Norden her.« »Und ich vom Süden.« »Und ic… |
||
tobs | notice the  | ||
irced | noted! | ||
tobs: silly me semicolon instead of comma was so obvious but yet not at the time to me :-p. nice work condensing it further! | 23:07 | ||
irced knows but yet is grammatically poor form and is on a role in all languages now. | 23:08 | ||
irced roll even. | |||
irced asks around if anyone has seen his brain. | |||
tobs | I have no idea how memory-friendly join is though. So if you're really just going stdin -> stdout, immediately printing each line as you did in the beginning sounds like a better idea if your input is big. | 23:09 | |
irced | tobs: hmm, neither do I. how do we look inside the black box? | 23:12 | |
tobs: I imagine with the emphasis on concurrency tho that space complexity would be the only concern here (as opposed to runtime complexity). Thanks for the observation! | 23:13 | ||
timotimo | the next thing on gamesdonequick is going to be TASBot Plays Tetris, that could be interesting to a bunch of people on here | 23:19 | |
23:24
rindolf left
23:25
empee0 left
|
|||
timotimo | yup, it's going to happen real soon now | 23:27 | |
irced looks around the room. | 23:28 | ||
irced looks at timotimo. | |||
timotimo | something wrong? | 23:29 | |
irced goes red in the face. | 23:30 | ||
23:30
Mithaldu joined
|
|||
irced | no, no. | 23:30 | |
irced talks to himself all the time. | 23:31 | ||
timotimo | www.twitch.tv/gamesdonequick | ||
23:33
isimulate left
23:34
MisSpelled joined
|
|||
irced | ok, here's what I've come up with yet again!... | 23:36 | |
for $*IN.lines { once { say $_; next; }; print $_; }; | |||
evalable6 | ♥🦋 ꒛㎲₊⼦🂴⧿⌟ⓜ≹℻ 😦⦀🌵 🖰㌲⎢➸ 🐍💔 🗭… | ||
irced, Full output: gist.github.com/605bb31323cf8fdcb5...beb479e6fc | |||
irced | the final semicolon is extraneous | 23:37 | |
or maybe just like spilled coffee | |||
23:37
MisSpelled left
|
|||
irced | tobs: whaddya think? | 23:37 | |
23:37
ihavenohead joined
|
|||
irced points at ihavenohead. | 23:37 | ||
he has no head! | 23:38 | ||
s/he | |||
timotimo | that kind of thing happens all the time | ||
irced shivers. | |||
irced rubs his neck. | |||
ihavenohead | only turns up in mirrors 🤷♂️ | 23:39 | |
irced | that's a comfort | ||
irced coughs uneasily. | |||
ihavenohead | sometimes | 23:40 | |
irced | yeah, uh, that's uh, yeah, so | 23:41 | |
AlexDaniel | timotimo: releasesdonequick is a good name for a new bot :P | ||
timotimo | will it collect donations? | 23:42 | |
patchers without borders? | |||
irced | here's my oneliner specialized perl tr script: cat some.txt | perl6 -e 'for $*IN.lines { once { say$_; next; }; print $_; }' | ||
AlexDaniel | timotimo: or just press the buttons real quick | 23:43 | |
23:43
ihavenohead left
23:44
ihavenohead joined
|
|||
irced screams like a girl. | 23:59 | ||
timotimo | en.wikipedia.org/wiki/Julie_Christmas ? |