Timestamps are in GMT/BST.
| 00:26:26 | | Darrel Quit (Read error: Connection reset by peer) |
| 00:31:21 | sam686 | the server pretty much dies with no errors if a levelgen runs into a line which is "os.exit()" |
| 00:32:01 | | Platskies has joined |
| 00:33:54 | | Platskies has left #bitfighter |
| 00:36:55 | raptor | should we forbit that from the sandbox? |
| 00:36:59 | raptor | *forbid |
| 00:37:08 | raptor | Watusimoto: you around? |
| 00:37:15 | Watusimoto | braely |
| 00:37:17 | Watusimoto | barely |
| 00:37:19 | raptor | heh |
| 00:37:26 | raptor | ok.. did you see my last commit? |
| 00:37:41 | Watusimoto | fix assert? |
| 00:37:45 | raptor | what is xmFireTimer? |
| 00:37:52 | Watusimoto | I have no idea! |
| 00:37:55 | raptor | there's a TODO about it saying to remove for 019 |
| 00:37:57 | sam686 | probably, if we want to allow scripts upload/download as I am just done with writing code to allow level+levelgen upload/download together |
| 00:38:04 | raptor | but I've never know what that is... |
| 00:38:41 | Watusimoto | I see that; that sounds like me |
| 00:39:10 | raptor | ha |
| 00:39:15 | raptor | it's not even used in 018a |
| 00:39:30 | Watusimoto | looks to me like it's a placeholder |
| 00:39:34 | raptor | that TODO note is in the code right at the 018a release revision |
| 00:39:38 | sam686 | also, endless loop in LUA can freeze the game and make server stop working |
| 00:39:41 | raptor | do you mind if i remove it? |
| 00:39:45 | Watusimoto | the value isn't used |
| 00:40:03 | Watusimoto | so it's probably there to keep the communication the same for 018 |
| 00:40:07 | Watusimoto | so yes, please remove it |
| 00:40:14 | raptor | ah ok |
| 00:40:20 | raptor | i'll get rid of it |
| 00:40:21 | raptor | thanks! |
| 00:41:07 | raptor | sam686: os.exit() is not available in 019 - were you able to run it? |
| 00:41:13 | Watusimoto | sam686: you are right about the loop... fixing it would be hard |
| 00:41:25 | Watusimoto | we;d need to monitor the script externally |
| 00:41:37 | raptor | man... runaway loop protection - now there's something i've heard about but have no idea about |
| 00:41:40 | sam686 | running a simple levelgen that only have this: function main() os.exit() end |
| 00:42:04 | Watusimoto | since you are (theoretically) running "friendly" scripts, it hasn't seemed like a priority |
| 00:42:08 | sam686 | it runs and... causes bitfighter to disappear |
| 00:42:14 | Watusimoto | ha! |
| 00:42:41 | raptor | what? |
| 00:42:47 | raptor | is the sandbox not being applied?? |
| 00:43:35 | Watusimoto | I did discover that the requirement for declaring globals is not being applied... |
| 00:45:59 | raptor | what the heck |
| 00:46:06 | raptor | os.exit is an available function |
| 00:46:19 | raptor | i even tested some of these things when implementing the sandbox |
| 00:47:02 | raptor | (I get up set when something Lua-related goes wrong because I feel like I've sacrificed my sanity for it) |
| 00:48:02 | raptor | kaen: is there anything you can think of that you may have done in your Lua static method refactor that may have negated the sandbox? |
| 00:48:04 | Watusimoto | make a test for it! |
| 00:48:25 | Watusimoto | gtest has a "death test" |
| 00:48:38 | Watusimoto | (never tried it, but it sounds awesome!) |
| 00:52:39 | | BFLogBot Commit: c51c14c1b04d | Author: buckyballreaction | Message: Properly remove unused variable (xmFireTimer) to not trigger assert |
| 00:52:52 | raptor | I still need to learn gtest |
| 00:53:06 | raptor | also maybe we should go through our project TODOs left around... |
| 00:53:08 | raptor | one day |
| 00:54:00 | raptor | we have 280 TODOs and FIXMEs... some are probably in tests and 3rd party sources |
| 00:54:18 | Watusimoto | most probably are |
| 00:54:27 | Watusimoto | I don't know if we have any fixmes |
| 00:54:47 | raptor | I've used them on occasion |
| 00:55:11 | raptor | at least 100 TODOs are in the zap directory |
| 00:56:02 | | kumul Quit (Ping timeout: 264 seconds) |
| 00:56:56 | sam686 | one of which is if you delete a level you playing on, then restart level.. endless loop with log/console spamming saying no level is available |
| 00:59:41 | | koda Quit (Quit: koda) |
| 01:00:53 | sam686 | The Assert on "Not the same??" in client.cpp keeps getting triggered when joining a server.. |
| 01:01:36 | sam686 | um, clientGame.cpp |
| 01:03:04 | kaen | raptor: not that I know of, all it does is hang Geom onto the global context table |
| 01:03:24 | Watusimoto | neeed sleeep |
| 01:03:27 | Watusimoto | night |
| 01:06:47 | | Skybax has joined |
| 01:09:08 | | kumul has joined |
| 01:10:02 | amgine123 | did yyou fix my 2 crashes |
| 01:12:30 | raptor | sam686: it may have been fixed in my latest commit... maybe |
| 01:12:43 | raptor | night Watusimoto |
| 01:13:54 | amgine123 | i found the vote down crsh and the /change serveername crash |
| 01:14:09 | amgine123 | er server despriction |
| 01:37:49 | | thread_ Quit (Ping timeout: 250 seconds) |
| 01:41:25 | raptor | oh man... my sandbox never worked |
| 01:41:54 | raptor | i was sure i tested it, but os.exit() fails right on the revision I introduced it... |
| 01:51:19 | raptor | kaen: still around? Maybe you'll have some insight... |
| 01:51:44 | kaen | here I am |
| 01:51:57 | raptor | ok, i just need you to tell me i'm crazy: http://pastie.org/pastes/8469005/text |
| 01:52:35 | raptor | that looks like it sets the sandbox as the global namespace, then overwrites it with table.copy(_G) |
| 01:53:40 | kaen | that appears to be exactly what it's doing |
| 01:53:48 | raptor | ok, so then that would kill the sandbox |
| 01:53:52 | kaen | absolutely |
| 01:54:18 | raptor | so two questions... |
| 01:54:36 | raptor | 1. where does _G come from if it's not at the LUA_REGISTRYINDEX? |
| 01:54:47 | raptor | 2. how should I fix this craziness |
| 01:54:54 | kaen | _G is a special variable |
| 01:55:06 | raptor | so it exists outside of everything? |
| 01:55:10 | kaen | always refers to the current global scope and iirc you can' assign directly to it |
| 01:55:11 | | Skybax Quit (Ping timeout: 245 seconds) |
| 01:55:13 | kaen | can't |
| 01:55:37 | kaen | so anyway, at the point that table.copy is running, _G is the natural global scope |
| 01:55:53 | raptor | so I'm under the false assumption that LUA_REGISTRYINDEX is the current global scope? |
| 01:56:41 | kaen | it refers to the lua "registry" which is like special storage regarding the lua state |
| 01:57:05 | kaen | but it's used to store the global object for each "context" |
| 01:57:06 | kaen | i.e. script |
| 01:57:33 | raptor | ah, which later is loaded as it's own global scope.. |
| 01:57:35 | kaen | those lines (when working properly) will make an environment, store it in the registry using the script's id as the key |
| 01:57:48 | kaen | right, then that environment table is set as the script's global scope |
| 01:58:10 | kaen | and that table.copy copies the natural global scope into all of them |
| 01:58:20 | raptor | hmm, ok |
| 01:58:24 | raptor | i think i'm getting it |
| 01:58:26 | raptor | so, then |
| 01:58:28 | raptor | to fix |
| 01:58:37 | raptor | I need to load the sandbox after the _G |
| 01:58:56 | raptor | but load it in a manner that will reassign all the system functions, right? |
| 01:59:40 | raptor | at least, that's my current idea... |
| 01:59:47 | kaen | I think the fix is to drop the lines luaL_dostring(L, "e = table.copy(_G)"); // Copy global environment to create a local scripting environment |
| 01:59:48 | kaen | lua_getglobal(L, "e"); // -- environment e |
| 01:59:48 | kaen | lua_setfield(L, LUA_REGISTRYINDEX, getScriptId()); // Store copied table in the registry -- <<empty stack>> |
| 01:59:53 | kaen | sorry, formatting |
| 02:00:19 | raptor | i tried that, but the lua_helper scripts are loaded in _G |
| 02:00:34 | kaen | ohh |
| 02:01:32 | kaen | ok, so sandbox first, load /scripts, then you're ok to copy |
| 02:01:53 | raptor | so sandbox the _G |
| 02:02:41 | kaen | I'm reviewing the code around it, one moment |
| 02:03:43 | kaen | ok, yes |
| 02:03:50 | kaen | use a sandbox as _G |
| 02:03:54 | kaen | load the scripts |
| 02:04:10 | kaen | then copy _G into the new contexts there in prepare environment |
| 02:04:32 | kaen | dropping the sandbox code from prepareenvironment, since table.copy will suffice (of course) |
| 02:04:43 | raptor | ok |
| 02:04:56 | kaen | looks like table.copy is shallow |
| 02:05:10 | kaen | I think scripts share the same table references for e.g. Timer |
| 02:05:17 | raptor | oh fun |
| 02:05:25 | kaen | so I think you can communicate between them |
| 02:05:27 | kaen | among other things |
| 02:05:34 | raptor | could do some weird things with a global levelgen script... |
| 02:06:05 | kaen | I was thinking of a shared buffer for plugins |
| 02:06:24 | kaen | I think you could copy/paste between levels with that |
| 02:06:31 | | Watusimoto Quit (Ping timeout: 240 seconds) |
| 02:08:35 | | amgine123 Quit (Ping timeout: 250 seconds) |
| 02:09:44 | raptor | kaen: what's your take on what line 408 of LuaScriptRunner.cpp is doing? |
| 02:13:30 | kaen | this bit? luaL_dostring(L, " function table.copy(t)" |
| 02:13:38 | raptor | yes |
| 02:13:47 | raptor | that whole thing as well as the TODO above it |
| 02:13:47 | kaen | it's declaring (global) function and hanging it on table |
| 02:14:38 | kaen | ah, it's also copying the table's metatable |
| 02:15:20 | kaen | I can make this a deep copy with three lines |
| 02:18:43 | kaen | http://pastie.org/8469031 |
| 02:18:50 | kaen | compiling now to see if it works :P |
| 02:19:53 | kaen | haha nope infinite recursion |
| 02:20:02 | raptor | heh |
| 02:20:16 | raptor | ahhh, so that's what being called with table.copy(_G) |
| 02:20:27 | raptor | interesting... |
| 02:20:38 | kaen | right, there's no table.copy in lua |
| 02:20:56 | kaen | because there's no single correct behavior |
| 02:21:10 | kaen | so apparently this structure has a cyclical reference |
| 02:24:22 | kaen | I guess I could add memoization |
| 02:25:03 | raptor | oh boo - one of the lua_helper_functions.lua uses functions needed outside the sandbox |
| 02:25:17 | raptor | just that one file, I mena |
| 02:25:19 | raptor | *mean |
| 02:25:51 | kaen | wha?!' |
| 02:25:53 | kaen | which? |
| 02:26:14 | raptor | lua_helper_functions.lua uses loadfile |
| 02:26:40 | kaen | ah and does that strict mode thing... |
| 02:27:25 | | amgine123 has joined |
| 02:28:00 | kaen | inspect.lua is using setmetatable |
| 02:28:10 | amgine123 | raptor found many issues with the /commands |
| 02:28:15 | amgine123 | and 2 crashes so far |
| 02:30:33 | | BFLogBot Commit: 0bdcf60d4fe9 | Author: sam8641 | Message: Add level script download/upload together with level download/upload |
| 02:30:35 | | BFLogBot Commit: 3728ff465f93 | Author: sam8641 | Message: Added progress meter for level upload and download |
| 02:30:36 | | BFLogBot Commit: e66dfbced9c9 | Author: sam8641 | Message: Added ini option, AllowLevelgenUpload |
| 02:39:19 | | BFLogBot Commit: 9c13659a1420 | Author: sam8641 | Message: Fix page down/page up error on blank server list |
| 02:40:57 | amgine123 | foudnd a error sleect many objects and drag them turrets and forcefeildswill be displaced |
| 02:50:01 | kaen | noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo |
| 02:50:13 | raptor | que pasa? |
| 02:51:19 | kaen | 18:41 <amgine123> foudnd a error sleect many objects and drag them turrets and forcefeildswill be displaced |
| 02:51:48 | raptor | that has always been a problem, no? I mean, I don't think its every worked any other way... |
| 02:52:55 | amgine123 | well its funny it improperly drags some objects together |
| 02:53:37 | kaen | huh |
| 02:53:51 | kaen | if you hold space and drag them and don't put them near anything else |
| 02:53:52 | kaen | it works ok |
| 02:54:04 | kaen | you have to hold space before you start dragging |
| 02:54:06 | raptor | must be the snapping culprit... |
| 02:54:15 | amgine123 | yeah |
| 02:54:57 | amgine123 | nope doesnt work kaen |
| 02:55:06 | amgine123 | forcefeilds and urrets still snap |
| 02:55:12 | kaen | probably not reliably |
| 02:55:25 | amgine123 | definnitly not |
| 02:55:28 | raptor | that brings up an interesting question - should we default to not snapping? |
| 02:55:31 | kaen | but I just did it a few times |
| 02:55:37 | kaen | we should have a toggle! |
| 02:55:51 | raptor | so 'snap mode' |
| 02:56:48 | amgine123 | relly i seleted a bunch of tuff and held spce and dragged some suff snapped others didnt |
| 02:57:11 | raptor | you'll have to be more specific with the word 'stuff', and possibly reduce it to a simple case |
| 02:58:06 | amgine123 | 1 large barrier 4 loadout zones 1 core 4 forcefields 4 turrets. |
| 02:58:26 | amgine123 | and 4 smallr barriers |
| 03:00:46 | amgine123 | aha |
| 03:01:25 | sam686 | Found out a way to make the snapping turn off without holding. hold down shift+space, press ESC, release all buttons, press ESC. |
| 03:01:28 | amgine123 | with a forcefeildof turret on a polywll or a barrier using dragging close to the relitive object causes displacment |
| 03:03:10 | amgine123 | i have a example level |
| 03:05:44 | raptor | haha sam686, funny find... |
| 03:06:55 | raptor | 8MB limit!?!? |
| 03:07:23 | kaen | 8MB limit? |
| 03:07:24 | kaen | for what? |
| 03:07:37 | raptor | im sam686's new level transfer method... |
| 03:07:45 | kaen | oh |
| 03:07:52 | amgine123 | uplaoded exaple test level of snap issue to DB |
| 03:09:09 | kaen | oh amgine123 |
| 03:09:13 | kaen | I think I fixed your caching bug |
| 03:09:20 | kaen | when you delete a level |
| 03:09:20 | amgine123 | good |
| 03:09:34 | amgine123 | uplaoded a exmple ofsnap issue to DB |
| 03:09:40 | amgine123 | bbl piano practice |
| 03:09:50 | amgine123 | see ya monday most likly |
| 03:09:50 | raptor | sam686: it looks like you left some possible debugging code in gameConnection.cpp? I'm looking at the #if 1... |
| 03:13:08 | sam686 | that was the very old downloading stuff, you can keep the stuff between #if 1 ... else, and can remove the part between #else and #endof |
| 03:18:44 | sam686 | Never seen a level with more then 2 MB in size.. |
| 03:19:20 | sam686 | Plus with progress meter, one can tell how long it takes to upload |
| 03:19:41 | kaen | 8MB seems ok |
| 03:23:07 | | BFLogBot Commit: fb691aef34cb | Author: sam8641 | Message: Removes DataSender from GameConnection as a new way to upload level+levelgen is working |
| 03:23:32 | sam686 | there, removed some DataSender from GameConnection, as my new code seems working even better, just fine |
| 03:37:38 | kaen | installing debian jessie (again) for to making glorious packages! |
| 03:37:43 | kaen | back soon |
| 03:38:12 | | kaen Quit (Remote host closed the connection) |
| 03:43:22 | raptor | sam686: have you ever used the Lua 'include()' method in a levelgen script? |
| 03:43:34 | sam686 | I have not.. |
| 03:44:06 | sam686 | and I don't think no one used "include" on LUA |
| 03:47:25 | raptor | back a bit later... |
| 03:47:28 | | raptor Quit () |
| 03:52:30 | | Nothing_Much has joined |
| 04:08:01 | amgine123 | back |
| 04:09:22 | amgine123 | did you see tehe drag snap issue |
| 04:11:54 | sam686 | does this tell me much? http://sam6.25u.com/upload/screenshot_130.png |
| 04:12:13 | sam686 | seems like a lack of saying what the problem is. (missing all levels) |
| 04:12:31 | amgine123 | uhh i uplaoded to the db? |
| 04:14:24 | amgine123 | try this make a really coplx oly gon or barrier and stik turrets and forcefeilds on it they drag it close to the old locataiton it iwill snap to the old locations spots |
| 04:14:45 | amgine123 | and mess placement up |
| 04:15:19 | amgine123 | try it |
| 04:16:48 | | destroyerimo has joined |
| 04:19:52 | amgine123 | "bug draged objects snapd to the old objects location in LE" |
| 04:25:04 | sam686 | found something strange, a folder/directory named "folder.level". it acually loads a blank level to editor, and says it did save into a folder? I see no files in it though |
| 04:27:14 | amgine123 | did that despition make more sense sam ^-6 |
| 04:27:18 | amgine123 | ^^ |
| 04:28:13 | sam686 | your diescription kindof didn't make sense, deaged? snapd? LE? |
| 04:31:17 | amgine123 | draged snaped level edior |
| 04:31:21 | amgine123 | edior |
| 04:31:36 | amgine123 | snapped |
| 04:32:02 | sam686 | dragging snapped level editor? |
| 04:32:41 | | kaen has joined |
| 04:33:05 | | kaen Quit (Changing host) |
| 04:33:05 | | kaen has joined |
| 04:33:20 | kaen | irssi! |
| 04:33:30 | kaen | while I install a desktop environment ... |
| 04:35:47 | | destroyerimo_ has joined |
| 04:36:46 | | Skybax has joined |
| 04:37:35 | | destroyerimo Quit (Ping timeout: 244 seconds) |
| 04:37:41 | | destroyerimo_ is now known as destroyerimo |
| 04:38:41 | | Nothing_Much Quit (Ping timeout: 272 seconds) |
| 04:38:56 | | Nothing_Much has joined |
| 04:41:23 | | Nothing_Much Quit (Read error: Connection reset by peer) |
| 04:41:36 | | Nothing_Much has joined |
| 04:47:05 | | kaen Quit (Quit: leaving) |
| 04:47:49 | | kaen has joined |
| 04:49:29 | | destroyerimo Quit (Ping timeout: 244 seconds) |
| 04:57:11 | amgine123 | kaen |
| 04:58:58 | kaen | hi amgine123 |
| 04:59:07 | amgine123 | hey |
| 04:59:11 | kaen | hell |
| 04:59:12 | amgine123 | founda minor bug |
| 04:59:13 | kaen | hello |
| 04:59:37 | amgine123 | object snap to ther eold locationwhen being moved in the level editor |
| 05:02:53 | amgine123 | do you see the problem kaen? |
| 05:04:17 | | kaen Quit (Ping timeout: 272 seconds) |
| 05:16:02 | | kaen has joined |
| 05:24:14 | | kaen_ has joined |
| 05:24:27 | | kaen_ Quit (Client Quit) |
| 05:24:35 | | kaen Quit (Quit: leaving) |
| 05:25:02 | | kaen has joined |
| 05:25:02 | | kaen Quit (Changing host) |
| 05:25:02 | | kaen has joined |
| 05:30:00 | | kaen has left #bitfighter |
| 05:30:03 | | kaen has joined |
| 05:31:42 | Nothing_Much | kaen: what's with your internet? |
| 05:32:31 | | Skybax Quit (Ping timeout: 272 seconds) |
| 05:33:32 | kaen | just settling back into debian 7 |
| 05:33:38 | kaen | I'm hopping irc clients right now |
| 05:35:15 | | Nothing_Much Quit (Remote host closed the connection) |
| 05:36:44 | | Flynnn has joined |
| 05:37:55 | | Nothing_Much has joined |
| 05:38:16 | Nothing_Much | aw kaen, what's wrong with ubuntu? :( |
| 05:44:40 | kaen | lol nothing |
| 05:45:11 | kaen | I'm trying to package bitfighter for debian (so it goes into mint, ubuntu, etc.) and I have to package against debian testing |
| 05:45:19 | kaen | (I'm actually on debian 8) |
| 05:45:28 | kaen | (or jessie) |
| 05:45:31 | kaen | (or whatever) |
| 05:48:32 | Nothing_Much | yep |
| 05:48:34 | Nothing_Much | that's testin' dude |
| 05:48:43 | Nothing_Much | or "testing" |
| 05:48:59 | Nothing_Much | man, this libhybris thing is rough\ |
| 05:56:08 | | destroyerimo has joined |
| 05:57:49 | destroyerimo | hi guys |
| 05:59:39 | kaen | hi |
| 06:00:44 | | raptor has joined |
| 06:00:44 | | ChanServ sets mode +o |
| 06:00:50 | raptor | howdy folks |
| 06:00:57 | raptor | i'm only on briefly... |
| 06:01:27 | raptor | but, kaen, if you're here, any ideas on how to reconcile the sandbox with the lua_helper_functions? |
| 06:03:27 | | amgine123 Quit (Ping timeout: 250 seconds) |
| 06:06:28 | raptor | actually, i'll ask again tomorrow - i'm falling asleep |
| 06:06:35 | raptor | thanks! |
| 06:06:40 | | raptor Quit () |
| 06:10:51 | Nothing_Much | kaen: do you have experience with android? |
| 06:11:18 | Nothing_Much | eh, nvm, it's offtopic |
| 06:20:14 | | BFLogBot Commit: 702b3446a2e3 | Author: sam8641 | Message: Better handling of missing levels |
| 06:24:39 | kaen | sam686: that does look better :) |
| 06:24:47 | kaen | how do you trigger it? |
| 06:25:26 | kaen | i.e. what makes a level "not working" |
| 06:25:30 | sam686 | easy, move the "Level" folder, or move all files in the level folder out of there, then restart |
| 06:25:43 | sam686 | or change level after moving levels |
| 06:25:53 | | destroyerimo Quit (Read error: Connection reset by peer) |
| 06:26:09 | sam686 | the level won't work if it can't find the level after server/ hosting started |
| 06:26:26 | kaen | makes sense. |
| 06:26:37 | kaen | definitely better than crashing :) |
| 06:26:48 | | destroyerimo has joined |
| 06:31:50 | | HylianSavior Quit (Quit: Leaving) |
| 06:35:18 | | destroyerimo Quit (Read error: Connection reset by peer) |
| 06:36:14 | | Skybax has joined |
| 06:37:54 | | destroyerimo has joined |
| 06:39:29 | | BFLogBot Commit: 3799f3561c23 | Author: sam8641 | Message: Fixed blank message with no levels to host, compiler was adding strings first then comparing. |
| 06:40:42 | destroyerimo | guys |
| 06:40:46 | kaen | hi |
| 06:40:49 | Nothing_Much | yes? |
| 06:40:51 | destroyerimo | hey |
| 06:40:56 | Nothing_Much | hello |
| 06:40:57 | destroyerimo | i need to test hosting my server |
| 06:41:12 | destroyerimo | can anyone join? |
| 06:42:31 | Nothing_Much | not right now, sorry |
| 06:42:37 | Nothing_Much | gotta recompile it |
| 06:42:50 | Nothing_Much | destroyerimo: which version? |
| 06:43:05 | destroyerimo | version? |
| 06:43:09 | destroyerimo | u mean game? |
| 06:43:15 | destroyerimo | 18? |
| 06:43:24 | sam686 | can't connect to ping timed out (018), it just fails |
| 06:43:28 | Nothing_Much | yeah |
| 06:43:41 | Nothing_Much | destroyerimo: yeah, 018a |
| 06:44:04 | destroyerimo | hmm |
| 06:45:07 | destroyerimo | ok thx guys |
| 06:45:30 | destroyerimo | but why only 3 can be joined? |
| 06:46:08 | Nothing_Much | did you set a maximum amount of players? |
| 06:47:41 | sam686 | it may be that since you don't have your port UDP 28000 forwarded to your computer hosting/or running server, not everyone can connect |
| 06:49:26 | destroyerimo | actually i did |
| 06:49:45 | destroyerimo | is there a way to set maximum players? |
| 06:51:10 | | HylianSavior has joined |
| 06:51:18 | Nothing_Much | oh darn, how do I use cmake again? in the build dir? |
| 06:51:46 | kaen | yes |
| 06:51:48 | kaen | cmake .. |
| 06:51:53 | kaen | or |
| 06:52:02 | kaen | cmake .. -DCMAKE_BUILD_TYPE=Debug |
| 06:52:12 | kaen | if you want a debug build (crashes more but helps find bugs) |
| 06:52:33 | Nothing_Much | ooo debug? |
| 06:52:36 | Nothing_Much | how do I do that? |
| 06:52:55 | kaen | just use the second cmake variation I just posted |
| 06:53:14 | | destroyerimo_ has joined |
| 06:53:18 | kaen | and then when you want to get crazy you can run bitfighter through gdb |
| 06:53:24 | kaen | gdb bitfighter |
| 06:53:29 | kaen | then r at the prompt |
| 06:53:37 | destroyerimo_ | whats gdb? |
| 06:53:43 | kaen | actually it'd be gdb ./bitfighter |
| 06:53:44 | Nothing_Much | I mean like |
| 06:53:46 | kaen | from the exe dir |
| 06:53:52 | Nothing_Much | how do I debug things? lol |
| 06:53:54 | kaen | gdb is a debugger application |
| 06:53:56 | Nothing_Much | what does it do? |
| 06:53:57 | | destroyerimo Quit (Ping timeout: 248 seconds) |
| 06:54:06 | kaen | well, if you get a crash inside of gdb |
| 06:54:09 | | destroyerimo_ is now known as destroyerimo |
| 06:54:18 | kaen | instead of just dying, the program is suspended |
| 06:54:38 | kaen | and you can do all sorts of nutty things from gdb, including read/modify values in memory |
| 06:54:53 | kaen | usually though the most useful thing is a stacktrace |
| 06:55:13 | kaen | if you catch a crash in gdb, when it drops to the gdb prompt, type 'bt' without quotes |
| 06:55:33 | kaen | and the gibberish that comes up makes it 100 times easier for us to fix the bug |
| 06:55:53 | Nothing_Much | oh nice |
| 06:55:55 | Nothing_Much | lemme try |
| 06:55:56 | Nothing_Much | uh |
| 06:56:03 | Nothing_Much | How do I "clean" the directory? |
| 06:56:11 | kaen | depends on how clean |
| 06:56:17 | Nothing_Much | (I didn't have the glx dev files) |
| 06:56:22 | kaen | 'make clean' will usually do |
| 06:56:29 | kaen | oh |
| 06:56:40 | kaen | if cmake fails to configure, rm CMakeCache.txt |
| 06:56:50 | kaen | and try again |
| 06:57:50 | sam686 | http://sam6.25u.com/upload/text1311/131110_06-11-57.txt |
| 06:57:53 | Nothing_Much | uh |
| 06:57:55 | Nothing_Much | oh |
| 06:58:22 | sam686 | not getting any data (0 bytes) incoming from that IP address destroyerimo server connection |
| 06:58:52 | destroyerimo | how many servers do you see sam686 ? |
| 06:59:15 | sam686 | on a second thought, is destoryerimo able to see my server not ping timed out? |
| 06:59:32 | destroyerimo | i see sam server yes |
| 06:59:35 | Nothing_Much | kaen: set_target_properties Can not find target to add properties to: bitfighter |
| 06:59:43 | destroyerimo | SAM TEST 2 |
| 07:00:12 | destroyerimo | how many servers did u see sam686 ? |
| 07:00:37 | sam686 | I see 4, |
| 07:01:14 | destroyerimo | ok now ur server i think its ping timed out :S |
| 07:01:28 | sam686 | i see 2 more of my copies of server at my local LAN (192.168.3.2:28002 and 127.0.0.1:28002) but you all see my 96.2.80.131:28002 |
| 07:02:02 | destroyerimo | i see it now |
| 07:05:54 | sam686 | ok... destroyerimo running a server from china? there is widespread blocking of china internet access, no wonder I can't connect.. |
| 07:06:10 | destroyerimo | yea... |
| 07:06:19 | destroyerimo | however taz also the same problem |
| 07:06:56 | sam686 | well, have you tried hosting locally? it usually list your host in the server list that way? |
| 07:09:04 | | BFLogBot Commit: 21445a30fb1b | Author: kaen | Message: fix test executable compilation on linux |
| 07:09:05 | | BFLogBot Commit: b5e3ed21eed0 | Author: kaen | Message: fix a handful of crashes in the test executable (global static initialization can *not* safely depend on other global statics having been initialized) |
| 07:09:43 | kaen | Nothing_Much: you're missing a dependency (or a couple) |
| 07:09:55 | kaen | it refuses to build if you are |
| 07:10:05 | Nothing_Much | alright |
| 07:10:06 | Nothing_Much | well |
| 07:10:10 | Nothing_Much | lemme try the hg versin |
| 07:10:10 | kaen | rm CMakeCache.txt |
| 07:10:13 | Nothing_Much | *version |
| 07:10:16 | Nothing_Much | yeah I did that |
| 07:10:18 | Nothing_Much | didn't help |
| 07:10:29 | kaen | I mean do it again and pastie the output of cmake :) |
| 07:10:34 | Nothing_Much | how do I change from 019 to 018a |
| 07:10:35 | Nothing_Much | ohh |
| 07:10:38 | kaen | it'll tell you what it can't find |
| 07:10:56 | Nothing_Much | oh man I'm too fast or too impatient :( |
| 07:11:02 | Nothing_Much | I already deleted the files |
| 07:11:08 | Nothing_Much | gonna try out the hg thing |
| 07:11:09 | kaen | oh ok |
| 07:11:52 | kaen | wget https://gist.github.com/kaen/6393623/raw -O- | sh |
| 07:12:03 | kaen | easy-squeezy |
| 07:12:09 | kaen | assuming you're still on debian that is ... |
| 07:12:27 | Nothing_Much | ubuntu dude lol |
| 07:12:29 | Nothing_Much | on armhf :D |
| 07:12:39 | kaen | I mean debian in the broad sense |
| 07:12:42 | kaen | ohhh cool |
| 07:12:50 | kaen | it'll be interesting to see if that still works then |
| 07:12:56 | Nothing_Much | oh dude |
| 07:13:02 | Nothing_Much | I already said it worked on arm |
| 07:13:05 | Nothing_Much | but the thing is |
| 07:13:17 | Nothing_Much | the sound directory and master server wasn't properly linked for some reason |
| 07:13:21 | Nothing_Much | lemme try this again |
| 07:14:55 | | Platskies has joined |
| 07:15:52 | Nothing_Much | thing is that there's no drivers that exist on linux for this cpu/gpu yet |
| 07:16:04 | Nothing_Much | so I've been trying to get libhybris to work on this thing |
| 07:18:11 | | BFLogBot Commit: e1fa22895c9e | Author: kaen | Message: kill a handful of warnings |
| 07:18:31 | kaen | oh weird |
| 07:19:02 | | Flynnn Quit (Quit: This computer has gone to sleep) |
| 07:19:03 | Nothing_Much | it's workin' now, thanx for the script (again) |
| 07:19:12 | kaen | my pleasure :) |
| 07:19:17 | kaen | gotta go to sleep ... |
| 07:19:18 | | Platskies Quit (Ping timeout: 244 seconds) |
| 07:19:21 | Nothing_Much | yeah me too |
| 07:19:22 | kaen | work in five hours |
| 07:19:25 | Nothing_Much | dude! |
| 07:19:30 | Nothing_Much | get to bed asap! |
| 07:19:38 | kaen | solid advice |
| 07:19:41 | kaen | night #bitfighter |
| 07:19:44 | Nothing_Much | l8r dude |
| 07:19:50 | Nothing_Much | oh I got an interview on monday |
| 07:19:51 | Nothing_Much | woo |
| 07:19:52 | Nothing_Much | :D |
| 07:19:56 | kaen | gratz! |
| 07:20:01 | | Flynnn has joined |
| 07:20:05 | kaen | good luck if we don't make contact before then |
| 07:20:14 | Nothing_Much | thanx, have a g'night |
| 07:26:51 | | Platskies has joined |
| 07:30:39 | | kumul Quit (Quit: Leaving) |
| 07:39:02 | | Invisible1 has joined |
| 07:58:29 | | Invisible1 Quit (Ping timeout: 248 seconds) |
| 07:59:27 | | Platskies Quit (Ping timeout: 272 seconds) |
| 08:07:49 | | Platskies has joined |
| 08:15:23 | | fordcars_xp has joined |
| 08:15:25 | fordcars_xp | Hi |
| 08:15:57 | fordcars_xp | kae, in lua, is there any way to get a points values after it's created |
| 08:16:02 | fordcars_xp | *kaen |
| 08:20:58 | | fordcars_xp Quit (Quit: Page closed) |
| 08:26:05 | | Watusimoto has joined |
| 08:26:11 | | Invisible1 has joined |
| 08:57:41 | | Platskies Quit (Quit: Platskies) |
| 09:02:53 | | Platskies has joined |
| 09:24:27 | | Skybax Quit (Ping timeout: 265 seconds) |
| 09:34:07 | | Watusimoto Quit (Ping timeout: 265 seconds) |
| 09:34:29 | | Invisible1 Quit (Ping timeout: 248 seconds) |
| 09:40:58 | | destroyerimo Quit (Read error: Connection reset by peer) |
| 09:43:38 | | Darrel has joined |
| 10:01:01 | | Flynnn Quit (Quit: This computer has gone to sleep) |
| 10:10:15 | | HylianSavior Quit (Read error: Connection reset by peer) |
| 11:12:34 | | Platskies Quit (Read error: Connection reset by peer) |
| 11:15:02 | | Platskies has joined |
| 11:45:49 | | Darrel Quit (Ping timeout: 272 seconds) |
| 11:46:04 | | kaen Quit (Ping timeout: 264 seconds) |
| 11:46:20 | | Darrel has joined |
| 11:57:55 | | LordDVG has joined |
| 11:59:28 | | Platskies Quit (Quit: Platskies) |
| 12:00:11 | | YoshiSmb has joined |
| 13:10:48 | | LordDVG Quit (Remote host closed the connection) |
| 13:25:01 | | YoshiSmb Quit (Ping timeout: 250 seconds) |
| 16:10:14 | | YoshiSmb has joined |
| 17:05:09 | | YoshiSmb Quit (Ping timeout: 250 seconds) |
| 17:30:22 | | HylianSavior has joined |
| 17:48:17 | | LordDVG has joined |
| 17:50:54 | | Canseco has joined |
| 18:25:19 | | LordDVG Quit (Remote host closed the connection) |
| 19:14:57 | | Skybax has joined |
| 19:16:03 | | Invisible1 has joined |
| 19:20:16 | | sam686 has left #bitfighter |
| 19:34:29 | | raptor has joined |
| 19:34:29 | | ChanServ sets mode +o |
| 20:03:56 | | Invisible1 Quit (Ping timeout: 245 seconds) |
| 21:29:57 | | Flynnn has joined |
| 21:58:34 | | fordcars_xp has joined |
| 21:58:34 | | raptor summons another developer |
| 21:58:51 | | Watusimoto has joined |
| 21:59:59 | Watusimoto | hi |
| 22:00:06 | | -asimov.freenode.net- *** Looking up your hostname... |
| 22:00:06 | | -asimov.freenode.net- *** Checking Ident |
| 22:00:06 | | -asimov.freenode.net- *** No Ident response |
| 22:00:06 | | -asimov.freenode.net- *** Couldn't look up your hostname |
| 22:00:12 | | BFLogBot has joined |
| 22:00:12 | | -ChanServ- [#bitfighter] Welcome to #bitfighter. This is an IRC channel, many or all of the users may not be paying attention. Please have patience when waiting for a response. |
| 22:00:20 | raptor | i can't believe that worked |
| 22:00:29 | raptor | hi Watusimoto |
| 22:00:35 | raptor | found out the sandbox issue |
| 22:00:45 | raptor | and I request ideas on it, if you have them |
| 22:01:49 | raptor | basically, we set up the global environment, load the *helper_scripts.lua, then create a new environment for each script by copying the global one |
| 22:02:25 | raptor | when creating the new environment, the issue is that we create the sandbox as the new one, then copy the main global one (_G) over it |
| 22:02:41 | raptor | so negating the effects of the sandbox |
| 22:03:42 | | raptor pauses for acknowledgement |
| 22:06:35 | | Canseco Quit (Quit: Leaving) |
| 22:07:35 | Watusimoto | why not put the sandbox in the main global env? |
| 22:07:44 | raptor | oh good, SYN ACK |
| 22:07:49 | raptor | ok |
| 22:07:50 | raptor | so |
| 22:08:00 | Watusimoto | so when we copy that, our copies get sandboxes too |
| 22:08:09 | raptor | the issue with that is that lua_helper_functions.lua uses methods prohibited |
| 22:08:20 | raptor | like 'loadfile' and getmetatable |
| 22:10:37 | raptor | so setting up the sandbox *anywhere* will disallow the loading of that helper script |
| 22:11:01 | raptor | so, I need ideas on how to provide those helper methods, yet sandbox the environment |
| 22:13:37 | Watusimoto | I see |
| 22:14:30 | Watusimoto | could the helper script do its stuff then create the sandbox? |
| 22:14:49 | Watusimoto | the sandbox is written in lua, right? |
| 22:15:12 | raptor | yes, see LuaScriptRunner.cpp, look for 'sandbox' |
| 22:18:15 | Watusimoto | message from bitaccel: |
| 22:18:16 | Watusimoto | We were having issues with some hardware in the new server so we are postponing the move until we can make sure everything is stable. |
| 22:18:43 | Watusimoto | so would having the helper script establish the sandbox work? |
| 22:19:41 | raptor | i'm not sure... can it provide those functions will having them nil'd out afterwards? |
| 22:21:28 | | sky_lark has joined |
| 22:23:23 | sky_lark | Anyone know if it's possible to make a scaled asteroid spawn? |
| 22:23:48 | raptor | hi sky_lark, i don't think so... unless it's levelgen'd |
| 22:25:25 | sky_lark | mmkay, thanks |
| 22:25:32 | | sky_lark has left #bitfighter |
| 22:26:16 | fordcars_xp | raptor, are you sure? |
| 22:26:36 | fordcars_xp | oh, I guess so |
| 22:27:19 | Watusimoto | >>> can it provide those functions will having them nil'd out afterwards? <<< why not? it does what it needs to do, then unleashes the nilling and that's the end of that |
| 22:27:57 | raptor | really? |
| 22:28:14 | raptor | because it loads some stack tracer stuff, etc. |
| 22:34:33 | Watusimoto | uh |
| 22:35:07 | Watusimoto | if the sandbox has functions that are niled out, then those functions are not available to anyone |
| 22:35:20 | raptor | correct |
| 22:35:32 | raptor | but, for instance |
| 22:35:42 | Watusimoto | does it matter if the sandbox is applied by the global environment or the startup scripts? |
| 22:35:50 | raptor | we provide an include() method in lua_helper_function.lua that calls 'loadfile' |
| 22:36:00 | raptor | loadfile will be nil'd thus rendering useless that function |
| 22:36:28 | raptor | the issue is the same - we provide functionality in one of the helper scripts that would use nil'd items |
| 22:36:58 | Watusimoto | if the helper does this: myinclude = include, then the sandbox later does this: include = nil, myinclude should still work |
| 22:37:14 | Watusimoto | at least that's my understanding |
| 22:37:18 | raptor | oh really |
| 22:37:25 | Watusimoto | well, let's do a quick test |
| 22:37:39 | raptor | if if 'include' uses functionality that is also nil'd out? |
| 22:37:46 | raptor | *even if |
| 22:37:47 | raptor | ok |
| 22:37:57 | Watusimoto | Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio |
| 22:37:57 | Watusimoto | > print(1) |
| 22:37:57 | Watusimoto | 1 |
| 22:37:57 | Watusimoto | > x = print |
| 22:37:57 | Watusimoto | > x(1) |
| 22:37:59 | Watusimoto | 1 |
| 22:38:01 | Watusimoto | > print = nil |
| 22:38:03 | Watusimoto | > print(1) |
| 22:38:05 | Watusimoto | stdin:1: attempt to call global 'print' (a nil value) |
| 22:38:08 | Watusimoto | stack traceback: |
| 22:38:10 | Watusimoto | stdin:1: in main chunk |
| 22:38:12 | Watusimoto | [C]: ? |
| 22:38:14 | Watusimoto | > x(1) |
| 22:38:17 | Watusimoto | 1 |
| 22:38:19 | Watusimoto | > |
| 22:38:28 | raptor | uhh |
| 22:38:31 | Watusimoto | so yes, I think that is how it works |
| 22:39:31 | raptor | very interesting... |
| 22:39:35 | raptor | testing with a levelgen |
| 22:40:00 | Watusimoto | so you can keep secret or private implementations of the functions you niled out |
| 22:40:17 | Watusimoto | the function itself is still there... it's just the local symbol that points to it that is niled |
| 22:40:24 | Watusimoto | niled? nilled? |
| 22:40:40 | Watusimoto | nil'ed? |
| 22:40:41 | raptor | nil'd |
| 22:40:49 | raptor | nullified |
| 22:41:09 | Watusimoto | nil'd seems to work... it implies some letters are left out (without worring about which ones!) |
| 22:41:31 | raptor | ok, so... right now i'm using a whitelist sandbox |
| 22:41:45 | raptor | and setting it to the global state, which means everything else is wiped out |
| 22:41:50 | raptor | i should build a blacklist.. |
| 22:41:58 | raptor | then nil them |
| 22:42:55 | Watusimoto | either approach should work |
| 22:43:11 | Watusimoto | or maybe not |
| 22:43:12 | raptor | whitelist doesn't seem to, in my head |
| 22:43:26 | Watusimoto | when you say everything, that means... everything that was previuosly loaded is gone? |
| 22:43:39 | raptor | yep |
| 22:43:47 | raptor | whitelist becomes the new global state |
| 22:43:50 | Watusimoto | well, then that probably won't work ;-) |
| 22:45:06 | Watusimoto | wow... sam fixed a lot of bugs I didn't know we had |
| 22:45:16 | raptor | heh, yes |
| 22:45:52 | raptor | I actually thought we were getting close to release, then sam686 came along and threw some chaos in the mix, but ended up fixing lots of bugs |
| 22:48:45 | raptor | so tell me about the 'STRICT' stuff in the lua_helper_function.lua file? |
| 22:50:10 | Watusimoto | let me open it up |
| 22:52:32 | raptor | is it just separation of global/local vars? and is that for Lua 5.2 compatibility? |
| 22:52:53 | | kumul has joined |
| 22:53:31 | | Platskies has joined |
| 22:53:32 | Watusimoto | ok |
| 22:53:49 | Watusimoto | strict is something I added to fix what I consider a horrible design decision in lua |
| 22:53:59 | Watusimoto | that is the default declaration of variables as globa; |
| 22:54:25 | Watusimoto | the way it works (or should work, as it is currently not working) |
| 22:54:42 | Watusimoto | is that in main() you can declare vars as global like this: |
| 22:54:45 | Watusimoto | x = 1 |
| 22:55:23 | raptor | ah yes |
| 22:55:28 | Watusimoto | but anywhere else you can do it with global x = 1 |
| 22:55:47 | raptor | default global decl. reduces performance, too, I think |
| 22:56:05 | Watusimoto | yes, probably a little, but I doub't you'd notice outisde a huge tight loop |
| 22:56:40 | Watusimoto | but really, it prevents stupid errors like x =1 ; xx = x + 1 |
| 22:57:02 | Watusimoto | and there is no need to declare globals outside of main() |
| 22:57:26 | Watusimoto | so it helps users help themselves :-) |
| 23:00:07 | raptor | well... it doesn't seem to be working |
| 23:00:22 | raptor | strict mode, i mean - which was your comment yesterday, I think |
| 23:01:07 | raptor | was it ever working? |
| 23:01:22 | | kaen_ has joined |
| 23:01:56 | fordcars_xp | "I actually thought we were getting close to release" |
| 23:02:24 | kaen_ | Hi. Just wanted to drop in and say that I use require() in my plugins |
| 23:02:38 | fordcars_xp | hi |
| 23:02:51 | raptor | hi kaen_ |
| 23:02:59 | raptor | so... in my blacklist, I should provide that? |
| 23:03:18 | kaen_ | I'm having network issues so I'm not sure how long I'll stay connected or when ill be back on a solid one |
| 23:03:23 | raptor | I was thinking of allowing the include() |
| 23:03:32 | raptor | but killing the require, still... |
| 23:03:38 | raptor | ok |
| 23:03:40 | fordcars_xp | hey kaen_, did you see my irc last night? |
| 23:03:58 | fordcars_xp | if it's possible to get back point values in lua... |
| 23:04:12 | raptor | fordcars_xp: get them from where? |
| 23:04:17 | fordcars_xp | from a point :P |
| 23:04:29 | fordcars_xp | Point = x, y |
| 23:04:32 | raptor | give an example so I know what you mean |
| 23:04:34 | fordcars_xp | get x and y |
| 23:04:41 | raptor | point.x, point.y |
| 23:04:47 | fordcars_xp | oh crappy crap |
| 23:04:50 | fordcars_xp | thanks :P |
| 23:04:50 | kaen_ | I don't use include, but in most languages include always reruns the script whereas require caches the result and always return the same one on subsequent calls |
| 23:05:09 | kaen_ | So there's a different use case for each |
| 23:05:16 | fordcars_xp | soo, later, food time |
| 23:05:21 | | fordcars_xp Quit (Quit: Page closed) |
| 23:06:35 | | Nothing_Much Quit (Remote host closed the connection) |
| 23:06:48 | Watusimoto | raptor: (sorry for being inattentive -- trying to do something else at the same time) it did work, yes |
| 23:06:53 | kaen_ | I'm not familiar with our implementation though, so it could be different |
| 23:07:25 | raptor | kaen_: I'd want to lock down 'require' somehow to only allow pulling from the scripts/robots/editor_plugins directory, I think |
| 23:07:43 | raptor | unless it really isn't that UNSAFE as the docs seem to think |
| 23:07:57 | raptor | maybe with other stuff blacklisted it's OK |
| 23:08:03 | | Nothing_Much has joined |
| 23:08:48 | kaen_ | As long as the require env is sandboxed it should be safe afaik |
| 23:09:13 | Nothing_Much | kaen_: the script gave me 019, is that correct? |
| 23:09:36 | kaen_ | If it does something weird like run in the natural global context, then it'd be easy to implement a safe one |
| 23:09:50 | Watusimoto | take this example |
| 23:09:52 | kaen_ | Correct, NM |
| 23:09:58 | Watusimoto | print = nil |
| 23:10:05 | Watusimoto | then we require a functin that uses print |
| 23:10:14 | Watusimoto | it won't work |
| 23:10:25 | Watusimoto | there's no way (that I can see) to make print work again |
| 23:10:58 | Watusimoto | so I conclude that require won't be able to reenable a blacklisted fn |
| 23:12:13 | kaen_ | There is no way (unless you context hop via debug) |
| 23:12:46 | kaen_ | Or maybe getfenv :/ |
| 23:13:37 | kaen_ | Which sucks because I use getfenv and setfenv in my library and that means we should blacklist them |
| 23:13:56 | | Skybax Quit (Ping timeout: 245 seconds) |
| 23:14:35 | | Flynnn Quit (Quit: This computer has gone to sleep) |
| 23:16:24 | kaen_ | Alright gotta boys. Good luck! |
| 23:16:32 | kaen_ | Gotta run |
| 23:16:43 | | kaen_ Quit (Quit: kaen_) |
| 23:20:07 | raptor | Watusimoto: what you're saying is that require, with the other blacklisted stuff, would be harmless |
| 23:20:12 | raptor | 'require' |
| 23:20:53 | Watusimoto | I'm saying that's what I think :-) |
| 23:21:24 | raptor | this is from the sandbox page: require - UNSAFE - modifies globals (e.g. package.loaded), provides access to environments outside the sandbox, and accesses the file system. |
| 23:21:25 | Watusimoto | unless require were able to reimport, say, debug |
| 23:22:07 | Watusimoto | modifying package.loaded is prob ok |
| 23:22:18 | Watusimoto | access to file system could be ok if it's read-only |
| 23:22:46 | Watusimoto | unless you do require bitfighter.ini and somehow read the pws there |
| 23:22:52 | Watusimoto | but even then... |
| 23:23:04 | Watusimoto | access to environments outside sandbox is kind of vague |
| 23:23:56 | | Darrel Quit (Read error: Connection reset by peer) |
| 23:24:18 | raptor | found VLC sandbox: https://www.videolan.org/developers/vlc/share/lua/modules/sandbox.lua |
| 23:25:16 | | kumool has joined |
| 23:27:45 | Watusimoto | we do need a way to load libs, I think |
| 23:28:22 | raptor | me too |
| 23:28:49 | | kumul Quit (Ping timeout: 272 seconds) |
| 23:28:49 | raptor | maybe we should hijack 'require' and only allow loading from certain dirs? |
| 23:28:57 | Watusimoto | that would make sense |
| 23:31:19 | Watusimoto | not sure how, exactly |
| 23:31:44 | Watusimoto | maybe remove paths from require, so only local folder access |
| 23:32:41 | Watusimoto | First, require searches for the file in a path; second, require controls whether a file has already been run to avoid duplicating the work. Because of these features, require is the preferred function in Lua for loading libraries. |
| 23:32:56 | Watusimoto | oopps.... left off first sentence |
| 23:32:57 | Watusimoto | Roughly, require does the same job as dofile, but with two important differences. |
| 23:33:21 | Watusimoto | so we can either 1) use dofile, or 2) limit the path |
| 23:34:25 | | Flynnn has joined |
| 23:34:26 | Watusimoto | To determine its path, require first checks the global variable LUA_PATH. If the value of LUA_PATH is a string, that string is the path. Otherwise, require checks the environment variable LUA_PATH. Finally, if both checks fail, require uses a fixed path (typically "?;?.lua", although it is easy to change that when you compile Lua). |
| 23:34:32 | Watusimoto | from http://www.lua.org/pil/8.1.html |
| 23:35:04 | Watusimoto | so if we control LUA_PATH, we can control where require loads |
| 23:35:32 | Watusimoto | I do remember setting that somewhere at some time in the distant past |
| 23:35:51 | Watusimoto | but it's not in lua_helper_functions, which is what I would expect |
| 23:37:53 | Watusimoto | http://stackoverflow.com/questions/4125971/setting-the-global-lua-path-variable-from-c-c#4156038 |
| 23:39:12 | Watusimoto | the last answer suggests LUA_PATH is an environment var, but I thnk that is wrong |
| 23:41:58 | raptor | yeah, its not in the env on my system |
| 23:42:47 | raptor | so that first answer is our solution? |
| 23:43:20 | Watusimoto | aha, this is probably easiest |
| 23:43:20 | Watusimoto | You can also change package.path in Lua before calling require. |
| 23:43:57 | Watusimoto | so we'd need to do our setup, change the path, then disable the mecahsnim used to change the path |
| 23:44:47 | raptor | disable means to do package = nil |
| 23:47:43 | | noneofmynickswor has joined |
| 23:51:53 | | kumool Quit (Ping timeout: 272 seconds) |
| 23:57:37 | Watusimoto | about to push a set of commits... just a general warning that there is a bunch of new work disguised as a "Merge" due to a misunderstanding of how TortoiseHg works. Sorry! |
| 23:57:51 | raptor | uh ok |
| 23:58:09 | | BFLogBot Commit: 71f70c54994c | Author: watusimoto | Message: Put constructors first |
| 23:58:11 | | BFLogBot Commit: 6ebf70f0532b | Author: watusimoto | Message: Hide useless Namespaces page |
| 23:58:11 | raptor | i'll... make sure it compiles, like normal :) |
| 23:58:12 | | BFLogBot Commit: 03d31e983054 | Author: watusimoto | Message: Improve docs |
| 23:58:14 | | BFLogBot Commit: 92883b6d6a95 | Author: watusimoto | Message: Whitespace |
| 23:58:15 | | BFLogBot Commit: 09e519e24ae0 | Author: watusimoto | Message: Example is messed up |
| 23:58:17 | | BFLogBot Commit: 4cedc63ed238 | Author: watusimoto | Message: Let the error message box match the screenmode of whatever is calling it |
| 23:58:18 | | BFLogBot Commit: 8bb708f955af | Author: watusimoto | Message: Make method a const |
| 23:58:20 | | BFLogBot Commit: a915acb31bd8 | Author: watusimoto | Message: Wording |
| 23:58:21 | | BFLogBot Commit: 9d6334b0082e | Author: watusimoto | Message: Editor UI now shown beneath scripting error message display; can hit [/] to show console directly from error window (no need to press [Esc] first), |
| 23:58:23 | | BFLogBot Commit: 9ba3d99e8158 | Author: watusimoto | Message: Whitespace |
| 23:58:24 | | BFLogBot Commit: 830d4d300078 | Author: watusimoto | Message: Merge |
| 23:58:26 | | BFLogBot Commit: eb6f8e56920a | Author: watusimoto | Message: Comment interesting by irrelevant |
| 23:58:27 | | BFLogBot Commit: 31469f6b0009 | Author: watusimoto | Message: Remove dead code |
| 23:58:29 | | BFLogBot Commit: d2fe9c310df3 | Author: watusimoto | Message: Merge |
| 23:58:30 | | BFLogBot Commit: 0d5f96e1976b | Author: watusimoto | Message: Fix lingeringMessage concurrency issues |