« first day (1817 days earlier)      last day (3146 days later) » 

11:00 AM
@R.MartinhoFernandes I kinda picked Powerline because it supports many stuffs. Also because I don’t really know what I want in a prompt, and I might as well just throw in some eye candy for the hell of it.
 
Powerline does prompt thingies too?
 
@GregorMcGregor You can put info there that would otherwise go in a prompt.
 
Pretty much all that it is about.
 
I guess that's the idea.
 
Always seen it as a vim status bar
 
11:04 AM
@LucDanton Oh, it's actually a prompt?
 
Or am I confusing
 
Not just a bar like in vim or tmux?
 
it has sprawled
> Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.
That’s not exhaustive. E.g. it modifies my fish.
doesn’t support NeoVim atm so I guess I only have it in my prompts/tmuxes :)
let’s see what it does to IPython
 
I don't have it on tmux anymore.
 
fuck yeah
@R.MartinhoFernandes my coworker has a powerline prompt I think
 
user1804599
11:11 AM
tmux is a joke
 
@LucDanton huh. Seems to work for me
 
@elyse Your joke is a joke.
 
@elyse why, I found it pretty nice
 
I use vim-airline maybe
 
@sehe It doesn’t do anything and I noticed an opened request, so I just assumed.
 
11:14 AM
All the "status line thingies" appear functional to (and the fonts are supported too, I read)
 
user1804599
@BartekBanachewicz I was just joking.
 
user1804599
tmux is amazing.
 
@elyse Are you bipolar? Or schizophrenic?
 
 
11:15 AM
DO WANT
SO WANT
MUCH
 
just occurred to me I haven’t upgraded in a while
 
I've never upgraded ;)
 
user1804599
@wilx No.
 
-10
Q: Bash or python programing

Sorcerer's ApprenticeHow to Write and execute a programme to record ping results to read and parse the text file generated and output the calculated average of the 'time' field

 
I'm so gonna steal ideas form them
 
user1804599
11:16 AM
For me it inserts <elyse@rightfold>.
 
user1804599
On my other machine it inserts <rightfold@gmail.com>.
 
@sehe What's that Sublime Text skin called?
 
5/10 nice troll
you say this every ~2 months
I've really not noticed many changes. The behaviour has changed somewhat, but I didn't spot any cocks nor mouths
 
@sehe I unbroke my install. For one, now it works in IPython. Not too sure what’s the deal with NVim, lots of messages.
 
@GregorMcGregor black
 
11:20 AM
wth alex
 
my timings are still fucked :(
 
user1804599
Oooh.
 
user1804599
Cool.
 
user1804599
Emacs has built-in command for running build tools.
 
Hi have a doubt in thread if I detach an handle will the thread be stopped ?
 
user1804599
11:21 AM
And it recognises line numbers in the output of cargo test.
 
Lack of bindeval also breaks something else, YCM I think?
 
YCM works for me too, but it's slightly funny in some ways (cf. gvim)
 
@sameer I'm sure you can find your answer here.
 
@sameer Yes it won't. Google is your friend. Why would you choose to be in doubt?
@LucDanton I followed the steps in :he nvim-python and symlinked my .vim/ and .vimrc really
Note that indeed I use github.com/bling/vim-airline
 
Python support is incomplete.
@sehe is that pure VimL ya doofus
 
11:27 AM
15 mins ago, by sehe
I use vim-airline maybe
 
user1804599
(defun smart-compile ()
  (interactive)
  (pcase major-mode
    (`rust-mode (compile "cargo test"))
    (other (message "no known build tool for %S" other))))
(global-set-key (kbd "<f5>") 'smart-compile)
 
user1804599
:D :D :D :D :D
 
Yeah well you can follow all the Python steps you want :)
 
user1804599
Maybe I should have separate shortcuts for testing and mere building.
 
11:28 AM
how do you guys deal with an operation that's applied on multiple things and can fail on each of them, and you're not sure the failure of one is a general failure? report a set of failed/not failed results? return the things that failed? think backing up a folder where the caller just gives the folder path, and some files inside may fail to be backed up; technically the caller doesn't know the full list of files inside
 
@AlexM. this really depends on if the partially completed set is still useful
 
yea that's my problem, I'm not sure if I should assume it'll still be useful
 
if it's a heavy operation that only fails on some 1% of files then I'd say continuuing and reporting fails at the end makes sense
 
let the user decide the rules for failing?
 
I don’t think I distinguish failure vs general failure. In some cases you can retry, but bailing out early is fine. Not for everything, but for a lot of things.
 
11:30 AM
@AlexM. this means additional coding
don't code unless you need to
 
yea
 
Transaction-like behaviour is like a holy grail, but it can be a lot of work to implement. And you don’t want to get it wrong.
If you’re backing up over a pre-existing backup and it fails mid-way, you’re essentially screwed (and so’s the user).
 
// style question

//A
unsigned counter = 0;
for (auto const& e : arr) { stuff(); counter += 1; }

//B
for (unsigned int i = 0; i < arr.size(); ++i) { stuff(); }
I need to utilize the value of the counter to return it as the index in the array later.
 
@LucDanton I think that makes sense
 
 
11:33 AM
auto counter = std::distance(begin(arr), end(arr));
for (auto const& : arr) stuff();
 
@ʎǝɹɟɟɟǝſ I might break out faster
 
@AlexM. So, pick your poison: fail early (i.e. midway), and tell the user. Then the burden is on her to do things the right way. If you want to do the right thing on the user's behalf, there are best practices. IIRC you would copy to a new location, then atomically (if that’s possible) replace the old location with the new. Then the only two outcomes are "I cannae do it cap'n" (and everything is still fine) or "I did it".
 
@BartekBanachewicz What's the condition for the break?
 
@ʎǝɹɟɟɟǝſ say im looking for an element inside satisfying a predicate.
 
std::find(begin(arr), end(arr), predicate) then
 
11:37 AM
@sehe Sadly the messages are entirely unhelpful ('a script somewhere tried to bindeval, which is not defined'), I would have to find out which plugins use Python and bisect them to find out which exactly are blowing up.
 
@LucDanton Does that mean YCM is working for you now?
I mean, I understand that some plugins won't work due to incomplete API status
 
@ʎǝɹɟɟɟǝſ this will return an iterator, not an index
 
@BartekBanachewicz auto index = std::distance(begin(arr), std::find(begin(arr), end(arr), predicate));
 
@BartekBanachewicz coliru.stacked-crooked.com
 
@sehe Looks like.
 
11:39 AM
Great success
 
@sehe it's like 3 lines
 
I know. It's your question
Make a longer question
 
I wrote this for an SO answer
 
You might need to apply +1 to it. I don't remember.
 
@BartekBanachewicz whoah. I'd probably much use std algos to get iterators and then calculate back
 
11:41 AM
@sehe so what jeff suggested
 
Worry later if I use non-random iterators and the performance is too low
 
well you wouldn't want to see original OP code anyway
 
@BartekBanachewicz Well. Always value readable code first
@BartekBanachewicz OP code is not my guideline :)
 
user1804599
Ah, got it. This is perfect.
 
user1804599
(defun compile-or-recompile ()
  (interactive)
  (pcase compile-command
    (`"make -k " (call-interactively 'compile))
    (_ (recompile))))
(global-set-key (kbd "<f4>") 'compile-or-recompile)
 
user1804599
11:44 AM
Asks for a custom command if the current compile command is make -k (which I never use), which is the default.
 
@BartekBanachewicz No reason to use at that I can there too
Probably just operator[] is more ~~~purformant~~~
 
@ʎǝɹɟɟɟǝſ I've decided to stop using op[]
 
user1804599
at master race.
 
user1804599
operator[] is unsafe shit and must be avoided.
 
Your brainwashing mechanisms don't work on me, jedi scum
 
11:46 AM
@elyse It optionally checks bounds in the proposed std::view IIRC.
 
user1804599
Optionally is stupid.
 
user1804599
It must always check them.
 
user1804599
Unsafety must be explicit, e.g. xs.unsafe_at(n).
 
@elyse If you provide something that always checks bound to C++ people, they are going to reject it because perfandstuff.
 
@ʎǝɹɟɟɟǝſ so many noobs would be saved if they used .at instead
@Morwenn s/perf/idiots/
you know what program is the fastest
 
11:48 AM
@BartekBanachewicz Thanks.
 
the one that immediately crashes
 
@elyse I have a Singleton in my codebase :(
object ValuePool {
    private val indexes = HashMap<Any, Int>()
    private val values = ArrayList<Any>()

    @Synchronized fun indexOf(value: Any): Int {
        val id: Int? = indexes.get(value)
        if (id != null) return id

        indexes.put(value, values.size())
        values.add(value)
        return values.lastIndex
    }

    fun valueAt(index: Int): Any = values[index]
}
 
Delete it!
 
@Morwenn It should have an at method that checks and an operator[] that doesn't, just like vector.
 
@ThePhD I guess it has a method that always check (I need to read it again), but you can give it a bounds_checking template policy too.
 
11:59 AM
Hm, how do I reply using mobile view?
 
You don't.
 

« first day (1817 days earlier)      last day (3146 days later) »