« first day (369 days earlier)      last day (4562 days later) » 

5:00 PM
The prototype sets up a function prototype that expects a char * file, but the function body, the full declaration, has std::string instead
The prototype has to be the same as the body.
 
Oh, so basically, when i tried to update it
i forgot to switch the definition
-_- i wish i could read errors in c++ bettererer
lol.
 
That gives an example. No it's okay, STL has very very very verbose errors.
 
I'm smart
 
Yeah i gotcha on what i was doing wrong. Stl's error is a pain to read, because it doesn't expand in a readable fasihion
but yeah thanks for spotting that on @SSight3
 
No worries. To help avoid errors or confusing syntax, you might want to build the std::vector<std::vector<std::string>>> inside a class that gives readable functions. It will save hair-ripping out later on.
(To everybody): In a twist of irony, what is the easiest way to design my code to prevent it going pear-shaped right at the end?
 
5:06 PM
xD It's kinda too late for me, although tbh i like the char scheme i have, very good readability
no idea :D
 
And by right at the end, I mean, the code compiles, software runs and... oh no, surprise crippling bug that ruins everything!
@oorosco So long as it works for you.
 
well, simply put, the best way to do it is simply to do a lot of design and prototyping
best practices are that for a reason- because they work really well in practice
 
Stupid Java, let me pass methods around, dammit!
 
Yeah I need to start adding levels of abstraction, I'm usually good about that but i am unconfident in my C++ capacity
 
@DeadMG Okay. Design everything. As someone who likes to try grandoise designs (the last 'working' software I wrote downloaded files from a website, sorted them into date order into folders it created, loaded the entire files into memory, converted them into data, then rendered them as images to then be displayed on screen to be scrolled/viewed) and has an ADD approach, do you have any recommendations?
 
5:11 PM
ADD? I've not got that acronym
you mean Agile?
 
@DeadMG Attention deficit disorder. Also known as 'ooooh... shiny!'.
 
ah
 
It's a form of ADHD.
 
that's ADHD here in the UK#
 
ADHD predominantly inattentive (ADHD-PI or ADHD-I) is one of the three subtypes of Attention-deficit hyperactivity disorder (ADHD). While ADHD-PI is sometimes still called "attention deficit disorder" (ADD) by the general public, these older terms were formally changed in 1994 in the new Diagnostic and Statistical Manual of Mental Disorders, fourth edition (DSM-IV). Differences from other ADHD subtypes ADHD-PI is different from the other subtypes of ADHD in that it is characterized primarily by inattention, easy distractibility, disorganization, procrastination, forgetfulness, and lethargy...
 
5:12 PM
@DeadMG Well, my habits of coding are like that. New idea, ping, gets added. Then later on I discover I'm missing a vital function I just overlooked. Whoops.
 
sbi
@DeadMG Actually, there are both forms (well, in medicine/psychology, not sure about British English), since there's forms where people only suffer from attention deficit, without the hyperactivity.
 
Wiki link says that it's still referred to as ADHD, though
ah, well, it doesn't matter
 
It's the same for design. I'll nay mention the coursework project ages back.
For all intents and purposes, ADD/ADHD is the same thing. Except ADD sounds like a computer operation and is therefore a stealth pun.
 
sbi
@DeadMG As I said, you Brits might not differentiate. (How fitting!)
 
the Wiki link says that the medicinal standard document for such terms says ADHD now
:P
 
5:15 PM
I think we've got ADD on the point I was making.
 
kek
 
It says it's a subtype.
 
anyway, there's nothing wrong with adding features incrementally, it happens all the time in maintenance
 
sbi
@DeadMG It might well be in Britain, I think in Germany it's still differentiated. ICBWT, I haven't looked into this for a while.
 
the key is that you need to be finished with a feature before adding the next
or at least, finished designing it
 
5:15 PM
Point is, I go very grandoise on code, and go ADD when writing it. Which means... I get like, feature creep.
 
yeah
feature creep is a fairly universal problem
 
I finish the features. I just... keep adding more. Then I miss out the other ones. Argh.
 
YAGNI. Write only what you need right now.
 
well, you're always going to cut some features to make others
 
@DeadMG s m r t
 
5:17 PM
if you're not happy with the choice of which features you decided to make, then you need to review how you choose to prioritize features
 
@CatPlusPlus This would solve the feature creep. But it poses issues for foresight problems when additional features can't be very easily retroactively added.
 
that's just down to good design
the fundamental fact is adding significant new features is tough and expensive
it's something to accept and get to grips with, and you can't architecture astronaut it away
 
You can always refactor.
 
@DeadMG Sounds good. What about grandoise projects that have a high probability of failure?
 
Oh, I do that all the time.
 
5:18 PM
don't start them in the first place
or
 
user457812
I love my projects that have no chance of success
 
@CatPlusPlus you always need to refactor, unless you're a genius. no design survives contact with actual usage.
 
don't care if you don't finish them
which is mostly where I'm at
 
@CatPlusPlus I'm trying to figure how to make it so classes can be 'swapped out' and replaced with newer ones.
 
@AlfPSteinbach Yeah.
 
5:19 PM
I write projects because I can and to get more experience, not because I think there's a real chance I'll finish
 
Also, if you try to think about every possible feature you end up with those Java-style enterprisey XML-powered monstrosities.
 
@nil Why's that? Hah.
 
user457812
Because I get to code.
 
I like to experiment.
 
@CatPlusPlus The 'adding more features than I need' is probably a key issue.
 
5:20 PM
Also, avoid complete rewrites.
 
@CatPlusPlus What if you're like me, a dead end with experimentation and any other code is really, really complex to grasp (TCP, packet handling, doing something more advanced with graphics, automatic loading etc)?
 
user457812
I like to try doing things I haven't done before.
 
That increases the chance of finishing from, like, 0% to something positive.
@nil Yup.
 
What is like, an expert level of coding for paid programmers? Is it hacked together, or it is neatly organised or... what kind of level would they be at compared to this?
@nil Experimentation is probably the fastest and easiest way to learn about bugs whilst avoiding them in future code. Testing all assumptions works well.
 
mostly, it's well-organised, with the occassional known rough edges
 
user457812
5:22 PM
Expert?
 
of course, that depends on your definition of "expert"
 
Bahah, well-organised.
 
user457812
It's well-organized according to the guy doing the organization
 
@nil I imagine there are... people who'd squibble on expert definitions and what coding styles to use. But programmers who earn money, in short, I.E. not me.
 
it's my birfday tomorrow!
 
user457812
5:24 PM
I think your second sentence there is incomplete
 
user457812
You've got your subject, just needs a verb and an object.
 
I don't like deadlines.
They suck the fun out of everything.
 
@nil How so?
 
user457812
What does "but programmers who earn money" communicate?
 
Don't listen to him, he has a degree on English or something.
 
user457812
5:25 PM
Shhh, don't tell them my secret
 
@nil As opposed to programmers who don't earn money, the example being, not me.
 
I wouldn't hold them up as any kind of example
 
user457812
But it's still a meaningless sentence. If you intended to communicate that, you've failed to do so.
 
you can shit out terrible code that happens to function, and get paid
 
user457812
I've done that! :D
 
5:26 PM
@nil I think failure of communication is subjective to the person it communicates with.
 
I understood just fine
 
user457812
@SSight3 I don't think this is subjective.
 
@DeadMG It must perform a useful task to be worth money though, so... perhaps not as terrible as my TemplateArray class?
 
@DeadMG Shhh, that's a secret.
 
lol
I wouldn't worry too much about classes like that
you learn the STL, and then you move on past TemplateArray classes
just curious, by the way, you spoke about advanced rendering earlier
what were you referring to? I've done some non-trivial 3D
 
5:28 PM
@nil If I verbally say the word 'read', one can either interpret it as 'red' or 'read' by how it sounds. So communication, is subjective.
 
hey guys, I need a simple FIFO that is persistant (if the program crashes, it should already be saved beforehand). It does not need to be fast at all, because it will move really slow (human used)...
 
user457812
@SSight3 However, if you say the word "read" in a sentence, its placement will determine what word it is.
 
Any ideas? I can implement myself, I just need ideas
 
user457812
If it's used as a verb, it'll be read. Otherwise, it may be something like an adjective or noun (red).
 
@sinni800 - sounds like something that's a wrapper around mmap()
 
5:30 PM
@sinni800 Memory mapped file.
 
@DeadMG 2D rendering of images from solar data supplied by the ACE satellite. The graphs plotted (I got some upside down) fairly well, just... the program gave up, I think I didn't have proper bounds checking for text files.
 
Here's a terribly incorrect answer for you all to downvote:
 
ah
 
@awoodland, @DeadMG Interesting
 
-1
A: Build in WinXp 32 for Win Xp 64 Bit

Ivan G.O.It's not possible to build a 64 application on a 32 bit operating system. It is possible to do the opposite, build a 32 bit application on a 64 bit OS.

 
5:30 PM
@nil I meant as a standalone word. Like key, quay, and desert, dessert.
 
@SSight3 3D is fun.
if you're patient and have a good book
 
Sorry, is mmap Linux-only? @awoodland, @DeadMG
 
@GeorgeEdison Perhaps he means it the other way around?
 
no, mmap() is the Unix version
Windows has a completely separate function
 
Sorry, I mixed it up
 
5:31 PM
ok
 
@SSight3 Neither would still be correct.
 
all desktop operating systems offer memory mapped files, realistically
 
user457812
@SSight3 Except, again, there are still ways to determine which word is being used. For instance, context may determine what you're saying.
 
@DeadMG I had trouble with matrices at university. Couldn't grasp them.
 
user457812
If you're just saying the word without context, it's probably meaningless and you're just going to look crazy.
 
5:31 PM
you don't need to understand them for 3D
just stick them together
 
@DeadMG Okay, so where is the Windows variant? I'm coding for Windows
 
I have no idea about how most matrices work and my programs still work
@sinni800 Ask MSDN?
 
user457812
3D stuff is fun.
 
@nil Context can sometimes be ambiguous, therefore, it can be subjective - one person may interpret context differently to another.
 
@DeadMG msdn.microsoft.com/en-us/library/ms810613.aspx looks like it's going to be a fun read
 
user457812
5:33 PM
I like my little 3D Math Primer for Graphics/Game Dev book, even if the name and illustrations are horrible.
 
@DeadMG How do you go about handling them? I tried and the column to row stuff made my head pop.
 
user457812
@SSight3 It can be, but this really has nothing to do with the fact that you wrote a sentence that meant nothing.
 
Awesome, the memory mapped files are accessed like a pointer... This means I can write any memory structure to it... Win
 
@SSight3 You don't need any of that
You know how matrix handling in a DirectX game works?
 
@nil It doesn't mean anything to you, but to others, it does, to myself, it did, and secretly - you knew what it meant anyway, you just want to exercise your English skills.
 
5:34 PM
with objects
matrixC = matrixA * matrixB;
 
user457812
No, I really didn't know what it meant.
 
@GeorgeEdison those answers aren't as dumb as they seem. microsoft has a long history of extremely baffling tie-ins between unrelated things. for example, Class Wizard in MFC refusing to add buttons to dialog if language is not one of 5 special ones. and more similar to the question, the idiocy of 16-bit Windows where you could not create a bitmap of greater depth than your display. very very silly.
 
D3DXMatrixTranslate(&matrix, x, y, z); to make a translation matrix
etc
 
@DeadMG That's how I thought it should have occurred. I always kept trying to put the matrix stuff into a object. I don't know, those graphic classes just... blurred because I couldn't grasp the mathematics.
 
the thing is
 
user457812
5:35 PM
If I actually knew what you were saying, I wouldn't have pointed it out, because I don't ever have to comment on anyone's writing if I understand it.
 
you don't need to actually know or understand matrices
just replace them with "magic" wherever you see them
they're quite effectively abstracted from you by 3D APIs
 
@DeadMG That's a relief. Perhaps an example? Hah.
 
sure
 
@DeadMG Is that commericially viable though? Could I sell that as software?
 
uh
what?
 
user457812
Eh?
 
@DeadMG Say I built software with the 3D API, could I sell it?
 
you mean like
 
user457812
... Do games not sell or something?
 
every game ever written?
 
5:37 PM
 
Well, if it displays a rotating cube and a "hello world" text, then probably not. :P
 
the most lucrative consumer software market?
 
Not that, different libraries have different licences.
I know SFML you can.
 
we're talking about DirectX here
Microsoft give it away for free to anyone
 
user457812
5:38 PM
Then investigate the license. With DirectX, you can do whatever the hell you want.
 
@DeadMG Cool. Makes sense.
 
the same with OpenGL, if you'd rather an API designed in 1920.
 
user457812
Aside from claim you made DirectX for example.
 
If DX or GL weren't free, they'd never replace using the hardware directly.
 
@nil I figure that. I just want to know if I can sell the software. As Glut I believe, for example, you can't.
 
5:39 PM
but Glut sucks balls anyway
 
user457812
My personal opinion on glut is that if you're using it, you should be beaten over the head with a nail bat
 
GLUT is terribly outdated. There's freeglut if you need GLUT-like API.
 
why would you even want to try to develop software with it, is my question
 
user457812
And I'm one of the horrible people who likes OpenGL
 
@nil Well, I failed my graphics module. Figure what they used...
 
5:39 PM
and @nil is one of those insane people who's masochistic enough to like OpenGL
 
I managed to create core profile context yesterday, using only WinAPI!
 
user457812
Well, that's not my problem.
 
user457812
@DeadMG is definitely correct on the masochistic point.
 
SetPixelFormat is weird.
 
I personally prefer DirectX
 
5:40 PM
@DeadMG Explains the English stuff then. LOL.
 
user457812
If I had DirectX available to me, I'd use it
 
I jest. At your expense... mostly.
 
user457812
But if you want to make something that works on platforms other than Windows, well, you should get cozy with OpenGL.
 
The amazing part about creating a core OpenGL context is that you have to create a dummy context first. Why, WHY, did they put it into an extension instead of the WinAPI?
 
Hell knows.
 
5:41 PM
fortunately
"other platforms" pretty much consists of about nothing of the gaming market in general
 
Well, I've never written my own 3D program, or even 2D program (unless you count consoles) from scratch. 2D but only with assistance from SFML.
 
I'd never done it either
 
but I grabbed a fair book and it really wasn't that hard
for me, the main problem isn't 3D, it's actually 2D
fucking Microsoft
 
@CatPlusPlus I generally gloss over with code like that.
 
5:43 PM
Asserts are due to me being too lazy to do error handling properly.
 
"Yeah, we'll deprecate all our 2D elements from D3D9, and then we just won't replace them with anything! Genius!"
 
What? It's perfectly fine code.
 
@CatPlusPlus Didn't say the code is wrong, but the WinAPI is... unreadable and difficult to grasp and partly what makes me run away from programming using windows.h.
 
There are two WinAPI functions here.
 
the Windows API is ridiculously terribly awful
 
5:45 PM
The rest is OpenGL.
 
it was born of the C code of the 1980s
 
It could be better, but for something so burdened with legacy crap, it works fine.
 
what's hilarious is
Metro sucks balls too :D
 
@CatPlusPlus I think. But all these defines and naming conventions... usually for normal types like int and char or wchar... Don't take offence, my opinion doesn't mean much.
 
they exist from before those types really existed
 
5:47 PM
I'm surprised no-one has ever written like, a class for the WinAPI to make it readable?
 
like WinAPI has a VOID macro because at the time, void wasn't in common support
the problem is that the WinAPI is redonculously huge
 
Eeep.
 
it would take forever to convert it into useful things
 
@SSight3 There's MFC. But it's not that nice either.
 
even Microsoft have only just started to try with the new Metro APIs
 
5:48 PM
@user392858 Thank you. Can't win really...
 
MFC is terribad
it's pre-Standard C++, instead of pre-Standard C
 
Well, for games you don't need that much of WinAPI anyway.
 
Okay, I'll just throw this out: I have no idea what direction to take my software programming (ADD thing again).
 
yeah
the thing about games is that you really don't need much WinAPI
COM is hardly the greatest thing ev0r, but it's better
 
With SFML you can avoid touching WinAPI, at least, directly.
 
5:50 PM
Set up window and rendering context, make an input reactor, get personal paths maybe.
Something for sound, I don't think I ever did programmatic sound.
 
eh, pretty much everyone just uses FMOD
 
i'd like to check my ideas for the thing i'm writing, against you folks
currently attacking this: "How can one open a file with a name like [π.recipe], in a way that works with both the g++ and the Visual C++ compilers, and hopefully also other compilers?"
how would you do that, at the C or C++ standard library level?
 
@AlfPSteinbach If portability is to be assured, sounds like you'd have to write your own class.
 
from memory, the wifstream examples should work just dandy
of course, you'd have to be aware that wchar_t is UTF16 or UCS2 on Windows and UTF32 or UCS4 on GCC
but fundamentally, they should work for all BMP characters fine
 
wchar_t is 2 bytes on MinGW, too, AFAIR.
 
5:58 PM
man, banks are pricks :(
 
@DeadMG well whatever streams work just dandy with visual c++. the problem has to do with available constructors, not with the translation performed by the stream.
 
what do you mean? the wifstream should have a wstring or const wchar_t* constructor
 
@CatPlusPlus right. or with any Windows C++ compiler.
@DeadMG the C++ standard does not specify one
 
It should have but doesn't. Use _wfopen to open the file. Optionally, you can then pass the file pointer to the fstream ctor.
 
VS does have one
I've been using it for like, since I started using VS
 
5:59 PM
@AlfPSteinbach - isn't string variants of fstream constructors in C++11 now?
 
@awoodland std::string variant yes, std::wstring variant no
 
You can always use low-level file API, get an OS handle, and then construct a stream using boost::iostreams::file_descriptor.
Though passing UTF-8-encoded filename as std::string should work at least on *nices.
Dunno about Windows, TBH.
 
@CatPlusPlus ah, i didn't think about boost
@CatPlusPlus utf-8 encoded filenames don't work with g++ in Windows (i tested that earlier).
hm i'll have to check out the boost thing. my main idea was to use 8+3 char filenames. however on older Windowses it's possible to turn those off, and they restrict design (you don't have one before the file exist)
 
Boost.IOStreams is cool.
controlPanel.loadRaster.addActionListener(
    new RasterImageAction(rasterPanel, controlPanel.filePath, RasterImageAction.ActionType.LOAD)
);
Java is too enterprise for method passing.
 
user457812
6:16 PM
Java is too enterprise for sanity.
 
akrzemi1.wordpress.com/2011/10/19/…, cool, i didn't know you could teach the Visual Studio debugger how to display things
 
Are there any free visual C++ design tools? Or any free visual interfaces that generate C++ code?
9?
 
6:32 PM
Qt has UI editor.
 
@CatPlusPlus Excuse my ignorance (or rather, potential learning ability), but what's Qt?
 
6:51 PM
Qt Creator's intellisense works better than VS' lately (and this for externally managed Makefile projects).
 
How do you check to see if something exists in a map?
 
It also has refactoring support for renaming classes and member variables. It works quite well. Except it doesn't do the rename on template arguments (e.g. std::vector<MyClass>).
@oorosco if (map.find(obj) != map.end()) { /*found*/ }
 
Okay :) thank
u
 
I'm too easy.
 
lol
I'm on like my 20 somethin hour of coding this damn project all i want to do is finish it -_- btw @StackedCrooked Do you know any tutorials for makefile?
 
6:57 PM
Onoes, I think I've finished that CG assignment.
 
@oorosco Simplest example of a Makefile.
 
Captain Hindsight says I should've done that two weeks ago.
The make tutorial:
1. Don't use make.
The end.
 
Lol
I have to use it for class <,<
 
But they are cool because you can type :make in Vim.
 
I swear i've noticed a lot of practices "don't do" and yet they tell us to do
 
6:59 PM
You can type :!any command.
 
Like?
any: command not found
 
usually not using almost any libraries that would give even competent programmers hell such as making 2d array matrix
:(
Dynamic*
 

« first day (369 days earlier)      last day (4562 days later) »