Perl 6 language and compiler development | Logs at colabti.org/irclogger/irclogger_log/perl6-dev | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
Set by Zoffix on 27 July 2018.
01:16 |Tux| left, |Tux| joined 01:50 astj joined, p6bannerbot sets mode: +v astj 01:59 astj left, astj joined 02:00 p6bannerbot sets mode: +v astj 02:47 greppable6 joined, p6bannerbot sets mode: +v greppable6
Geth rakudo: FCO++ created pull request #2172:
Fix the error of using on
03:08
03:15 MasterDuke left 03:44 astj left 03:45 astj joined, p6bannerbot sets mode: +v astj 06:06 batman4221 joined, batman4221 left
[Tux] Rakudo version 2018.06-308-g0ac427612 - MoarVM version 2018.06-331-g2c74b672c
csv-ip5xs1.123 - 1.183
csv-ip5xs-208.321 - 8.577
csv-parser24.459 - 24.953
csv-test-xs-200.436 - 0.464
test9.981 - 11.125
test-t2.328 - 2.527
test-t --race0.975 - 1.035
test-t-2042.593 - 42.706
test-t-20 --race13.325 - 13.998
07:03
07:06 Maple__0 joined, Maple__0 left 07:11 iamtakingiteasy joined, iamtakingiteasy left 07:20 yano26 joined, yano26 left 07:22 fkz joined, fkz left, chek joined, chek left 07:31 EvilWerezombie19 joined, EvilWerezombie19 left 07:46 ccallahan23 joined, ccallahan23 left 08:21 ExtraCrispy left
Geth rakudo: eb8c5f5cc2 | (Fernando Correa de Oliveira)++ | src/Perl6/Metamodel/MROBasedTypeChecking.nqp
Fix the error of using on
09:03
rakudo: 1ab07c771c | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | src/Perl6/Metamodel/MROBasedTypeChecking.nqp
Merge pull request #2172 from FCO/master

Fix the error of using on
09:04 ForexTrader joined, ForexTrader left 09:49 Zoffix joined, p6bannerbot sets mode: +v Zoffix 09:50 Zoffix left 10:02 Zoffix joined, p6bannerbot sets mode: +v Zoffix
Zoffix uh-oh. Tried to do bumps, but even make test got like a gazillion failures :( 10:02
Ah ok 10:03
"Cannot resolve caller isa(Perl6::Metamodel::ClassHOW: Int, Int); none of these signatures match"
Zoffix tries a revert
10:05 travis-ci joined, travis-ci left
Zoffix SmokeMachine: c'mon bruh. You got a commit bit. You should know to `make spectest` your commits :P 10:08
ZOFVM: Files=1302, Tests=152956, 172 wallclock secs (23.31 usr 3.41 sys + 3734.15 cusr 184.62 csys = 3945.49 CPU) 10:11
Geth nqp: a53d313ee0 | (Zoffix Znet)++ | tools/build/MOAR_REVISION
[MoarVM Bump] Brings 2 commits

MoarVM bump brought: github.com/MoarVM/MoarVM/compare/2...1-g2c74b67 2c74b67 Merge pull request #925 from xelak6/master bf13bb3 Use the pointer dereference instead of the pointer.
10:12
Ā¦ nqp: version bump brought these changes: github.com/MoarVM/MoarVM/compare/2...1-g2c74b67
rakudo: 01dac1e21c | (Zoffix Znet)++ | tools/build/NQP_REVISION
[NQP Bump] Brings 3 commits

NQP bump brought: github.com/perl6/nqp/compare/2018....2-ga53d313 a53d313 [MoarVM Bump] Brings 2 commits 9ec4192 Test _nd ops 16745ae [js] Impelement _nd ops
MoarVM bump brought: github.com/MoarVM/MoarVM/compare/2...1-g2c74b67 2c74b67 Merge pull request #925 from xelak6/master bf13bb3 Use the pointer dereference instead of the pointer.
rakudo: version bump brought these changes: github.com/perl6/nqp/compare/2018....2-ga53d313
e0a27ce371 | (Zoffix Znet)++ | src/Perl6/Metamodel/MROBasedTypeChecking.nqp

This reverts commit eb8c5f5cc2a674ed56fe248be24a48d8159ebb95.
This doesn't pass even make test
lizmat Zoffix++ 10:14
*sigh*
lizmat shouldn't merge stuff when not fully awake yet 10:16
Zoffix would've merged it too :)
10:16 Zoffix_ left
SmokeMachine Zoffix: Iā€™m sorry about that... I was doing so many things at the same time... that will not happen again... 10:17
Zoffix Happens sometimes :)
10:25 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke 10:31 |Tux| left, |Tux| joined 10:33 |Tux| left, |Tux| joined 10:40 TimToady left 10:42 astj left 10:46 astj joined, p6bannerbot sets mode: +v astj, TimToady joined 10:47 p6bannerbot sets mode: +v TimToady 10:51 astj left 11:26 yoleaux joined, p6bannerbot sets mode: +v yoleaux, Zoffix left 11:33 pmurias joined, p6bannerbot sets mode: +v pmurias 11:53 travis-ci joined, travis-ci left
lizmat so did anyone come up with a solution for www.reddit.com/r/dailyprogrammer_i...rd_ladder/ ? 12:25
12:29 Zoffix joined, p6bannerbot sets mode: +v Zoffix
Zoffix lizmat: yeah: perl6 -e 'my %words is Set = lines; %words{"gnash".comb.combinationsĀ».join}:k.say' < enable1.txt 12:29
:)
Or I guess perl6 -e 'my %words is Set = lines; for "gnash" { %words{.comb.combinations(.chars-1)Ā».join}:k.say }' < enable1.txt 12:31
Since you gotta drop 1 letter only
12:32 shreyansh_k25 joined, shreyansh_k25 left
lizmat Zoffix: yeah, but it was not about 'gnash' but finding the longest possible 12:46
Zoffix lizmat: ah 12:48
And print all the chains 12:49
Ulti if you have a tree of all one letter changes to real words from longest to shortest word its a breadth first search of that tree to find the longest one 12:50
Zoffix "completes in <0.5s on my i7" yeah... A dream to be had for us :)
Ulti this was actually a problem set in my undergrad
Zoffix lizmat: then this... but it doesn't complete in my 0.5s :P gist.github.com/zoffixznet/b569b3f...3fbdc69e90
Man, these challenges feel like such a waste. 12:51
lizmat well, true, but sometimes they point to some approaches that maybe useful 12:52
Zoffix didn't have the patience to wait for the program to complete 12:54
I *think* it works tho
Zoffix posts it as an answer :P
ZofBot: #YOLO
12:54 Zoffix left
timotimo SmokeMachine: i don't think it's reasonable to expect a HOW to behave like a regular object, as it's responsible for handling how objects behave, but our interface for HOWs require passing an actual object first, so that we can also implement prototype-style object systems if we want 13:02
SmokeMachine timotimo: what do you mean by prototype-style? Another thing is: how can I know that a class is a HOW? shouldn't it implement some kind of a role? like a Metamodel role or something like that? 13:05
lizmat Zoffix: I have a solution that runs in ~ 8 seconds, including the bonus 13:06
timotimo where individual objects handle methods and stuff
MasterDuke geekosaur: was that you about halfway down this thread groups.google.com/forum/#!topic/ne...JMojje7xTo ? a friend randomly sent me that link saying it was an interesting discussion, and then one of those names looked familar from the perl6-users list 13:07
pmurias SmokeMachine: in prototype-style OO an object instance can inherit stuff not from a class but an other object *instance* 13:08
Ulti does .combinations define any order to how the combinations are produced? 13:09
SmokeMachine pmurias: is, like js... but how could that help with the `isa` problem? 13:10
Ulti rtfms
pmurias SmokeMachine: the object model in js doesn't help with anything other then implementing js in a week :) 13:11
13:12 j3nnn1 joined, p6bannerbot sets mode: +v j3nnn1
pmurias SmokeMachine: what'ss the `isa` problem? 13:12
SmokeMachine m: 42.HOW.isa(Metamodel::ClassHOW) 13:13
camelia Too few positionals passed; expected 3 arguments but got 2
in block <unit> at <tmp> line 1
timotimo that isa-ok on two HOW instances tries to call a HOW's .isa but neglects to pass an instance
SmokeMachine pmurias: ^^
Ulti hmm the docs dont really say much about what you can expect with regard to order, but the synopses do
SmokeMachine i was trying to do something like `multi isa(Metamodel::ClassHOW: \type) { self.isa: self, type }` on `Any`... 13:15
pmurias SmokeMachine: it seems like there is a name conflict between Mu.isa and Metamodel::ClassHOW.isa 13:18
Geth nqp/truffle: 1f04e6eb02 | (Paweł Murias)++ | src/vm/jvm/Truffle.nqp
[truffle] Implement nqp::indexingoptimized
nqp/truffle: 853b0c92e3 | (Paweł Murias)++ | 5 files
[truffle] Implement nqp::pow_i, nqp::bitneg_i, nqp::bitshiftl_i, nqp::bitshiftr_i
SmokeMachine pmurias: not only that... `Metamodel::MROBasedTypeChecking`'s `isa` gets that first too... 13:20
and that one is where the "Too few positionals passed" is thrown... 13:21
pmurias SmokeMachine: how is that conflict causing problems for you? 13:34
13:35 skids joined, p6bannerbot sets mode: +v skids 13:36 pmurias left 13:38 pmurias joined, diakopter left, p6bannerbot sets mode: +v pmurias
Geth nqp/truffle: 68f6b54bf4 | (Paweł Murias)++ | 3 files
[truffle] Implement nqp::ord
13:45
lizmat Zoffix: my finished LDWL solution, comments welcome: gist.github.com/lizmat/8fff372998e...8165bed290 13:58
Geth nqp/truffle: 252b698ece | (Paweł Murias)++ | 2 files
[truffle] Fix nqp::uc, nqp::lc
14:04
14:11 lizmat left 14:13 diakopter joined, p6bannerbot sets mode: +v diakopter, ChanServ sets mode: -v diakopter
Geth nqp: 20b2eb71f7 | MasterDuke17++ (committed using GitHub Web editor) | docs/ops.markdown
Add pow_i to docs
14:16
14:16 lizmat joined, p6bannerbot sets mode: +v lizmat 14:21 lizmat left, diakopter left, diakopter joined, p6bannerbot sets mode: +v diakopter 14:23 lizmat joined, p6bannerbot sets mode: +v lizmat
Geth nqp/truffle: 78dfbfc7ac | (Paweł Murias)++ | src/vm/jvm/runtime/org/perl6/nqp/truffle/nodes/control/NQPIfNode.java
[truffle] Implement nqp::unless with else
14:32
nqp/truffle: bb86b286b5 | (Paweł Murias)++ | src/vm/jvm/Truffle.nqp
[truffle] Remove duplicated definition
nqp/truffle: 1a5af13400 | (Paweł Murias)++ | 4 files
[truffle] Implement nqp::index and nqp::rindex
14:37 grumble joined 14:38 p6bannerbot sets mode: +v grumble, ChanServ sets mode: -v grumble
Geth nqp/truffle: 10bed0641b | (Paweł Murias)++ | src/vm/jvm/runtime/org/perl6/nqp/truffle/nodes/expression/NQPDivIntNode.java
[truffle] Fix nqp::div_i
14:38
14:38 grumble left 14:40 squashable6 left 14:41 squashable6 joined, p6bannerbot sets mode: +v squashable6 14:42 squashable6 left, squashable6 joined 14:43 p6bannerbot sets mode: +v squashable6
lizmat Zoffix: www.reddit.com/r/dailyprogrammer_i...r/e3jebyy/ 14:46
and that concludes that fun for today :-) 14:47
geekosaur MasterDuke, egads, that's ancient >.> 15:03
tbrowder_ shouldnā€™t that word-ladder problem be on the rosetta code site? 15:07
15:15 |Tux| left, |Tux| joined
tyil |Tux|: hi 15:17
lizmat Zoffix: shouldn't p6bannerbot have +v'd |Tux| ? 15:18
15:20 ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy 15:21 Zoffix joined, p6bannerbot sets mode: +v Zoffix
MasterDuke geekosaur: yeah, haven't found out why/how he came across it 15:22
15:22 ChanServ sets mode: +o Zoffix, Zoffix sets mode: +v |Tux| 15:23 Zoffix sets mode: +v p6bannerbot
|Tux| Rakudo version 2018.06-312-ge0a27ce37 - MoarVM version 2018.06-331-g2c74b672c
csv-ip5xs0.964 - 1.108
csv-ip5xs-207.489 - 7.717
csv-parser23.940 - 25.170
csv-test-xs-200.449 - 0.456
test9.757 - 10.014
test-t2.175 - 2.197
test-t --race0.939 - 0.953
test-t-2039.050 - 39.577
test-t-20 --race12.235 - 12.373
15:24
2018-07-30 10:46:58 test-t 2.210
2018-07-13 08:21:27 test-t 2.207
2018-07-17 13:19:48 test-t 2.203
2018-08-03 16:57:31 test-t 2.197
2018-08-03 17:01:13 test-t 2.175
\o/
lizmat whee <2.2
timotimo oh wow 15:25
Ulti I've seen similar improvements for my tests recently too :) 15:32
Zoffix buggable: speed 15:33
buggable Zoffix, ā†‘ā–†ā–‡ā–…ā†‘ā–†ā–†ā–†ā–ˆā–„ā–ƒā–…ā–…ā–…ā–†ā–‡ā–†ā–„ā–…ā–„ā–†ā–„ā–ƒā–‚ā–‚ā–…ā–…ā–ƒā–…ā–…ā–ƒā–„ā–ƒā–„ā–ƒā–†ā–ƒā–ƒā–‚ā–‚ā–‚ā–ƒā–†ā–„ā–ƒā–…ā–„ā–ƒā–ā– dates: 2018-07-14ā€“2018-08-03; range: 12.235sā€“18.257s; speed: 21% faster (widths: 9/3) 15:34
15:34 pmurias left
Zoffix w00t 15:35
Ulti hah thats a super nice feature
I'll have to profile the script I tried yesterday though, as it was a huge fail... so there might be an issue in Rakudo with long strings 15:36
something that I would expect even a super slow lang to spend maybe minutes on had gone nowhere after a whole day and had used 3.5GB of RAM for a file that uncompressed was ~100MB 15:37
does --profile dump something out even if you ctrl+c ? 15:38
MasterDuke Ulti: is the code available somewhere?
Ulti yeah I can make it available and link to a test file 15:39
MasterDuke cool
Ulti Im using a couple of modules that make how I was doing it super silly
MasterDuke: gist.github.com/MattOates/b983d9cb...89715f9431 15:42
could literally be a bug in my code, but I was seeing the output I expected it just got to the point it had stopped doing anything 15:43
it didn't move beyond one file and stopped writing output but didnt look like it had finished at all
15:45 ExtraCrispy left 15:50 p6bannerbot left, p6bannerbot joined 15:51 Zoffix sets mode: +o p6bannerbot
MasterDuke Ulti: is there a less pathological file to test with? 15:51
Ulti not especially 15:58
and thats sort of the point
chromosome M is the smallest 15:59
ftp://ftp.ncbi.nlm.nih.gov/genomes/Homo_sapiens/ARCHIVE/BUILD.37.3/CHR_M/hs_ref_GRCh37.p5_chrM.fa.gz
but yeah 1 is the biggest
timotimo buggable: speed :4 16:01
how did you get the multiple lines again ..
buggable timotimo, ā†‘ ā–ƒ ā†‘ ā–ˆ ā–„ ā– dates: 2018-07-14ā€“2018-08-03
timotimo, ā–ˆā–‡ā–ˆā–ƒā–ˆā–‡ā–†ā–‡ā–ˆ ā–‚ā–‚ā–‚ā–‡ā–ˆā–‡ ā–… ā–ˆ ā–ā–‚ ā–ƒā– ā–† ā–‡ ā–ƒ range: 12.235sā€“18.257s
timotimo, ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–„ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‡ā–ˆā–…ā–ˆā–†ā–ƒ ā–ˆā–ˆā–ƒā–ˆā–ˆā–ƒā–‡ā–ƒā–†ā–ā–ˆā–ƒ ā–‚ā–ˆā–ˆā–ƒā–ˆā–‡ā–‚ speed: 21% faster (widths: 9/3)
timotimo, ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‡ā–…ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–…ā–…ā–„ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‚ā–
timotimo that's the one 16:02
16:10 Zoffix left
MasterDuke Ulti: strings can only be 4294967295 graphemes long, that might be a problem 16:13
Ulti is there a reason why? 16:42
timotimo we use that int size for that ā€¦
Ulti well thats not exactly the biggest string I can think of :P 16:44
but yeah for a while now I've been considering just doing my own IO and biosequence types
because really I dont even need bytes for these things in RAM more like 2-3bits 16:45
lizmat Ulti: afaik, 1/2/4 bit native arrays have been specced, but alas not implemented
timotimo that's right 16:46
wouldn't be terribly hard i don't think?
lizmat well, some things appear to be easy, like unsigned 64bit natives
Ulti but more generally thats going to be bad news for P6 as a bioinformatics language
lizmat but practices makes that more difficult
Ulti 4GB isnt exactly a huge amount of RAM 16:47
also that string isnt that long afaik
lizmat for a while I've been looking at porting P5's 'vec' function, and use that to create an ecosystem version of 1/2/4 bit arrays
Ulti like id bump the length type to be 64bit maybe though thats kind of awful for short strings 16:48
but yeah in bioinformatics land single computers with terabytes of RAM being used to operate on single strings that are huge but indexed is not impossible 16:49
at that point its kind of unlikely anyone would be using Perl of any kind though
lizmat Ulti: what are typically the operations you want to do on such a large string? regexes ? 16:51
MasterDuke Ulti: yeah, the file is only 231101742 chars 16:52
Ulti lizmat possibly but far more likely its more just a giant buffer than a "string" 16:53
when you have something that big the task is assembly 16:54
so taking all the little tiny 150-250 long reads you have from a sequencing machine and attempting to construct the full chromosome from it
lizmat well, the idea is that Perl 6 should optimize the hot paths down to assembly
Ulti which is not a common task
MasterDuke however, i extracted just the first 11 lines and tried with those, but i'm getting "malformed utf-8"
Ulti though increasingly for human at least people are now assembling routinely, especially for cancer genomes 16:55
MasterDuke: oh nice
I didnt get that
timotimo you did decompress it first right? :P
MasterDuke oh, wait. ha. i did, but then overwrote it 16:56
timotimo typical timotimo 16:57
17:09 buggable left, buggable joined, ChanServ sets mode: +v buggable, p6bannerbot sets mode: +v buggable 17:33 stmuk_ joined 17:34 p6bannerbot sets mode: +v stmuk_ 17:35 stmuk left
MasterDuke Ulti: so far the main slowdown seems to be IO::String 17:52
and Compress::Zlib 17:59
if i extract the text file and the just slup it and count the lines, that only takes 8s
18:00 lizmat left
MasterDuke i tried using IO::String on the extracted file, but killed it after 6m 18:00
and i tried to just gzslurp the compressed file and then count the lines (not using IO::String) and killed it after 7m 18:02
18:06 lizmat joined 18:07 p6bannerbot sets mode: +v lizmat
MasterDuke wow, a --profile of reading just a 500 line file with IO::String and then calling .lines on it is 2.4mb 18:16
lizmat probably changing the gather / take combo into a real iterator, would help a lot already 18:22
MasterDuke lizmat: you're talking about IO::String? 18:33
oh yeah, creating the IO::String doesn't take any time, but calling .lines on is slow 18:36
lizmat yeah, .lines
I wonder if Str.lines couldn't just work there? 18:38
MasterDuke well, it's calling self.get
lizmat: are you going to make IO::String faster? 18:49
MasterDuke hopes so, lizmat++ will do a better job
lizmat I have been tempted... 18:52
I think the main issue is that the underlying storage is a single string 18:53
whereas the most standard use of IO::String would probably be line oriented
so I would probably rewrite it so that the underlying storage would be a native array of strings 18:54
and then handle the complexities of tell / seek from there
and make the .Str representation a .join on the elements 18:55
as far as I understand, nqp::join doesn't collapse the strands
nqp::join('') that is
MasterDuke yeah, i think it just creates new strands 18:56
even with a delimiter 18:57
timotimo i believe that's correct 18:58
19:06 Zoffix joined, p6bannerbot sets mode: +v Zoffix
Zoffix BTW, has anyone tried using the new .READ/.WRITE/.EOF IO::Handle's inheritance interface for IO::String? 19:06
Don't know if it'll be faster (since you'll probably gonna be encoding a string just to decode it back again on the way out), but it'll surely be smaller 19:07
in lines of code
( this stuff docs.perl6.org/type/IO::Handle#Cre...om_Handles ) 19:10
m: say 7.4856/.1794 19:16
camelia 41.725753
Zoffix Makes .lines 41x faster
With this impl: gist.github.com/zoffixznet/588fac9...f4e64c1d1c 19:17
Needs to make `.open` work and I haven't checked what else would be needed to have the exact same funcionality
MasterDuke nice. if no-one else gets around to it i'll take a look at that, but it won't be for a little while yet 19:18
Zoffix Tho, do note those methods are really fresh (existed for 25 days) and not in any release yet. They were named .write-internal/.read-internal/.eof-internal in earlier rakudos for some number of releases 19:19
since 2017.06 19:20
There was also this bug that would mess up with .encoding setting up the encoder: github.com/rakudo/rakudo/commit/ed...ced0d5d022 19:21
e: IO::Handle.new.encoding.say
evalable6 utf8
Zoffix You need to do self.encoding: 'utf-8' (basically different than ^ that default) to avoid that bug 19:22
19:23 Zoffix left 20:36 cognominal-p6 joined, p6bannerbot sets mode: +v cognominal-p6 20:59 skids left
lizmat m: sub a(Array[Pair] @a) { }; a [a => 42] # do we actually have a way to accept only arrays with Pair's in them? 21:24
camelia Type check failed in binding to parameter '@a'; expected Positional[Array[Pair]] but got Array ($[:a(42)])
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
lizmat m: sub a(Pair @a) { }; a [a => 42] # do we actually have a way to accept only arrays with Pair's in them?
camelia Type check failed in binding to parameter '@a'; expected Positional[Pair] but got Array ($[:a(42)])
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
lizmat afk& 21:29
22:40 skids joined, p6bannerbot sets mode: +v skids 22:57 skids left 23:37 Evel-Knievel26 joined, Evel-Knievel26 left