« first day (354 days earlier)      last day (4579 days later) » 

5:01 PM
Wassup mah homiees
 
Als
Phew...An OP who Demands Help.
0
Q: freopen stdout and console

SSight3Given the following function: freopen("file.txt","w",stdout); Redirects stdout into a file, how do I make it so stdout redirects back into the console? I will note, yes there are other questions similar to this, but they are about linux/posix. I'm using windows.

 
@IntermediateHacker That much.
 
I can't remember why but I think I have filed that user in the "don't interact with" folder.
 
It's megabytes per second, not megabits.
 
Als
@RMartinhoFernandes: Lol
 
5:06 PM
Along with There's Nothing We Can Do and MetallicPriest.
 
ok, now I look like an utter nerd with my new glasses
 
I don't see any glasses.
A lion with glasses, lol.
 
Als
Oh on that, today i met the guy who revenge downvotes
 
Oh, that's the guy from this question: stackoverflow.com/questions/7354597/…
 
Als
He answered a Q wrongly, and since I point it out he goes and downvotes me..lol
 
5:07 PM
@RMartinhoFernandes lulz
@Als sounds like an asshole to me
 
Als
@TonyTheLion: Yup sure is
Oh I posted a link to the answer, which he deleted
should it appear here or not? Since the answer stands deleted
 
It doesn't onebox.
 
@RMartinhoFernandes You mean you flipped the associated bozo bit.
 
Als
Its here for those who can see(>10k)
 
But the link works.
 
Als
5:09 PM
1
Q: Segfault with realloc

MattSo I was using malloc in my program and then realloc within a method inside the program. After I called this method so many times I would get a "Segmentation fault (core dumped)". Upon further inspection I realized that for some reason when my pointer goes from 0x25d7d60 or 0x223fae0 (or any ad...

The deleted answer with -2
 
If you think it's revenge downvoting then just flag for mod.
 
Als
@CatPlusPlus: Oh i did
One of them said mods can't do anything about this
They wanted me to write mail to someone and shit like that
 
> It is C++ I just tagged C because realloc is use in C and I don't use C++ functions at all really but was required to compile with g++. – Matt 11 hours ago
How do people come up with this nonsense?
 
Als
@RMartinhoFernandes: heh :) For Edit gold badge? :P
 
"Its not the actual code I used but extremely similar. "
Downvote, forget.
 
5:13 PM
"Why won't you give me the solution already? Why won't you help me?"
 
@LucDanton yyeaaah why?!
 
I just realized that I don't really like object oriented programming, but I do like Ruby. Something must be wrong with me :D
 
@StackedCrooked about the OO or the Ruby stuff?
 
Is Ruby OOP?
 
Als
@StackedCrooked: Oh la!
 
5:18 PM
Ruby is a pure OO language.
 
Als
Blasphemy!
 
Whatever that means.
 
How do you define pure OO?
 
dunno
 
Lies!
 
5:20 PM
Besides, Ruby is poor language, I don't really know what people see in it.
 
I don't see what's poor about it. (Apart from a lack of first class functions.)
 
Open classes is one of the silliest design decisions that you can make. The others are magic variables and sigils.
 
@CatPlusPlus IME I have seen a lot of peuple enthusing on iteration.
Don't ask me why.
 
And lack of first class functions.
 
AFAI pure OO means that everything is an object. But I think there are a few other rules as well in order for a language to qualify as pure.
 
5:22 PM
Right. What's an object?
 
And symbols. Really, do we need manually interned strings in a very-high-level language?
 
To me "pure" means "no side-effects".
 
@RMartinhoFernandes Are you gonna be like that now? :p
@RMartinhoFernandes That's pure functional.
 
Well, it doesn't even have keyword arguments.
 
@StackedCrooked No.
"A function is pure functional." sounds silly.
 
5:23 PM
@CatPlusPlus What do you mean with manually interned strings?
 
Symbols are manually interned strings.
 
You could say C is purely stateful :)
 
What about sin()?
Is it stateful?
 
Since people who made libc are obviously crazy, I wouldn't be surprised.
 
@RMartinhoFernandes I don't understand the problem. Symbols are useful I think..
 
5:26 PM
You can intern strings automatically, then you don't need symbols at all.
Of course, they have to be immutable, but why shouldn't they be.
 
Some people have tried to twist the meaning of "pure" into "exclusively" or "primarily", because using "pure" gives a nicer feeling.
 
What aspect of using Ruby symbols requires you to do something 'manual'?
 
Using symbols is the manual part.
 
The very existence of symbols makes you choose between using them and not using them, when it's completely unnecessary.
 
I totally lost trying to understand this point.
 
5:29 PM
Do you know what string interning is?
 
What's the difference between "foo" and :foo?
 
AFAIK string interning means that a all copies of the same string refer to the same immutable string constant.
 
And that can be done automatically.
 
@RMartinhoFernandes I don't know. I actually have only limited experience with Ruby.
@RMartinhoFernandes Where is the manual part in Ruby?
 
@StackedCrooked Using symbols instead of plain old strings.
If string interning was automatic (nothing new), symbols would be redundant.
0
Q: Undefined reference to 'vtable for xxx'

user975911takeaway.o: In function `takeaway': /home/stu10/s5/ejw4720/Project/MS1/takeaway.cpp:145: undefined reference to `vta ble for takeaway' /home/stu10/s5/ejw4720/Project/MS1/t...

 
5:32 PM
Ah, you mean that "foo" is not interned, while :foo is.
 
Wow, this guy even posted the full revision history in his comments.
 
> Revision 1.2 2011/10/01 18:16:49 ejw4720 crated class
I also love revision 1.4 where nothing changed.
 
I guess he had to ship it across seas.
@CatPlusPlus Noting changed.
 
yeah
us real men don't use source control, so don't need to post their non-existent comments
 
I guess you used one negation too much.
And there's a using namespace std; in the header. Sigh.
 
5:39 PM
@RMartinhoFernandes good thing I asked about Reginald before you put that up. :D
 
hey what is difference b/w #include and #import in c
 
@BasicBridge There's no #import.
 
@BasicBridge #import is Objective-C.
 
@LucDanton @RMartinhoFernandes this what the confusion i tried #import and it's working see here a simple code codepad.org/53AgfSnj
 
I think it's a "fixed" version of #include but I don't know jack squat of Objective-C, so...
@BasicBridge What language are you using? C? C++? Objective-C?
 
5:48 PM
@BasicBridge Careful, just because it works doesn't mean it's Standard C. It might be something your compiler will happily accept.
 
Oh, right, it worked. Stupid online compilers in non-standard mode.
 
i use C language i try a compiler called C-Free and it only use c and C++ forget about objective-C
 
Well, then use #include and forget about #import.
 
@RMartinhoFernandes oh ya ya.. but it's confusing..
 
Just pretend it doesn't exist (because it doesn't) and it stops being confusing.
Btw, C-Free is an IDE, not a compiler.
 
5:54 PM
@RMartinhoFernandes ok then let me try it in turbo-c a basic one
 
More of a C question, but what is the best way to search for a string in an array of strings, and return that index?
 
Als
Weird Question:
0
Q: Smartphone compilers

MikeI'm looking for a smartphone that would allow to compile and run c/c++/c#/java code on it (something simple, like "Hello, world!" for the most part). So far I've found tips about installing special applications for this purpose on iOS and installing Debian on Android. Situation with Windows Phone...

 
@Vap0r C? So, by string, you mean char*?
 
Yeah.
 
@Als Hmm. Why is it weird?
 
5:56 PM
Wouldn't qsort + strcmp work out of the box?
 
If/when I buy a smartphone, it must have coding capabilities inside.
 
Oh wait, not without silly casts.
 
Though ideone.com can make that work out to some extent.
 
Als
@RMartinhoFernandes: Is it normal?
 
Ok, maybe not.
 
Als
5:57 PM
That looks like an idea for a new feature for an smart phone
 
@LucDanton qsort, strcmp and (importantly) bsearch. Or just save your sanity and use C++.
 
or codepad.org or coderun.com
Have to use C for my class.
 
@Als The main problem isn't the compiler; it's the worthless imitation of a keyboard and/or display.
 
The professor already showed us a way to do it, but his way I believe is uneccessarily long and involves too many variable, and I think there probably is a better way.
 
@BasicBridge Really, C-Free packs GCC 2.95. That's ooooooold. Just throw that away and grab yourself an decent compiler.
 
Als
5:58 PM
@JerryCoffin: Qwerty keypads?
 
@Als Usually they blow when it comes to symbols like {} and such.
Though maybe you could use trigraphs.
WTF? Why did I say that?
 
Als
haha
 
@Als Oh, you can add a semi-decent keyboard and/or display to some, no question about that. In theory that deals with the hardware issues -- but porting the compiler is nearly the least of what's left. Much more important (and generally difficult) are things like source control, editor, etc.
 
Als
Trigraphs yeah! The dinasours which never went extinct
 
@RMartinhoFernandes ok got it stupid compilers..!!
last request can you pls give any good compiler for windows 7
 
6:01 PM
@RMartinhoFernandes At least in C++ you can use digraphs, which are marginally less awful.
 
@BasicBridge There are a few listed here: c++. You can pick from there, those are recommended.
 
@BasicBridge gcc works reasonably well. The most recent mingw releases have a recent version of gcc. If you're not a "free software" purist, you can also download a copy of VC++ Express at no cost -- works quite well also. Given that you don't have to pay for either, I'd get both.
 
Ooops, bad link. Fixed.
 
ok thanks buddy.!!
 
@RMartinhoFernandes I don't think I noticed FreeBSD switching to Clang.
 
6:05 PM
Gone.
 
“Never trust a computer you can’t throw out a window.”
(Steve Wozniak)
 
@BasicBridge This page: stackoverflow.com/tags/dev-c%2b%2b/info also lists a few good IDEs, if you're interested.
@LucDanton Oh, I didn't author that page.
I don't have the faintest clue.
 
@RMartinhoFernandes ok i'm looking at all of them.. thanks very much
 
mawning
 
@RMartinhoFernandes Oh yeah, I replied to you for the sake of sanity.
 
6:08 PM
3/14 K/D ratio. I suck at this game.
Maybe it's because I'm on the suckier team.
 
@CatPlusPlus what game are you playing?
 
“There are only two industries that refer to their customers as ‘users’.”
(Edward Tufte)
 
Battlefield 3.
 
love that
 
6:11 PM
One is the IT industry, but what's the other one?
 
@CatPlusPlus The map-specific knowledge is really quite important on OpMetro
if you don't know the map, you just get endlessly ganked from the sides
@IntermediateHacker Drugs.
 
@IntermediateHacker Drug dealers.
Not the pharmaceutical industry.
 
Oh.... i don't get the quote.
 
Er...
I don't know what else is left to explain.
 
it's suggesting that software engineering is like drug dealing
 
6:13 PM
We're not helping our users, we're ruining their lives.
 
@IntermediateHacker It's simply attempting to cast aspersions on IT by association with illegal drugs and dealers.
 
"Yeah, it doesn't work well right now but let me just push that patch out to fix everything. Trust me."
 
Well then its wrong. You do all the work, but don't get the er... job satisfaction that drug dealing does
 
@IntermediateHacker Drug dealing gives job satisfaction?
 
@IntermediateHacker The threat of arrest and/or gang-related violence?
 
6:14 PM
Drug dealing is not necessarily drug use.
 
I didn't mean drug use.
 
So what job satisfaction were you talking about?
"Today I sold ten grams. I'm a happy man."
 
The fact that you can't see shit doesn't help either.
 
@CatPlusPlus Add some more flashlight.
 
6:16 PM
yeah
 
Here is a joke about this
 
people shine lights in your face a lot
I use an IR scope all the time now
 
Search it and read it, u'll know what i am talking about
Its the big green graph thing near the end
in the link
 
IME flashlights makes people see you, not vice versa.
 
Ok then. bye everyone. Its 10:20 PM here
Um... yeah, nice farewell...
 
6:23 PM
@CatPlusPlus I've learned that the proper way to use tactical flashlights is to very briefly illuminate the surroundings, i.e. switch-on/switch-off. I can see how it would make sense so as to not ruin night vision and not reveal where you are.
 
It's not just darkness, though, there's just so much noise.
 
Well that was only regarding 'making people see you'. I only suggested using more flashlight as a joke, as I understand it the game doesn't need that :)
 
6/8. I'm hitting people!
With accuracy on the level of 1%.
Meh.
 
I remember the BF series as not being particularly trigger happy.
 
I can't really stand the iron sights.
 
6:35 PM
@CatPlusPlus The easiest way to use flashlights is just to shine them in the enemy eyes.
they're quite a good tool for unexplored areas because you don't have to see the enemy to blind them
also, you can blind many enemies in an area
 
Anyone here using VisualStudio 2010 pro?
 
@BenL Not at the moment -- I have (and still use the compiler from the command line) but find the IDE slow and ugly so I've gone back to 2008 for an IDE (not that it's great either, but at least not as bad as 2010).
 
My VS2008 works good
 
:( Visual Studio is breaking.
I keep getting package load errors
I'm downloading the VS SDK
So I can run the package load analyser
 
So am I the only one whose eyes seem to play tricks on him, so every time a question is tagged "PHP OOP", all he sees is "POOP"?
4
 
6:46 PM
AHH! There is no SDK for the Dev preview
Found it :L
No i didn't :@
 
is there any book or reference from where i can read object oriented programming in general(independent of any programming language)
 
@fluty I don't know of any that don't mention any programming language at all, but Booch (for one example) uses examples from a number of different languages, so it's not particularly oriented to a single language.
 
@AlfPSteinbach yes I don't understand it. why don't we get fatter and fatter?
because they say room is expanding. but I don't seem to be expanding!
 
Local gravity does that.
Expansion happens between star systems.
 
space is expanding
you're not expanding
 
6:58 PM
am I not within space?
 
well, yes, but the only measurement systems we have are relative to space
you can't exist non-relative to space
 
hmm
I will open a question on physics.SE
 

« first day (354 days earlier)      last day (4579 days later) »