Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-12-11

| Channels | #perl6-dev index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:09 MasterDukeLaptop joined #perl6-dev
00:10 pyrimidine joined #perl6-dev
00:12 MasterDukeLaptop wrap_option_n_code ends with QAST::Want.new(QAST::Op.new(...), 'v', QAST::Op.new(...)). what is the meaning of those two Ops with the 'v' inbetween?
01:00 pyrimidine joined #perl6-dev
01:19 pyrimidine joined #perl6-dev
02:00 pyrimidine joined #perl6-dev
02:06 pyrimidine joined #perl6-dev
02:17 tadzik joined #perl6-dev
02:21 MasterDukeLaptop i'm trying to re-write wrap_option_n_code to the equivalent of 'while ($_ := get()).DEFINITE { $code }' instead of 'for lines() { $code }'
02:22 MasterDukeLaptop but if i run "./perl6-m -ne '.say' VERSION", i get "Cannot call method 'sink' on a null object"
02:24 MasterDukeLaptop what i get from --target=ast for my change is pretty similar to what i get from --target=ast -e 'while ($_ := get()).DEFINITE { }' with an unmodified rakudo
02:28 pyrimidine joined #perl6-dev
02:50 ilbot3 joined #perl6-dev
02:50 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
03:00 samcv ok I have implemented `uniprops` and despite the DRAFT synopsis saying uniprops only works on strings. I thought it was necessary for it to also work on lists as well, and function the same as calling uniprop on each item
03:00 samcv and made it so you can call uninames with an array as well
03:01 samcv I think that's element of least surprise, since you can call uniname on int's and chars. so uninames can take arrays of ints or characters, or a string
03:10 samcv pull here: https://github.com/rakudo/rakudo/pull/945
03:19 pyrimidine joined #perl6-dev
03:28 pyrimidine joined #perl6-dev
05:09 pyrimidine joined #perl6-dev
05:28 pyrimidine joined #perl6-dev
05:55 pyrimidine joined #perl6-dev
06:06 MasterDukeLaptop when would a string have a storage type of MVM_STRING_GRAPHEME_8 vs _32 vs _ASCII?
06:18 pyrimidine joined #perl6-dev
06:50 pyrimidine joined #perl6-dev
07:03 pyrimidine joined #perl6-dev
07:55 pyrimidine joined #perl6-dev
08:13 pyrimidine joined #perl6-dev
08:29 RabidGravy joined #perl6-dev
08:33 nine MasterDukeLaptop: the QAST::Want stuff is for distinguishing sink from item context. IOW to ensure that .sink gets called on unused results.
08:35 pyrimidine joined #perl6-dev
08:59 pyrimidine joined #perl6-dev
08:59 RabidGravy good morning my little ponies
09:12 samcv good morning RabidGravy
09:23 pyrimidine joined #perl6-dev
09:32 RabidGravy eugh, what possible rationale could there be for taking ~/bin out of the default $PATH in Fedora 25?
09:35 RabidGravy ooh, and it ain't running .bash_profile
09:35 nine RabidGravy: you could file it as a bug on Fedora?
09:37 RabidGravy will need to track down exactly what changed
09:39 RabidGravy as it was before it must have been running the .bash_profile which in turn was sourcing .bashrc if it existed
09:39 RabidGravy it seems it isn't running the .bash_profile and running the .bashrc directly
09:40 timotimo MasterDuke: a Want node is a compile-time construct that lets the compiler decide "later" whether an expression should be evaluated in void context or giving an object (that's when you have a v in between) or whether it should give an Int or a native int (in that case you'll have an Ii in between)
09:53 psch hrm, i don't see through the {capture,clone}_inner stuff in QASTCompilerMAST
09:54 psch i mean, both get called for {declaration,immediate}_static, but that always happens *after* we're actually adding those captured/cloned registers to the prelude of a block..?
09:56 psch well, frame prologue actually, not block prelude .)
09:56 psch +.
11:17 pyrimidi_ joined #perl6-dev
12:16 [Tux] This is Rakudo version 2016.11-182-gea28845f9 built on MoarVM version 2016.11-44-g8e24145d
12:16 [Tux] csv-ip5xs        3.166
12:16 [Tux] test            14.807
12:16 [Tux] test-t           6.376
12:16 [Tux] csv-parser      14.287
12:30 FROGGS joined #perl6-dev
12:41 lizmat Zoffix++   # nice blog post
12:51 pyrimidine joined #perl6-dev
13:19 pmurias joined #perl6-dev
13:19 dalek nqp: 81e1444 | (Pawel Murias)++ | src/vm/js/Operations.nqp:
13:19 dalek nqp: [js] Implement nqp::getlexreldyn.
13:19 dalek nqp: review: https://github.com/perl6/nqp/commit/81e1444f54
13:19 dalek nqp: 35b241d | (Pawel Murias)++ | t/nqp/021-contextual.t:
13:19 dalek nqp: Test nqp::getlexreldyn.
13:19 dalek nqp: review: https://github.com/perl6/nqp/commit/35b241d931
13:19 dalek nqp: 05fa8ab | (Pawel Murias)++ | src/vm/js/ (2 files):
13:19 dalek nqp: Implement nqp::getlexrelcaller.
13:19 dalek nqp: review: https://github.com/perl6/nqp/commit/05fa8ab1a5
13:19 dalek nqp: 2684f4a | (Pawel Murias)++ | t/nqp/021-contextual.t:
13:19 dalek nqp: Test nqp::getlexrelcaller.
13:19 dalek nqp: review: https://github.com/perl6/nqp/commit/2684f4ad28
13:26 MasterDukeLaptop at what haystack and/or needle length would you expect to start seeing a speedup from using Boyer-Moore vs our current brute index() implementation?
13:37 pmurias MasterDukeLaptop: if we statically know the pattern and can precalculate the tables I would expect the speedup with smaller inputs
13:37 yoleaux2 7 Dec 2016 23:11Z <babydrop> pmurias: I assume the `fix-powers-with-big-exponents` branch can be deleted? It's the one that included a fix to avoid the bug explotation of pow_I in Int ** Int, but that was merged.
13:37 babydrop that
13:38 babydrop that's an old message alraedy taken care of
13:39 MasterDukeLaptop precalculate at compile time you mean?
13:44 MasterDukeLaptop i dropped in an implementation (copied verbatim from the wikipedia example), but it seems almost exactly the same speed with the sample inputs i tried on the command line
13:47 MasterDukeLaptop but i just did it for MVM_STRING_GRAPHEME_8 strings and the only way i can seem to create them is by directly assigning to a str variable
13:48 lucasb joined #perl6-dev
13:48 MasterDukeLaptop doing any operations on it (e.g., x, ~) changes it from MVM_STRING_GRAPHEME_8
13:48 MasterDukeLaptop making it hard to text with really large inputs
14:33 dalek rakudo/lexical_module_load: 0607e25 | niner++ | / (5 files):
14:33 dalek rakudo/lexical_module_load: Make importing globals from loaded modules lexical
14:33 dalek rakudo/lexical_module_load:
14:33 dalek rakudo/lexical_module_load: Right now if A depends on C:auth<foo> and B depends on C:auth<bar> you
14:33 dalek rakudo/lexical_module_load: cannot use A and B in the same program. Fix this by having not only
14:33 dalek rakudo/lexical_module_load: exported symbols be lexical but also the globals contained in a module.
14:33 dalek rakudo/lexical_module_load:
14:33 dalek rakudo/lexical_module_load: So only A will even have a C that's bound to C:auth<foo>. This means
14:33 dalek rakudo/lexical_module_load: that you have to "use" modules in every scope that accesses those names,
14:33 dalek rakudo/lexical_module_load: which is a good thing to do anyway.
14:33 dalek rakudo/lexical_module_load:
14:33 dalek rakudo/lexical_module_load: Definitely 6.d material though as it will break existing code.
14:33 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/0607e25e2d
14:33 dalek rakudo/lexical_module_load: 4bf7567 | niner++ | src/Perl6/World.nqp:
14:33 dalek rakudo/lexical_module_load: a class of the same name was declared.
14:33 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/f0568c9544
14:33 dalek rakudo/lexical_module_load: 930daea | niner++ | src/Perl6/ModuleLoader.nqp:
14:33 dalek rakudo/lexical_module_load: Fix: class Foo { use Foo::Bar; my Foo $foo; } not finding Foo
14:33 dalek rakudo/lexical_module_load:
14:33 dalek rakudo/lexical_module_load: The lexically imported "Foo" package stub containing "Bar" shadowed the
14:33 dalek rakudo/lexical_module_load: "Foo" class we're currently declaring. Fix by considering all scopes
14:33 dalek rakudo/lexical_module_load: when looking for existing symbols, not just the one we're importing
14:33 dalek rakudo/lexical_module_load: into.
14:33 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/930daeaf4c
14:33 dalek rakudo/lexical_module_load: d3acd8f | niner++ | src/Perl6/World.nqp:
14:33 dalek rakudo/lexical_module_load: Fix our scoped nested package swallowed by lexically scoped parent
14:33 dalek rakudo/lexical_module_load:
14:33 dalek rakudo/lexical_module_load: In "use Foo; class Foo::Bar { }" Foo::Bar would be created as child of
14:33 dalek rakudo/lexical_module_load: the lexically imported Foo class and was thus missing from the globals.
14:33 dalek rakudo/lexical_module_load: Previous fixes only handled the case when Foo was a stub package, not
14:33 dalek rakudo/lexical_module_load: when it was a full class.
14:33 dalek rakudo/lexical_module_load: Remove the special case and fix the follow up bug that we now got a
14:33 dalek rakudo/lexical_module_load: duplicate symbol when trying to lexically override classes in the
14:33 dalek rakudo/lexical_module_load: RESTRICTED setting. There's no need to upgrade the main package to a
14:33 dalek rakudo/lexical_module_load: global if we only want to create a lexically scoped child anyway.
14:33 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/d3acd8f0de
14:33 dalek rakudo/lexical_module_load: 3653f68 | niner++ | src/Perl6/World.nqp:
14:33 dalek rakudo/lexical_module_load: Fixup "Make importing globals from loaded modules lexical"
14:33 dalek rakudo/lexical_module_load:
14:33 dalek rakudo/lexical_module_load: Remove commented code
14:33 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/3653f68e54
14:34 babydrop :o
14:35 nine just a rebase
14:35 nine Another one to follow. Only noticed the fixup after pushing this one :/
14:40 pmurias MasterDuke: maybe flattenropes will help?
14:40 pmurias MasterDuke: yes, I meant precalculate at compile time
14:41 jnthn nine: I saw you did docs for it also, and posted ecosystem stats suggesting the impact was relatively low, which were two of the things I'd requested. :)
14:41 yoleaux2 12:26Z <dogbert17> jnthn: I have now created the two 'spectest fails with small nursery' issues that were discussed yesterday, issues 449 and 450
14:41 jnthn dogbert17: Thanks!
14:43 nine jnthn: actually the second rebase will contain a fix for an issue uncovered by smoking the ecosystem :)
14:43 jnthn Ah, so even lower :)
14:43 nine Here it comes...
14:43 dalek rakudo/lexical_module_load: c8d3a74 | niner++ | / (5 files):
14:43 dalek rakudo/lexical_module_load: Make importing globals from loaded modules lexical
14:43 dalek rakudo/lexical_module_load:
14:43 dalek rakudo/lexical_module_load: Right now if A depends on C:auth<foo> and B depends on C:auth<bar> you
14:43 dalek rakudo/lexical_module_load: cannot use A and B in the same program. Fix this by having not only
14:43 dalek rakudo/lexical_module_load: exported symbols be lexical but also the globals contained in a module.
14:43 dalek rakudo/lexical_module_load:
14:43 dalek rakudo/lexical_module_load: So only A will even have a C that's bound to C:auth<foo>. This means
14:43 dalek rakudo/lexical_module_load: that you have to "use" modules in every scope that accesses those names,
14:43 dalek rakudo/lexical_module_load: which is a good thing to do anyway.
14:43 dalek rakudo/lexical_module_load:
14:43 dalek rakudo/lexical_module_load: Definitely 6.d material though as it will break existing code.
14:43 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/c8d3a740f0
14:43 dalek rakudo/lexical_module_load: 35d1cd2 | niner++ | src/Perl6/World.nqp:
14:43 dalek rakudo/lexical_module_load: a class of the same name was declared.
14:43 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/a4db016064
14:44 dalek rakudo/lexical_module_load: 0694033 | niner++ | src/Perl6/ModuleLoader.nqp:
14:44 dalek rakudo/lexical_module_load: Fix: class Foo { use Foo::Bar; my Foo $foo; } not finding Foo
14:44 dalek rakudo/lexical_module_load:
14:44 dalek rakudo/lexical_module_load: The lexically imported "Foo" package stub containing "Bar" shadowed the
14:44 dalek rakudo/lexical_module_load: "Foo" class we're currently declaring. Fix by considering all scopes
14:44 dalek rakudo/lexical_module_load: when looking for existing symbols, not just the one we're importing
14:44 dalek rakudo/lexical_module_load: into.
14:44 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/0694033600
14:44 dalek rakudo/lexical_module_load: d3a7c37 | niner++ | src/Perl6/World.nqp:
14:44 dalek rakudo/lexical_module_load: Fix our scoped nested package swallowed by lexically scoped parent
14:44 dalek rakudo/lexical_module_load:
14:44 dalek rakudo/lexical_module_load: In "use Foo; class Foo::Bar { }" Foo::Bar would be created as child of
14:44 dalek rakudo/lexical_module_load: the lexically imported Foo class and was thus missing from the globals.
14:44 nine jnthn: I've also submitted a couple of PRs to affected modules.
14:44 dalek rakudo/lexical_module_load: Previous fixes only handled the case when Foo was a stub package, not
14:44 dalek rakudo/lexical_module_load: when it was a full class.
14:44 dalek rakudo/lexical_module_load: Remove the special case and fix the follow up bug that we now got a
14:44 dalek rakudo/lexical_module_load: duplicate symbol when trying to lexically override classes in the
14:44 dalek rakudo/lexical_module_load: RESTRICTED setting. There's no need to upgrade the main package to a
14:44 dalek rakudo/lexical_module_load: global if we only want to create a lexically scoped child anyway.
14:44 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/d3a7c37882
14:44 dalek rakudo/lexical_module_load: 6fdc548 | niner++ | src/Perl6/ModuleLoader.nqp:
14:44 dalek rakudo/lexical_module_load: Fix imported nested enum colliding with symbol from outer scope
14:44 dalek rakudo/lexical_module_load:
14:44 dalek rakudo/lexical_module_load: We also search outer scopes for declared packages, in case we import a sub-
14:44 dalek rakudo/lexical_module_load: package. But when we actually want to lexically overwrite the symbol from the
14:44 dalek rakudo/lexical_module_load: outer scope, we would wrongfully detect a collision. Fix by allowing for
14:44 dalek rakudo/lexical_module_load: overwriting the symbol from the outer lexical scope after detecting that we
14:44 dalek rakudo/lexical_module_load: cannot just merge packages.
14:44 dalek rakudo/lexical_module_load: Reproducible by having A.pm: enum A::B <Date>;
14:44 dalek rakudo/lexical_module_load: perl6 -I. -e 'use A'
14:44 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/6fdc54888f
14:47 jnthn nine: OK, sounds good.
14:48 jnthn nine: I note there's "Definitely 6.d material" in the commit message of one of those :-)
14:48 nine Seems like one cannot rebase this branch often enough...
14:48 jnthn Was gonna say, is that still your position on it... ;)
14:55 nine *lol
14:56 nine The new test case broke on nom, because two different lexical scopes in the test files both loaded modules declaring A::B. Which works just fine on lexical_module_load
14:56 nine Good thing I tested it on nom before pushing to roast
15:01 dalek roast: a3223a0 | niner++ | / (2 files):
15:01 dalek roast: Another test case for merging globals
15:01 dalek roast:
15:01 dalek roast: Date is in the outer lexical scope (the setting) and should be overwritten by
15:01 dalek roast: the enum value. Might lead to a merge failure on a broken implementation.
15:01 dalek roast: review: https://github.com/perl6/roast/commit/a3223a0d85
15:02 dalek roast/lexical_module_load: c4ad620 | niner++ | / (4 files):
15:02 dalek roast/lexical_module_load: Fixup tests for lexical module loading
15:02 dalek roast/lexical_module_load:
15:02 dalek roast/lexical_module_load: We now need to explicitly use modules if we want to use their symbols and can
15:02 dalek roast/lexical_module_load: no longer rely on them being loaded by one of our dependencies.
15:02 dalek roast/lexical_module_load: review: https://github.com/perl6/roast/commit/c4ad620d22
15:02 dalek roast/lexical_module_load: 93785f9 | niner++ | / (2 files):
15:02 dalek roast/lexical_module_load: Test that globals of loaded modules are imported lexically
15:02 dalek roast/lexical_module_load: review: https://github.com/perl6/roast/commit/93785f9ce5
15:11 nine Oh boy... JsonC's tests try to read panda's projects.json from the repository!?
15:11 timotimo hah
15:11 timotimo "quick, where can we find some json data??"
15:12 nine That's just wrong on so many levels...
15:12 nine https://github.com/salortiz/JsonC/blob/master/t/00-basic.t#L63
15:14 nine Module::Does is probably just a broken idea in a lexical module loading world
15:18 pmurias nine: at least the test skips if it's not present :/
15:19 nine And... "if" overrides Perl6::World::do_pragma_or_load_module. OMG FROGGS, I guess it's just fair to have you update the module after the merge :)
15:22 nine Ok, there's 3 modules probably failing due to the same require-related issue. Once I've fixed that I'll repeat the smoke test.
15:24 timotimo :D
15:31 pmurias nine: re old discussion on modules depending on versions of rakudo instead of the spec, shouldn't modules that override Perl6::World, use MONKEY-GUTS depend on rakudo versions?
15:33 nine pmurias: I guess, "such modules should not even exist" is not a valid answer on this one?
15:33 nine pmurias: regardless, I'm not sure how much help it would be anyway. Such modules can be broken any time by even minor changes to rakudo.
15:36 jnthn I don't think "should not exist" is really right; such modules existing tells us where we're missing proper ways to do things. :)
15:36 jnthn Well, I guess that means in the long run they shouldn't exist... :P
15:37 jnthn But yeah, we'll have to reserve the right to break such things.
15:37 jnthn Otherwise we'll not be able to change anything in the compiler ever. :)
15:38 pmurias nine: re how much help it would be, works in current rakudo and the one version before is valid info :)
16:05 dalek rakudo/nom: 3d4825a | (Zoffix Znet)++ | docs/ChangeLog:
16:05 dalek rakudo/nom: Add to ChangeLog all changes to date
16:05 dalek rakudo/nom:
16:05 dalek rakudo/nom: Documents changes for commits:
16:05 dalek rakudo/nom: 014d4cf 01775b7 0428b79 085145f 08589d3 0a874fb 0ee6bc0 15f51a5 172898e 1b840f1
16:06 dalek rakudo/nom: 219f527 2e1b82c 2f72fa0 331c2e2 33f7456 345f6a7 35183f3 39261e7 3c4ac3c 3dd2916
16:06 dalek rakudo/nom: 3e93ddd 4663d43 471cea2 47ffdea 4a59ab4 4a711bc 4e76827 4f4737d 4fd6e94 5476d60
16:06 dalek rakudo/nom: 573ed59 5baa064 61a18c0 64343d7 6bb8823 6cd2144 6d726f8 6ea6563 6f6e6db 74eb6b9
16:06 dalek rakudo/nom: 7532297 77e9d4b 79090b2 7c5ea31 7f26e8b 843a6be 8774f24 8cb3e1b 8d04bec 939d273
16:06 dalek rakudo/nom: 947422b 965fa4d a2ede36 a8ba26b a9654c0 ab3a59c ababb24 ae614f9 b2ac4e4 b597b7c
16:06 dalek rakudo/nom: b6de5e8 b9e2ffa bbbb2b6 bc13bb5 bd42363 bfe89a5 c027e6a c04b8b5 c1a3a3c c38f1ad
16:06 dalek rakudo/nom: c797d3f cb9df2b d704820 e0a415f e0c0ae5 e2587cd e4d78c6 e9487d6 ecc202e ee14067
16:06 dalek rakudo/nom: f1263ab f20b8b6 f544e4c f928a20
16:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3d4825ae31
16:06 babydrop NeuralAnomaly: status
16:06 NeuralAnomaly babydrop, [✔] Next release will be in 5 days and 13 hours. Since last release, there are 48 new still-open tickets (0 unreviewed and 0 blockers) and 0 unreviewed commits. See http://perl6.fail/release/stats for details
16:07 babydrop ???????????????????????? REMINDER: The next Rakudo release will happen next Saturday (Dec. 17). Please check your changes have been logged in the ChangeLog correctly.
16:07 * babydrop still doesn't get why Unicode version of trumpet is rendered backwards...
16:31 bartolin joined #perl6-dev
17:59 FROGGS nine: sure... can you ping me after the merge?
18:05 samcv u: ????
18:05 unicodable6 samcv, U+1F3BA TRUMPET [So] (????)
18:05 samcv babydrop, blame the people who created the ''standard'' and everybody who repeated it afterward. doesn't seem to specify backward. that is weird...
18:06 samcv all the other instruments face top right not top left
18:15 timotimo ``standard''
18:15 [Coke] surely that's just a font choice. :)
18:15 yoleaux2 10 Dec 2016 14:45Z <tbrowder> [Coke]: I'll be off the normal land-locked internet grid for Advent editing for a few hours while traveling. I just made some minor changes to the ending words and format.  I will be monitoring IRC as well as my iPhone and cell carrier can handle it.
18:18 babydrop Well, that's how http://unicode.org/charts/PDF/U1F300.pdf renders it
18:18 babydrop And any font or drawing of it that I've seen
18:18 babydrop It's pretty shocking no one ever said "You know what... maybe people will want to use it as if trumpeting a message and it pointing left and down is kinda stupid, let's make it point up and right?"
18:19 babydrop Maybe someone is conducting https://en.wikipedia.org/wiki/Milgram_experiment
18:21 babydrop haha at least someone rebelled: http://i.imgur.com/CRSQwcA.png
18:32 stmuk joined #perl6-dev
18:51 babydrop If anyone feels like bikeshedding .uninames/.uniprops taking a list of things: https://github.com/rakudo/rakudo/pull/945
18:51 babydrop comment
18:54 samcv The shapes of the reference glyphs used in these code charts are not prescriptive. Considerable variation is to be
18:54 samcv expected in actual fonts. The particular fonts used in these charts were provided to the Unicode Consortium by a number
18:54 samcv of different font designers, who own the rights to the fonts
19:12 MasterDuke pmurias: i thought jnthn got rid of flattenropes?
19:14 samcv =]]
19:14 dalek rakudo/nom: f55ff82 | samcv++ | src/core/ (2 files):
19:14 dalek rakudo/nom: Implement `uniprops` and allow both `uninames` and `uniprops`
19:14 dalek rakudo/nom:
19:14 dalek rakudo/nom: to take a List. S15(DRAFT) says that uninames and uniprops
19:14 dalek rakudo/nom: only take strings, but I think that it reasonable to expect
19:15 samcv sweet. uniprops now implemented
19:15 babydrop \o/
19:15 dalek joined #perl6-dev
19:16 samcv time to write some tests
19:16 babydrop samcv++
19:21 lucasb samcv++
19:21 lucasb why move the subs from Str.pm to Cool.pm?
19:22 lucasb ah, nevermind
19:22 lucasb now I read the commit message :)
19:26 nine New smoke test: 11 modules broken, 1 module fixed by lexical_module_load and 3 PRs open.
19:30 MasterDuke timotimo: did you see my question about boyer-moore?
19:30 nine FROGGS: sure
19:30 timotimo oh, i did not
19:30 timotimo but your other question, flattenropes is now deprecated and instead we have indexingoptimized (oslt) which is basically flattenropes but doesn't mutate the underlying string
19:34 MasterDuke so locally i have a src/strings/ops.c where i dropped in the wikipedia implementation of boyer-moore and call it from MVM_string_index when the haystack and needle are both MVM_STRING_GRAPHEME_8
19:34 MasterDuke just passing haystack->body.storage.blob_8 in directly
19:35 samcv in roast, skips can overlap right?
19:35 samcv if it doesn't work yet for multiple backends
19:35 timotimo that sounds correct-ish, does it work?
19:36 MasterDuke timotimo: yeah, but it's no faster for the tests i've been able to run from the command line
19:36 timotimo interesting
19:36 samcv how do I use fudge btw
19:37 MasterDuke i'm finding it difficult to create strings that are MVM_STRING_GRAPHEME_8 though
19:37 samcv not sure what 'fudge rakudo test.t' does it just. no error
19:37 jnthn MasterDuke: That's just about unused so far.
19:38 MasterDuke right now it seems i can create them with native str variables where i don't apply any ops to them
19:38 MasterDuke e.g., my str $a = "abc"; but if i then do an 'x', or '~', they change
19:39 samcv uhm is there a way for whole files to be fudged? because uniprop is NYI on JVM, but there's no skip, uniprop for jvm in that file
19:39 samcv only skip for niecza
19:40 psch samcv: take a look at rakudo/r/spectest.data
19:40 nine Oh it seems like lexical_module_load does indeed fix a global merging bug that breaks Test::Builder
19:41 MasterDuke i haven't tried with MVM_STRING_GRAPHEME_32 yet, not sure if it'll work without changes
19:41 timotimo MasterDuke: it won't, you need to turn the linear array into something like just a sorted list of index/value pairs
19:41 timotimo samcv: i recommend you try "make t/spec/S12/blahblah.t"
19:43 samcv there aren't any makefiles in roast though?
19:43 samcv you mean in rakudo?
19:43 timotimo right, that's why it has "t/spec/" in front :)
19:43 timotimo so yes, in rakudo
19:43 samcv well i have a t/spec in my roast from. running one of the things trying to get tests to run :P
19:45 samcv oh will try
19:45 babydrop samcv: the S15-unicode-information/uniprop.t is fudged to be a moarvm-only test in t/spectest.data
19:45 samcv got it
19:46 timotimo hm, i had forgotten that we have per-backend directives in spectest.data
19:48 samcv do i want to look at spectest.data in rakudo or roast?
19:48 babydrop samcv: rakudo it's in t/
19:48 samcv ok that's what i thought
19:49 babydrop Do we do something with exceptions on when they're thrown in Actions? I'm trying to pass -1 as :pos() to X::Str::Numeric but when I dump it inside its `message`, I get 7 :/
19:50 samcv ok now i see why jvm isn't fidged in that file
19:53 [Coke] prove -v -e t/fudgeandrun path/to/spec/test.t
19:55 babydrop ugh, apparently it's getting it somewhere from cursor... ./perl6 -e '      :3<a11>' gives 13 and ./perl6 -e ':3<a11>' gives 7 :/
19:57 [Coke] babydrop: docs.perl6.org still putting things in the wrong place here. Chrome, OS X.
19:57 [Coke] (search dropdown showing up in upper LHS)
19:57 [Coke] aaaaaaaand now it's working. weird.
19:58 * babydrop searches for "stop messing with the args I give you" in $*W.throw
19:58 babydrop [Coke]: try pressing CTRL+F5
20:00 [Coke] we shouldn't ever have to do that, though. :|
20:00 [Coke] but yah, that's probably what did it.
20:05 babydrop Ah, here's what messing with it :( https://github.com/rakudo/rakudo/blob/nom/src/Perl6/World.nqp#L4183
20:10 babydrop m: "a".uniprop('sc')
20:10 camelia rakudo-moar 8d4dbb: ( no output )
20:10 babydrop m: "a".uniprop('Script')
20:10 camelia rakudo-moar 8d4dbb: ( no output )
20:15 babydrop well, I'm going with setting %opt<pos> only if it doesn't already exists.... :/
20:21 pyrimidine joined #perl6-dev
20:24 dalek roast: 297f17f | samcv++ | S15-unicode-information/uniprop.t:
20:24 dalek roast: Add tests for uniprops and add a fudged test for a MoarVM bug (#193)
20:24 dalek roast:
20:24 dalek roast: * Add tests for uniprops and add a fudged test for a MoarVM bug
20:24 dalek roast:
20:24 dalek roast: https://github.com/MoarVM/MoarVM/issues/448
20:24 dalek roast:
20:24 dalek roast: * `todo` that test instead of making it `skip`
20:24 dalek roast: review: https://github.com/perl6/roast/commit/297f17feb9
20:36 MasterDuke timotimo: this has the diff for my boyer-moore experiment. any ideas why it isn't faster? https://gist.github.com/MasterDuke17/51dba071c63ee1a6989d05e7c4bbf29a
20:40 timotimo the overhead of everything else is probably a whole lot more than what it takes to search through the string?
20:41 MasterDuke i guess. i wanted to test with some large strings, but they're annoying to create
20:42 timotimo right
20:42 timotimo usually we'd write a perl6 script that generates another perl6 script for that :P
20:42 MasterDuke like pmurias suggested, i guess it would be possible to precompute the tables at compile time for known strings
20:43 MasterDuke but that's above my pay grade
20:43 timotimo we wouldn't want to make every string one pointer heavier for this case, i expect
20:43 timotimo also, we're not using every string as needles, i wouldn't think
20:43 dalek rakudo/nom: bf90835 | (Zoffix Znet)++ | t/spectest.data:
20:43 dalek rakudo/nom: List `moar` as one of possible test markers
20:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bf9083569b
20:43 dalek rakudo/nom: a8ff3b9 | (Zoffix Znet)++ | src/ (4 files):
20:43 dalek rakudo/nom: Remove X::Syntax::Number::InvalidCharacter
20:43 MasterDuke i assumed just if it's seen in an index call
20:44 babydrop ... stupid robot
20:44 dalek joined #perl6-dev
20:44 babydrop Review for the above removal: https://github.com/rakudo/rakudo/commit/a8ff3b99af307d3f14e3edb3d82
20:46 dalek roast: b482c7c | (Zoffix Znet)++ | S (2 files):
20:46 dalek roast: Fix tests to avoid use of X::Syntax::Number::InvalidCharacter
20:46 dalek roast:
20:46 dalek roast: The exception was removed[^1]. All of these tests were added in the
20:46 dalek roast: last 27 days and are not part of 6.c
20:46 dalek roast:
20:46 dalek roast: [1] https://github.com/rakudo/rakudo/commit/a8ff3b99af307d3f14e3edb3d82
20:46 dalek roast: review: https://github.com/perl6/roast/commit/b482c7c4f2
20:52 samcv nice ok... i am working on getting my pull for uniprop returning bool for bool properties and resolving unicode canon shortnames to full names https://github.com/rakudo/rakudo/pull/944
20:53 samcv in the PR it is 60% slower.. but i have optimized it down to basically only <10% slower
20:53 babydrop it also has merge conflicts now
20:53 MasterDuke anyone interested in looking at some AST? this is my attempt at getting -n to generate 'while ($_ := get()).DEFINITE { $code }' instead of 'for lines() { $code }', but it isn't working and i'm not quite sure why. https://gist.github.com/MasterDuke17/6e09ebc32dce5f703a178a2a0348ef7b
20:53 samcv yeah i'm redoing it
20:54 babydrop No idea if it's good to merge or not. I don't know those areas.
20:54 samcv and optimizing it so it's practically not slower than before. i think it's important to have unicode canon names reply with the correct result
20:55 samcv i mean the main problem is in moarvm https://github.com/MoarVM/MoarVM/issues/448 and apparently it was found before a few years ago
20:56 samcv and the design docs say that short canonical unicode names work just like fullnames do, unless people just want the bug to stay there. it really confused me until i figured out what was happening
20:57 babydrop m: dd while $++ < 3{ 42 }
20:57 camelia rakudo-moar a8ff3b: OUTPUT«Type Int does not support associative indexing.␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
20:57 babydrop m: dd while $++ < 3 { 42 }
20:57 camelia rakudo-moar a8ff3b: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Unexpected block in infix position (missing statement control word before the expression?)␤at <tmp>:1␤------> dd while $++ < 3⏏ { 42 }␤    expecting any of:␤        infix␤        infix sto…»
20:57 babydrop m: dd (while $++ < 3 { 42 })
20:57 camelia rakudo-moar a8ff3b: OUTPUT«(42, 42, 42).Seq␤»
20:58 samcv may even be able to make it even faster than it was before hopefully... that would be cool :)
20:58 babydrop MasterDuke: no idea, but guessing the result of that `while` is null?
20:59 psch sounds reasonable
20:59 samcv well it can do all (0..0x1FFFF) in 10.1 seconds on my old x220 and reply the correct result for shortnames too, vs 9.5 seconds before
20:59 psch MasterDuke: maybe try op<p6for> instead op<while>
21:00 MasterDuke babydrop: ./perl6-m -e 'while ($_ := get()).DEFINITE { .say }' VERSION
21:01 MasterDuke ^^^ that works, i.e., prints the contents of VERSION
21:01 MasterDuke psch: ok, i'll give that a try
21:01 psch m: (while ($_ .= get()).DEFINITE { .say }).sink
21:01 camelia rakudo-moar a8ff3b: OUTPUT«No such method 'get' for invocant of type 'Any'␤  in block <unit> at <tmp> line 1␤␤»
21:01 psch m: (while ($_ .= $*IN.get()).DEFINITE { .say }).sink
21:01 camelia rakudo-moar a8ff3b: OUTPUT«No such method 'CALL-ME' for invocant of type 'IO::Handle'␤  in block <unit> at <tmp> line 1␤␤»
21:01 psch m: (while ($_ := $*IN.get()).DEFINITE { .say }).sink
21:01 camelia rakudo-moar a8ff3b: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
21:01 psch oh, wait
21:02 dalek rakudo/nom: 0c75e5d | (Zoffix Znet)++ | src/core/Str.pm:
21:02 dalek rakudo/nom: Use cheaper comparison
21:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0c75e5db2c
21:02 psch m: use nqp; (nqp::while(($_ := $*IN.get()).DEFINITE, { .say })).sink
21:02 camelia rakudo-moar a8ff3b: ( no output )
21:02 psch uhm, yeah
21:03 psch not sure how to reasonably use that there and whether that actually gains any insight :)
21:04 MasterDuke psch: it's building now with p6for, but if you look at the AST for my manual version (the while in -e without -n) i'm pretty sure it uses an op<while>
21:05 MasterDuke just finished building, now it says True, but not the file contents
21:05 psch MasterDuke: it does use a while in your p6-level code, but it also doesn't sink that node
21:06 psch MasterDuke: i mean, it doesn't WANT-wrap it
21:06 MasterDuke https://gist.github.com/MasterDuke17/6e09ebc32dce5f703a178a2a0348ef7b#file-diff-ast-after-change-L31
21:06 psch it *does* sink it...
21:07 psch MasterDuke: that's not your manual "(the while in -e without -n)" version
21:07 MasterDuke ah, right
21:07 psch MasterDuke: so, yes, that Want node is the reason you get the sink-on-null-object complaint
21:08 psch MasterDuke: as for p6for not printing the file but only true, i'm not sure about that.  p6for translates to a map call, which maybe means you've got the invocation not DWYM
21:09 MasterDuke ah, don't think you can use for/map with get()
21:10 MasterDuke i tried one or two things at the normal p6 level, but couldn't get it working
21:12 MasterDuke if i take out the Want node i don't get any errors, but it also doesn't print anything
21:17 psch what's the ast for that patch?
21:20 psch s/for/with/ # probably
21:25 MasterDuke psch: gist updated
21:26 psch ah, but that should go back to :op<while> i think?
21:26 MasterDuke i'll give that a shot
21:33 MasterDuke psch: no output
21:34 MasterDuke seems to be reading the file (it takes a long time with a large file, but a '.say' doesn't print anything
21:40 psch curious
21:40 psch i don't have any more ideas right now actually
21:42 MasterDuke psch: thanks for looking at it. and let me know if inspiration strikes!
22:26 samcv sweet uniprop is now 15% faster
22:26 samcv plus implemented my fixes and changes :) https://github.com/rakudo/rakudo/pull/944
22:27 samcv always nice when things get faster :)
22:45 AlexDaniel joined #perl6-dev
22:47 * lizmat commented
22:47 lizmat samcv: ^^^
22:47 samcv ok cool, i will do that
22:48 babydrop MasterDuke++ the new exception filename format does make things easier.
22:48 samcv and is it okay to include the text of the unicode file in the sourcecode? so people don't have to download it if they want to see it
22:48 samcv it's not that long
22:49 lizmat MasterDuke++  # agree with babydrop
22:49 * lizmat is tired and gets some shuteye
22:50 babydrop night
22:50 MasterDuke babydrop, lizmat: thanks. it was a self-serving inspiration, but glad others find it useful
22:51 MasterDuke (still need to fix it on the JVM...)
23:20 babydrop Is it possible to undo effect of nqp::getattr() making nqp::attrinited() return true?
23:21 timotimo i don't think we have an op for that, but it should be possible to make
23:21 timotimo what's your use case?
23:22 babydrop Oh, never mind, it wouldn't work for me anyway ><
23:23 babydrop mmm
23:26 babydrop m: use MONKEY; my $b = Bag.new(<a b c>); say nqp::attrinited(nqp::decont($b), Bag, '$!WHICH')
23:26 camelia rakudo-moar 0c75e5: OUTPUT«0␤»
23:26 babydrop m: use MONKEY; my $b = Bag.new(<a b c>).clone; say nqp::attrinited(nqp::decont($b), Bag, '$!WHICH')
23:26 camelia rakudo-moar 0c75e5: OUTPUT«1␤»
23:26 babydrop timotimo: ^ that's the usecase. .clone makes the attr appear to be attrinited
23:26 babydrop m: dd (Bag.new but "x").WHICH
23:26 camelia rakudo-moar 0c75e5: OUTPUT«Any␤»
23:26 babydrop That causes this
23:27 babydrop m: [bag() but "house"].combinations.grep: { [⊎] $^stuff-we-want }
23:27 camelia rakudo-moar 0c75e5: OUTPUT«Cannot unbox a type object (Any) to a str.␤  in block <unit> at <tmp> line 1␤␤»
23:27 babydrop And the reason for this bug
23:27 babydrop So I'm trying to figure out how to .clone without that effect
23:29 timotimo oh, that's not so good
23:29 timotimo but i guess we can not assign stuff over when we clone if it isn't inited before?
23:29 * babydrop tries something
23:31 babydrop m: use MONKEY; for (Bag.new(<a b c>)).^attributes.flat { next unless .name eq '$!WHICH'; say nqp::objprimspec(.type) }
23:31 camelia rakudo-moar 0c75e5: OUTPUT«0␤»
23:31 babydrop hm, maybe I'm wrong about the cause. Since the cloning is wrapped in objprimspec thing
23:33 babydrop oh wait, that's an unless not an if
23:33 * babydrop isn't wasted :}
23:37 babydrop What does nqp::objprimspec do?
23:42 timotimo gives you the primitive spec of an object
23:42 timotimo whether it's an obj, int, num, or str
23:42 timotimo i.e. native or object
23:42 babydrop Thanks.
23:44 nchambers left #perl6-dev

| Channels | #perl6-dev index | Today | | Search | Google Search | Plain-Text | summary