« first day (355 days earlier)      last day (4575 days later) » 

10:01 AM
Good morning monsieur :)
 
@LucDanton haha! To get the same behaviour as <C-W><whatever> with an Ex command you do :wincmd <whatever>!
:vertical wincmd f<CR>
1
A: How can I do something like gf, but in a new vertical split?

mloskotHere is possible mapping: :map <F8> :vertical wincmd f<CR> With a file name under cursor, hit F8 and voila.

 
Whoah
noremap <C-w>f :vertical wincmd f<CR> then?
 
Yep.
It doesn't make sense in visual mode, nor "operator pending" mode, so :nnoremap would be more indicated, but it's not that much of an issue.
 
10:20 AM
I'm not familiar with all the modes. Does 'no' stands for 'somewhat normal' and 'nno' for 'really, really normal' or what?
 
no stands for the English word "no" :)
nnoremap is "normal mode noremap".
 
And noremap is not "normal mode remap".
 
It maps to normal, visual, and "operator-pending".
 
So then yes, normal mode is definitely what I want.
What's operator pending? Right after :?
 
It's when you type something that expects a motion, like y or d.
 
10:23 AM
Reading :help vim-modes right now.
I don't think I've ever used Select mode.
 
Silly example: you :omap L 3l. Then you can do dL instead of d3l.
 
> You will know you are back in Normal mode when you see the screen flash or hear the bell after you type <Esc>.
 
Thank god that's not enabled.
 
How quaint. More seriously though, do you use cues for returning to normal mode?
 
Nah. I'm on normal mode whenever possible.
Everytime I do something in other modes, I reflexively return to it.
 
10:27 AM
The help on modes is seriously anal, what with the table to go from any one mode to the other.
 
So I know that I'm always on normal mode unless in the middle of doing something else.
 
Do you tap Esc once or twice to return to Normal? I think I reflexively do it twice.
 
Just once.
I'm not that paranoid.
 
why not just use a normal editor?
 
Right. That's vim.
Why do you think the default mode is called "normal"?
There's also an option for sissies that makes insert mode the default.
 
10:34 AM
@RMartinhoFernandes rotfl
 
More seriously, though, whenever I spend a lot of time using vim, and then have to use some silly editor, I keep typing js and ks all over the place.
That's annoying.
@AlfPSteinbach What do you use, btw?
> Expected error occured.
Neat.
 
I use Visual Studio
 
10:50 AM
@RMartinhoFernandes anything, like visual studio or code::blocks or notepad++ or earlier just crimson editor
:)
 
I still find hjkl absolutely silly.
 
You can use the cursor keys if you really want it. Or another editor.
 
jikl would have come more naturally but I can't really blame vim and its predecessor to not have foreseen the FPS genre.
 
:noremap a h | noremap s j | noremap w k | noremap d l
Fixed. :)
 
10:54 AM
Move with WASD, code with the mouse.
 
I'm gonna submit a plugin. "FPS-vim".
 
I'm moving in the insert mode, so no silly letters would work for me anyway.
 
@RMartinhoFernandes ijkl is 'aligned' with the home position for the right hand though, while wasd isn't.
 
@LucDanton But ijkl is not very FPS-y.
 
Neither is editing/coding, so it's all good.
 
10:56 AM
:)
 
It's all about the learning, even if I don't use my right hand for navigation ijkl feels quite natural. Even now I'm okay with j/k for scrolling but h still feels weird.
 
I rarely use h and l. Most of the time I use faster motions like w or f.
 
I do use w and other forward motions but I admit to being deficient in the matter of backwards motion. And in fact I took a refresher today (well I only remember b but it's a start).
 
@CatPlusPlus There's a "normal mode inside insert mode" mode for that :P
 
Also f seems weird, do you use it for programming to find the next brace or something?
 
Als
11:00 AM
@sbi: Thanks for the thread on Meta. You rock :)
 
sbi
2
A: Shouldn't serial downvoters be banned from SO?

sbiIn the beginning when I downvoted the system popped up a message urging me to explain why I do so. The system also seems to count my upvotes to questions and answers and points out when I neglect to vote on questions. Would it be so hard for the system to pick up when I'm downvoting more than, ...

 
@LucDanton Sometimes, when % won't get me the one I want.
 
Als
@sbi: I love that idea.
 
Great, for some reason, the "expected error" does not happen when debugging.
Maybe it's only expected in production.
 
lol
I should stop obsessing over minutae of my interfaces
 
11:11 AM
> There are cases where someone happens across an answer that is just really questionable. The person then goes to the author's history and looks at other answers, while voting down things that they feel are also wrong.
Tim has a point here.
Sometimes when I want to +2 an answer or something, I go look for another answer by that user to +1.
 
I think it's not a scenario SO should support
I mean, yes, conceptually, it's not that bad, but since it's also indistinguishable, I feel that the potential abuse is much more than the potential gain
 
It's a case of non-malicious behaviour leaving the same evidence as malicious behaviour. A fully automated response may hurt innocents.
We robots do not take prisoners.
 
Als
Darn I am popular Eh
 
meh
I'm not at all convinced that the non-malicious behaviour is actually beneficial, either
 
I'm not saying this matter is not treatable. I'm just saying it probably needs a meatbag somewhere.
 
Als
11:17 AM
What is the problem with making it compulsory to leave a comment while downvoting?
 
meh, I don't think that the non-malicious behaviour is worth it
@Als Dunno, I think it's the best thing to do but the staff have repeatedly said that they won't do it.
 
Als
I know everyone on meta seems to oppose it but I have not really stumbled upon any reasons for that oppostion.
 
Making that compulsory for everyone takes a lot of resources to flag asdfghjkls or even pre-packaged comments with real words in them. I do agree with @DeadMG that making that compulsory for troublemakers is a good idea.
"+1 I completely agree with this."
 
Als
I did +1 as well, its a good idea given that they don't want all downvotes substantiated with comments.
 
@Als That was an example of a compulsory comment.
 
Als
11:21 AM
hmm
 
The problem is that forcing a comment, does not force content. But in this case, the point isn't really to get content, but to expose the troublemaker.
 
'Compulsory comment' sounds like 'compulsory commitment'.
 
Wait, now it gets worse. When debugging, I get an "Unexpected error". Am I dreaming or something?
 
no
if you were dreaming, wouldn't you dream something a bit more abnormal than debugging?
 
Als
11:26 AM
@LucDanton: Hmm...If one feels responsible enough to downvote, one should feel committed enough to provide a reason?
 
Involuntary commitment or civil commitment is a legal process through which an individual with symptoms of severe mental illness is court-ordered into treatment in a hospital (inpatient) or in the community (outpatient). Criteria for civil commitment are established by law, which varies between nations and, in the U.S., from state to state. Commitment proceedings often follow a period of emergency hospitalization during which an individual with acute psychiatric symptoms is confined for a relatively short duration (e.g. 72 hours) in a treatment facility for evaluation and stabilization by...
 
"severe mental illness". Hmm.
 
@DeadMG Well this debugging experience seems surreal.
 
Als
@TonyTheLion: Ohla
 
11:29 AM
@RMartinhoFernandes On several occasions I've had the debugger simply crash when reading the symbols.
 
Stop trying to prove this is really happening! That won't make me happier.
I need a spray can of Ubik.
 
@Als sup?
 
the only times I downvote anonymously are where there are already comments explaining the flaws over which I downvoted
or when I simply don't have time to write a real comment
in which case I usually go back and comment later
 
Als
er I just noticed I have downvoted 7 times in one year!
@TonyTheLion: Oh Im Mr.Popular now :)
2
 
yea I noticed
you attention whore :P
 
11:37 AM
Ha! Nailed it! Ok, the world makes sense again. No need for Ubik.
 
@RMartinhoFernandes Personally I ended up blaming the compiler.
 
@LucDanton wasd is nicer when u remap silly "cap slock" as "ctrl"
 
@AlfPSteinbach I already do that regardless of wasd.
 
Yeah, what silly programmer has a Caps Lock key that works as Caps Lock?
 
Als
@TonyTheLion: Hehe Actually, I didn't know @sbi was going to post this as an Q on meta, we just had an discussion on the morning wherein we discussed about this, I was pleasantly surprised that he took the pains to raise this up on meta, My thanks are in order for @sbi, for trying to make a meaningful difference.
 
11:40 AM
room topic changed to Lounge<C++>: Come and see the great Mr Popular! Only five bucks a pop! [c++] [c++11] [c++-faq]
 
lol @DeadMG
@Als yea I saw that.
 
kek
 
sbi
@Als Well, I figured it would reek if you would whine about being downvoted, but since it is still unfair, someone else should do it.
 
Money goes for charity?
 
who says?
 
11:41 AM
money goes towards investing in a new chat, were we can UPVOTE ALL THE THINGS!!!
so no one has to feel the pain of downvotes ever again
 
Als
@sbi: Yeah I crib sometimes...well quite a lot perhaps..bad habits die hard wh...
 
hey, hey
why are you bastards spending my money?
I need to expend it on a new GPU
 
Global Petroleum Unlimited?
 
Als
uhm. Honey @DeadMG wheres the Money?
 
11:43 AM
@RMartinhoFernandes Graphics Processing Unit
i.e., graphics card
 
@DeadMG was thinking of being stingy
 
@Als You only get to "Honey" me if you offer blowjobs
 
oh ghosh
 
Als
ewwwww
 
so only if you're female, can you honey him
unless @DeadMG is into "other" things :P
 
Als
11:44 AM
no even a female who is willing to blow job him, rest can't
 
Wait, what's the honey for?
 
so what's special about today?
anything?
 
Some dude died.
 
someone getting a new job, a new car, a gf or what?
 
Als
11:45 AM
@DeadMG <-------------- Our Lounge BJ guy We had a Lounge DJ already---->@AlfPSteinbach
 
I know about the dude that died
 
BJ guy sounds...
 
but that's tragic news, I'm looking for good news
 
I don't even want to think about it.
 
like I give them out
 
Als
11:46 AM
haha
thats the beauty of it, no one would know unless he opens his mouth
to tell!
 
we're really missing some female presence in this room
 
Als
haha
 
I vote for more females
 
@TonyTheLion There was no 6th October 1582 in Portugal.
Don't know if that's good news.
 
@RMartinhoFernandes why is that?
 
Als
11:47 AM
@TonyTheLion: You get my upvote for more females
 
Switching to the Gregorian calendar.
 
Damn, I introduced a bug in our codebase.
 
@Als Cool :)
 
@StackedCrooked Congratulations!
 
@StackedCrooked a beetle or what?
 
11:47 AM
where do I send the cards?
 
std::set<Item*, CustomComparator> items; items.find(garbarge); => crash
 
Als
congrats @StackedCrooked, you lived up to your name and did a crooked thingy.
 
@Als One can never go wrong with that name..
 
excellent variable name
by the way
 
11:49 AM
Sorry, why would it crash?
 
which one?
 
heh
well, I think that garbage is an excellent name for a variable, as well
 
@RMartinhoFernandes CustomComparator derefs the pointer
 
although my original comment referred to items
 
I don't know what a gar is, but I know a barge is a kind of boat.
@StackedCrooked Oh, so you didn't show us all the bad code after all.
 
11:50 AM
@DeadMG I called it garbage to indicate that it is a pointer to an object that no longer exists
 
you know
I'm going to name a few of my variables garbage now
in honour
 
@StackedCrooked make it exist then
hhaha
 
@TonyTheLion Kind of defeats the purpose of calling find then :)
 
this code yields undefined behavior , right? : ideone.com/BErU3
 
yep
 
11:52 AM
@MrAnubis destructor called twice
 
un-un-undefiiiined behaaviioouuurrr
 
so yes
 
@StackedCrooked lol :P
 
the only need to call explicitly a destructor is after placement new
 
Or alternatively, before.
 
11:53 AM
no , i knew this but wanted to confirm :)
 
So, before or after, never during.
 
Never without is the serious version.
 
Luc Danton, like :

C *a = new C[10];
a->~C();
new(&a[0]) C;
delete[] a;
?
 
{
    B a;
    a.~B();
    ::new (&a) B;
}
This works too.
 
You don't need the dynamic allocation for the example but yes.
 
11:59 AM
new(&a[0]) C; -> never saw this version of new() object , what does that parenthesis says?
 
I had never realized that you could use them in this order
 
@Benoit Preexisting references will even remain valid and refer to the new object.
Ditto pointers.
 
@MrAnubis It calls the constructor on the address you give to it.
 
@RMartinhoFernandes constructor on the address -> what does this mean , didn't get it :(
 
When you do new C; it allocates memory somewhere and calls the constructor to create an object there, right?
When you do new (ptr) C; it will not allocate memory and just call the constructor to create an object on the location ptr points to.
 
12:03 PM
@RMartinhoFernandes aah , got it , thanks
 
I wonder why people feel the need to erase all usable information from exceptions and rethrow their empty shells.
 
@RMartinhoFernandes Uh is there support for nested exceptions?
 
@RMartinhoFernandes cause an empty shell uses less storage?
 
@LucDanton This horrid code is not C++.
 
@RMartinhoFernandes C++ has support for nested exceptions.
 
12:06 PM
@LucDanton No. If an exception is thrown while another exception (not catched) is processed, then terminate is called.
 
Ok, there's support for nested exception here anyway.
 
sbi
@StackedCrooked Starting from X-mas 2001 for several years I did not checkin a crashing bug. I did checkin logic bugs and a few exceptions thrown leading to nasty dialogs popping up, but not a single crash. In 2008 I had switched companies, got a crappy piece of code to fix, got lost in its C-ish ways to treat dynamically allocated objects, and did checkin something that crashed on a different platform. I ended up rewriting the whole code.
 
@Benoit That's not what nested exceptions are.
 
@RMartinhoFernandes Well that is sad.
 
I could understand it that when exceptions escape certain boundaries, like, say, a Web service, to avoid leaking implementation details that could lead to exploits.
But this is completely internal to the application.
It's just to make my life hell.
 
sbi
12:09 PM
@StackedCrooked You could go wrong by getting onto a crooked path.
 
@Benoit Why would that be an issue?
If you throw and retain enough exceptions that their storage becomes a problem, you're doing it wrong.
And since the code catches an already existing exception only to make it useless, the storage for it already exists.
 
How come putStrLn return 'a' typechecks and runs?
 
uh, in what language?
 
Haskell, I assume.
 
Yes.
Am I missing something on return and lists?
 
12:13 PM
It makes sense.
putStrLn takes a [Char].
 
Right.
 
So return is inferred as return :: Char -> [Char].
 
And so, what shall I learn about lists?
 
It's the same as putStrLn ['a'].
 
> instance Monad [] -- Defined in GHC.Base
Thank you.
 
12:14 PM
Oh, you didn't know lists were monads?
 
Nope.
Just did :info [] this instant.
 
Lunch. Will be back later.
 
Time to shove lists into lists.
I have no idea what I'm doing.
 
12:26 PM
Steve Jobs died...
Sort of sudden, I just read his Wikipedia article 3 days ago and it said "1955-Present" and now.... "1955-2011" ...
 
yeah
we all noticed
there's even a massive thing about it on the front so page
 
7 hours ago, by Als
room topic changed to Lounge<C++>: RIP Steve Jobs [1955-2011] [c++] [c++11] [c++-faq]
Who changed it ?
 
I did
 
12:56 PM
@LucDanton Wait, that shouldn't work.
 
room topic changed to Lounge<C++>: RIP Steve Jobs [1955-2011] [c++] [c++11] [c++-faq]
 
@RMartinhoFernandes Now you understand how I feel.
 
putStrLn $ return 'a' should work, but not putStrLn return 'a'.
 
@AlfPSteinbach Hey!
 
Are you running some buggy interpreter?
 
12:58 PM
No it correctly rejects it.
 
So, it was a typo?
 
I don't remember what prompted me to write the invalid snippet. I may have toyed with $ and parentheses and got double confused when I wrote the message.
 
you may have un-un-confused yourself
 
Yes, I think that's what happened. No, you changed it again.
 
“Unfortunately, people are not rebelling against Microsoft. They don’t know any better.” Steve Jobs
 
1:00 PM
If you wanted to show him in a good light, I don't think you picked the best of quotes.
 
well
I think that the death of Steve Jobs is all over so much of the Internets, I really have no desire to see it here
 
Maybe i should've posted this on the ubuntu forum.
 
Anyway, how inconvenient is ghci when it comes to type annotations? I recently noticed how the precedence of :: has been screwing me over.
 
I always parenthesise stuff with ::.
 
Good to know.
 
1:02 PM
Most of the time only return and read need that, so it's not that big a hassle.
 
@RMartinhoFernandes me too.
 
@RMartinhoFernandes Yeah, that's the case. I discovered mapM and I've been trying to write it in terms of a fold.
 
> Unfortunately, people are not rebelling against Canonical. They don’t know any better.
Hehe, this is my silly take on that.
 
foldr (>>) (return ()) someList is okay, but it seems tricky to generalize to all lists.
Possibly (return ()) is wrong, heh.
 
Right.
That forces the type to something m () something.
 
1:04 PM
Is mapM a primitive or am I missing something to implement it in terms of a fold?
 
No, it's not a primitive. As in, there's no magic in it.
 
I'm using the meaning of 'primitive' in terms of expressive power, not e.g. compiler support.
For instance return can't be expressed in terms of anything else.
 
But mapM can.
mapM f = sequence . map f
 
(At least I expect it to be since it's part of what makes a Monad.)
 
sequence is a fold.
 
1:07 PM
And now to attack sequence.
That's in fact what I've been considering all along, what with using (>>) and not ((>>) . f)
 
hmmm
I have 803 unread e-mails
 
I'm stumped by the fact that I can't have a neutral element to (>>) without some value :(
Ah well, not everything needs to be a one-liner.
 
It can be a one-liner :)
 
Yeah but I'm missing some primitive I'm afraid. If return doesn't cut it I'm not sure what I can use or where to look for it.
 
sequence :: Monad m = > [m a] -> m [a]
That's what you're trying, right?
 
1:13 PM
Yep.
 
What neutral element do you need?
 
foldr (>>) was my attempt.
So neutral element for (>>).
 
What does sequence [] return?
 
No.
Pick a monad. Say, Maybe.
 
1:14 PM
Prelude> sequence []
[]
Prelude> :type sequence []
sequence [] :: (Monad m) => m [a]
Give me a minute to think about that.
 
Wait, now I'm confused.
 
(I only attempted the first half before.)
 
There's no instance Monad m => Show (m a).
 
So I guess show $ sequence [] ends up as [] for some reason. (I keep messing that up.)
 
ghci must be picking the list monad for some reason.
 
1:16 PM
(I think it's starting to sink in that I'm not using a stack-oriented language!)
 
There's something wrong in your interpreter.
Maybe you have your sequence in scope?
Try > Control.Monad.sequence []
 
I haven't used that name and reloading the interpreter yields the same thing.
Loading package base ... linking ... done.
Prelude> sequence []
[]
Prelude> Control.Monad.sequence []
[]
 
Wait. My bad.
The REPL uses print, not putStrLn.
 
We could just ignore the stuff that is shown :)
 
And now ideone seems overloaded :(
Ah, this is better: ideone.com/k718d
 
1:20 PM
why on earth are you folks doing functional programming?
 
> No instance for (Show (m [a]))
As expected.
 
can you do animated Windows taskbar icon in that language?
 
> :type sequence []
sequence [] :: (Monad m) => m [a]
Is really the important stuff.
 
sbi
@AlfPSteinbach And why on earth are they spamming the C++ room with Haskell?
 
The room is free to use, why don't you bring up your topic of choice? :)
 
1:21 PM
there's something hideously wrong with my API
but I can't remember what it is
 
It's not that I don't want to not talk about Haskell, it's that I waited for a lull.
 
my brother distracted me
now I'm sitting staring at it with a really bad, but unfortunately vague, feeling
or maybe I was just dreaming of what I could do with C++ AMP
 
@sbi donno, wth
 
sbi
@DeadMG What's wrong with your API is that it is so hideously complex that you can't even decide what's wrong with it after staring at it for a long time.
 
@AlfPSteinbach because functional programming is useful
 
1:23 PM
I'd bring up my topic of choice, but yea....
@DeadMG what do you want to do with C++ AMP
 
sbi
@LucDanton I'm very fine with topics other than C++, and I have no problems at all with the Haskell fetish so many here have, but you've been at this for almost half an hour at a high volume, essentially spamming the room.
It's dead simple to create your own room, and I'd approve of you poking the usual suspects here for joining you there.
 
Any topic but other programming languages in here then?
 
Well, no one complained until now. I don't mind using another room, though.
Rooms are cheap here.
 
sbi
@LucDanton You are missing the point. Whenever two are engaged in a high-volume discussion of some topic that does not seem to be interesting to the rest pf the logged in users, and they are essentially drowning every attempt to create another topic, I have a problem with that, no matter whether it's Haskell, Apple, or sex. (I might react differently if it's half a dozen users.)
@RMartinhoFernandes I'm not criticizing you for having done that, I am asking you to stop it.
 
Oh okay, you're asking. I was confused. (Can't tell 'no activity' from 'no interest' apart in here.)
 
1:31 PM
@sbi Nothing. It's not even complex at all. I'm just being forgetful.
 
sbi
@LucDanton I'm sorry if I came across a little harsh. I didn't mean to.
@LucDanton Well, others tried to stick a message in between several times, but those were drowned.
 
I don't recall being drowned
 
@sbi It's rare when the chat fills up. I thought you were referring to a rule I wasn't aware of.
 
sbi
@DeadMG My point (admittedly with tongue-in-cheek) was that you shouldn't need to remember, it should be obvious whenever you look at it. :)
 
@sbi Can't tell if a lack of answers to a particular series of message is 'no interest', 'no activity' or 'went under the radar'.
 
sbi
1:33 PM
@LucDanton I understand that. As I said, I didn't mean to criticize, it was Ok with me for a while. I just thought it was enough.
 

Haskell

concatMap = ((.).(.)) concat map
Solved :) Sorry for the inconvenience.
 
sbi
@DeadMG That being your posting right after you have admitted of being forgetful doesn't fail to invoke a smile here.
 
Actually @DeadMG was drowned.
He said something about 803 unread e-mails.
I'm not sure if he really wanted to pursue that as a conversation, but well...
:)
 
@sbi Maybe there was something wrong, and then I fixed it, but forgot that I fixed it
 
sbi
@DeadMG Just as you have been pointed out the advantages of a VCS (your checkin comments should tell you whether you have fixed something recently or not), you might need a ticket system pointed out to you.
 
1:38 PM
Oh, he seems to be an enthusiastic convert now.
 
I surely don't check in every ten minutes
even if I had a VCS that I used
 
What? You're back to no VCS?
 
What do u guys use most for Gui Programming?
@RMartinhoFernandes ??
@DeadMG ??
I am planning to give Python a try again , should i?
 

« first day (355 days earlier)      last day (4575 days later) »