--- Log opened Sun Aug 17 00:00:23 2014 |
00:52 | | Ozzy [Ozzy@Nightstar-a86mje.cable.virginm.net] has joined #code |
01:11 | | Checkmate [Z@Nightstar-ro94ms.balk.dk] has quit [[NS] Quit: If the world didn't suck, we'd all fall off.] |
01:15 | | Lappy-Caboose [IceChat9@Nightstar-ago7bl.abhsia.telus.net] has quit [Ping timeout: 121 seconds] |
01:41 | | macdjord|fude is now known as macdjord |
01:48 | | Desktop_Caboose [IceChat9@Nightstar-amo6n4.abhsia.telus.net] has joined #code |
01:51 | | Ozzy is now known as Ozzy{Away} |
02:06 | <&McMartin> | Argh |
02:06 | <&McMartin> | Writing documentation is hard |
02:15 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds] |
02:19 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code |
02:19 | | mode/#code [+o Orthia] by ChanServ |
02:27 | <~Vornicus> | But possibly the most valuable thing we do |
02:27 | | * McMartin is trying to update the API docs for monocle and is going to have to basically rewrite them from scratch |
02:54 | | Checkmate [Z@Nightstar-ro94ms.balk.dk] has joined #code |
02:54 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds] |
03:00 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code |
03:00 | | mode/#code [+o Orthia] by ChanServ |
03:21 | <&McMartin> | Yep, I'm gonna have to scale this down for a Lazy Saturday project, because this needs to be a book |
03:24 | | Attilla [uid13723@Nightstar-ed0oqj.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity] |
03:42 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
03:46 | <&McMartin> | Hrm |
03:46 | <&McMartin> | It occurs to me that I have neglected to think through mouse events. |
03:46 | <&McMartin> | Is "you clicked on/started hovering over/stopped hovering over this object" more like an input event or more like a collision? |
04:10 | <&ToxicFrog> | I would consider those input events, personally |
04:14 | <&McMartin> | Likewise |
04:14 | <&McMartin> | Though that also plays merry hell with a bunch of other stuff |
04:15 | <&McMartin> | If I get multiple mouse move events within a single frame, presumably I should only generate one "hover" event, which means it needs to be created after input processing is completed. |
04:19 | | Thalass [thalass@Nightstar-32fo5o.bigpond.net.au] has joined #code |
04:19 | | mode/#code [+o Thalass] by ChanServ |
04:28 | <~Vornicus> | hover is a collision event |
04:29 | <~Vornicus> | This makes things like input smoothing and so forth very easy to implement: you merely replace your mouse collidable with a smoothed mouse proxy collidable. |
04:40 | | Derakon[AFK] is now known as Derakon |
04:47 | <&McMartin> | I have no idea what you just said |
04:47 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds] |
04:49 | <~Vornicus> | When implementing MOuseover: you use collisions instead of input. |
04:49 | <~Vornicus> | This is because sometimes you want to do naughty things to the mouse. |
04:51 | <~Vornicus> | By making mouseover a collision, doing naughty things is "create a collidable object controlled with custom code for handling mouse input, and give it the same collision key as a real mouse" |
04:51 | <~Vornicus> | "and then hide the real mouse" |
04:51 | <&McMartin> | Aha, yes |
04:52 | <&McMartin> | That's basically "automatic" assuming you can read mouse state in pre-render |
04:52 | <&McMartin> | Click gets trickier then, though. |
04:52 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code |
04:52 | | mode/#code [+o Orthia] by ChanServ |
04:58 | | Derakon is now known as Derakon[AFK] |
05:05 | | Lappy-Caboose [IceChat9@Nightstar-amo6n4.abhsia.telus.net] has joined #code |
05:13 | | Checkmate [Z@Nightstar-ro94ms.balk.dk] has quit [Ping timeout: 121 seconds] |
05:28 | | Turaiel is now known as Turaiel[Offline] |
05:58 | <&McMartin> | 400 lines later and I've got a start |
05:58 | <&McMartin> | Still about six sections to write -_- |
05:58 | | Harlow [harlow@Nightstar-04f.4po.201.71.IP] has joined #code |
06:11 | | celticminstrel [celticminst@Nightstar-6pf18d.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:26 | | gnolam_ [lenin@Nightstar-rhnl04.cust.bredbandsbolaget.se] has joined #code |
06:28 | | gnolam [lenin@Nightstar-rhnl04.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds] |
06:31 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds] |
06:36 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code |
06:37 | | mode/#code [+o Orthia] by ChanServ |
06:40 | | Kindamoody[zZz] is now known as Kindamoody |
06:54 | | Harlow [harlow@Nightstar-04f.4po.201.71.IP] has quit [[NS] Quit: BED] |
06:57 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds] |
07:02 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code |
07:02 | | mode/#code [+o Orthia] by ChanServ |
07:16 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds] |
07:21 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code |
07:21 | | mode/#code [+o Orthia] by ChanServ |
07:35 | | ErikMesoy|sleep is now known as ErikMesoy |
07:50 | | macdjord [macdjord@Nightstar-7rac1r.mc.videotron.ca] has quit [Connection reset by peer] |
07:51 | | macdjord [macdjord@Nightstar-7rac1r.mc.videotron.ca] has joined #code |
07:51 | | mode/#code [+o macdjord] by ChanServ |
08:21 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
08:23 | | macdjord is now known as macdjord|slep |
09:32 | | Thalass is now known as Thalass|KSP |
09:36 | <&jeroud> | What is a hover event? |
09:45 | | Kindamoody is now known as Kindamoody|afk |
10:02 | <&McMartin> | jeroud: When the mouse is pointed at you but no buttons are down |
10:08 | <&jeroud> | Ah. |
10:09 | <&jeroud> | I've always just used move events (with "enter" and "leave" for widgets) for that. |
10:10 | <@froztbyte> | wut |
10:10 | <@froztbyte> | jerithwebs |
10:10 | <@froztbyte> | impossibru!~ |
10:12 | <&McMartin> | jeroud: Right, but presumably you generally had a global viewpoint instead of an object-based one |
10:13 | <&McMartin> | I'd like to declare Monocle objects "clickable". basically, which means "do this callback if a click event happens on top of you, whatever that means right now" |
10:14 | <&jeroud> | McMartin: That's what the "enter" and "leave" events were for. Hover does make more sense, though. |
10:15 | <&McMartin> | All are useful. |
10:15 | <&McMartin> | IIRC GM:S has each of these |
10:15 | <&jeroud> | I'm not sure I'd make that a collision, though. |
10:15 | <&McMartin> | (It also handles double-click detection) |
10:16 | <&jeroud> | If you want a colliding mouse, attach a sprite to it or something. |
10:16 | <@froztbyte> | GM:S? Game Maker? |
10:16 | <&McMartin> | Yeah |
10:16 | <@froztbyte> | that reminds me (tangentially) |
10:16 | <@froztbyte> | I wanted to acquire gunpoint. |
10:16 | <&McMartin> | Yes you do. |
10:16 | <&McMartin> | Gunpoint was fantastic. |
10:16 | <&jeroud> | Although on a higher level, a mouse-controlled sprite is a useful thing. |
10:17 | <&McMartin> | jeroud: Yeah, but that's "poll mouse state during the pre-physics phase" |
10:17 | <&McMartin> | That's already super-easy |
10:17 | <&McMartin> | Well. |
10:18 | <&McMartin> | "super easy" -> "By the time I'm done with this I'll have written a book, and maybe I should just be breaking out Docbook right now" |
10:18 | <&McMartin> | Ophis's docs are 76 pages long |
10:19 | <&jeroud> | Isn't there better book-writing markup than docbook yet? |
10:19 | <@froztbyte> | McMartin: :< |
10:19 | <@froztbyte> | McMartin: you also remind me that I still need to give LYAM more attention |
10:20 | <&jeroud> | I usually use Sphinx these days. |
10:20 | <@froztbyte> | (LYAM is <https://github.com/froztbyte/learnyouamonitoring>) |
10:20 | <&jeroud> | reST isn't the nicest, but Sphinx's facilities for building API documentation are quite nice. |
10:21 | <&McMartin> | Right |
10:21 | <&McMartin> | API documentation is not really the issue here |
10:21 | <&McMartin> | It's recording what the model of execution is |
10:22 | <&jeroud> | Sure, but a complete set of documentation includes (and links to) API docs. |
10:22 | <&McMartin> | Yes |
10:23 | <&McMartin> | That part *isn't going to be the problem* |
10:23 | <&McMartin> | Ophis has about 5 of its pages as that. |
10:23 | <&McMartin> | All the rest is "how are you supposed to use this stuff" |
10:23 | <&jeroud> | I'm not sure if there's an autodoc thing for not-Python, though. |
10:24 | <&jeroud> | I'm pretty sure there's no doctest stuff for not-Python. |
10:26 | <&McMartin> | I think my next thing to do is to try to write a C++ wrapper that completely hides the event loop |
10:27 | <&McMartin> | (Which is to say, you construct a bunch of objects and then call Monocle::go() and it returns once the MNCL_QUIT event happens; everything else is method calls against interfaces you prepared earlier that match up with your JSON specs.) |
10:41 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds] |
10:46 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code |
10:46 | | mode/#code [+o Orthia] by ChanServ |
11:00 | | Ozzy{Away} is now known as Ozzy |
11:54 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
12:44 | <&jeroud> | McMartin: You can do that in C with callbacks. |
12:46 | | macdjord|slep [macdjord@Nightstar-7rac1r.mc.videotron.ca] has quit [Connection reset by peer] |
12:46 | | macdjord|slep [macdjord@Nightstar-7rac1r.mc.videotron.ca] has joined #code |
12:46 | | mode/#code [+o macdjord|slep] by ChanServ |
12:47 | <&McMartin> | Yes you can |
12:47 | <&McMartin> | Monocle explicitly chooses not to so that it can be more easily be bound to FFIs. |
12:48 | <&McMartin> | C++ however is ABI-compatible with C and thus can trivially produce a pure callback system that looks to the rest of the C++ application like virtual function calls. |
12:50 | <&McMartin> | (It also lets you decouple kinds from classes, which turns out to be good) |
12:58 | | Attilla [uid13723@Nightstar-ed0oqj.irccloud.com] has joined #code |
13:05 | <&jeroud> | McMartin: I'm thinking more along the lines of a layer on top of core Monocle that FFIs can either use (if callbacks are convenient) or ignore. |
13:06 | <&McMartin> | I am not yet convinced this buys me anything. |
13:08 | <&jeroud> | Would it be a useful interface for writing games in C? |
13:09 | <&McMartin> | I do not believe so; raw event loop processing is the most natural way to do it in C, which is also why X, Win32, and SDL all do this. |
13:09 | <&McMartin> | There is a great deal hiding under that "event loop processing" though. |
13:11 | <&McMartin> | (Callback registration would make more sense if the system were not so heavily object-based already. C's lack of closures mean the API would be "repeating itself", with two places to stash state. Kind of icky.) |
13:45 | <&McMartin> | And as is typical the act of documenting the API reveals multiple holes in it. |
14:01 | | Thalass|KSP is now known as Thalasleep |
14:28 | | Kindamoody|afk is now known as Kindamoody |
15:09 | | Desktop_Caboose [IceChat9@Nightstar-amo6n4.abhsia.telus.net] has quit [[NS] Quit: Relax, its only ONES and ZEROS!] |
15:23 | <&McMartin> | Blergh. OK, that's a draft. |
15:23 | <&McMartin> | https://github.com/michaelcmartin/monocle/blob/master/doc/api.md |
15:23 | | * jeroud reads. |
15:24 | <&McMartin> | Looks like I do need to clear out some cross-references to the old organization of the file. |
15:24 | <&McMartin> | This is like take four for organization |
15:26 | <&McMartin> | (Things that are missing: mncl_post_quit was never implemented, nor was mncl_destroy_object. mncl_create_object also modifies iterators in an unsafe way if you create an object during the render phases.) |
15:28 | <&jeroud> | Your resource map specification example is missing a comma. |
15:29 | <&jeroud> | (The syntax highlighting points that out.) |
15:29 | <&McMartin> | There are a lot of those. |
15:30 | <&McMartin> | Which one? |
15:30 | <&McMartin> | The "..." is illegal, yes |
15:31 | <&McMartin> | Ah, for kinds |
15:32 | <&jeroud> | The first one. |
15:48 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds] |
15:53 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code |
15:53 | | mode/#code [+o Orthia] by ChanServ |
16:03 | | celticminstrel [celticminst@Nightstar-6pf18d.dsl.bell.ca] has joined #code |
16:03 | | mode/#code [+o celticminstrel] by ChanServ |
16:34 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
16:34 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
16:44 | | Kindamoody is now known as Kindamoody|afk |
16:48 | | Turaiel[Offline] is now known as Turaiel |
17:33 | | Turaiel [Brandon@Nightstar-vku52k.resnet.mtu.edu] has quit [Ping timeout: 121 seconds] |
17:46 | | Turaiel[Offline] [Brandon@Nightstar-vku52k.resnet.mtu.edu] has joined #code |
17:48 | | macdjord|slep is now known as macdjord |
18:12 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
18:18 | | Turaiel[Offline] is now known as Turaiel |
18:25 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
18:25 | | mode/#code [+o himi] by ChanServ |
18:27 | | ErikMesoy [Erik@Nightstar-jffd2p.80-203-16.nextgentel.com] has quit [[NS] Quit: Reboot] |
18:36 | | gnolam_ is now known as gnolam |
18:36 | | mode/#code [+o gnolam] by ChanServ |
18:55 | | ErikMesoy [Erik@Nightstar-jffd2p.80-203-16.nextgentel.com] has joined #code |
18:55 | | mode/#code [+o ErikMesoy] by ChanServ |
19:11 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
19:30 | | Derakon[AFK] is now known as Derakon |
19:38 | | Lappy-Caboose [IceChat9@Nightstar-amo6n4.abhsia.telus.net] has quit [Ping timeout: 121 seconds] |
19:39 | | Lappy-Caboose [IceChat9@Nightstar-amo6n4.abhsia.telus.net] has joined #code |
19:47 | | Kindamoody|afk is now known as Kindamoody |
19:50 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
20:03 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
20:03 | | mode/#code [+o himi] by ChanServ |
20:07 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
20:29 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds] |
20:33 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
20:33 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code |
20:33 | | mode/#code [+o Orthia] by ChanServ |
20:46 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
20:46 | | mode/#code [+o himi] by ChanServ |
21:00 | | Kindamoody is now known as Kindamoody[zZz] |
21:14 | | * ErikMesoy swears at scope as his view object accesses "self.Control.data.ActiveText". |
21:15 | <@ErikMesoy> | Can't figure out how to make a created View object know about an externally created Control object in a sane way that doesn't involve globals or worse, and the Control object shouldn't have undifferentiated direct attributes, and every component of that access feels reasonable, but the composite and several like it hurt to look at. |
21:22 | | Turaiel is now known as Turaiel[Offline] |
21:23 | | * ErikMesoy wishes Python would try self.Method() if the call to Method() finds nothing. |
21:25 | <@ErikMesoy> | Out of curiosity, what would it break to look in personal scope that way if global scope fails? |
21:39 | | gnolam_ [lenin@Nightstar-rhnl04.cust.bredbandsbolaget.se] has joined #code |
21:41 | | gnolam [lenin@Nightstar-rhnl04.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds] |
21:47 | <~Vornicus> | It's a little complicated. For one thing, "self" isn't a reserved word or anything. It's just the convention to name it that. Python actually doesn't know when you've called something as a method. |
21:54 | <@ErikMesoy> | Hmm. Well, what breaks if an attempt to use Foo falls through on failure to an attempt to use MyParentObject.Foo? Regardless of whether Foo is method or variable, and I think the naming of "self" becomes irrelevant here too. |
21:56 | <&jerith> | ErikMesoy: The entire execution model would have to change for that. |
21:56 | <~Vornicus> | What parent object? How can it tell? |
21:57 | <~Vornicus> | The only way a called method differs from a called function is the identity of one of the parameters |
21:58 | <@ErikMesoy> | Vornicus: How does it tell what "self" is referring to? |
21:58 | <~Vornicus> | It's passed in |
21:59 | <~Vornicus> | You can make a regular function, attach it afterwards to an object, and call it and there's nothing differentiating it from a method that's been on there the whole time. |
22:00 | <@ErikMesoy> | I see. |
22:05 | | gnolam [lenin@Nightstar-rhnl04.cust.bredbandsbolaget.se] has joined #code |
22:05 | | mode/#code [+o gnolam] by ChanServ |
22:06 | | gnolam_ [lenin@Nightstar-rhnl04.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds] |
22:12 | <@ErikMesoy> | Getting very frustrated here trying to respect object-orientation and MVC separation and not having a god object. |
22:16 | <@ErikMesoy> | Why is it that __init__() can create new self.whatever attributes, but if I create an object at the IDLE command and try to give it attributes, I get "no such attribute" errors? |
22:16 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds] |
22:21 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code |
22:21 | | mode/#code [+o Orthia] by ChanServ |
22:21 | <&jerith> | ErikMesoy: You can add arbitrary attributes to custom objects, but not instances of object(). |
22:24 | <@ErikMesoy> | ...even when the custom objects are just "Class(object): pass" wrappers. I see. |
22:25 | <&jerith> | No, the latter should work. |
22:25 | <@ErikMesoy> | Yes. It does. |
22:26 | <&jerith> | >>> class Foo(object): pass |
22:26 | <&jerith> | ... |
22:26 | <&jerith> | >>> foo = Foo() |
22:26 | <&jerith> | >>> foo.bar = 1 |
22:26 | <&jerith> | >>> foo.bar |
22:26 | <&jerith> | 1 |
22:26 | <&jerith> | >>> |
22:26 | <&jerith> | >>> bar = object() |
22:26 | <&jerith> | >>> bar.bar = 1 |
22:26 | <&jerith> | Traceback (most recent call last): File "<stdin>", line 1, in <module> |
22:26 | <&jerith> | AttributeError: 'object' object has no attribute 'bar' |
22:28 | <@ErikMesoy> | Yes. This is what I get too. |
22:30 | <&jerith> | Oh, I misunderstood. |
22:33 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds] |
22:38 | | Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code |
22:38 | | mode/#code [+o Orthia] by ChanServ |
22:45 | | Syka [the@Nightstar-d16r4u.vividwireless.net.au] has quit [Connection reset by peer] |
22:45 | | Syka [the@Nightstar-d16r4u.vividwireless.net.au] has joined #code |
22:47 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
22:57 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds] |
23:00 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
23:00 | | mode/#code [+o himi] by ChanServ |
23:01 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code |
23:01 | | mode/#code [+o Reiv] by ChanServ |
23:19 | | Turaiel[Offline] is now known as Turaiel |
--- Log closed Mon Aug 18 00:00:39 2014 |