« first day (684 days earlier)      last day (4264 days later) » 

10:01 PM
@sehe got something better?
 
@MohamedAhmedNabil en.cppreference.com
 
@MooingDuck i feel its a little complicated, especially for a beginner
 
@MohamedAhmedNabil complicated how?
 
good god. The micro-controller tag is not very active.
 
@MooingDuck I feel like cplusplus is simpler
This is an example, I still dont know templates and i still dont know alot of the stuff they use in the examples
 
10:09 PM
comparing en.cppreference.com/w/cpp/io/basic_fstream to cplusplus.com/reference/iostream/fstream, the cplusplus doesn't show the template parameters, doesn't show the typedefs, doesn't show any C++11 features... Yeah, I can see how it's simpler though.
 
@MooingDuck Yeah, At the moment cplusplus would be my choice, Untill I advance more in C++
 
Crap, I'm going to have to draw this sphere by hand.
 
Ell
o.O pen and paper?
Or a digital image?
@chimera you are interested in micro controllers?
 
10:29 PM
@Ell Yes, I've done several projects using them over the years.
 
Ell
Oh cool, like what?
 
@Ell 8051 based board to create a digital answering machine, way back in the day.
 
@Chimera Great :)
 
Various little projects using PIC's to read UID chips and interface to LCD's in assembler. ARM based projects in C.
 
@Chimera What college did you graduate from
 
10:33 PM
Etc
@MohamedAhmedNabil I went to University of Wisconsin-Milwaukee for a few years. Didn't graduate. Managed to work my way into the field without it.
An example of some past work: beagleboardxm.org/blog
Most recently created a USB HID device using a PIC microcontroller for testing out a Linux USB driver that I wrote.
 
@Chimera You have a name for yourself out there dont you?
 
@MohamedAhmedNabil No, not really.
Just some experience.
 
@Chimera ok but still pretty sweet stuff
 
@MohamedAhmedNabil Thanks. The low-level hardware stuff has always been a passion of mine since I was in grade school.
 
Ell
Awesome, I'm just trying to get into electronics myself
 
10:39 PM
How does one make a name for himself in the world of programming?
 
@MohamedAhmedNabil programming
 
@MohamedAhmedNabil programming
 
Does a PhD or a Masters Degree Matter?
 
@MohamedAhmedNabil Depends what you want to do and where you want to work.
Having a degree doesn't always mean you have marketable skills. My advice is to always be doing projects on your own, reading books, experimenting --- be motivated to learn on your own.
NOTHING can trump or replace experience.
 
@Chimera Something like Gnome or game development
@Chimera I just dont want to end up like simple programmers on a desk writing code all day in a cubicle and never getting noticed
 
10:46 PM
@MohamedAhmedNabil few do
 
@MooingDuck But the majority, What do they end up doing?
 
@MohamedAhmedNabil I hear you. We all want to find work we enjoy and derive personal satisfaction from.
 
@MohamedAhmedNabil sitting at a desk, writing code all day in a cubicle.
 
@MooingDuck Why !!!????
 
@MohamedAhmedNabil why not? I love this stuff. This is why I became a programmer
@MohamedAhmedNabil if you work at a small company, you get noticed. if you work at a big company, you get money. Your choice
 
10:48 PM
@MooingDuck I want to be a developer not an employee
 
@MohamedAhmedNabil what do you think developers do? They either (A) sit at a desk in a cubicle and code, or (B) manage paperwork, and never touch computers.
 
Money is nothing to me
 
@MooingDuck Yep. But a job is a job. Remember, if you aren't being challenged at work, do some projects outside of work until you can find your dream job.
 
I want to be like known
 
@MohamedAhmedNabil so work at a small company
 
10:49 PM
Check out the "Related" Column on the right side:
1
Q: C Warning: assignment makes integer from pointer without a cast

user1637319I'm having trouble figuring out why my program is giving me this error. The function is suppose to sum up all the numbers in the array, then find the average. Right now, I'm having problems summing up the elements. float Average(int **array, int n) { int sum = 0; int i; for (i = 0; i &l...

 
@MohamedAhmedNabil if you mean like famous, all I can say is "tough luck", so does everyone else.
 
@MooingDuck luck not hard work?
 
@Mysticial hahaha
@MohamedAhmedNabil yeah, basically it takes a miracle.
 
@MooingDuck why :/
 
@Mysticial that's funny
 
10:49 PM
@MohamedAhmedNabil that's how fame works
Example: Name as many famous programmers as you can off the top of your head.
 
@MohamedAhmedNabil Hard work and luck.
 
What do you think of project Gnome. Is it "famous"
 
I bet you think of like 10, tops. Do you assume that the other couple hundred million programmers don't work hard? Of course they work hard. It takes a lot of luck to rise up into being famous though.
@MohamedAhmedNabil sure. But who made it?
 
Where should I ask about data format/container?
 
@MohamedAhmedNabil Whatever you do, please enjoy the journey. The destination is great and all, but the journey should be important to you as well.
 
10:51 PM
SO or Programmers?
 
@KianMayne eh, SO I think
 
@MooingDuck Its enough to work at a place that is famous.
 
@MohamedAhmedNabil oh, easier then. (A) be brilliant, or (B) get really lucky.
 
Apparently people don't care to click on some of the suggested dupe links:
 
@MooingDuck Miguel de Icaza and Federico Mena :P
 
10:52 PM
@MohamedAhmedNabil you looked it up :P
 
@MooingDuck Yea, but there are people like Bjarne Stroustrup that are known by every single programmer. Was he lucky or did he just work hard
 
@MohamedAhmedNabil Both and brilliance.
 
Ell
Linus torvalds
 
I hope i acheive my dream or die trying :) Thats what i really wanna feel. Thats what drives adrinaline through me :)
 
Ell
Dennis ritchie?
 
10:55 PM
@Ell The hacker that made linux :P
@Ell RIP :(
 
Ell
matz
 
Richie, Kernighan, Pascal, Torvalds, Turing, Stallman
 
@MohamedAhmedNabil he was brilliant, and lucky, and worked hard
 
Ell
stallman
 
@MooingDuck are there any projects you are working on ATM?
 
10:57 PM
@MohamedAhmedNabil ant? No I don't use ant.
oh! any!
hahaha
 
@Chimera en.wikipedia.org/wiki/List_of_programmers If you're interested
yeah, I work on telephone servers at my job
 
random other STL-like doodads at home
 
@EtiennedeMartel hi
 
10:59 PM
@MooingDuck I have a problem with my programming style
 
@MooingDuck Great list!
 
@MohamedAhmedNabil so change it
 
I seem to be writing the entire program in main()
 
why im not on the porgramramers list im a programmer
 
not dividing it over functions
 
10:59 PM
fuck wikipedia
 
When should i write in main and when should i divide the code into functions
 
@CatPlusPlus Y U NO WRITE ENGLISH?
 
cause im drunk abit
 
oh lol
 
tiny itny bit
 
11:00 PM
@CatPlusPlus yeah yeah
 
so you had Vodka?
 
we only drunk two bottles so
 
@MohamedAhmedNabil that's not a hard fast rule. It's a skill you learn
 
learn haskell damit
 
@MooingDuck Only time will tell,
 
11:01 PM
@CatPlusPlus os?
 
I noticed it when i was doing a hangman game and there were no functions at all, Everthing was in main();
 
go to bed
 
Ell
divide it into a function when it is logical to do so or if you feel yourself repeating yourself
 
see ifixed it
 
11:02 PM
you don't make sense
 
i never make sense
 
@MooingDuck When you program do you write the functions first or main() first?
 
true
you don't have to work tomorrow?
 
i'm ready to contribute to reddit
 
hahah
 
11:03 PM
id make some macros if i could move my mouse
 
@MohamedAhmedNabil I usually start with the classes, after I get several headers, I'll write a main that just makes one of each for testing. When I'm done, main looks something like int main(int argc, char**argv) { Program p; p.run(argc, argv);}
sometimes
 
c++ sucks use haskell
or scala
 
sometimes I have the object that parses params in main as well
 
scala is alright
 
11:03 PM
I've never used Scala
 
but haskell is better
 
@MohamedAhmedNabil I leave main() at the bottom of whatever module it's in.
 
Ell
@mohamed you write function declarations in a header, definitions in a source file. You then include the headers of the functions you need from the source files
 
i dont know where up is
please tell me
 
above you
that's up
 
11:04 PM
oh hey its 1am
 
people are tweeting things
 
Guys, You are talking to a stupid begginner here that doesnt make programs that need dividing functions into header files XD
Its all in main.cpp
 
Ell
@mooingduck you have a "main class"?
 
@CatPlusPlus you're on twitter?
 
11:05 PM
im begging you to neot be begginert
 
@Ell usually, once it gets big enough. Holds the "globals"
 
im everywheher
imn a cat
 
your spelling is the awefullest tonight
 
@Mysticial And that question gets an upvote.
 
i had 500ml of vodka with bmi of 16
17
or soemthing
 
11:06 PM
@CatPlusPlus Wut.
 
f7uck you chat im not a bot you fucking thing
 
@EtiennedeMartel he's drunk
 
@EtiennedeMartel imdrunk
 
Yeah, I figured.
Such a weakling,
 
its funy
 
11:07 PM
@CatPlusPlus Seriously?
 
oh god why
 
0.5L vodka with bmi of 17? That's crazy!
 
17 dammit
and maybe mor
 
WTF does that even mean?
bmi = Body Mass Index???
 
11:07 PM
CHAT STOP STOPPING ME FORM CHATTNING
 
Ell
@catplusplus do yourself a favour and get yourself to a hospital before you kill your livers
 
i dont give a damnn
 
@CatPlusPlus coming home from a party?
 
@StackedCrooked how can Vodka have bmi?
 
i was home all along
thats the best p[art
 
11:08 PM
@StackedCrooked he is the party
 
@TonyTheLion Cat's bmi is 17.
 
@Ell He will end up purging the alcohol before any real damage is done.
 
@StackedCrooked oh I see
 
i cant post on sa because id be banne
d
 
Ell
Purging it?
 
11:09 PM
Cat is underweight
 
chat is stopping me from chatting what the hell
 
get fatter, cat
 
@Ell throw up.
 
@CatPlusPlus because you're drunk?
 
i threw up exactly once and i dont indent to reproduce that
drunkposting is bad
 
Ell
11:10 PM
@chimera well its better to be safe than sorry
 
BMI = Weight/Height^2
 
I hope in the loo
 
and
 
Ell
You know what else is bad? getting pissed off your head
 
> 40% vodka is around 0.92g/ml
 
11:10 PM
I hate throwing up
 
try 60%
homemad
 
e
 
17 = 460g/x^2
 
I had a friend who drank 80% Strohrum once
now that shit is strong
the density of oil
 
11:11 PM
80% is near lethal
your friend is dubm
 
yea, had some Coca Cola with it
 
well it dilutes it
 
long time ago
you can't have it pure
 
noshit
 
that's gross
just the smell is offputting
 
Ell
11:12 PM
My friend almost died because he drank too much absynth
Was in hospital for a while iirc
 
absynth is evil
 
@Ell Absynth? Well, duh.
 
i dont want to drink that
you cant post in 4 seconds balh blah blah
i aint flooding you stupid chat
 
Ell
Absinthe sorry
 
thw world is not stable evac evac
 
I made a brute force program but there is something missing
 
0
Q: What kind of data container should I use to store this? XML? An SQL DB? Something else?

Kian MayneI'm writing an autoupdater and the final bit to write is the Newest Version database. The database will be read by PHP and written to by C#, although it's likely that the database would be set via a .NET web request to a PHP page. However, I can't think of the best technology to use. Here is an ...

 
i know my bmi
brute force never work s use rainbow
 
how can i get it to type the generated password outside the program
 
rainbows works
unless they dont
then find another job
 
11:16 PM
@MohamedAhmedNabil what? std::cout << generated_password;
 
@MooingDuck That outputs it to the console, What if i wanted it to get written in a text box or in a webpage
 
bleh ineed to go to sleep
 
@MohamedAhmedNabil then get a stream to those and write to that stream. Or whatever is apropriate for your environment.
 
Can someone help me with this. I have edited this question.
http://stackoverflow.com/questions/12190100/static-global-variable-v-static-global-class-variable
 
@CatPlusPlus Sleep on your side....
 
Xeo
11:20 PM
@KingkongJnr I see "static" and "global" in the link, and I can confidently say: Don't do either.
 
@MooingDuck How do i get a stream to it
 
@MohamedAhmedNabil what is "it"? The answer is: you probably don't
 
@MooingDuck i want it to keep writing whereever the coursor is
 
Xeo
@MohamedAhmedNabil First you get a book
 
@MohamedAhmedNabil on the console?
 
Xeo
11:20 PM
then you get a stream
 
Just purchased a Windows Store account for Metro apps!
 
Xeo
Some of your questions are just so basic, it would really help if you got yourself a book
 
Total cost was: $0.00 charged to my Discover card.
 
@MooingDuck I have a program that keeps writing words. I want that program to keep writing thoose words wherever the typing cursor is. example: I open notepad and put the typing cursor in it. It writes there
 
Funny they need a credit card for a charge of $0.00
 
11:22 PM
@MohamedAhmedNabil and before you say "a textbox", I know many many kinds of textboxes, and each and every one is 100% different
 
@MohamedAhmedNabil I've written programs like that before
SendKeys
 
@MohamedAhmedNabil That's hard
 
Xeo
@MohamedAhmedNabil I strongly recommend trying something less ambituous
 
keybd_event
 
@MooingDuck anyplace the typing cursor. What the program does is the same as me pressing on my keyboard
 
Xeo
11:23 PM
since you absolutely need the OS API for this
 
@MohamedAhmedNabil In Windows it's not very hard
 
Xeo
get the focus window, post key events to it, etc
 
can someone just direct me to the right function, header file , genre and ill be off
 
Xeo
OS API
 
@MohamedAhmedNabil msdn.microsoft.com/en-us/library/… for Windows
 
11:24 PM
@MooingDuck THAT'S C#!
See my link
 
@IDWMaster pft, only the selected tab. select the "C++" tab
 
for C++
 
Xeo
@MooingDuck Yeah, that's C++/CLI
 
@Xeo: Are you kidding or are you serious?
 
yup
 
11:25 PM
It's still .NET
 
@IDWMaster yes it is
 
C# for all intents and purposes, just under a C++ wrapper
Which is created by the C++/CLI interop
 
@IDWMaster that's fine
 
Xeo
@KingkongJnr Serious
 
It's usually not good to add dependencies on .NET
 
11:26 PM
thank you all
 
Especially for something as simple as that
 
@MohamedAhmedNabil I prefer the method that IDWMaster linked personally
 
Xeo
Chances are, the .NET functionality is calling the native API anyways
 
11:26 PM
Or Ell's function
Both methods work
@Xeo Yes, but .NET is also adding a lot of overhead to the call
 
Xeo
Is linked from your link as the better choice
@IDWMaster What I said wasn't meant as a "pro" for .NET, but as a "contra"
 
Ahh.
 
Xeo
Anyways, I'm off to sleep, g'night
 
Hmm. Reading MSDN "This function is subject to UIPI. Applications are permitted to inject input only into applications that are at an equal or lesser integrity level."
Not true!
Sending a mouse move event WILL notify higher-privileged apps of the mouse's new position
if it happens to be over the application window
This could in theory be used for some odd kind of exploit.
 
Ell
I wonder if there will come a standard way to protect js code in webpages
encryption or somwthing
 
11:33 PM
@Chimera ...with mouth facing outward to the side of the bed :p
 
@Ell dubious, it's interpreted client side
@Ell bytecode is more likely
 
@StackedCrooked lol yeah...
 
Ell
@mooingduck yeah I was thinking it would be difficult but flash managed it
 
@Ell I find it more interesting when programs compile to javascript
 
Ell
yeah :L
 
11:40 PM
I find it more interesting when program compile to LISP.
 
Ell
pinvoke is such a good feature. Are there any similar systems?
 
@Ell s/good/god-awful/g FTFY. But yes, most similar closed systems (e.g., JVM) have similar escape hatches. And yes, most of the are pretty awful too.
 
Ell
If I am talking about the right thing
i mean being able to wrap a lower level library in higher level code instead of writing a wrapper in low level code
 
@Ell doesn't that just allow one bit of code to call code from another language?
oh, I hadn't realized "pinvoke" was CLI specific
 
Ell
It does, but you don't have to drop down to the lower level language
 
11:43 PM
@Ell it's just a function, of course you should be able to just call it.
 
@Ell the problem is that javascript has different interpreters (v8, spidermonkey, etc)
 
Ell
But usually you have to write wrapper code in C or whatever. I guess its not that amazing, just think Its nifty
 
@Ell The code for P/Invoke hardly qualifies as "high level", regardless of the language in which it's written. But yes, the idea's been around for quite a while (going back at least as far as Ada 83's "pragma interface").
 
@Ell and if that wasn't enough, v8 doesn't use bytecode, it translates javascript straight to assembler (sort of)
 
Too late to edit, but found a reference.
 
Ell
11:47 PM
Yeah I guess that makes it much more difficult. It just seems like there is no option to hide it besides obfuscation, which I guess can work
 
obfuscation doesn't really work if you have some time to spare
 
@FlorianMargaine heh, you might be surprised
 
@Ell Congratulations, you just reinvented Java applets. Well, okay, it's Java instead of JS, but...
 
@MooingDuck note the "if you have some time to spare", I didn't specify how much :p
 
yesterday, by Jerry Coffin
#include<fstream>
#define B(x,y)(b[i+x][j+y]=='X')
int main(int i,char**v){for(int n=0;n<atoi(v[2]);++n){std::ifstream f(v[1]);*v="out.txt";char b[40][83], O[]="...X.....";for(i=0;i<40;++i)f>>b[i];std::ofstream g(*v);g<<b[0]<<'\n';for(i=1;i<39;++i){g<<'.';for(int j=1;j<79;++j){O[2]=b[i][j];g<<O[B(-1,0)+B(1,0)+B(0,-1)+B(0,1)+B(-1,-1)+B(1,1)+B(1,-1)+B(-1,1)];}g<<".\n";}g<<b[0]<<'\n';}}
fibonacci sequence obviously
 
11:50 PM
@MooingDuck Obviously! :-)
 
no matter what you rename or reformat, that will not look like a fibonacci sequence algorithm :D
 
hello
 
#define _ -F<00||--F-OO--;
int F=00,OO=00;main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO()
{
_-_-_-_
_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_
_-_-_-_
}
Damn morkdown.
@Rapptz Hello.
 
@JerryCoffin I know that one!
 
@MooingDuck I was looking for another, then realized Morkdown would destroy it even worse, so I decided on this one.
 
11:55 PM
@JerryCoffin ideone?
 
Ell
UK galling asleep night ifuty eveyrobe :)
 
@MooingDuck Yeah. ideone.com/BuCTk
 
@ScottW hello
 
@MooingDuck Probably seen this one too -- another IOCCC winner.
 
with std::string is it 1 byte for each character?
 
11:58 PM
@JerryCoffin yeah
@MohamedAhmedNabil sometimes. If it's ASCII then yes. But most code holds UTF8 in strings, not ASCII.
 
@MooingDuck ok
In the case of string data, you don’t need to use the char* cast, because strings already have that type.
binfil.write(str, sizeof(str));
 
@MohamedAhmedNabil Yeah, as long as you're storing something like ASCII or ISO 8859-*. If you store UTF-8, it'll depend.
 
here cstring are meant right?
 
@MohamedAhmedNabil no, because str is a std::string not a char*
 

« first day (684 days earlier)      last day (4264 days later) »