--- Log opened Mon Jan 21 00:00:13 2008 |
00:49 | <@gnolam> | Hmm. This is the /third/ time tonight I've written "end it;" instead of "end if;". I believe this horrible language is affecting my mental health. |
00:49 | < McMartin> | What language is this? |
00:50 | <@gnolam> | Ada, which I currently have to do a tiny bit of. But soon I'll have to do some work in VHDL again, and it has the same awful syntax. Yay. :P |
00:52 | < Doctor_Nick> | yeah, ada is pretty irritating |
00:52 | <@gnolam> | But I shouldn't /really/ have to worry until I see that I've written something like "end it, KILL KILL KILL THEM ALL;" at the end of a procedure, right? |
00:53 | < Doctor_Nick> | I dunno, the "f" and the "t, KILL KILL KILL THEM ALL;" keys are right next to eachother |
01:03 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z?] |
05:02 | | Finerty is now known as Vornicus |
05:56 | < McMartin> | Rargh |
05:56 | < McMartin> | TextWrangler is not working |
05:56 | < McMartin> | It is just bouncing up and down in the dock |
05:58 | < Vornicus> | that is odd and wrong. |
05:58 | < McMartin> | It is the second application to do this, as well. |
05:58 | | * McMartin reboots. |
05:59 | < Vornicus> | What was the other? |
06:00 | < McMartin> | Atlantis, a MU* client. |
06:00 | < Vornicus> | hrm. |
06:01 | | * Vornicus doesn't know, then. |
06:01 | < McMartin> | And now it works. |
06:03 | < Vornicus> | weird. |
06:03 | < Vornicus> | I'd check console ( /Applications/Utilities/Console.app ) - it tails error.log and so forth. |
06:03 | < McMartin> | Yeah. |
06:04 | < McMartin> | There wasn't anything interesting there at all |
06:04 | < Vornicus> | (it will actually tail any file you tell it to open) |
06:04 | < McMartin> | Something must have just been deadlocked. |
06:04 | < Vornicus> | yeh |
06:06 | | Vornicus is now known as Vornicus-Latens |
06:10 | < McMartin> | And now Atlantis works too. |
06:12 | < Doctor_Nick> | whaaaaaaaaaaaaaaattttt |
06:12 | < Doctor_Nick> | perl6 is out?! |
06:12 | < Doctor_Nick> | oh |
06:13 | < McMartin> | Isn't there an implementation of it in Haskell or something? |
06:13 | < Doctor_Nick> | probably |
06:14 | < Doctor_Nick> | everything is getting implemented in haskell nowadays |
06:14 | < Doctor_Nick> | "LETS IMPLEMENT C IN HASKELL!!!!!" "BRILLIANT!!!!" |
06:15 | < McMartin> | Been there |
06:15 | < McMartin> | Though it was really ML without state. |
06:16 | < Doctor_Nick> | my project for computer architecture was designing a machine without registers and we did that, sort of |
06:17 | < McMartin> | By "without registers" does that mean "pure memory architecture" or "accumulator architecture"? |
06:17 | < Doctor_Nick> | eh, we kind of fudged a little |
06:18 | < Doctor_Nick> | its similar to a pentium pro-style architecure with out of order execution, so we had a reorder buffer and some "fetch" registers |
06:18 | < Doctor_Nick> | but there was no architecture register file |
06:19 | < McMartin> | So, three-address code all around, then? |
06:19 | < Doctor_Nick> | the data for instructions would refer to however many instructions back an instruction was |
06:19 | < Doctor_Nick> | er |
06:20 | < Doctor_Nick> | so when the instruction resolved, the data would be stored in the rob and then would be forwarded to the instruction that needed it |
06:20 | < Doctor_Nick> | it was mostly 2-address |
06:22 | < Doctor_Nick> | it was a very simple instruction set, it had add, nand, beq, jump, load word, store word, a few others i forget |
06:23 | < McMartin> | All you really need is Subtract and Branch If Negative! |
06:23 | < Reiver> | Haskell? |
06:24 | < McMartin> | Though I forget the proof that SBN alone is Turing Complete. |
06:24 | < McMartin> | But it is~ |
06:24 | < McMartin> | Reiver: A highly theoretical programming language. |
06:24 | < Doctor_Nick> | my friend is absolutely bonkers for haskell |
06:25 | < Reiver> | ...Theoretical? |
06:25 | < McMartin> | "Designed to assist in researching questions involving the nature of programming itself" |
06:25 | < McMartin> | And in writing programs you can reason about at a high level |
06:25 | < McMartin> | It thus eschews things like assignable variables. |
06:26 | < McMartin> | Which, as it turns out, slows one down surprisingly little |
06:26 | < McMartin> | (Which perhaps should not be *too* much of a surprise, as the second programming language ever devised was similar) |
06:26 | < Reiver> | ...wait, what? |
06:27 | < McMartin> | Instead of a variable being a chunk of memory you can futz with, a variable is a placeholder for a value, bound by either the initiation or conclusion of a function call. |
06:27 | < McMartin> | In C, this function performs no variable assignment: |
06:27 | < McMartin> | int fact (x) { if (x < 2) return x; else return x * fact (x-1); } |
06:28 | < Doctor_Nick> | McMartin: You mean lisp? |
06:28 | < McMartin> | Doctor_Nick: Yes. And I'm aware that I'm cheating, since LISP 1.5 was pretty stateful all around. |
06:28 | < Reiver> | ...I think I begin to see. |
06:29 | < Doctor_Nick> | well, you might want to clarify that it was the 2nd high level programming language :P |
06:29 | < McMartin> | That's questionable too, given how primitive both FORTRAN and LISP were at first~ |
06:30 | < McMartin> | Not to mention that a lot of the weirdly-named bits of LISP are transported assembler instructions. |
06:31 | < Doctor_Nick> | im going by the definition of high-level meaning "everything above assembly language" |
06:31 | < McMartin> | ... the line between early FORTRAN and a decent macro-assembler is very thin indeed. |
06:32 | < McMartin> | And that's not even getting into architectures where assemblers are expected to statically reorder assembled code so as to make it work on the hardware. |
06:33 | < Doctor_Nick> | haha, yeah |
06:34 | | * Reiver winces. |
06:34 | | * Reiver decides he'll try to stick to the high level stuff, for the low-level stuff keeps hurting his brain~ |
06:34 | | * McMartin is honor-bound to defend the technique since both his alma maters were involved with creating the most famous example |
06:34 | < Doctor_Nick> | Reiver: low-level stuff better helps you understand the high-level stuff :P |
06:35 | < McMartin> | It helps you understand the medium-level stuff. |
06:35 | < Doctor_Nick> | what do you mean by "medium-level"? |
06:35 | < McMartin> | Knowing assembler of some kind will help your C. |
06:36 | < McMartin> | Knowing C, however, is unlikely to improve your JavaScript much, and it will actively hurt your SML. |
06:37 | < Reiver> | SML? |
06:42 | < Doctor_Nick> | McMartin: Isn't that kind of an apples to oranges comparison? It looks like SML is mostly functional |
06:44 | < McMartin> | But only mostly. |
06:44 | < McMartin> | And yeah, that's generally my point |
06:44 | < Doctor_Nick> | Knowing C would fuck up your lisp, too |
06:44 | < McMartin> | Knowing how a functional language is compiled to a register architecture doesn't help much |
06:44 | < McMartin> | Though if you want to learn it, knowing C will make that easier. |
08:29 | | You're now known as TheWatcher |
09:04 | <@TheWatcher> | Reiver: SML = Standard ML, a functional programming langauge and general low-grade mindfuck for anyone exclusively used to imperative programming. |
09:05 | < Reiver> | imperative programming being C-style? |
09:05 | <@TheWatcher> | Yis |
09:05 | < Reiver> | Python-style also? |
09:05 | < McMartin> | That Depends (tm). |
09:05 | < Reiver> | Right. I was wondering whether I'd get an answer like that. <g> |
09:05 | < McMartin> | Python's list library borrows heavily from the functional side of things. |
09:06 | < McMartin> | The concept of the list comprehension is pretty much what you use instead of loops for most data-heavy stuff |
09:06 | | * TheWatcher haaated SML so much when he was at uni |
09:06 | < McMartin> | "Here's a list. Transform, filter, and collapse it in various ways to get new collections, until you reduce it to the answer." |
09:07 | < McMartin> | I'm actually quite fond of ML, but that's because my native problem domain (Syntax tree analysis) is literally the problem the language was designed to solve. |
09:07 | <@TheWatcher> | Yeah |
09:07 | < McMartin> | I routinely get 90% code size reductions over classical OO. |
09:08 | | * Reiver clearly needs to learn how to wrangle Python-lists to get an idea, then. |
09:08 | < McMartin> | Here's an easy one. |
09:08 | < McMartin> | x = [1, 2, 3, 4, 5] |
09:08 | < McMartin> | Say you instead want the first five *even* integers instead. |
09:08 | < McMartin> | y = [2*i for i in x] |
09:08 | < McMartin> | Or, say, the even numbers less than or equal to 5. |
09:09 | < McMartin> | z = [i for i in x if i % 2 == 0] |
09:09 | < McMartin> | Python doesn't have a handy way of doing folds. |
09:09 | < Reiver> | ...that's a for loop with funny syntax, isn't it? |
09:10 | < McMartin> | For loops are capable of various sorts of heinousness that are guaranteed to not happen here. |
09:10 | < McMartin> | Like modifying earlier elements in the loop |
09:10 | < McMartin> | Or future ones. |
09:10 | < McMartin> | Or reassigning the index. |
09:10 | < McMartin> | etc. etc. etc. |
09:11 | < McMartin> | And no. It, like all control constructs, if IF/THEN/GOTO with funny syntax. =P |
09:11 | < McMartin> | (also, the filter doesn't really map to for since it's selectively removing elements) |
09:11 | < McMartin> | Folds are where you have, say, a list of integers, and you fold with + and 0 and get the sum of the list |
09:12 | < McMartin> | Or * and 1 and get the product. |
09:12 | < McMartin> | Or you fold an entire program, in one case I was using, and get a list of every global variable referenced in it. =P |
09:14 | < McMartin> | Fold a regular expression to get every character that can terminate it |
09:14 | < McMartin> | etc. |
09:14 | | Serah [~Z@87.72.35.ns-26506] has quit [Ping Timeout] |
09:15 | < McMartin> | It's much easier to reason about a problem if you're filtering a list, then mapping it, then accumulating the result than it is to have a loop that goes over a list and selectively computes a function of a global variable, reassigning to it. |
09:16 | < Reiver> | ...er. |
09:16 | | * Reiver rereads that. |
09:17 | < Reiver> | I think I'm failing to understand just how a fold works. |
09:17 | < McMartin> | OK |
09:17 | < McMartin> | Here's an iterative fold with + 0 |
09:17 | < McMartin> | answer = 0; for i in lst: answer = answer + i |
09:18 | < McMartin> | For the full filter -> map -> fold, it's... |
09:18 | < Reiver> | ...ohhhhhh |
09:18 | < McMartin> | answer = x: for i in lst: if f(i) then answer = g(answer, h(i)) |
09:19 | < Reiver> | Okay, I get it. |
09:19 | < McMartin> | What having a lack of updated variables buys you here is a guarantee that no part of the computation except the final fold will stomp on anyone else's part |
09:19 | < McMartin> | And that means that you can partition it out amongst cores, processors, or even distributed computers almost at will. |
09:20 | < Reiver> | ...Isn't it updating the variable, though? |
09:21 | < McMartin> | The iterative version is. |
09:21 | < McMartin> | In the functional version, the filter, the map, and even the fold only ever read their arguments. |
09:21 | < McMartin> | The fold, however, has a chain of operations that all depend on one another. |
09:21 | | * Reiver ponders. |
09:22 | < Reiver> | I... think I see. |
09:22 | < McMartin> | The map, however, you can just send each element of the list to a different computer, have them do their work, send it back, and assemble the result from that. |
09:22 | < Reiver> | Aha! I do see. |
09:22 | < McMartin> | If I have a list of numbers and want to compute the list of numbers that is each element doubled, there's no data contention if I divide the problem up amongst a million machines. |
09:22 | <@TheWatcher> | Reiver: I refer you to my earlier statement ;) |
09:23 | < McMartin> | Parallel programming in general is a high-level mindfuck for everyone =P |
09:23 | < McMartin> | There are maybe a thousand people on Earth who claim to really understand it, and all of them are wrong. |
09:25 | < Reiver> | ...blink? |
09:26 | < McMartin> | Parallel programming: The problem of making a program work when lots of machines are working on it |
09:26 | < McMartin> | We're still at the "throw it together, pray, and have it notice failures and run away from them" mode. |
09:26 | < McMartin> | Except for very special cases where it's trivial, like the independent list construction thing I gave. |
09:27 | < McMartin> | Which also maps, not entirely coincidentally, to the problem of pixel shading. |
09:27 | < McMartin> | See also why everything on the PS3 and XBox 360 looks like it's made of plastic~ |
09:29 | <@TheWatcher> | Heh |
09:35 | < McMartin> | "He's dead. You killed him. On the positive side, at least now you know how the poison works." |
10:54 | | gnolam [lenin@85.8.5.ns-20483] has joined #Code |
10:54 | | mode/#code [+o gnolam] by ChanServ |
15:03 | | Vornicus-Latens is now known as Vornicus |
15:51 | | Reiver is now known as ReivZzz |
16:23 | | * ToxicFrog has another go at Haskell monads. |
16:30 | <@ToxicFrog> | Vornicus: remember how I said the other day that we don't need to worry about hyperbolics yet? |
16:30 | < Vornicus> | You lied? |
16:30 | <@ToxicFrog> | Class is just starting. |
16:30 | <@ToxicFrog> | On the projector: "CLASS 7: HYPERBOLIC FUNCTIONS" |
16:30 | < Vornicus> | heh |
16:32 | < Vornicus> | Have fun then. |
16:32 | <@TheWatcher> | ... godsdamnit, I need to set up svn, or this is going to get rediculous |
16:36 | <@ToxicFrog> | git~ |
16:41 | <@ToxicFrog> | SVN is a pain to set up. |
16:45 | <@TheWatcher> | I've written a bunch of scripts to make it easier for work, I'll just use them |
16:47 | <@ToxicFrog> | Meh. |
16:56 | | You're now known as TheWatcher[afk] |
17:01 | < Vornicus> | hrm. Now FreeOrion works. I /was/ going to submit a bug report. |
17:03 | < Vornicus> | ...that said, the system does seem to be... not even vaguely complete. There are lots and lots of one-point techs mixed in with the higher techs, there's also some 1-point buildings that at as wonders. |
17:03 | < Vornicus> | s/at/act/ |
17:03 | < Vornicus> | Also the ships you can build at the beginning of the game seem to be All There Is. |
17:21 | | AnnoDomini is now known as Steven |
17:32 | | * Vornicus knows what sinh, cosh, and tanh are analogous to, but does not see how to make a line equal to sech csch or coth |
17:33 | < Vornicus> | Ah. That's why FreeOrion doesn't seem ot have much in it; they're not even that far along in the roadmap. |
18:28 | < Doctor_Nick> | computers |
18:33 | | You're now known as TheWatcher |
18:35 | < Doctor_Nick> | video james |
19:18 | | * Vornicus beats Doctor_Nick with a Homsar. |
19:18 | < Doctor_Nick> | horrj |
20:07 | | Vornicus [~vorn@Admin.Nightstar.Net] has quit [Connection reset by peer] |
20:15 | | Vornicus [~vorn@Admin.Nightstar.Net] has joined #code |
20:15 | | mode/#code [+o Vornicus] by ChanServ |
20:34 | | * TheWatcher facepalms, realises there might be a Much Easier way to do per-assert Ignore lays facilties, without disabling them all entirely, fiddles his code |
20:34 | <@TheWatcher> | *Always |
20:49 | <@TheWatcher> | woot, it works. |
20:59 | <@Vornicus> | woot |
21:00 | < Doctor_Nick> | oop |
21:02 | <@TheWatcher> | McMartin: (as he's most likely to be directly interested) - http://fleet.starforge.co.uk/assertgtk.tar.bz2 updated with the new per-assert ignore always code |
21:23 | <@Vornicus> | "per-assert ignore always"? |
21:26 | <@TheWatcher> | If an assert fails you can either opt to ignore it that one time, ignore it always, exit or abort. And each assert has its own ignore flag, so you can 'ingore always' one assert, but other asserts are not ignored |
21:26 | <@Vornicus> | ok |
21:29 | <@TheWatcher> | Vorn: does the mac provide libexecinfo? |
21:29 | <@Vornicus> | Uh, what's the name of a header? |
21:30 | <@TheWatcher> | execinfo.h |
21:30 | <@Vornicus> | I don't appear to have such a thing on my machine |
21:30 | <@TheWatcher> | woe and buggery. |
21:31 | <@TheWatcher> | Hm. anything else provide the backtrace() and backtrace_symbols() functions, do you know? |
21:31 | | * Vornicus checks |
21:32 | | * Vornicus lets grep cook. |
21:32 | <@Vornicus> | I don't see anything in /usr/include |
21:33 | <@TheWatcher> | arg |
21:34 | <@Vornicus> | I do know that you can get tracebacks from Activity Monitor. I don't know how though |
21:35 | <@TheWatcher> | now worries, I shalle Look Into It sometime |
21:35 | <@TheWatcher> | -e |
21:46 | | Steven is now known as AnnoDomini |
21:56 | | AnnoDomini [AnnoDomini@83.21.70.ns-27145] has quit [Ping Timeout] |
22:03 | | AnnoDomini [AnnoDomini@83.21.79.ns-4360] has joined #Code |
22:03 | | mode/#code [+o AnnoDomini] by ChanServ |
22:30 | | You're now known as TheWatcher[T-2] |
22:34 | | You're now known as TheWatcher[zZzZ] |
--- Log closed Tue Jan 22 00:00:19 2008 |