samcv | maybe i just need to make my function faster. that is part of it at least.hm | 00:02 | |
timotimo, do you know if it cache's the result of nqp::fc and returns the same fc string if i repeatedly request the foldcase version for the same string? | 00:04 | ||
timotimo | no, it won't cache that | 00:07 | |
i'll be playing vidya game with a friend now :) | |||
samcv | ok | 00:08 | |
timotimo | and after that probably sleep | 00:12 | |
samcv | \o/ ok i got it. woo | 00:38 | |
only about 16% slower than nqp::index | 00:41 | ||
from initial estimates | |||
and the speed of worst-case caseinsensitive matching goes from 2.26970566 to 1.2345366s | 00:43 | ||
comparing from a release a month or two ago | |||
timotimo | samcv: is that a fake number? 1.234? :) | 01:32 | |
samcv | no | 01:37 | |
real number :) | 01:38 | ||
but if i made up a number it could very well be that. heh | |||
Geth | roast: 389db59ff9 | (Samantha McVey)++ | S03-operators/repeat.t [unfudge] Huge repeat counts become neg. numbers RT #128035 |
05:49 | |
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=128035 | ||
Geth | nqp/foldcase: 4 commits pushed by (Samantha McVey)++ | 06:08 | |
samcv | nqp-jvm: use NQPHLL;say(nqp::getcomp('jvm').language) | 06:10 | |
camelia | Error occurred during initialization of VM Could not allocate metaspace: 1073741824 bytes |
||
samcv | nqp: use NQPHLL;say(nqp::getcomp('jvm').language) | ||
camelia | Cannot call method 'language' on a null object at <tmp>:1 (<ephemeral file>:<mainline>) from gen/moar/stage2/NQPHLL.nqp:1587 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:eval) from gen/moar/stage2/NQPHLL.nqp:1790 (/home/camelia/rakudoā¦ |
||
samcv | nqp: use NQPHLL;say(nqp::getcomp('moar').language) | ||
camelia | moar | ||
[TuxCM] | This is Rakudo version 2017.03-53-g5ca924df2 built on MoarVM version 2017.03-31-g8f9325b8 | 06:18 | |
csv-ip5xs 3.069 | |||
test 12.619 | |||
test-t 4.897 - 4.928 | |||
csv-parser 12.989 | |||
samcv | o/ [TuxCM] | ||
[TuxCM] | o/ | 06:19 | |
samcv | [TuxCM], is there a way i can dl yoru perl6 test and bench it locally | ||
hopefully i can bump that speed up with 1.7x :i speed boost coming very soon | |||
also would like to just profile it in general | |||
[TuxCM] | all url's have been posted here repeatedly | ||
modules.perl6.org/ | 06:20 | ||
github.com/Tux/CSV | |||
samcv | the test you actually run though. i know those url's | ||
but the benchmarks | |||
the actual thing you run or whatever | |||
[TuxCM] | there is a README.speed | ||
samcv | ok thanks you. will read that | 06:21 | |
lizmat | Files=1181, Tests=55992, 196 wallclock secs (11.64 usr 4.68 sys + 1159.57 cusr 112.20 csys = 1288.09 CPU) | 07:36 | |
www.flickr.com/photos/wendyga/3365...619026503/ # Camelia on stage in Brussels at ARW concert | 08:35 | ||
www.flickr.com/photos/wendyga/3331...619026503/ # closeup | 08:36 | ||
masak | :) | 08:55 | |
camelia is entering into her rock phase... | |||
Zoffix | huggable: csv | 10:05 | |
huggable | Zoffix, github.com/Tux/CSV (see `bench csv` for how to run bench) | ||
Zoffix | huggable: bench csv | ||
huggable | Zoffix, export PATH=`pwd`/install/bin:$PATH; cd CSV; for i in $(seq 1 10000); do echo 'hello,","," ",world,"!"'; done > /tmp/hello.csv; time perl6 -Ilib -MText::CSV test-t.pl </tmp/hello.csv | ||
Zoffix | samcv: ^ that's it. You can ignore the export path part | 10:06 | |
NeuralAnomaly: status | 10:13 | ||
NeuralAnomaly | Zoffix, [ā] Next release will be in 2 weeks and 4 days. Since last release, there are 13 new still-open tickets (13 unreviewed and 0 blockers) and 56 unreviewed commits. See perl6.fail/release/stats for details | ||
Zoffix | Damn time flies. | ||
jnthn swats a time fly | 10:15 | ||
Zoffix | I wanna cram all the IO updates into 2017.04 release and somehow thought there were still 4 weeks until the release :) | 10:19 | |
So 6.d is additive, but can we replace entire classes, say with `class IO::Path {ā¦}` or will it cry about redeclaration? | 10:47 | ||
guess I can try and see... | |||
(not gonna do it, but pondering whether I can write `FastIO` module that ditches $*SPEC with the assumption that it can later be just copy-pasted into 6.d or whatever language) | 10:50 | ||
lizmat | my question is really: what do we need $*SPEC for? | 10:53 | |
basically preprocessing paths before you get an absolute path that you can feed to the OS | |||
Geth | rakudo/nom: 42f34fb8ae | (Pawel Murias)++ | 2 files Move tests for is_approx to a separate file It's deprecated so it's tested separately. |
||
Zoffix | lizmat: but also to stringify them | 10:57 | |
m: "../".IO.relative("/tmp/foo/bar").say | |||
camelia | ../../../home/camelia/.. | ||
Zoffix | m: "../".IO.relative("/tmp/foo/bar").resolve.say | 10:58 | |
camelia | No such method 'resolve' for invocant of type 'Str' in block <unit> at <tmp> line 1 |
||
Zoffix | m: "../".IO.relative("/tmp/foo/bar").IO.resolve.relative.say | ||
camelia | .. | ||
Zoffix | And modify them... .child/.parent/.concat-wtih | ||
m: my $*SPEC = IO::Spec::Win32; "../".IO.relative("/tmp/foo/bar").say | 10:59 | ||
camelia | ..\..\..\home\camelia\.. | ||
Zoffix | My biggest worry is switching to unorthodox path separators on Windows. Sure they work with the OS, but people will also feed them to all sorts of stuff. | 11:00 | |
geekosaur | define "unorthodox" | 11:01 | |
Zoffix | And the headlines that will follow: "Slow ass Perl 6 optimized by using wrong Windows paths and now it broke XYZ" | ||
Zoffix needs to get ready to work | 11:02 | ||
lizmat | Zoffix: my approach to this was: from outside s/\\/\// :-) | ||
and on output, if Win, then change all / to \ | |||
output like shelling out | 11:03 | ||
geekosaur | well. there's the "orthodox" that says that all paths shall be unixlike, and there's the "orthodox" that says that Windows paths use \ as the separator and / is compatibility shim | 11:04 | |
and you can;t win with the "using wrong Windows paths" because half the programs you run into will only work right with one or the other | 11:05 | ||
so no matter which you use, you will be wrong some of the time | |||
"wrong" | |||
lizmat goes afk again | 11:06 | ||
Zoffix | m: '/tmp/foo3\lulz2'.IO.mkdir; say grep *.contains('lulz2'), dir '/tmp/' | 11:18 | |
camelia | ("/tmp/foo3\lulz2".IO) | ||
Zoffix | And on Windows that'd be a folder within a folder | 11:19 | |
geekosaur | yes? | 11:22 | |
Zoffix doesn't understand the question | 11:23 | ||
geekosaur doesn;t udnerstand your point unless it's "but it mixed path separators we must hide this from the little kids" | |||
...if it confuses them then perhaops they should not use an OS which treats them both the same *usually* | 11:24 | ||
Zoffix | No, my point was that if abandoning $*SPEC and preprocess paths the same on all OSes, the above case is problematic | 11:26 | |
calling .parent() on it should give different results on Windows and *nix | 11:27 | ||
geekosaur scans back to see what that's about | 11:28 | ||
uh | |||
no, getting rid of $*SPEC for *buggy* speed up is terrible idea | |||
do NOT do this | 11:29 | ||
or do it and stop advertising Windows compatibility | |||
Zoffix | Right | ||
But there's still a lot we can gain by making SPEC internal and getting rid of the dynvar and all the methods that just return '.', '..' | 11:31 | ||
Which I'll attempt to do in a module | 11:33 | ||
Geth | roast: cc5ee3d7f0 | (Pawel Murias)++ | S24-testing/10-is-approx.t Test is-approx. |
11:36 | |
geekosaur | the dynvar maybe. I'd be careful about the others unless you are certain Perl 6 will never be ported to an OS with different conventions | 11:37 | |
yes, I'm sure it's faster, just like it would be to ignore how path separators work on Windows | |||
Zoffix | The port would take care of adding back the . and .. :) | 11:39 | |
geekosaur | ...what? | 11:40 | |
(this looks worrisome anyway, how do you deal with ... uh, which OS used a sequence of // to back up instead of a .. ?) | 11:41 | ||
Zoffix | People porting to such an OS would add support for it. | ||
Just like now they'd have to add a specific ::Spec::* module for it | 11:42 | ||
Woodi | I totally don't get that problems with paths... a) during VM compile time, installation and precompilation require *correct* paths from current OS; b) in runtime user should provide correct paths... what is missing ? | 12:18 | |
Zoffix | Woodi: "/tmp/foo3\lulz2" is *correct* path on both Linux and Windows. But that `\` in it has different meaning depending on the OS. | 12:21 | |
geekosaur | which is confused by the fact that the CLI pretty much requires you to use \ on Windows, but the OS API accepts either (because the CLI considers / the start of a command line option) | 12:23 | |
Woodi | then only one thing can be done: stick to common case && provide specialised "use Windows::Quirks;" | 12:29 | |
geekosaur | what is the "common case"? | 12:31 | |
(hint: there is no correct answer. you don't get to force one on Windows.) | |||
Woodi | '\' on *nix, '/' on Win, ':' on Mac ? and user need to provide sensible paths | 12:32 | |
geekosaur | er? | ||
that's completely wrong... | |||
Woodi | what ? yes, '/' on Unix :) | ||
geekosaur | ':' was only used in MacOS 9 and earlier | 12:33 | |
Woodi | geekosaur: now you are lost in details | ||
afk | |||
geekosaur | uh | ||
again, you don;t get to assert that | |||
Zoffix | :) | ||
geekosaur | an OS X API will not parse ':' as a path separator. you don't get to assert otherwise unless you want to give up compatibility with anything else | 12:34 | |
and, Windows APIs accept either / or \. again, you don;t get to assert otherwise. the OS gets to assert it, and it does assert it; you must comply, not try to argue otherwise | 12:35 | ||
Zoffix | .oO( resistance is futile... ) |
||
stmuk_ | wibble | 12:48 | |
Woodi | b. I'm proposing limiting user input to common cases. in case someone want more complicated things he needs to use Pro:SpecificOS module. same story as with object-relational mappers - at some level of control you need to drop sugar. | 13:12 | |
Zoffix | he? | 13:13 | |
I'm not sure how you plan on limiting the presence of 'foo\bar' directory when doing `dir` for example | |||
Woodi | but details: on Linux/Unix if someone provide "/tmp/foo3\lulz2".mkdir - not a problem. on Windows "/tmp/foo3/lulz2".mkdir is error, "\tmp\foo3\lulz2".mkdir is ok. on windows, "/tmp/foo3\lulz2".mkdir is error - command starts with switches | 13:15 | |
do we plan to support case when user do not know what os he use ? | 13:16 | ||
Zoffix | And it seems to come from a viewpoint that the user manually types up all the paths into their code, when more often than not, the paths would come from somewhere else. So what you'd have is most people writing programs that crash on certain input and more skilled programmers always including Pro::SpecificOS modules simply to prevent those crashes. | ||
Woodi: we already do :/ | |||
Woodi | Zoffix: require Pro::Virtualos :) | 13:17 | |
geekosaur | woodi, so you want perl 6 not to accept paths that other programs can legally produce on Windows? | ||
but it sounds like this will have to be a learning experience because multiple people think this somehow makes sense. | 13:18 | ||
Woodi | geekosaur: if path are invalid for subsystem we use internally then yes. | ||
geekosaur | the path is not invalid for Windows | ||
Woodi | geekosaur: but it's nor "common case". and it is resolved by including Pro:: :) | 13:19 | |
geekosaur | the path is invalid for a cheerful charlie path parser that deliberately violates the platform specification in the name of speed | ||
this is not acceptable | |||
and again, you do not get to say what the common case is | |||
the actual common case on Windows? you don;t normally get paths that *mix* them, but you will often get paths that use one or the other | |||
Woodi | cc is: *nix path separator is '/', on Windows '/'. | 13:20 | |
perlpilot | .oO( the "common case" is fubar :) ) |
||
geekosaur | but even so, I think you do not get to declare "common case" unless you want to not interoperate with other Windows programs | ||
Woodi | you know what on Window :) | ||
geekosaur | which is your call, I guess, if you like telling Windows users to go away | ||
Woodi | geekosaur: if someone want to operate he include Pro::Windows | 13:21 | |
geekosaur | no | ||
oh never mind | |||
yes, please do that | |||
Zoffix | heh | ||
That's not gonna happen./ | |||
geekosaur | you will evidently need to learn the hard way what is acceptable to Windows users | ||
so yes, please do that | |||
Woodi | geekosaur: "Windows user" is Explorer user by definition - he use path picker :) | 13:22 | |
geekosaur | ... | ||
I'm out. please do what you want. | |||
Woodi | geekosaur: I would go, you pls stay, seriously | 13:23 | |
geekosaur | no, I am out of this conversation. you want to dictate to Windows users what is correct, you dictate to Windows users what is correct. | ||
you find out how fare it gets yuou, *then* we can consider having this conversation. | 13:24 | ||
perlpilot | This whole "common case" thing reminds me of character encodings. Either you know what encoding you need to use or you guess. The "common case" here sounds like guessing. And, of course, guessing is rife with pain and suffering. | 13:27 | |
Woodi | just dividing problem space on cases. I do not say what's correct becouse it would deny the reality | 13:28 | |
Zoffix | lizmat: so how did camelia manage to get on stage of a concert? | ||
lizmat: also is that picture private or can I tweet it? | 13:29 | ||
C:\temp>perl6 -e "say dir 'foo/bar'" | 13:31 | ||
("foo/bar\ber".IO "foo/bar\meow".IO) | |||
Zoffix is disappointed with those path separator mixage in output :() | 13:32 | ||
Especially since it's double-quoted and wrong | |||
At least .perl is right | 13:33 | ||
timotimo | good catch on the backslashes there | ||
perlpilot | Zoffix: pretty sure woolfy posted on FB about how they gave a camelia to each of ARW before their show in Brussels | 13:35 | |
Zoffix | Ah, now I see it :) | ||
timotimo | i don't know who ARW are :| | 13:36 | |
perlpilot | timotimo: Yes 2.0 | ||
Zoffix doesn't know who either are :) | |||
geekosaur | wouldn't this be something like 5.0? | 13:37 | |
perlpilot | whatever, I can't keep track of how many incarnations their are/were :) | ||
geekosaur | :) | ||
en.wikipedia.org/wiki/Yes_(band) and it looks like 4.0 | 13:38 | ||
Yes, ABWH, Cinema/"Yes 2.0", ARW | 13:39 | ||
timotimo | yes, yes. | ||
perlpilot | Also, en.wikipedia.org/wiki/Anderson,_Ra...nd_Wakeman | ||
Zoffix is amused en.wikipedia.org/wiki/No_(band) is not a 404 :) | |||
SmokeMachine | Zoffix, lizmat: what %hash{"exists", "does not exist" ; "exists", "does not exist"}:exists should return? (True, False, False) or (True, False, False, False)? I mean: once I found that the first level doesn't exists, should I return False and finish, or should I return 1 False for each key on the next levels? | 14:01 | |
Zoffix | Wouldn't that be (False, False)? | 14:07 | |
m: my %h = a => { c => 42 }; b => { c => 42 }; dd %h{"a", "b"; "b", "b"} | |||
camelia | WARNINGS for <tmp>: Useless use of "b => { c => 42 }" in sink context (line 1) (Any, Any, Any, Any) |
||
Zoffix | m: my %h = a => { c => 42 }, b => { c => 42 }; dd %h{"a", "b"; "b", "b"} | ||
camelia | (Any, Any, Any, Any) | ||
Zoffix | Oh | ||
I already forgot how these are parsed :) | 14:08 | ||
m: my %h = a => { c => 42 }, b => { c => 42 }; dd %h{"a", "a"; "c", "c"} | |||
camelia | (42, 42, 42, 42) | ||
Zoffix | m: my %h = a => { c => 42 }, b => { c => 42 }; dd %h{"a", "a"; "c", "b"} | ||
camelia | (42, Any, 42, Any) | ||
Zoffix | m: my %h = a => { c => 42 }, b => { c => 42 }; dd %h{"a", "a"; "b", "b"} | ||
camelia | (Any, Any, Any, Any) | ||
Zoffix | Oh, ok. | ||
SmokeMachine: so I'd think it'd be (False, False, False, False) | 14:09 | ||
SmokeMachine | iy would try: %a{"exists", "exists"}, %a{"exists", "do not exists"}, %a{"do notexists", "exists"}, %a{"do not exists", "do not exists"} | ||
s/,/;/g | |||
Zoffix | Basically mirror the output of normal lookup. | ||
m: my %h = 42 ZR=> <a b c d e>; dd %h<a b c z>:exists | |||
camelia | (Bool::True, Bool::False, Bool::False, Bool::False) | ||
Zoffix | huh | 14:10 | |
m: my %h = 42 ZR=> <a b c d e>; dd %h<a b c z> | |||
camelia | (42, Any, Any, Any) | ||
Zoffix | m: my %h = 42 XR=> <a b c d e>; dd %h<a b c z>:exists | ||
camelia | (Bool::True, Bool::True, Bool::True, Bool::False) | ||
Zoffix | Right | ||
lizmat | Zoffix: Wendy and I were at a Meet & Greet with Jon Anderson, Rick Wakeman and Trevor Rubin. We each gave them a Camelia. Trevor apparently put his on his monitor. The rest is history | 14:14 | |
timotimo | cool | ||
lizmat | Zoffix: it's a public picture, you can tweet it :) | ||
SmokeMachine | Zoffix: another thing is this: | ||
lizmat | Rabin | ||
argh | |||
lizmat is not awake yet | 14:15 | ||
SmokeMachine | m: my %a{List} = (1, 2) => 42; my $l = List.new: 1,2; say %a{$l} # should it work? | ||
camelia | (Any) | ||
Zoffix | m: my $l = (1, 2); my %a{List} = $l => 42; say %a{$l} | 14:17 | |
camelia | 42 | ||
Zoffix | m: my %a{List} = (1, 2) => 42; my $l = (1, 2); dd %a.keys[0].WHICH; dd $l.WHICH | 14:19 | |
camelia | ObjAt.new("List|69236784") ObjAt.new("List|69237696") |
||
Zoffix | SmokeMachine: don't think so, 'cause it uses .WHICH doesn't it? | ||
And when it is the same object, the lookup works fine. | |||
lizmat | SmokeMachine: it should mirror the datastructure returned without :exists | ||
is what I think :-) | 14:20 | ||
Zoffix | m: my %a{List} = [1, 2] => 42; my $l = [1, 2]; say %a{$l} | ||
camelia | (Any) | ||
Zoffix | m: my $l = [1, 2]; my %a{List} = $l => 42; say %a{$l} | ||
camelia | 42 | ||
SmokeMachine | m: my $l = [1, 2]; my %a{List} = $l => 42; say %a{1;2} | 14:21 | |
camelia | Type check failed in binding to 'key'; expected List but got Int (1) in block <unit> at <tmp> line 1 |
||
lizmat | afk again& | ||
Zoffix | awww dammit | 14:31 | |
my awesomely twittable example is hitting a bug | |||
Or is it... | |||
m: gist.github.com/zoffixznet/0823179...a08a1ca914 | |||
camelia | [["Make", "R::I::SET_LINE_ENDING_ON_HANDLE", "4.1x", "Faster"], Mu, Mu] [["Make", "IO::Spec::Unix.catdir", "3.9x", "Faster"], Mu, Mu] [["Make", "IO::Spec::Unix.split", "36x", "Faster"], Mu, Mu] [["Make", "IO::Spec::Unix.rel2abs", "35\%", "faster"],ā¦ |
||
Zoffix | Why are those Mus there? Why are $type and $speedup aren't set? | 14:32 | |
Making them with: my ($sha, $, $, *@rest ($, $type, $speedup, $)) := \ |.words; | |||
Works fine if I make it a sub's signature, so I guess it is indeed a bug :( | 14:33 | ||
m: sub ($sha, $, $, *@rest ($, $type, $speedup, $)) {dd [ @rest, $type, $speedup ];}(|'fa9aa47 [io grant] Make R::I::SET_LINE_ENDING_ON_HANDLE 4.1x Faster'.words) | 14:34 | ||
camelia | [["Make", "R::I::SET_LINE_ENDING_ON_HANDLE", "4.1x", "Faster"], "R::I::SET_LINE_ENDING_ON_HANDLE", "4.1x"] | ||
Zoffix | m: my ($sha, $, $, *@rest ($, $type, $speedup, $)) := \ |'fa9aa47 [io grant] Make R::I::SET_LINE_ENDING_ON_HANDLE 4.1x Faster'.words; dd [ @rest, $type, $speedup ]; | ||
camelia | [["Make", "R::I::SET_LINE_ENDING_ON_HANDLE", "4.1x", "Faster"], Mu, Mu] | ||
Zoffix | Rakudobugged: rt.perl.org/Ticket/Display.html?id=131071 | 14:38 | |
And another issue is hitting another example :/ | 14:51 | ||
Perl 6 isn't lovin' me today | |||
m: my %h .= push: a => 42, a => 72; dd %h; | 14:52 | ||
camelia | Hash %h = {} | ||
Zoffix | why is it empty? | 14:53 | |
m: my %h; %h .= push: a => 42, a => 72; dd %h; | |||
camelia | Hash %h = {} | ||
Zoffix | m: my %h; %h .= push: $_ for a => 42, a => 72; dd %h; | ||
camelia | Hash %h = {:a($[42, 72])} | ||
Zoffix | Ah | 14:56 | |
m: my %h .= append: "a" => 42, "a" => 72; dd %h; | |||
camelia | Hash %h = {:a($[42, 72])} | ||
Zoffix | But still doesn't work in this form | 14:57 | |
m: gist.github.com/zoffixznet/92d0cf7...8f699dd91b | |||
camelia | Hash %h = {:Bar($["1.2", "4.2", "10.2"]), :Foo($["4.1", "1.3"]), :Meow("1.3")} | ||
Zoffix | ... | ||
I guess my perl6 is too old | |||
And I bet it's lizmat++'s fix to the %h = %h, %blah that fixed it | 14:58 | ||
And I can't tweet this example either 'cause the fix is in 2017.03 but everyone's on 2017.01 Rakudo Star :P | 15:00 | ||
Unlucky day for me | |||
Zoffix tweets it anyway | |||
u: āØ | 15:27 | ||
unicodable6 | Zoffix, U+2368 APL FUNCTIONAL SYMBOL TILDE DIAERESIS [So] (āØ) | ||
Zoffix | That gotta be made into an op :P | ||
[Coke] | I vote we call it "the moustache" | 15:28 | |
Zoffix | I'm working on my March grant report ATM. Will publish it in ~4 hours | 15:30 | |
[Coke]: how do you publish it on TPF's site? Do you just scrape the HTML page? 'cause I got all of these reports in Markdown format, if that makes things easier | 15:37 | ||
[Coke] | hokay. | ||
I just scrape the HTML. I am not sure if I can use the markdown, but I'm happy to try | |||
Zoffix | OK | 15:38 | |
dogbert17 | .tell AlexDaniel if possible could you add gist.github.com/dogbert17/3eb15ea5...1d4966f7b2 to RT #131003 | 16:03 | |
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=131003 | ||
yoleaux2 | dogbert17: I'll pass your message to AlexDaniel. | ||
nine | .oO(Will UNIX conventions still be in use in 100 years?) |
16:25 | |
nine read a bit of the backlog | |||
Zoffix | Perl 6 IO TPF Grant: Monthly Report (March, 2017): blogs.perl.org/users/zoffix_znet/20...-2017.html | 16:27 | |
[Coke] | Zoffix++ | 16:34 | |
Zoffix | .oO( s/Seqqy/Sequential/ ) |
17:01 | |
TimToady | .oO( class HyperSeq does Things ) |
17:03 | |
Zoffix | This reminds me what I wanted to ask TimToady | ||
timotimo | my $dog will WORK(:4food) | 17:04 | |
TimToady sips coffee and hopes it will help | |||
timotimo | Zoffix: report looks good! i haven't read the previous one, though :( | ||
Zoffix | m: Seq.new: class :: does Iterator { method pull-one {}; method sink-all { say "sank" } }.new | ||
camelia | sank | ||
Zoffix | m: my $x = Seq.new: class :: does Iterator { method pull-one {}; method sink-all { say "sank" } }.new; $x | ||
camelia | WARNINGS for <tmp>: Useless use of $x in sink context (line 1) |
||
Zoffix | m: my $x = Seq.new: class :: does Iterator { method pull-one {}; method sink-all { say "sank" } }.new; sink $x | ||
camelia | WARNINGS for <tmp>: Useless use of $x in sink context (line 1) sank |
||
Zoffix | m: my $x = Seq.new: class :: does Iterator { method pull-one {}; method sink-all { say "sank" } }.new; $x.sink | 17:05 | |
camelia | sank | ||
jnthn | Well, as previously mentioned, Sequential isn't the best name for something that might work in parallel and produces results out of sequence. :-) | ||
TimToady suggested Batchable earlier, if you consider Seq to be a single batch | |||
jnthn | Hmm | ||
I wonder whether HyperSeq and RaceSeq should even have Seq in their name also :) | 17:06 | ||
Zoffix | TimToady: ^ is that by design that a class in a variable doesn't get sunk? Makes sink-all kinda not as useful. I first noticed that with IO::Handle's iterators where such a call on sinkage would cause the handle's closing.... | ||
TimToady | but I was semi-serious with "Things", in the sense of "ThingsToDoNotNecessarilyInOrder" | ||
jnthn | haha...does Things :P | ||
But yeah, it kinda works I guess :) | 17:07 | ||
It's better than Seqqy :P | |||
TimToady | does WorkPolicy maybe | ||
Zoffix | jnthn: in that case clearly the name should be uenSeqtial | ||
TimToady | does Consequential :) | 17:08 | |
Zoffix | "Seque: A Programming Language for Manipulating Sequences" | ||
From www.dictionary.com/browse/seque | |||
TimToady | maybe they should be named Don'tCheat, CheatButGetAwayWithIt, CheatAndDon'tCare | 17:09 | |
.oO(Cordia, Concordia, Discordia) |
17:11 | ||
Zoffix is done skimming through gist.github.com/jnthn/6a80a9712fb3...0e46fca6d7 | 17:13 | ||
Over my head :) I think poor name suggestions is all I got :) | |||
perlpilot | Zoffix++ (just read your report) | 17:16 | |
TimToady | .oO( class HyperSeq does WhatNow ) |
17:17 | |
.oO( class HyperSeq does HowNow ) |
17:18 | ||
.oO( class BrownCow does HowNow ) |
|||
TimToady should be forbidden from free-association this early in the day... | |||
.oO(we could redefine "Parallax" to mean how far you relax things in the parallel direction...) |
17:21 | ||
Zoffix | :o | ||
TimToady | .oO(and justify it because it tells you how far away the other end of the work is :) |
17:22 | |
TimToady goes back to backlogging hoping his brane follows along after | 17:23 | ||
TimToady 's brane is still far too gleeful about the antisociality of bending yet another existing word into a perletzel | 17:28 | ||
Zoffix: re irclog.perlgeek.de/perl6-dev/2017-...i_14324664 I would say that callwith/nextwith work like 'next' in the middle of a loop (the dispatcher's loop, as it were, so continues the current dispatch cascade), while samewith is a complete redispatch, more like restarting the entire loop with different arguments, as I understand it | 17:46 | ||
m: multi fact(0) { 1 }; multi fact($n) { $n * samewith $n - 1 }; say fact(42) | 17:49 | ||
camelia | 1405006117752879898543142606244511569936384000000000 | ||
TimToady | m: multi fact(0) { 1 }; multi fact($n) { $n * callwith $n - 1 }; say fact(42) | ||
camelia | Use of Nil in numeric context in sub fact at <tmp> line 1 0 |
||
TimToady | samewith gets back to the 0 case successfully due to the redispatch | ||
callwith/nextwith cannot get back to the 0 case because it's already been rejected in the current dispatch | 17:50 | ||
Zoffix | Then what's the difference between callwith/nextwith? | 17:51 | |
TimToady | nextwith doesn't come back to this function, like a tail call | ||
Zoffix | oh | 17:52 | |
TimToady | makes no difference here, since it's the last statement | ||
jnthn | nextwith is like return callwith | ||
TimToady | but hopefully optimized | ||
Zoffix | I'm now confused about which ones I was confused about :) | ||
TimToady | m: multi fact(0) { 1 }; multi fact($n) { samewith($n - 1) * $n }; say fact(42) | 17:54 | |
camelia | 1405006117752879898543142606244511569936384000000000 | ||
TimToady | samewith is not a tail call, but could be considered a strong hint to do TCO if it's last | ||
nextwith is a forced tail call, but only of the rest of the current dispatch | 17:55 | ||
we don't really have a way to force a tail-call redispatch yet | |||
Zoffix | [callwith] with new args, call from scratch and return here; | ||
[callsame] with same args, call from scratch and return here; | |||
[samewith] with new args, use the same dispatch chain to make a call and return here; | |||
[nextwith] with new args, use the same dispatch chain to make a call and don't return here; | 17:56 | ||
[nextsame] with same args, use the same dispatch chain to make a call and don't return here; | |||
I think I got it :) | |||
TimToady | uh no | ||
Zoffix | bah :D | ||
TimToady | call* reuse the current dispatch chain | ||
samewith creates a new dispatch chain | 17:57 | ||
"reuse" in the sense of using the rest of the current chain, not in the sense of a restart | |||
or equivalently, samewith can reuse the current chain but only by starting again from the front, which is probably what really happens | 17:58 | ||
but I think of it as a fresh dispatch | |||
call* and next* can only complete the current dispatch | 17:59 | ||
Zoffix | OK, after playing with some code I think I got it. | ||
I need to write a blog post about it :) | |||
Geth | rakudo/nom: 19eeddbf35 | (Elizabeth Mattijsen)++ | t/spectest.data Mark integration/eval-and-threads.t as slow So it won't affect the total wallclock time as much as it did before. |
18:02 | |
Zoffix | m: foo (Any [$x]) {dd $x}([42]) | 18:04 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing infix inside [] at <tmp>:1 ------> 3foo (Any [7ā5$x]) {dd $x}([42]) expecting any of: bracketed infix infix infix stopper |
||
Zoffix | It complains about the sig, right? | ||
m: multi foo (Int $x) { say "Int [$x]"; foo Any }; multi foo(Cool $x) { say "Cool [$x]"; nextsame; say "were back!" }; multi foo(Any [$x]) { say "Any [$x]" }; foo "x" | |||
camelia | Cool [x] | ||
Zoffix | But not in this case... | ||
TimToady | your first one was just a syntax error, missing 'sub' | 18:07 | |
Zoffix | Ah. OK. Thanks. | 18:09 | |
TimToady | m: sub foo (Any [$x]) {dd $x}([42]) | ||
camelia | Int $x = 42 | ||
Zoffix | Now I got it: *with = use these new args; *same = just use the same args; call* = call next candidate and return; next* = call next candidate and don't return; same* = restart from scratch | ||
We're clearly missing samesame :) | |||
TimToady | yes, we clearly are :P | 18:10 | |
loop {} works better for that though | |||
[Coke] | there's more than same way to same it. | 18:11 | |
TimToady | same old, same new... | ||
lizmat: re irclog.perlgeek.de/perl6-dev/2017-...i_14325105 but then what about phasers that might return their value, or might also just be used for a side effect? | 18:15 | ||
m: say { 42; ENTER say "bye" }() | |||
camelia | WARNINGS for <tmp>: Useless use of constant integer 42 in sink context (line 1) bye True |
||
TimToady | m: say { 42; ENTER "bye" }() | ||
camelia | WARNINGS for <tmp>: Useless use of constant string "bye" in sink context (line 1) Useless use of constant integer 42 in sink context (line 1) bye |
||
TimToady | huh, I guess that's a useless use of useless use, at least for "bye" | 18:16 | |
TimToady found hisself a buggy! | 18:17 | ||
m: say { INIT "bye" }() | 18:18 | ||
camelia | WARNINGS for <tmp>: Useless use of constant string "bye" in sink context (line 1) bye |
||
TimToady | m: say { BEGIN "And yet I live!" }() | 18:19 | |
camelia | And yet I live! | ||
TimToady | m: say { CHECK "And yet I live!" }() | ||
camelia | And yet I live! | ||
TimToady | m: say { INIT "And yet I live!" }() | ||
camelia | WARNINGS for <tmp>: Useless use of constant string "And yet I live!" in sink context (line 1) And yet I live! |
||
TimToady | curious | ||
m: say { INIT now }() | 18:20 | ||
camelia | Instant:1490725251.568083 | ||
TimToady | I guess we'd've discovered this bug earlier if we carped about 'now' in sink context | ||
m: now; now; now; | 18:21 | ||
camelia | ( no output ) | ||
TimToady | m: pi; pi; pi; | ||
camelia | WARNINGS for <tmp>: Useless use of constant value pi in sink context (lines 1, 1, 1) |
||
Zoffix | m: rand; rand; rand; | ||
camelia | ( no output ) | ||
TimToady | well, obviously 'now' updates the clock, just as 'rand' updates the RNG :P | ||
if nobody ever asked "What time is it?", time would just quit... | 18:23 | ||
TimToady wonders if someone can construct such a clock from trees falling in the forest that no one hears... | 18:25 | ||
Zoffix | Yes, but no one would hear when its alarm goes off... | 18:27 | |
lizmat | m: my $a; { $a = LEAVE 42 }; say $a # TimToady: clearly, not all phasers are created equal | 18:33 | |
camelia | WARNINGS for <tmp>: Useless use of constant integer 42 in sink context (line 1) (Any) |
||
lizmat | m: my $a; { $a = ENTER 42 }; say $a | 18:34 | |
camelia | WARNINGS for <tmp>: Useless use of constant integer 42 in sink context (line 1) 42 |
||
TimToady | m: my $a; { $a := LEAVE 42 }; say $a | ||
camelia | WARNINGS for <tmp>: Useless use of constant integer 42 in sink context (line 1) Nil |
||
TimToady | but yes, clearly some phasers are better at time travel than others :) | 18:35 | |
lizmat | m: my $a; for ^1 { $a = FIRST 42 }; say $a # indeed | 18:36 | |
camelia | WARNINGS for <tmp>: Useless use of constant integer 42 in sink context (line 1) (Any) |
||
TimToady | that one just looks like a bug to me, assuming FIRST is an ENTERoid | 18:39 | |
m: for ^1 { say "HERE"; FIRST say "THERE" } | |||
camelia | THERE HERE |
||
TimToady | which it is | ||
lizmat | back to schlepping& | 18:40 | |
Zoffix | Hm. Quitting drinking has sure dulled my writing skills... | 19:01 | |
I guess I can find solace in my sharpened programming skills... | |||
samcv | hello everyone | 19:20 | |
Zoffix | \o | ||
m: multi foo (Int $x) { say "Int [$x]"; $x.flip }; multi foo (Cool $x) { say "Cool [$x]"; my $v = callwith Mu; say "We're back! The return value is $v"; $x.flip }; multi foo (Any $x) { say "Any [$x]"; $x.flip }; foo "I ā„ Perl 6!"; | 19:27 | ||
camelia | Cool [I ā„ Perl 6!] Type check failed in binding to '$x'; expected Any but got Mu (Mu) in sub foo at <tmp> line 1 in sub foo at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Zoffix | Is it a bug that it crashes? | ||
timotimo | there's no candidate that would accept Mu, why would you expect callwith Mu to give anything but an exception? | 19:28 | |
Zoffix | m: multi foo (Int $x) { say "Int [$x]"; $x.flip }; multi foo (Cool $x) { say "Cool [$x]"; my $v = callwith Mu; say "We're back! The return value is $v"; $x.flip }; multi foo (Date $x) { say "Any [$x]"; $x.flip }; foo "I ā„ Perl 6!"; | 19:30 | |
camelia | Cool [I ā„ Perl 6!] Use of uninitialized value $v of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in sub foo at <tmp> line 1 We're back! The return value is |
||
jnthn | If you use callwith, it's on you to ensure that the argument types are acceptable | ||
Zoffix | But there's no ^ candidate there now and it doesn't crash. | ||
jnthn | Sure, then there's isn't a candidate | ||
So there's nothing to fail to bind | 19:31 | ||
Zoffix | So it just tries the *next* next not the next matching? | ||
jnthn | Yes | ||
Zoffix | Oh | ||
jnthn | You are iterating a predestined (based on original arguments) set of candidates | ||
callwith and nextwith don't cause that candidate set to be reevaluated. | |||
TimToady | (that's what samewith is for) | 19:32 | |
jnthn | Indeed. | ||
TimToady | nextwith is useful only when you know you have a more generic candidate later in the list | 19:33 | |
jnthn | Heh, probably "predetermined" woulda been a better word :) | ||
TimToady | I often have determination to get to my destination. | 19:34 | |
Zoffix | m: class A is Int {}; class B is A {}; multi foo (A) { say "A"; nextsame }; multi foo (B) { say "B"; }; multi foo (Int) { say "Int" }; foo A; | 19:36 | |
camelia | A Int |
||
Zoffix | How come that didn't go to "B"? :/ | ||
jnthn | Because B is narrower than A | 19:37 | |
Zoffix | Oh doh | ||
m: multi foo (IntStr) { say "IntStr"; nextwith "x" }; multi foo (Int) { say "Int"; }; multi foo (Cool) { say "Cool" }; foo <42>; | 19:38 | ||
camelia | IntStr Type check failed in binding to '<anon>'; expected Int but got Str ("x") in sub foo at <tmp> line 1 in sub foo at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Zoffix | OK. Now I get it :D | ||
jnthn++ thanks | |||
samcv | Zoffix, do you find HARNESS6 faster than harness5? | 19:41 | |
i have not timed them. but am curious | |||
Zoffix | samcv: nope | 19:46 | |
Don't see my timings for HARNESS6 in the logs, but it's a lot slower and seems to be missing some tests. | 19:48 | ||
I think it's like 300-400 seconds for the stresstest, while the stresstest on harness5 runs in ~120 seconds | |||
That's on 24-core box with the rakudo's max threads var bumped to something higher than normal. | 19:49 | ||
samcv | what's the normal max thread var? | 19:53 | |
jnthn | Bumping Rakudo's max threads higher will probably only hurt performance for stresstest6 | 19:56 | |
samcv: It defaults to 16 | |||
Thing is, the thread scheduler is none too smart so will quickly end up with the maximum number of threads | |||
But harness6 doesn't really need that many | 19:57 | ||
Even if your TEST_JOBS is far higher | |||
timotimo | i have here a test in the spec tests that has been eating a full cpu core for many minutes now | 19:58 | |
t/spec/S19-command-line/repl.rakudo.moar (Wstat: 256 Tests: 13 Failed: 1) | 19:59 | ||
Failed tests: 10 | |||
TODO passed: 7 | |||
Zoffix | jnthn: doesn't TESTJOBS affect how many tests it runs at the same time? So if max threads is 16 and your TESTJOBS is 30, how can it do all of them? | 20:06 | |
timotimo, does that test hang normally? I noticed Proc::Async.kill that doesn't-hang uses sometimes doesn't kill | 20:07 | ||
timotimo | yeah, when i run it i get a test failure and then it hangs | 20:08 | |
ok 9 - variables persist across multiple lines of input - its subtest "stdout is correct" fails, the "stderr is correct" succeeds, and then it hangs | |||
when run without a harness, that is | |||
Zoffix | I'll take a look in ~1hr | 20:09 | |
[Coke] | multi-threaded tests don't play nice with a high TEST_JOBS, right. | 20:10 | |
jnthn | Zoffix: It uses Proc::Async, so it's non-blocking | ||
Zoffix: Tests are run as subproccesses | 20:11 | ||
Zoffix | Ah. OK. | ||
jnthn | Zoffix: So one thread in the harness can service a bunch of running spectests | ||
Zoffix | cool | ||
jnthn bbl | |||
Geth | rakudo/nom: 27f546907a | TimToady++ | src/Perl6/Actions.nqp suppress useless use on INIT/ENTER/FIRST Would be nice to determine this in 2nd pass, but for now, it's better to allow false negatives than false positives. |
20:12 | |
rakudo/nom: 41ac4b4a3d | TimToady++ | src/Perl6/Actions.nqp Catch useless use of 'now' now, now... |
|||
Zoffix | timotimo: does it hand when you type the code manually in repl? It runs string "my \$x = 42;\nsay qq/The value is \$x/;\n", | 20:34 | |
remove backslashes and \n s are separate lines | |||
Well, I lied. I'm too tired to look at it today, so maybe fudge it for now? | 20:35 | ||
timotimo | doesn't hang | 20:36 | |
Zoffix is off for rest of night | |||
timotimo | gnite Zoffix :) | 20:37 |