# IRC log for #p6dev, 2016-04-03

All times shown according to UTC.

Time Nick Message
02:33 sortiz joined #p6dev
02:49 skids joined #p6dev
04:15 geekosaur joined #p6dev
07:27 RabidGravy joined #p6dev
09:18 geekosaur joined #p6dev
11:19 dalek rakudo/nom: fd29b24 | lizmat++ | src/core/ (16 files):
11:19 dalek rakudo/nom: Make grep a frontend of where
11:19 dalek rakudo/nom:
11:19 dalek rakudo/nom: Inspired by https://gist.github.com/0racle/ea0523759e2da15758d4 .
11:19 dalek rakudo/nom:
11:19 dalek rakudo/nom: Remembering my first exposure to Perl and Unix, I never understood
11:19 dalek rakudo/nom: what "grep" meant: "find" was always more natural to me, but of course
11:19 dalek rakudo/nom: that meant something else in the Unix world already.
11:19 dalek rakudo/nom:
11:19 dalek rakudo/nom: Since we already use "where" and not "grep" for subtypes, it only
11:19 dalek rakudo/nom: seems natural to use "where" instead of "grep".
11:19 dalek rakudo/nom:
11:20 lizmat the commit is https://github.com/rakudo/rakudo/commit/fd29b24939bcb565a
11:20 lizmat spectested clean, fwiw
11:21 lizmat 0racle++ for getting this on the road  :-)
11:21 timotimo wait, we're getting "where"?
11:21 timotimo i thought we were 100% NOPE on that suggestion?
11:21 lizmat we were ?
11:21 timotimo "we don't know something that's 100% the same as another thing", i thought
11:22 psch having both definitely seems weird
11:22 lizmat well, let me put it this way: .grep cannot be removed until we have a looong deprecation cycle
11:23 timotimo er, not "know", "want"
11:23 lizmat well, it wouldn't be the first commit of mine to be reverted  :-)
11:24 psch i mean, i like the sentiment.  grep is really just a *nix-ism that we don't need to be tied to
11:24 psch i just don't know if the deprecation cycle can ever finish, seeing as it's so culturally ingrained
11:25 lizmat well   visually the o's in looooong have some feel of infiniity in them  :-)
11:25 lizmat using .grep incurs a small overhead now  :-)
11:26 timotimo i actually like that grep can be easily verbed, whereas where can't
11:30 lizmat .oO( I whered it )
11:30 psch "don't you mean 'was'?"
11:32 lizmat .oO( the items wheren't there )
11:48 masak I'm mostly "meh" about adding where as a method. it makes the where of subtypes and parameter narrowing more confusing, since it's really a different thing.
11:49 masak but I think things like that, targeting the most core parts of the everyday API, shouldn't be added without enough deliberation and discussion
11:50 dalek rakudo/nom: 868d8b4 | lizmat++ | src/core/ (16 files):
11:50 dalek rakudo/nom: Revert "Make grep a frontend of where"
11:50 dalek rakudo/nom:
11:50 dalek rakudo/nom: This reverts commit fd29b24939bcb565a88292a5456483c3393d7cea.
11:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/868d8b4470
11:51 masak lizmat++ # quick turnaround :)
11:52 lizmat :-(
11:52 masak if I were interested in adding synonyms for "where", I would probably recommend "filter", which has a lot of prior art and which people would probably recognize for what it is
11:52 masak "filter" is a verb
11:53 lizmat "* jnthn is glad we got something a bit shorter than filter, without having to abbreviate )"
11:54 masak well, I'm not jnthn. :)
11:55 lizmat and you're not pumpking :-)
11:55 [Coke] -1 on .where for .grep from me. Yes, I also thought it was mostly nope from the core devs on that one.
11:56 masak lizmat: no, I don't claim any authority on this.
11:56 [Coke] ... and it was reverted on the next page of scrollback.
11:56 masak I just had to search for a few minutes to re-remember what Ruby chose for this word. "select" :/
11:56 masak (and "reject" for negative grep, which is perhaps the only redeeming feature of that naming decision)
11:58 timotimo .keep-only-matching
11:58 lizmat let's stop this discussion: core devs (other than me) were apparently NOPE on this
11:58 lizmat I must have missed that
11:59 lizmat if either jnthn or TimToady decide it was a good idea after all, there's a revert to revert
11:59 masak I don't see why "let's stop" would be necessary -- but I'll shut up about it now
11:59 lizmat because this is quickly devolving into bikeshedding
12:00 timotimo also, there's a possibility that discussing this further could negatively impact liz' mood, which i also wouldn't like
12:00 lizmat I thought 0racle++ made a good point in https://gist.github.com/0racle/ea0523759e2da15758d4
12:00 timotimo not saying that's what's going on, but i think it should be considered, at least in the back of your head :)
12:00 lizmat especially about the 7 year old girls part, which rang so true with my first experience with Unix and Perl
12:01 lizmat my mood for today is already negatively impacted... so you don't have to worry about that
12:01 lizmat I'll go cycling in a little while and feel better after that
12:02 timotimo p6-wig also gives you .where, which is a good step in that direction
12:03 lizmat if you think that is a good step, why not have it in core then ?
12:04 timotimo in my day-to-day life and conversation with like-minded friends, i already use "to grep" and "grepping" as a regular word :S
12:04 lizmat "like-minded" sounds very echo-chambery to me
12:04 timotimo that's true
12:04 timotimo having the functionality duplicated still feels "smelly" to me, but throwing out grep would, as you pointed out, require a really long deprecation cycle
12:05 lizmat cycling&
12:10 psch #126527 is weird :/
12:12 psch wrt .where, the deprecation cycle is what concerns me most as well
12:13 psch and lots of long-term *nix users might just consider that another change for the sake of change, and i don't know if there'd be enough 7 year old girls to refill the potential loss in user base there
12:14 psch as in, i like the change, but i think inertia is already a concern now
12:47 awwaiid hoelzro: are you doing any active work on the REPL? I've been playing with moving the looping, reading, and printing bits in there (into REPL.pm instead of the nqp Compiler.nqp and rakudo Compiler.nqp) and it's starting to look promising.
12:58 awwaiid on this "where" discussion, ruby interestingly has select and find_all implemented identically, and are what we call grep. They additionally have 'grep' which does a === match (so typically passed a regex) and takes an additional block that works like a .map of the matching entries.
13:01 awwaiid side note: Go to http://ruby-doc.org/core-2.3.0/Enumerable.html and mouse-hover over a method entry like grep. You will see a "click to toggle source" button in the upper-right corner. Click that sucker to see the top-level implementation (either in C or Ruby). Works on all the ruby-doc.org stuff -- pretty sweet.
13:03 awwaiid though in ruby land ActiveRecord (and ORMs across all the lands) often use .where, though I suppose that context should in theory be pretty clear
13:09 timotimo i'd almost say we should call it .keep
13:09 awwaiid ooo. nice and short
13:09 timotimo though on second thought that sounds more like a mutating method perhaps
13:09 awwaiid ah.
13:09 timotimo @foos.keep(* < 5) really does read well
13:09 awwaiid maybe this is why the Great Unixers invented a new word :)
13:11 awwaiid too bad 'take' is taken :)
13:12 masak 'keep' sounds like it'd mutate for some reason
13:14 awwaiid 'take', 'gather', 'keep', 'choose', 'adopt', ... . Alright, me being a thesaurus is probably not helpful. Time to walk the dog and get breakfast!
13:15 timotimo if we can use lojban spelling, we could spell "choice" as "cois"
13:15 timotimo that's the same length as "grep" and "keep"
13:15 timotimo choose would be even shorter as "cus"
13:15 psch ...i don't think length is the concern
13:15 timotimo jnthn said he's happy we have something shorter than "filter"
13:16 timotimo and that's just 2 additional characters compared to grep. choose is the same length as filter
13:18 psch jnthn also said "we don't two ways to do the exactly the same thing"
13:18 psch which points back at actually deprecating grep being the concern
13:19 psch at least that's how i see it
13:19 psch and i think that's just way to much fallout for far too little gain
13:24 psch well, jnthn said it grammatically correct... :)
13:25 psch btw, i find it humorous that this issue has already been described as bikeshed the day before yesterday here:
13:25 psch http://irclog.perlgeek.de/perl6/2016-04-01#i_12270384
13:25 psch and just to be clear: i'd welcome an authorative decision that says we're deprecating .grep for .where
13:52 psch m: my \it := [[2,3],[4,[5,6]]]>>.squish[0][2]; "$_ ".print for IterationEnd.WHICH, it, it =:= IterationEnd 13:52 camelia rakudo-moar 868d8b: OUTPUT«Mu|60166368 Use of Nil in string context in block at /tmp/52phNs24bW line 1␤ False » 13:52 psch$ ./perl6-j -e'my \it := [[2,3],[4,[5,6]]]>>.squish[0][2]; "$_ ".print for IterationEnd.WHICH, it, it =:= IterationEnd' 13:52 psch Mu|679099929 Mu<679099929> False 13:52 psch i think that's behind #125577 13:54 psch m: my \it := [[2,3],[4,[5,6]]]>>.squish[0][2]; "$_ ".print for IterationEnd.WHICH, it.WHICH, it =:= IterationEnd # clearer
13:54 camelia rakudo-moar 868d8b: OUTPUT«Mu|62607680 Nil False »
13:54 psch now how does the Iterator API actually work... :)
14:08 awwaiid my wife suggested 'vet' and 'sift' when I was trying to describe this to her :)
14:09 timotimo sift is a beautiful word, but is it obvious? :\
14:09 timotimo grep isn't obvious at all, so sift probably wins that by default
14:18 TimToady I really don't think we're changing anything here; 'where' in particular has no current auto-iterative meaning, it's only used where something external is looking for a boolean smartmatch, so that would be confusing to overload
14:18 TimToady and I don't buy the etymological fallacy that just because grep used to mean something else, it means only that today
14:19 TimToady and everyone is acting like they're bored :)
14:22 timotimo btw, if anybody cares, the "lines" version of this benchmark https://github.com/tbrowder/perl6-read-write-tests/blob/master/read-file-test.pl6#L46  spends about 16% of its time all-in-all gc_mark-ing an Array object; i think we're keeping around a gigantic amount of these lines rather than going through them sequentially for some reason
14:22 timotimo we don't have a "batching" thing in place there yet perhaps?
14:39 awwaiid what does "my \$*AUTOPRINTPOS := nqp::tellfh(nqp::getstdout());" mean? I'm trying to understand method autoprint in nqp/src/HLL/Compiler.nqp
14:40 awwaiid mmm. I guess tellfh gets the file pos. so this snapshots it and then doesn't print if something else has been printed.
14:40 awwaiid ok, answered my own question, thanks
14:58 * geekosaur wonders how well that works on something without a seek position
16:19 Ven joined #p6dev
16:25 hoelzro awwaiid: I'm doing a bit of cleanup atm and allowing the user to select their preferred line editor
16:27 awwaiid hoelzro: what sort of cleanup? I'm making pretty good progress I think. Well I should be able to incorporate any of your cleanup well enough
16:27 hoelzro awwaiid: well, I moved the line editor role mixin stuff into their own functions for now, for example
16:28 awwaiid ah nice
16:29 awwaiid I'm transferring functionality from nqp/src/HLL/Compiler.nqp -> src/Perl6/Compiler.nqp and then src/Perl6/Compiler.nqp -> src/core/REPL.pm, so that the main loop { read; eval; print } lives directly in REPL.pm . I think that doesn't conflict with the role mixins at all
16:30 hoelzro cool =)
16:31 awwaiid I'm in the middle of some destruction at the moment, but when I get it stable again I'll push the branch
16:34 masak TimToady is right -- surely we have something to energize us much more than a bikeshedding?
16:36 hoelzro awwaiid: cool, let me know!
16:40 awwaiid hoelzro: when you are devving this you just run 'make' in rakudo over and over and it takes like 1 minute each time, right? Any edit/compile/test shortcut I should be using?
16:41 hoelzro awwaiid: I revert -n this commit while I'm working: f7d1c4b
16:41 hoelzro and set PERL6LIB=src/core
16:41 hoelzro that way, you don't need to make to load your changes
16:42 hoelzro I want to add a RAKUDO_REPL_MODULE env var to add the same functionality, but I have some concerns about how to do that securely
16:42 awwaiid that works when you make changes to REPL.pm but not src/Perl6/Compiler.nqp, right?
16:42 hoelzro yes
16:42 awwaiid ok cool
16:55 hankache joined #p6dev
17:18 Ven joined #p6dev
17:28 Ven joined #p6dev
17:48 Skarsnik joined #p6dev
17:57 pmurias joined #p6dev
17:59 pmurias re grep/where having both seems inferior than having just grep
18:01 pmurias I'm might be biased in terms of UNIXisms as I was introduced to unix/perl at the same time and both seemed awesome
18:34 Ven joined #p6dev
18:39 hankache_ joined #p6dev
18:57 timotimo damn, i made a mistake
18:57 timotimo the part where we spend so much time in gc_mark isn't lines, it's slurp
18:59 timotimo https://github.com/tbrowder/perl6-read-write-tests/blob/master/read-file-test.pl6#L63  -  in this case it doesn't surprise that we'd be marking a gigantic array
19:27 * lizmat is back from cycling
19:28 lizmat without starting up the .where discussion again, I would like to do a post-mortem as far as I'm concerned
19:28 lizmat - I had completely missed the discussion that had led to the NOPE verdict
19:29 lizmat I was under the impression that we would have this type of discussion on #p6dev rather than #perl6
19:29 lizmat I don't backlog #perl6 anymore: when I'm online I sort of follow it, but when I'm not, I'm not
19:29 lizmat I also understand that these discussions may happen at places where we don't expect them
19:30 lizmat I would therefore suggest that *if* we have such a discussion on a place other than #p6dev, someone should at least put a link to the discussion on #p6dev
19:31 lizmat this would saved us a lot of hassle
19:31 lizmat having missed the discussion, I thought the gist / PR had just been warnocked
19:32 lizmat - the argument that this can live in module space, I think is basically void
19:32 lizmat as far as I understand precomp, any module that does an augment, can not be used by a module that is precomped
19:32 lizmat nine jnthn is that assertion correct, or am I having a brainfart here ?
19:33 lizmat - this whole thing was about .where as a synonym for .grep
19:33 lizmat as far as I was concerned, there was never a question of needing another name for grep
19:34 lizmat just that, since we have where for subtypes, it seemed logical to have it as a synonym for .grep to me
19:35 lizmat and remembering my confusion about "grep" when entering the Unix world ~22 years ago
19:35 lizmat I thought it would make sense for non-Unix newbies
19:36 lizmat and I guess there's a reason why languages as Ruby have things like "select" and "reject", instead of "grep"
19:36 lizmat - end of post mortem
19:36 skids joined #p6dev
19:36 timotimo lizmat: i'm not happy with the way i brought up my understanding of the issue when i saw that commit message :|
19:44 moritz if I wanted to implement TR///, how do I make it only available in v6.d?
20:41 lizmat moritz: afaik nine has a conceptual 6.d setting sitting in a branch
21:15 nine lizmat: I'm not sure either, but I guess things would really start to break when two precomped modules use the same class but one of them expects an augmented version and the other doesn't.
21:16 nine moritz: commit f6ea6553af39bf7b0a0e18bafc1ad46638b7c97e in the language_versions branch is an attempt at doing a v6.d setting
21:16 lizmat nine: I vaguely remember discussing this
21:16 nine +1 +1 +1 on posting important discussions on #p6dev
21:22 vendethiel- lizmat++: fwiw, I really appreciate that you're pushing terms easier to understand for non-unix-ers/unix newbies :)
21:22 vendethiel- it's most often confusing to me who hasn't been using that for 20 years :P
21:25 vendethiel- (even .uniq is)
21:25 lizmat vendethiel- : that's why it's called unique nowadays  :0)
21:25 lizmat :-) rather  :-)
21:27 vendethiel- yes, I remember bikeshedding to get that new name :P
21:28 vendethiel- it's good that we aren't locked up anyways, if someone wants to provide a module that re-verbs ours (use Ruby; :P), they can do that just fine!
21:28 vendethiel- .oO( but how long will it take for these 7 years old to learn UNIX? ) *g*