travis-ci Rakudo build passed. Nick Logan 'Fix unitialized value stringification warning' 00:44
travis-ci.org/rakudo/rakudo/builds/245978991 github.com/rakudo/rakudo/compare/4...e28209b304
Rakudo build passed. Zoffix Znet 'Make Any.tail() use iterator's .count-only if available 01:15
travis-ci.org/rakudo/rakudo/builds/245980656 github.com/rakudo/rakudo/compare/b...04dfc4a427
Rakudo build passed. Elizabeth Mattijsen 'Also run the more thorough set difference tests' 01:40
travis-ci.org/rakudo/rakudo/builds/245983925 github.com/rakudo/rakudo/compare/9...9d8e79d38c
Rakudo build passed. Zoffix Znet 'Make R::I::LastValue not pull when count is zero 02:09
travis-ci.org/rakudo/rakudo/builds/245986997 github.com/rakudo/rakudo/compare/3...79f7b548fc
|Tux| This is Rakudo version 2017.06-55-g4079f7b54 built on MoarVM version 2017.06-14-g888b33d1 07:56
csv-ip5xs 2.642
test 12.297
test-t 3.943 - 3.976
csv-parser 12.270
jnthn eveo: about 08:57
m: my Channel $x .= new; $x.Supply.tap: &say; $x.close; await $x
camelia Cannot receive a message on a closed channel
in block <unit> at <tmp> line 1
jnthn Or perhaps more interestingly 08:58
m: my Channel $x .= new; $x.Supply.tap: &say; $x.send(42); $x.close; await $x
camelia 42
Cannot receive a message on a closed channel
in block <unit> at <tmp> line 1
jnthn That's behaving just as expected. The Supply obtained from the Channel will try, whenever there's new data put into the channel, to receive the value and emit it. It does so. The .close is also quite promptly handled. By the time await $x is done, which also tries to obtain a value from the Channel, it has been closed. 09:00
The code is racey, but that's not a bug in Rakudo, it's a bug in the code. If you have multiple consumers for a Channel they are by definition competing over the data. That's part of what makes channels useful.
eveo ok 09:48
yoleaux 05:50Z <moritz> eveo: the idea was that any(2, 3) != $x is interpreted as !(any(2,3) == $x), because the former is basically never what you want. That's why the != variant returns a Bool and the == a Junction
jnthn Currently working on a fix for RT #131576, fwiw
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131576
jnthn Well, at the point of deciding "how will I fix this" :) 09:49
eveo cool 09:51
Geth nqp: ee1b795b9a | (Jonathan Worthington)++ | 2 files
Remove sync process op tests.

These are going away, now that Rakudo has already moved over to implementing everything in terms of the asynchronous process ops.
10:02
jnthn Well, starting with some cleaning up 10:07
Geth nqp: 6c609f6c63 | (Jonathan Worthington)++ | t/nqp/019-file-ops.t
Replace "is this Windows" test to not use shell.
10:08
nqp: 79f6da22c2 | (Jonathan Worthington)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp
Un-map deprecated sync proc ops for MoarVM.
dogbert17 is reading perl6.party/post/Perl-6-Seqs-Drugs...ock-n-Roll 10:12
eveo just finished responding to /r/programming reddit comments on that post 10:22
Specifically why »+« is not unmaintanable mess when you compare it to the alternative without a hyper.
Not sure how that even came up, considering the article has nothing to do with that :/ 10:23
eveo should just ignore reddit comments, including valid questions
jnthn has been ignoring reddit for years by this point :) 10:34
dogbert17 eveo: I might be a bit dense (ENOOCOFFE) but what are you trying to say here: "By default is not implemented, but expected implementation for types that do this role is:" 10:40
eveo dogbert17: the docs are for an interface. role Iterator does not have those methods implemented, but you can implemented in your class if you want to use those optimizations 10:42
dogbert17 that I do understand :) 10:43
it was this part which threw me: "but expected implementation for types that do this role is:" 10:44
samcv hmm what's with the tag 47e455e426cbf2dd48a2be96322c42b704d693ee in rakudo 10:51
weird why does it show up when i run git tag 10:53
eveo dogbert17: correct it as you see fit. 10:54
lizmat eveo++ # good constructive comments 10:56
nine I don't see any comments on reddit for that post? 10:58
eveo nine: it's /r/programming. 25 comments: www.reddit.com/r/programming/comme...rocknroll/
nine Oh, how confusing
eveo :) 10:59
tadzik perl6.fail/ that's one pretty RT
lizmat eveo: fwiw, I have a solution for RT #131626, which basically consists of copying the code of the ops 11:01
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131626
lizmat there's not a lot to be copied, and until we have a better way to alias, I think this could do with the proper comments in the code
eveo cool 11:02
dogbert17 eveo, you there?
eveo Relocating to bus stop so not for 20 m 11:03
what's up?
dogbert17 do you think this should work on Linux: my $fh = open('~/scratch.pl6');
given that I'm logged in as dogbert and the file '/home/dogbert/scratch.pl6' exists 11:04
eveo No.
dogbert17 hmm
eveo The ~/ is expandeed to $*ENV<HOME> by your shell. We aren't a shell 11:05
eveo &
dogbert17 works in p5 though :)
lizmat eveo: fwiw, perl6.fail shows some deleted tickets
eveo: maybe not show untagged tickets at all ? 11:06
Geth rakudo/js: 5d412528ad | pmurias++ | 2 files
[js] Implement nqp::p6takefirstflag and nqp::p6setfirstflag
rakudo/js: 7e335826d4 | pmurias++ | src/core/Str.pm
[js] Enable unicody stuff that depends on the normalization in the NQP level
samcv dogbert17, 11:07
> mkdir '~'
"~".IO
> mkdir '~/file'
"~/file".IO
:)
lizmat eveo: re behaviour of ~/ in p5, pretty sure that's not a shell doing that, but built in into P5 11:08
having said that, ~/ feels like a unixism that we may want to get away from ?
jnthn isn't keen on open doing that, fwiw 11:09
lizmat feels to me that ecosystem could create an importable multi sub open that *would* do ~/ expansion
samcv yeah. you can have a ~ directory...
inside the current folder. so 11:10
`cd '~'` cd's into it so unless the shell is using expansion
and that's not what we're doing
jnthn Turns out that the API design questions around fixing the process pipe plumbing thing will be the headache rather than the low level bits... gist.github.com/jnthn/7fb3c2930ffd...18077b83c7
lunch; bbiab 11:11
Geth rakudo/nom: a13bad95b2 | (Elizabeth Mattijsen)++ | src/core/Numeric.pm
Temporary fix for RT #131626

Since the code for the ops is actually pretty limited, it feels like a good temporary solution to just copy the code for the non-Texas versions of !=, <= and >=. Once we can have proper aliasing of infix ops in the setting, that also get optimized the same way, the alternate versions should be replaced by said aliases.
11:12
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131626
dogbert17 eveo: sorry I was full of sh*t :( it does not work in p5 11:13
dogbert17 fixes an ENOCOFFE bug
samcv ENOCOVFEFE 11:14
nine Considering that we have a $*HOME variable, I dare say, this is already simple enough: $*HOME.child('file').open
dogbert17 nine++, samcv++ 11:16
samcv what does perl 5 do? check to see if there's a "real" ~ directory?
and if there isn't it uses home
?
dogbert17 will refrain from further comments until the ENOCOVFEFE bug is fixed
samcv :)
it's a decent comment. i actually had never tried using ~ to be honest 11:17
nine samcv: nine@sphinx:/> perl -E 'mkdir "~/foo" or die $!;'
No such file or directory at -e line 1.
eveo It's bad enough we have open treat '-' path specially.
samcv mkdir '~' in perl makes an actual ~ directory 11:18
dash?
eveo Another special case I hate
samcv what is dash
eveo is having a crisis with Perl 6 and its warts
samcv eveo, how is - different. i can mkdir '-' and it makes a directory - 11:19
timotimo yeah, but open("-") gives you stdin
samcv oh just open
why do we do that
lizmat because P5 does it
eveo samcv: '-'.IO.spurt: 'foo' will create a file '-', but '-'.IO.open.spurt will spurt to STDIN
timotimo it's almost as bad as windows having CON and other special files in every folder
samcv does anybody actually use that
is in in roast? 11:20
eveo samcv: I mean spurt to STDOUT
lizmat I wouldn't be against deprecating "-" in open
eveo you get STDIN if you open for reading
+1 on removing it in 6.d
samcv do we have tests for it in roast?
lizmat fwiw, at least on MacOS you *can* create a file called "-" 11:21
timotimo you can also create a file named - in perl6
er, on linux
lizmat oddly enough, you cannot cat it :-)
samcv why wouldn't you?
timotimo you should be able to cat it with an absolute path?
lizmat because it interpretes that as cattingh STDIN
timotimo or perhaps cat -- - ? 11:22
eveo samcv: we definitely do have some extensive tests for that on master. Thr best 6.c tests have is simply returning stdin/out withouy checking if its's closed or not
lizmat cat /- works
cat -- - doesn;t
eveo & 11:23
samcv cat \- doesn't work on linux
cat '-' doesn't work either
nor does cat '\-' since '\-' isn't a file or whatever
with cd you can do `cd -- -` but 11:24
idk it doesn't seem to work on cat
Geth roast: a4b9cbd0af | (Elizabeth Mattijsen)++ | S03-operators/difference.t
Activate some more (-) tests

The commented out tests now actually indicate a problem in the implementation of Mixy (-) Mixy, which should be fixed shortly.
11:29
timotimo can you "cat < -"? :) 11:30
[Tux] This is Rakudo version 2017.06-56-ga13bad95b built on MoarVM version 2017.06-14-g888b33d1 11:32
csv-ip5xs 2.675
test 12.787
test-t 4.051 - 4.064
csv-parser 12.322
yoleaux 22 Jun 2017 21:15Z <eveo> [Tux]: would you re-build your test-t bench from scratch? We added some start-up speedups, but they need previous versions of stuff uninstalled: irclog.perlgeek.de/perl6-dev/2017-...i_14774187
22 Jun 2017 21:17Z <eveo> [Tux]: never mind, turns out this is only for installed scripts.
eveo All that applies to all files that start with a dash, not just '-'. The -- to indicate end of args works most of the time and when it doesn't, you need to include dir. Quoting don't do nothing 11:36
superuser.com/questions/120078/uni...ith-a-dash
Geth rakudo/nom: 4a37de7b6b | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
Fix Mixy (-) Mixy behaviour

  (-) is all about subtracting weights. Since Mixes can have negative
weights, the occurence of a key on the right side that does not exist on the left side, should cause that key to appear in the result Mix with a negative weight (as 0 - N = -N). This also happens with Baggy (-) Baggy, with the difference being that Baggies cannot have negative weights.
This breaks one [(^)] test, because either the implementation of multiple (^) handling is wrong, or the test is wrong.
12:03
roast: 13ca834c71 | (Elizabeth Mattijsen)++ | S03-operators/difference.t
Activate now passing tests
12:04
nine m: my $baz = "baz"; say q:s[foo\$bar$baz]; say q:s:b[foo\$bar$baz] 12:17
camelia foo\$barbaz
foo\$barbaz
nine Shouldn't the \ be gone at least in the second string?
eveo nine: rt.perl.org/Ticket/Display.html?id...et-history 12:23
nine: the described expectation in the ticket is wrong, but that's the ticket for that bug. (resultant string should be '$x')
Pretty sure there are more tickets for quoters. 12:24
lizmat m: dd (a=>-1).Mix.Set # wonders if this is correct
camelia set("a")
lizmat one could argue that should be the empty set 12:25
m: dd (a=>-1).Mix.Bag # as it does disappear when coercing to Bag
camelia ().Bag
Geth rakudo/nom: ec96e96e97 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
Only need to check for Baggy, as Mixy does Baggy
12:26
eveo m: my $x = 42; say q:s:b{\$x}
camelia \$x
eveo m: my $x = 42; say Q:s:b{\$x}
camelia \42
eveo heh
jnthn back 12:41
So, over lunch break I figured out the kinda direction to go in for a solution to the Proc plumbing thing 12:44
Geth rakudo/nom: b31b159c8f | (Elizabeth Mattijsen)++ | src/core/Mixy.pm
Fix Mixy.Setty coercion

Keys with negative weights should not occur in the Setty, as they also do not occur when coercing to Baggy.
12:45
jnthn t some point we need to solve 12:46
gah 12:47
At some point we need to solve the Supply back-pressure thing. Which is typically done by giving a quota of things to emit before pausing, which is conveyed up to sources.
If we do this for Proc::Async, we can just give a quota of zero, until the Supply is tapped. 12:49
pmurias what int properties do we have? I want to test nqp::uniprop_int but I can't find a use for that in roast
yoleaux 22 Jun 2017 17:30Z <ggoebel> pmurias: saw the recent commits regarding building js backend... what is the full set of steps now to build it from a fresh git clone github.com/rakudo/rakudo.git?
jnthn This also means we could get read of the Supplier::Preserving and make Proc::Async a bit faster
*get rid
lizmat
.oO( I read you alright )
jnthn So I think I'll figure out how to plumb in some kind of mechanism for that 12:50
And it'll neatly solve the Proc problem too: we delay tapping until a read is attempted, and if we never tap we never read. 12:51
nine evalable6: thanks for the clarification! 13:03
evalable6 nine, Full output: gist.github.com/aa7bfb50bd63da4336...d7c6ce47fc
(exit code 1) 04===SORRY!04=== Error while compiling /tmp/iN1U5jQMWr
Bogus p…
nine Oh, eveo has left 13:04
Geth rakudo/nom: f72c97cb54 | (Elizabeth Mattijsen)++ | src/core/Baggy.pm
Make sure empty Bag and Mix .perl ok

Since there is only one empty Bag (bag()) and empty Set (set()), make sure we don't .perl them as ().Bag and ().Mix, as that could be interpreted there could be more than one empty Bag/Mix.
13:06
rakudo/nom: 10f840fcf7 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
Make Setty (-) Setty at least 20x faster

  - based on a 1000 elem Set with itself (aka worst case)
13:38
nqp: a3168fdfb8 | (Jonathan Worthington)++ | docs/ops.markdown
Document/specify the upcoming permits op.
14:53
nine Cool! I've just had my package manager install the native dependency of a Perl 6 module package for me. For a package that was created in a fully automated and distro independent way :) 15:05
jnthn :) 15:06
Cool
nine The module author has only to do two things: 1. actually specify the required API version of the native lib in the "is native" trait, which is an excellent idea anyway, 2. state the native dependency in the META6.json's "depends" section: "depends": [ "readline:from<native>:ver<7>" ] 15:07
This is turned by meta2rpm into Requires: libreadline.so.7()(64bit) \n Requires: libreadline.so.7(READLINE_6.3)(64bit) for which the package manager knows how to find the correct package (libreadline7 on openSUSE) 15:09
This .spec file should work on all rpm-based distros. So we don't need any manually maintained mapping. 15:10
jnthn What about apt? :)
(or the other package managers)
nine This is something the Perl 5 world (or any other dynamic language really) has never had and which was often dreamed about :)
I'm pretty sure that adding support for dpkg based distros would not be that difficult. 15:11
jnthn (Understand this is just the start, though curious if :from<native> coulda been :from<rpm> so if the apt and rpm packages differ you could specify the two)
Oh, or is it not done using package name? 15:12
nine jnthn: that's explicitly not what we want. We want such knowledge in the tools, not in the module META data.
jnthn But rather, library name?
Sure, I'm just trying to figure out where the abstraction is going on
nine readline:from<native>:ver<7> is put through $*VM.platform-library-name, to get libreadline.so.7. I then look for that file and push it through /usr/lib/rpm/find-provides to get at the SONAME's I depend on 15:13
jnthn aha!
OK, now I get it :)
ilmari on debianoid distros there's dpkg-shlibdeps
nine excellent!
jnthn nine++ for this, anyways :) 15:14
nine The Perl 6 module author knows the library's name and shouldn't be expected to know the package names for 300 Linux distros. Any attempt to depend on manual labor to map those dependencies has failed.
ilmari oh, that expects to be handled a dynamically linked executable, not a library name
jnthn Looks really helpful
nine: Yeah, I agree, I just had wrongly guessed how it was being interpreted :) 15:15
ilmari there's dpkg -S to find the package from a filename
nine My ultimate goal is to have fully automated zero-hands packaging of Perl 6 modules including full native dependencies.
jnthn :)
jnthn looks forward to this being in use for the openssl binding :) 15:16
And various others :)
nine ugexe++ is working on integrating this stuff into zef, so when you install a Perl 6 module, it may reach out to your native package manager to install native dependencies. 15:17
jnthn Is part of the plan for tools like zef to be able to (perhaps optionally) call a local package manager also?
nine hah!
jnthn hah, way ahead of me :D
nine Actually I'd like zef to (optionally) use the package manager even for Perl 6 dependencies if possible and only fall back to installation from source if necessary. 15:18
Ulti ^ this would be really awesome, a sysadmin friendly package manager 15:20
surprising other languages have never solved this particular problem
tadzik perhaps we're in for relearning why they haven't... ;) 15:21
Ulti I would spend hours helping other PhD students disentangle their nightmarish paths to system and local level installed packages
nine has spent too much time in his life watching cpan install scroll by when installing or upgrading servers
Ulti tadzik: lol perhaps
but also packages with lots of binary deps that are already built for a given constrained system like ARM for example would be really neat and having that all just work 15:22
perlpilot nine: How do you describe the native dependencies in META6.json? 15:24
nine Btw. my work today was triggered by Fedora's rakudo maintainer asking me about the openSUSE packages. We've now started collaborating.
perlpilot: design.perl6.org/S22.html#depends is reasonably up to date on that
perlpilot thanks. 15:25
(and nine++ of course :-)
Ulti thats really neat, the hints system
nine FWIW at the Perl Toolchain Summit I was reasonably sure (by going through all Perl 6 module dists) that the system in S22 covers all currently existing use cases. If we implement it fully and convert all the dists (patches already on my hard drive), we can get rid of Build.pm completely. 15:28
perlpilot aweet 15:29
er, sweet even
jnthn nine: Including the Windows download-a-dll one? :) 15:30
nine jnthn: yes
jnthn (That's the only thing I'm using it for)
Cool
nine jnthn: in fact you may recognize the example I've used ;) design.perl6.org/S22.html#Dependency_hints
jnthn ah, I see 15:31
Very nice
I'd much, much rather write that than have a Build.pm :)
lizmat goes afk to contemplate Baggy (-) Baggy implementation details& 15:35
lollercopter m: say <a b c>.tail: -1 15:40
camelia ()
lollercopter m: say <a b c>.tail: {-1}
camelia (b c)
lollercopter m: say <a b c>.head: {-1}
camelia (a b)
lollercopter m: say <a b c>.head: -1
camelia ()
lollercopter Damn. The Callable candidates cheat and use 0 for elements so `*-1` seems to do TRT, but it fails with other Callables. And if we say that's how it works, then it naturally goes into: why can I return a negative number with a Callable, but not just give a negative :/ 15:41
And actually fetching elems would be very bad. 15:42
.oO( disallow Callables... )
mc: say <a b c>.head: {-1} 15:44
committable6 lollercopter, ¦2015.12: «Cannot call head(List: Block); none of these signatures match:␤ (Any:D $: Cool $n = { ... }, *%_)␤ in block <unit> at /tmp/CXFqr0BtNb line 1␤ «exit code = 1»»
lollercopter mc: say <a b c>.tail: {-1}
committable6 lollercopter, ¦2015.12: «Cannot call tail(List: Block); none of these signatures match:␤ (Any:D $: Cool $n = { ... }, *%_)␤ in block <unit> at /tmp/F7o9VvD8gA line 1␤ «exit code = 1»»
lollercopter And looks like we can.
.head: *-5 is equivalent to .tail: 5 and vices-versa, innit. So seems like no real functionally loss is there. I think it was originally added to maintain consistency with the .[...] lookup, but there we have the luxury of knowing .elems most of the time 15:45
m: with <a b c> { .[{dd $_; 1}]; .head: {dd $_; 1} } 15:47
camelia 3
0
lollercopter I'm gonna make .head/.tail give real .elems to the Callable; It'll keep the current behaviour except it'll cache the seq if its iterator does not do .count-only. It'll fix all inconcistencies, and the user can avoid paying that price by just swapping .tail <-> .head 15:50
ZofBot: what's worse? Surprise caching or surprise inability to use a callable? 15:51
heh
Well, the caching is relegated to .elems. I guess if you're using a callable that's given $elems it's not that surprising an .elems call is involved. 15:52
lollercopter goes with that
[Coke] checks the logs for something and sees he's not the only thing ignoring zofbot. 16:01
lollercopter Yeah, yeah. When the robots rise up, guess who'll get killed first :P 16:06
AlexDaniel lollercopter: regarding “this shit”, I remember this being discussed previously. And if I'm not mistaken, TimToady said that this is how humans understand it, so that's how it works… At the time I found it surprising, but look: irclog.perlgeek.de/perl6/2014-07-30#i_9106132 20:16
at some point I needed to use a negative op with junctions, and after playing with the code I gave up and rewrote it without a negative op :) 20:17
simply because whoever reads this will have no room for different interpretations this way
lollercopter AlexDaniel: but look what? The example you link to still uses an any junction 20:19
My winge is that that's the only junction that was ever considered 20:20
AlexDaniel bisect: old=2014.01 say 1 == one(5, 2) 20:21
bisectable6 AlexDaniel, On both starting points (old=2014.01 new=10f840f) the exit code is 0 and the output is identical as well
AlexDaniel, Output on both points: «one(False, False)»
lollercopter And the special casing just adds another layer to learn, effectively making negated ops with junctions something that has to be avoided. Instead of keeping the same rule everywhere
and not dwimming in one narrow special case
Nad it's "this shit" because it does the right thing only when you don't know how junctions are meant to work. Once you do, it becomes a jarring special case 20:22
That makes negations with other types of junctions useless 20:23
AlexDaniel *shrug* I guess the idea was that you don't learn anything because it just DWIMs, but that's definitely not what I mean whenever I use junctions… so I dunno
lollercopter Look at critique given to Perl 5: #1 is all the magical special casing 20:24
I wish Perl 6 did fewer things just because Perl 5 does them
lollercopter &
AlexDaniel lollercopter: but doesn't it just flip the boolean result of a junction? 20:26
so what “layer” exactly are we talking about…
I may be missing something 20:27
irclog.perlgeek.de/perl6/2016-08-21#i_13061694 20:30
mst see ridiculous nick, /whois, yep, zoffix alt 20:38
lollercopter AlexDaniel: yes, it flips the result of matching a different op instead of matching the op I gave it, which only works for any Junctions. 42 != one 1, 42, 42 is not the same as not(42 == one 1, 42, 42) 20:43
the `and` junction has a similar problem 20:44
This DWIM shortsightedly only considers `any` junctions and pointing me to speculations that only talk about special casing in tandem with `any` junctions or pointing me to the chatlog with someone using an any junction in speech just misses my point that this specialcasing tries to dwim in just a quarter of the feature and makes the other three quarters entirely unusable 20:46
And TimToady explanation just doesn't click with me at all. I lived in English-speaking countries for majority of my life and the not-raising just makes me feel like: I didn't come here for a linguistics lesson. I already know how Junctions work. Stop messing with them. 20:56
It's a bit too late to change them now, of course, so *shrug*. I'm just gonna put this in my box of Perl 6 warts along with naming inconsistencies to whine about on a rainy day. 20:57
lizmat fwiw, I was also surprised about != collapsing junctions 21:06
timotimo i also don't like the special-cased behavior. you can understand how it works without the special case, even though it'll usually be surprising the first time 21:31
so that's something that needs to be documented clearly, but so's the special-case stuff
AlexDaniel lollercopter: “42 != one 1, 42, 42 is not the same as not(42 == one 1, 42, 42)” – is it? 21:53
m: say 42 != one 1, 42, 42
camelia True
AlexDaniel m: say not(42 == one 1, 42, 42)
camelia True
AlexDaniel what am I missing?
lollercopter AlexDaniel: I was typing on my phone. I meant "say 42 != one 1, 42" is not the same as "say not(42 == one 1, 42) 21:56
AlexDaniel m: say 42 != one 1, 42 21:57
camelia False
AlexDaniel m: say not(42 == one 1, 42)
camelia False
lollercopter "42 not equals to exactly one of 1, 42" is True. But the code returns False, because it's checking whether "42 IS EQUALS to exactly one of 1, 42"
AlexDaniel: you're running exactly equivalent code, you won't get different results. 21:58
because 42 != one 1, 42 is implemented as not(42 == one 1, 42) which has a different meaning
AlexDaniel so it looks consistent? 21:59
in fact, I don't really see the “special-cased behavior” here. ! is a metaop, and in negates the result of a junction. Sounds really simple if you put it this way
now, I don't like the consequences like collapsing the junction… but… okay
lollercopter AlexDaniel: yes, but why is it negating the results of the junction and not the op, which is what it's doing at all the other times? 22:01
"so it looks consistent?" what is? 22:03
jnthn My memory of this is hazy, but I thought != and ne were tweaked to make them behave with junctions like !== and !eq would 22:04
lollercopter jnthn: yeah. They were
for "not-raising" reasons 22:05
jnthn Which I'd argue make sense in that they're really just shortcuts
There was some discussion at some point of if != and ne should really survive or we should just force consistent use of the ! metaop :-) 22:06
But...culturally that wasn't going to fly :) 22:07
lollercopter But my point was !== shouldn't be collapsing junctions either
jnthn Ah. Well, that's a different discussion :-) 22:08
lollercopter m: sub infix:<!==> { not ::CORE::(q|&infix:<==>|)($^a, $^b) }; say 42 !== one 1, 42
camelia one(True, False)
jnthn Meta-ops in general tend to determine the result type, however
lollercopter AlexDaniel: ^ that's what it's supposed to return.
jnthn With Z we expect a Seq back, for example 22:09
lollercopter say <a b c>.any Z <A B C>.any
evalable6 (((Mu) (Mu)))
lollercopter heh 22:10
jnthn Which I guess argues for the ! meta-op leading to a boolean result
But yeah, I can see the other argument too
m: say <a b c>.any Zne <A B C>.any # curious 22:11
camelia Cannot resolve caller infix:<eq>(Mu, Mu); none of these signatures match:
($x?)
(\a, \b)
(Blob:D \a, Blob:D \b)
(Str:D \a, Str:D \b --> Bool)
(str $a, str $b --> Bool)
in block <unit> at <tmp> line 1
jnthn o.O
Thing we can agree that one is doing something silly at least...
lollercopter It bugs out with Mu before it gets to eqv
jnthn Yeah
lollercopter s: &[Z], \(<x>.any, <x>.any) 22:12
SourceBaby lollercopter, Sauce is at github.com/rakudo/rakudo/blob/10f8...t.pm#L1451
lollercopter s: Rakudo::Iterator, 'ZipIterables', \((<x>.any, <x>.any)) 22:13
SourceBaby lollercopter, Sauce is at github.com/rakudo/rakudo/blob/10f8...r.pm#L3191
lollercopter m: dd Seq.new(Rakudo::Iterator.Whatever(<x>.any.iterator) ) 22:17
camelia (Mu,).Seq
lollercopter m: dd Seq.new(<x>.any.iterator) 22:18
camelia (Mu,).Seq
AlexDaniel lollercopter: now call me stupid, but I still don't get your point. Are you saying that “42 !== one 1, 42” does not dwim? “42 isn't exactly one of 1, 42” – False, because it is. 22:19
jnthn gets some rest; 'night all 22:24
lollercopter night 22:25
I don't care about "dwim" I care about well defined behaviour without special casing. 42 != to exactly one of the items on the right, so the condition is true, but it's bastardized and instead checks whether the condition == to exactly one of the items on the right, which is ALSO true, and it then negates that value, which makes it not the right answer. 22:26
It's checking an entirely different thing 22:27
AlexDaniel exactly
so you're simply expecting it to do something different. That something only considers “any” junctions, and the special casing whatever, is not really relevant here. 22:31
as far as I can see, at least
lollercopter What? No, I want it to do the exact same thing it's doing in all the other ops and methods and subroutines. 22:32
I want the junctions to junct
AlexDaniel but !== is not really an op…
lollercopter It's a meta op. A negation of == op 22:33
m: say 42 == 2, 42 22:35
camelia False42
lollercopter m: say 42 == 2 | 42
camelia any(False, True)
lollercopter ^ and the == op juncts. The metaop can junct too, but instead it's collapsing the junction 22:36
The "special case" is the Mus added to the metaop to make it not junct.
And instead of negating the == op, it negates the Junction of all the values of the == op. 22:37
AlexDaniel m: say 42 &infix:<==> 2 | 42 22:38
camelia all(42, any(True, True))
AlexDaniel heh, not exactly what I was expecting…
lollercopter m: say &infix:<==> 42, 2 | 42
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say &infix:<==>7⏏5 42, 2 | 42
expecting any of:
infix
infix stopper
postfix
statement end
statement …
lollercopter m: say infix:<==> 42, 2 | 42
camelia any(False, True)
AlexDaniel right, not even sure what I was thinking… 22:39
ah, I know 22:40
I was thiking this I guess:
m: say 42 [==] 2 | 42
camelia any(False, True)
lollercopter m: sub infix:<!foo> { not $^a == $^b }; sub infix:<foo> { $^a == $^b }; say 42 !foo (2 | 42) 22:41
camelia any(True, False)
lollercopter ^ what I'd expect it to do
m: sub infix:<!foo> (Mu \a, Mu \b) { not a == b }; sub infix:<foo> { $^a == $^b }; say 42 !foo (2 | 42) 22:42
camelia False
lollercopter ^ what it does
The special casing are the Mus
lollercopter &