code logs -> 2009 -> Thu, 23 Apr 2009< code.20090422.log - code.20090424.log >
--- Log opened Thu Apr 23 00:00:12 2009
--- Day changed Thu Apr 23 2009
00:00
<@McMartin>
I suspect you will find that after you do it by hand it is still wrong, because something else is wrong.
00:00 KBot is now known as KarmaBot
00:03
<@McMartin>
It seems in this case you really shouldn't need to interrogate anything other than the format's RGB masks and set the OpenGL constant accordingly.
00:03
<@McMartin>
The code I linked insists OpenGL use RGBA, and uses defines based on byte order to ensure this happens.
00:07
<@gnolam>
And the SDL_CreateRGBSurface example I just found in the docs gives me... nothing.
00:07
<@gnolam>
I'm going to be forced to use fucking /GLUT/ soon.
00:08
<@McMartin>
Um
00:08
<@McMartin>
Did you initialize SDL_VIDEO?
00:09
<@McMartin>
If SDL_CreateRGBSurface is returning NULL you have no screen.
00:09
<@McMartin>
That's like malloc returning NULL.
00:09
<@McMartin>
And if you blame SDL for this I'm going to refer you casually to the First Law of Bug Reports.
00:10 You're now known as TheWatcher[T-2]
00:11
<@gnolam>
It's not returning NULL.
00:11
<@gnolam>
I have no idea /what/ it's returning in fact.
00:12
<@gnolam>
I don't feel especially tempted to dump its output byte by byte. :P
00:13 You're now known as TheWatcher[zZzZ]
00:14
<@TheWatcher[zZzZ]>
Use ddd ;P
00:18
<@gnolam>
But upon doing that anyway, it's apparently returning... solid black.
00:19
<@gnolam>
Way to go there, SDfaiL!
00:20 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
00:20
<@McMartin>
Uh
00:21
<@McMartin>
What exactly was he expecting?
00:21
<@McMartin>
"Hey, give me a new blank surface!" "Here you go" "OMG WTF"
00:22
< Derakon>
Dunno, but his habit of blaming the library isn't health~
00:22
< Derakon>
Er, healthy.
00:22
<@McMartin>
Yeah, hence, First Law of Bug Reports.
00:24
<@ToxicFrog>
What _is_ the FLoBR?
00:24
< Derakon>
PEBKAC.
00:24
<@McMartin>
"Give the developers credit for basic intelligence."
00:24
<@McMartin>
Given that, you know, UQM and Aquaria both exist, claiming that SDL is not in fact capable of 2D rendering is an unlikely claim at best.
00:25
<@McMartin>
It means that when there are binary distributions of something, your first theory should be "I can't compile this" as opposed to "This doesn't compile."
00:25
<@McMartin>
Unless the binary is explicitly not built from the distributed source.
00:25
<@McMartin>
And even then, it still shouldn't be your first theory.
00:27
<@McMartin>
"SDL_CreateRGBSurface -- Create an empty SDL_Surface"
00:27
<@McMartin>
This last outburst was at "Alt-F4 CTD" levels.
00:28
< Derakon>
CTD == Crash to Disk?
00:33
<@McMartin>
Desktop.
00:33
<@McMartin>
As in, "I press Alt-F4, and the application goes away. WTF"
00:33
< Derakon>
Ahh.
00:45 Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code
00:45 mode/#code [+o Vornicus] by ChanServ
00:53 SmithKurosaki [~jess@Nightstar-24858.acanac.net] has quit [Ping Timeout]
01:10 SmithKurosaki [~jess@Nightstar-24858.acanac.net] has joined #code
01:17 Reiv [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #Code
01:22 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Ping Timeout]
01:28 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has joined #code
01:36 KBot [~karma.bot@Nightstar-28972.neoplus.adsl.tpnet.pl] has joined #Code
01:37 KarmaBot [~karma.bot@Nightstar-28221.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
01:39 KBot is now known as KarmaBot
02:07 Reiv [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has quit [Quit: classtiem]
02:16
<@MyCatVerbs>
McMartin: I hope the FLoBR does not preclude whining about API usability?
02:18
<@MyCatVerbs>
Specifically, that "I admit that the evidence suggests that libfoo is indeed capable of foo'ing the relevant bars, and there exist programs that use it to do so. However, I deny the claim that it is possible for mortals to get libfoo to do anything useful."
02:18
<@MyCatVerbs>
Er, that that --^ is a valid complaint in some cases.
02:23
<@McMartin>
That can be.
02:24
<@McMartin>
It emphatically doesn't apply to SDL, though.
02:24
<@McMartin>
This is in fact one of the rare cases where 10,000 n00bs can't be wrong.
02:27
<@MyCatVerbs>
"If, of 10k n00bs attempting to, only ~10 will ever grok your API, then your API sucks."?
02:27
<@McMartin>
Yeah.
02:27
< Derakon>
"If 10k noobs can do it, the problem is not with the API".
02:28
<@McMartin>
But if you can point at 10k that got it, which you can, for SDL, since it's the one everyone and their dog uses, then it is as Derakon said.
02:28
< Derakon>
Project Euler has a similar line in their FAQ.
02:28
<@McMartin>
And arguably even with a small percentage if you can scrape up 10k you're in good territory regardless.
02:28
< Derakon>
"However, when so many people have hit the target and one marksman misses ten times on the run, he/she can hardly shoot his/her own foot and conclude that because the gun is working properly the fault must lie in the target."
02:34
< simontwo>
that reminds me of the list of how to shoot yourself in the foot with various programming languages.
02:34
< Derakon>
There's a variety of those.
02:34
< Derakon>
The only related line I remember is "With C it is easy to shoot yourself in the foot. With C++ it is harder but you blow your whole leg off." That should give you some idea how long it's been since I read those kinds of jokes. ¬.¬
02:37
<@McMartin>
It's actually must easier in C++, and in fact as you begin to pull the trigger you suddenly have seventeen feet, each of which is then shot
02:38
<@McMartin>
All I have to say is delete[]
02:38
< Derakon>
"In general, if you are posting in For Beginners and your code includes the word "char", you have a bug. std::string roxxors the big one one one one." -- GameDev.net sig.
02:47 Finale [c0cb88fd@Nightstar-14595.mibbit.com] has joined #code
02:48
< Finale>
what the heck does this mean?
02:48
< Finale>
wait gah.
02:48
< Finale>
can I get voice please?
03:00 mode/#code [+v Finale] by ToxicFrog
03:02
<@ToxicFrog>
Finale: done.
03:03
<+Finale>
http://mibbit.com/pb/p8dDlY
03:03
<+Finale>
what does this mean? -_-
03:03
<@McMartin>
It means somebody needs to be kicked in the head.
03:04
<@ToxicFrog>
What McM said.
03:04
<@McMartin>
That said, it does in fact do what it says on the tin.
03:04
<@McMartin>
It's matching [0-9]*
03:04
<@ToxicFrog>
Actually, it says IsNumber, not IsNatural~
03:04
<@ToxicFrog>
Basically, it returns true if the input consists entirely of decimal digits
03:05
<@ToxicFrog>
But the way it does this is by removing all 0s from the string, then all 1s from that, and so forth, and finally testing if the length of the result is zero ;.;
03:05
<+Finale>
...
03:06
<+Finale>
oy.
03:06
<+Finale>
actually, it returns true if the input does not consist solely of numerics.
03:07
<+Finale>
or wait.
03:07
<+Finale>
sorry.
03:07 * Finale headdesks.
03:08
<@ToxicFrog>
Anyways, no matter what language you're using, that's almost certainly the wrong way to do it.
03:08 * ToxicFrog weeps quietly in the corner
03:09
< Derakon>
If it is the right way to do it, then you are using the wrong language.
03:09
< Derakon>
See also: INTERCAL
03:12 Kazuma [~Kazuma@Nightstar-19318.fudgeman.org] has joined #code
03:13
<+Finale>
uh.
03:13 * Finale just read that the sum of all primes under a million is also a prime.
03:13
<+Finale>
is this true or not? O_o
03:13
<@ToxicFrog>
Write a program to verify it :P
03:14
< Kazuma>
what Toxic said
03:14
<+Finale>
you know, I should.
03:14
<+Finale>
I really should.
03:14
<+Finale>
now to hunt up a compiler on this work machine. >_>
03:14
< Derakon>
It'll be a good learning experience.
03:14
<+Finale>
hmm. maybe basic. <_<
03:14
<@ToxicFrog>
03:14
<@McMartin>
Python over BASIC.
03:14
< Kazuma>
BASIC? really? there's better
03:14
<@McMartin>
It's also going to be easier to find.
03:14
<+Finale>
I don't know python yet.
03:15
<@ToxicFrog>
Dude, Python is standard on everything and fits this problem well.
03:15
< Kazuma>
learn it!
03:15
<@ToxicFrog>
It's also easy to learn.
03:15
< Kazuma>
I'm coding an addition for an Anope module to learn C++
03:15
<@ToxicFrog>
I also recommend Lua, or Haskell if you want to bend your mind in new ways.
03:15
<+Finale>
yyyep. Basic's the only compiler/interpreter on here.
03:15
< Kazuma>
RoR
03:15
<+Finale>
funny how edit.com is still bundled with windows. :P
03:16
< Kazuma>
Ruby makes my mind go "STOP THAT! STOP TORTURING ME AAAARGH"
03:16
< Tarinaky>
It's not difficult to do in C tbh.
03:18
<@ToxicFrog>
Kazuma: for me it evokes Garret's line from Lord Bafford's Manor: "how pretentious can you get?"~
03:18
< Kazuma>
haha
03:18
<@ToxicFrog>
Finale: seriously, it takes thirty seconds to install a decent interpreted language and only a few minutes to get a C or C++ development environment
03:19
< Kazuma>
it came with my machine
03:20
<+Finale>
all I know is basic, cobol, and c++
03:20
<+Finale>
oh, and html.
03:20
<+Finale>
but I doubt that's the right tool. >_>
03:20
< Kazuma>
I'm learning C++
03:21
<@ToxicFrog>
HTML is a markup language, not a programming language. Different skills.
03:21
<@ToxicFrog>
(related, but different)
03:21
<+Finale>
I know.
03:21
< Tarinaky>
I'd be surprised if you couldn't (theoretically) do it in javascript.
03:21
< Tarinaky>
Although I'd expect it'd run so slowly as to be a bad idea.
03:21
<+Finale>
I'd be surprised, honestly, if html couldn't do it.>_>
03:21
< Kazuma>
C++ can totally do it
03:22
<@ToxicFrog>
Of those, C++ is probably the least bad choice, but seriously, get yourself a high-level language
03:22
<+Finale>
I'm trying.
03:22
< Tarinaky>
Yeah, I did something similar in C++ and it wasn't difficult at all. iirc the only thing I used outside the C subset was the vector template.
03:25 * Finale falls over.
03:25
<+Finale>
tomorrow. I'm falling asleep. -_-
03:25
<+Finale>
thanks.
03:25 Finale [c0cb88fd@Nightstar-14595.mibbit.com] has quit [Quit: http://www.mibbit.com ajax IRC Client]
03:25
< Tarinaky>
Sleep is for the weak and normal! But mostly the normal.
03:26
<@McMartin>
And the vector template is generally What You Want because C arrays in C++ are full of ghost spiders.
03:26
< Tarinaky>
ghost spiders?
03:27
<@McMartin>
process-killing memory corruption bugs based on invisible attributes.
03:27
<@McMartin>
char *x = new char;
03:27
<@McMartin>
char *y = new char[20];
03:27
<@McMartin>
Both of those are char *
03:27
<@McMartin>
However, "delete y" will corrupt your program's entire memory region beyond repair.
03:28
<@McMartin>
You must use "delete[] y", and there is no way to tell which is necessary without knowing exactly where you got that pointer to deallocate.
03:28
<@McMartin>
Because both are Just Pointers.
03:29
<@McMartin>
With std::vector, you just use the vector destructor and never have to worry.
03:30
< Tarinaky>
I'll have to bare that in mind. I've never done anything that's needed me to know/use 'delete'.
03:49
< Kazuma>
man, virtual machines take forever to install :s
03:50
<@McMartin>
No streaming VMs for you?
06:03 Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Connection reset by peer]
06:06 * McMartin finds his bug, headdesks
06:07
<@Vornicus>
??
06:07
<@McMartin>
Trying to load data from the wrong directory
06:07
<@McMartin>
SHOCKINGLY, NOT BEING LOADED RIGHT
06:07
< Derakon>
Hee.
06:08
<@Vornicus>
gee.
06:10
<@McMartin>
However, this turns out to be because my packaging script was trusting cp -r to work right.
06:12
<@Vornicus>
Work right, like, not give any errors, or work right like Do As Advertised?
06:20
<@McMartin>
It did the wrong thing and returned success
06:21
<@Vornicus>
aha
06:25
<@McMartin>
(to wit, I'm trying to copy a directory, and it copied its contents into the parent of the directory I intended, due to a quirk in the way cp -r treats single-entry directories
06:25
< Derakon>
One thing that bugs me about cp -r is that, to my knowledge, it's impossible to say "copy this directory over here and replace the existing directory of the same name."
06:26 Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Quit: ]
06:26
<@McMartin>
Anyway, stuff works, my day of work is done.
06:26
< Derakon>
At 22:26.
06:26
<@McMartin>
Unless the build breaks, but I can look at that at 23:00.
06:26
<@McMartin>
We ship in a week, so~
06:26
< Derakon>
What, again?
06:27
<@McMartin>
beta 1, release.
06:27
<@McMartin>
Actual release is at the end of the month.
06:27
<@McMartin>
beta was a couple weeks ago.
06:27
<@McMartin>
Making Beta was much more frantic, honestly.
06:29
< Derakon>
Well, the program's supposed to be feature-complete by Beta, but bug-free by 1.0.
06:29
< Derakon>
But as a general rule, at any given time you've fixed all of the serious bugs you know about.
06:29
< Derakon>
Whereas you haven't necessarily implemented all the features.
06:29
<@McMartin>
That's only the case when your software base is mature in the first place.
06:30
<@McMartin>
We're getting to the point where we've fixed all the serious bugs we know bout.
06:30
<@McMartin>
We had several dozen outstanding blocker bugs the week before beta shipped and the software was unusable despite each individual feature working in isolation.
06:30
< Derakon>
Ick.
06:30
<@McMartin>
This is, incidentally, the difference between a "program" and a "solution".
06:31
< Derakon>
Heh.
06:31
<@McMartin>
More formally, when the unit tests give you no confidence in the systemic tests.
06:46 AnnoDomini [AnnoDomini@Nightstar-28972.neoplus.adsl.tpnet.pl] has joined #Code
06:46 mode/#code [+o AnnoDomini] by ChanServ
06:47
<@McMartin>
Alternately, I could break the build in a different configuration and be stuck here another 20 minutes making sure it's fixed.
06:52
<@McMartin>
(thank you so much, C++, for assuming that a header/source file discrepancy meant I intended to overload and not catching this until the linker.)
06:56
<@McMartin>
(Couldn't "this definition doesn't match any previously seen declarations with the same name" be at least a warning?)
07:00 Derakon is now known as Derakon[AFK]
08:23 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out]
08:23 SmithKurosaki [~jess@Nightstar-24858.acanac.net] has quit [Ping Timeout]
08:41 Namegduf [namegduf@86.29.157.ns-3965] has quit [Ping Timeout]
08:54 NSGuest-33 is now known as EvilDarkLord
09:10 You're now known as TheWatcher
09:46
<@Reiver>
McM!
09:46
<@Reiver>
Haskell has insanity in store for me
09:46
<@Reiver>
I'ma learnin' parsers
09:52
<@TheWatcher>
... I though you knew that when you started learning it? ¬¬
09:56
<@McMartin>
Parsec is pretty awesome, but be aware that its language class is not one of the standard ones.
09:56
<@McMartin>
It's LL(k) with backtracking
09:57
<@McMartin>
That also said, if you're playing with "Write Yourself A Scheme in 48 Hours" I have to say it didn't impress me much as an instructional tool
09:58
<@McMartin>
Though following along is probably all right, the exercises assume you have way more knowledge about both Haskell and Scheme than it pretends is necessary
12:03 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
13:43 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
13:43 mode/#code [+o gnolam] by ChanServ
14:05 Namegduf [namegduf@86.29.157.ns-3965] has joined #code
15:12 SmithKurosaki [~jess@Nightstar-24858.acanac.net] has joined #code
15:13 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
15:13 mode/#code [+o ToxicFrog] by ChanServ
16:04 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
16:05 Syloqs_AFH is now known as Syloqs-AFH
17:12 Derakon[AFK] is now known as Derakon
19:38 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has joined #code
19:52 Wirehead [~Mark@91.110.62.ns-11282] has joined #Code
19:53 Wirehead [~Mark@91.110.62.ns-11282] has quit [Quit: ]
20:31 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Ping Timeout]
20:36 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code
20:36 mode/#code [+o GeekSoldier] by ChanServ
20:59 * TheWatcher ponders, is vaguely mystified and somewhat concerned about why phpBB3 keeps the userid in a cookie, as the session code never seems to validate or use it
21:05 * simontwo is somewhat concerned that phpBB ever existed.
21:12
< EvilDarkLord>
It's the logical extension of PHP.
21:18
<@TheWatcher>
unfortunately, it's one of the least shitty of the free foras :/
21:49
< simontwo>
TheWatcher, FluxBB (which was PunBB in 2.x)
21:49
< simontwo>
or else there's "News-Portal", then you can just run a newsgroup behind the scenes. :-)
21:54 * TheWatcher eyes fluxbb, notes that it might actually be a viable option, in a few versions
22:02
< Derakon>
...to determine if n is prime, you only need to check numbers up to sqrt(n), right?
22:03
<@AnnoDomini>
So far as I know.
22:04
<@McMartin>
Oh hey, Inform 7 updated, giant new site and all kinds of stuff. http://www.inform7.com
22:04
< Derakon>
...oh, wait, I had a problem of modifying the front of my list of primes so that low numbers weren't considered.
22:10 Consul [~consul@Nightstar-1864.dsl.sfldmi.ameritech.net] has joined #code
22:10 mode/#code [+o Consul] by ChanServ
22:15
<@McMartin>
Inform now allows a spread of alternative notations for units:
22:15
<@McMartin>
A weight is a kind of value. 10kg specifies a weight. 1 tonne specifies a weight scaled up by 1000. 1g specifies a weight scaled down by 1000.
22:26
< simontwo>
Derakon, yes, but that is just one simple optimization you can do.
22:33
< simontwo>
Derakon, another one is discarding numbers containing one of a fixed set of low factors (e.g. 2, 3. 5).
22:43 Consul [~consul@Nightstar-1864.dsl.sfldmi.ameritech.net] has quit [Operation timed out]
22:46 AnnoDomini [AnnoDomini@Nightstar-28972.neoplus.adsl.tpnet.pl] has quit [Quit: Oh hai. In teh beginnin Ceiling Cat maded the skiez An da Urfs, but he did not eated it.]
22:47 Consul [~consul@Nightstar-1864.dsl.sfldmi.ameritech.net] has joined #code
22:47 mode/#code [+o Consul] by ChanServ
23:01 Gruber [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
23:01 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Ping Timeout]
23:18
<@MyCatVerbs>
Are you callin' 10kg a weight over there, McMartin?
23:19 * MyCatVerbs picks up the Systeme Internationale d'Unites brand handy-dandy baseball bat.
23:29
< Kazuma>
you know what's fun? when you run a program that's so WONDERFULLY done, that it thinks of almost everything
23:29
< Kazuma>
and then you run across the one thing they didn't think of
23:30
<@McMartin>
It's somebody else's changelog.
23:30
<@McMartin>
The Metric Units extension is, however, likely to equate weight and force.
23:30 C_tiger [~cheng@Nightstar-5625.hsd1.ca.comcast.net] has quit [Operation timed out]
23:30
<@McMartin>
It's worth noting that kg is a standard unit of force just as much as lb is a unit of mass; they're defined under accelerations of 1g.
23:32 C_tiger [~cheng@Nightstar-5625.hsd1.ca.comcast.net] has joined #code
23:32 mode/#code [+o C_tiger] by ChanServ
23:40 * MyCatVerbs grumbles at McMartin.
23:40 Consul [~consul@Nightstar-1864.dsl.sfldmi.ameritech.net] has quit [Ping Timeout]
--- Log closed Fri Apr 24 00:00:46 2009
code logs -> 2009 -> Thu, 23 Apr 2009< code.20090422.log - code.20090424.log >