Timestamps are in GMT/BST.
| 00:02:49 | | Nothing_Much Quit (Quit: bye) |
| 00:09:59 | qwebirc519782 | weird bug i laoded the level and the grid didnt show till i zoomed |
| 00:10:24 | qwebirc519782 | either that or it was hyper zoomed in on the 0 0 start |
| 00:11:29 | qwebirc519782 | minor but if you play a level and add like 7 bots quicly leave then join a server death spray can be seen on teh laod screen |
| 00:11:40 | qwebirc519782 | in the level editor |
| 00:12:49 | qwebirc519782 | is the werid symbol toggleing normal on matches next to your ship |
| 00:12:58 | qwebirc519782 | that it loops |
| 00:13:31 | qwebirc519782 | ok werid bugt my evel loads zoomed in farther then nortmal on 0,0 when i load the level |
| 00:14:58 | kaen | it zooms in as far as it can while still showing the whole level |
| 00:15:14 | kaen | and the symbol is looping so the testers can see all the insignias |
| 00:15:23 | kaen | (it's a rank symbol) |
| 00:15:41 | qwebirc519782 | so that wont be looping normaly |
| 00:16:18 | qwebirc519782 | uh BF.exe disaperred from my file |
| 00:16:51 | qwebirc519782 | found it |
| 00:17:28 | kaen | right |
| 00:17:44 | qwebirc519782 | umm error uploading level to DB |
| 00:17:59 | qwebirc519782 | thats not good |
| 00:18:45 | kaen | check the console |
| 00:19:02 | qwebirc519782 | oh heres a little bit of info if there is nothing but a spawn on 0,0 when i level laods is zoomed in super far |
| 00:19:13 | kaen | that's normal |
| 00:19:27 | qwebirc519782 | it shouldnt be =p |
| 00:19:38 | qwebirc519782 | error 403 good idea XD |
| 00:20:48 | kaen | doesn't print anything else? |
| 00:21:05 | qwebirc519782 | it says name is used |
| 00:21:11 | kaen | well there you go :P |
| 00:21:26 | qwebirc519782 | oh foudna real bug |
| 00:22:03 | qwebirc519782 | i mnamed a level LOLZABC and tried to upload it it said " the name untitled is to similer to hte name untiltiled by amgine pelase be more creative" |
| 00:22:15 | qwebirc519782 | thats concerning |
| 00:22:54 | kaen | the name is based on the name in Level Parameters |
| 00:22:57 | kaen | not the filename |
| 00:24:09 | qwebirc519782 | chanced name same error |
| 00:24:23 | qwebirc519782 | oops neverm ind |
| 00:24:44 | qwebirc519782 | ok it works |
| 00:24:50 | kaen | :) |
| 00:25:00 | qwebirc519782 | but that should be changed as that could be confusing for users |
| 00:25:23 | kaen | noted |
| 00:25:23 | qwebirc519782 | mabye force level name to be file name |
| 00:25:29 | kaen | no |
| 00:25:33 | qwebirc519782 | force level name to be file na,e? |
| 00:26:08 | qwebirc519782 | maybe put a error saying you must name your level |
| 00:26:16 | qwebirc519782 | i n the level parameters |
| 00:26:17 | kaen | I think that's a good idea |
| 00:26:55 | kaen | thanks :) |
| 00:28:02 | qwebirc519782 | hmm maybe add a outline to text black text is unreadable |
| 00:28:31 | qwebirc519782 | msut ;eave now goodbye |
| 00:28:34 | kaen | later |
| 00:28:36 | qwebirc519782 | more testing later |
| 00:28:42 | | qwebirc519782 Quit (Quit: Page closed) |
| 01:03:41 | | Nothing_Much has joined |
| 01:03:41 | | Nothing_Much Quit (Changing host) |
| 01:03:41 | | Nothing_Much has joined |
| 01:07:41 | | Nothing_Much Quit (Read error: Connection reset by peer) |
| 01:09:06 | | Nothing_Much has joined |
| 01:09:06 | | Nothing_Much Quit (Changing host) |
| 01:09:06 | | Nothing_Much has joined |
| 03:25:38 | | Quartz has joined |
| 03:35:13 | Quartz | YEAAAAHHHH!! |
| 03:53:24 | Quartz | YEEEAHAHAHAHAH!! |
| 03:53:58 | | Quartz Quit (Quit: Page closed) |
| 04:36:53 | | LordDVG has joined |
| 05:13:26 | | LordDVG Quit (Ping timeout: 240 seconds) |
| 12:51:41 | | Little_Apple has joined |
| 13:10:16 | | Flynnn has joined |
| 13:27:15 | | LordDVG has joined |
| 14:09:05 | Little_Apple | kaen: just found the rating system on pleiades |
| 14:26:42 | kaen | how is it? |
| 14:26:46 | kaen | Little_Apple? |
| 14:26:55 | kaen | too subtle? |
| 14:31:48 | Little_Apple | i think its pretty good |
| 14:32:00 | Little_Apple | smaaaaaall suggestion |
| 14:32:16 | Little_Apple | maybe make a way to rate levels from the main page as well? |
| 14:32:38 | kaen | hmmm |
| 14:32:46 | Little_Apple | just a suggestion |
| 14:32:53 | kaen | I feel like it would encourage mass voting ... |
| 14:33:14 | Little_Apple | but hey! more votes! |
| 14:33:36 | kaen | I like the idea that you have to at least click through and see the large screenshot first. |
| 14:33:59 | Little_Apple | will there be a way to vote in game? |
| 14:34:05 | kaen | there is |
| 14:34:09 | kaen | /rate up |
| 14:34:10 | Little_Apple | oh cool |
| 14:34:11 | kaen | /rate down |
| 14:34:16 | kaen | while playing a level |
| 14:34:31 | kaen | there's an icon on the scoreboard that tells you when a level file is from the DB |
| 14:34:44 | Little_Apple | oh nice |
| 14:34:46 | kaen | (which is the only time you can rate the level) |
| 14:35:15 | Little_Apple | and the author cant vote for his level in game as well? |
| 14:35:49 | kaen | correct |
| 14:35:55 | Little_Apple | coo' |
| 14:35:59 | kaen | it should tell you that when you try it |
| 14:36:20 | Little_Apple | yea |
| 14:36:55 | Little_Apple | does the level have to be actually downloaded from the db to vote for it? |
| 14:43:33 | kaen | it has to have a LevelDatabaseID line |
| 14:43:45 | kaen | the database automatically adds those as needed |
| 14:44:13 | kaen | also |
| 14:44:16 | kaen | if you have a map |
| 14:44:22 | kaen | and upload it to the db |
| 14:44:23 | kaen | then |
| 14:44:46 | kaen | it will save the DBID with the file |
| 14:45:04 | kaen | if you were to then work on an old version (without the line) and try to "upload" it |
| 14:45:13 | kaen | it would fail, asking you to use a different name |
| 14:45:51 | kaen | because without the line, it would think that you were uploading a new level with the same name, and it won't let you overwrite levels like that |
| 14:47:01 | kaen | because `/dlmap little_apple_butt has` to refer to exactly one map |
| 14:47:07 | Little_Apple | lol |
| 14:47:14 | kaen | incidentally, if there were a use named "little" |
| 14:47:22 | kaen | and he made a map titled "apple butt" |
| 14:47:31 | kaen | it would also not allow him to upload that |
| 14:47:37 | Little_Apple | gotcha |
| 14:47:41 | kaen | since it would also be mangled to little_apple_butt |
| 14:47:54 | kaen | > dat edge case |
| 14:48:29 | Little_Apple | oh just thought of something... |
| 14:48:45 | kaen | fire away |
| 14:48:52 | Little_Apple | will there be a section on pleiades that lets you see only the levels that you uploaded? |
| 14:48:59 | Little_Apple | so you could update them or something? |
| 14:49:31 | kaen | if you click your username, it takes you to a search for levels that you are credited for |
| 14:49:42 | kaen | not exactly the same as levels that you uploaded |
| 14:49:51 | Little_Apple | oh ok |
| 14:49:52 | kaen | but effectively the same for non-admin users |
| 14:50:20 | kaen | (admins can manually set the map's author, for uploading classics for authors who are no longer with us) |
| 14:50:38 | Little_Apple | that sounds dark.. |
| 14:50:49 | kaen | hehe |
| 14:51:38 | Little_Apple | search for: maps with late authors |
| 15:02:16 | | BFLogBot Commit: 873ea4e8baf6 | Author: kaen | Message: Refuse to upload levels without names |
| 15:25:27 | | BFLogBot Commit: c59f186f943d | Author: kaen | Message: make module indicators red when modules are active |
| 15:27:22 | kaen | hmm. I need an elder dev |
| 15:27:56 | kaen | back shortly! |
| 15:28:12 | Little_Apple | kbai |
| 15:28:13 | | kaen Quit (Read error: Connection reset by peer) |
| 15:49:05 | | raptor has joined |
| 15:49:05 | | ChanServ sets mode +o |
| 15:49:10 | raptor | goo dday! |
| 15:49:18 | raptor | goo you say? yes.. goo.. |
| 15:58:48 | | Little_Apple Quit (Ping timeout: 250 seconds) |
| 16:11:02 | | Little_Apple has joined |
| 16:11:35 | Little_Apple | goo dday to you too! |
| 16:17:36 | | kaen has joined |
| 16:17:54 | Little_Apple | hello |
| 16:18:16 | kaen | greetings. |
| 16:19:39 | kaen | raptor, do you know the name of the "roman" font, or where to get it in TTF format? |
| 16:19:54 | kaen | I want to try grafting it onto a fleshed-out utf8 font |
| 16:20:41 | kaen | so we could have the roman stroked for the interface, with a fallback for skulls, hearts, etc. |
| 16:20:59 | kaen | it would be nice if we could just use system fonts |
| 16:21:28 | kaen | one step at a time, though. |
| 16:28:32 | | Little_Apple Quit (Quit: Page closed) |
| 16:30:54 | | kaen Quit (Ping timeout: 246 seconds) |
| 17:21:15 | | Little_Apple has joined |
| 17:32:04 | | Flynnn Quit (Quit: This computer has gone to sleep) |
| 17:33:10 | raptor | hello |
| 17:34:16 | Little_Apple | hello |
| 17:34:37 | raptor | looks like i missed kaen again.. |
| 17:34:43 | Little_Apple | yup |
| 17:40:02 | raptor | Little_Apple: do you think the quick-enery-regen-while-standing-still needs to be adjusted? |
| 17:40:23 | Little_Apple | i personally think its fine as is |
| 17:41:14 | Little_Apple | it makes a nice bonus, but at the same time has a risk element where you are extremely vulnerable to cloakers while recharging |
| 17:41:20 | | Flynnn has joined |
| 17:46:03 | | LordDVG Quit (Remote host closed the connection) |
| 17:46:44 | Little_Apple | i mean.. it could be adjusted.. but i dont think it really needs it |
| 17:52:56 | raptor | footloose thinks you need to wait longer, but failed to give me a reason why |
| 17:53:11 | raptor | so... I'm thinking of leaving it as is.. |
| 17:54:12 | Little_Apple | i dont think it should be longer... |
| 17:57:48 | raptor | ok, i'll leave it.. sorry footloose |
| 17:58:48 | raptor | also, what is your honest opinion of the regenerating turrets/ffs having a fillid in triangle, etc.. |
| 17:58:52 | raptor | *filled |
| 18:04:42 | Little_Apple | i think its ugly! |
| 18:05:00 | raptor | great! i like that feedback |
| 18:05:03 | Little_Apple | but cant think of another way of indicating that something is recharging.. |
| 18:05:16 | raptor | someone requested to somehow show it is a regenerating one |
| 18:05:27 | Little_Apple | maybe a great big R inside of the turret. |
| 18:05:39 | Little_Apple | im half joking. |
| 18:05:43 | Little_Apple | er.. more than half. |
| 18:06:05 | raptor | hmm... but maybe *some* symbol in the area? |
| 18:06:11 | raptor | instead of just shading it.. |
| 18:06:11 | Little_Apple | three quarters. |
| 18:06:14 | raptor | heh |
| 18:08:37 | Little_Apple | maybe it could have a chat bubble saying "I regenerate!" |
| 18:08:57 | raptor | ideas are going the wrong way! |
| 18:09:15 | Little_Apple | rats. |
| 18:09:18 | raptor | maybe just a thicker triangle? |
| 18:10:03 | Little_Apple | i think that would still be hard to see... |
| 18:11:04 | | Flynnn Quit (Quit: This computer has gone to sleep) |
| 18:11:11 | Little_Apple | could it possibly make the repair sound effect when it starts regenerating? |
| 18:11:36 | raptor | it could... |
| 18:11:57 | Little_Apple | so you would have some way of knowing it was regenerating without having to look at it all of the time |
| 18:12:10 | raptor | but usually a sound is associated with some sort of movement or visible change... |
| 18:13:32 | Little_Apple | maybe the turret/forcefield could have a small + symbol? |
| 18:13:37 | Little_Apple | thats somewhat universial |
| 18:13:49 | raptor | good idea! |
| 18:13:52 | raptor | let me try that.. |
| 18:14:10 | Little_Apple | hooray! |
| 18:24:06 | Little_Apple | how ugly is it? |
| 18:24:15 | raptor | uhh... still coding... |
| 18:24:26 | Little_Apple | gotcha. |
| 18:24:33 | raptor | come here: http://www.twiddla.com/1272693 |
| 18:33:29 | raptor | ok, back to code.. |
| 19:16:58 | raptor | why is this forcefield geometry so difficult.. |
| 19:19:00 | Little_Apple | it had a rough childhood. |
| 19:51:09 | raptor | stubborn, stubborn child |
| 19:52:56 | | Flynnn has joined |
| 19:53:58 | raptor | ok Little_Apple in editor: http://i.imgur.com/QRZDBig.png |
| 19:54:12 | raptor | in-game: http://i.imgur.com/boyquez.png |
| 19:55:03 | raptor | seems... unnoticable, still |
| 19:55:03 | Little_Apple | not bad.. |
| 19:55:09 | raptor | you think? |
| 19:55:12 | raptor | let me add one of color |
| 19:56:09 | raptor | ok, teams: http://i.imgur.com/4DGTLA2.png |
| 19:56:13 | Little_Apple | you're using imgur now? |
| 19:56:18 | raptor | sam's server died |
| 19:56:27 | Little_Apple | aw |
| 19:56:30 | raptor | i find imgur to be easy to use, even if the community is stupid |
| 19:56:36 | Little_Apple | yea lol |
| 19:56:43 | raptor | oh wait! sam's server is back! |
| 19:56:48 | Little_Apple | hey! |
| 19:57:08 | raptor | maybe he'll show up again soon.. |
| 19:57:11 | Little_Apple | any idea where he went? |
| 19:59:09 | raptor | no - probably lost interest |
| 20:00:49 | Little_Apple | maybe if we bribe him... |
| 20:01:01 | | fordcars has joined |
| 20:01:05 | Little_Apple | hello |
| 20:01:38 | fordcars | Hi |
| 20:02:13 | Little_Apple | also, raptor, do you know where ZoombeR went? |
| 20:05:25 | raptor | he went to some musician's school |
| 20:05:35 | raptor | in vegas, i think |
| 20:05:37 | raptor | las vegas |
| 20:05:44 | raptor | and dropped off the radar |
| 20:06:19 | fordcars | Really? |
| 20:06:22 | Little_Apple | maybe he lost all of his money playing roulette |
| 20:06:37 | raptor | first rule of living in vegas: never gamble |
| 20:06:39 | Little_Apple | or texas hold 'e, |
| 20:06:46 | Little_Apple | 'em* |
| 20:07:10 | Little_Apple | first rule of vegas in general: dont go to vegas |
| 20:07:28 | fordcars | I went to Las Vegas once |
| 20:07:29 | Little_Apple | unless you look alot like elvis. |
| 20:07:31 | raptor | man, I used to work with my brother there |
| 20:07:35 | raptor | in the summers |
| 20:07:44 | fordcars | Nice |
| 20:07:44 | Little_Apple | fun! |
| 20:07:49 | raptor | and you would not believe how good it felt to leave that place... |
| 20:07:58 | Little_Apple | :P |
| 20:08:02 | fordcars | heh |
| 20:08:28 | Little_Apple | maryland is pretty nice. |
| 20:09:09 | Little_Apple | if you can handle the politicians... |
| 20:09:39 | Little_Apple | rain tax! its brilliant! |
| 20:09:45 | raptor | whoa - I just found out that there is code to render the turret ranges |
| 20:09:49 | raptor | in the editor |
| 20:09:53 | Little_Apple | haha |
| 20:09:57 | raptor | but it's broken somehow... should I enable it? |
| 20:10:02 | Little_Apple | yes! |
| 20:20:42 | fordcars | Where is kaen when you need him |
| 20:21:22 | fordcars | Raptor, you could probably answer my question, do you mind? |
| 20:22:39 | raptor | hi |
| 20:22:41 | fordcars | In javascript, I want to add objects to an array |
| 20:23:43 | raptor | hmm... i'm not sure I know JS that well |
| 20:23:58 | Flynnn | arr.add(item); should do the trick |
| 20:24:19 | fordcars | I know, but do objects have to have diffrent names? |
| 20:24:26 | raptor | can't you just do: |
| 20:24:28 | Flynnn | they do not :) |
| 20:24:34 | raptor | var someArray = new Array(); |
| 20:24:37 | raptor | then |
| 20:24:41 | Flynnn | js arrays are not sets -- they are arrays of object "pointers" |
| 20:24:44 | raptor | someArray[0] = someObject |
| 20:24:53 | Flynnn | you can even add the exact same object twice, and it will work |
| 20:24:55 | raptor | someArray[1] = someOtherObject |
| 20:25:02 | Flynnn | (there will be two items pointing to the same object) |
| 20:25:13 | Flynnn | In fact, editing one of those two items will change the other one! unless you set that index to something else. |
| 20:25:17 | fordcars | Yes, I would of done that(raptor) |
| 20:25:21 | raptor | Flynnn to the rescue! |
| 20:25:31 | fordcars | Hahah yeah |
| 20:25:34 | Flynnn | xD sorry |
| 20:25:40 | Flynnn | I did not mean to butt in |
| 20:25:47 | fordcars | But flynn, I would make new objects automatically |
| 20:25:49 | Little_Apple | uhh... quartz eating carrots! http://i.imgur.com/L2sh0Tu.gif |
| 20:26:17 | Flynnn | fordcars: can you please elaborate? |
| 20:26:17 | fordcars | Thanks la |
| 20:26:26 | Little_Apple | c: |
| 20:26:28 | Flynnn | haha Little apple |
| 20:26:33 | raptor | haha |
| 20:26:40 | fordcars | Haha ok, I am making an Air Traffic Controller Simulator in Js |
| 20:26:54 | Little_Apple | so like.. watching movies? |
| 20:26:57 | fordcars | and I want to make random planes showing up |
| 20:27:25 | fordcars | Each plane would be an object and they would all be in an array |
| 20:27:33 | Flynnn | Is this Unity3d? |
| 20:27:40 | fordcars | No... |
| 20:27:44 | Flynnn | alright, just making sure |
| 20:27:46 | Flynnn | do continue |
| 20:27:50 | fordcars | :P |
| 20:27:53 | fordcars | It<s cnavas |
| 20:28:00 | Flynnn | I see |
| 20:28:02 | fordcars | *it's cnavas |
| 20:28:09 | fordcars | well that's it |
| 20:28:26 | fordcars | I want to make new oibjects randomly |
| 20:28:27 | Little_Apple | canvas? |
| 20:28:30 | Flynnn | I see |
| 20:28:34 | fordcars | an html5 element |
| 20:28:39 | fordcars | thimng |
| 20:28:43 | Flynnn | what part of that process is triping you up? |
| 20:28:59 | Flynnn | Timing, Instantiation, Tracking, Post-Instantiation use? |
| 20:29:05 | fordcars | When I would make the object for a new plane, |
| 20:29:30 | fordcars | they would all be plane.something right? |
| 20:29:41 | fordcars | even if there are 10 diffrent planes |
| 20:29:49 | fordcars | plnae.x plane.y |
| 20:30:11 | | Little_Apple Quit (Quit: Page closed) |
| 20:30:57 | fordcars | and all planes (objects) would be in one array |
| 20:32:27 | Flynnn | ah |
| 20:32:29 | Flynnn | I see now |
| 20:32:36 | Flynnn | Do you understand what a class is? |
| 20:33:09 | fordcars | I guess not |
| 20:33:17 | fordcars | PLease explain :) |
| 20:33:19 | Flynnn | Well, what do you know about them? |
| 20:34:11 | Flynnn | (or would you like me to just explain regardless of what you know?) |
| 20:34:16 | fordcars | They are speeled c.l.a.ss |
| 20:34:20 | fordcars | that is all |
| 20:34:22 | fordcars | :) |
| 20:34:22 | Flynnn | oh okay, I see |
| 20:34:43 | Flynnn | Well! I'd like to welcome you to object oriented programming then! I'll see what I can do to explain |
| 20:34:47 | Flynnn | First and foremost |
| 20:34:54 | Flynnn | JS is... messed up |
| 20:35:02 | Flynnn | functions, classes, objects... they are all the same |
| 20:35:10 | Flynnn | oh, variables too |
| 20:35:35 | Flynnn | so I'm going to explain classes from the perspective of a java user, not a JS user |
| 20:35:41 | Flynnn | because in Java, it is all well defined |
| 20:35:50 | Flynnn | So, do you know what an object is? |
| 20:36:30 | fordcars | Yes I know that strings are objects, variables are objects... |
| 20:36:43 | Flynnn | Okay! That's not quite teh case, but I think you understand |
| 20:36:48 | fordcars | :P |
| 20:36:55 | Flynnn | Basically, a class defines a type of object |
| 20:36:59 | Flynnn | and an object can be of a type |
| 20:37:07 | Flynnn | IE, an object is of type, whatever its class is... |
| 20:37:08 | fordcars | new String() |
| 20:37:09 | Flynnn | for instance, |
| 20:37:10 | Flynnn | yes |
| 20:37:15 | fordcars | hehe |
| 20:37:17 | Flynnn | new String() creates an object of the class String |
| 20:37:22 | fordcars | online tutorials are useful |
| 20:37:25 | Flynnn | hehe |
| 20:37:48 | fordcars | OK so class is the type of object |
| 20:37:51 | Flynnn | Right |
| 20:38:00 | Flynnn | now, sometimes in a class you have static functions and static variables |
| 20:38:20 | Flynnn | but I'll explain those in passing, they are not relavent (or even required, really, just convenient) |
| 20:38:31 | fordcars | ok |
| 20:38:39 | Flynnn | A class is defined as such: |
| 20:38:47 | Flynnn | It contains a set of functions, and a set of variables |
| 20:38:57 | Flynnn | for instance, |
| 20:39:08 | Flynnn | What kind of objects do you know about? I'll use one as an example |
| 20:39:21 | fordcars | Array for example |
| 20:39:25 | Flynnn | hmm |
| 20:39:32 | Flynnn | Yeah, okay |
| 20:39:35 | Flynnn | I can do it with Array |
| 20:39:40 | Flynnn | Do you know how to get the length of an array? |
| 20:39:50 | fordcars | array.lenght? |
| 20:39:53 | Flynnn | yes! |
| 20:39:58 | fordcars | hehe |
| 20:40:02 | Flynnn | length, in this case, is a variable |
| 20:40:07 | Flynnn | array.Add(object) is a function |
| 20:40:18 | fordcars | yes |
| 20:40:38 | Flynnn | you define those variables in the class, but each object has its own copy of the functions and variables defined in your class (this is not quite true in JS, but I'll get there) |
| 20:41:20 | fordcars | ok |
| 20:41:24 | Flynnn | alright |
| 20:41:42 | Flynnn | static variables and functions are just functions that don't belong to any object |
| 20:41:48 | Flynnn | so, if I created a class named "Foo" |
| 20:42:00 | Flynnn | and gaving a function named "bar" |
| 20:42:03 | Flynnn | I could do: |
| 20:42:13 | Flynnn | var whatever = new Foo(); whatever.bar(); |
| 20:42:23 | Flynnn | "and gaving a" |
| 20:42:26 | Flynnn | wtf brain |
| 20:42:45 | Flynnn | anyways |
| 20:42:56 | fordcars | haha |
| 20:43:12 | Flynnn | I need to see if gaving is a word, one moment xD |
| 20:43:29 | Flynnn | Nope xD |
| 20:43:30 | Flynnn | Okay. |
| 20:43:38 | fordcars | hahahhh |
| 20:43:49 | Flynnn | So, let's say "gaving" the class a STATIC function, named goober |
| 20:44:08 | Flynnn | then, if I tried to do: whatever.goober(); nothing would happen |
| 20:44:15 | Flynnn | but, I could do: Foo.goober(); |
| 20:44:36 | Flynnn | there is only ONE Foo. There can be objects of TYPE Foo, but there will only ever be one foo |
| 20:44:45 | raptor | http://sam6.25u.com/upload/8screenshot_3.png |
| 20:44:49 | fordcars | ok |
| 20:44:52 | Flynnn | so you can think of classes with static functions as "objects" that are accessible everywhere |
| 20:44:55 | raptor | http://sam6.25u.com/upload/8screenshot_4.png |
| 20:44:57 | fordcars | nice! |
| 20:45:08 | Flynnn | me gusta, but what are the plusses? |
| 20:45:13 | raptor | that's the new indicator for regenerative turrets/ffs |
| 20:45:17 | raptor | any good? |
| 20:45:18 | Flynnn | oooh |
| 20:45:38 | Flynnn | I like! You could also make little pulses come out of them every time they regenerate a bit of health |
| 20:45:59 | Flynnn | but that's just a silly idea xD |
| 20:46:45 | | BFLogBot Commit: 5acecff06304 | Author: buckyballreaction | Message: Try Little_Apple's idea for rendering if a turret/ffp is regenerative. What do you think? |
| 20:46:47 | Flynnn | anyways, that's pretty much what a class is |
| 20:46:55 | fordcars | nice! |
| 20:48:13 | fordcars | oh would you do foo.goobar(whatever) |
| 20:48:56 | fordcars | wll why wouldn't whatever.goobar work? |
| 20:49:02 | fordcars | *well |
| 20:49:27 | fordcars | sorry for typos my screen has a really tiny resolution |
| 20:49:38 | fordcars | it's a portable DVD player ._. |
| 20:52:35 | Flynnn | it is because goobar is static -- |
| 20:52:45 | Flynnn | goobar is a part of the Foo class its self, not of any object of type goobar |
| 20:53:11 | fordcars | but how would goobar() affect whatever |
| 20:53:18 | Flynnn | It wouldn't affect whatever |
| 20:53:58 | Flynnn | whatever is merely an object of type Foo. Foo, is not only a class, but also an object of type "nothing" |
| 20:54:40 | Flynnn | (technically, Foo is an object of type class, on some implementations, but that gets into metaprogramming and reflection) |
| 20:54:52 | Flynnn | It's better to think of Foo as being an object of type "nothing" |
| 20:55:03 | Flynnn | but in any case, Foo *is* technically an object, and can therefore have its own functions |
| 20:55:08 | fordcars | Oh ok, it's empty |
| 20:55:14 | Flynnn | Foo is not empty |
| 20:55:17 | fordcars | apart for goobar() |
| 20:55:22 | Flynnn | It can also have variables, if we add then to Foo |
| 20:55:29 | Flynnn | static variables, that is |
| 20:55:55 | fordcars | but what is whatever in this! |
| 20:56:00 | Flynnn | but Foo, and all of its static variables and static functions server as one object. And all objects of type Foo use the nonstatic functions and variables, and are seperate objects |
| 20:56:12 | Flynnn | ** serve, not server |
| 20:56:33 | Flynnn | Foo is sort of like a hub |
| 20:56:37 | Flynnn | when you say new Foo(); |
| 20:56:41 | Flynnn | what you are really doing is saying: |
| 20:56:57 | fordcars | OH I see where this is going |
| 20:57:06 | Flynnn | Mr. Foo: I know about you. I want you to give me an object that has the nonstatic functions and variables that you define in it |
| 20:57:13 | Flynnn | Foo.goobar() is saying: |
| 20:57:27 | Flynnn | Mr. Foo: I know about you. You have some functions and variables of your own (they are static) can I just use them directly? |
| 20:58:54 | Flynnn | Does that make sense? |
| 20:59:43 | fordcars | what are the nonstatic variables? |
| 20:59:57 | Flynnn | they are the variables that go inside the objects of *type* Foo |
| 21:00:26 | fordcars | normal variables? |
| 21:00:37 | Flynnn | nonestatic variables are normal variables, aren't they? |
| 21:00:43 | fordcars | okokokoko |
| 21:00:46 | fordcars | :) |
| 21:00:59 | Flynnn | Great :) so does that make sense? |
| 21:01:01 | fordcars | and how do you access them? |
| 21:01:09 | Flynnn | Well they have to be put into something |
| 21:01:28 | Flynnn | new Foo() creates an object with all of the nonstatic variables and functions inside Foo in it |
| 21:02:02 | fordcars | ok |
| 21:02:14 | Flynnn | so whatever.nonstaticvariable = something |
| 21:02:23 | Flynnn | but Foo.nonstaticvariable = something won't work |
| 21:02:31 | Flynnn | however Foo.staticvariable will work |
| 21:02:38 | Flynnn | and whatever.static variable won't |
| 21:03:27 | fordcars | ok! But what are non static variables for then? |
| 21:03:45 | Flynnn | All objects have variables |
| 21:03:52 | Flynnn | Foo is not an object of type foo |
| 21:04:04 | Flynnn | Foo is an object all on its own, off a totally different type |
| 21:04:12 | fordcars | yes |
| 21:04:24 | Flynnn | There can only ever be ONE foo |
| 21:04:30 | Flynnn | but you can have multiple objects of type foo |
| 21:04:43 | Flynnn | the objects of type foo don't use the static variables |
| 21:05:11 | Flynnn | they each use their own copies of the NONstatic variables defined in Foo |
| 21:05:24 | fordcars | ok |
| 21:05:33 | fordcars | whatever.nonstatic |
| 21:05:42 | Flynnn | works |
| 21:06:58 | fordcars | but what are thhe static variables for then? |
| 21:07:44 | Flynnn | Technically, you can live without them |
| 21:07:58 | Flynnn | everything you can accomplish with static variables can be accomplished by passing a nonstatic object through the command structure |
| 21:08:08 | Flynnn | however, they are convenient |
| 21:08:12 | Flynnn | Classes are static |
| 21:08:18 | fordcars | yes |
| 21:08:25 | Flynnn | when you define the class "Foo" foo can be accessed everywhere |
| 21:08:28 | Flynnn | and there is only one foo |
| 21:08:34 | fordcars | are static variables useful to make complex objects? |
| 21:08:47 | Flynnn | no, they are useful when creating complex systems of objects |
| 21:08:48 | fordcars | of typew foo |
| 21:09:00 | Flynnn | for instance, if all of the objects of type foo needed to communicate |
| 21:09:11 | Flynnn | Foo could have a static variable of type array |
| 21:09:19 | Flynnn | and each individual object of type Foo could add its self to Foo |
| 21:09:23 | Flynnn | to Foo's static array |
| 21:10:33 | fordcars | ohhhhhhhhhh ok! |
| 21:10:46 | Flynnn | it gets even better though |
| 21:10:54 | Flynnn | Let's say we ahve two classes |
| 21:10:57 | Flynnn | Foo, |
| 21:10:59 | Flynnn | and FooRegistry |
| 21:11:07 | Flynnn | FooRegistry could be the object with the static array |
| 21:11:13 | Flynnn | and Foo could have *no* static objects |
| 21:11:18 | Flynnn | ** no static variables |
| 21:11:28 | fordcars | ok |
| 21:11:47 | Flynnn | Every object of type Foo could add its self to *FooRegistry*'s list instead of Foo's list, and it would work just as well! |
| 21:12:35 | Flynnn | Which makes static functions useful as a programming device, as you could, for instance, create a class called MathUtils with a bunch of static math functions that you use all throughout your code |
| 21:13:28 | fordcars | Oh I get it! |
| 21:13:34 | Flynnn | this would be much easier than the alternative, which is having a copy of all of those functions inside each of your other classes |
| 21:14:01 | Flynnn | This is not as much of a concern in JS, because you could just define a classless function outside of your other classes and it would be just fine |
| 21:14:28 | Flynnn | but that would be messy -- wouldn't you rather have all of the math functions grouped up in a class named accordingly? |
| 21:14:39 | Flynnn | that way they are organized, and programmers know where to look when they want to see where they fit in the picture |
| 21:14:50 | fordcars | yeah |
| 21:14:52 | Flynnn | and an experienced programmer will know instantly that what they want is not inside the class they are looking at |
| 21:14:59 | fordcars | cool! |
| 21:15:18 | Flynnn | Now, I'm not 100% familiar with how JS handles its classes/functions/objects |
| 21:15:22 | Flynnn | but I know they are all the same |
| 21:16:01 | Flynnn | So, if I understand correctly, technically when you define a classless function like that, it's actually being put inside the "global" class. Every single variable that you define that's not inside a function is technically a static variable, relative to that global class |
| 21:16:21 | fordcars | yeah |
| 21:16:22 | Flynnn | and any function you put inside that global class is also a global function |
| 21:16:34 | Flynnn | and in JS you can put classes inside other classes |
| 21:16:34 | fordcars | yes |
| 21:16:45 | fordcars | I guess |
| 21:16:46 | Flynnn | and have those other classes themselves have static functions which are only global to the classes they are inside |
| 21:16:50 | Flynnn | and it gets super-meta |
| 21:17:03 | Flynnn | I tend to steer clear of that kind of programming xD but it is certainly interesting |
| 21:17:04 | fordcars | Yes |
| 21:17:25 | fordcars | Me tto :) |
| 21:17:35 | Flynnn | personally, I think that it gets confusing for the programmer to keep track of that much heirarchy... Code is supposed to be simple and clean :D |
| 21:17:52 | fordcars | okYeah :P |
| 21:17:57 | Flynnn | there are a few other features in programming that are often not used, such as multiple-inheritance, for the same reason |
| 21:18:15 | Flynnn | however, I personally feel that while those features get complicated, they are uniquely useful for creating complicated dynamic systems of object types and classifications |
| 21:18:23 | Flynnn | which is why often times alternatives such as interfacing crop up |
| 21:18:30 | Flynnn | but multiple inheritance is very useful |
| 21:18:40 | fordcars | NIce |
| 21:18:43 | Flynnn | fortunately, interfaces are becoming very similar to multiple inheritance in languages liek c# 3.0 |
| 21:18:55 | Flynnn | Though I find their use rather clunky |
| 21:19:14 | Flynnn | anyways, I don't see the multiple-level classes-inside-other-classes thing as being very useful |
| 21:19:36 | Flynnn | I can think of a couple situations where it'd be good, but those are very high level programming situations and would only be used in very complicated systems |
| 21:19:46 | Flynnn | and you'd want to use it as sparingly as possible |
| 21:20:13 | Flynnn | the more you use it, the more closed off your code becomes. That can be good, but it can also be bad as it can sometimes make expansion *harder*, and the whole *point* of it is to make expansion easier |
| 21:20:26 | fordcars | Heh, I won't use them in my projects for a few years |
| 21:20:29 | Flynnn | xD |
| 21:20:33 | fordcars | But wait |
| 21:20:53 | fordcars | If I make a new class |
| 21:21:03 | fordcars | called plane |
| 21:21:07 | fordcars | plkane() |
| 21:21:11 | fordcars | plane() |
| 21:21:14 | Flynnn | careful |
| 21:21:18 | Flynnn | It's not called plane() |
| 21:21:22 | Flynnn | it's just called plan |
| 21:21:26 | fordcars | e |
| 21:21:27 | Flynnn | "new" is technically a function |
| 21:21:31 | Flynnn | ** plane sorry |
| 21:21:36 | fordcars | ok :) |
| 21:21:40 | Flynnn | "new" is actually an operator, but all operators are actually functions |
| 21:21:47 | Flynnn | but anyways, when you say new Plane() |
| 21:21:50 | Flynnn | you are actually saying: |
| 21:21:54 | Flynnn | Plane.newObject(); |
| 21:22:02 | Flynnn | (which is a... STATIC FUNCTION! :D) |
| 21:22:22 | Flynnn | which is why Plane acts as a hub |
| 21:22:26 | fordcars | okokokokokokokok |
| 21:22:31 | Flynnn | anyways, continue |
| 21:22:55 | fordcars | well I want to make allot of planes, but automatically |
| 21:23:04 | fordcars | randomly actually |
| 21:23:09 | fordcars | I need diffrent whatevers |
| 21:23:27 | fordcars | one=new PLane() |
| 21:23:31 | Flynnn | classes are right up your alley then, and are considered the "proper" way to do it. but you can do it without classes if you want |
| 21:23:48 | Flynnn | JS is the only language I know of though that will let you do it without classes |
| 21:23:49 | fordcars | two=new PLaane() |
| 21:24:02 | fordcars | three=new PLane() |
| 21:24:29 | fordcars | I neew diffrent variable names for the objects |
| 21:24:37 | fordcars | obviously |
| 21:24:39 | Flynnn | right |
| 21:24:50 | fordcars | and then I put all planes in an array |
| 21:25:02 | Flynnn | yessir |
| 21:25:23 | fordcars | so do I just write a normal global function to create the names for the planes? |
| 21:25:32 | fordcars | 1, 2, 3, 4, 5, 6, 7, |
| 21:25:36 | fordcars | for example |
| 21:25:42 | Flynnn | objects don't have names |
| 21:25:45 | fordcars | or var1, var2... |
| 21:25:59 | Flynnn | var1 is just a number that points to some location in memory that contains the object |
| 21:25:59 | fordcars | I mean var1=new PLane() |
| 21:26:02 | Flynnn | var1 is not its name |
| 21:26:13 | fordcars | OKokokok |
| 21:26:19 | Flynnn | for instance: |
| 21:26:23 | Flynnn | var1 = new Plane(); |
| 21:26:26 | Flynnn | var2 = var1 |
| 21:26:33 | Flynnn | var2.x = "blah" |
| 21:26:39 | Flynnn | print(var1.x); |
| 21:26:41 | fordcars | yes! |
| 21:26:45 | Flynnn | output: "blah" |
| 21:26:56 | Flynnn | neither var1 or var2 are names for the object of type Plane |
| 21:27:06 | fordcars | they are vars |
| 21:27:08 | Flynnn | yes |
| 21:27:12 | fordcars | cool! |
| 21:27:23 | Flynnn | aka variables |
| 21:27:33 | Flynnn | and they "point", to put it in programmer jargon, to the actual object |
| 21:28:02 | fordcars | So I guess to make var names for the planes, I would do var1, var2, var3 |
| 21:28:11 | fordcars | in a normal global function |
| 21:28:16 | Flynnn | you could even just do: |
| 21:28:21 | Flynnn | var1 = new Plane(); |
| 21:28:25 | Flynnn | arr.Add(var1); |
| 21:28:29 | Flynnn | var1 = new Plane(); |
| 21:28:34 | Flynnn | arr.add(var1); |
| 21:28:39 | fordcars | HUH? |
| 21:28:48 | fordcars | reall? |
| 21:28:51 | Flynnn | var1 is just a number that points to an objects |
| 21:29:05 | Flynnn | so when you say var1 = new Plane(); you are just telling it to point to a different object |
| 21:29:10 | fordcars | the aray will have var1.plane[0], var1.plane[2] |
| 21:29:14 | Flynnn | you aren't changing the object that var1 originally pointed to |
| 21:29:38 | fordcars | but var1.coordX |
| 21:29:56 | fordcars | well I put nonstatic variables to var1 |
| 21:29:57 | Flynnn | the difference between var1 = new Plane, and var1.coordX = 0 |
| 21:30:27 | Flynnn | is that the "dot" (.) in there is telling JS to modify that object that var1 points to -- instead of var1 its self |
| 21:30:49 | Flynnn | in fact, |
| 21:30:59 | Flynnn | var1.coordX tells js: |
| 21:31:31 | Flynnn | find the variable var 1. Now find what object it points to. Now find the variable coodX inside that object. Now cause that variable to point to the constant value zero |
| 21:31:39 | Flynnn | now, it gets complicated |
| 21:31:48 | Flynnn | because sometimes variables are actually values, and don't point to anything |
| 21:32:12 | Flynnn | this only ever happens with numbers and booleans, though |
| 21:32:39 | Flynnn | ints, bytes, longs, floats, doubles, and booleans (and a few others depending upon programming language) are all value-types |
| 21:32:43 | Flynnn | so if I say: |
| 21:32:50 | Flynnn | var1 = 10; |
| 21:32:54 | Flynnn | var2 = var1 |
| 21:32:58 | Flynnn | var1 = 11 |
| 21:33:12 | Flynnn | print(var2) will output 10, and print(var1) will output 11 |
| 21:33:30 | fordcars | var1=new PLane() -------- var1.coordX=100--------arr.Add(var1)----var1=new Plane()----var1.coordX=200-----arr.Add(var1) |
| 21:33:33 | fordcars | ok |
| 21:33:55 | Flynnn | Yep, that'll work, you'll have two planes at different locations |
| 21:34:00 | Flynnn | it might even be simpler to just say: |
| 21:34:16 | Flynnn | arr.Add(new Plane); |
| 21:34:27 | fordcars | but why are they diffrent? |
| 21:34:28 | Flynnn | arr[arr.length-1].coordX = 100; |
| 21:34:31 | Flynnn | yes, they are different |
| 21:35:07 | fordcars | even if they are both var1 |
| 21:35:21 | Flynnn | the easiest way of thinking aobut it is this: |
| 21:35:24 | Flynnn | every object has a name |
| 21:35:30 | Flynnn | the "name" of this object is some weirdass number like: |
| 21:35:34 | Flynnn | EEFGK |
| 21:35:45 | Flynnn | oops, hexadecimal numbers don't have G or K |
| 21:35:48 | Flynnn | I mean... |
| 21:35:53 | Flynnn | 10FAE |
| 21:36:34 | Flynnn | 10FAE is a hex number, and is the same as the number: 69550 |
| 21:37:44 | Flynnn | the names of these variables are just like normal numbers |
| 21:37:50 | Flynnn | remember that if I say var1 = 10; |
| 21:37:53 | Flynnn | and var2 = var1 |
| 21:38:06 | Flynnn | and var1 = 11 ,var 2 will still be 10? |
| 21:38:30 | fordcars | ok, but if you would do var1.coordX=10, just like that, it will change both objects? |
| 21:38:46 | fordcars | if you have two var1.plane |
| 21:38:51 | Flynnn | I ahve to walk the dog |
| 21:38:54 | fordcars | I mean ar1=new PLane() |
| 21:38:59 | fordcars | Haha |
| 21:39:35 | fordcars | ok, one last question, if you have two var1=new PLane() |
| 21:40:00 | fordcars | and you do var1.coordX = 10, it will change both? |
| 21:42:41 | Flynnn | no |
| 21:42:48 | Flynnn | I'm trying to explain why so that you understand xD |
| 21:42:56 | Flynnn | ** understand why |
| 21:44:13 | fordcars | I know that each var1 is diffrent! |
| 21:44:20 | fordcars | for the computer |
| 21:44:30 | fordcars | but fore me, both are the same |
| 21:44:55 | Flynnn | var1 is always the same |
| 21:44:59 | Flynnn | it points to somethign different each time |
| 21:45:47 | fordcars | but how could there be two diffrent var1.coordX |
| 21:45:57 | Flynnn | var1.coordX is not a name |
| 21:46:17 | Flynnn | each object of type Plane() has its own .coordX inside of it |
| 21:46:47 | fordcars | it'syes |
| 21:46:49 | Flynnn | so when you make var1 point to a different object |
| 21:47:01 | Flynnn | var1.coordX accesses the .coordX of a different object |
| 21:47:44 | fordcars | ok |
| 21:49:38 | Flynnn | makes sense? |
| 21:50:20 | fordcars | but I still don't get how you would modify only one var1 |
| 21:50:26 | fordcars | coordsX |
| 21:50:34 | Flynnn | var1 only ever points to one object |
| 21:50:44 | Flynnn | as soon as you make it point to a new object, it stops pointing to the old one |
| 21:51:01 | | bobdaduck has joined |
| 21:51:31 | fordcars | oh ok |
| 21:51:47 | fordcars | yes of course |
| 21:51:49 | Flynnn | now, I think if I explain it to you, it will make much more sense :) |
| 21:51:59 | Flynnn | are you okay with me doing that? |
| 21:52:07 | fordcars | sure! |
| 21:52:10 | Flynnn | okay. |
| 21:52:14 | Flynnn | If I say: |
| 21:52:17 | Flynnn | var1 = 5 |
| 21:52:20 | Flynnn | var3 = var1 |
| 21:52:23 | Flynnn | var1 = 10 |
| 21:52:30 | Flynnn | what is the result of print(var1)? |
| 21:52:35 | fordcars | 10 |
| 21:52:39 | Flynnn | good |
| 21:52:44 | Flynnn | and what about print(var3)? |
| 21:52:47 | fordcars | 5 |
| 21:52:51 | Flynnn | great! |
| 21:52:56 | Flynnn | now, |
| 21:53:01 | Flynnn | every single object has a "name" |
| 21:53:09 | Flynnn | that name is really more of an ID code |
| 21:53:22 | Flynnn | its name is just a number that the computer creates and never lets you see |
| 21:53:37 | Flynnn | (however, programming languages like C or c++ will let you see the actual ID code) |
| 21:53:49 | fordcars | ok |
| 21:54:00 | Flynnn | the official name of that ID code is the "address" of that variable |
| 21:54:04 | Flynnn | ** of that object |
| 21:54:18 | fordcars | ok |
| 21:54:20 | Flynnn | so when someone says the address of an object, they mean the name, or ID code of that object |
| 21:54:27 | fordcars | yes |
| 21:54:30 | Flynnn | it's called the address, because that ID code is actually the location in RAM that the object is stored |
| 21:54:33 | | bobdaduck Quit (Remote host closed the connection) |
| 21:54:57 | | bobdaduck has joined |
| 21:55:00 | Flynnn | but that gets into low level memory stuff, so it's not important truely to know this. the knowledge won't even help you unless you use c or c++ |
| 21:55:14 | Flynnn | (or any derivation of those languages -- or any languages older than c++ and obj-c |
| 21:55:30 | fordcars | Hehe I already know that actually, well a little of it |
| 21:55:34 | bobdaduck | I WENT TOOOO THE DANGER ZONEEEEEEE |
| 21:55:38 | Flynnn | great :) |
| 21:55:39 | bobdaduck | RIDIN' TOOOOO THE DANGER ZONNEEEEE |
| 21:55:40 | Flynnn | Now, |
| 21:55:41 | fordcars | Good |
| 21:55:50 | Flynnn | now, |
| 21:55:57 | Flynnn | let's say that 5 |
| 21:55:58 | Flynnn | and 10 |
| 21:56:04 | Flynnn | are actually the ID codes of two objects |
| 21:56:07 | fordcars | ok |
| 21:56:11 | fordcars | wait! |
| 21:56:19 | fordcars | is an object var1 |
| 21:56:26 | bobdaduck | whazzup guise? |
| 21:56:32 | fordcars | yes ok do go on :) |
| 21:56:34 | Flynnn | a variable is not an object |
| 21:56:43 | fordcars | I know sorry |
| 21:56:47 | Flynnn | xD sorry |
| 21:56:49 | Flynnn | anyways |
| 21:56:57 | Flynnn | when you say "new Plane()" |
| 21:57:12 | fordcars | bob, FLynn is teaching me object thingnines |
| 21:57:13 | bobdaduck | If I've learned anything from trying to teach footloose programming, variables are much more like penguins.... |
| 21:57:32 | fordcars | ok |
| 21:57:42 | Flynnn | I think he's joking lol |
| 21:58:01 | fordcars | I know hahahaha |
| 21:58:08 | Flynnn | lol |
| 21:58:21 | Flynnn | anyways |
| 21:58:25 | Flynnn | if you say: new Plane() |
| 21:58:26 | bobdaduck | because she names her variable "penguin" and has it hold the numbers for her.... |
| 21:58:56 | fordcars | Wow |
| 21:59:29 | Flynnn | bobdaduck: just curious, do you do any programming outside of lua? |
| 21:59:41 | fordcars | I don't think so |
| 21:59:45 | bobdaduck | absolutely not! |
| 21:59:48 | Flynnn | xD |
| 21:59:49 | bobdaduck | do you BATHE in MUD? |
| 22:00:21 | Flynnn | not usually. that's why I don't usually program in lua! |
| 22:00:40 | bobdaduck | but seriously though: I know some C#, some C++, some html, even less javascript and php, and even less anything else. |
| 22:00:45 | Flynnn | I hate lua because it's not technically object oriented lol |
| 22:01:05 | Flynnn | it has "objects" sort of |
| 22:01:09 | Flynnn | but you aren't allowed to define your own classes |
| 22:01:19 | fordcars | Lua is the first language I learned :P |
| 22:01:20 | Flynnn | and static anything doesn't exist! |
| 22:01:24 | fordcars | well after BASIC |
| 22:01:52 | Flynnn | the first language I learned was a JS syntax remapping to Mono C# |
| 22:02:01 | fordcars | heh |
| 22:02:06 | Flynnn | about the most nonstandard-pretending-to-be-standard language you can get |
| 22:02:17 | Flynnn | it's name is "UnityScript" but everyone calls it JS |
| 22:02:23 | Flynnn | ** its |
| 22:02:27 | | kaen has joined |
| 22:02:32 | Flynnn | anyways. |
| 22:02:32 | bobdaduck | HIKAEN |
| 22:02:43 | Flynnn | if you say: new Plane() |
| 22:02:47 | fordcars | yes |
| 22:02:55 | Flynnn | that basically returns a number -- the ID code of the object you just created |
| 22:03:11 | Flynnn | so in the example with var1, and var2, you can effectively replace 5 and 10 with new Plane() |
| 22:03:18 | Flynnn | for example: |
| 22:03:26 | Flynnn | var1 = new Plane(); |
| 22:03:30 | Flynnn | var3 = var1; |
| 22:03:34 | Flynnn | var1 = new Plane(); |
| 22:03:58 | Flynnn | just like print(var1); gave you the second number in the first example, print(var1) will give you the second OBJECT in the second example! |
| 22:04:05 | kaen | hi guys :) |
| 22:04:10 | Flynnn | hello, kaen :) |
| 22:04:22 | kaen | oh god I see `new` |
| 22:04:27 | bobdaduck | that's my version of kamehamehah, except its more of a short-bursty thing than a full out energy burst. A full out energy burst would be more of a kamehamekaen sort of thing |
| 22:04:34 | Flynnn | I'm converting a lua programmer to OOP :D |
| 22:04:50 | kaen | "OOP" :P |
| 22:05:00 | fordcars | lo |
| 22:05:02 | fordcars | l |
| 22:05:03 | Flynnn | object oriented programming xD |
| 22:05:06 | kaen | I know |
| 22:05:16 | Flynnn | I dun't understand why it is funny xD |
| 22:05:19 | Flynnn | ** don't |
| 22:05:35 | bobdaduck | say it outloud. Not as an acronym |
| 22:05:35 | kaen | I was making a joke because prototypal inheritance is just barely oop in the traditionaly sense |
| 22:05:45 | kaen | traditional |
| 22:05:51 | Flynnn | that's true xD |
| 22:05:52 | bobdaduck | "oooooohp" |
| 22:05:55 | Flynnn | but he's working in JS |
| 22:05:57 | kaen | yeah |
| 22:06:03 | Flynnn | so prototypal inheritance is all he's got xD |
| 22:06:11 | kaen | poor guy :/ |
| 22:06:12 | Flynnn | but I'm really explaining java to him instead of js |
| 22:06:17 | Flynnn | js is fupped up |
| 22:06:25 | Flynnn | and yet fascinating at the same time |
| 22:06:48 | kaen | yeah |
| 22:06:55 | Flynnn | like, it's freaking brilliant |
| 22:07:05 | kaen | I'd have to disagree there |
| 22:07:12 | kaen | it has brilliant parts, mostly on accident |
| 22:07:15 | Flynnn | well, I mean from the perspective of how simple its definition |
| 22:07:19 | Flynnn | like... |
| 22:07:23 | Flynnn | all it has are basically functions |
| 22:07:31 | Flynnn | and they are recursively structurable into "classes" and all of that rot |
| 22:07:42 | Flynnn | it's the simplest way I've ever seen of creating a language that has "OOP" in it |
| 22:07:45 | kaen | yes, but it's all very fragile and inefficient |
| 22:07:51 | Flynnn | I agree with you on that |
| 22:07:53 | kaen | you should look at Go's OOP-ishness |
| 22:08:10 | Flynnn | in the end, it generally just makes things more complicated than they should be |
| 22:08:14 | fordcars | ok, so var1 points to the address of plane |
| 22:08:20 | Flynnn | fordcars: yes! |
| 22:08:27 | kaen | whoa whoa |
| 22:08:33 | kaen | it's a *reference* to an object |
| 22:08:41 | fordcars | OKokokok |
| 22:08:42 | Flynnn | oh whoops, right |
| 22:08:49 | Flynnn | it doesn't "point to the address" |
| 22:08:50 | fordcars | I gues it doesn't have an adress |
| 22:08:53 | Flynnn | it *is* the address |
| 22:08:58 | Flynnn | its value, is the address |
| 22:09:03 | kaen | lord forbid he should try to malloc() something ... |
| 22:09:04 | Flynnn | and because its value is the address, it points to the object |
| 22:09:21 | Flynnn | you must be careful with your wording xD |
| 22:09:23 | fordcars | yeah |
| 22:09:23 | Flynnn | I misread what you said |
| 22:09:36 | fordcars | hahaha sure :) |
| 22:09:39 | Flynnn | because yo uactually *can* program what you just said in c++, and it comes out completely different than what you meant |
| 22:09:56 | Flynnn | double pointers are fun hehe |
| 22:10:10 | fordcars | but if you store var1 in an array |
| 22:10:19 | Flynnn | you aren't storing var1 |
| 22:10:25 | Flynnn | you're storing the address that var1 contains into the array |
| 22:10:26 | fordcars | and then do var1=ne PLane() |
| 22:10:33 | fordcars | YOU ARE?????? |
| 22:10:33 | fordcars | ~ |
| 22:10:36 | Flynnn | yes |
| 22:10:52 | Flynnn | which means you can add the same exact object twice -- just like you can add the number 10 to an array twice :) |
| 22:10:57 | fordcars | Oh thanks for telling me that before, it would of saved us like an hour :) |
| 22:11:10 | Flynnn | you didn't understand what addresses were until about 15 minutes ago.... |
| 22:11:18 | fordcars | okokok |
| 22:11:25 | Flynnn | and an hour ago you thought variables and objects were the same thing |
| 22:11:26 | fordcars | Thanks :) |
| 22:11:35 | Flynnn | so *your welcome* for taking the time to clarify things for you! |
| 22:11:35 | Flynnn | :D |
| 22:11:51 | fordcars | var contains the address of object |
| 22:11:56 | Flynnn | yes |
| 22:12:01 | fordcars | #var contains value |
| 22:12:12 | fordcars | like 1 or 2 sometimes |
| 22:12:17 | Flynnn | yep |
| 22:12:23 | Flynnn | the address of an object is a value, just like 1 or 2 |
| 22:12:25 | Flynnn | or true or false |
| 22:12:26 | fordcars | and var contains boolean |
| 22:12:37 | Flynnn | true and false are sometimes just 0 and 1 |
| 22:12:42 | Flynnn | (internally) |
| 22:12:52 | Flynnn | they can also be the binary numbers 00000000 and 11111111 |
| 22:12:58 | fordcars | when you do var1=new PLan() |
| 22:13:07 | Flynnn | of course in much the same way they "can" be 1234 and 3215 |
| 22:13:11 | fordcars | the address of plane is made right there? |
| 22:13:18 | Flynnn | yep! |
| 22:13:21 | Flynnn | well no |
| 22:13:22 | fordcars | oh! |
| 22:13:25 | fordcars | oh |
| 22:13:27 | Flynnn | when you do: |
| 22:13:33 | Flynnn | var1=new Plane() |
| 22:13:37 | Flynnn | a new object is created right ther |
| 22:13:43 | Flynnn | and then a new address is allocated for it |
| 22:13:49 | Flynnn | well to be super specific |
| 22:13:55 | Flynnn | a new address and memory space is allocated for it |
| 22:13:59 | Flynnn | then it gets created inside that space |
| 22:14:04 | kaen | (and the constructor is applied to the object) |
| 22:14:04 | Flynnn | and then the address of the space is returned |
| 22:14:14 | Flynnn | righto |
| 22:14:25 | Flynnn | though he's not used to objects, so I haven't explained constuctors to him |
| 22:14:31 | kaen | I hate you, `this` |
| 22:14:43 | Flynnn | haha, obj-c woes? |
| 22:14:53 | Flynnn | tbh I hate the obj-c constuctor system |
| 22:15:07 | kaen | I actually meant in the context of js |
| 22:15:18 | Flynnn | really! |
| 22:15:24 | kaen | not sure if you've ever accidentally done `var obj = ClassName()` |
| 22:15:32 | Flynnn | ._. |
| 22:15:41 | kaen | then find for some reason your global window object has .x and .y properties |
| 22:15:49 | kaen | and obj is undefined |
| 22:15:56 | Flynnn | to be honest with you, Kaen, asides from arrays and strings, I've steered clear of object oriented js programming altogether. but for the past four years I've done nothing but c# |
| 22:16:33 | kaen | I've been writing a js replication/serialization lib for a few months |
| 22:16:36 | Flynnn | wait, whaaat, it can get that bad, Kaen? |
| 22:16:41 | Flynnn | oh ouch |
| 22:16:41 | kaen | uh, yeah |
| 22:16:46 | kaen | not only will that call not error |
| 22:16:50 | Flynnn | you really get to know a language when you do serialization |
| 22:16:57 | Flynnn | I did a serialization engine for lua a while back |
| 22:17:09 | kaen | but `this` in a function called without new refers to the global scope ... |
| 22:17:13 | Flynnn | I got used to how limited the damn thing was reaaal quick |
| 22:17:31 | kaen | see, I'm actually starting to like lua over js |
| 22:17:37 | Flynnn | at least lua is simple |
| 22:17:39 | Flynnn | and defined |
| 22:17:43 | Flynnn | it's just not powerful |
| 22:17:53 | kaen | it's specifically undefined when it comes to OOP though |
| 22:17:55 | Flynnn | At least in the applications I've used it with, you aren't allowed to define your own classes |
| 22:17:58 | Flynnn | right |
| 22:18:01 | Flynnn | and I love my OOP |
| 22:18:10 | kaen | you can define your own classes in bf |
| 22:18:11 | Flynnn | idd though that i generally use js without OOP xD |
| 22:18:17 | Flynnn | kaen: that's epic! |
| 22:18:18 | kaen | I just found that out like last week :P |
| 22:18:22 | Flynnn | haha |
| 22:18:28 | Flynnn | I was using Roblox lua |
| 22:18:36 | Flynnn | I wrote the serialization because Roblox didn't have a networking system |
| 22:18:45 | Flynnn | but Roblox let you send text by creating a new object with a name |
| 22:18:52 | Flynnn | so I was serializing everything in lua into strings and back xD |
| 22:18:56 | Flynnn | as a communications system |
| 22:19:02 | kaen | heh |
| 22:19:02 | Flynnn | but all you got in roblox lua was a global variable |
| 22:19:17 | kaen | I wanted to write a fast replication engine for node/browser games |
| 22:19:22 | Flynnn | so you'd have to do things like _G.Whateverclass.GlobalFunction = function(); |
| 22:19:30 | kaen | yep |
| 22:19:42 | kaen | looks like Class decorations in js |
| 22:19:42 | Flynnn | oh that's pretty cool |
| 22:19:48 | Flynnn | did you serialize to bytecode, or text? |
| 22:19:54 | raptor | howdy folks |
| 22:19:58 | Flynnn | hey, raptor :) |
| 22:19:59 | kaen | I actually have it 90% as performant as bitfighter's network engine, tnl |
| 22:20:10 | Flynnn | damn, in JS? |
| 22:20:14 | kaen | uh, it can serialize to any arbitrary thing |
| 22:20:15 | kaen | yeah |
| 22:20:24 | raptor | oh good, bobdaduck is here |
| 22:20:27 | Flynnn | well right, but you can make a string into bytecode |
| 22:20:30 | bobdaduck | HI |
| 22:20:33 | Flynnn | and you can make abitrary bytecode into a string |
| 22:20:34 | kaen | it's using these native uint8 arrays |
| 22:20:35 | bobdaduck | ATCHERSERVICE |
| 22:20:39 | kaen | yes |
| 22:20:42 | raptor | turn on critic mode please |
| 22:20:42 | kaen | it's pretty fast too |
| 22:20:44 | Flynnn | kaen: ooh interesting |
| 22:20:50 | kaen | https://github.com/kaen/wasabi |
| 22:20:55 | kaen | has some early bnechmarks |
| 22:21:08 | bobdaduck | CRITIC MODE ENGAGED |
| 22:21:17 | kaen | it's also faster and more bit-efficient than the two most popular serialization/replication libs for node |
| 22:21:21 | bobdaduck | BFBuildBot: |
| 22:21:24 | kaen | just not API complete yet |
| 22:21:28 | raptor | bobdaduck, kaen: I thought to try a different mark for showing regen turrets: http://sam6.25u.com/upload/8screenshot_3.png AND http://sam6.25u.com/upload/8screenshot_4.png |
| 22:21:54 | Flynnn | I see |
| 22:22:00 | fordcars | ok ONE last thing, when I have all plane objects in one array, and I iterate through them, how do I write the object.coordX |
| 22:22:05 | fordcars | replacing object |
| 22:22:13 | Flynnn | arr[0].coordX |
| 22:22:17 | raptor | thoughts? better/worse than the filled-in version? |
| 22:22:17 | Flynnn | or, |
| 22:22:23 | Flynnn | arr[i].coordX |
| 22:22:27 | bobdaduck | doesn't show how MUCH the turret regens by |
| 22:22:46 | kaen | Its till like it better |
| 22:22:57 | bobdaduck | a little better looking than the filled in, though the filled in could use work on its own |
| 22:23:01 | fordcars | arr is the array's """"""name"""""? |
| 22:23:07 | kaen | I don't really care how much they regen by once I know whether or not they regen |
| 22:23:10 | Flynnn | yes |
| 22:23:11 | Flynnn | so, |
| 22:23:18 | Flynnn | var arr = new Array(); |
| 22:23:24 | fordcars | I know, it's not a name |
| 22:23:26 | raptor | suggestions for improvement? |
| 22:23:28 | Flynnn | arr.add(new Plane()); |
| 22:23:40 | Flynnn | that's okay, I got your hint with the six quotation marks :) |
| 22:23:47 | Flynnn | arr[0].xCoord = 200; |
| 22:23:48 | raptor | it was actually Little_Apple's idea |
| 22:24:01 | fordcars | its's a variable that contains the addres of the array |
| 22:24:05 | fordcars | ALRIGHT! |
| 22:24:20 | fordcars | arr[0].coordX=100 |
| 22:24:24 | raptor | Flynnn / fordcars: you guys still at JS? |
| 22:24:29 | fordcars | arr[1].coordX=230 |
| 22:24:39 | Flynnn | I just finished giving him a crash course in OOP |
| 22:24:47 | fordcars | DOne! |
| 22:24:49 | Flynnn | I didn't teach him about constructors though xD |
| 22:25:01 | fordcars | I know a little about those |
| 22:25:03 | Flynnn | they are simple though |
| 22:25:06 | Flynnn | basically, |
| 22:25:08 | fordcars | I read about them |
| 22:25:13 | Flynnn | (except in obj-c, where it is weirdass) |
| 22:25:25 | Flynnn | (obj-c has a special place in hell for its constuctors) |
| 22:25:40 | Flynnn | but in any other *sane* language, |
| 22:25:46 | raptor | hahaha |
| 22:26:13 | Flynnn | a constuctor is just a nonstatic function that gets called on an object when the object is first created |
| 22:26:22 | fordcars | ok |
| 22:26:23 | Flynnn | its point is literally to construct the object, and give everything default values |
| 22:26:31 | Flynnn | and, the constuctor accepts arguments from the new operator |
| 22:26:32 | Flynnn | for instance: |
| 22:26:36 | fordcars | so var1.coordX |
| 22:26:37 | Flynnn | new Plane(10, 100); |
| 22:26:52 | fordcars | function PLane(x,y) |
| 22:26:55 | Flynnn | your constructor would receive two variables, which you could place into coordX and coordY |
| 22:27:04 | Flynnn | but be wary |
| 22:27:12 | fordcars | yes? |
| 22:27:27 | Flynnn | well, remember how I said that JS is not exactly OOP? |
| 22:27:34 | fordcars | Sure |
| 22:27:48 | Flynnn | js constuctors are not like the constructors in any other language |
| 22:27:53 | Flynnn | (that I know of) |
| 22:28:02 | fordcars | ok |
| 22:28:09 | raptor | kaen: which way did you mean that you liked better? |
| 22:28:12 | Flynnn | in the class Box, for instant |
| 22:28:14 | Flynnn | ** instance |
| 22:28:31 | kaen | with the + sign |
| 22:28:35 | raptor | ok |
| 22:28:36 | kaen | filled in looks terrible |
| 22:28:43 | raptor | i'll leave it for now, then.. |
| 22:28:57 | kaen | fordcars, http://eleventyone.done.hu/OReilly.JavaScript.The.Good.Parts.May.2008.pdf |
| 22:29:07 | Flynnn | in most languages, you would write: public Box(){} |
| 22:29:08 | Flynnn | or |
| 22:29:13 | Flynnn | function Box() {} |
| 22:29:18 | Flynnn | but in JS, |
| 22:29:19 | kaen | the best book on applied javascript in complex systems, written by the man best qualified to do so |
| 22:29:19 | Flynnn | you write: |
| 22:29:36 | Flynnn | function Whatever(){} whatever(); |
| 22:29:45 | Flynnn | oh wait |
| 22:29:46 | Flynnn | hmm |
| 22:29:48 | Flynnn | I wonder |
| 22:29:57 | Flynnn | oh! funny |
| 22:30:07 | Flynnn | I'm actually learning OOP in js as we speak |
| 22:30:11 | raptor | ooo... maybe |
| 22:30:16 | fordcars | heh |
| 22:30:26 | fordcars | Thanks kaen, I'll check it out! |
| 22:30:27 | Flynnn | you know what, as you reaserach OOP in js, and learn about constuctors, classes, etc, and their translations to JS, you'll come across this |
| 22:30:31 | raptor | maybe I draw a smaller arc for the turret, and a small chevron for the ffp |
| 22:30:38 | Flynnn | but the funny thing is.. |
| 22:30:43 | Flynnn | in JS, since everything is basically a function |
| 22:30:46 | kaen | that sounds like a good idea, raptor |
| 22:30:51 | Flynnn | (objects, functions, and classes are all the same, that is) |
| 22:30:53 | raptor | let me try that.. |
| 22:31:09 | Flynnn | your class IS your constructor |
| 22:31:16 | Flynnn | because your class is actually not a class -its a function! |
| 22:31:21 | fordcars | yes! |
| 22:31:28 | Flynnn | hahaha oh my god wtf js |
| 22:31:34 | fordcars | :P |
| 22:31:42 | Flynnn | but yeah, that's a constuctor for you, you already knew what it was xD |
| 22:31:56 | Flynnn | now in obj-c... |
| 22:31:56 | fordcars | Yay! |
| 22:32:05 | Flynnn | constructors actually force you to set this equal to something |
| 22:32:21 | Flynnn | so in your constuctor, you have to set this = Constuctor_of_superclass |
| 22:32:26 | Flynnn | or it will all go to hell |
| 22:32:33 | kaen | wait, what? |
| 22:32:37 | Flynnn | yep. |
| 22:32:46 | Flynnn | and at the top leve, you say: |
| 22:32:48 | kaen | I'm positive that's wrong |
| 22:32:51 | Flynnn | this = new Object (basically) |
| 22:33:10 | kaen | you should never explicitly assign to this in the constructor |
| 22:33:17 | Flynnn | in obj-c you are forced to |
| 22:33:19 | kaen | it gets a new Object implicitly |
| 22:33:23 | Flynnn | nope |
| 22:33:24 | kaen | oh |
| 22:33:24 | Flynnn | not in obj-c |
| 22:33:31 | kaen | sorry, thought you were still in js |
| 22:33:33 | Flynnn | hence why I hate obj-c constuctors :D |
| 22:33:36 | Flynnn | oh, no |
| 22:33:48 | Flynnn | I went on a tangent about obj-c haha sorry |
| 22:34:07 | fordcars | HAha |
| 22:34:09 | Flynnn | but the best part is |
| 22:34:21 | fordcars | I never really planned to do anything in obj-c though |
| 22:34:24 | Flynnn | you sometimes don't know if the constructor of your superclass even set this! |
| 22:34:31 | fordcars | but it's useful |
| 22:34:35 | Flynnn | so you have to CHECK if this is already set before you do anything with it! |
| 22:34:41 | Flynnn | (it won't be set in the event of an error) |
| 22:35:03 | fordcars | wow |
| 22:35:09 | Flynnn | Yeah, it |
| 22:35:11 | Flynnn | it's sad |
| 22:35:21 | Flynnn | all the compartmentalization of OOP is lost with obj-c initializers |
| 22:35:22 | fordcars | hah |
| 22:35:37 | Flynnn | here's an example of a constructor: |
| 22:35:38 | Flynnn | http://pastebin.com/bHPnGRqS |
| 22:35:56 | kaen | js's constructor nuances are evil, too |
| 22:35:58 | Flynnn | taken from http://stackoverflow.com/questions/7999104/what-is-the-objective-c-constructor because I can't even remember all the rules for it off the top of my head |
| 22:36:09 | Flynnn | kaen: I agree completely |
| 22:36:21 | Flynnn | why the hell is JS the standard web language |
| 22:36:31 | kaen | ah, the history of js ... |
| 22:36:39 | Flynnn | I always say to muyself "I hate js, but it's standard so I'll suck it up" |
| 22:36:42 | kaen | accidents, hype, and the dotcom boom |
| 22:36:44 | Flynnn | and then the standard never gets changed! |
| 22:37:01 | Flynnn | haha I love that they piggybacked on java |
| 22:37:10 | bobdaduck | nightguise |
| 22:37:14 | | bobdaduck Quit (Remote host closed the connection) |
| 22:37:16 | Flynnn | goodnight! |
| 22:37:24 | Flynnn | too late :( |
| 22:37:40 | kaen | ECMA5 was a good step |
| 22:37:46 | kaen | Harmony just might set us free ... |
| 22:38:02 | kaen | js might even be enjoyable to people without self-inflicted brain trauma |
| 22:38:19 | Flynnn | I'm afraid I've lost you |
| 22:38:27 | Flynnn | I'm not really that great of a web developer when it comes to JS and the like |
| 22:38:37 | kaen | ECMA5 is a recently released update to js |
| 22:38:37 | Flynnn | PHP, I love |
| 22:38:42 | Flynnn | interesting |
| 22:38:44 | kaen | harmony is the next one (in progress) |
| 22:38:51 | Flynnn | oh my |
| 22:38:56 | kaen | harmony will have a traditional class syntax |
| 22:39:02 | Flynnn | OH MY FUCKING GOD |
| 22:39:05 | kaen | also, small ironic note: |
| 22:39:05 | Flynnn | ahem |
| 22:39:13 | kaen | `class` is a reserved word in javascript |
| 22:39:21 | Flynnn | hahahahahahaha |
| 22:39:23 | kaen | though it is not used. |
| 22:39:29 | Flynnn | so what you're saying is... |
| 22:39:39 | Flynnn | the JS programemrs were in such a rush to get js pumped out |
| 22:39:42 | Flynnn | they never added JS |
| 22:39:46 | Flynnn | ** they never added classes |
| 22:39:53 | kaen | indeed |
| 22:39:55 | Flynnn | and instead forced us to implement it for them every time we code |
| 22:40:08 | Flynnn | IE, js is still a WIP |
| 22:40:34 | kaen | most definitely |
| 22:40:50 | Flynnn | well at least there is hope |
| 22:40:52 | fordcars | Hah |
| 22:41:07 | Flynnn | kaen, you're like a JS pro! |
| 22:41:09 | Flynnn | just saying |
| 22:41:18 | kaen | heh thanks |
| 22:41:27 | Flynnn | well I'm pretty sure you *are* a js pro |
| 22:41:28 | kaen | master of self-inflicted brain trauma :) |
| 22:41:33 | Flynnn | hah |
| 22:41:40 | Flynnn | I need to become a master of jS |
| 22:41:43 | Flynnn | lest I be left behind |
| 22:41:55 | Flynnn | I want to be one of those old men who can say "I remember when JS didn't have classes" |
| 22:42:03 | kaen | step one: grab a large rock |
| 22:42:20 | Flynnn | this JS book I have is the size of a rock... it should do |
| 22:42:35 | kaen | that book I linked fordcars to is the best I can recommend |
| 22:42:38 | kaen | http://eleventyone.done.hu/OReilly.JavaScript.The.Good.Parts.May.2008.pdf |
| 22:43:00 | fordcars | oh anmd kaen |
| 22:43:00 | Flynnn | Oh that's cool! |
| 22:43:10 | fordcars | you were right |
| 22:43:12 | kaen | it's written by douglas crockford, one of the guys responsible for people writing sane modern javascript |
| 22:43:27 | fordcars | w3shcools is really crappy |
| 22:43:45 | kaen | I know, fc :< |
| 22:43:46 | Flynnn | I loved w3schools D: |
| 22:43:51 | kaen | I had to learn that one the hard way |
| 22:43:56 | Flynnn | though tbh they really don't have any information at all |
| 22:44:03 | Flynnn | and they start getting crappuy with cookies and PHP |
| 22:44:32 | fordcars | They had one page for objects |
| 22:44:33 | Flynnn | good for beginners though! when I was first learning to program (and really, google) they were right there answring all of my completely idiotic questions :D |
| 22:44:43 | Flynnn | oh god, I never even saw objects on their website |
| 22:45:06 | kaen | the real danger is that they are often subtly wrong on intermediate to advanced topics |
| 22:45:13 | fordcars | and it said like"Everythiing is an object, deal with it" |
| 22:45:17 | Flynnn | btw http://shop.oreilly.com/product/9780596805531.do is the book I have |
| 22:45:19 | kaen | and they are the highest ranked js/html reference :/ |
| 22:45:32 | Flynnn | kaen: oh I see |
| 22:45:38 | fordcars | wow |
| 22:45:55 | Flynnn | by the time I got into such topics, I had stopped using w3schools |
| 22:46:04 | Flynnn | and started taking a real programming course / using stack overflow haha |
| 22:46:21 | kaen | ah, that's another classic |
| 22:46:35 | Flynnn | though stakc overflow is remarkably accurate |
| 22:46:39 | kaen | much more indepth than The Good Parts, but it's a good treatment of the advanced topics |
| 22:47:00 | Flynnn | oh you meant the book xD |
| 22:47:11 | Flynnn | I'll read that PDF before I start on the in depth one xD |
| 22:47:26 | Flynnn | all the pages are marked 1 and 2 xD |
| 22:47:31 | fordcars | It's getting late |
| 22:47:49 | fordcars | I should go to bed :( |
| 22:47:51 | Flynnn | but it seems to be only 30 pages, so that's actually a reasonable read! (xD I have actually never read a book to its completion, except for one which I can't remember the name of) |
| 22:47:56 | Flynnn | Goodnight, fordcars! |
| 22:48:08 | fordcars | II say Thank you milion of times to Flynn and Kane |
| 22:48:14 | fordcars | *kaen |
| 22:48:17 | Flynnn | No problem, fordcars :) |
| 22:48:25 | Flynnn | Welcome to the wonderful world of OOP! |
| 22:48:30 | fordcars | Hehe |
| 22:48:49 | kaen | my pleasure :) |
| 22:48:49 | Flynnn | aand feel lucky that you happen to play pretty much the only game on the planet that has OOP lua |
| 22:48:50 | kaen | rest easy |
| 22:48:58 | Flynnn | kaen, can you please teach me lua OOP real quick? |
| 22:49:20 | fordcars | Twomorro I'll try to make my little project make planes :) |
| 22:49:27 | Flynnn | I've googled it up and down the yin yang and have found nothing |
| 22:49:33 | Flynnn | but maybe I'm just bad at google |
| 22:49:39 | Flynnn | have fun, fordcars! |
| 22:49:44 | fordcars | Hehe |
| 22:49:51 | fordcars | Good night guys! |
| 22:49:59 | fordcars | And thanks again! |
| 22:50:04 | | fordcars Quit (Quit: Page closed) |
| 22:50:04 | Flynnn | of course :) |
| 22:58:24 | kaen | Flynnn , http://pastie.org/8249205 |
| 22:58:28 | kaen | c is the class |
| 22:58:30 | kaen | i is the instance |
| 22:58:39 | kaen | `this` and `self` a unreserved in lua |
| 22:58:50 | kaen | but bitfighter passes methods the self-reference as `self` |
| 22:59:11 | kaen | note that you have to create and affix the methods within the constructor |
| 22:59:25 | Flynnn | dazgud |
| 22:59:38 | kaen | and that I used `this` for constructor's result |
| 22:59:45 | kaen | vs. `self` within the methods |
| 22:59:51 | kaen | purely to avoid namespace conflicts. |
| 23:00:59 | Flynnn | so bitfighter automatically sets self to be whatever the function is being called on, yes? |
| 23:01:07 | kaen | yep |
| 23:01:15 | Flynnn | that's nifty |
| 23:01:25 | kaen | that's the difference between .myfunc() and :myfunc() |
| 23:01:31 | kaen | the implicit `self` argument |
| 23:01:34 | Flynnn | I see |
| 23:01:43 | Flynnn | do other dialects of lua support that? |
| 23:01:50 | Flynnn | or is that a bitfighter-only thing? |
| 23:02:05 | kaen | I think it's a part of our lua binding helper library |
| 23:02:06 | kaen | luaW |
| 23:02:23 | Flynnn | arrrhhhgg |
| 23:02:23 | kaen | and I also think it's the convention for OOP-lua |
| 23:02:31 | Flynnn | roblox no gusta |
| 23:02:44 | kaen | there's a lot of extra security and performance implications |
| 23:02:52 | Flynnn | fair enough |
| 23:02:59 | kaen | first of all, every instance gets its own instance of each method |
| 23:03:15 | kaen | function objects are cheap, but not that cheap |
| 23:03:22 | kaen | and each function has its own scope |
| 23:03:24 | kaen | and scope chain |
| 23:03:30 | kaen | blah blah blah |
| 23:03:36 | Flynnn | similar to js it seems |
| 23:03:44 | kaen | lua is a distant cousin |
| 23:03:51 | Flynnn | blech |
| 23:04:03 | kaen | I actually like it better than js |
| 23:04:04 | Flynnn | then it's not coincidence that they are the two languages I don't like so much |
| 23:04:13 | kaen | indeed |
| 23:04:28 | kaen | I simultaneously hate and love them. |
| 23:04:32 | Flynnn | same here xD |
| 23:04:43 | Flynnn | though if there is one thing I utterly dispise about lua... |
| 23:04:51 | Flynnn | it's the fact. that you can't. store. nil. in a freaking array |
| 23:05:03 | kaen | oh, interesting |
| 23:05:05 | kaen | I didn't know that |
| 23:05:15 | Flynnn | not without messing with metatables and all of that rot, and actually modifying how lua creates arrays |
| 23:05:22 | kaen | yes, I see |
| 23:05:29 | kaen | because table.insert(t, nil) is a noop |
| 23:05:32 | Flynnn | you can modify arrays and create your own set of functions that cause lua to store the actual length of the array, etc |
| 23:05:39 | Flynnn | right exactly |
| 23:05:43 | Flynnn | you see, |
| 23:05:49 | Flynnn | lua uses a null terminator with its arrays |
| 23:06:02 | Flynnn | but you are allowed to use indexes outside the array's actual length |
| 23:06:17 | Flynnn | so if you modify the array to contain its own length value, *then* you can sort of have it |
| 23:06:30 | kaen | I see |
| 23:06:39 | Flynnn | but if the last element is nil, then using the normal array append will just override your latest null |
| 23:06:49 | Flynnn | so you have to write your own append function that inserts at a specified index instead of ust appending |
| 23:07:13 | Flynnn | so I did all of this work, when I was working on that lua serializer |
| 23:07:25 | Flynnn | all to find out.. that THE ROBLOX PROGRAMMERS THEMSELVES COULD NOT HANDLE NIL |
| 23:07:34 | Flynnn | apparently, they don't allow you to send nil over their systems! |
| 23:07:54 | Flynnn | becuse they assume that you won't ever try -- when you pass an array contianing nil, the array comes out without any of the nill arguments due to their own whatever serialization whatever |
| 23:07:56 | Flynnn | it's fracked up |
| 23:08:05 | Flynnn | all because lua doesn't support it by default |
| 23:08:13 | kaen | that's pretty nuts |
| 23:11:54 | Flynnn | Yeah |
| 23:12:10 | Flynnn | you now know the two things I hate about lua xD |
| 23:12:19 | Flynnn | the only thing I hate about python is the syntax |
| 23:12:29 | Flynnn | if I had python with brackets, that'd be sweet |
| 23:13:03 | Flynnn | PHP and python are similar, PHP has brackets though, and I don't think PHP supports all the functional paradigmn stuff that python does |
| 23:13:24 | Flynnn | lambda and all of that xD |
| 23:16:37 | raptor | kaen: http://sam6.25u.com/upload/13screenshot_5.png AND http://sam6.25u.com/upload/9screenshot_6.png |
| 23:17:55 | raptor | any better? |
| 23:18:54 | kaen | Flynnn, it sure does |
| 23:19:03 | kaen | that's a recent-ish addition though |
| 23:19:10 | kaen | anon functions, closures |
| 23:19:14 | kaen | even closure rebindings |
| 23:19:17 | kaen | I hate PHP though |
| 23:19:26 | kaen | by far my least favorite language to write |
| 23:19:51 | Flynnn | kaen: really, what cripples it for you? |
| 23:20:00 | kaen | raptor, those links aren't working for me -- ? |
| 23:20:06 | kaen | sever seems down |
| 23:20:07 | Flynnn | Same here, raptor |
| 23:20:12 | raptor | argh |
| 23:20:14 | kaen | Flynnn, $variables |
| 23:20:19 | Flynnn | ooohh |
| 23:20:21 | raptor | using imgur.. |
| 23:20:24 | Flynnn | yeah that's a bit of an adjustment |
| 23:20:40 | Flynnn | if you can get around that, it's a wonderful language |
| 23:20:42 | kaen | admittedly, though, I got much better at typing dollar signs from doing php |
| 23:20:48 | Flynnn | and I suppose python is wodnerful if you can get around the indent xD |
| 23:20:52 | kaen | heh |
| 23:20:55 | kaen | I love python |
| 23:21:00 | Flynnn | I hate the indents! |
| 23:21:02 | raptor | http://i.imgur.com/fvulrte.png and http://i.imgur.com/mpT2egk.png |
| 23:21:05 | Flynnn | I like indenting code |
| 23:21:06 | raptor | look at those ^^ |
| 23:21:06 | kaen | but I learned it as a kid so the indenting never bothered me much |
| 23:21:08 | Flynnn | I hate having it mandatory |
| 23:21:15 | Flynnn | well I have had nasty experiences with it |
| 23:21:29 | Flynnn | I got a python file from another programmer who's text editor used a different indentation style.... |
| 23:21:32 | kaen | I think that's great raptor! |
| 23:21:42 | Flynnn | It took me five hours to figure out wtf the compiler errors were going on about |
| 23:21:49 | kaen | they even look more durable than non-regenerating ones |
| 23:22:00 | Flynnn | perfect, raptor! |
| 23:22:05 | raptor | heh |
| 23:22:08 | kaen | I, too, have had that experience :< |
| 23:22:25 | Flynnn | xD that was unfortunately my first time using python |
| 23:22:26 | kaen | I sometimes trip over formatting complex literals, too |
| 23:22:28 | Flynnn | since then I have hated it |
| 23:22:37 | kaen | I hear that sort of thing a lot |
| 23:22:45 | kaen | but it's standard lib is incredible |
| 23:22:46 | Flynnn | what if the arcs inside the turrets kind of expanded from the "center" in an animation? |
| 23:22:53 | Flynnn | oh, yeah, the lib is amazing |
| 23:23:01 | Flynnn | you can do almost anything right off the batt |
| 23:23:12 | Flynnn | probably overkill, the animation |
| 23:23:18 | Flynnn | but I just like to post what ifs xD |
| 23:23:26 | kaen | heh |
| 23:23:39 | kaen | but I wrote bitfighter's new leveldb in php |
| 23:23:40 | Flynnn | actually tbh having them still is best |
| 23:23:52 | Flynnn | that must have been hell for you |
| 23:23:53 | raptor | ok, so I'll think I'll commit unless anyone has suggestions? |
| 23:23:56 | kaen | so maybe I've just spent too much time with it recently |
| 23:24:00 | kaen | push it! |
| 23:24:11 | Flynnn | Raptor: can they get a little bit brighter and darker (in color) every time they have a boost in energy? |
| 23:24:21 | Flynnn | or is that overkill too> |
| 23:24:24 | Flynnn | ** ? |
| 23:27:32 | raptor | i don't know - what do you think, kaen, should I adjust alpha or color with the healrate? turrets already have a health indicator |
| 23:28:37 | kaen | it might help to make it more understandable, but I don't think it's necessary |
| 23:28:57 | kaen | plus it's another timer, more render logic, blah blah |
| 23:29:48 | kaen | finally downgraded to stable today |
| 23:30:11 | kaen | now I have to reinstall all of my out-of-repo packages :< |
| 23:30:44 | | Flynnn Quit (Quit: This computer has gone to sleep) |
| 23:31:06 | raptor | yay 'stable' |
| 23:31:30 | kaen | hehe |
| 23:32:14 | kaen | gives me a chance to try the build instructions for a clean wheezy install, though |
| 23:32:24 | kaen | the bitfighter build instructions, I mean |
| 23:34:09 | raptor | on it's surface, 'wheezy' seems like it's be more problematic than 'sid'... until you know what the names mean |
| 23:34:14 | raptor | *it'd |
| 23:34:20 | | Flynnn has joined |
| 23:37:52 | kaen | heh |
| 23:37:53 | kaen | very true |
| 23:39:26 | kaen | "If you can not get [bitfighter] to work, you can try running it in wine" |
| 23:39:49 | kaen | I would be very sad if someone had to resort to that :< |
| 23:40:06 | | Flynnn Quit (Quit: This computer has gone to sleep) |