« first day (762 days earlier)      last day (4176 days later) » 

10:02 AM
26 mins ago, by FredOverflow
This guy knows what he's talking about. Interesting video.
 
Assume a computer having 64 Word RAM (1 Word : 16 bits) and Cache memory of 8 blocks (block size : 32 bits). How can we find Main '25' Memory Location in cache if (a) Associative Mapping, b) Direct Mapping, and (c) 2 - way Set Set Associative mapping is used?
 
Is this homework?
 
I'd look under the bed first.
 
yes :P
 
What is "Main '25' Memory Location in cache"?
 
10:07 AM
(Hint: we're not doing your homework.)
 
sbi
TOM was introduced to that company in a mail from the boss dated 2000-03-21, 23:51. I have forwarded the mail to you, @R.Martinho. FWIW, I prefer to end the subject with <eom>, as that is more self-explanatory than this TOM thing. /cc @Fred
 
You know email is not a fucking telegraph, and you don't have to explicitly mark the end of it
 
I don't know how the bits are partition in different mappings
 
sbi
@CatPlusPlus ...to end the subject...
 
10:09 AM
If the body is empty, it's not because the message mysteriously disappeared over the wire
 
@DextOr don't you have, you know, a textbook, or some course material from the professor describing the stuff they expect you to learn?
 
Meowwww
 
@sbi Yeah, it's dumb.
Is what I'm saying.
 
@jalf its like 2+2=4 in books
but when you see exam quetion papers you are simply blown awaay
ok no problem
 
My heart aches for your misfortune.
 
sbi
10:12 AM
@CatPlusPlus It seems you have never worked in a setting where you get a couple of dozen emails a day? See, thought so. If you do, every message you do not have to look at to see if it has a line hidden above the 30 line company's signature is a bonus.
 
wow, I'd have been in trouble if wireshark didn't exist
 
Yes, we do tend to use IMs for one-line crap.
I'd still have to mark it as read, so it makes no difference for me whatsoever.
But whatever.
I'm going to bed, because being awake sucks.
 
sbi
@Mysticial Yeah, that happens to me a lot.
 
@CatPlusPlus Sounds like a good idea for a Nicolas Cage film called "Ghost writer"
 
10:17 AM
Um, thanks, but I thought it was you, not us, who were supposed to learn about CPU caches? ;)
 
ahhahahahah ;'D
 
@DextOr I now feel sadly inadequate
 
if you get anything ..... k=let me know bye
hahhaha
 
Have you tried reading it? All the necessary information seems to be there
 
But it's like, words.
Being awake is really bad for mental health, so bye.
 
10:21 AM
@sbi Confirmed, you do actually grep for "ape" in the transcripts. :)
 
user1357851
Dude, I sure have mad skills - still here after so many trying to kick me out (by downvoting my answers)
 
user1357851
 
People downvote your answers because your answers suck.
 
I also seem to recall some debates about languages where you appeared to know virtually nothing
 
Its hard to be idiot among smart people, i can tell that for sure :) Though its generally a best way to become smart.
 
user1357851
10:25 AM
 
In the way of windows 7 and 8 compatibility: can you make a c++ program that is both win32 and winrt compatible or do you have to write two separate programs?
(obviously from windows 8)
 
I like how the official msysgit package is a "preview"
Like, it's official, but it still sucks
 
@kbok lets hope the new git lib takes off
 
Actually I'll migrate to hg instead
 
libgit2 and LibGit2Sharp would really bring things up to scratch bash and stuff as a dep is a pain IMHO
 
10:33 AM
@kbok lol
 
Why doesn't git ever work behind a proxy
 
git supports deleting branches better
its nice how easy it is to undelete
 
Why would you want to undelete?
 
if you made a mistake
 
Why would you want to delete, then?
 
10:35 AM
fuuuuuuu
 
if you made a mistake
 
I forgot to add the necessary files while committing this morning
Nothing works
I suck
 
@sabgenton I'm curious as to what kind of mistake could warrant deletion and undeletion as well.
 
I like mercurial but if you are making experiments you don't want a dozen experimental branches that you don't need any more
 
10:38 AM
It's version control, not art.
 
@sabgenton then fork the repo and delete it later
 
fair enough I am a noob but deleteable branches seems to have some point to me
 
wow, that was weird. My screens went black for a couple of seconds, and suddenly Firefox was moved to the other screen
 
@R.MartinhoFernandes Version control is an art.
 
@thecoshman Or just leave the damn experimental branches in the repo. If the code is worthless, why the heck are you writing it anyway?
 
10:40 AM
@kbok right on
 
@R.MartinhoFernandes indeed
 
@R.MartinhoFernandes to clean up? I think it's very convenient that I can remove a branch if I don't need it any more, and that I can recover if I screw up
 
@jalf He turned off the lights to escape
 
@kbok That's not the same meaning :)
If you are worried about the output of hg branches you can simply close the branch and it won't show up unless you look for it.
But if you want it, it is still there.
If you delete it in git, it might still be there when you go back for it.
@jalf You can recover if it was not garbage collected.
 
Whats wrong with MSVC implementation of deque? Can't find original message, but afair someone here mentioned its a bit fucked.
 
10:42 AM
@R.MartinhoFernandes sure
Hopefully you know you screwed up before those 30 days are up though ;)
 
@jalf but what harm does it do to keep those changes around, just encase you some day decide that actually you do want it
 
I like mercurials need to make things more sacred but I still think gits guts that allow easy undelete if nessary is a useful thing to have. hg for that concept and for python XP interface git for it's DAG implementation.
 
@Ivan0x32 It is fucked.
 
@thecoshman reducing clutter, making it easier to find the bits that you do need, when they're not surrounded by useless clutter that you never needed and are never going to need. ;)
 
@Ivan0x32 It degenerates to a vector of pointers for mildly large objects (>16 bytes IIRC).
 
10:46 AM
and even below that, the buffer size is still so small
 
So, OpenType fonts can accomodate Unicode characters, but can only contain 2^16 glyphs. Well done.
 
@R.MartinhoFernandes how many fonts do you know of for which that is a problem?
 
@thecoshman any way I'll probably use mercurial because git isn't cross platform enough to support windows well without bash and such yet.
and plastic scm scares me
 
@sabgenton I won't say you shouldn't use hg, but git works pretty well from the regular command line
 
@sabgenton erm... not sure why you are telling me this, but sure, what ever. I found that whilst git was a pain to use, it did work just fine on windows
 
10:55 AM
@jalf Dunno, but it means that even using only one glyph per character, you cannot provide glyphs for all assigned codepoints (and allowing more than one glyph per character is one of the key features of OpenType). I guess it's not a common problem because that's not a common thing.
 
@R.MartinhoFernandes No font exists which covers all of Unicode. And it's unlikely that one will ever be created. What kind of font designer is going to be able to provide a consistent look for every single glyph?
 
@jalf fair enough I see stuff like git-annex not supporting windows and think I'll just get disappointed down the track
 
ah, fair enough. But git itself works just fine, in my experience :)
 
@jalf I can imagine someone wanting to design a font covering all CJK ideographs, which are over 70k.
 
@sabgenton please learn to target your responses, it is easier to follow the conversations that way
 
11:01 AM
@R.MartinhoFernandes that's true
 
@jalf hey good to hear, what about VS integration?
 
user1804599
@FredOverflow and while those are called references, why is there a NullPointerException? Hint: Java was designed by idiots.
 
so erm... just finally actually taking the time to get my head around this. Unicode is a huge ass table of all the possible glyphs for all the scripts (that have so far been added to the standard) UTF-8 and UTF-16 are ways of saying which glyph you want...
 
codepoint
 
user1804599
Oh, calling a method? Better check if null every freaking time because I love branching overhead!!
 
11:04 AM
not glyph
 
how do codepoint and glyph differ? and are you saying the UTF say which code point you want?
 
yes
and
 
@thecoshman No, Unicode is a set of rules for handling text for all writing systems. Those rules also happen to include a list of the characters need to use those.
 
a codepoint is the raw Unicode data. A glyph is the displayed "character". The two are not the same.
 
@thecoshman Glyphs are the things that are displayed, and those are provided by fonts, not Unicode.
 
11:05 AM
for example, you can get "o" "umlaut", but it might be one glyph, "o with umlaut".
 
@R.MartinhoFernandes oh I see, so unicode also says things like writing left to right
 
@thecoshman Or RTL.
 
I see, and things like RTL or LTR are a unicode codepoint... which you hav a UTF-8/16 do dad for?
 
@thecoshman The UTF-nn things are just serialization formats, nothing else.
 
11:07 AM
they are just binary encodings
for codepoints
 
user1357851
☛ ☺ ☚
 
I mean switching to RTL mode is like a magical character, like ASCII has DEL, or NEW_LINE
 
@Aardvark Java was designed? I thought they just started with other languages and stripped every interesting language feature? :)
 
@thecoshman Not. There are a magical character to override writing direction.
But there are rules to determine writing direction in the absence of those.
 
oh right
 
11:09 AM
That's what happens when you type arabic characters. The writing direction changes, but there are no RTLO or LTRO (the O is for override) characters involved.
 
oh, so the group of characters have a rule saying these characters should be done LTR, or these should be done in columns etc
so you don't have to manual state the default writing style for the characters
 
@thecoshman Yes, something like that.
@thecoshman I believe the columns are always optional (i.e. rendering them horizontally for various reasons, like space, is fine), but I am not certain as I have not wandered much into those parts yet.
 
IIRC the same sequence of Japanese Glyphs can mean different things depending on if it is vertical or horizontal. Not sure what they would be the default now though.
 
> Checking if an interator belongs to a given collection is not obviously feasible, and this should be a whole different question. See this question for more details. (tl;dr: you can't.)
Opinions ?
@DeadMG Are you the ugly downvoter ? You know I answered the question before the OP edited it, do you ?
 
11:26 AM
okay this c++11 stuff it's true it's like another language
 
user1357851
Hahaha this is the room of doom (downvoters)
 
@Telkitty what question?
 
user1357851
I was referring to kbok's question above
 
> C++11 feels like a new language - bjarne
 
@Cheersandhth.-Alf Having fun?
 
11:29 AM
just them constexpr and curly initializers
 
@Cheersandhth.-Alf hehe
 
need a logging system?
> AbstractLoggingFactoryInstanceGeneratorSingletonController.getNonAbstractAbstrac‌​tLoggingFactoryInstanceGeneratorSingletonControllerValiInstance().getValidLogging‌​State().loggingAs('sub system 42').logMessage(LogMessageFactory.getInstance().createLog(LogMessageFactory.logT‌​ype('Message')).addBody('This may be a bit of a joke').addTime())
he he he
 
ITT thecosh is bored to death.
 
user1804599
getNonAbstract? Why not getConcrete?
 
:O
a serious response?
 
11:31 AM
@sabgenton no clue, I don't use that :)
 
@thecoshman You lack a d
Here's your concrete
 
user1804599
 
user1804599
^ Abstract concrete.
3
 
lol
 
@kbok not sure if concrete or tarmac ...
@R.MartinhoFernandes yeah, just a little bit
 
11:37 AM
FFS. Did I mention I hate the edit peer reviewers? They're a bunch of a morons.
Someone steps in to fix two typos on a crappy title. Edit gets approved. None of the approvers actually fixed the title.
 
@Aardvark 9 shades of grey
 
user1804599
Fifty Shades of Grey is a terrible book.
 
> Destructor called form inappropriate library
^ I'm picturing a libfucking.so
 
@Aardvark so I hear
 
Oh man, that thing is everywhere. Some bookshops have whole shelves filled with nothing but that thing.
 
11:46 AM
ahhh, itch on my foot... damn boots
 
user1357851
fifty shades of grey:
 
@R.MartinhoFernandes and the rest of the series
 
user1357851
 
user1804599
Not funny.
 
@Xeo Woops, it used to be that std::tuple<int, int> t = shuffle(std::make_tuple(0)); would work (modulo some explicit checks for matching sizes), now it doesn't (because 0 matches both int and int, there's an ambiguity!). I guess it's a feature now! Esp. considering that in this case the same element would be forwarded (i.e. moved) twice.
 
user1804599
11:47 AM
I think even C++ Primer Plus is better than Fifty Shades of Gray.
 
"I guess it's a feature now!", lol
 
user1357851
no wonder you are a geek
 
@Aardvark wow, that's harsh for fifty shades of gray.
I mean, come on
 
@R.MartinhoFernandes Tbh before that it was a feature that the repeated type would be initialized from the same element (which was the first match).
 
user1804599
@DeadMG that was my intention.
 
11:48 AM
there's "Bad" and then there's C++ Primer Plus.
 
tl;dr I have a lot of features.
 
user1804599
@DeadMG Stop talking Bullschildt.
 
In fact I'm fixing some of them right now.
 
I saw C++ Primer Plus on a shelf here at work. I might sneak a peek some time.
 
user1804599
I saw it in a book store a few months ago.
 
11:50 AM
There's only one copy here, and there are about eight copies of C++ Primer nearby.
 
@Aardvark gives a better coverage
 
@R.MartinhoFernandes Btw std::tuple<int, long> t = shuffle(std::make_tuple(42l, 36)); does the 'right' thing. Also if there are more element type sprinkled in there of course.
 
user1804599
@thecoshman both are about sadomasochism, too.
 
user1804599
However, Fifty Shades of Grey gets it wrong.
 
@Aardvark I think painting pun went over your head
 
user1804599
11:51 AM
But then, C++ Primer Plus gets it wrong too.
 
user1804599
@thecoshman was that a pun? :O
 
Wait, C++ Primer and C++ Primer Plus have nothing to do with each other ?
 
user1804599
No.
 
user1804599
C++ Primer is good, C++ Primer Plus is horrible.
 
11:52 AM
The Plus part is actually minus.
 
user1804599
C++ Primer--
 
Like the annotated C standard :)
 
It was an interesting thing to implement, and I think I can safely say that I at least got best_match<T, list<U, V, W>> out of it.
 
@Aardvark a very poor pun, but a pun none the less
 
user1804599
TIL: "@Aardvark gives a better coverage" is a pun.
 
user1357851
11:55 AM
Inheritance, but not OO inheritance :x
 
user1357851
 
@Aardvark on account of '50 shades of grey' being loosely related to colours or paint, and primer being an undercoat for paint...
 
user1804599
How can you even get such a cryptic pun? XD
 
user1357851
Our CS lecturer taught us pointers by compare students to roasted pigs and a pointer to a stick
 
user142019
Hi.
 
user142019
12:00 PM
@Telkitty oh God please don’t talk about school. I’m having Java class next week.
 
user1357851
Ok, they were talking about home decoration before (and shades of gray) feel free to join the conversation
 
user142019
@Aardvark cryptic jokes? I know a guy who is good at making them! /cc @sehe
 
@R.MartinhoFernandes Something to keep in mind: remember the bliss that came when GCC started displaying SFINAE failures in the instantiation stack (or whatever) when reporting errors? SFINAE failures of a constrained conversion operator don't seem to appear there, all I get is 'no known conversion from T to U' and 'T is not derived from U' messages.
 
And right now I can't remember what would happen if there was a constrained conversion constructor instead.
Can you imagine the hell it would be if for every message that involved copy conversion (which does include anything with a function call in it of course) those conversion failures would be enumerated?
 
user1804599
 
So far I disabled the constraint anytime I needed a more helpful message since the constraint is that tight (i.e. the hard errors in the instantiation will mirror the SFINAE), so not really an issue.
 
user142019
lol
 
user142019
Man. Monday will be the worst day of my life.
 
Hello, How can I store argv into an array? I'm trying to loop through all the argv and if the arg matches it'll be stored in the array
 
std::vector<std::string> v(argv, argv + argc);, then you can filter with std::copy_if.
Or work from std::copy_if(argv, argv + argc, /*... */) on I suppose!
 
user142019
12:14 PM
What about std::vector and std::back_inserter?
 
> internal compiler error: tree check: expected enumeral_type, have typename_type in tsubst_enum, at cp/pt.c:18853
 
@LucDanton isnt size = (argc * sizeof(argv))?
 
@Ivan0x32 Maybe? What size?
 
sizeof entire array of argv[], char* argv[], so end addr would be argv + argc * sizeof(argv).
 
But I don't need a size, I need an offset.
 
user1804599
12:21 PM
@Ivan0x32 + with pointers does * sizeof for you.
 
user1804599
And vector::vector does not take a size, it takes two iterators.
 
Ivan0x32 goes to reading C++ standard what a shame...
 
@R.MartinhoFernandes Don't, it's a waste of time.
 
@Zoidberg'-- You've had it easy, then?
 
12:43 PM
Robot, how's the new job?
RE the tag line, I'm coming in, because bluntly I'm King and I'm right. :P
 
@TonyTheLion the King of Porn?
 
@TonyTheLion Working on it. :P
 
@R.MartinhoFernandes That's a very detailed answer there.
@DeadMG I didn't say that.
 
@jalf Are you there?
 
@TonyTheLion Hey, it was true until you plinked me!
 
12:52 PM
0
Q: SIMD Intrinsics and Pointers

OmahaEverything I've read about using C/C++ intrinsic types for SIMD capabilities like MMX and SSE indicate that you should use those as opaque types and not reference the internals directly. However, when I look at many examples, they work by taking (explicitly aligned) pointers to raw data and rein...

@R.MartinhoFernandes haha
basically a pointer aliasing question
however I don't remember if this would violate the aliasing rules, I'm assuming not
 
-5
Q: array initialization in python better than other languages why?

Surbhi GuptaWhy is array initializaion in python better than The array initialization in java and C ?

 
@ManofOneWay yup?
 
std::vector<std::string>> - they still didn't fix it? facepalm...
 
Didn't fix what?
 
> >
 
12:58 PM
where did that come from?
 
@jalf What do you think is a reasonable starting salary for an engineer in your business in the copenhagen area? =)
 
you have one too many >
 
I mean the need for this space between > and >
 
@Ivan0x32 That thing has been fixed in practice for some time. It has been fixed in theory since last year.
 
but that statement is syntactically invalid
std::vector<std::string> > <--- still not valid
 
1:00 PM
oh...i'm just that dumb -_-
 
@ManofOneWay I have no idea, honestly. According to the last statistics I saw, 33k was the average for new CS graduates. But that's just an average of those who chose to report their salary, so it might be skewed
 
damn phone just decided to restart it self :(
 
What did you expect? Its windows :D
 
@jalf Ok. According to this ( ida.dk/ansat/loenstatistik/Documents/… ) paper at ida it's 35400dk. Am I wrong?
 
@Ivan0x32 me? why do you assume my phone is a window phone?
 
1:06 PM
oh... sorry, i intertangled you with tekkity, he mentioned early he has Nokia windows phone.
 
@ManofOneWay it's a different statistic than the one I saw, but it looks valid enough to me. I went by PROSA's statistics. by and large, IDA is the union for engineers, and PROSA for programmers, but of course there's a lot of overlap (and a computer scientist isn't an exact fit for either)
 
morning sirs
 
ah sorry, theirs says 34.5k, so they're pretty close after all
 
@Ivan0x32 I see. I was wondering why such a random conclusion would be made
 
but yeah, I guess that's a good ballpark figure. In my experience it varies quite a lot though. I know of one place that offered me 29k (or rather, that was the highest they were willing to go. Their starting offer was, oh, I can't even remember, 25k or something)
I also know some who got 40k after graduating
 
1:11 PM
@thecoshman Because you are a pirate.
 
@sbi I see your company also suffers from 'every email must at least 80% crap'
 
@jalf Ok. Thanks!
 
@R.MartinhoFernandes can... not... think... of... pun...
Apple Bashing (and I don't mean cider)
 
I wrote a script to parse MSVC's build output, so you can quickly search for errors/warnings in large build outputs.
First iteration it ran for about 8 mins going through a 4k lines build output
 
@TonyTheLion Erm... View > Error List?
 
1:20 PM
I then optimized it and now it's less then 1 min to run on a 4k line output
 
hi guis
 
@R.MartinhoFernandes meh. Ah well
 
user1804599
hi auis
 
at least I learned something from doing it
 
1:21 PM
:)
 
@R.MartinhoFernandes dis pun
 
@Cicada sup
@TonyTheLion how to effectively waste time?
 
it feels like a rather pyrrhic victory to get over the -36 rep of this morning.
 
@thecoshman actually no, I didn't do it to waste time. I honestly wanted to speed up my ability to sift through large build outputs, especially seeing I was manually just going through the text output for the last few days, finding errors/warnings in large outputs.
 
@Cheersandhth.-Alf What happened? Serial upvoters?
 
1:28 PM
I learned something about Python and about the usefulness about hashed containers in searching and sorting
 
You also learned another lesson: ask the friendly robot first. Right? ;)
 
@R.MartinhoFernandes that too. :)
I honestly didn't even think to come ask in here.
 
> Demonstratable experience in C++
Nooooooooooo
 
Demonstratable ?
 
Does stringstream capable of effectivly holding few megabytes of info? I'm considering making a buffer for my logging subsystem, so it will drop logs to file time to time, not constantly as now (i just replaced stdout with ofstream).
 
1:34 PM
maybe he's good building 2d arrays in C++ (tables... get it? ah ah :P)
 
@kbok Yes. It means you must be able to demonstratate it.
@Ivan0x32 It will hold as much as your system can handle. A few megabytes seems ok.
 
@R.MartinhoFernandes Exactly. Canananananadian word.
 
@TonyTheLion really? when ever you have a problem, bitch about it here first :P
@Cicada no, English
 
Ell
@R.MartinhoFernandes isn't it "demonstrable"?
 
@thecoshman No.
 
1:38 PM
@thecoshman I was actually trying to get work done. ;)
 
There seem to be no info about its operator<<() complexity. Atleast on cplusplus.com
 
Sigh, everyone left their sense of humour home, it seems.
@Ivan0x32 I am sure it is amortized linear in all implementations worthy of naming (well, maybe except Hell++).
 
@Cicada huh... apparently not... Damn people
 
@thecoshman damn you!
 
@Cicada I am Pirate, not People, damn you!
 
1:42 PM
> its performance is excellent (in terms of both compilation speed and - literally - execution speed)
^ this one always cracks me up
 
I'm just going to bump this again
13
Q: Why is the 'plink' noise in chat not an account setting?

thecoshmanFirst, let's explain what I am on about. That little 'plink' noise you get by default when some one posts a message at you on chat. I HATE it with a passion! At first I was ok with the noise, as I could simply disable it and problem solved. Except it's not solved, it is merely put aside for a wh...

 
@kbok where did you find that
 
@thecoshman I already upvoted it :)
 
@R.MartinhoFernandes no, i just answered a couple of questions.
 
1:45 PM
This is the DS5K homepage.
 
@Cheersandhth.-Alf No, I meant, what happened for you to get -36?
 
@jalf :)
@kbok what the hell?
 
3 mins ago, by kbok
This is the DS5K homepage.
> What a shame that he didn't cast ch to unsigned char when he wrote ch = toupper(ch); Still, on this occasion he didn't survive the experience, so this doesn't count as a repetitive fault.
 
0
Q: Why there's no .NET for C?

ASIO22Maybe all of you know, that there's exist a good, object-oriented and reliable framework called dot Net, which can be used from C# and C++ from wrappers for managed code. But if I want to normally develop with .NET and WPF, I'm forced to use C#. Because in C++ I must use then an ugly wrappers for...

lol @ the intro.
"Maybe you all know ..."
 
> wann't
lol
 
1:53 PM
C.NET... a fucking nightmare
Personally i can't stand presence of C++.NET code it look to me like complete shit. I prefer either C# or pure C++.
 
^ lol
 
No. That's the joke.
 
I tricked you !
 
1:56 PM
@R.MartinhoFernandes Rule of Thumb #5: When someone claims "Everyone knows that X", they mean "I just made up X on the spot".
 
@kbok For this trickery, you will be third against the wall when the revolution comes.
 
> that there's exist a good, object-oriented and reliable framework called dot Net
@KerrekSB I don't think he made that on the spot. :)
 
@R.MartinhoFernandes after who and who?
 
@Ivan0x32 I once even asked a C++/CLI question...
 
@R.MartinhoFernandes Who's the first and second ?
 
1:58 PM
@thecoshman Top secret (in the sense that the info is actually strewn all over this public chat)
Oct 26 at 12:40, by R. Martinho Fernandes
@sehe You'll be second against the wall.
Aug 8 at 16:49, by R. Martinho Fernandes
@sbi Ow. Don't complain when you're first against the wall.
 

« first day (762 days earlier)      last day (4176 days later) »