code logs -> 2006 -> Tue, 21 Nov 2006< code.20061120.log - code.20061122.log >
--- Log opened Tue Nov 21 00:00:08 2006
--- Day changed Tue Nov 21 2006
00:00 * Vornotron forgets what that stands for
00:00
<@ToxicFrog>
string-printf limited to n bytes.
00:00
<@ToxicFrog>
Thus ensuring it won't overflow your buffer unless you pass it a bad n.
00:01
< Janus>
Ah, I see. You did have to let the 'char' array it used quite large to avoid just that.
00:01
< Janus>
Thank you then~
00:03 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
00:03 mode/#code [+o Chalcy] by ChanServ
00:03 Oggy [~user@Nightstar-22137.fmtc.com] has quit [Quit: most of humanity still finds abberrance threatening]
00:03 Chalcy is now known as Chalcedon
00:05
< MyCatOwnz>
Vornotron: In C++, I think you can use sstreams too, if you're a masochist.
00:07
<@ToxicFrog>
Or link against liblua and use string.format~
00:09
< MyCatOwnz>
Or take a shot because you're using goddamn C++ instead of something sane.
00:09
<@ToxicFrog>
Heh.
00:10
< Janus>
Great, first it rags on my second favourate function, now it's picking my beloved atan().
00:10
< Janus>
Apparently, being "ambiguous" is a crime now.
00:12
< Janus>
...and finally, the worst thing it could possibly find fault on, everything has to have a return value.
00:13 * ToxicFrog eyebrows
00:13 * Janus notes that this includes about 30 functions.
00:19
<@ToxicFrog>
By "everything has to have a return value", what exactly do you mean?
00:20
<@ToxicFrog>
Everything has to declare a return value, or everything has to have a non-void return value?
00:20
<@ToxicFrog>
The former is, well, yes.
00:20
<@ToxicFrog>
The latter means your compiler is broken.
00:22
< Janus>
The former. It's a convention Dev-Cpp never enforced so I never know about it. As example, "main()" is top and center on the error list.
00:22
< MyCatOwnz>
int main (int argc, char** argv) {// done!
00:22
< MyCatOwnz>
And you oughta be doing that by habit, even. :)
00:23
<@ToxicFrog>
gcc doesn't /enforce/ it, but it should have been barfing out many a warning.
00:23
< Janus>
I'll be sure to do so from now on.
00:23 Janus is now known as Jan[din]
00:23
< MyCatOwnz>
Oh an the picking on atan()... are you feeding floats into and out of atan()? Because it takes and returns doubles.
00:23
<@ToxicFrog>
Also, any function that does not have a declared return value defaults to int, which is often not what you want.
00:23
< MyCatOwnz>
*and
00:24
< Vornotron>
yes, in general, stuff in math should deal with doubles
00:24
< MyCatOwnz>
Jan[din]: if'n you're passing float values into and out of atan(), you'll want to either explicitly cast them -or- use atanf() instead.
00:24
< MyCatOwnz>
Vornotron: I have a slow FPU that disagrees with you =)
00:28
< Vornotron>
:P
00:29 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
00:29
< Takyoji>
http://us.wii.com/viewer_tvcm_usa.jsp?vid=5
00:46
< Vornotron>
...I think that's the first video game ad I've ever seen where they actually show the people playing it.
00:47
< Vornotron>
http://www.youtube.com/watch?v=Wz2z-ZbcxT0 <--- as opposed to, say, this one.
00:56
< Takyoji>
xD
00:56
< Takyoji>
I like old commericials xD..
00:58
< Vornotron>
...well, okay, the Super Scope almost did.
00:58
< Vornotron>
But.
01:03 Jan[din] is now known as Janus
01:06 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: snuffle~ ]
01:16 Raif_ [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has quit [Quit: A trebuchet is not a marital aid. Many bothans died to bring us this information.]
01:16 Raif [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has joined #Code
01:16 mode/#code [+o Raif] by ChanServ
01:40 * Vornotron floons
02:08 Chalcedon is now known as ChalcyWork
02:15 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
02:15 mode/#code [+o Chalcy] by ChanServ
02:15 You're now known as TheWatcher[T-2]
02:16 ChalcyWork [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
02:17 You're now known as TheWatcher[zZzZ]
02:59 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Quit: Snuggable, huggable and cute!]
03:00 Vornotron [~vorn@Nightstar-18307.slkc.qwest.net] has quit [Quit: ]
03:28 ReivSLEP is now known as Reiver
03:34 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
03:40 Vornicus [~vorn@67.50.40.ns-3674] has joined #code
03:56 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
03:56 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
03:56 mode/#code [+o Chalcedon] by ChanServ
04:05 Chalcedon is now known as ChalcyAFK
04:09 ChalcyAFK [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
04:09 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
04:09 mode/#code [+o Chalcedon] by ChanServ
04:13 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
04:34 Stephenie [Safyra@Nightstar-4370.ok.ok.cox.net] has quit [Ping Timeout]
04:42 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
04:42 mode/#code [+o Chalcedon] by ChanServ
04:44 McMartin[travels] is now known as McMartin
05:14 Vornicus is now known as Vornicus-Latens
05:55 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
06:05 AnnoDomini [~fark.off@Nightstar-29119.neoplus.adsl.tpnet.pl] has joined #Code
07:01 You're now known as TheWatcher
07:22 ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
07:22 ChalcyGone is now known as Chalcedon
08:17 You're now known as TheWatcher[afk]
09:00 timelady [~romana@Nightstar-15011.lns7.adl2.internode.on.net] has joined #Code
09:17 timelady [~romana@Nightstar-15011.lns7.adl2.internode.on.net] has quit [Ping Timeout]
09:19 timelady [~romana@Nightstar-15011.lns7.adl2.internode.on.net] has joined #Code
09:40 timelady [~romana@Nightstar-15011.lns7.adl2.internode.on.net] has quit [Ping Timeout]
09:44 You're now known as TheWatcher[wr0k]
09:59 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
10:33 Thaqui [~Thaqui@124.197.36.ns-12825] has quit [Client exited]
10:47 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
12:15 Ev3 [~-@87.72.36.ns-26407] has joined #Code
12:47 AnnoDomini [~fark.off@Nightstar-29119.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
12:50 AnnoDomini [~fark.off@Nightstar-29172.neoplus.adsl.tpnet.pl] has joined #Code
13:58 EvilDarkLord is now known as EvilNROMLord
14:30 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Quit: I HAVE CLASSES, RAWR]
14:35 EvilNROMLord is now known as EvilDarkLord
14:58 You're now known as TheWatcher[d00m]
15:22 GeoTube [~Someone@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has quit [Connection reset by peer]
16:09
<@ToxicFrog>
Hmm. So. Protocol between client and server in spellcast3.
16:10
<@ToxicFrog>
The easy way is simply to have a Message object generate a function that when executed constructs and returns a copy of the Message, then send that.
16:11
<@ToxicFrog>
However, this involves taking arbitrary code off the wire and running it, and while I can protect the host system and the server's internal state from alteration, I can't protect against, say, [[while true do end]].
16:13
<@ToxicFrog>
The alternative is writing my own format and parser. Again.
16:26 You're now known as TheWatcher[afk]
16:41 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has joined #code
16:51 Reiver is now known as ReivZzz
17:22 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has quit [Connection reset by peer]
17:22 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has joined #code
17:25 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has quit [Connection reset by peer]
17:26 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has joined #code
17:32 Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has joined #code
17:32 mode/#code [+o Vornicus] by ChanServ
17:32
<@Vornicus>
For the record, Schlockian also has a way to make functions... but it is so bad that I can't write functions myself.
17:43
< GeoTube>
f(x)=x^2-X
17:43 * GeoTube legs it
17:44
<@ToxicFrog>
Error: attempt to perform arithmetic on a nil value
17:44 * ToxicFrog immolates GeoTube
18:01 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has quit [Ping Timeout]
18:03 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has joined #code
18:08 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has quit [Ping Timeout]
18:08 You're now known as TheWatcher
18:17 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has joined #code
18:35 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has quit [Client exited]
18:37 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has joined #code
18:39 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
18:39 mode/#code [+o Chalcedon] by ChanServ
19:26 GeoTube [~zylch@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has quit [Quit: Leaving]
19:27 GeoTube [~Unknown@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has joined #code
19:33 EvilDarkLord is now known as EvilSchemingLord
19:49 Thaqui [~Thaqui@124.197.36.ns-12825] has joined #code
21:04 GeoTube [~Unknown@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has quit [Connection reset by peer]
21:06 GeoTube [~Unknown@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has joined #code
21:08 Thaqui is now known as Thaqui[ToDoctor]
21:20
<@Vornicus>
Gems from the Jargon File: "New versions of the Mozilla web browser internally refer to the image library as 'libpr0n'"
21:22 * AnnoDomini chokes on his tea.
21:23
< AnnoDomini>
Huh?
21:23
< AnnoDomini>
There is pr0n in Mozilla Firefox 2.0?
21:23
<@Vornicus>
more along the lines of "this is what you use to look at pr0n"
21:24
< AnnoDomini>
I see.
21:27
<@Vornicus>
(and now, how I got there: film at 11, seen on some blog or other, I forget which, up an item to filk, and then that links to other intentional misspellings, including pr0n)
21:40 You're now known as TheWatcher[afk]
21:48 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
21:55 ReivZzz is now known as ReivOut
22:05 You're now known as TheWatcher
22:15 MyCatOwnz is now known as MyCatFoods
22:17 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
22:26
< Janus>
Mmm... may I ask if anyone knows what an "entry point" is, and how to "define" one?
22:26 * Janus is only one error away from having a working IDE again!
22:27
<@ToxicFrog>
The entry point is where the program starts execution. In C and C++, this is main().
22:27
<@ToxicFrog>
To define one, simply define an appropriate main().
22:28 * Janus looks curiously at his main()...
22:29
<@ToxicFrog>
Either [[int main()]] or [[int main(int argc, char ** argv)]] - or some semantically equivalent variant thereof - should be acceptable to the compiler.
22:29
<@Vornicus>
main should not be declared, only defined; it should return an integer, and it should have a signature li... like that above
22:30
<@ToxicFrog>
Vornicus: we never spoke of declaration, only of definition, so~
22:30
<@Vornicus>
C++ I believe allows or possibly prefers void main()
22:30
<@Vornicus>
but I do not know why
22:30
<@ToxicFrog>
Janus: bear in mind that in windows, there is some kind of wackiness with "WinMain()" which may or may not cause you grief depending on what compiler you're using and what -l and -m lines you pass to it.
22:31
< Janus>
It's the latter format, has a "return 1;" is an integer, but it is defined and declared in ''Main.c" in the same go.
22:31
<@ToxicFrog>
...paste the declaration here?
22:31
<@ToxicFrog>
Err, first few lines of the definition rather?
22:31
<@ToxicFrog>
(since it shouldn't have a declaration, after all0
22:32
<@Vornicus>
and if you're working on Java, the main method has signature public static void main(String[] args)
22:32
< Janus>
http://pastie.caboo.se/23877
22:33
<@ToxicFrog>
Vornicus: public static void ProgramName::main(String[] args), rather.
22:33
<@Vornicus>
well, yes
22:33
<@ToxicFrog>
Your formatting is the voice of madness, Janus, but it does look fine to me.
22:34
<@ToxicFrog>
What's the error thrown by the compiler?
22:34
< Janus>
After "Linking..." is says: "LINK : fatal error LNK1561: entry point must be defined"
22:34
<@ToxicFrog>
That sounds like the microsoft compiler.
22:34
<@ToxicFrog>
I cannot aid you.
22:35
< Janus>
Fantastic~
22:36
< GeoTube>
Amazing!
22:38
<@ToxicFrog>
I'm quite serious. I use the microsoft compiler for one purpose alone, and that is building the parts of the SGOS kernel that still require it. I know nothing of fixing its myriad faults.
22:40 * ToxicFrog takes msdev's build tools, locks them in a closet with the authors of his stats textbook and several halfbricks, and then entombs the entire thing in lava.
22:41
< Janus>
Alright then, thanks for the help. In the very least, I know /what/ an entry point is now~
22:41 * ToxicFrog listens to the Ur-Quan Kohr-Ah theme and plots the downfall of his foes
22:42 * GeoTube plots the fall of his socks
22:47 * Janus sets fire to Visual Studio.
22:48 Janus is now known as Jan[dinner]
22:48
< AnnoDomini>
Kill the interloper! Rip out its life!
22:48 * ToxicFrog eyebrows
22:49
< Jan[dinner]>
It takes the flavour out if you remove the life.
22:50 * AnnoDomini shoulders.
22:52 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
22:52 mode/#code [+o Chalcy] by ChanServ
22:53 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
22:54 * GeoTube kneecaps
22:54 MyCatFoods is now known as MyCatOwnz
22:54
< GeoTube>
wb cat owner
22:56
< MyCatOwnz>
Thanks GeoTube.
22:56
< MyCatOwnz>
ToxicFrog: you know what the funniest thing ever would be?
22:57
< MyCatOwnz>
ToxicFrog: an MSVC build of the entire OpenBSD OS.
22:57
<@ToxicFrog>
You have a peculiar definition of funny~
22:58
< MyCatOwnz>
Okay, what about at least the Loonix kernel?
23:00
<@Vornicus>
I don't know if MSVC can handle the Linux kernel code.
23:02 * Vornicus knows he can blow up MSVC6 with some particularly stilted but still technically legal default parameters to a constructor.
23:02
<@Vornicus>
though msvc.net lived with it
23:02
< MyCatOwnz>
Iono. I think it probably uses a lot of GNU extensions.
23:02
<@ToxicFrog>
6 is exceptionally easy to explode even for MSDev.
23:05
<@Vornicus>
true
23:06
< MyCatOwnz>
...mind, the first few versions of Linux were apparently more like assembley than C.
23:06 * Vornicus does wonder how one compiles a kernel.
23:06
< MyCatOwnz>
Hence it'd be more of a case of living up to GAS than to GCC. ^_^
23:06
<@Vornicus>
the makefiles must be epic
23:07
< MyCatOwnz>
Vornicus: if you wanna find out from first principles, easiest way is to read the sources.
23:07
<@ToxicFrog>
Vornicus: $ make~
23:07
< MyCatOwnz>
Vornicus: *NOT* the sources for Linux or *BSD! Go download the sources for MINIX 3 instead.
23:08
<@ToxicFrog>
MCO: That tells you how it works.
23:08
<@ToxicFrog>
Not how to turn it into a binary.
23:08
< MyCatOwnz>
Since the MINIXes are open source now and make pretty good teachin' aids.
23:08
< MyCatOwnz>
ToxicFrog: it uses the standard GNU compiler toolchain. Ye kin' read the makefiles 'n' stuff. *shrugs*
23:09
<@ToxicFrog>
MCO: yes, exactly.
23:09
< MyCatOwnz>
...wouldn't you count the makefiles as part of the source?
23:10
< MyCatOwnz>
I mean, in particular for something like a kernel that has to have a whacky and esoteric layout in memory.
23:13
<@Vornicus>
Raise a glass and sit and stare! Understand the man!
23:14 You're now known as TheWatcher[T-2]
23:15 * GeoTube squareroots TheWatcher[T-2]
23:17 * AnnoDomini integrates TheWatcher[T-2] in area K+ by dt.
23:19 You're now known as TheWatcher[zZzZ]
23:26 BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has joined #Code
23:28 Jan[dinner] is now known as Janus
23:29 * Janus eureka
23:29
<@Vornicus>
what was wrong?
23:30
< Janus>
Visual Studio is seeing main() as "SDL_Main()" for some reason.
23:30
<@Vornicus>
oh, you're using SLD
23:30
<@Vornicus>
SDL*
23:31 * AnnoDomini read that as LSD.
23:31
<@Vornicus>
which renames your main() method and wraps it in its own
23:31
<@ToxicFrog>
...oh, you #included SDLMain.h?
23:31
<@ToxicFrog>
If you do this you have to link against libSDLmain.
23:31
<@ToxicFrog>
As it says in the documentation.
23:32
<@Vornicus>
and, at that, requires that you use a specific prototype, because SDL calls your main function in a specific way
23:32
< Janus>
I've already linked against "SDL.lib" and "SDLmain.lib" I believe.
23:33
<@ToxicFrog>
And, yes, main has to be declared exactly as:
23:33
<@ToxicFrog>
int main(int argc, char * argv[])
23:33
<@ToxicFrog>
But you're already doing that.
23:35 * Janus toys with it.
23:37
<@ToxicFrog>
Are you quite sure you're linking against libSDLmain?
23:37
<@ToxicFrog>
(although I must say I've never tried it in MSVC. Maybe it doesn't work?)
23:39 BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has quit [Quit: ]
23:40
< Janus>
Would it go in something like, say, Linker->Input->Additional Dependancies (?)
23:49
<@ToxicFrog>
I have no idea.
23:50
<@ToxicFrog>
As I said earlier, I do not use the msdev build tools except for SGOS and I do not use the msdev IDE at all.
23:56
< Janus>
I see... Alright. The only other thing I can think of would be deciding the entry point manually.
--- Log closed Wed Nov 22 00:00:12 2006
code logs -> 2006 -> Tue, 21 Nov 2006< code.20061120.log - code.20061122.log >