« first day (704 days earlier)      last day (4470 days later) » 

00:00
Hey I have a logic question, although it is in visual basic, there is no need to know the language. Here it is.
Sep 9 at 11:45, by daknøk
If you are new here, please read the newbie hints right away, and only post here afterwards. Thank you.
Things aren't magic just because they've never been explained.
0
Q: C++ macro for string literal begin iterator and end iterator

bluedogI would like a macro like this STR_ITERATORS("My string") which produces pBegin, pEnd You could use this to search a vector for example... std::vector str1; std::search(str1.begin(), str1.end(), STR_ITERATORS("Look for this")); Note that search takes two pairs of iterators, and the macro...

Protip: If you think a macro is needed to solve a problem, look for a different solution.
@Insilico That one dropped my jaw.
@user1244215 it is if it violates the apparent reality without explanation.
00:13
sup everyone
I was just wondering why people tend to use their #define with capital letters ?
It more readily signals 'here be dragons'.
@MohamedAhmedNabil Because macros do not respect scope. If I write #define if while, it will clobber over every code that uses if, which is to say, pretty much everything.
So by using ALL_CAPITAL_LETTERs, it at least reduces the chance of a name clash.
Let's talk really low-level. What does a bit's atomic outer shell look like when stored on a hard drive?
@Chimera A "bit" is made up of lots of atoms on a hard drive.
00:26
am I just dreaming this or is copying from flash drive to computer's internal storage about ten times as fast as copying from computer to flash drive over usb2?
@Insilico Ok, how about the just one of the atoms? Suppose it depends on the platter substrate.
@kush Flash write speeds are much slower than read speeds.
@Insilico but my computer has an SSD chip in it as well.
Does that mean it is not actually writing to disk but just writing to ram?
@kush Probably. The operating system buffers writes and reads all the time
so complicated. there's no way I can learn all this :(
00:28
@Chimera I think you won't see any difference, because the basis of magnetism is in magnetic domains, which are much bigger than the atoms that make it.
@kush Learn all of what?
@Chimera "25–30 nanometers" Each bit is made of a lot of atoms. en.wikipedia.org/wiki/Hard-disk_platter
Ah thanks guys....
@Chimera "Aluminum is about 120 pm in diameter." answers.yahoo.com/question/index?qid=20090521202111AAZVDfK
so each bit is ~250000 aluminum atoms
which is fewer than I thought, I admit
why does ideone not have std::begin
user406009
Probably the same reason it is labeled "C++0x".
user406009
Not keeping up with the new standard.
00:35
@Insilico So what is happening is these sections of magnetization are globs of atoms with the same spin and angular momentum.
@Chimera Basically, yes.
@Cheersandhth.-Alf and you accuse me of trolling :P
user406009
user406009
Older than I thought.
00:42
@EthanSteinberg it also says the compiler version at the top of the page :D
"language: C++0x (gcc-4.5.1)"
I'm currently posting this from my new PC.
@EthanSteinberg liveworkspace.org has GCC 4.7.1
hmm, with my phone at work, if I view a missed call, my options are "delete", "back" and "ok". They all seem to do the same thing.
alright, later all
@EthanSteinberg codepad.org/YeAAkffL GCC 4.1.2
01:10
Hello.
@Rapptz hello :)
01:36
So many pets without a home. :<
01:49
user image
4
^ I think most of those skills are forgotten by most, nowadays. :-(
can i steal that also?
Steal what?
I didn't make it, I found it on reddit so I assume so.
reminds of the guy who walked into a museum, holding up his camera and asked, "can i take some pictures here?"
thanks
02:12
Holy shit, Torchlight on the new Humble Bundle.
02:32
0
Q: C++ can a user use cin to create a new string?

Grant H PetersonI made a dictionary and i was trying to figure out if i could make it so the user could enter new words and define them i think i have the define part down, and i have the rest down (until i think of a new feature haha) I wrote an example of kinda what i am looking for below, i don't want someone...

@Rapptz Yeah, the guy needs a vector.
he did >> endl; lol
cout << "Please enter a word" >> endl;
I think it's better to use a map, for a dictionary.
Associative arrays are called dictionaries in some languages.
03:01
-1
Q: show me how to put image into c++ (already have sdl)

MW130(c++) I went through "heck" installing sdl. I am a newb, I will allege. I really need to know how to have an image appear in my c++ program. Like, What code is it. Ik i need the #include Is there a code for it? Thank you very,very much guys.

 
2 hours later…
05:05
@EtiennedeMartel Ooh, shiny new PC?
damn, you broke the silence...
Damn me.
I think our record is 5 hours?
@StackedCrooked Yes.
But not I gotta sleep.
See y'all!
night
 
1 hour later…
06:17
ONE HOUR GONE.
:D
sbi
sbi
06:39
@R.MartinhoFernandes Yeah, my phone woke me up in the middle of the night, beeping at me about it. :)
@jornak And @Xeo, and @FredO, and @Konrad (living abroad, though), and a few others I can't think of right now.
@R.MartinhoFernandes See also balpha's tweet.
@Drise That's indeed a sad state of affairs. I'm afraid most C++ courses still teach C with Classes. That doesn't mean this is right, though.
sbi
sbi
Hi, @Tony.
Hi
What does today bring?
sbi
sbi
@TonyTheLion Currently it brought up an old papyrus that speaks of Maria Magdalena having been Jesus' wife. The origin of that papyrus is unknown, but according some Harvard professor it's an authentic Koptic script from the 4 century. I bet that will stir up the Catholic church a bit.
sbi
sbi
Yeah, saw this on Twitter this morning.
I know what I'm gonna watch tonight :P
@sbi You think? They managed to keep the matter sealed for 2k years. I reckon nothing's going to change the official readings held by the church
Good morning, btw
sbi
sbi
@sehe I wasn't talking about the official readings. I was talking about a stirrup. That would likely be at the base, not at the top. :)
On further reading, though, a Princeton historian said the papyrus has similarities with a recently discovered text in old Greek text about the wife of Jesus. So it seems it is not news.
well, by now they've all had a lot of practice at disregarding new information. It's obviously a fake, otherwise it'd have been in the Bible itself :)
07:03
Really? What has changed that should cause a stirrup? This is not exactly new allegation? I doubt that 'the base' will care much for new-found evidence.
@jalf Well put
user image
2
now I laughed
@TonyTheLion Ow
@EtiennedeMartel you mean, jQuery!
hi anybody know error"LNK1168'?
it says cannot open myapp.exe for writing
sbi
sbi
@BadSniper I suppose so. Someone must have named the thing, after all.
@BadSniper Oh, I know that one! It means the linker cannot open "myapp.exe" for writing.
@BadSniper Introducing the magic of search engine results: msdn.microsoft.com/en-us/library/hhbdtt6d.aspx
its so annoying
"The given file does not have write permission."
07:15
What the heck is this site?
it doesnt say anything dude
sbi
sbi
Oh. I just had a hint, but seeing this attitude, I'll keep it to myself. Good luck, @Bad!
better than your attitude
look yourself first
@BadSniper I'm pretty sure it says "The given file does not have write permission."
ya I know
but it executing well sometimes
07:18
@BadSniper So have you checked that said file have write permissions?
after 2-3 times it giving me this error
sbi
sbi
@Insilico Well, that, obviously, doesn't mean anything to him.
@sbi It's more than "doesn't say anything". -__-
@sbi wat the hell is wrong wid u
@BadSniper Don't make me get out the "Asking Questions" part of the newbie hints.
07:20
@BadSniper r u rly bad @ spellin, or d u think is kewl 2 say "wid"?
@BadSniper Your spelling is off. Also don't come in ranting how "annoying" things are. Do you want help? The executable is most likely simply still running. Kill it using Shift-F5 or the task manager. Good luck
@BadSniper Free advice for you: don't take anything said here personally or else you should probably not be here
I did that
@BadSniper if it isn't running, some other program is using it. Suspect VS plugins or use procexp.exe from Sysinternals.com to see what it is.
its exectuting
07:22
@BadSniper In that case, ask on Stack Overflow. Wait, search first
But its annoying to do everytime
@BadSniper Meh. I'm so interested
sbi
sbi
@BadSniper Oh, there's a lot that's wrong with me. For example, I expect a minimal amount of effort going into writing. And stating platform/compiler/version with your question. Also, I expect concrete criticism, rather than "doesn't say anything dud!", when complaining about a resource you're referred to doesn't help you solve your problem. And a lot more things, that only grumpy old men would expect a young, healthy person like you to waste their precious time on.
Well, Windows does not let you delete/overwrite/modify files while they're being executed. That's just how Windows works, and has nothing to do with the linker. If you want to be able to do that, switch to Linux
@sbi Aaaaand the plug of the tub that is this room has just been pulled.
07:25
@jalf I'm getting this problem recently..So I just asked if anything is wrong
sbi
sbi
@Neil This room isn't a tub. It's a mud puddle.
@BadSniper And I just answered. :)
@sbi All the same, no more mud to waddle in.
for some reason, the executable is still running while you're trying to link. It needs to stop
@BadSniper Not really then. It's normal. Something in your program may have changed which causes it to keep running (e.g. after closing the main window). Check what changed in your program
07:25
ok
@BadSniper I recall you asking what's LNK1168, and I referred you to The Official Documentation™ For The Visual C++ Compiler/Linker Toolchain.
@BadSniper Incidentally I gave the same answer before, with multiple hints on how to fix it/locate the cause
sbi
sbi
@jalf Actually, it doesn't have to be running. What's needed for write attempts to fail is it being opened in exclusive mode. That can be it still running, but it could also be another instance of the linker writing to it, or a virus doing so, or whatever.
@BadSniper You're likely not going to get good results in general asking questions in here. Much less so if said results can be easily found with a simple google search.
yup, but I didn't really feel inclined to elaborate on all the possible ways in which the file can be locked. :) He said before it was executing, so I'm assuming that's consistently the case
07:27
@sbi I explained as much, including hints at procexp.exe. Also, the OP confirmed the app is executing
sbi
sbi
@Neil And way less so if you're not even able to formulate a coherent sentence.
Maybe your question should be more along the lines of, "How do I perform a google search?"
@sbi Turned out he was able to. After making a fool of himself by not observing the common behaviour first :)
sbi
sbi
@sehe I had written just that when he smeared "but that doesn't say anything!" across the chat. I chose to delete my message draft at that point.
@sbi Oh. Hahaha. Well, that's your good right. Hardly constructive but I can't fault you for that
07:48
Morning gents
Ohai
yo
sbi
sbi
(Now watch the room go quiet for half an hour, while everything is clicking and dragging.)
@sbi I don't get it.
07:52
lol
sbi
sbi
@Neil "Click and Drag"
@sbi *blink*
> "We're so high up that if you threw a penny off the edge, inflation would reduce it's value to 0,0099999975 by the time it landed" - way up there
Nice
sbi
sbi
Yeah, I laughed out loud about that one, too.
> "I wonder where I'll float next"
07:57
Oh, there was a problem with the page loading
It was just an image for me, in fact I couldn't understand why "clicking and dragging" didn't do anything
> "The walls... - worn smooth by billions of tumbling Mario cropses"
@Neil Dillo? Lynx? NoScript?
@sbi Oh my fuck... how big is that?
sbi
sbi
@Mysticial Gorgeous!
Woo Silver C++ badge :)
@TonyTheLion Congratz =)
08:00
Wow, that must have taken a lot of work.
@sehe It didn't work from the embedded link here
sbi
sbi
> About 12% downloaded so far. The whole image is something like 160,000px wide. — NotTarts
@ManofOneWay Thanks
Directly on the xkcd site, it worked fine
$image=$('<img class="tile'+name+'" src="http://imgs.xkcd.com/clickdrag/'+name+'.png" style="top:'+((centre[1]+y)*tilesize)+'px;left:'+((centre[0]+x)*tilesize)+'px; z-index: -1; position: absolute;;" style="display:none" />');
How long will it take ^ for someone to put up the complete map?
It's not obfuscated anyway
@sbi That's how long it will take :)
08:03
hi puppy
sbi
sbi
> Here's a torrent of all the images: ubuntuone.com/4VxOo5cnInZWQUEplIdb2cMithrandir
Oh.
> Going by the other comments, I suspect this is missing some. vladoh claims there's even more stuff under the tunnels. Meanwhile, mayanksinghal points out the size of the array holding everything -- it appears north goes up to 14, and south goes down to 25; however, the images in this torrent go only as high as north 11 and south 25. (Seems everyone agrees that the east and west boundaries are 48 and 33.)
Well. Randall wastes another 87,320 man-hours of work :)
sbi
sbi
> I'm working at a small startup. Our business model is "taking free drinks from industry events and reselling them."
that's one fuggin big XKCD
Do you guys think that declaring a public member variable const defends the fact that it's public?
I.e. not using getter
really depends on the situation
sbi
sbi
<div class="map" style="width: 165888px; height: 79872px; position: absolute; z-index: -1; left: -67645.4px; top: -27545.6px;">
@ManofOneWay I don't think you need to defend anything in the first place
if you don't need a getter, don't write a getter
sbi
sbi
@Rapptz Thanks! I had been googling for that.
@Rapptz Ah... so I DID manage to get to the bottom of it.
08:09
If you just want to expose a variable, const or otherwise, then expose it
You can't read the text though, it's just an overview :P
@jalf What about abstraction and possible future changes of that variable?
sbi
sbi
@Rapptz Yeah, I just noticed. :(
@ManofOneWay What exactly have you abstracted? And What about YAGNI? :)
Does he do this by hand?
08:12
@Rapptz jpg?!
imgur compresses any image higher than 2 MB.
For almost all your variables, you're never going to need a getter/setter. Either you can access it directly now and for all eternity, or you're never going to expose it directly at all -- no getter, no setter, but rather some actual abstraction which uses the variable as an implementation detail to provide something more complex
@Rapptz sooooo. bad hosting then :)
This image is 828.1 megapixels. If this was to be printed, it'd be about 14 meters x 7 meters. Hence.. big.. How'd he do that?
But I have a really hard time imagining a situation where I'm going to go "oh man, I wish I'd wrapped a getter around this age field when I created it.
08:14
@Rapptz Loving those whales swimming through... the sky :)
sbi
sbi
@Rapptz A lot of the tiles are just black or white anyway.
@Rapptz Gimp?
@sbi Yeah, that's true. It's still really big.
@jalf I've made it " flexible in the face of change". I'm thinking of Scott Meyers old article about non-member functions. He talks about exposing public variables is bad. Because it's very hard to change the appearance of the class/struct once the users have started to use it.
YAGNI is hard to talk about in the general case
@ManofOneWay but you haven't, really. Nearly all meaningful changes require more than just a getter function. You're going to have to refactor code anyway
08:18
So just because you need to refactor the code anyway, I shouldn't create the getter in the first place?
@ManofOneWay Kind of. I don't mind you creating the getter, it's not something I feel strongly about. But I'd say that you don't need to create the getter in the first place, because it is additional code, additional complexity, which is almost guaranteed to have no value because either you never ever need to wrap the variable in anything, or you need to abstract it away at a deeper level and so the getter would also have to be removed
This is just wrong. — eva 1 hour ago
lol
Guy!
@ManofOneWay That's strikes me as a deliciously refined paradox.
YAGNI specifically avoids talking about the general case, right?
08:38
I wonder how the new xkcd will look oneboxed.
@eva Let me check: answerer: 170k rep, asker: 6 rep. Answerer: 134x c++ gold badge, only guy to have a c++11 gold badge... Shall we say you may have jumped to the wrong conclusion? — sehe 2 mins ago
Go through an software project of a reasonable size which uses getters and setters, and count how many lines of code it takes up. Then count how many of those getters and setters are actually necessary. I'm willing to bet that the ratio is horrifically bad. That they're adding hundreds and hundreds of lines of code which achieve absolutely nothing whatsoever
@daknøk Click the pinned link, there's your answer. Many sites show the bottom box blacked out
@sehe already checked it. The bottom box is just transparent.
@daknøk Same as when you click the 'embeddable link' at the bottom of xkcd/1110 page itself
08:40
Ah yeah. :P
Did anyone else notice that the number of cartoon/anime gravatars starts to outweigh the number of animal gravatars, at times?
At least it’s not the number of identicons.
:)
ManofOneWay, Mysticial, Xeo, Rapptz, StackedCrooked, did I miss anyone?
Oh my God.
> There are 2 solutions to this problem, 1 avoid using recursive functions they are generally a bad idea anyway,
Why would anyone ever say that?
You're wrong, my gravatar is Scott Meyers at a conference.
Xeo
Xeo
08:51
heh
hehehehe
@sehe My avatar is a human with a halftone effect. Does that count too?
Xeo
Xeo
Oh boy, it even works.
@jalf I agree
@daknøk Nope
Damnit.
08:57
@ManofOneWay so then I'd rather save the pain of writing those hundreds of lines of pointless and obfuscating code, and then go through a bit more trouble to refactor on the rare occasion where it turns out I did need a getter
but again, it's not something I'm religious about. I don't mind getters, I just don't think they're necessary either, I don't think you need to "defend" not having them
If you need classes for things that do not either manage resources or just hold data, you are using OOP the wrong way.
And for those that just hold data, everything can be public.
And maybe OOP is suitable for a very small set of other problems.
Enterprise Problems™
I’ll never forget Spring’s AbstractSingletonProxyFactoryBean.
Spring is in Fall now
CrappyCodeFactory FTFT.
@sehe The enterprise is a problem.
Xeo
Xeo
09:06
@Xeo I’d say deserved.
@Xeo Soooo poetic
Xeo
Xeo
Man, I think the newest xkcd just killed my browser.
Ditch the browser
I think 9GAG just killed your browser.
09:11
@Xeo Did you find a png of it then? I only have jpg. It is big, usable but not worth much for detail
@jalf That makes sense
Xeo
Xeo
@sehe Nah, I just scrolled around a bit and it boosted the memory need of FF from 400MB to ~1.2gig, and my poor PC only has 2gig :(
@sehe For me it is split up in a thousand PNGs.
Xeo
Xeo
Oh wait, from 200mb to 1.2gig even
Hm, where did the xkcd forums go?
@Xeo Maybe they couldn’t handle the load or something. :P
@Xeo Anyway, here.
09:32
another call from Oracle at 1pm
Xeo
Xeo
gl with that
@Xeo Wut? Opera just let's you click to zoom, click to unzoom. It's point and shoot, snappy like that. No need to go scrolling (as if you have an itchy mousewheel...)
@daknøk Sounds usable. Not. Anyways, linky? The torrent didn't appear to work for me
Xeo
Xeo
@sehe With "scrolling" I meant dragging this image around (or the viewbox, whatever your POV on that is)
@sehe he's talking about the actual xkcd, not the complete reconstructed image
@Xeo That's even more amazing, since it should actually only load a few tiles at the same time...
Xeo
Xeo
09:37
No idea why it needed so much memory
@Xeo Firefox has a policy of caching all images for a minute or two, which really hurts if you're using javascript trickery to quickly show a lot of images
@jalf In memory?!
@sehe yup
I came across that recently when we did our first experiments with browser-based vnc
Xeo
Xeo
Ouch, that may be it
09:38
@jalf makes sense to run into it there
@jalf vnc? Not seen that acronym
browser.cache.memory.enable
actually, we only ran into it in our artifical stress test, which just loaded a string of unique images as fast as possible :)
@DeadMG You must be joking.
@DeadMG it's basically a poor man's remote desktop protocol :)
or remote framebuffer
09:40
ok
what.
you've never heard of VNC?
what planet have you lived on?
For the airport in Venice, Florida, see Venice Municipal Airport In computing, Virtual Network Computing (VNC) is a graphical desktop sharing system that uses the RFB protocol (remote framebuffer) to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical screen updates back in the other direction, over a network. VNC is platform-independent – a VNC viewer on one operating system may connect to a VNC server on the same or any other operating system. There are clients and servers for many GUI-based operating ...
@TonyTheLion Windows. Muhahahahah
Oh hey, PVS Studio now detects "Strange Loops" as well :) (/cc @R.MartinhoFernandes)
@sehe but even I have heard of it, granted I did use it on Linux.
@TonyTheLion I used it on win95 first
Xeo
Xeo
09:42
> /* 50:72:6f:50:75:6b:65:20:69:73:20:61:77:65:73:6f:6d:65 */
> Hex decoded: ProPuke is awesome
I remember having to set it up so I could remotely (from a Win7 box) log into my Linux box on another box running in a VMWare
Xeo
Xeo
lol
that was rather annoying to setup
> ProPuke
sounds like someone just barfed all over that :P
@Xeo hehe
@TonyTheLion Remote Desktop isn't really necessary for anything I currently do.
09:44
@DeadMG lol
I need to buy a desk for my new flat so I can setup my Desktop machine
> This user contributes using The GIMP.
Xeo
Xeo
Ohey, deadline for the next C++ Standard mailing is in two days
but I can't find any shop that will deliver a desk outside of normal working hours
09:45
> This user has a tri-monitor configuration.
> This user has some undisclosed problems with Java.
Xeo
Xeo
Seems like a good guy
Likes manga, anime, C, C++, doesn't like Java...
Well, he's a fluent C++ programmer, but can also code in PHP and XUL...
Xeo
Xeo
I think I'll lie down for an hour or two, only got 5h worth of sleep this night
later guys
I'm sure that this Hex blurb will drive considerable traffic to google for 'ProPuke'
@Xeo 5h? That ought to be enough for anyone, right
Xeo
Xeo
Well, I googled the hex string, and first result was hacker news :)
09:49
> I wrote some JS to add keyboard controls to the map, because clicking and dragging is for suckers. potch.me/blog/press-and-hold.html
Xeo
Xeo
0
Q: "error: expected constructor, destructor, or type conversion before (template class name)" when defining function which returns a typedef in class

timrau#include <vector> template <typename T> class A { typedef std::vector<T> MyType; MyType func(void); }; template<typename T> A<T>::MyType A<T>::func(void) // The error is on the above line { } I got the following error message when compiling the code ...

close votes
Seems to be a template qualifier surge the last few days
Xeo
Xeo
auto A<T>::f() -> MyType

« first day (704 days earlier)      last day (4470 days later) »