Search found 820 matches

by 0xBADFEED
Sat Dec 12, 2009 11:50 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031249

Re: Coding: Fleeting Thoughts

TheChewanater wrote:The following is part of my latest project. I just thought the variable naming seemed kinda funny.

Why do you have an unused parameter in the function signature?
by 0xBADFEED
Sat Dec 12, 2009 11:27 pm UTC
Forum: Coding
Topic: UI Programming
Replies: 55
Views: 6843

Re: UI Programming

I use GTK and Glade, and I find it fairly enjoyable, occasionally very rewarding. Building user interfaces is a creative process unlike most other programming tasks. Having a tool that takes out most of the tedious bits helps a lot. I mostly use Qt with QtDesigner. As far as UI builders go it's one...
by 0xBADFEED
Sat Dec 12, 2009 10:06 pm UTC
Forum: Coding
Topic: Which language?
Replies: 36
Views: 4535

Re: Which language?

Would I be better off switching to a different language for this task? I've heard I would probably want Python or PERL for regular expressions. Or can I stick with C++ easily to accomplish this task? Yeah, C++ is probably one of the worse languages to pick for this kind of task. Any of the other sc...
by 0xBADFEED
Sat Dec 12, 2009 9:11 pm UTC
Forum: Coding
Topic: UI Programming
Replies: 55
Views: 6843

UI Programming

I'm just wondering who here actually enjoys ui programming. Specifically I mean programming against a widget toolkit like Qt, GTK, etc. (although, I guess web ui programming could also be relevant). Personally, I find it tedious and boring. I've never been much of a fan. Also, coming up with good ui...
by 0xBADFEED
Sat Dec 12, 2009 7:45 pm UTC
Forum: Computer Science
Topic: Remote Game Idea
Replies: 22
Views: 3479

Re: Remote Game Idea

Yes, this is feasible. This is actually the way that the OpenGL architecture is set up even if most people don't use it this way. Do a quick google about the OpenGL client-server model. Some back-of-the-napkin calculations tells me you need a lot better than 512 kbps for decent frame-rate and resolu...
by 0xBADFEED
Sat Dec 12, 2009 12:36 am UTC
Forum: Coding
Topic: Complicated Linux Questions
Replies: 17
Views: 1549

Re: Complicated Linux Questions

Honestly, if you have control over the NumAnalyzer process you should really rethink accepting the data through the argument vector. That is going to be a royal pain. The argument vector is for passing configuration data into the process, not the data itself. If NumDisplayer is already dumping data ...
by 0xBADFEED
Sat Dec 12, 2009 12:31 am UTC
Forum: Coding
Topic: [C++] Elegance problems implementing hashtable.
Replies: 4
Views: 635

Re: [C++] Elegance problems implementing hashtable.

So what are the problems you're having? It's not clear (to me at least) exactly what aspects you're having trouble with. Do you have any specific questions about allocators? What specifically about using the allocator to construct the table is giving you a problem? For keeping track of used values y...
by 0xBADFEED
Fri Dec 11, 2009 1:35 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031249

Re: Coding: Fleeting Thoughts

RoadieRich wrote:That's not a dragon, it's a wyvern.

Actually, I'm fairly sure it's a Trogdor.
by 0xBADFEED
Tue Dec 08, 2009 3:20 pm UTC
Forum: Coding
Topic: Rhinoscript and complex geometry
Replies: 4
Views: 968

Re: Rhinoscript and complex geometry

What kind of stuff are you trying to accomplish?
I've used OpenCascade quite extensively, which is more of just a solid-modeling kernel instead of a full-fledged environment.
by 0xBADFEED
Tue Dec 08, 2009 2:38 am UTC
Forum: Coding
Topic: Python Multiprocessing with variable length returns
Replies: 4
Views: 2014

Re: Python Multiprocessing with variable length returns

For something like this the best thing to do is just try it out and see what kind of performance you're getting. Do some test-runs with a million or so 2-tuples and compare the performance of the different cases. Writing the test case should only take about 15 minutes or so.
by 0xBADFEED
Mon Dec 07, 2009 3:17 pm UTC
Forum: Coding
Topic: Employability?
Replies: 5
Views: 1307

Re: Employability?

There was a thread about freelance earlier. http://forums.xkcd.com/viewtopic.php?f=11&t=45025&start=0&hilit=freelance People seemed rather dismissive, especially of online freelance, where you can't seem to get a worthwhile bid. It wasn't that we were dismissive of freelancing in genera...
by 0xBADFEED
Thu Dec 03, 2009 10:35 pm UTC
Forum: Computer Science
Topic: What are some graduate programs that complement a b.s.c.s.?
Replies: 1
Views: 808

Re: What are some graduate programs that complement a b.s.c.s.?

Umm if you don't have a pretty good idea of what you want to do I'm not really sure a graduate degree is the best course of action.

Any technical degree is probably a good compliment to a CS degree. The question is "What do you want to do with it?"
by 0xBADFEED
Wed Dec 02, 2009 3:45 pm UTC
Forum: Coding
Topic: Software that modifies itself
Replies: 11
Views: 996

Re: Software that modifies itself

A lot of trouble yes, but this pdf cost the company ~$1200. I'm mostly wondering how they accomplish this so I could store user modifiable data required for software inside the executable. Why would you want to do this? What's wrong with an external file? This a lot of trouble to go through for ver...
by 0xBADFEED
Wed Dec 02, 2009 5:00 am UTC
Forum: Computer Science
Topic: Functional Programming?
Replies: 35
Views: 7646

Re: Functional Programming?

Lack of TCO is not the language's fault, it's a compiler bug. It's not a reason to not use recursion in a language like C, but a reason to not use recursion when using tools that don't handle it well. That only applies to functions that are tail-recursive. I agree to an extent. But you work with th...
by 0xBADFEED
Wed Dec 02, 2009 1:12 am UTC
Forum: Computer Science
Topic: Functional Programming?
Replies: 35
Views: 7646

Re: Functional Programming?

And from a (C) coding standpoint, even when not using a functional language, the brevity and flexibility of the functional style can make programs much more manageable and extensible. The key is recursion and function pointers. Recursion is, in my mind, a much more powerful concept than iteration, ...
by 0xBADFEED
Wed Nov 25, 2009 2:19 pm UTC
Forum: Coding
Topic: Regular Expressions
Replies: 15
Views: 1743

Re: Regular Expressions

It's not a limitation of regular expressions. The language described above is regular. It is a limitation of regular expressions. Not in their power, but in their expressiveness. In the same way that it's difficult to write a compiler in Brainfuck because of the limitations of Brainfuck. I didn't s...
by 0xBADFEED
Tue Nov 24, 2009 5:03 pm UTC
Forum: Coding
Topic: Regular Expressions
Replies: 15
Views: 1743

Re: Regular Expressions

Oh, and there's a minimum length as well? Go tell whomever made up the assignment to kindly go fuck themselves. It's most likely that the instructor just has no idea of the limitations of regexes. This is an incredibly bad case that sounds doable off-hand if you don't have a good grasp of regexes a...
by 0xBADFEED
Tue Nov 24, 2009 4:21 pm UTC
Forum: Coding
Topic: Regular Expressions
Replies: 15
Views: 1743

Re: Regular Expressions

As others have said this is really a bad use-case for regexes.
If it were me I'd probably just write a simple procedure to generate a regex that combined all the possible permutations. You'd get a horrendously long regex but it would be correct and within the parameters of the assignment.
by 0xBADFEED
Mon Nov 23, 2009 9:05 pm UTC
Forum: Coding
Topic: A rule-based language?
Replies: 15
Views: 1899

Re: A rule-based language?

There's also CLIPS which is a forward-chaining rule-based system. It was developed by NASA to keep track of procedural checklists and diagnostics for shuttle launches. It has an interactive interpreter that makes it easy to play with. There's also a Python binding so that you can embed a rule-infere...
by 0xBADFEED
Mon Nov 23, 2009 3:18 pm UTC
Forum: Coding
Topic: Protecting code
Replies: 17
Views: 1723

Re: Protecting code

In practice, the most common protection for source code is good security measures on the machines hosting the code and an NDA for anyone that touches the code. This tends to be good enough for the vast majority of circumstances. Unless you're working on government weapons systems, I wouldn't worry a...
by 0xBADFEED
Sat Nov 21, 2009 11:55 pm UTC
Forum: Coding
Topic: Coding: Hacks and Snippets
Replies: 434
Views: 785703

Re: Coding: Hacks and Snippets

IIRC, FILE* isn't even guaranteed to be a pointer to a struct. I've seen instances of it being a void*-casted integer corresponding to the UNIX file descriptor of the file. Yeah, it's not required to even be a pointer to anything. It's not clear to me why it's type FILE* rather than just an opaque ...
by 0xBADFEED
Sat Nov 21, 2009 1:13 am UTC
Forum: Coding
Topic: Coding: Hacks and Snippets
Replies: 434
Views: 785703

Re: Coding: Hacks and Snippets

The other day I wrote a hack and I'm not sure whether to be proud or ashamed. So I have to use this file-format parser that was written by people that really shouldn't have been writing parsers. It parses a special file-format and is really the only (free) C++ library available that does it. It runs...
by 0xBADFEED
Sun Nov 15, 2009 7:34 pm UTC
Forum: Coding
Topic: Protecting code
Replies: 17
Views: 1723

Re: Protecting code

If someone gets their hands on your source code, it's game over. Any protection you add they can remove.
by 0xBADFEED
Sat Nov 14, 2009 3:29 pm UTC
Forum: Coding
Topic: C++ Inheritance Problem - Help Please
Replies: 27
Views: 1977

Re: C++ Inheritance Problem - Help Please

#define private public #include "x.h" #define private private /changes location to REALLY FAR AWAY uh yeah, if you do have the source code but simply aren't allowed to modify the file, that might work? Although it really is a terrible idea. If you do this it's a good idea to manually pull...
by 0xBADFEED
Fri Nov 13, 2009 4:17 pm UTC
Forum: Coding
Topic: C++ Inheritance Problem - Help Please
Replies: 27
Views: 1977

Re: C++ Inheritance Problem - Help Please

PoliteProgrammer wrote:I'd post the entire code but it's MASSIVE. It's not for a school project - I'm actually a scientist, but I'm writing something that wraps around some code written by somebody else in my research group.

Why can't you ask your colleague to add some accessors for you?
by 0xBADFEED
Fri Nov 13, 2009 4:04 pm UTC
Forum: Coding
Topic: C++ Inheritance Problem - Help Please
Replies: 27
Views: 1977

Re: C++ Inheritance Problem - Help Please

PoliteProgrammer wrote:Is C still a friend of B?

No.
by 0xBADFEED
Fri Nov 13, 2009 2:40 pm UTC
Forum: Coding
Topic: C++ Inheritance Problem - Help Please
Replies: 27
Views: 1977

Re: C++ Inheritance Problem - Help Please

What's the context of this? Is this a school assignment, a personal project, etc? You can get access to private functions and members by circumventing the encapsulation mechanisms. Most of the methods are silly, hacky, and likely to break things. BDSM nonsense that lets people satisfy their strange ...
by 0xBADFEED
Thu Nov 12, 2009 2:21 pm UTC
Forum: Coding
Topic: C++: overloading operator()
Replies: 3
Views: 559

Re: C++: overloading operator()

For future reference, you can also use the following syntax:

Code: Select all

Comparator* c;
c->operator()(n1,n2);

Remember, member operator overloads are just methods with special names. As such, you can call them like any other method.
by 0xBADFEED
Wed Nov 11, 2009 3:11 pm UTC
Forum: Coding
Topic: Googles new programming language: Go
Replies: 33
Views: 2881

Re: Googles new programming language: Go

One serious problem I see is a lack of Generics/Type-substitution mechanism. Otherwise looks like cool, clean language.
by 0xBADFEED
Wed Nov 11, 2009 2:18 pm UTC
Forum: Coding
Topic: Careers.StackOverflow.com. Anyone else have one?
Replies: 12
Views: 2312

Re: Careers.StackOverflow.com. Anyone else have one?

spudtheimpaler wrote:None of what I do for a living should be at all regarded by how well I can format tables in MS Word.

You should set your resume in Tex.

It's a lot easier to get it to look how you want, and it will probably get you bonus points at the geekier places.
by 0xBADFEED
Tue Nov 10, 2009 9:05 pm UTC
Forum: Computer Science
Topic: Turing machines
Replies: 15
Views: 4379

Re: Turing machines

headprogrammingczar wrote:Also, I think you need to take your sarcasm detector in for repairs.

I knew that Firnagzen's reply was tongue-in-cheek.

I was just saying his logic didn't follow and that there was more truth in makc's response than he seemed to pick up on.
by 0xBADFEED
Tue Nov 10, 2009 7:32 pm UTC
Forum: Computer Science
Topic: Turing machines
Replies: 15
Views: 4379

Re: Turing machines

Also, makc, we know how people speak. We can list out rules of grammar. Go on, program a machine to carry out an intelligent conversation. :wink: Your analogy is incorrect. You're assuming that grammatically correct implies intelligible, which is completely untrue. For example, My purple obfuscates...
by 0xBADFEED
Tue Nov 10, 2009 7:09 pm UTC
Forum: Coding
Topic: HTML 5 and XHTML 2
Replies: 65
Views: 7791

Re: HTML 5 and XHTML 2

If it makes you feel better, I originally called you a N.E.W.F.A.G instead of a toddler.) There is a reason that word filter is in place. Your belief that what you typed is less offensive than what the wordfilter transformed it to is mistaken. Yeah, let's try to keep it civil. N.E.W.F.A.G may not b...
by 0xBADFEED
Sun Nov 08, 2009 6:08 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031249

Re: Coding: Fleeting Thoughts

InkL0sed wrote:Is there something wrong with liking C strings?

There are lots of things wrong with C strings (i.e. ntbs's).
by 0xBADFEED
Sun Nov 08, 2009 4:27 pm UTC
Forum: Coding
Topic: Parsing the fora's search page.
Replies: 8
Views: 784

Re: Parsing the fora's search page.

What you want is a scraping library.

I've heard that BeautifulSoup is a decent scraper for Python, although I have not used it myself.
by 0xBADFEED
Sun Nov 08, 2009 3:15 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031249

Re: Coding: Fleeting Thoughts

Now what in the world is wrong with that all of the sudden? There's nothing wrong with it, if you're writing C. Most code using char-buffers tends to be slower than std::string (for most use-cases), std::string is much safer, and maintaining or resurrecting string manipulation code written by medio...
by 0xBADFEED
Sat Nov 07, 2009 7:20 pm UTC
Forum: Coding
Topic: First programming language.... under Windows
Replies: 48
Views: 4235

Re: First programming language.... under Windows

Now this is how they recommend it. Is for you to take Cobol first then Java then C++ then Advanced C++. Doesn't this seem wrong to anyone else? That you must learn 3 different languages(which all have a learning curve and which all make it so that you talk more about the language than how to actual...
by 0xBADFEED
Sat Nov 07, 2009 4:16 pm UTC
Forum: Coding
Topic: The "IT DOESN'T WORK!" thread
Replies: 1963
Views: 571539

Re: The "IT DOESN'T WORK!" thread

Raptortech97 wrote:What's a desktop check?

Get out a pencil and paper and work out a small example by hand. Check the values against your expectations.
by 0xBADFEED
Sat Nov 07, 2009 1:52 am UTC
Forum: Coding
Topic: First programming language.... under Windows
Replies: 48
Views: 4235

Re: First programming language.... under Windows

Standard forum answer is Python.

Also, do not do C++. C++ should not be anyone's first language.
by 0xBADFEED
Thu Nov 05, 2009 6:19 pm UTC
Forum: Coding
Topic: C++ conditional casting
Replies: 13
Views: 1590

Re: C++ conditional casting

Yakk wrote:There are many, many, many ways you can do far far far better than this, but the above is a 'least intervention' fix.

Yes, from the looks of it, whoever originally wrote the code wasn't a C++ coder either. That, or it was written long ago before there was any template support.

Go to advanced search