code logs -> 2010 -> Wed, 06 Jan 2010< code.20100105.log - code.20100107.log >
--- Log opened Wed Jan 06 00:00:38 2010
00:01 * Tarinaky shifty eyes and pokes.
00:01
< celticminstrel>
Yes, I was preoccupied elsewhere, but now I'm not.
00:01
< celticminstrel>
Oh, I have to download them.
00:02
< Tarinaky>
Apparently firefox doesn't like to display .cpp files inline for some reason :/
00:02
< celticminstrel>
I thought it was a server thing.
00:02
< Namegduf>
I think it is, yeah.
00:03
< Tarinaky>
I don't have much control over the server.
00:07
< celticminstrel>
Well, your headers look okay, though I'm not sure whether it's a good idea to inherit from std::map... it looks fine, I guess.
00:08 Derakon[work] [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving]
00:10
< celticminstrel>
To be honest, I don't think I know enough about parsers to be of much help with that particular example...
00:11
< celticminstrel>
If I wanted to parse something, though, I'd probably go with Boost.Spirit (unless it were something very simple).
00:14
< Tarinaky>
I think I understand parsers well enough. The problem is I just fail at project management and code design :/
00:14 AbuDhabi [annodomini@Nightstar-17119448.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
00:16
<@ToxicFrog>
That's largely a matter of practice, I find
00:16
< Tarinaky>
I find it incredibly difficult to practise because of circular logic effects :/
00:17
<@McMartin>
It's generally, for the record, a bad idea to inherit from STL classes. You're better off using them as fields in custom classes instead.
00:17
< Tarinaky>
Okay. I shall do that.
00:17 You're now known as TheWatcher[T-2]
00:18
< Tarinaky>
I knew there was a specific case where you shouldn't inherit.
00:18
< Tarinaky>
And I also read it was a bad idea to have classes within classes.
00:18
< Namegduf>
I think that case is "Using the STL"
00:18
<@McMartin>
Well, you don't want to for STL because they have lots of ugly internals that you might be accidentally wrecking
00:19
<@McMartin>
The most general rule is to never inherit from anything that doesn't have a virtual destructor.
00:19
< Tarinaky>
That's why I made it private >.>
00:19
< Tarinaky>
So I could only touch the public members and the internals would be invisible.
00:19
< Tarinaky>
I shall keep this in mind though.
00:21
< celticminstrel>
What's wrong with classes within classes? :-/
00:21
< Tarinaky>
I read it was bad(tm)
00:22
< Tarinaky>
I also find it ends up causing typos a lot of the time >.>
00:22
< celticminstrel>
Where? And what exactly do you mean by that anyway?
00:22
< celticminstrel>
Are you talking about classes defined inside classes?
00:22 You're now known as TheWatcher[zZzZ]
00:22
< Tarinaky>
I couldn't say where.
00:22
< celticminstrel>
Or members of classes that are of class types?
00:23
< Tarinaky>
Members that are classes.
00:23
< celticminstrel>
Like "class A { class B {}; };" ?
00:23
< Tarinaky>
No.
00:23
<@McMartin>
"class A { B b_; };" ?
00:23
< Tarinaky>
Like class A {}; class B { A foo; };
00:23
< celticminstrel>
Ah.
00:24
<@McMartin>
That's totally fine.
00:24
< celticminstrel>
There shouldn't be any problems with that.
00:24
<@McMartin>
The only thing to watch out for is that A is part of B there, and so will be constructed/destructed as B is.
00:24
< celticminstrel>
Do you remember why they said it was bad?
00:24
< Tarinaky>
Nope.
00:24
<@McMartin>
If you treat it like a reference (the way you would in Java) you will get burned repeatedly because that's not what a reference is.
00:24
< Tarinaky>
I assumed it was just a clarity thing.
00:25
<@McMartin>
Obviously you don't want a class that *just* contains one item and no methods, because that's silly, but composition is a pretty core design tactic.
00:25
< Tarinaky>
McMartin: I never got into Java. My initial response to "constructed/destructed as B is" was 'isn't that the point?'
00:25
< celticminstrel>
Right, you only treat it like a reference if it is declared as such, ;)
00:25
<@McMartin>
That said, C++ references have lots of surprising invariants that you need to watch out for.
00:25
< celticminstrel>
Hm?
00:25
<@McMartin>
What it means to reassign it, when it needs to be assigned, etc.
00:26
< Tarinaky>
So. Can people help me with the task of planning my command-line math Parser?
00:26
< Tarinaky>
Because I've been at this for months and I keep falling over >.<
00:27
< Tarinaky>
And if I had someone else say that something was right I might not lose my bottle over it so much.
00:28
<@MyCatVerbs>
Hey chint. What new sound thingie?
00:28
<@MyCatVerbs>
Sorry for the epic slow reply, I was baking cake. <3
00:32
< Tarinaky>
Can I have cake?
00:36 Netsplit *.net <-> *.split quits: Reiver, @Vornicus, Reiv, KazWork, Chi, Tarinaky, @Kazriko, @jerith, @ToxicFrog, @MyCatVerbs, (+5 more, use /NETSPLIT to show all of them)
00:36 jerith [jerith@Nightstar-bf52129d.slipgate.za.net] has joined #code
00:38 jerith is now known as 963AAAKC1
00:38 jerith [jerith@ServerAdministrator.Nightstar.Net] has joined #code
00:38 ServerMode/#code [+o jerith] by *.Nightstar.Net
00:39 EvilDarkLord [jjlehto3@Nightstar-f1ccbb45.hut.fi] has joined #code
00:39 KazWork [kazrikna@Nightstar-55f6a2b4.xen.prgmr.com] has joined #code
00:39 Reiver [reaverta@ServerAdministrator.Nightstar.Net] has joined #code
00:39 SmithKurosaki [Smith@Nightstar-b5b52a84.dsl.teksavvy.com] has joined #code
00:39 Reiv [reiverta@Nightstar-6583982f.xtra.co.nz] has joined #code
00:39 ToxicFrog [ToxicFrog@Nightstar-b5b52a84.dsl.teksavvy.com] has joined #code
00:39 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
00:39 MyCatVerbs [mycatverbs@Nightstar-f43ca811.blueyonder.co.uk] has joined #code
00:39 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
00:39 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
00:39 Namegduf [namegduf@37647E.E7FE07.A23CD5.23CFB0] has joined #code
00:39 chintimin [zag@Nightstar-d0088b95.or.comcast.net] has joined #code
00:39 Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code
00:39 Chi [omegaboot@Nightstar-5f4513ad.emhril.sbcglobal.net] has joined #code
00:39 ServerMode/#code [+oqoooo Reiver Reiver ToxicFrog MyCatVerbs Vornicus Kazriko] by *.Nightstar.Net
00:39 mode/#code [+o Syloqs-AFH] by Reiver
00:39 jerith [jerith@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
00:40
< Tarinaky>
Hey, am I still on this network?
00:41
< celticminstrel>
No. This network does not exist. We're all a figment of Chi's imagination.
00:42
< Tarinaky>
Chi's imagination is bizarre.
00:42
< Tarinaky>
Wondered if I could have a yes/no on the help :/
01:03 * Chi stabs celmin.
01:07
< celticminstrel>
:P
01:37 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *hums* Can't stay now!]
01:44
<@ToxicFrog>
Tarinaky: do you remember when this way?
01:44
<@ToxicFrog>
*was?
01:46
< Tarinaky>
ToxicFrog: When what was?
01:47
<@ToxicFrog>
Sorry, wrong stack frame
01:47
<@ToxicFrog>
Command line math parser
01:47
<@ToxicFrog>
What is its purpose?
01:49
< Tarinaky>
Practise.
01:50
<@ToxicFrog>
...ok, what does it do?
01:52
< Tarinaky>
Accepts expressions from standard input. Returns to standard output values. I also want it to be able to handle variables.
01:53
<@ToxicFrog>
Ok, seems straightforward enough. What specifically are you trying to practice? Hand-writing of lexers and/or parsers? Using generation tools like flex and bison? All of the above? None of the aboe?
01:56
< Tarinaky>
A mixture of hand-writing of lexers and/or parsers and it's part of my goal to make a dicebot that replaces the Windows-based one I presently use.
01:58
<@ToxicFrog>
Aah.
01:58
<@ToxicFrog>
So most of this would later become the expression parser and evaluator for the dicebot.
01:58
<@ToxicFrog>
What language?
01:58
< Tarinaky>
C++
01:58
<@ToxicFrog>
...ok, you're in for a fun time.
02:02
< Tarinaky>
This I know.
02:02
<@Vornicus>
Why in god's name are you doing text manipulation in C++?
02:03
< Tarinaky>
Because it's what I know :/
02:03
<@Vornicus>
I mean, honestly. There are much better languages than that for... well, pretty much anything.
02:03
<@ToxicFrog>
Tarinaky: learn a new language!
02:03
<@Vornicus>
Okay, rule 1 of being a programmer: learn at least one new language a year.
02:03
<@ToxicFrog>
Most of them are much easier to learn than C++ was.
02:03
< Namegduf>
C++ doesn't really make it any harder.
02:03
< Tarinaky>
And the problems I have tend to extend to things other than the language.
02:03
< Tarinaky>
I normally get part working then feel it's wrong and want to rewrite.
02:03
< Tarinaky>
:/
02:04
<@ToxicFrog>
Tarinaky: then that makes it all the more important that you use a language that won't get in the way while working out the other issues.
02:04
< Namegduf>
You need basic I/O, the ability to iterate over a string, and then the ability to make or use stacks and possibly a tree.
02:04
< Tarinaky>
I don't see how C++ gets in the way tbh. My 'learn 1 language a year' is normally satisfied by the fact that I program for a month then forget it all and relearn it >.<
02:05
<@ToxicFrog>
Also, what Vorn said. You should be constantly expanding your languageset; you'll find that learning new languages gives you new mental tools to use, makes you more proficient with your old languages, and makes it easier to learn more languages in the future.
02:05
< Tarinaky>
Namegduf: I can do all of that.
02:05
<@ToxicFrog>
Namegduf: are you seriously saying that all of that is just as easy in C++ as in a high level language?
02:05
< Tarinaky>
I've played with Python a little and Pascal (don't ask) a little.
02:05
< Tarinaky>
But I just didn't like them.
02:06
< Namegduf>
ToxicFrog: Pretty much. All the same relevant tools are provided, so there's no reimplementing necessary.
02:06
< Namegduf>
Obviously, learning how to USE them is harder...
02:06
< Namegduf>
...but if they already KNOW that, then that's not the problem.
02:06
<@ToxicFrog>
...learning how to use them is harder because they're much less expressive, more unwieldy, and more dangerous.
02:07
< Namegduf>
You're overestimating the sophistication on the part of the language needed for this.
02:07
<@ToxicFrog>
I'm not talking about what is needed.
02:07
<@ToxicFrog>
I'm talking about what is convenient.
02:07
<@ToxicFrog>
Sure, you can write a lexer/parser in C++.
02:07
<@ToxicFrog>
Or in C.
02:08
<@ToxicFrog>
Or in assembler.
02:08
<@ToxicFrog>
Or in raw machine code.
02:08
<@McMartin>
Also, there are at least four general strategies for parsing, and each one is rather specific to a specific programming paradigm.
02:08
<@ToxicFrog>
And while you're doing that, I've already finished, tested, debugged, and released one written in HLL, and had a lot more fun doing so.
02:08
< Namegduf>
No, you don't.
02:08
<@McMartin>
This is why there are three versions of Appel's book on Compiler Implementation and all of the code is architected completely differently.
02:08
< Namegduf>
C++ is *harder to learn*, and takes longer if and when you need to reimplement stuff or find ways to do stuff that other languages take longer to do.
02:09
< Namegduf>
This is not the case for a damn calculator
02:09
< Namegduf>
You need stacks, the ability to build a tree, and basic I/O
02:09
<@ToxicFrog>
Manual memory management alone takes up a significant amount of time and effort that could be better spent working on the program.
02:09
< Namegduf>
Good thing you won't need any of that
02:09
< Namegduf>
Because of the whole STL thing
02:09
<@McMartin>
"The ability to build a tree" requires reference-counted memory management.
02:09
<@McMartin>
At least.
02:09
<@McMartin>
Which C++ has if you add Boost, but again.
02:09
< Namegduf>
...no, not really.
02:10
< Tarinaky>
Namegduf: The problem is though is I want to use this to make a dice parser.
02:10
<@McMartin>
Well, OK. The ability to safely do anything fun with subtrees requires this.
02:10
< Namegduf>
You just only ever create and add stuff to the tree, and always delete the tree recursively at the end.
02:10
< Namegduf>
Right, McMartin.
02:10
< Tarinaky>
I then want to take what I've learned and build a roguelike.
02:10
<@ToxicFrog>
I cannot believe you are seriously arguing that C++ is just as concise, expressive, and easy to use as, hell, any high level language
02:10
< Namegduf>
A calculator does not require fun things.
02:10
< Tarinaky>
Besides. I don't want to argue about my choice of language. Or start an argument on this.
02:10
< Namegduf>
Yeah, okay, for a roguelike, you'll want languages which present things like curses in a more efficient to work with way.
02:10
< Tarinaky>
I just want to do it >.<
02:11
< Namegduf>
ToxicFrog: For the purposes of a *calculator*? Yes
02:11
< Namegduf>
ToxicFrog: The number of language facilities that exercises is really minimal.
02:11
<@McMartin>
eval(raw_input())~
02:11
< Tarinaky>
If I can get the project management and planning thing down I'm golden >.<
02:11
< Namegduf>
C++'s are still harder to learn and use, but once you already know them, that's negated.
02:11
< Tarinaky>
The problem is it evades me!
02:11
< Tarinaky>
This makes me sad.
02:11
< Namegduf>
Tarinaky: Try throwaway prototyping.
02:12
<@ToxicFrog>
Namegduf: well, ok, here's my calculator: for line in io.lines() do print(dostring("return "..line)) end
02:12
<@ToxicFrog>
C++, go!
02:12
< Tarinaky>
Namegduf: What's that?
02:12
<@McMartin>
C++ has a much higher management overhead than HLLs.
02:12
< Namegduf>
That's not implementing a calculator, that's using one provided for you, and you damn well know the difference. >_>
02:12
<@ToxicFrog>
^-- this is the point I've been trying without success to make
02:13
<@ToxicFrog>
Namegduf: ok, the argument you now seem to be making is "for the implementation of small programs, there is no discernable difference between low and high level languages"
02:13
< Namegduf>
ToxicFrog: No, for the implementation of small ones which need very little in terms of integration with external libraries
02:13
<@McMartin>
C++'s basic type ontology is needless complex, not fundamental anywhere larger than a byte without selecting some additional standard to adhere to, and its OO system requires everything to be specified in advance with a fairly ugly interlink.
02:14
< Namegduf>
No graphical interface, no networking, nothing fancy at all.
02:14
<@McMartin>
And if you don't have an IDE managing your header files and source files, you're going to sting the shit out of yourself with stale dependencies.
02:14
< Namegduf>
Basic I/O seems about as annoying in most languages
02:14
<@Vornicus>
pffffffffffaaaahaaaahaaaaa
02:14
<@ToxicFrog>
"for the implementation of small programs which do not require significant external library support, there is no discernable difference between low level languages and high level languages"
02:14
<@McMartin>
This claim defies belief.
02:14
< Namegduf>
Slightly easier, maybe.
02:14
<@ToxicFrog>
Is that an accurate summary of your argument?
02:15
<@Vornicus>
namegduf, don't do that when I'm drinking water.
02:15 * Tarinaky waves for attention.
02:15
<@McMartin>
C and C++ both lack any equivalent of Haskell's "deriving Show" or Objective-C's "%@", which means I/O involving any datatypes will be Hell.
02:15
< Namegduf>
ToxicFrog: Add "When you also know the language already"
02:15
<@ToxicFrog>
If so, all I can ask is what languages are you basing this on?
02:15
<@McMartin>
Tarinaky: Not to be abrupt, but you're mostly saying that you want to have written various programs.
02:16
< Namegduf>
ToxicFrog: Python, Java, C, C++
02:16
<@ToxicFrog>
You seriously see no difference between implementing a desk calculator in Python and implementing one in C++?
02:16
<@McMartin>
Python's core data types are generally good enough that you don't run into the holes in I/O it shares with C/C++; Java's implicit calls to toString() make life a Hell of a lot easier.
02:16
< Namegduf>
Not a huge one. Python's slightly prettier, but the differences between the two are pretty low for these purposes.
02:17
< Tarinaky>
McMartin: I was actually hoping Namegduf would tell me what throwaway protoyping is. Plus I just want the argument to end.
02:17
<@McMartin>
We've had it in various forms a dozen times already, it won't end anytime soon.
02:17
<@McMartin>
"Write something small that does a fraction of it, then throw it away and do it right using what you learned from the smaller task", I believe.
02:17
< Namegduf>
Tarinaky: Make a program, just start coding, and get it to do what you want. Then plan on throwing it away when you're done to redesign it properly, with a view of the whole thing you want it to do
02:18
< Namegduf>
Generally used to get the precise desired functionality figured out to get the wanted functionality defined clearly before starting the real thing.
02:19
< Namegduf>
Slow, but if you keep having it not get anywhere because you're not happy with the design, maybe just finishing it, then rebuilding until you're happy, is an idea to get better.
02:19
<@ToxicFrog>
McMartin: we have? I'm still trying to believe that Namegduf isn't deliberately trolling.
02:19
<@ToxicFrog>
This is basically the "why do anything in C, assembler is just as convenient once you know it" argument.
02:19
< Namegduf>
No, it isn't.
02:20
<@ToxicFrog>
Which I have never seen made seriously.
02:20
<@McMartin>
TF: Well, I have.
02:20
<@ToxicFrog>
;.;
02:20
<@McMartin>
I'm assuming you're "we have?" is "had this argument".
02:22
<@ToxicFrog>
Yes.
02:22
< Namegduf>
Is it entirely implausible that I might think that for stuff which requires nothing outside the standard library, and not touching any of the APIs which are a pain in C/C++, and is mostly concerned with iterating and juggling data structures, the language probably won't make any significant change in difficulty to implementing the algorithm in question?
02:22
< Namegduf>
I'm not saying "They're the same", I'm saying "Come on, C++'s shortfalls barely matter for this if the initial big one isn't a problem."
02:23 * Vornicus has occasionally written assembler even when he knows C can do it because he was /thinking/ in assembler.
02:23
<@ToxicFrog>
Namegduf: given the huge difference in convenience across languages for things like definition, creation and destruction of data structures; passing arguments and returning results; manipulating functions; debugging and testing, and so forth - yes, I do find it implausible
02:23
< Namegduf>
Passing arguments and returning results varies in difficulty?
02:23
<@Vornicus>
but then that doesn't happen often.
02:23
<@ToxicFrog>
Hell, in C++ you have to declare a new type or add extra pointers to the call just to return more than one value
02:23
<@Vornicus>
Namegduf: yes.
02:23
< Namegduf>
Manipulating functions is relevant?
02:24
<@McMartin>
Yes.
02:24
<@ToxicFrog>
And everything needs to be kept in sync with the header files, which isn't hard but is annoying
02:24
<@Vornicus>
Namegduf: every time I've written a calculator, I have stored functions in dictionaries.
02:24
<@McMartin>
The absolute core of a parser is essentially multiple-dispatch, which does not exist in any mainstream language except some dialects of Common LISP.
02:24
<@ToxicFrog>
Namegduf: yes? result = operators[op](lhs, rhs)
02:24
<@ToxicFrog>
vs HIDEOUS SWITCH OF DOOM
02:25
<@McMartin>
Or vs carefully architected inheritance ontology.
02:25
<@ToxicFrog>
Or...yes, what McM said.
02:25
<@McMartin>
Or vs reflective lookup, which is the fourth of the four basic ways to do this.
02:26
< Namegduf>
Definition of data structures: I've found this tends to be "different syntax for the same thing". C++'s additional type specification and public/private is the big difference between its classes and Python's.
02:26
< Namegduf>
(For these purposes, that is)
02:26
< Namegduf>
(There's stuff that varies in difficulty, but you don't need it)
02:27
<@Vornicus>
Namegduf: you mean aside from the pointer/reference/copy differences?
02:27
<@McMartin>
Furthermore, your Python implementation is, I suspect, going to be a direct reskin of your C++ solution
02:27
< Namegduf>
Nah.
02:27
<@McMartin>
As opposed to the dictionary-of-functions version which will be vastly shorter and not require use of classes at all.
02:28
< Namegduf>
If you really want to skip lexing, yes
02:28
< Namegduf>
Or store tokens as simple strings/numbers
02:28
<@McMartin>
List of simple strings and numbers, yes. Python allows heterogeneous lists.
02:29
<@McMartin>
If you want to represent a tree, you can actually make that a list of strings, numbers, and other lists.
02:30
< Namegduf>
Ew.
02:30
< Namegduf>
I assume you'd have some rule whereby the operator was the first thing in the list or something, to make that work.
02:30
<@Vornicus>
Namegduf: why not? that's how Lisp does it.
02:30
< Namegduf>
Vornicus: Well, for one, if I wanted to use Lisp and Lisp design ideas
02:30
<@McMartin>
If it's strictly an infix calculator though I'd instead just have the parser transform it to postfix.
02:30
< Namegduf>
I would be writing in Lisp
02:31
<@McMartin>
Because that way 3 + 4 + 5 because 3 4 5 + + and not (+ 3 4 5)
02:31
< Namegduf>
I find it kinda weird as a concept of a "node"
02:31
< Namegduf>
That's all.
02:31
< Namegduf>
A list which doesn't just contain children, it contains the internal data of the node.
02:33
< Namegduf>
See, all these things are a "little" easier, but when you already know the language, they're still pretty much a small fraction of the work next to the whole "implementing the algorithm" part.
02:33
<@McMartin>
(Actually, when I did this it remained infix but the rule was that every other element was an operator. That way I only had to group by precedence and it made the predictive parser result directly evaluatable.)
02:34
<@McMartin>
(I used classes instead of raw numbers and lists though to keep them uniform.)
02:34
< Namegduf>
Maybe even more than a little, but I still don't think it's a vast thing when writing something.
02:34 * Namegduf tends to flick between coding C++ and Python or Java regularly
02:35
< Namegduf>
I find I spend far more time thinking about the problem than the implementation, which is kinda my point.
02:36
< Namegduf>
The overhead isn't so substantial I spend more time thinking about "doing this in the language" than solving the problem.
02:37
< Namegduf>
I don't think it's so vast as all that in this kind of case, and I think the size of it is lowest in cases like these.
02:38
< Namegduf>
I'll accept that you've found things different.
02:38
<@ToxicFrog>
It may not be vast, but it still makes a difference.
02:38
<@ToxicFrog>
Even cutting out time spent header wrangling would be worthwhile.
02:46 * ToxicFrog abruptly realizes he can remove all the "focus" hackery by redefining Menu:inBounds()
03:02 Attilla [Attilla@FBC920.DDABA2.BBDFC7.BE7CCD] has quit [Connection reset by peer]
03:06
< Tarinaky>
Stupid question. If class A's constructor uses a method declared as virtual. Will classes derived from A that overload that method call class A's method or their own?
03:07
< Namegduf>
In class A's constructor, it'll call class A's
03:07
< Namegduf>
Because it is not yet a class B
03:07
< Namegduf>
I believe
03:07
< Tarinaky>
Even if the method is virtual?
03:07
< Tarinaky>
Damn.
03:08
< Namegduf>
Yeah. It's not true in Java, which surprised me.
03:08
< Tarinaky>
I'm not touching Java.
03:18
<@McMartin>
Calling virtual functions inside a constructor is one of those things you should try to avoid doing if possible anyway.
03:18
< Namegduf>
Yeah, primarily for that reason (the behaviour can be surprising)
03:22 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
03:23
< Tarinaky>
As far as I can tell it's the only way of doing what I want without upsetting type-checking.
03:24
< Tarinaky>
On an unrelated note. WTF. Why is this class not inheriting?
03:24
<@Vornicus>
Tarinaky: what are you up to?
03:25
< Tarinaky>
I'm trying to get a set of token classes.
03:25
< Tarinaky>
Gah. >.> This is what I mean about having to re-learn C++ every year, lol.
03:26
< Tarinaky>
It ends up being so long since I touch it that I forget something or mix something up.
03:26 Vornicus is now known as Phas
04:15
<@ToxicFrog>
Bollocks to this
04:15 * ToxicFrog changes his event dispatcher so that the default is to not propagate
04:15
<@ToxicFrog>
...actually, no
04:15 * ToxicFrog changes it so that failing to return a value indicating whether or not to propagate is an error
04:33
< Rhamphoryncus>
ToxicFrog: Good philosophy. Reject bad input. I like.
04:34
<@ToxicFrog>
Rhamphoryncus: well, I was using "no return" as "default propagate"
04:34
<@ToxicFrog>
This however led to irritating bugs where it was not returning a value because I'd forgotten to do so.
04:34
< Rhamphoryncus>
ToxicFrog: Good philosophy. Reject ambiguous input. I like.
04:42
< Tarinaky>
...Why is C++ not letting me copy a string iterator?
04:42
< Tarinaky>
>.<
04:43
<@McMartin>
Iterators can't be cached; that's part of the iterator contract.
04:43
<@McMartin>
If you're going to be dicking around with stuff like that, try to find copies of "Effective C++" and "Effective STL."
04:43
<@McMartin>
"More Effective C++" can mostly be skipped.
04:44
< Tarinaky>
"itFront = itBack = pInputBuffer->begin()" << is the statement throwing an error.
04:47
< Tarinaky>
I fail to understand why.
04:48
< Tarinaky>
I was rather led to believe this was legal.
04:50
< Tarinaky>
Doesn't help I have a colossal headache. :/
05:03
< Tarinaky>
brb, need painkillers.
05:19
< Rhamphoryncus>
Tarinaky: not missing a semicolon are you?
05:19
< Tarinaky>
I spotted it.
05:19
< Tarinaky>
I needed to use a const_iterator.
05:19
< Rhamphoryncus>
obviously heh
05:50 * Tarinaky head-desks.
05:50
< Tarinaky>
"is_numeric(*itBack) && itBack < pInputBuffer->begin()" << What is wrong with this? :/
05:51
< Tarinaky>
I've triple checked and is_numeric is evaluating as true when it should do.
05:51
< Tarinaky>
So itBack < pInputBuffer->begin() is evaluating as false constantly.
05:51
< Tarinaky>
And I can't see why.
05:51
< Tarinaky>
Oh. Wait.
05:51 * Tarinaky facepalms.
05:51
< Tarinaky>
I see now.
05:51
< Tarinaky>
Please ignore that.
05:51
< Tarinaky>
That was a very silly question.
06:04
< Tarinaky>
Yay! I have a working tokenizer!
06:05
<@Phas>
Yay!
06:05
<@Phas>
Wait, Tarinaky, are you honestly writing a tokenizer in C++?
06:05
<@Phas>
(and if so, why?)
06:05
< Tarinaky>
Because I couldn't get flex to work.
06:06
<@Phas>
Okay. Why C++ then?
06:06
< Tarinaky>
Because I wanted to.
06:06 * Phas shrugs.
06:06
<@Phas>
Your funeral.
06:06 Phas is now known as Vornicus-latens
06:06
< Tarinaky>
It has been.
06:09
<@ToxicFrog>
...wait, all this is because you couldn't get flex working?
06:14
< Tarinaky>
We've had this discussion before.
07:35 963AAAKC1 is now known as jerith
08:00 kaz_ [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
08:00 kaz_ [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [Client closed the connection]
08:01 kaz_ [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
08:01 kaz_ [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [[NS] Quit: Leaving]
08:01 kaz_ [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
08:56 Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has quit [Client exited]
09:03 MyCatVerbs [mycatverbs@Nightstar-f43ca811.blueyonder.co.uk] has quit [Ping timeout: 121 seconds]
09:05 Netsplit *.net <-> *.split quits: kaz_
09:09 629AAAAAB [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
09:09 629AAAAAB is now known as KazMil
09:10 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [[NS] Quit: Leaving]
09:10 KazMil is now known as Kazriko
09:29 SmithKurosaki [Smith@Nightstar-b5b52a84.dsl.teksavvy.com] has quit [Ping timeout: 121 seconds]
09:29 ToxicFrog [ToxicFrog@Nightstar-b5b52a84.dsl.teksavvy.com] has quit [Ping timeout: 121 seconds]
09:41 You're now known as TheWatcher
10:14 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
10:21 SmithKurosaki [Smith@Nightstar-a68aafef.dsl.teksavvy.com] has joined #code
11:02<~Reiver> #Code encourages silly questions.
11:02<~Reiver> I never said it had to put up with willful stupidity. :p
11:06<~Reiver> HOME
11:39 Attilla [Attilla@FBC920.DDABA2.BBDFC7.BE7CCD] has joined #code
11:39 mode/#code [+o Attilla] by Reiver
11:54 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
12:00 Attilla [Attilla@FBC920.DDABA2.BBDFC7.BE7CCD] has quit [Ping timeout: 121 seconds]
12:06 Attilla [Attilla@FBC920.A5C359.B8500D.B4F94A] has joined #code
12:06 mode/#code [+o Attilla] by Reiver
12:43 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *hums* Can't stay now!]
13:44 AnnoDomini [annodomini@Nightstar-de0fdf5d.adsl.tpnet.pl] has joined #code
13:44 mode/#code [+o AnnoDomini] by Reiver
14:07 AnnoDomini [annodomini@Nightstar-de0fdf5d.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
14:17 AnnoDomini [annodomini@Nightstar-f2f65ee2.adsl.tpnet.pl] has joined #code
14:17 mode/#code [+o AnnoDomini] by Reiver
14:24 gnolaptop [gnolaptop___@Nightstar-da08be36.dialup.ice.net] has joined #code
14:31 gnolaptop [gnolaptop___@Nightstar-da08be36.dialup.ice.net] has quit [Client closed the connection]
14:32 gnolaptop [gnolaptop___@Nightstar-dada7d08.dialup.ice.net] has joined #code
14:44 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [[NS] Quit: Leaving]
15:21 Chi is now known as Chi|goodbye-cruel-world
15:40 ToxicFrog [ToxicFrog@Nightstar-a68aafef.dsl.teksavvy.com] has joined #code
15:40 mode/#code [+o ToxicFrog] by Reiver
16:53
< chintimin>
oof. usb 3 takes 4 pci-e lanes?
17:06
< Chi|goodbye-cruel-world>
:O
17:06
< Chi|goodbye-cruel-world>
I didn't know there was a USB 3 yet
17:06
<@AnnoDomini>
Why are you becoming an hero, Chi?
17:09
< gnolaptop>
Chi|goodbye-cruel-world: the spec's been around a while, but I don't think anything's actually implemented it yet.
17:20
< Chi|goodbye-cruel-world>
AD: hehe, just getting away from the world for a while. going to resort.
17:20
< Chi|goodbye-cruel-world>
gonna leave this on while I'm gone. <_<
17:29 Derakon[work] [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code
17:29 * Derakon[work] eyes the microscope program.
17:29
< Derakon[work]>
Where the fuck is your main function?!
17:29
< Derakon[work]>
How am I supposed to debug a crash-on-startup if I can't figure out how you start up?
17:30
< Derakon[work]>
I'm guessing this is some wx-related madness...but sheesh.
17:30
< gnolaptop>
Ah, The Daily Seb.
17:30 * jerith carefully doesn't suggest strace.
17:31
< Derakon[work]>
Jerith: great idea. Port it to Linux and I'll do that.
17:31
< jerith>
What am I porting?
17:31
< Derakon[work]>
The microscope program.
17:31
< jerith>
Ah, right.
17:32
< jerith>
Anyway, I didn't suggest it. :-)
17:32
< Derakon[work]>
But seriously, the only references to "main" in the C++ code are to the main thread in Python.
17:32
< Derakon[work]>
Heh. Right.
17:33
< jerith>
sed in a print at the start of every function and see what order they happen in?
17:33
< Derakon[work]>
There's about 5k lines of C++ here.
17:34
< Derakon[work]>
And I don't know of a good way to programmatically recognize function definitions.
17:35
< gnolaptop>
Ah, C++? grepped for IMPLEMENT_APP?
17:36
< Derakon[work]>
Yeah, I found that. Don't have a clue what it does, though.
17:36
< Derakon[work]>
And MyApp::MyApp and MyApp::OnInit don't seem to be running -- or at least, the printfs I put as their first lines don't show up.
17:38
< gnolaptop>
It basically tells wx in which class the main window's init function (OnInit) is. The incompatible main() madness (e.g. main, winmain, etc) is then handled by wx.
17:38
< Derakon[work]>
I'd not heard of any "incompatible main() madness" before.
17:39
< gnolaptop>
Ah. There is one. When there's windowing involved.
17:42
< Derakon[work]>
Okay, thanks.
17:44
< gnolaptop>
WinMain is the main culprit. But IIRC, there was wonkiness involved with the earlier MacOSes as well.
17:52 gnolaptop [gnolaptop___@Nightstar-dada7d08.dialup.ice.net] has quit [[NS] Quit: Arrived]
17:56 Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code
18:00
< Derakon[work]>
Why am I stuck doing work for what I lack not only aptitude and experience, but also any inclination? :(
18:00
< Derakon[work]>
Wrestling with archaic versions of Visual Studio is not my idea of a fun time!
18:09 ToxicFrog [ToxicFrog@Nightstar-a68aafef.dsl.teksavvy.com] has quit [Connection reset by peer]
18:12 Vornicus-latens is now known as Vornicus
18:27 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
18:30 Chi|goodbye-cruel-world [omegaboot@Nightstar-5f4513ad.emhril.sbcglobal.net] has quit [Ping timeout: 121 seconds]
18:34 Alek [omegaboot@Nightstar-cea7846f.emhril.sbcglobal.net] has joined #code
18:51
<@McMartin>
Generally speaking, a lot of GUI programs actually want to be main(), and will re-#define the token "main" to be something else.
18:51
<@McMartin>
Even on MacOS, SDL still does this (since the real main() is an Objective-C program).
18:54
< Derakon[work]>
The thing that bugs me about this program is the lack of a clear entry-point.
18:54
< Derakon[work]>
AFAICT the crash I'm getting is occurring before any code I control is run.
18:56
<@McMartin>
Linking error?
18:58
< Derakon[work]>
No, it compiles.
18:58
< Derakon[work]>
But when it runs, it crashes with an access violation immediately.
18:59
<@McMartin>
Linking error involving dyld?
18:59
<@McMartin>
Or dlopen?
18:59
<@McMartin>
I have no idea how wx initializes itself
19:00
< Derakon[work]>
Me neither.
19:00
< Derakon[work]>
For that matter, I have basically no idea how Visual Studio compilations work in general.
19:01
<@McMartin>
First cut: .o -> .obj, .a -> .lib, .so -> .dll
19:02
< Derakon[work]>
I knew that much, though not so explicitly.
19:02
<@McMartin>
Second cut: The target format is COFF-derived, not ELF- or Mach-O derived, and COFF cannot directly link against DLL files. Thus, each DLL also has a corresponding .lib file that needs to be impedance-matched with its DLL, that calls and caches the results of dlopen() and equivalents.
19:03
<@McMartin>
With sanely designed DLLs this should be basically invisible. I have no confidence in wx's sanity, though.
19:04
< Derakon[work]>
"Impedance-matched"?
19:05
<@Vornicus>
impedance matching is something from electronics - you have to match the impedance of the various bits for them to not blow each other out.
19:05
<@Vornicus>
or something like that.
19:05
<@McMartin>
Removing the EE metaphor, the API and ABI used by the .lib have to match the ones in the .dll you drop in.
19:05
<@McMartin>
Upgrading the dll to one sufficiently different will cause it to not work.
19:05
< Derakon[work]>
Ah.
19:06
< Derakon[work]>
The .lib and .dll files I'm using were all created within 8 minutes of each other.
19:06
< Derakon[work]>
(Back in 2007)
19:18
<@McMartin>
OK, that part should be fine.
19:19
<@McMartin>
Try running it in WinDbg, see which DLL is failing?
19:19
< Derakon[work]>
I get a prompt to open a debugger when it crashes. It's wxbase28uh_vc.dll.
19:20
<@McMartin>
And you were recently changing some C++ stuff?
19:20
< Derakon[work]>
(I'm not certain how I'd open this app in WinDbg since it's run via a batch script that sets up some environment variables beforehand)
19:20
<@McMartin>
Or did a Python change trigger this?
19:20
< Derakon[work]>
I've changed the Makefile to build against Python2.5 instead of Python2.4.
19:20
<@McMartin>
WinDbg can attach to arbitrary processes, including which it's asking you if you want to open it in a debugger.
19:20
< Derakon[work]>
Ah? Okay.
19:20
<@McMartin>
But if you have the DLL, there is that.
19:21
<@McMartin>
If I had to guess, some of the Python bindings changed and it's trying to use them blindly.
19:22
< Derakon[work]>
TMK the "wx" and "python" aspects are fairly separate here; wouldn't I be seeing the crash where I start up the Python interp in that case?
19:22
<@Vornicus>
"tmk"?
19:22
< Derakon[work]>
To my knowledge.
19:23
<@Vornicus>
ah
19:23
< Derakon[work]>
(The crash is 10 levels deep into wxbase28uh_vc.dll, which is called by wxmsw28uh_core_vc.dll, which is called by omx01.exe, which is what I compiled)
19:24
<@McMartin>
Can you identify any fun method names from the DLL's exported symbols?
19:26
< Derakon[work]>
Um, I'm seeing "wxbase28uh_vc.dll!1000dcf9()".
19:26
< Derakon[work]>
I.e. I'm getting offsets, not function names.
19:32
<@McMartin>
Han on a sec, there's a switch to flip for that
19:33
<@McMartin>
Try clicking "func info" on the Calls window.
19:33
< Derakon[work]>
I'm in the Visual Studio debugger here, not WinDbg; haven't installed that yet.
19:33
<@McMartin>
Oh
19:33
< Derakon[work]>
Lemme get on that.
19:36
< Derakon[work]>
...hrmph. Build computer has no network access. That's gonna make downloading the OS symbols difficult.
19:37
<@McMartin>
It's very likely that the top five or six user32 and kernel32 stack frames are the ones responsible for the Abort/Debug/Continue dialog box.
19:42
< Derakon[work]>
Okay, attached WinDbg to the program after it crashed and I'm looking at the "has encountered a problem and needs to close" dialog. All the callstack has is ntdll!DbgBreakPoint.
19:44
< Derakon[work]>
Tried running the batch file from within WinDbg, hit 'g', got the same dialog. Isn't the exception supposed to show up within WinDbg instead?
19:45
< jerith>
Wouldn't it just be easier to compile with --no-bugs? *flees*
19:51 jerith [jerith@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
19:51 Netsplit *.net <-> *.split quits: @AnnoDomini, Kazriko
19:52 Netsplit over, joins: Kazriko
19:52 jerith [jerith@Nightstar-bf52129d.slipgate.za.net] has joined #code
19:52 Netsplit over, joins: @AnnoDomini
19:52 mode/#code [+o Kazriko] by Reiver
19:52 mode/#code [+o jerith] by Reiver
19:52
<@McMartin>
Derakon: Also open the Processes and Threads window; the debugger attaches by inserting a thread into the target process that does nothing but trigger a debugger interrupt.
19:57
< Derakon[work]>
Here's the output of the debugger when I start the batch file within it. Lines 31 and later occur after I click the "Don't send report" button in the crashed-process dialog. http://pastebin.starforge.co.uk/88
19:58
< Derakon[work]>
I'm not certain how to read the Processes and Threads window, but it just shows "000:16d0 cmd.exe" and indented below it, "000:14fc".
19:58
<@McMartin>
Just click through them looking for goodies, mainly.
19:59
< Derakon[work]>
They don't seem to respond to clicks beyond that I can collapse the second line by clicking on the +/- button.
20:01
<@McMartin>
... you attached to cmd.exe somehow. You need to attach to python.exe or loldoom.exe or whatever the target app is.
20:01
<@McMartin>
Double-clicking a thread should pick that thread.
20:02
< Derakon[work]>
Ah, yes, that would make sense. I'm attached to cmd.exe because that's what's used to run batch files -- and the program is run from within a batch file because it has to get some environment variables set up before it can run.
20:02
< Derakon[work]>
IOW I can't run the program directly from within WinDbg.
20:03
< Derakon[work]>
(Unless it has some way to set environment variables that I don't know of, which could easily be possible)
20:04 Attilla [Attilla@FBC920.A5C359.B8500D.B4F94A] has quit [Ping timeout: 121 seconds]
20:05 Attilla_ [Attilla@FBC920.A5C359.B8500D.B4F94A] has joined #code
20:05
<@McMartin>
You can run the batch file on your own, then connect to the crashed process, which *should* be some process that isn't cmd.exe. Windows does not fork/exec.
20:06
< Derakon[work]>
Yeah, when I tried that, I got a very flat stack trace, which is why I tried running the batch file. But will give it another shot, see if there's anything in the processes and threads window.
20:07
< Derakon[work]>
Yeah, all I have in the callstack is ntdll!DbgBreakPoint.
20:07
<@McMartin>
There *has* to be some other thread in the process, or else it's not even loading in the first plcae.
20:07
<@McMartin>
*place
20:07
< Derakon[work]>
Though I am connected to omx01.exe (i.e. the microscope program). Two threads: 000:1208 and 001:ed4.
20:08
<@McMartin>
Check the other thread.
20:08
< Derakon[work]>
Ahh, that does have a longer stack.
20:09
< Derakon[work]>
kernel32!RegisterWaitForInputIdle => omx01!init_omx => MSVCR71!_XcptFilter => kernel32!UnhandledExceptionFilter => faultrep!ReportFault, etc.
20:10 * Derakon[work] tries to figure out where init_omx is defined. It appears to be mixed in with SWIG. Oh glory be.
20:11
< Derakon[work]>
#define SWIG_init init_omx
20:11
< Derakon[work]>
Yay.
20:16
<@McMartin>
Swig is still in Python 2.4 world, if I had to guess.
20:16
< Derakon[work]>
...I had not thought of that.
20:16 * Vornicus :(s because all the binaries for the various mac emulators only appear to live in one place, which is missing. :(
20:17 Attilla_ [Attilla@FBC920.A5C359.B8500D.B4F94A] has quit [Connection reset by peer]
20:17 Attilla [Attilla@FBC920.A5C359.B8500D.B4F94A] has joined #code
20:17 mode/#code [+o Attilla] by Reiver
20:21 AbuDhabi [annodomini@Nightstar-f2f65ee2.adsl.tpnet.pl] has joined #code
20:23 AnnoDomini [annodomini@Nightstar-f2f65ee2.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
20:24
<@Attilla>
Hmm, for some time I have been wandering about the source of this problem and am curious as to whether this is due to my ISP or somehow related to the router or what. But some (seemingly random, to me) websites or servers ignore me (or I may be ignoring them with reply pings) and all that happens is that my browser or whatever waits around (under "sending request") for a while before eventually gi
20:24
<@Attilla>
ving up, all I know is it is somehow related to this house (which has a different setup both IP and router-wise than anywhere else I have lived in)
20:25 AbuDhabi [annodomini@Nightstar-f2f65ee2.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
20:25
<@Attilla>
Ah but the more interesting thing that I bring up, is that by use of proxy servers I can access whatever
20:26 AnnoDomini [annodomini@Nightstar-f2f65ee2.adsl.tpnet.pl] has joined #code
20:26 mode/#code [+o AnnoDomini] by Reiver
20:29
< Derakon[work]>
Off to lunch.
20:37
<@Attilla>
Anyone have the foggest as to the nature of this?
20:53
<@AnnoDomini>
The nature of what?
20:56
< chintimin>
Not so far, no
21:00 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
21:00 mode/#code [+o ToxicFrog] by Reiver
21:00
< Rhamphoryncus>
Attilla: a traceroute might be informative
21:00 * Derakon[work] returns
21:00
< Derakon[work]>
Thanks for the help with debugging, McM. Sorry I forgot to thank you earlier.
21:04
< gnolam>
AnnoDomini:
21:04
< gnolam>
[21:24] <Attilla> Hmm, for some time I have been wandering about the source of this problem and am curious as to whether this is due to my ISP or somehow related to the router or what. But some (seemingly random, to me) websites or servers ignore me (or I may be ignoring them with reply pings) and all that happens is that my browser or whatever waits around (under "sending request") for a while before eventually gi
21:04
< gnolam>
[21:24] <Attilla> ving up, all I know is it is somehow related to this house (which has a different setup both IP and router-wise than anywhere else I have lived in)
21:04
< gnolam>
[21:25] <Attilla> Ah but the more interesting thing that I bring up, is that by use of proxy servers I can access whatever
21:10 Reivles [reiverta@Nightstar-6583982f.xtra.co.nz] has joined #code
21:13 Reivles [reiverta@Nightstar-6583982f.xtra.co.nz] has quit [[NS] Quit: ]
21:14 Reiv [reiverta@Nightstar-6583982f.xtra.co.nz] has quit [Ping timeout: 121 seconds]
21:28
< Derakon[work]>
Hrm. Google says that SWIG 1.3.30 is compatible with Python 2.5, and we're using 1.3.35 here...
21:28
< Derakon[work]>
Oh, wait, but there's a reference to python24.lib.
21:29
<@McMartin>
Do you need to regenera... aha, busted
21:29
< Derakon[work]>
...no. I'm looking at an out-of-date copy of the Makefile. Stupid, Derakon.
21:30
< Derakon[work]>
Man, what a rookie mistake to make.
21:31
<@McMartin>
Hm?
21:31
< Derakon[work]>
Looking at the wrong file.
21:32
<@McMartin>
Oh
21:34 * Derakon[work] goes through the interface file with a machete, doesn't see any explicit references to Python version numbers while he's there.
21:34
< Derakon[work]>
(That is, the SWIG interface file)
21:34
< Derakon[work]>
It appears to mostly be a bunch of function declarations.
21:35
<@McMartin>
Can SWIG be "make reallyclean"ed or something for a full regeneration?
21:35
< Derakon[work]>
Probably. I've not tried using SWIG before, but I think you run it to generate the SWIG glue files before you actually do any compilation.
21:38 * Derakon[work] hits up the tutorial, tries to regenerate the SWIG interface files, discovers that omx_swig.i depends on sebTypemaps.i. Of course. Why would I think otherwise?
21:39 * Derakon[work] finds sebTypemaps, opens it, is confronted by these two lines:
21:39
< Derakon[work]>
/check //#inlude "Python.h"
21:39
< Derakon[work]>
/what is this ??: # define NO_IMPORT_ARRAY
21:40
< Derakon[work]>
Hm, those second two lines should have double slashes at the front.
21:41
<@McMartin>
>_<
21:43 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
21:46
< Derakon[work]>
Aaaand sebTypemaps.i depends on sebInclude.h, which has a syntax error in it!
21:46
< Derakon[work]>
Though I'm not sure what's wrong with the line "typedef std::complex<float> complex32;"
21:47
<@McMartin>
It just says "syntax error"?
21:48
<@McMartin>
Because yeah, off the top of my head that looks fine.
21:48
< Derakon[work]>
C:\Priithon_25_win\PriithonSrc\common\Include\sebInclude.h<29>: Error: Syntax error in input(1).
21:48
<@McMartin>
Huh.
21:48
<@McMartin>
Is the line before it missing a semicolon?
21:49
< Derakon[work]>
The line before it is "#include <complex>"
21:49
<@McMartin>
Because what you quoted looks OK unless one of the tokens has been re-#defined somehow.
21:49
<@McMartin>
Can you write something with just those two lines and see if it works?
21:49
<@McMartin>
(Also, uh, dumb question, but it's not trying to compile that with gcc instead of g++?)
21:49
< Derakon[work]>
The file in question: http://pastebin.starforge.co.uk/89
21:50
< Derakon[work]>
I don't know what it's using; this is Windows, remember.
21:51
<@McMartin>
MSVS actually doesn't understand C except to the extent that C++ resembles it
21:51
< Derakon[work]>
Yeah, I remember going over that with TF awhile back.
21:51
< celticminstrel>
GCC usually can tell whether something is C or C++ from the file extension, can't it?
21:51
< Derakon[work]>
The point is that GCC has different syntax rules for C and C++.
21:51
< Derakon[work]>
MSVC just assumes that everything is C++, and since C++ is generally a superset of C, things usually work out.
21:52
< celticminstrel>
Does it? I suppose that's probably true...
21:52
< Derakon[work]>
Yep.
21:52
<@McMartin>
MSVC explicitly doesn't support non C++ C extensions, including 90%+ of C99.
21:52
< celticminstrel>
I thought you could tell MSVC to consider the source files to be ANSI C.
21:52
<@McMartin>
C89 it supports, yes. It goes by file extension, IIRC.
21:52
< celticminstrel>
But this is kind of irrelevant, since that example is definitely C++.
21:53
<@McMartin>
gcc-ing a C++ file will make it choke unless you use -language or invoke it as g++, ime.
21:53
< celticminstrel>
Oh, it's not automatic then..
21:53
< celticminstrel>
..."ime"?
21:53
<@TheWatcher>
in my experience
21:53
<@McMartin>
quite
21:55
<@AnnoDomini>
FFS.
21:55
<@AnnoDomini>
How do I use autonumbering in a query inflicted upon an Access database?
21:57
<@AnnoDomini>
I'm trying to use it in an Insert Query.
22:01
<@AnnoDomini>
Ah, I see. The bastard who wrote the query I was basing mine on skipped the fields declaration part.
22:01
<@McMartin>
PUNTINGS
22:02 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
22:19 AnnoDomini [annodomini@Nightstar-f2f65ee2.adsl.tpnet.pl] has quit [[NS] Quit: Blargh.]
22:33
<@Attilla>
Rhamphoryncus: traceroute? (sorry for the slow reply, got caught up with something)
22:34
<@Attilla>
Hmm, windows has tracert program but now how to work it
22:38 * Derakon[work] comments out the include of sebInclude.h, which allos sebTypemaps.i to pass...he then gets a syntax error in the actual interface file he wants to compile, on this line:
22:38
< Derakon[work]>
int histRightBrace(const int cam) throw(wxString,char *);
22:38
< Derakon[work]>
Note that the line immediately preceding is identical save that it's histLeftBrace instead of histRightBrace.
22:39
<@McMartin>
I'm wondering if this is involving falling afoul of SWIG somehow.
22:39
<@McMartin>
i have no experience with SWIG.
22:40
< Derakon[work]>
A little googling turned up http://groups.google.com/group/linux.debian.user/browse_thread/thread/e02352c38e 1e53a3
22:40
< Derakon[work]>
So I tried adding the "-c++" option, and it passed.
22:41
< Derakon[work]>
I guess I can add SWIG to my resume now. ?.?
22:42
<@Attilla>
Okay, here's a tracert to an example website that times out for me when it's fine http://pastebin.starforge.co.uk/90
22:42
<@Attilla>
I Ctrl-C'd after a while beacause I didn't feel like waiting until 30 hops
22:46
<@Attilla>
Unless that is really a part of this whole process then welp i'll do it again but reduce the hops
22:47
<@Attilla>
Nah, it just says "Trace Complete." if you let it finish
22:50
< Derakon[work]>
Ah. You can't find Python.h because you used <Python.h> instead of "Python.h".
22:50
< Derakon[work]>
I guess I shouldn't really be surprised.
22:51
<@McMartin>
I guess that's why std::complex<vector> was a syntax error, as was throws~
22:51
< Derakon[work]>
No, I think that was due to assuming that it was in C mode instead of C++ mode.
22:51
< Derakon[work]>
Since that went away when I passed "-c++" to swig on the commandline. Now I'm trying to compile the files it generated though.
22:52
<@McMartin>
Er, yeah, I meant the -c++ but
22:53
< Derakon[work]>
Ah, righto.
22:55
< Derakon[work]>
...okay. And I think it's SWIG itself that's generating that include with angle brackets, seeing as a search of the codebase reveals that the preceding comment "/* Python.h has to appear first */" only shows up in generated SWIG files (and has proper grammar, to boot).
22:57
< Derakon[work]>
Odd. Manually modifying the file to use quotation marks doesn't fix it. It really can't find Python.h, and it should be able to by my reading of the makefile.
22:57
<@McMartin>
Case sensitivity?
22:58
< Derakon[work]>
...unless, of course, the Makefile defines a bunch of include paths and then never uses them.
22:58
<@McMartin>
Shouldn't be, because Windows, but if it's using nt.dll directly or something wackiness might ensue.
22:58
<@McMartin>
Oh, make.
22:58
<@McMartin>
[<3]
22:58
<@McMartin>
[<3] being "I love you so much. Now burn in the incinerator plzkthx"
22:59 * McMartin forgets whether or not NTFS can be made case-sensitive, or if it's instead always CICP
23:00
< Derakon[work]>
Here's the Makefile: http://pastebin.starforge.co.uk/91
23:00
< Derakon[work]>
Note how CXXFLAGS and CPPFLAGS are defined and ignored.
23:01
<@McMartin>
;_;
23:25
< Derakon[work]>
Finally got it building. Turns out the includes were a red herring; the actual problem was that SWIG generated both omx_swig_wrap.cxx and omx_swig_wrap.c, and nmake was trying to compile the latter as a C file without any includes or anything.
23:26
< Derakon[work]>
So after all that, it builds...and crashes in exactly the same way as before.
23:27
< Rhamphoryncus>
Attilla: the next step, if I had any idea how, would be to run tracert through a proxy x_x
23:28
< Rhamphoryncus>
Attilla: also try running it to a site that does work normally
23:29
<@McMartin>
Derakon: Ugh.
23:35 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *hums* Can't stay now!]
23:37
<@Attilla>
Rhamphoryncus: Do you have any remote machines I can run it through? :3 (I mean I know of public proxies that I can http through but that's about it)
23:39
< Rhamphoryncus>
eh I'll run it
23:40
< Rhamphoryncus>
http://pastebin.starforge.co.uk/92
23:41
< Rhamphoryncus>
The end site looks like it drops ping and traceroute packets, which makes diagnostics harder
23:41
<@Attilla>
http://pastebin.starforge.co.uk/93 Here's one to news.bbc.co.uk
23:42
<@Attilla>
As you can probably guess, the first few are router and ISP
23:43 Alek [omegaboot@Nightstar-cea7846f.emhril.sbcglobal.net] has quit [Client closed the connection]
23:43
< Rhamphoryncus>
http://downforeveryoneorjustme.com/www.lb.national-lottery.co.uk
23:44
< Rhamphoryncus>
They presumably use a ping though, which gets dropped, as I can load the site in firefox
23:44
<@Attilla>
It does work though yeah, I just loaded it via Opera Turbo (which I recall works by a bunch of proxies and some image compression)
23:45
<@Attilla>
Perhaps my connection for some reason is sensitive to ping dropping?
23:45
< chintimin>
McM: no, NTFS can't be case-sensitive.
23:46
< chintimin>
Filenames are defined with 8.3 versions of them, hell.
23:46
< Rhamphoryncus>
Attilla: no, it doesn't look like a local issue
23:48
<@Attilla>
Hmm, any idea what the issue is then?
23:48
< Rhamphoryncus>
Attilla: I note that the last hope on the failed site went through highspeedoffice.net, while the working site went a different way
23:49
< Rhamphoryncus>
If you do a couple more failed and a couple more successful and verify that pattern it'd show where the fault is
23:49
<@Attilla>
Okay, the problem is I think a few of the failed are individual servers so they may be somewhat elusive
23:50
< Rhamphoryncus>
Could be a routing error
23:50
< Rhamphoryncus>
Sending the packets down a path that can't handle them
23:50 Alek [omegaboot@Nightstar-4188accc.emhril.sbcglobal.net] has joined #code
23:51
< Rhamphoryncus>
Do you know anybody else on your ISP?
23:51
< Tarinaky>
Hmm. I'm having trouble working out how to do top-down parsing :/
23:52
<@Attilla>
Rhamphoryncus: Nope
23:52
< Rhamphoryncus>
If you can verify that's where the failure shows up, and other people on your ISP have that problem, then it's not you. It might be an error of the ISP itself, it might be an error in another part of the internet, but either way you have to talk to your ISP to get it fixed
23:52
< Rhamphoryncus>
anyway, afk. Gotta cook
23:57
<@Attilla>
http://pastebin.starforge.co.uk/94 A failed one to Penny Arcade par examplé
--- Log closed Thu Jan 07 00:00:39 2010
code logs -> 2010 -> Wed, 06 Jan 2010< code.20100105.log - code.20100107.log >