--- Log opened Sun Nov 13 00:00:02 2011 |
00:00 | | You're now known as TheWatcher[T-2] |
00:09 | | You're now known as TheWatcher[zZzZ] |
00:15 | <@ToxicFrog> | I'm taking a somewhat different approach |
00:15 | <@ToxicFrog> | It generates an executable that, when run as 'enceladus main.lua lib1.lua lib2.lua ...', generates a new executable. |
00:16 | <@ToxicFrog> | That executable has all of the files specified on the command line packed into it; running it is equivalent to running 'lua main.lua', except that a custom library loader is installed that searches the packed files first. |
00:16 | | * ToxicFrog gnaws on premake4 |
00:42 | <@ToxicFrog> | fuck you gooooooooooooooooooooooogle |
00:43 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [Connection closed] |
00:44 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code |
00:49 | <@ToxicFrog> | If I search for "how do I get premake to show me the commands it is executing", it is unacceptable to return "tips on getting pregnant" as the first result |
00:49 | <@McMartin> | SEO abuse?~ |
00:51 | < Eri> | Nah, google has started to suck serious balls |
00:52 | < Eri> | They've changed some behaviour that should not have been changed. |
00:52 | < Eri> | Who is it who was always complaining about it? |
00:52 | <@McMartin> | That said, I would not use a search term such as the one TF used except to AskJeeves. |
00:52 | <@McMartin> | TF and gnolam. |
00:53 | < Eri> | Hmm. Interesting fact. |
00:53 | < AnnoDomini> | gnolam has very high standards about search engines, for some reason. :P |
00:54 | < Eri> | The first pregnancy site it finds for those terms: "Tips on Getting Pregnant: Ditch the pill" |
00:54 | <@McMartin> | It is a pity that he cannot find any on Earth that will meet his exacting standards |
00:54 | < Eri> | Well, that's obvious, there, website |
00:54 | < Eri> | He should just make his own |
00:54 | < Eri> | An open-source search engine supporting user-developed plugins |
00:54 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [Connection closed] |
00:55 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code |
00:55 | < Eri> | The internet will love him for it |
00:55 | < Eri> | But, I definitely agree with him about google's new behaviour when auto-correcting search terms |
00:56 | <@McMartin> | They're now big enough that they can get away with being evil~ |
00:56 | < Eri> | It's stupid. It shouldn't have been changed from "suggest corrected terms" to "Assume corrected terms, suggest original terms" |
00:56 | < Eri> | Heh, exactly |
00:56 | < Eri> | That's the nature of a corporation, though |
00:57 | <@ToxicFrog> | McMartin: re: ask jeeves - weren't you the one who last time this came up was saying "google is now sophisticated enough that you'll get better results with full phrases than with bare keywords"? |
00:57 | <@ToxicFrog> | (also, for questions of this nature specifically, asking the question often gets someone asking exactly this on StackOverflow) |
00:57 | <@McMartin> | ... if I did, I must have been really short on sleep or really unclear |
00:58 | <@ToxicFrog> | (at least when google doesn't decide to assume "premake" is a typo of "pregnant" and completely disregard half the other search terms) |
00:58 | <@McMartin> | This would be if I have a mysterious error message |
00:58 | <@McMartin> | I would paste in the entire error message, put it in quotes, or whatever |
00:58 | <@McMartin> | Instead of trying to search for, like "application error code 83612" or whatnot |
00:59 | <@ToxicFrog> | (which it does with increasing and irritating frequency of late) |
01:00 | <@ToxicFrog> | Honestly, this wouldn't piss me off nearly as much if google had an option somewhere in its behemoth of a settings page labeled "search for what I entered and suggest corrections, rather than vice versa" |
01:00 | <@ToxicFrog> | But it doesn't. |
01:01 | | AnnoDomini [annodomini@Nightstar-f7eedefa.80-203-17.nextgentel.com] has quit [[NS] Quit: Sleep.] |
01:02 | <@McMartin> | ..hm |
01:14 | <@ToxicFrog> | In other news, a pox on Debian packagers and their obsession with keeping every version of every package that has ever existed around forever. |
01:19 | <@ToxicFrog> | Seriously considering just incorporating the lua source into this project directly. |
01:25 | < Eri> | Now, how in the hell did I do that? Running windows XP via virtualbox, I've somehow broken the bootloader? |
01:25 | <@Tamber> | o.0 |
01:27 | < Eri> | ...I'm having no luck with Windows this month, it seems. I moved to Mint after a Win7 update killed everything, now XP is spontaniously dying |
01:31 | <@ToxicFrog> | e3u7yyyyyyyyyyyyyyyyy |
01:32 | <@ToxicFrog> | Eri: has this previously booted properly in VB, or are you trying to migrate it from another VM or a real system? |
01:32 | < Eri> | Nah, it was working perfectly fine about half an hour ago |
01:32 | < Eri> | Then it started giving me errors when I tried to run things |
01:33 | < Eri> | So, I tried to restart it. |
01:33 | <@ToxicFrog> | Welp. |
01:33 | <~Vornicus> TF: \o/ |
01:34 | < Eri> | I have a feeling it's quite dead. Wish I'd known about snapshots, prior to now |
01:34 | <@Tamber> | They are rather handy.[1~[4~ |
01:38 | | Kindamoody[zZz] is now known as Kindamoody |
01:44 | <@ToxicFrog> | Hrm. |
01:44 | <@ToxicFrog> | The Linux build settings use --export-dynamic, as they should. |
01:45 | <@ToxicFrog> | The Windows build settings don't, because there's no such thing in windows. (memo to self: link windows version against a lua4windows-compatible lua5.1.dll) |
01:45 | <@ToxicFrog> | (also, fuck windows) |
01:45 | <@ToxicFrog> | The cross-compile settings get confused because, since they're linux-hosted, it tries to use --export-dynamic, which the cross-compiler doesn't support. |
02:15 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out] |
02:18 | | Kindamoody is now known as Kindamoody|DVD |
02:27 | <@McMartin> | What does --export-dynamic mean here? |
02:31 | | Attilla [Obsolete@Nightstar-f29f718d.cable.virginmedia.com] has quit [Ping timeout: 121 seconds] |
02:31 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
02:34 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [[NS] Quit: Well, most things get better when I kick them!] |
02:36 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
02:47 | | cpux|2 [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
02:50 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
02:50 | | cpux|2 is now known as cpux |
02:53 | | Stalker [Z@Nightstar-5aa18eaf.balk.dk] has quit [Ping timeout: 121 seconds] |
03:01 | | Kindamoody|DVD is now known as Kindamoody |
03:29 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code |
04:52 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
05:07 | < ToxicFrog> | C question. |
05:07 | < ToxicFrog> | I have a function with signature (lua_State *, const char *, size_t, const char **) |
05:07 | <@McMartin> | OK. |
05:07 | < ToxicFrog> | I am calling it with types (lua_State *, char *, size_t, char **) |
05:07 | <@McMartin> | Er |
05:08 | < ToxicFrog> | This generates a compiler warning: |
05:08 | < ToxicFrog> | src/enceladus.c:42:5: warning: passing argument 4 of 'writeTOC' from incompatible pointer type |
05:08 | < ToxicFrog> | src/toc.h:5:5: note: expected 'const char **' but argument is of type 'char **' |
05:08 | < ToxicFrog> | I was under the impression that implicit conversion from non-const to const was always safe. |
05:08 | <@McMartin> | That's a deeper question than I can answer off the top of my head |
05:09 | <@McMartin> | For C++ objects, this is true. |
05:09 | <@McMartin> | But C++ has const_cast<> to highlight it, since it can be dangerous |
05:09 | <@McMartin> | Also, are you getting the warning only for argument 4, but not from argument 2? |
05:10 | <@McMartin> | s |
05:10 | <@McMartin> | oops, that is not the Glulxe window |
05:10 | < ToxicFrog> | Yes. |
05:10 | < ToxicFrog> | Which just makes it more confusing. |
05:11 | <@McMartin> | There may be something special about pointers to pointers that makes it mean something odd. |
05:11 | <@McMartin> | But I don't know off the top of my head. |
05:12 | < ToxicFrog> | I had forgotten how clunky and aggravating C could be. |
05:12 | < ToxicFrog> | On the plus side, premake4 turns out to be pretty sweet. |
05:13 | <@McMartin> | C's ABI is totally infuriating once you get used to not having to give a shit about stack discipline |
05:13 | <@McMartin> | Anyawy |
05:13 | <@McMartin> | That's just a warning |
05:14 | <@McMartin> | const-casting is safe, but unsafe things that aren't errors still get warning on some compilers. |
05:14 | <@McMartin> | Hell, MSVC warns whenever there's an implicit numeric cast |
05:14 | < ToxicFrog> | Yeah; my concern is that I wouldn't expect this to even be a warning except maybe with -Wextra |
05:15 | <@McMartin> | Oh, I see |
05:15 | <@McMartin> | This is -Wcast-qual |
05:15 | <@McMartin> | It is technically unsafe if you're dumb about it. |
05:16 | <@Tamber> | So, like most of C, then? "It'll be fine; just don't sneeze, or it'll tear your head off." :p |
05:16 | < celticminstrel> | Heh. |
05:16 | <@McMartin> | ... and it's because "const char **" does not mean "const array of char *"; it means "array of const char *" |
05:16 | <@McMartin> | Which means that, say, q[2] = "Hello world!"; is legal if q is const char **, but not if q is char **. |
05:17 | <@McMartin> | From http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html - search for -Wcast-qual |
05:19 | < ToxicFrog> | Aha. |
05:20 | < ToxicFrog> | "const array of (const char) *" is what I want to express here. |
05:20 | < ToxicFrog> | That is to say, the contract of the function includes the provision that it will modify neither the array itself nor the strings pointed to. |
05:21 | <@McMartin> | This is something C programmers rarely actually ask for, and I am unsure how to phrase that. |
05:21 | < ToxicFrog> | For now I've just removed the const qualifiers from it entirely; it's not like this is API code. |
05:21 | <@McMartin> | Right |
05:21 | <@McMartin> | This is the standard thing to do |
05:23 | <@McMartin> | Apparently, "const char * const *" may do what you want. |
05:23 | <@McMartin> | I know of literally no C programmers who ever actually do this. |
05:24 | <@McMartin> | http://stackoverflow.com/questions/1143262/what-is-the-difference-between-const- int-const-int-const-int-const |
05:24 | <@McMartin> | Even here, it's listed as "if you want to go really crazy" |
05:24 | < ToxicFrog> | Oh C. |
05:25 | <@McMartin> | To be fair, const in C was imported after the fact from C++. |
05:25 | <@McMartin> | C doesn't do contracts. |
05:25 | <@McMartin> | Even function prototypes are a comparatively late addition, and they didn't become mandatory until it imported that from C++ too. |
05:27 | < celticminstrel> | I do it. <_< |
05:27 | <@McMartin> | Yeah, it's nice to do const in the basics |
05:27 | < celticminstrel> | Not very often, granted, but I've occasionally had "const char*const" at least. |
05:27 | <@McMartin> | But when you start applying it to inlined complex data types, it's kinda asking for it |
05:27 | <@McMartin> | Yeah, that's still in the realm of sanity though~ |
05:27 | < ToxicFrog> | McMartin, I figure you're likely to know this |
05:28 | < ToxicFrog> | What's a good version to target when generating a Visual Studio project file? |
05:28 | < ToxicFrog> | I can choose between 2002, 2003, 2005, 2008, and 2010 here. |
05:28 | < celticminstrel> | True. I think I might've had a "const char*const*const" before though. |
05:28 | <@McMartin> | 2003. |
05:28 | < ToxicFrog> | Alright. |
05:28 | <@McMartin> | I've never *heard* of 2002. 2003, 2005, and 2008 all readily autoconvert and are mostly-inoffensive XML files. |
05:28 | <@McMartin> | VC6 is made of hate and spiders. |
05:29 | <@McMartin> | I have no idea what VC2010 does, but the earlier the pick, the easier it is to import. |
05:29 | <@McMartin> | 2003 should losslessly transition to 2005 and 2008. |
05:29 | < ToxicFrog> | VS6 is not one of the options listed~ |
05:29 | <@McMartin> | They even keep the same extensions because of it. |
05:29 | <@McMartin> | VC6. It wasn't even VS yet then. =P |
05:30 | < celticminstrel> | It's not 2002 then? |
05:30 | < ToxicFrog> | (in addition to those listed, premake generates files for XCode 3, Code::Blocks, CodeLite, and GNU Make.) |
05:30 | <@McMartin> | celticminstrel: I believe VC6 dates back to the mid-to-late 1990s. |
05:31 | <@McMartin> | ... hm |
05:31 | <@McMartin> | What exactly do you intend to distribute here, TF? |
05:31 | < ToxicFrog> | McMartin: source code, premake configuration, and generated project files so that people who don't have/don't want premake can still build it. |
05:31 | <@McMartin> | Also include a Code::Blocks build, for people with MinGW but without MSVS. |
05:32 | < celticminstrel> | Ah. |
05:32 | <@McMartin> | (I assume GNU Make is for Linuxier things) |
05:32 | < ToxicFrog> | (GNU Make should also work with MSYS; I don't know if it'll work with a "plain" mingw32 install) |
05:32 | <@McMartin> | Mmm |
05:32 | <@McMartin> | If so, then GNU Make and 2003. |
05:33 | <@McMartin> | The problem with MSVS2003 on is that they require the damn independently distributed runtime to work. |
05:33 | <@McMartin> | And probably 2002 as well; only MSVC6 did not. |
05:34 | < ToxicFrog> | If I'm distributing windows binaries, I'll be building them with the mingw32 cross-compiler, which - I believe - links against msvcrt6.dll. |
05:34 | <@McMartin> | Yup. The only version of libc guaranteed to be present. |
05:34 | <@McMartin> | That's why a MinGW-capable build file is important~ |
05:34 | <@McMartin> | I have MSYS here, I can test it out for you if it comes to that. |
05:38 | < ToxicFrog> | Well, I'll be pushing it to github soon, so that would be great |
05:38 | < ToxicFrog> | I've already tested the Makefile on linux with both native and cross-compiler configurations, but don't have an OSX or Windows hosted build environment set up. |
05:39 | <@McMartin> | GNU make should work on Mac even *without* XCode. |
05:42 | < ToxicFrog> | https://github.com/ToxicFrog/Enceladus |
05:45 | <@McMartin> | o_O |
05:45 | <@McMartin> | I can't clone it |
05:45 | <@McMartin> | I'm getting cert errors. |
05:45 | <@McMartin> | Oh, I have to remove the https part |
05:48 | <@McMartin> | gcc.exe: unrecognized option '-rdynamic' |
05:50 | <@McMartin> | so the stock makefile doesn't work |
05:50 | < ToxicFrog> | this is using msys, or code::blocks? |
05:50 | <@McMartin> | MSYS. |
05:51 | <@McMartin> | Using MSVS, it doesn't work because stdint.h is part of POSIX, not part of the C standard, so drop MSVS support. |
05:51 | < ToxicFrog> | Oh goddamnit |
05:51 | <@McMartin> | Trying Code::Blocks now. |
05:51 | < celticminstrel> | I thought the C standard did have something like stdint.h? |
05:52 | < ToxicFrog> | I could have sworn <stdint.h> was C99 |
05:52 | < celticminstrel> | Though if so it'd probably be C99, yeah. |
05:52 | < ToxicFrog> | Although on reflection that still doesn't help with MSVS. |
05:52 | <@McMartin> | Code::Blocks works out of the box, though I haven't tried *running* it yet. |
05:52 | <@McMartin> | Are there test cases? |
05:52 | <@McMartin> | Also |
05:52 | <@McMartin> | No newline at end of toc.h |
05:53 | <@McMartin> | All the compilers have bitched about this~ |
05:53 | < Shoat> | <ToxicFrog> I could have sworn <stdint.h> was C99 <-- it is |
05:53 | < ToxicFrog> | There are no test cases yet (it's not even code-complete), but I figured better to test the build system sooner. |
05:54 | <@McMartin> | Well, OK |
05:54 | <@McMartin> | Running enceladus.exe gives me "This copy of enceladus has no embedded lua program to run. Pleaseembed one: enceladus main.lua lib.lua ..." |
05:54 | < ToxicFrog> | Try "enciladus.exe" on its own, then "enciladus.exe premake4.lua" |
05:55 | <@McMartin> | "Embed successful: Output file: premake4.lua-enceladus.exe" |
05:55 | < ToxicFrog> | And then run the generated executable (which should give you an error message and stack trace, because premake4.lua expects to be loaded into premake and not run on its own) |
05:55 | <@McMartin> | "error: attempt to call a string value. Stack traceback: (empty string)" |
05:55 | < ToxicFrog> | Ok, that's exciting. |
05:56 | < ToxicFrog> | Send me premake4.lua-enceladus.exe? |
05:59 | <@McMartin> | https://hkn.eecs.berkeley.edu/~mcmartin/premake4.lua-enceladus.exe |
05:59 | < ToxicFrog> | Got it. Thank you. |
06:01 | <@McMartin> | As a CLI app, you don't need an xcode project either; the makefile really ought to Just Work. |
06:01 | < ToxicFrog> | Does OSX support -rdynamic? |
06:01 | <@McMartin> | I think it uses something else for it. |
06:01 | < ToxicFrog> | Also, I wonder if that's a bug in premake WRT: mingw |
06:01 | <@McMartin> | I've never even *heard* of -rdynamic. |
06:02 | < ToxicFrog> | "use --export-dynamic on platforms that support it" |
06:02 | <@McMartin> | OS X has a mode that involves "if you refer to a symbol you don't have locally, try to dlload it at runtime"... |
06:02 | < ToxicFrog> | Except in practice there seems to be "...and raise an error everywhere else" on the end of that >.< |
06:02 | <@McMartin> | Windows doesn't have that as a switch, but it's utterly trivial to do. |
06:03 | <@McMartin> | (There it is GetProcAddress, though, not dlload) |
06:03 | < ToxicFrog> | What this actual does is export -all- symbols from the executable, so that when it dlopen()s a library at runtime, that library can resolve symbols in the executable that loaded it. |
06:04 | < ToxicFrog> | This is how you build lua-using Linux programs that may load Lua binary modules, as it ensures that the module ends up dynamically linking with the same version of Lua the program incorporates. |
06:05 | < ToxicFrog> | AFAIK in windows everything is exported anyways and -rdynamic, if supported at all, would be a no-op. |
06:05 | <@McMartin> | --export-dynamic will not work on OSX |
06:05 | < ToxicFrog> | I have no idea how this works in OSX. |
06:05 | <@McMartin> | It is ELF specific. |
06:05 | <@McMartin> | OSX uses MachO. |
06:05 | < ToxicFrog> | Is there an equivalent? |
06:05 | <@McMartin> | Note that Windows uses PE, and my man pages say: |
06:05 | <@McMartin> | Note that this option is specific to ELF targeted ports. PE |
06:05 | <@McMartin> | targets support a similar function to export all symbols from a DLL |
06:05 | <@McMartin> | or EXE; see the description of --export-all-symbols below. |
06:05 | <@McMartin> | IIRC, when we were messing around with the MachO equivalent of LD_PRELOAD it actually involved compiler pragmas that became linker pragmas. |
06:06 | <@McMartin> | So I have *no idea* even though it's still GCC |
06:06 | < ToxicFrog> | (also, the makefile should only be adding -rdynamic on linux anyways; the fact that it's trying to use it on mingw implies a bug either in my configuration or in premake's makefile generator) |
06:06 | <@McMartin> | MSYS might be lying to it, I suppose. |
06:07 | < ToxicFrog> | Looking at the generated makefile, no, it's adding it unconditionally |
06:09 | < ToxicFrog> | I should be able to fix this fairly easily by adding an msys configuration, I think. |
06:15 | | kw-drag-show is now known as kwsn |
06:17 | < ToxicFrog> | McMartin: VS defines WIN32 when building, right? |
06:17 | < ToxicFrog> | Or is that only mingw? |
06:17 | <@McMartin> | _WIN32, I believe, not WIN32. |
06:18 | <@McMartin> | Not sure offhand, though |
06:18 | | * McMartin fires it up |
06:18 | < celticminstrel> | I think it's normal to define WIN32? Might be __WIN32__ I suppose, or even __WIN32... |
06:19 | <@McMartin> | Normally one finds it in the VCPROJ, but premake4 isn't adding it |
06:20 | < celticminstrel> | So I considered cloning and building Enceladus, but then I remembered the time. <_< |
06:20 | < ToxicFrog> | Well, I can always tell premake to add it manually |
06:21 | < celticminstrel> | Since I'm on OSX and you said you don't access to that or something. |
06:22 | <@McMartin> | I have it, just not super handy |
06:22 | <@McMartin> | man gcc does indicate that this isn't going to work on Mac though because of the -rdynamic thing. |
06:22 | < ToxicFrog> | I can get it to generate a makefile with a target that doesn't use rdynamic, it's just not doing it by default |
06:23 | <@McMartin> | It sounds like rdynamic is kind of necessary for this to work at all, though |
06:23 | < ToxicFrog> | On linux, and only if you're loading binary modules. |
06:23 | < ToxicFrog> | And I mean I can get it to generate a makefile where 'make' builds with -rdynamic and 'make config=nordynamic' doesn't. |
06:24 | < ToxicFrog> | I have no idea how OSX handles the liblua version mismatch problem. |
06:24 | < ToxicFrog> | (on windows the conventional solution is "everyone links against lua4windows"; I don't know if --export-all-symbols does what is needed in the same sense as -rdynamic) |
06:35 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:37 | | ErikMesoy|sleep is now known as ErikMesoy |
07:08 | < ToxicFrog> | McMartin: if you're still around, try: |
07:08 | < ToxicFrog> | - building it in MSVS |
07:08 | < ToxicFrog> | - building it in MSYS with 'make config=release_msys' |
07:16 | | Derakon is now known as Derakon[AFK] |
07:18 | | Kindamoody is now known as Kindamoody|out |
07:23 | | cpux|2 [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
07:25 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
07:46 | | AnnoDomini [annodomini@Nightstar-f7eedefa.80-203-17.nextgentel.com] has joined #code |
08:32 | <@McMartin> | TF: No love, on either count. |
08:32 | <@McMartin> | MSVS is being strict about things gcc doesn't give a shit about, and is rejecting a lot of your code - in particular, it does not let you cast void * to other pointer types without an explicit cast |
08:33 | <@McMartin> | Furthermore, premake4 is being fucking broken and is generating project files that say "be psychopathic about C89 compliance; among other things, reject variable declarations that are not at the beginning of blocks, including for (int i =..." |
08:34 | <@McMartin> | That's fixable by hacking the vcproj, and ints.h needs to check _WIN32, not WIN32 |
08:34 | <@McMartin> | Unfortunately, mingw checks both _WIN32 *and* WIN32, so you'll need to set a custom define as mingw |
08:34 | <@McMartin> | Also, I need to hand set CC and LD to be gcc before running make, or it tries to run the nonexistent cc.exe on msys |
08:36 | <@McMartin> | Also also, io.c still includes stdint directly |
08:37 | <@McMartin> | For reasons known only to itself, snprintf is named _snprintf in MSVS's libraries and needs to be #defined |
08:38 | <@McMartin> | And MSVS is treating "automatically coerce unsigned to signed" as an error, so when you return uint8 * and assign it to char *, it errors out. |
08:39 | <@McMartin> | MSYS fails with "redefinition of uint32_t" because it also defines both WIN32 and _WIN32. |
08:39 | <@McMartin> | Executive summary: :gonk: |
09:01 | | AnnoDomini [annodomini@Nightstar-f7eedefa.80-203-17.nextgentel.com] has quit [Ping timeout: 121 seconds] |
10:24 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code |
10:44 | | You're now known as TheWatcher |
11:04 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code |
11:22 | | Attilla [Obsolete@Nightstar-f29f718d.cable.virginmedia.com] has joined #code |
11:45 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
12:03 | | Attilla [Obsolete@Nightstar-f29f718d.cable.virginmedia.com] has quit [Ping timeout: 121 seconds] |
12:08 | | Attilla [Obsolete@Nightstar-f29f718d.cable.virginmedia.com] has joined #code |
12:57 | | AnnoDomini [annodomini@60F158.737D66.CA1918.CC7562] has joined #code |
13:16 | | AnnoDomini [annodomini@60F158.737D66.CA1918.CC7562] has quit [Ping timeout: 121 seconds] |
13:33 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out] |
13:40 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
14:28 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code |
15:23 | | Omega [omegaboot@Nightstar-10752b3e.il.comcast.net] has joined #code |
15:24 | | Seraph [omegaboot@Nightstar-10752b3e.il.comcast.net] has joined #code |
15:25 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
15:25 | | Alek [omegaboot@Nightstar-10752b3e.il.comcast.net] has quit [Ping timeout: 121 seconds] |
15:27 | | Omega [omegaboot@Nightstar-10752b3e.il.comcast.net] has quit [Ping timeout: 121 seconds] |
15:27 | | cpux|2 [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
15:30 | | Kindamoody|out is now known as Kindamoody |
15:47 | | Kindamoody is now known as Kindamoody|afk |
15:57 | < ToxicFrog> | Hrm. |
15:57 | < ToxicFrog> | McMartin: I'm pretty sure that MSVS rejecting casts from void* is a direct violation of the standard. >.< |
15:58 | < ToxicFrog> | The "psychopathic about C89" bit is probably because MSVS doesn't support C99 so the only options are C89 or C++. |
15:58 | <@Tamber> | Microsoft, violate a standard? Inconceivable! |
15:59 | < ToxicFrog> | I'm not sure what you mean about setting a custom define as mingw; I already have a custom define that sets WIN32 and which my code then checks. |
15:59 | | * Tamber wombles sleepwards, leaving a trail of Perl. |
15:59 | < celticminstrel> | If it's C++ and not explicit, it's not a violation... otherwise, yes it is. |
15:59 | < celticminstrel> | If it's C, it's also a violation I think? |
16:00 | < ToxicFrog> | celticminstrel: it's C. |
16:00 | < celticminstrel> | Could it be thinking it's C++? Or maybe there's some flag set? |
16:00 | | Seraph is now known as Alek |
16:06 | < celticminstrel> | Okay, for something new, I seem to have an HTML5 canvas issue. |
16:07 | < celticminstrel> | I tried to make it bigger so there was more space, but instead I got a larger image. |
16:11 | <@ErikMesoy> | When you cast into the void, the void casts back. |
16:25 | | Derakon[AFK] is now known as Derakon |
16:28 | | Kindamoody|afk is now known as Kindamoody |
16:46 | < celticminstrel> | Hm, function to transform [a,b,c],[d,e,f] to [[a,d],[b,e],[c,f]] in PHP? |
16:46 | < celticminstrel> | I think it's zip in python, but that didn't find it. |
16:52 | < Shoat> | I think you can do that with array_map |
16:53 | < celticminstrel> | Looks like it... |
16:55 | < Shoat> | var_export(array_map(function($c, $d) { return array($c, $d); }, $a, $b)); |
16:55 | | * Shoat doesn't know why that'd ever be useful though. |
16:55 | < celticminstrel> | Oh you can have anonymous functions? |
16:56 | < Shoat> | Yes, since 5.3 |
16:56 | < Shoat> | Note: they don't share scope, you have to explicitly pass things into their scope. |
16:56 | <~Vornicus> Zip is mostly used in python to make a parallel iterator |
16:56 | < celticminstrel> | Okay, it works. Thanks! |
16:59 | <~Vornicus> Though more often you want izip because, well, iterator |
17:00 | | * ToxicFrog shivs windows |
17:01 | <@Derakon> | ...I didn't know about izip. |
17:01 | <@Derakon> | And why didn't they go with iterzip as the name? |
17:01 | <@Derakon> | To match e.g. iteritems on dictionaries. |
17:09 | <~Vornicus> I do not know! |
17:09 | < celticminstrel> | Now I need to figure out if a file is a directory... is stat really the only way? |
17:11 | < celticminstrel> | Ooh, found is_dir. |
17:18 | | * ToxicFrog shiv shiv shiv |
17:20 | | * ErikMesoy provides spare shivs |
17:28 | <@Derakon> | Come to think, there's also range vs. xrange. |
17:28 | <@Derakon> | Python does not have a consistent naming scheme for these functions. |
17:28 | < celticminstrel> | Heh. |
17:30 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [[NS] Quit: Well, most things get better when I kick them!] |
17:35 | | AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has quit [Ping timeout: 121 seconds] |
17:40 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
17:56 | | Kindamoody is now known as Kindamoody[zZz] |
18:16 | | kwsn [kwsn@Nightstar-635d16fc.org] has quit [Ping timeout: 121 seconds] |
18:25 | | kwsn [kwsn@Nightstar-635d16fc.org] has joined #code |
18:33 | | celticminstrel is now known as celmin|away |
19:01 | | AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has joined #code |
20:36 | | celmin|away is now known as celticminstrel |
21:01 | | AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has quit [Ping timeout: 121 seconds] |
21:04 | | Stalker [Z@Nightstar-5aa18eaf.balk.dk] has joined #code |
21:14 | | AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has joined #code |
21:41 | | ErikMesoy is now known as ErikMesoy|sleep |
21:47 | < celticminstrel> | Does PHP support associative comparative operators? |
21:48 | <~Vornicus> Almost certainly not |
21:48 | <~Vornicus> I've never met one that does that other than Python and I prefer to avoid it there too! |
21:49 | < celticminstrel> | I like that in Python actually. <_< |
21:52 | <@Derakon> | Associative comparative operators? Like "if a == b == c"? |
21:53 | < celticminstrel> | Or "a <= b <= c". |
22:09 | | AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has quit [Ping timeout: 121 seconds] |
22:16 | | AD[Shell] [abudhabi@9D46A2.088371.A474A5.6EEC27] has joined #code |
22:39 | | Vornicus is now known as Finerty |
22:41 | | * gnolam boggles at the US's use of units. |
22:43 | <~Finerty> Welcome to the US. We're an elite club of inch-users, along with Liberia and Burma. |
22:45 | < Eri> | It's unfortunate that their units are still taught alongside SI units, in engineering fields |
22:46 | < celticminstrel> | Liberia and Burma? :P |
22:47 | < celticminstrel> | For myself, I'm trying to force myself to use metric even in situations where imperial is more familiar, such as height. <_< |
22:52 | < gnolam> | Yees, but do you have to try to pervert SI as well? :P |
22:52 | < celticminstrel> | What do you mean? |
22:54 | < gnolam> | Not only do you have that capital 'L' for liters nonsense going, but I just found out about the abomination "mcg" to denote micrograms. :P |
22:57 | < celticminstrel> | I don't use mcg; I use ?g. <_< |
22:57 | < celticminstrel> | I think I do use L though; what other option is there anyway? |
22:57 | < celticminstrel> | Lowercase l is a stupid choice. |
22:58 | <@Derakon> | Only because we were stupid enough to have a letter and number be distinguishable only by serifs. |
22:58 | < Eri> | Who does these things? Canada reporting in, and we definitely use lowercase l, like for ml. I've seen mcg, just like I've seen kilocycles, but we make fun of the people who use them |
22:59 | < Eri> | My particular favourite was checking out a microwave generator, and reading KiloMegacycles |
22:59 | < gnolam> | Lowercase l is the only choice, as the liter isn't named after a person. |
22:59 | < celticminstrel> | Ah true, I do use lowercase l for ml... |
23:00 | < celticminstrel> | But for litres alone I think I use L. |
23:00 | < celticminstrel> | Or the strange script l. |
23:00 | < celticminstrel> | But that's too hard on a computer. |
23:02 | < gnolam> | Eri: ... |
23:02 | < Eri> | ? |
23:03 | < gnolam> | KiliMegaCycles :) |
23:03 | < gnolam> | *Kilo |
23:03 | < ToxicFrog> | L and l are both valid abbreviations for litre; l is more common in europe, L in north america. |
23:04 | < ToxicFrog> | (originally it was just l, in keeping with the principle that only units derived from a proper name get the uppercase; in the 70s people realized that l and 1 are basically indistinguishable on most typewriters and NIST started recommending the use of L instead) |
23:04 | < gnolam> | Eri: was it from the early '60s or something? |
23:05 | < ToxicFrog> | Also, Eri, at least here in Ontario, I see L and mL far, far more commonly than l and ml. |
23:05 | < gnolam> | And that should never be a problem, since SI demands a space between the value and the unit. |
23:05 | < celticminstrel> | Oh huh, I keep discovering people are oddly close to me. <_< |
23:05 | < ToxicFrog> | (also also, the litre is not an SI unit) |
23:05 | < celticminstrel> | Ah true, that's easy to forget... |
23:06 | < ToxicFrog> | (although at this point it might as well be~) |
23:06 | < gnolam> | It's Accepted For Use With SI. |
23:06 | < celticminstrel> | Yeah. |
23:06 | <~Finerty> Yeah, neither cgs nor mks have official names for Area or Volume units |
23:07 | <~Finerty> BUt they'd be cm^3 and m^3, and neither are liters! |
23:07 | <@McMartin> | 08:00 < celticminstrel> Could it be thinking it's C++? Or maybe there's some flag set? |
23:08 | <@McMartin> | Yes, it has to be set to C++, because otherwise it will reject "for (int i=" |
23:08 | < celticminstrel> | Well then, that explains it! :P |
23:08 | <@McMartin> | Also - the US doesn't use imperial units. |
23:08 | <@McMartin> | It uses US customary units, which have the same name, but different values. |
23:08 | <@TheWatcher> | Just to be Bloody Awkward |
23:09 | < gnolam> | And occasionally /several different values/. |
23:09 | <@McMartin> | Well. |
23:10 | <@McMartin> | US customary matches avoirdupois. |
23:10 | <@McMartin> | It's just that sometimes we use troy or metric instead. |
23:10 | <@McMartin> | And fluid ounce is a measure of volume, which is annoying, but not intrinsically worse than kg-force. |
23:11 | < gnolam> | Survey foot. |
23:11 | <@McMartin> | See that modifier? |
23:11 | <@TheWatcher> | Rods per hogshead~ |
23:11 | <@McMartin> | You just changed systems. |
23:12 | <@McMartin> | And it's not like anyone uses slugs. |
23:13 | < Eri> | Heh, except my mech teacher |
23:14 | < Eri> | He likes to give us assignments using really stupid units. |
23:14 | < Eri> | Lowers the signal to noise ratio, in my opinion. The educational aspect is reduced, and the time involved increases, for no net gain |
23:16 | <@McMartin> | Well |
23:16 | <@McMartin> | Your mech teacher might have been using slugs for a reason |
23:17 | <@McMartin> | You'd use slugs when doing kinematics in US units for the same reason you'd use Newtons for force when doing physics in SI - so that all the factors cancel out. |
23:18 | < Eri> | Could have, except it was just a simple static system, so we just converted it to pounds anyways |
23:18 | <@McMartin> | Ah. |
23:18 | <@McMartin> | (slug = the actualy unit of mass. The one where if you put a pound of force on it it accelerates at 1 ft/s^2) |
23:19 | < ToxicFrog> | McMartin: so to get it to build in VS at all, I need to tell it to build as C++? |
23:21 | < ToxicFrog> | (or write C89 but fuck that) |
23:21 | <@McMartin> | Or restrict yourself to C89 constructs, yes. |
23:21 | <@McMartin> | C++ is still more restrictive than all of C99, though. |
23:21 | <@McMartin> | Since C++'s type system is a bit stronger. |
23:21 | < ToxicFrog> | Right. |
23:21 | < ToxicFrog> | This should build cleanly as C++ with at worst minor modifications, though. |
23:22 | < ToxicFrog> | I also think I've gotten the msys stuff sorted; I didn't fully understand how platforms work in premake. |
23:22 | < ToxicFrog> | build/windows/ should now contain VS project files (which don't work) and Makefiles (which work in the cross-compiler, at least, and should work in native msys). |
23:36 | <@McMartin> | OK, I'll take a look in a bit |
--- Log closed Mon Nov 14 00:00:18 2011 |