--- Log opened Sat Jun 23 00:00:36 2012 |
00:04 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
00:30 | | Derakon[AFK] is now known as Derakon |
00:55 | | You're now known as TheWatcher[T-2] |
01:08 | | You're now known as TheWatcher[zZzZ] |
01:31 | < celticminstrel> | I've come to the conclusion that it's generally easier to throw strings rather than exception classes. <_< |
01:33 | < Rhamphoryncus> | I've come to the conclusion that C++ exceptions are stupid. That may just be me though |
01:33 | <&Derakon> | throw RuntimeError("You fucked up, dumbass.") |
01:33 | <&Derakon> | Oh, right, C++. |
01:33 | <&Derakon> | Also in Python it'd be "raise", not "throw". |
01:36 | < Rhamphoryncus> | Let's see, what can I bitch about.. the underlying matching mechanism (which allows arbitrary types, not just exceptions) is stupid.. there's no distinction between out-of-band flow control (file not found? Sure, I can handle that) from unrecoverable errors (out of memory? We're fucked.) Discouraging you from having memory allocation (ie any real types) in exceptions is a consequence of not having that distinction |
01:37 | < Rhamphoryncus> | What else? |
01:37 | < Rhamphoryncus> | Oh, performance. If you had that distinction you could make the handled case much faster, so people wouldn't avoid it |
01:45 | | * McMartin eyes the Google Doodle |
01:45 | <&McMartin> | 17:32 < Rhamphoryncus> I've come to the conclusion that C++ exceptions are stupid. That may just be me though |
01:45 | <&McMartin> | It's not just you. C++ exceptions are awful in all kinds of horrible surprising ways and different compilers do different stupid things. |
01:47 | < celticminstrel> | Heh. |
01:48 | < sshine> | I wonder if anyone ever did a humouristic piece on how exceptions are treated with metaphors. handling, throwing, catching, raising, etc. |
01:49 | | Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code |
01:49 | | mode/#code [+o Vash] by ChanServ |
01:51 | | Derakon is now known as Derakon[AFK] |
01:53 | <&McMartin> | My favorite exception-related special form is "unwind-protect" |
01:54 | < Rhamphoryncus> | that's the same one as python's with-statement, right? |
01:54 | < Rhamphoryncus> | or RAII |
01:55 | <&McMartin> | I forget whether it's that or a more general "finally" mechanism. |
01:55 | < Rhamphoryncus> | Well, yeah |
01:55 | <&McMartin> | It's a LISP thing but I do not recall if it predates CLOS |
01:55 | <&McMartin> | In other news, Common LISP actually kind of cheeses me off. |
01:56 | < Rhamphoryncus> | I've got one notable use of RAII. I hate it. I have a "SDLContext" type declared at the top of my function.. that magically initializes/deinitializes SDL |
01:56 | < celticminstrel> | Heh. I did something like that too. |
01:56 | <@ToxicFrog> | McMartin: why so? |
01:56 | < Rhamphoryncus> | Maybe there's a naming convention that doesn't suck? |
01:56 | <@ToxicFrog> | (it kind of annoys me too, but I'm interested in your reasons) |
01:56 | <&McMartin> | Yeah, RAINI, but it's an acceptable hack if your language has precise destructors and lacks the with-statement method-pairer. |
01:56 | <&McMartin> | Which is pretty much only C++. |
01:57 | <&McMartin> | ToxicFrog: Its culture is noticably more imperative than I like - not only for LISPs but just in general. |
01:57 | <&McMartin> | There's about a half-dozen namespaces where you can hide dictionaries for each symbol |
01:57 | <&McMartin> | And that's even before you get into "it's a Lisp-2, and those are awful" |
01:58 | < Rhamphoryncus> | I think it's decent if it's not global state. Opening a file? Sure. Initializing a library that you access without going through that object? Fuck no |
01:58 | <&McMartin> | (That is, functions and variables are in different namespaces) |
01:58 | <@ToxicFrog> | (that was the first thing I encountered about clisp and it drove me up the fucking wall, then and now. Thank you for naming it.) |
01:58 | <&McMartin> | (You don't see the term "Lisp-2" often and I may have that name wrong. However, the ones that do it right are "Lisp-1"s, including Scheme and Clojure.) |
01:59 | <@ToxicFrog> | (I've actually been looking around for Lisp learning resources that aren't SICP. 4clojure is alright but seems to expect to be paired with some other resource and I can't figure out what.) |
02:00 | <&McMartin> | (Let me do some digging in my library.) |
02:00 | <@ToxicFrog> | (I recently found Land of Lisp, which I kind of like the concept of but holy shit it does not waste time reminding me of everything I dislike about clisp) |
02:00 | <&McMartin> | (I have a quite good Common LISP tutorial, but it also doesn't waste that time) |
02:00 | <@ToxicFrog> | (and it's a wee bit pretentious~) |
02:00 | <&McMartin> | (Because clisp is culturally super-imperative.) |
02:00 | <&McMartin> | (I recently picked up the O'Reilly Clojure book) |
02:00 | < Tarinaky> | http://www.youtube.com/watch?v=r3wDnOAjrtk |
02:01 | <@ToxicFrog> | (yeah, the first exercise is basically "welcome to using mutable global state in all the wrong ways") |
02:01 | < Tarinaky> | A whistle stop tour through OSS game APIs. |
02:01 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [[NS] Quit: Well, most things get better when I kick them!] |
02:01 | <&McMartin> | (It's missing one kind of important "secret" thing in the language, and I want to see what it does offer) |
02:01 | <@ToxicFrog> | (part of the issue here is that I know a bit of common lisp and scheme and emacs lisp and clojure but I'm not really comfortable in any of them) |
02:01 | <&McMartin> | (But that secret thing is, well, not part of Clojure proper - you use the JVM interop to pull it out of clojure/core) |
02:01 | <@ToxicFrog> | (what is that secret thing?) |
02:02 | <&McMartin> | (However, that thing is the damned queue type, which they really ought to be exporting, ffs) |
02:02 | <@ToxicFrog> | |
02:02 | <&McMartin> | (Queues are, admittedly, highly imperative, so it's *rare* to need functional queues. But ffs it *has* them) |
02:02 | <&McMartin> | (And once you construct it with JVM interop you can use all the standard seq operations on them.) |
02:03 | <&McMartin> | (Of those four I'm only currently even slightly comfortable in Scheme - but Scheme lacks a lot of important abstraction tools by default so at that point you're in the Land Of Thousands Of Incompatible Dialects) |
02:03 | <&McMartin> | (It's a pointy edge.) |
02:04 | <&McMartin> | (I want to see how Clojure handles that 'for real' as opposed to the 'maps with keywords and map destructuring syntax, which are AWESOME WOOHOO OVERUSE AHOY') |
02:05 | <&McMartin> | (clips has like six ways of doing it, all of which are painfully imperative, one of which tracks the traditional Scheme way of doing things, and all of which are more than a little bit uncomfortable at my fingertips.) |
02:05 | < Rhamphoryncus> | maybe rather than SDLContext I'll name it SDLInitializationHandle :P |
02:05 | <&McMartin> | (Er, clisp) |
02:05 | <&McMartin> | SDLSystem might work too =D |
02:05 | < Rhamphoryncus> | Naw, too vague |
02:06 | < Rhamphoryncus> | What I really want, I suppose, is to make it require a function argument. Obvious that it's scoped |
02:06 | <@ToxicFrog> | Yeah, for those reasons I have a suspicion that Clojure may end up being the first lisp I become fluent in |
02:06 | <@ToxicFrog> | Especially if the clojure-clr stuff gets improved |
02:06 | <&McMartin> | What little I've used of it so far I've liked quite a bit. |
02:07 | <&McMartin> | I'm going to race through the basics and then refresh a bit of Java knowledge, then see if I can do a graphical demo in Clojure via java.awt.Graphics2D |
02:07 | <&McMartin> | This was where I found I needed functional queues -_- |
02:08 | <&McMartin> | (The plan was to reimplement Mystify.) |
02:09 | <&McMartin> | In terms of "things I might want to actually use", a NES tile editor might be pretty boss. |
02:09 | <~Vornicus> | Mystify? |
02:09 | <&McMartin> | Mystify is an old stock Windows screensaver that looks kind of like the eponymous Qix. |
02:09 | <~Vornicus> | oh that thing, ok |
02:10 | <@ToxicFrog> | McMartin: let me know how it goes, GUIs in Java have brought me nothing but pain |
02:10 | <@ToxicFrog> | And now, food |
02:10 | <&McMartin> | Yeah, this wouldn't be a real GUI, just a display panel |
02:10 | <&McMartin> | I want to clock Clojure's FPS without going out to OpenGL, basically. |
02:11 | <&McMartin> | "Draw ten lines a frame and rotate through HSV space" seems like a decent startpoint for that. |
02:16 | <&McMartin> | The big :gonk: about Clojure is that there's some subtlety about which operations are lazy and which aren't, and the lack of implicit tail recursion. |
02:16 | <&McMartin> | The latter can be worked around, but you basically have to do tail call elimination "by hand" |
02:17 | <&McMartin> | One of these things (loop-recur) is functionally equivalent to the normal use case for one of Scheme's more exotic (and mighty) control-flow structures (the continuation-based "named let"), so that's fine. |
02:17 | <&McMartin> | The Trampoline system is, however, kind of dickish even though the reader macros make it not tremendously painful. |
02:18 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
02:18 | <&McMartin> | They say they don't want to add proper tail call elimination until the underlying VM can do it outright, but I honestly see no reason why they can't just do a source-to-source from proper tail calls to the current system - with one exception. |
02:19 | <&McMartin> | (You can't have a chain of tail calls return a function in Clojure - this is the only effective restriction.) |
02:22 | < celticminstrel> | Hm... would there exist a monitor on any relatively recent computer that can do neither 800x600 resolution nor a resolution with strictly larger dimensions (not necessarily the same aspect ratio)? |
02:24 | <~Vornicus> | iirc Vash's netbook is 1024x600, which is close. |
02:24 | <~Vornicus> | If your computer is running off an SD TV you're stuck at I think 640x480 effective |
02:24 | < celticminstrel> | ...I said "strictly" when I didn't mean it. |
02:24 | < celticminstrel> | >= |
02:25 | < celticminstrel> | 1024x600 fits the criteria. 640x480doesn't, obviously. |
02:25 | < celticminstrel> | ^add space |
02:38 | <@Alek> | well, SD tvs are either 640x480 or I think rather 480x320. |
02:38 | <@Alek> | 640x480 is standard vga format, maybe. |
02:50 | | * gnolam pahs at your puny NTSC |
02:52 | | Kindamoody[zZz] is now known as Kindamoody |
02:57 | <@ToxicFrog> | Some netbooks are 800x480, although not, I think, any of the "latest" models |
03:09 | | Attilla [Obsolete@Nightstar-ee4c9094.as43234.net] has quit [Ping timeout: 121 seconds] |
03:09 | < celticminstrel> | Those are larger? |
03:09 | < celticminstrel> | Or... smaller...? |
03:29 | <@ToxicFrog> | More recent ones are higher resolution. |
03:36 | < celticminstrel> | Why is my screen going white after entering fullscreen mode... |
03:36 | < celticminstrel> | Until I press a key. |
03:36 | < celticminstrel> | And yes, I'm redrawing after entering fullscreen. |
03:41 | | * Tarinaky kindof wants to stop working on this project now and do something else but promised himself he'd finish it >.> |
03:43 | < Rhamphoryncus> | celticminstrel: focus bug? |
03:43 | < celticminstrel> | Huh? |
03:43 | < Rhamphoryncus> | OS not treating you as visible until you get some input, which forces it to rethink |
03:44 | < celticminstrel> | I dunno...? |
03:44 | < celticminstrel> | It didn't happen when I changed the resolution to enter fullscreen, only when I leave the resolution the same. |
03:45 | < Rhamphoryncus> | Yeah, it's just a wild guess |
03:46 | < Rhamphoryncus> | Does that imply a window resize? Is the event not processed until a keyboard event? |
03:46 | < celticminstrel> | Oh wait, it actually is happening when I change the resolution; it's just that in that case mouse move is sufficient to force it to display, so I hadn't noticed it the first time. |
03:47 | < Rhamphoryncus> | Or a new context of some sort and when you change resolution you reset it properly |
03:47 | < celticminstrel> | Well, I guess there would be a new context... |
03:48 | < celticminstrel> | Is which event not processed until keypress? |
03:50 | < Rhamphoryncus> | something related to resize, resolution change, or context change :) |
03:51 | < celticminstrel> | The one with a resolution change maintains the size of the window; the other one doesn't, but centres the original window area in the middle of the screen. |
03:51 | < celticminstrel> | So the effective drawable area is the same even if the window size isn't. |
03:53 | | * Rhamphoryncus nods |
03:53 | < Rhamphoryncus> | All I know is that stuff tends to be very finicky :/ |
03:53 | < Rhamphoryncus> | and that it's time for me to attempt sleep ;) |
03:53 | < Rhamphoryncus> | *poof* |
03:53 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited] |
03:59 | < celticminstrel> | Oh. I just needed to set the new window as the active context. |
04:01 | < celticminstrel> | The mouse doesn't work though (probably because it needs to be adjusted for the fact that the "top left" is no longer the actual top left). |
04:04 | < celticminstrel> | But I can fix that later I guess. |
04:19 | < Tarinaky> | I'd probably like Python more if I wasn't deathly scared of Exceptions. |
04:24 | < Tarinaky> | For some reason I just don't think of using them... |
04:33 | <@rms> | Python loves exceptions |
04:34 | <@rms> | CTRL+C is an Excelption |
04:35 | | * celticminstrel doesn't really have a problem with that. |
04:43 | < Tarinaky> | For some reason I tend to view Python's exceptions as... well... runtime errors. |
04:43 | < Tarinaky> | Which granted, they are. |
04:43 | < Tarinaky> | I blame my time spent doing C/C++ where exceptions are bad mmkay :p |
04:45 | < Tarinaky> | I kindof want to stop this project even though I promised myself I'd finish it. |
04:45 | < Tarinaky> | I've learned... a lot >.> |
04:52 | < Tarinaky> | Also pretty sick of python, lol. |
05:22 | | iospace is now known as iospacedout |
05:47 | | Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!] |
05:51 | < Tarinaky> | Python question~ ... What should I be looking at if I want to implement a debug console to allow me to execute arbitrary python/change objects? |
05:52 | <~Vornicus> | "input" is your friend for that, but note that it uses eval |
05:53 | <~Vornicus> | that's pythoin2 |
05:53 | < Tarinaky> | Yeah, I'm using python2. |
05:53 | < Tarinaky> | When you say input, what do you mean? |
05:54 | < celticminstrel> | input("prompt") |
05:54 | <~Vornicus> | there's a function called input |
05:54 | < celticminstrel> | Asks the user for input, evaluates it as a Python expression, and returns the result. |
05:55 | < Tarinaky> | Ah hah. |
05:56 | < Tarinaky> | It's not a command line program though. Is it not worth the effort of sticking a widget in? |
06:06 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
07:11 | | Kindamoody is now known as Kindamoody|afk |
07:24 | | Derakon[AFK] is now known as Derakon |
07:51 | | Derakon is now known as Derakon[AFK] |
08:36 | | Kindamoody|afk is now known as Kindamoody |
09:12 | | You're now known as TheWatcher |
09:14 | | Kindamoody|afk [Kindamoody@Nightstar-5846a78a.cust.tele2.se] has joined #code |
09:14 | | mode/#code [+o Kindamoody|afk] by ChanServ |
09:16 | | Kindamoody [Kindamoody@Nightstar-6154a72a.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
09:16 | | Kindamoody|afk is now known as Kindamoody |
09:50 | | Kindamoody is now known as Kindamoody|afk |
10:08 | <&McMartin> | Hm, OK, I guess that's why Clojure hasn't exported queues yet. |
10:08 | <&McMartin> | Functional collections are still hilariously awesome though. |
10:09 | <&McMartin> | user=> (def a clojure.lang.PersistentQueue/EMPTY) |
10:09 | <&McMartin> | #'user/a |
10:09 | <&McMartin> | user=> (def b (into a ['a 'b 'c 'd 'e 'f 'g])) |
10:09 | <&McMartin> | #'user/b |
10:09 | <&McMartin> | user=> (seq b) |
10:09 | <&McMartin> | (a b c d e f g) |
10:09 | <&McMartin> | user=> (peek b) |
10:09 | <&McMartin> | a |
10:09 | <&McMartin> | user=> (pop b) |
10:09 | <&McMartin> | #<PersistentQueue clojure.lang.PersistentQueue@236cb8d8> |
10:09 | <&McMartin> | user=> (def c (conj (pop (pop b)) 'h)) |
10:09 | <&McMartin> | #'user/c |
10:09 | <&McMartin> | user=> (seq c) |
10:09 | <&McMartin> | (c d e f g h) |
10:09 | <&McMartin> | user=> (seq b) |
10:09 | <&McMartin> | (a b c d e f g) |
10:09 | <&McMartin> | I shouldn't have to be explicitly casting to "seq" there. |
10:38 | | Kindamoody|afk [Kindamoody@Nightstar-5846a78a.cust.tele2.se] has quit [[NS] Quit: See you in some hours, I'm going offline.] |
10:46 | | Orthia is now known as Reivthia |
10:51 | | You're now known as TheWatcher[afk] |
12:10 | | Attilla [Obsolete@Nightstar-ee4c9094.as43234.net] has joined #code |
13:37 | | iospacedout is now known as iospace |
13:54 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
14:54 | | celticminstrel [celticminst@1526F6.37AB0D.97233B.788A64] has joined #code |
14:55 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
15:15 | | iospace is now known as io|gone |
15:30 | | You're now known as TheWatcher |
15:44 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code |
18:42 | | io|gone is now known as iospace |
19:39 | | Kindamoody [Kindamoody@Nightstar-6154a72a.tbcn.telia.com] has joined #code |
19:39 | | mode/#code [+o Kindamoody] by ChanServ |
19:50 | | celticminstrel [celticminst@1526F6.37AB0D.97233B.788A64] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
20:00 | | ShellNinja is now known as Nikolaas |
20:02 | | rms is now known as Masako |
20:09 | | Attilla_ [Obsolete@Nightstar-835f7a04.as43234.net] has joined #code |
20:09 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds] |
20:10 | | Attilla [Obsolete@Nightstar-ee4c9094.as43234.net] has quit [Ping timeout: 121 seconds] |
20:22 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
20:22 | | mode/#code [+o himi] by ChanServ |
20:25 | | Kindamoody is now known as Kindamoody[zZz] |
21:56 | | Derakon[AFK] is now known as Derakon |
22:26 | < Tarinaky> | Does anyone have any experience with Mylyn? |
23:10 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code |
23:33 | | Masako is now known as rms |
23:34 | | Nikolaas is now known as ShellNinja |
23:43 | < celticminstrel> | I wish I could overload operator-> for enum types. :/ |
23:50 | < celticminstrel> | Oh, minor Xcode update. |
23:55 | < celticminstrel> | ...it's taking forever to install and the time estimate is all over the map. |
--- Log closed Sun Jun 24 00:00:49 2012 |