#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2013-11-11

Timestamps are in GMT/BST.

00:04:44raptorit compiled! and with no new warnings
00:07:41raptorWatusimoto: looks like we already do something in LuaScriptRunner::setModulePath()
00:07:47raptoris that sufficient?
00:08:14raptorlooks good to me...
00:08:35raptorother than setting 'package' to nil (which will be done with the sandbox)
00:08:40Watusimotoprobably... I thought so at one time
00:09:06Watusimotothat's what I was looking for earlier in the lua code
00:10:02raptorso with that, do we even need our 'include' function in the lua_helper_scripts.lua?
00:12:01raptorI'm going to change it to 'require' and see what happens
00:13:05raptorlooks like it works!
00:21:51raptoroh interesting - i think kaen put all of our Geom library methods into c++
00:22:50raptoroh wiat
00:22:56raptorno he didn't, that's something else
00:33:46Watusimotohe put additional methods into c++
00:34:35raptoryes
00:34:37raptorok
00:34:44raptorso... i think i can do our sandbox...
00:34:51raptorwe don't need the loadfile function any more
00:35:03raptorand that leaves the strict stuff
00:35:53WatusimotoHmmm... I pushed some changes, and they didin't show up here
00:36:10raptorchecking BFLogBot...
00:36:10BFLogBotBe careful or be road-kill. -- Calvin
00:36:12Watusimotothey're in google code
00:36:26Watusimotobut those I pushed 40 mins ago did show up here
00:36:45Watusimotothere was a problem with the push, maybe that's the reason?
00:37:32raptorcould be
00:39:31raptorno more UIYesNo?
00:42:50raptorlooks like googlecode ddin't post to the web hook
00:42:59raptorso not a problem with logbot
00:43:16Flynnn Quit (Quit: This computer has gone to sleep)
00:45:49Watusimotothat was my guess as well.
00:45:53Watusimotowell... good night!
00:46:18Flynnn has joined
00:46:23raptornight!
00:46:36raptormaybe i'll get the sandbox working by tomorrow...
00:47:42Watusimotomaybe we'll get a release by christmas!
00:47:59Watusimoto(intended as a joke, maybe not obvious...)
00:48:05raptorheh...
00:48:07raptor...
00:48:36raptorwe keep promising ourselves not to ever again take as long as 016 to release
00:48:50raptordinner!
01:06:11Watusimoto Quit (Ping timeout: 240 seconds)
01:13:17Nothing_Much Quit (Read error: Connection reset by peer)
01:13:54Nothing_Much has joined
01:37:20Platskies Quit (Quit: Platskies)
01:39:13Platskies has joined
02:06:51Flynnn Quit (Quit: This computer has gone to sleep)
02:11:29Flynnn has joined
02:29:12Flynnn Quit (Quit: This computer has gone to sleep)
02:30:07Flynnn has joined
02:50:31BFLogBot Commit: 335ffb326409 | Author: buckyballreaction | Message: Fix compiling
02:53:28Platskies Quit (Read error: Connection reset by peer)
03:01:13Platskies has joined
03:02:36Skybax has joined
04:01:01raptorquestion of the night: should I set _G to nil?
04:15:54SkybaxWhat
05:03:19Nothing_Much Quit (Remote host closed the connection)
05:13:06sam686 has joined
05:13:06ChanServ sets mode +v
05:48:31Platskies Quit (Quit: Platskies)
05:51:11Platskies has joined
06:13:11Platskies__ has joined
06:16:40Platskies Quit (Ping timeout: 264 seconds)
06:16:47raptor Quit ()
06:16:55Platskies__ is now known as Platskies
06:42:31Platskies__ has joined
06:45:50Platskies Quit (Ping timeout: 264 seconds)
06:52:47noneofmynickswor Quit (Quit: holy shit its 3am!)
06:57:14Platskies__ Quit (Read error: Connection reset by peer)
06:59:26Platskies has joined
07:31:28Flynnn Quit (Quit: This computer has gone to sleep)
07:35:24Flynnn has joined
08:31:06Darrel has joined
08:54:57watusimoto has joined
08:54:57ChanServ sets mode +o
09:09:02HylianSavior Quit (Read error: Connection reset by peer)
09:10:52Skybax Quit (Ping timeout: 244 seconds)
09:54:49Nothing_Much has joined
10:09:58Flynnn Quit (Quit: This computer has gone to sleep)
11:58:29Watusimoto_ has joined
12:01:11Invisible1 has joined
12:26:45Platskies Quit (Quit: Platskies)
12:54:25Invisible1 Quit (Ping timeout: 272 seconds)
13:08:50Invisible1 has joined
13:12:05Watusimoto_ Quit (Ping timeout: 248 seconds)
13:40:04Invisible1 Quit (Ping timeout: 264 seconds)
13:40:28Invisible1 has joined
13:54:35Invisible1 Quit (Ping timeout: 245 seconds)
13:57:04kaen has joined
14:02:29destroyerimo has joined
14:19:33kaen Quit (Ping timeout: 272 seconds)
14:44:54Invisible1 has joined
14:46:30kaen has joined
15:00:35destroyerimo Quit (Read error: Connection reset by peer)
15:03:27Watusimoto_ has joined
15:04:58destroyerimo has joined
15:05:01watusimoto1 has joined
15:05:17watusimoto Quit (Ping timeout: 252 seconds)
15:05:35watusimoto has joined
15:05:45ChanServ sets mode +o
15:09:19watusimoto1 Quit (Ping timeout: 252 seconds)
15:26:18watusimoto1 has joined
15:26:18watusimoto Quit (Read error: Connection reset by peer)
15:34:53destroyerimo Quit (Read error: Connection reset by peer)
15:35:18destroyerimo has joined
15:48:05watusimoto1 Quit (Quit: Leaving.)
15:50:39watusimoto has joined
15:50:45ChanServ sets mode +o
15:55:26kaen Quit (Remote host closed the connection)
15:58:04kaen has joined
16:05:56destroyerimo Quit (Read error: Connection reset by peer)
16:06:46destroyerimo has joined
16:10:57Invisible1 Quit (Ping timeout: 240 seconds)
16:11:17Watusimoto_ Quit (Ping timeout: 252 seconds)
16:17:47HylianSavior has joined
16:27:26raptor has joined
16:27:27ChanServ sets mode +o
16:27:45raptorgood morning!
16:29:38destroyerimo Quit (Ping timeout: 240 seconds)
16:31:20raptoroooo all the devs are here, yay
16:31:22raptorok
16:31:24raptorso
16:32:07raptorI made progress on the sandbox
16:32:32raptorthe black list is working; however, there are 2 problems now:
16:33:05raptor1. the STRICT rules do not work in the environment as they call blacklisted methods
16:33:22raptor2. stacktracer fails because I blacklisted much of 'debug'
16:49:54kaen Quit (Ping timeout: 265 seconds)
16:51:32kaen has joined
16:51:59kaenSTRICT doesn't break my heart ... but stack tracer is really important
16:52:06raptorhi kaen
16:52:46raptorthe question is - do we still want to provide debugging utilities that'll allow breaking out of the sandbox?
16:56:23kaen Quit (Ping timeout: 252 seconds)
17:02:22kaen has joined
17:08:16kaenconnection is still pretty spotty -- anyway I don't see how stack tracer lets you break the sandbox
17:08:30raptorit requires certain debug commands
17:08:42raptorwhich can allow environment switching
17:09:28kaenso I'm saying run it in a context where it has those commands, and do the sandboxing afterwards
17:10:52raptorthe issue is that debug has commands that will allow it to break out of the environment
17:11:05raptormaybe i'm not understanding what you're saying
17:11:50kaenok, I'm taking for granted that we trust stacktrace.lua
17:12:36kaenso when we require() or include() it etc., we let it run with access to the natural context
17:13:14kaenthis might require storing local references to the debug functions it needs (local dbg_fn = debug.fn)
17:13:47kaenthen we just put the value returned from include (_M in the script) into the new environment we're creating
17:14:20kaen_M is an opaque black box that will still have acess to its locals (via closure) but won't expose them in any way
17:14:44kaenand it will still be able to run in a sandboxed environment
17:20:08raptorwait wait - i think I can expose some of the safer debug commands and it'll work for stacktracer
17:20:54raptorha! it worked!
17:23:29raptorkaen: do 'getinfo' and 'getlocal' seem harmless enough to allow?: http://www.lua.org/manual/5.1/manual.html#pdf-debug.getinfo
17:23:48raptorwithout special wrapping, etc..
17:25:19kaen Quit (Ping timeout: 240 seconds)
17:26:19kaen has joined
17:26:20kaen Quit (Changing host)
17:26:20kaen has joined
17:28:57raptorooo... this looks nice: https://github.com/kikito/sandbox.lua/blob/master/sandbox.lua
17:29:54raptorit even has loop protection
17:34:23LordDVG has joined
17:36:58kaenhmm getlocal is cutting it close, but it's safe as long as no function which calls user code also stores a blacklisted value as a local
17:37:58raptorstacktracer seems to work fully if I allow those 2
17:39:23raptorFYI, here's my current sandbox, that I execute right when the environment is set up: http://pastie.org/pastes/8472425/text
17:39:45raptornotably, 'require' is not on that list
17:40:03raptorwe already lock it down to jsut the 'scripts' directory
17:40:43kaenah, beautiful
17:41:23raptorso if you think it's ok for those debug methods, then the last thing I need to do is some how remap the current environment to _G
17:41:52raptorI wonder if I should store this in a .lua file instead of the c++
17:43:30kumul has joined
17:43:34kaenI don't see a reason for it to be in C
17:43:53raptorwould it be ok to put in a sandbox.lua in the scripts dir? what are the risks?
17:44:18kumul Quit (Client Quit)
17:44:27kaenIt sounds fine to me. User code can only require() it into a sandboxed environment
17:44:39kaenworst case scenario, you crash lua by trying it I think
17:45:21raptorok, but deploying it as a text file makes it easy for the end-user to edit
17:47:28raptorbut if a user wants to, i suppose that their prerogative to mess up their own environment
17:48:10kaenand on the flip side, it lets advanced users "fix up" their own environment :)
17:49:21raptorheh
17:49:33raptorseems reasonable, then
17:49:35raptori'll do that..
17:57:35watusimotoraptor: I have a pull request open on that package!
17:57:36watusimotohttps://github.com/eykamp/sandbox.lua
17:58:10raptorhi watusimoto
17:58:12raptorhuh??
17:58:36raptori don't see any changes you've made...
17:58:46raptoroh... h aha
17:58:49raptora typo
17:58:55watusimotoI'm not sure how to display them
17:58:59raptordo you use that somewhere?
17:59:02watusimotono
18:00:24watusimotohttps://github.com/eykamp/sandbox.lua/compare/kikito:master...eykamp:patch-1?expand=1
18:00:38watusimotojust like things to be "right"
18:00:51raptorheh
18:01:04watusimotoactually never saw it before you posted the link
18:01:39watusimotobut it looks good
18:01:49watusimotoanyway... heading out... back later
18:02:04kaenlater!
18:02:12raptorhaha
18:02:14raptorlater
18:12:51raptorit sure is nice having no warnings when compiling...
18:16:40watusimoto Quit (Ping timeout: 245 seconds)
18:18:27kaenI still get a handful
18:18:41kaenat least on gcc 4.8.2 i386
18:19:14raptorrelease or debug?
18:19:31raptorI've been ignoring the poly2tri/sqlite/recast ones
18:20:38kaendebug I believe
18:21:26raptorhmmm, i'm on 4.7.2
18:21:28raptorfor gcc
18:21:50kaenyep, debug
18:22:03kaenmy ubuntu gcc gives no warnings, but the debian testing gcc does
18:24:35kaenwow, it even generates one inside of boost :/
18:24:54raptoreek
18:24:56kaenand it's really, really long
18:25:06kaenBanList.cpp:12
18:25:09kaenright at the include
18:33:44raptorwe have the newest boost I though
18:33:46raptor*thought
18:37:20Watusimoto has joined
18:43:57Nothing_Much Quit (Remote host closed the connection)
18:44:30raptorI attempted to add read-only properties to some Lua modules
18:44:36raptorI figured it was a good idea
18:44:58raptorhowever, we add a table.clear() method in lua_helper_functions.lua that will trigger the protection
18:45:24raptorso I can either: 1. not have protection OR 2. add the table.clear() method in the cpp
18:46:13Nothing_Much has joined
18:46:24raptorhmm... or maybe this is a bug - I mean, why are the lua_helper_functions loading after the sandbox anyways
18:46:43kaensounds like it
18:48:44raptorah... each sub-class is reloading the script in its context (like console, plugin, etc.)
18:57:49Nothing_Much Quit (Remote host closed the connection)
18:59:51Nothing_Much has joined
19:05:53kumul has joined
19:07:55Watusimotowhat does the ro propery do exactly?
19:08:06raptorro ro ro your boat
19:08:16Watusimotothat's rho!
19:08:21raptoroh... read-only?
19:08:31Watusimotooh.... yes
19:08:39raptorit just makes it so you cannot modify the table
19:08:48raptorlike this: http://lua-users.org/wiki/ReadOnlyTables
19:09:08Watusimotoso the ro ro ro property prevents a script from modifying the modules?
19:09:14raptoryes
19:09:29raptorso you don't accidentally change 'string' to something else
19:09:51Watusimotolike string = print
19:09:55raptoryep
19:10:10Watusimotocan you modify modules by default?
19:10:12raptorbut sadly, it also prevents adding to a table - like adding table.clear
19:10:38Watusimotowe can either apply the ro property after table.clear gets added, or, as you say, do it from c++
19:10:49raptori'm trying to apply it afterwards
19:10:59raptori run my loadSandbox() after the prepareEnvironments
19:11:08raptorbut it's still being triggered somehow
19:11:58sam686ClientGame.cpp ClientGame::onGameUIActivated() has logprintf("Hi raptor!");
19:12:02Watusimototrying to apply the sandbox after the setup?
19:12:31raptoryes, I'm loading it in this:
19:12:32raptorbool LuaScriptRunner::runScript(bool cacheScript)
19:12:34raptor{
19:12:35raptorreturn prepareEnvironment() && loadSandbox() && loadScript(cacheScript) && runMain();
19:12:36Watusimotosam686: that was proof that a certain function was running on raptor's computer
19:12:37raptor}
19:12:41Watusimotoyou can delete it
19:12:55raptordid you want to revert your attempts at fixing that bug
19:12:57sam686ok
19:12:57raptor?
19:13:02Watusimotoraptor: no
19:13:14raptork
19:13:22Watusimotoso prepareEnv is where the table.clear gets run?
19:13:27Watusimotogets set rather?
19:13:36raptoryes
19:13:48raptorso i'm looking for other weirdness...
19:14:45raptorok - it only happens when i host twice in a row
19:14:52raptorfirst time it works OK
19:15:05Watusimotocould the sandbox be lingering somehow?
19:15:36raptorhere is the method: http://pastie.org/pastes/8472665/text
19:15:43raptorit is definitely lingering
19:16:38raptorand here is my sandbox: http://pastie.org/pastes/8472669/text
19:17:31Watusimotonot using the sandbox I contributed to? :-)
19:17:45BFLogBot Commit: 71c1b37d839b | Author: kaen | Message: remove a few more warnings in TNL (and correct a disturbing lack of error checking)
19:17:56Watusimotoit seems to me that the sandbox will linger
19:18:11Watusimotoyou nil out a function, why would it come back when you want to run a new script?
19:18:36raptorI thought I was setting it only in the context...
19:18:43Watusimotomaybe it is
19:18:51raptorhence the call to setEnvironment()
19:18:53Watusimotobut your evidence suggests otherwise
19:18:58raptoryep
19:25:40Watusimotook, time to make dinner.... back later
19:26:33raptorlater
19:37:30BFLogBot Commit: ac98b9846de1 | Author: sam8641 | Message: Get rid of pending window events while toggling fullscreen, fixes giant window size
19:39:39raptorsam686: that last commit of yours may have a better fix which was just pushed to the SDL repo. See: https://code.google.com/p/bitfighter/issues/detail?id=252
19:40:00raptorI was planning on working on that this week - either something is wrong with our logic or it was a bug in SDL (probably both)
19:40:16sam686who cares... My fix is just adding one line of code.
19:40:53raptori care because i'd rather it make sense than just patching it (and I've worked on this one a lot already)
19:41:04raptorbut it's a nice one-liner :)
19:42:34sam686SDL events can get delayed, its still better to just clear them when switching to/from fullscreen..
19:43:42raptorok
19:43:46raptorthat seems fine
19:45:10sam686Oh and.. I might have not givan me the newest SDL as well to see that..
19:45:32raptorthat's OK - I just got the e-mail yesterday from the mailing list
19:46:07raptorso I had just decided this morning to finally see if the event problems were fixed (still haven't gotten to it)
19:50:39raptorhmmm... I think caching is gettting in the way of sanboxxing
20:05:51Watusimoto Quit (Ping timeout: 252 seconds)
20:25:40LordDVG Quit (Remote host closed the connection)
20:54:06Skybax has joined
21:09:54Flynnn has joined
21:12:45Nothing_Much is now known as Nothing
21:12:50Nothing is now known as Nothing_Much
21:17:58Nothing_Much Quit (Remote host closed the connection)
21:20:31Watusimoto has joined
21:40:37Nothing_Much has joined
21:46:33raptori think it's caching
21:47:55raptorbecasue we do: prepareEnvironment -> loadSandbox -> loadScript -> runMain
21:48:03raptorand caching is in the loadScript
21:48:18raptorso everytime a script is run prepareEnvironment and loadSandbox is run, too
21:48:26sam686not if you do /clearcache
21:48:56raptori'm talking about why i'm having sandbox problems
21:49:19sam686ok, you saying it only partially works?
21:49:56raptorno it works - it's just throwing errors because it's running too many times
21:51:52Invisible1 has joined
21:58:23raptorFYI, I'm runnign new code, nothing that's committed
22:39:46raptorWatusimoto: do we need to redo 'prepareEnvironment' if a script is cached?
22:40:27Watusimotolet's see.... where to we cache it?
22:40:46raptorflow is this: prepareEnvironment -> loadSandbox -> loadScript -> runMain
22:40:50raptorand we cache it in loadScript
22:41:25Watusimotoso we load the script, compile it, then cache the compiled product
22:41:37raptoryes
22:41:54Watusimotothat suggests that we do not cache the environment
22:42:01Watusimotojust a quick thought experiment:
22:42:09Flynnn Quit (Quit: This computer has gone to sleep)
22:42:18Watusimotowe prepare the environment by adding table.clear
22:42:26Watusimotothen load the sandbox
22:42:29Watusimotothen load the script
22:42:39Watusimotothen save the compiled script
22:42:42Watusimotothen time passes
22:43:01Watusimotoif we just load the compiled script, will table.clear() be defined?
22:43:07WatusimotoI don;t think so
22:43:22Watusimotowhich suggests that we d need to prepare the ecnronment again
22:43:42Watusimotoso I think the answer is yes, unless I erred in one of my statements above
22:52:09raptorerr'd
22:52:17raptori think (sorry coworker stopped by)
22:52:29raptor>> if we just load the compiled script, will table.clear() be defined?
22:53:20raptorthe answer is 'yes'
22:53:32Flynnn has joined
22:53:37raptorthe issue is that the method runScript() is run *every* time
22:53:48raptorand that is the method that specifies prepareEnvironment -> loadSandbox -> loadScript -> runMain
22:54:49raptorso when we run a script again, it reloads the environment and tries to load table.clear() (from lua_helper_functions.lua) which will conflict with the sandbox already loaded in the environment
23:04:14Skybax Quit (Ping timeout: 244 seconds)
23:06:55Watusimotoif the answer is yes (which I don;t fully believe, but will accept for the moment; easy enough to prove later), then we probably don;t need to preprae or sandbox
23:07:53raptorok wait
23:08:11Watusimotoso maybe runScript needs a flag or something to tell if L has already been prepared?
23:08:24raptoryou're saying to *only* run the loadScript() piece?
23:08:29Watusimotono
23:08:31Watusimotoyes
23:08:32Watusimotowait
23:08:34Watusimotoyes
23:08:38Watusimotothat and runMain
23:08:39raptorthat doesn't happen in our code - prepareEnvironment is called *every* time
23:08:45Watusimotoyes
23:08:55Watusimotoso obviously that will need to change :-)
23:09:28raptorhmmm..... so maybe a cache check first
23:10:14Invisible1 Quit (Ping timeout: 240 seconds)
23:13:24raptormaybe this would be a good time for me to learn the GTESTs
23:19:07Watusimotoyes!
23:19:17Watusimotothough this sounds like a complex test to start with
23:19:56Flynnn Quit (Quit: Leaving)
23:20:29raptoroh hey, they compile now!
23:20:40raptorso should I be worried that some tests are failing? like ones not having to do with Lua...
23:22:40Watusimotonot sure. there is a way to run only selected tests... a cmd line if that is an issue
23:22:58WatusimotoI gotta go... can help with tests tomorrow if you need it
23:23:06raptorhmmm
23:23:08raptorok
23:23:10raptornight!
23:23:19Watusimotostart with a simple test and work up
23:23:25raptorkaen: is our test framework mature enough to handle lua stuff?
23:24:15BFLogBot Commit: 406968f32786 | Author: watusimoto | Message: Make spinner's size more appropriate
23:24:16BFLogBot Commit: ee5c41b17270 | Author: watusimoto | Message: Adjust spinner position more better
23:24:18BFLogBot Commit: 536fbc080ae3 | Author: watusimoto | Message: Don't allow quit during upload
23:24:19BFLogBot Commit: 994babfb7124 | Author: watusimoto | Message: Merge
23:24:31raptormroe better!
23:28:21Watusimoto Quit (Ping timeout: 252 seconds)
23:33:51Nothing_MuchI have a quick question, how do I set a prefix for make?
23:34:04raptorhi Nothing_Much
23:34:09raptorwhat do you consider a prefix?
23:34:11Nothing_MuchHello
23:34:21Nothing_MuchOh, uh
23:34:28Nothing_MuchLemme see,
23:34:34Nothing_MuchInstallation prefix
23:34:40Nothing_MuchNo wait
23:34:52Nothing_Muchmake *prefix=/usr*
23:35:02raptorare you working with bitfighter?
23:35:16raptorohhhh
23:35:24Nothing_MuchOh, no, I got bitfighter to run, I'm trying to get 3D acceleration
23:35:30Nothing_Muchon this computer
23:35:38Nothing_MuchI thought make would have a universal way of setting a prefix
23:35:39raptoryou can do this: make DESTDIR=/some/folder
23:35:48Nothing_MuchAh, thanks!
23:36:24raptorbut that's just for isntalling after the fact - for a prefix for the code, that is usually handled internally somewhere, maybe in a Makefile or in the code itself
23:36:35Nothing_MuchOhh
23:37:00Nothing_MuchAlright, well it didn't work, but I'll figure it out
23:37:09raptorif using autotools (e.g. with a ./configure script), then you add it with the ./configure script
23:37:29raptor./configure --prefix=/usr
23:37:46raptorthen the resultant Makefiles will have that in it
23:42:26Nothing_MuchThanks
23:48:26Skybax has joined

Index Search ←Prev date Next date→

These logs were automatically created by BFLogBot on irc.freenode.net.