03:20:47 -!- clog has joined.
03:20:47 -!- clog has joined.
03:20:52 <Sgeo> RodgerTheGreat, does it work with PSOX? Offer PSOX integration? *keeps trying to drum up interest in PSOX*
03:21:09 * Sgeo does want to see tools with PSOX integration
03:21:22 <RodgerTheGreat> uh... I suppose I could write a simple header or something once I get I/O down?
03:21:35 -!- Corun has quit (Client Quit).
03:22:17 <Sgeo> I need to add module, change coming to domain 0x04
03:22:20 <Sgeo> just a heads-up
03:27:19 <Sgeo> http://trac2.assembla.com/psox/changeset/96 nothing too serious
03:27:26 <Sgeo> and http://trac2.assembla.com/psox/changeset/97 slight correction
03:29:04 <Sgeo> Serious updates on Wednesday though relating to safety
03:33:04 * Sgeo vaguely considers a BF.PSX language..
03:41:22 <RodgerTheGreat> my assembler now allows for the definition of constants- this significantly improves readability
04:22:08 <slereah_> Maaaan, I look at the X86 instruction set.
04:22:29 <slereah_> To think that even machine code's got more instructions than most esolangs!
04:24:38 <slereah_> They've got like 30 jump instructions :o
04:24:40 <pikhq> slereah_: x86 assembly *is* an Esolang.
04:25:02 <pikhq> s/Esolang/esolang/
04:26:16 <slereah_> If it is, then it is "commercial" and "sold out" :o
04:26:24 <slereah_> While brainfuck remains indie. Or something.
04:28:18 <slereah_> I wonder, are there direct equivalents to some BF instructions in X86?
04:29:40 <slereah_> Bleh. You actually have to know computer architecture for x86.
04:59:20 <RodgerTheGreat> Learn MIPS assembly, and then look at the x86 instruction set and you'll pretty much hate the entire computer industry
05:04:26 <pikhq> Oh, I *love* x86 assembly.
05:04:35 <pikhq> In *exactly* the same way as I love Brainfuck.
05:08:22 -!- oerjan has joined.
05:13:22 <Sgeo> RodgerTheGreat, hm?
05:13:32 <Sgeo> <RodgerTheGreat> Learn MIPS assembly, and then look at the x86 instruction set and you'll pretty much hate the entire computer industry
05:13:35 <Sgeo> I don't get it
05:14:18 <Sgeo> And don't think me leaving means you don't have to respond.. I can read logs you know
05:14:42 <oerjan> presumably MIPS is a thousand times more elegant than x86, despite the second being ubiquitous
05:15:15 <pikhq> Like I said earlier: x86 assembly is an esolang in its own right.
05:15:19 <RodgerTheGreat> CISC hurts your insides when you know a really good RISC architecture
05:16:01 <pikhq> I dunno: there's something to be said about switching to 32-bit mode being nontrivial.
05:17:38 <Sgeo> http://news.zdnet.com/2100-3513_22-6231761.html
05:17:49 <Sgeo> Anyone here besides me think that this is either useless or harmful?
05:18:27 <Sgeo> Well, g'night all
05:20:14 -!- Sgeo has quit (Read error: 104 (Connection reset by peer)).
05:56:53 -!- bsmntbombdood__ has changed nick to bsmntbombdood.
06:12:00 -!- immibis has joined.
06:12:06 -!- immybo_ has joined.
06:12:24 -!- immibis has quit (Client Quit).
06:12:43 -!- immibis has joined.
06:14:11 -!- immibis has set topic: If this channel has been deleted, how come we're in it? "This channel" refers to the alternative, since that's where we are. So if the alternative has been deleted where are we? Floating around in a void of zero channels?.
06:15:31 <immibis> http://ircbrowse.com/channel/esoteric/20080225
06:16:19 <immibis> anyone wants to play Theatre, by Brenten Wyber, join #interactive-fiction
06:34:48 -!- immybo_ has changed nick to immybo[A].
06:43:45 -!- immybo[A] has changed nick to immybo_.
06:43:50 -!- immybo_ has quit ("He who laughs last, thinks slowest").
07:42:13 -!- olsner has quit ("Leaving").
07:42:46 -!- SimonRC has joined.
07:55:02 -!- oerjan has quit ("leaving").
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:07:57 <immibis> "To remove air from a flask, fill it with water, tip the water out, and put the cork in quick before the air can get back in."
08:08:46 <immibis> "For a nosebleed: Put the nose much lower then the body until the heart stops."
08:13:01 <immibis> # "Do not use if you cannot see clearly to read the information in the information booklet." -- In the information booklet.
08:13:15 <immibis> "Do not use while sleeping or unconscious."
08:13:23 <immibis> "Recycled flush water unsafe for drinking."
08:13:45 <immibis> "Do not use near fire, flame, or sparks." -- On an "Aim-n-Flame" fireplace lighter.
08:14:21 <immibis> "Do not recharge, put in backwards, or use." -- On a battery.
08:14:39 <immibis> "For use by trained personnel only." -- On a can of air freshener.
08:15:03 <immibis> "Warning: Do not climb inside this bag and zip it up. Doing so will cause injury and death." -- A label inside a protective bag (for fragile objects), which measures 15cm by 15cm by 12cm.
08:15:19 <immibis> you know, every time i paste one i tell myself it will be the last, then i read the next.
08:15:42 <immibis> "Warning: has been found to cause cancer in laboratory mice." -- On a box of rat poison.
08:15:49 <immibis> "Fragile. Do not drop." -- Posted on a Boeing 757.
08:16:23 <immibis> "Product will be hot after heating." -- On a supermarket dessert box.
08:16:42 <immibis> "May be harmful if swallowed." -- On a shipment of hammers.
08:17:23 <immibis> "Not dishwasher safe." -- On a remote control for a TV.
08:18:14 <immibis> "Malfunction: Too less water." -- A notice left on a coffee machine."
08:18:50 <immibis> "In case of flood, proceed uphill. In case of flash flood, proceed uphill quickly." -- One of the emergency safety procedures at a summer camp.
08:19:07 <immibis> "Some materials may irritate sensitive skin. Please look at the materials if you believe this may be the case.
08:26:20 -!- immibis has quit (Client Quit).
11:45:30 -!- jix has joined.
12:56:00 -!- puzzlet has quit (brown.freenode.net irc.freenode.net).
12:56:00 -!- pikhq has quit (brown.freenode.net irc.freenode.net).
12:56:00 -!- lifthrasiir has quit (brown.freenode.net irc.freenode.net).
12:56:57 -!- puzzlet has joined.
12:56:57 -!- pikhq has joined.
12:56:57 -!- lifthrasiir has joined.
13:54:53 -!- RedDak has joined.
14:03:29 -!- sebbu has joined.
14:16:36 -!- Slereah has joined.
14:17:04 -!- slereah_ has quit (Read error: 104 (Connection reset by peer)).
14:35:41 -!- RedDak has quit (Remote closed the connection).
16:02:25 -!- n0nsense has joined.
16:02:39 -!- n0nsense has left (?).
16:14:28 -!- RedDak has joined.
16:24:52 -!- timotiis has joined.
17:07:33 -!- slereah_ has joined.
17:10:33 -!- Slereah has quit (Read error: 104 (Connection reset by peer)).
17:27:32 -!- ais523 has joined.
18:21:26 <SimonRC> >>> from __future__ import braces
18:36:38 -!- RedDak has quit (Remote closed the connection).
18:47:52 <lament> better braces than those things ruby has
18:47:59 <ais523> isn't that the solution Haskell used?
18:48:09 <ais523> allow layout, but if you don't like it you can use braces and semicolons C-style
18:48:45 <lament> 1) haskell's whitespace-sensitive layout is much trickier than python's and harder to get right
18:49:01 <lament> 2) in practice, everybody uses it anyway, and nobody uses braces much
18:49:12 <ais523> Haskell's looks nicer than Python's IMO
18:49:26 <ais523> and the brace-semicolon style is useful for short things you want to fit on one line
18:49:29 <lament> haskell is optimized for looking nice
18:49:39 <ais523> (although that would be more useful in Python than it is in Haskell)
18:50:00 * ais523 recalls attempting to type Python loops in to bsmnt_bot via IRC
18:50:23 <ais523> it was a case of ~exec exec("while 1:\n do_something;")
18:50:33 <ais523> there ought to be a better way
18:54:05 <SimonRC> haskell uses the offside rule I think, except where it doesn't
18:57:21 <lament> hm, extending python with c is a chore.
18:59:56 <ais523> SimonRC: your statement is a tautology. But what is the offside rule?
19:01:26 <SimonRC> it means that (usually) expresions must fit into the least southeast quadrant that contains their initial word
19:05:31 <SimonRC> I don't think I have ever remembered a formal definition of the indentation rules
19:06:09 <lament> heh, extending ocaml with c:
19:06:11 <lament> User primitives with arity greater than 5 should be implemented by two C functions. The first function, to be used in conjunction with the bytecode compiler ocamlc, receives two arguments: a pointer to an array of Caml values (the values for the arguments), and an integer which is the number of arguments provided.
19:15:44 <SimonRC> the exact rules are a bit complicated: http://haskell.org/onlinereport/syntax-iso.html#layout
19:26:49 <ais523> my favourite example in that is do a == b == c
19:27:19 <ais523> because == is non-associative, the only possible way to parse it is (do {a == b}) == c
19:28:20 <ais523> now we just need a program where that actually types...
19:30:20 <lament> haskell ffi is so nice
19:30:47 * ais523 was planning an esoteric ffi
19:30:52 <lament> SimonRC: compared to Python
19:31:02 <ais523> where the relationships between programs are shown by drawing flowcharts in ASCII art
19:31:07 <SimonRC> why are you reading about ffis?
19:31:08 <lament> it's nice because the c side doesn't need to know about haskell
19:31:12 <ais523> but I haven't really worked out the details
19:31:18 <lament> your c functions are simply c functions
19:31:22 <lament> you don't need a wrapper
19:31:24 <ais523> lament: Prolog's was good too
19:31:29 <ais523> and worked much the same way
19:31:39 <lament> yeah, but haskell is actually a good language :)
19:31:40 <SimonRC> OTOH, the C ffi interacts poorly with Haskell threads
19:31:48 <ais523> you could even do something like this:
19:31:54 <lament> SimonRC: really? that could hurt me
19:31:55 <ais523> (in Prolog) call a C function
19:32:00 <ais523> (in C) call a Prolog function
19:32:05 <lament> SimonRC: what are the problems?
19:32:15 <SimonRC> the bizarre thing is that both Prolog and Haskell have different evaluation orders than C.
19:32:20 <ais523> the C function just gets cut out altogether, as if it itself had failed
19:32:36 <ais523> SimonRC: Prolog's evaluation order is the same as C's. It's an eager language
19:32:40 <SimonRC> lament: I think that no thread-switching occurs while a C function is running
19:32:49 <SimonRC> it might have a fix around somewhere
19:32:49 <ais523> it's just that Prolog also has a re-evaluation order...
19:32:59 <SimonRC> ais523: that was what I was refering to
19:33:15 <ais523> I'm slightly annoyed with Prolog, because it's almost a very nice language
19:33:26 <ais523> but there's things you should be able to do with it but can't
19:33:33 <ais523> like solve simultaneous equations, for instance
19:33:54 <ais523> I want to be able to write goal :- A = B + 1, A = 2* B + 2, write(A).
19:34:04 <ais523> but Prolog interps can't handle that sort of thing
19:34:24 <SimonRC> because it's the wrong side of Gödel
19:34:36 <ais523> it makes perfect sense within the language, it's just confusing to figure out how to interpret, and probably uncomputable
19:35:15 <ais523> goal :- A > 2, B > 2, integer(A), integer(B), A * B = (insert large prime here), write(A).
19:35:39 <ais523> I'm planning a blatantly uncomputable esolang version of Prolog to address these problems
19:35:57 <ais523> if you want something to be worried about, ponder that user-defined functions have to start with capital letters
19:36:10 <ais523> oh, and there's no backtracking, it uses multithreading instead
19:36:21 <lament> SimonRC: oh, that shouldn't be a problem for me, but i see how that can be a pain.
19:36:21 <ais523> so an infinite loop is impossible, but it's super-TC anyway
19:36:58 <SimonRC> goal :- A > 1, B > 1, C > 1, N > 2, A^N + B^N = C^N
19:40:42 <ais523> my language sorts that out simply by multithreading and processing all possible values of A, B, C, and N in parallel.
19:40:52 <ais523> You'd probably want to restrict them to be integers, though.
19:41:02 <oklopol> will it not prove it impossible?
19:41:33 <ais523> if the proof is correct, it ought to fail
19:42:08 <ais523> if the integer restriction is there
19:42:20 * ais523 wanted to design a programming language in which just about everything was very easy to express
19:42:30 <ais523> so programmer productivity could be massive
19:42:42 <ais523> no, that Prolog-like language
19:43:11 <ais523> try translating C's ?: operator into Python. It's possible, but ugly and nonintuitive
19:43:54 <oklopol> ais523: prove impossible == fail, no?
19:44:26 <ais523> basically, every statement in the entire program puts a condition on the state of the world
19:44:37 <ais523> and a failure means that the conditions are incompatible.
19:45:01 <ais523> such as SimonRC's conditions above, plus a condition restricting A, B, C, N to be integers
19:45:17 <ais523> (point of interest: does anyone know if the result also holds for non-integer N?)
19:46:10 <oklopol> yeah, after the guy spent 20 years solving that for integer n, i quickly extended for reals.
19:46:57 <ais523> I quickly extended for negative numbers
19:47:06 <ais523> but if you know the result for positive numbers, that's easy to prove
19:47:23 <ais523> (results for -1 and -2, no results for <=-3)
19:47:38 <ais523> BTW, no results for 0 either
19:47:48 <ais523> so +2, +1, -1, -2 are the only integer values of N that work
19:49:06 <ais523> to prove the result for negative N, just multiply both sides by (A*B)^-N:
19:50:45 -!- ais523 has quit ("looking fruitlessly for the original #esoteric...").
19:52:55 <SimonRC> I am not totally sure that proof works
19:53:14 <SimonRC> if z = -n, I get: b^z + a^z = (ab/c)^z
19:53:20 <oklopol> didn̈́'t try, but just realized that's not what i was thinking
19:55:15 -!- Corun has joined.
19:57:08 <SimonRC> http://www.accu.org/index.php/book_reviews?url=search.xqy%3Fx&term=schildt
19:57:58 <SimonRC> Look at all the results that are not by Schildt, and you will see that Schildt is the standard for measuring crapness of C++ books
19:58:46 <lament> man, haskell ffi is awesome.
19:59:49 <lament> once i figured out how to run ghc to compile it (which took a while because there's like, no documentation anywhere), it all seems easy
20:00:53 -!- Corun has changed nick to TheChris.
20:00:55 <lament> no, but there's nothing there
20:01:04 <lament> i just create an array in c and send it to haskell.
20:01:36 <SimonRC> are you using a thing to automatically generate the haskell declarations from the C ones?
20:02:07 <lament> i don't need any heavy machinery, just interface with one c function i have
20:02:19 <SimonRC> I just seem to recall the syntax for the declaration on the Haskell side to be a bit arcane
20:02:26 <SimonRC> maybe I am thinking of something else
20:02:52 <lament> my function takes no arguments, and returns a pointer to an array of doubles.
20:03:01 <lament> the declaration is: foreign import ccall "module.h getArray" _getArray :: IO (Ptr Double)
20:03:39 <lament> and then from that pointer, i create an actual haskell list of doubles (i know the size in advance):
20:03:42 <lament> getArray :: IO [Double]
20:03:44 <lament> getArray = do ptr <- _getArray peekArray arrayLen ptr
20:04:04 <lament> getArray = do {ptr <- _getArray; peekArray arrayLen ptr}
20:04:34 <lament> can't expect it to get any prettier than that...
20:05:48 <SimonRC> how about: getArray = _getArray >>= peekArray arrayLen
20:06:34 <lament> do you honestly think that's more readable? :)
20:06:59 <lament> i guess i'm just not used to haskell enough
20:07:19 <SimonRC> >>= is no worse that unix pipes
20:12:52 <lament> i'm not saying >>= is bad
20:13:23 <lament> but i think my version is better
20:13:46 <lament> because if you're not 100% sure what _getArray and peekArray do, my version makes it very obvious
20:14:38 <lament> in absence of a good haskell IDE that would tell you the type of peekArray as you hover the mouse over it, i think being explicit helps.
20:19:57 <lament> of course, i don't actually want a list... i want an array...
20:20:58 <SimonRC> Isn't there an appropriate instance of Array?
20:21:14 -!- slereah_ has quit (Read error: 104 (Connection reset by peer)).
20:23:00 * lament researches Data.Array.Storable
20:23:26 * lament finds unsafeForeignPtrToStorableArray
20:25:05 * lament laments haskell's lack of proper documentation
20:25:38 <lament> haskell's idea of docs is type signatures
20:26:47 <SimonRC> nothing vague like "Collection"
20:27:14 <lament> unsafeForeignPtrToStorableArray :: Ix i => ForeignPtr e -> (i, i) -> IO (StorableArray i e)
20:28:57 <SimonRC> Given any type i that is usable as an array index, the function takes in a ForeignPtr e (e = element type) and the array bounds and returns an IO of a Haskelly version of the array
20:29:29 <SimonRC> Ix i => ... (i, i) ... almost always means array bounds
20:29:34 <lament> are the bounds inclusive or exclusive?
20:30:14 <SimonRC> notice some of the instances there are of Ix, BTW...
20:30:40 <SimonRC> instance (Ix i, Ix j, Ix k) => Ix (i, j, k) and such like
20:30:48 <SimonRC> proper multi-dimensional arrays
20:31:13 <lament> the documentation for unsafeForeignPtrToStorableArray should really say if the bounds are inclusive or exclusive
20:31:23 <lament> but since it doesn't, at least the documentation for Ix should
20:31:25 <lament> and it doesn't either!
20:31:31 <SimonRC> they will be same as everywhere else, I assume
20:32:05 <lament> inclusive, apparently. Had to check in ghci.
20:36:09 <lament> the function is a little less pretty now:
20:36:14 <lament> getArray :: IO (StorableArray Int Double)
20:36:14 <lament> getArray = do ptr <- _getArray fp <- newForeignPtr_ ptr unsafeForeignPtrToStorableArray fp (0, arrayLen-1)
20:36:27 <lament> argh, i don't know what's going on with indentation.
20:36:54 <lament> getArray = do {ptr <- _getArray; fp <- newForeignPtr_ ptr; unsafeForeignPtrToStorableArray fp (0, arrayLen-1)}
20:37:28 -!- olsner has joined.
20:43:23 -!- slereah_ has joined.
20:43:32 <SimonRC> lament: for why indices are inclusive, see the recent conv on #haskell
20:43:43 <SimonRC> (suppose you are indexing on Bool...)
20:46:10 <lament> but would you actually? Especially an array imported from C?
20:47:16 <SimonRC> well you might have your own instance of Enum and Ix that corresponds to a load of C #defines
20:47:18 <lament> i sort of understand the reasoning, but realistically this only clutters the semantics to address about 0.00001% of the usage.
20:48:16 <SimonRC> A function that turns c-style bounds into Haskell bounds is trivial to write
20:49:29 <lament> although that's among things like "begin and end instead of braces are very easy to define in C"
20:49:36 <SimonRC> and Haskell bounds interact well with [a..b]
20:50:11 <SimonRC> Haskell is really one for the theoretical purity. And that means indexing on all kinds of crap, not just numbers.
20:50:45 <lament> sure. i can live with that.
20:51:16 -!- RedDak has joined.
20:52:02 <lament> i do like syntactic sugar, though
20:52:42 <lament> but it's not a big deal
20:53:57 * lament sounds like he's always complaining, and he really isn't.
20:54:05 <lament> but i wish haskell had proper docs :D
20:55:39 <SimonRC> you've done that one already
20:56:48 <lament> yeah, i guess i should actually start coding or something.
21:27:00 -!- TheChris has changed nick to Corun.
21:36:59 <lament> SimonRC: have you actually written anything serious in haskell?
21:42:57 <SimonRC> I did some extensions to a miniture Java compiler.
21:44:15 <lament> what did it compile to?
21:46:00 <SimonRC> the subset was designed to be machine-code-like
21:46:14 <SimonRC> with an obscene collection of addressing modes
21:46:26 <SimonRC> there were some register variables
21:47:06 <SimonRC> I implemented, among others, a jump optimiser
21:47:20 <lament> did anything practical come out of it?
21:47:33 <SimonRC> it looked at the flowgraph and chose a set of paths with the minimal number of jump instructions
21:47:52 <SimonRC> I evaluated the results, and found that it was absofuckinglutely useless
21:48:19 <SimonRC> Java's control structures aren't complex enough to benefit from the jump optimisation
21:48:59 <SimonRC> I expect it only really shines when you have deep breaks, "break 5;" or whatever
21:49:44 <SimonRC> the only breaks the miniture java had were in the conditions of loops, immediately at the top
22:00:23 -!- uvanta has joined.
22:24:03 -!- slereah_ has quit (Read error: 104 (Connection reset by peer)).
22:24:24 -!- slereah_ has joined.
22:34:25 -!- RedDak has quit (Remote closed the connection).
22:38:45 -!- pikhq has quit (Read error: 104 (Connection reset by peer)).
22:42:10 -!- Sgeo has joined.
22:43:40 -!- pikhq has joined.
23:00:56 -!- slereah__ has joined.
23:02:44 -!- slereah_ has quit (Read error: 104 (Connection reset by peer)).
23:26:34 <timotiis> Liempt: speaking of bold, does that work?
23:37:12 -!- slereah__ has quit (Remote closed the connection).
23:37:26 -!- slereah__ has joined.
23:40:59 -!- timotiis has quit ("leaving").
23:49:26 -!- Corun has quit ("This computer has gone to sleep").