←2007-06-20 2007-06-21 2007-06-22→ ↑2007 ↑all
00:00:19 <ihope> Including things like >>>>< is as small as possible?
00:00:40 <bsmntbombdood> ok, so it needs a peephole optimization phase
00:00:42 <oerjan> it gets better if you run it from the console, i think
00:00:46 <gnilor> cool, it's not that important that it's small though, just a poc
00:02:04 <bsmntbombdood> aaagh why do people do flash websites
00:07:13 <gnilor> because they hate people who browse to them with cheap handheld devices ?
00:11:21 <bsmntbombdood> they suck, period
00:11:38 <bsmntbombdood> look at this: http://www.lefthandbrewing.com/
00:11:52 <ihope> Why do you need to view them?
00:26:03 <pikhq> gnilor: Well, there *is* a really, really overkill-ish way to do it with PEBBLE.
00:26:06 <pikhq> oerjan: I'm here.
00:26:22 <pikhq> And, uh, yeah.
00:26:37 <gnilor> pikhq, yeah thanks, i managed to do what i needed
00:26:43 <pikhq> Bona
00:26:55 <oerjan> pikhq: oh right, i saw only your quit message, for some reason irssi makes that stand out more
00:27:31 -!- erider has quit ("I don't sleep because sleep is the cousin of death!").
00:31:48 -!- erider has joined.
01:05:20 <pikhq> Which is kind of odd, since my irssi setup involves *joins* being in bold.
01:12:37 <oerjan> i am using the clean theme which i downloaded from the irssi website.
01:13:26 <oerjan> it was one of the few with white background
01:23:20 <bsmntbombdood> black backgrounds are hard to read
01:23:29 <bsmntbombdood> but so are white terminals
01:25:01 <RodgerTheGreat> I'm a fan of bright amber on black
01:27:23 <bsmntbombdood> what rgb is amber?
01:28:02 <RodgerTheGreat> something like (255,176,0)
01:28:04 <RodgerTheGreat> ballpark
01:28:30 <ihope> NCS!
01:28:46 <ihope> 5050B90G >:-)
01:28:54 <ihope> And indeed, I'm not making especially much sense.
01:29:06 <RodgerTheGreat> although, apparently UNECE defines it as ~255, 126, 0
01:29:10 <RodgerTheGreat> not that far off, at least
01:29:23 <RodgerTheGreat> I like mine more yellow than wikipedia's
01:29:29 <ihope> I mean, I am, but...
01:29:58 <ihope> NCS is a decent system, though I'm not sure if it's actually any good.
01:30:03 <RodgerTheGreat> you're being esoteric. It's ok- you're in the right place
01:30:16 <bsmntbombdood> (255,176,0) is orange
01:31:18 <ihope> :-)
01:31:50 <ihope> 5050B90G is 50% black 50% color, with "color" being 90% of the way from blue to green.
01:32:23 <RodgerTheGreat> ok
01:32:25 <bsmntbombdood> hhuh?
01:32:49 <ihope> Half black, half mostly-green-with-a-bit-of-blue.
01:33:19 <RodgerTheGreat> I just like my existing colorspaces- HSV, RGB and CMYK.
01:33:33 <ihope> HSV isn't bad.
01:33:39 <ihope> Really, this is sort of a revamped HSV.
01:33:45 <RodgerTheGreat> it sounded like it
01:34:45 <ihope> Actually, more like HSL.
01:48:11 <ihope> And I'm having a sudden urge to implement the Fredkin gate (controlled swap) in the BBM.
01:51:09 <bsmntbombdood> i have an urge to do the FRQ to the DDT in the MMRT QTR box with ALK
01:52:11 <ihope> Don't forget to DDR the FFT before QRT'ing your DRAM.
01:52:57 <bsmntbombdood> i have 8*1mb of some sort of ram, what should i do with it?
01:53:08 <lament> is monitor white as bright as the sum of monitor red, green and blue?
01:59:02 <ihope> Is it an Australian lace monitor?
02:02:48 -!- gnilor has left (?).
02:24:10 <oerjan> bsmntbombdood: send it back through time with a time machine
02:24:58 <bsmntbombdood> i don't have a time machine
02:25:34 <oerjan> maybe some kind of embedded system then?
02:26:35 <ihope> Time machines aren't necessary!
02:26:56 <ihope> Just have the past item refer to the present item and prove existence and uniqueness of a solution mathematically.
02:38:05 -!- vfork has joined.
02:39:39 <vfork> hrm, any interesting new esoteric languages come out in the last year or so? I've been out of the scene for a bit now
02:45:41 <ihope> You might want to take a look at the billiard ball machine.
02:45:54 <ihope> Though I don't know of an interpreter for it.
02:47:52 <vfork> looks interesting!
02:56:46 -!- vfork has quit ("Java user signed off").
02:59:31 <RodgerTheGreat> that was abrupt
03:00:15 <oerjan> he probably noticed the topic.
03:19:19 <ihope> :-)
03:19:38 <ihope> But bsmntbombdood clearly hasn't been eaten yet.
03:58:19 -!- c|p has quit ("Leaving").
04:11:55 -!- Figs has joined.
04:12:02 <Figs> howdy
04:16:43 -!- ihope has quit (Connection timed out).
04:19:01 <SimonRC> zzz
04:19:10 * Figs prods SimonRC
04:19:13 <Figs> Hello :D
04:20:25 <SimonRC> zzzzz
04:29:24 -!- EagleBot has quit (Read error: 110 (Connection timed out)).
04:44:25 <Figs> can someone explain to me, lowly C++ program, wtf a monad is?
04:54:26 <bsmntbombdood> that would have to be one smart program to understand monads
04:55:33 <Figs> s/program/programmer
04:55:40 <Figs> or is that the other way around?
04:55:45 <Figs> *programmer
04:55:47 <Figs> there :P
04:59:07 <oerjan> hm...
04:59:46 <oerjan> a monadic value is a kind of general producer/source
04:59:57 <Figs> like a factory object?
05:00:26 <oerjan> that would be one possibility.
05:01:21 <oerjan> its type has too parts, the monad m, and the type of value produced a. (In Haskell, m a)
05:01:43 <Figs> preferably, if you could explain without the haskell...
05:02:06 <bsmntbombdood> you need some functional language
05:02:36 <Figs> then skip the notation :)
05:02:54 <Figs> if that's possible...
05:02:59 <oerjan> The monad tells very generally what kind of producer/source it is. For example in the monad of lists, the monadic values would be lists of values of type a.
05:03:01 <Figs> don't bother if it'd take you 20 pages
05:05:56 <oerjan> In the monad of (IO) actions, the values would be thunks that did possibly some I/O and then returned an a.
05:06:30 <oerjan> thunk = closure without arguments
05:07:02 <bsmntbombdood> how does it make IO pure??
05:08:20 <oerjan> basically it encapsulates IO as action values, which can be combined in various ways without actually executing the actions.
05:10:39 <oerjan> in Haskell, the main function of the program is evaluated to one IO action. This evaluation itself is pure. However then the resulting action is performed. That is not particularly pure, but this is clearly separated from pure evaluation.
05:11:14 <bsmntbombdood> what about order of evaluation?
05:13:52 <oerjan> Every monad contains two common operations. One of them is called "bind" and denoted >>= in haskell (though there is syntactic sugar for making it look more imperative)
05:15:57 <oerjan> in a monad denoting actions, x >>= f generally means the composed action that first performs x, then applies the function f to the produced value, then performs the result of that as an action. So order of evaluation is part of the >>= definition.
05:16:41 <oerjan> note that the f function itself is pure, although it returns an action as result.
05:17:50 <bsmntbombdood> surely if you have two >>=s, they must be executed in a defined order?
05:18:30 <oerjan> x >>= y >>= f is parsed as x >>= (y >>= f), so x is performed first.
05:18:37 <oerjan> er, wait
05:18:56 <oerjan> x >>= f >>= g i mean
05:19:25 <oerjan> no, that doesn't make sense. i got it backwards.
05:19:42 <oerjan> x >>= f >>= g is (x >>= f) >>= g, the left part is executed first.
05:19:56 <bsmntbombdood> foo(x >>= f, y >>= f)
05:20:29 <oerjan> oh. note that evaluating x >>= f is not the same as executing it.
05:21:20 <oerjan> in foo(x >>= f, y >>= f) nothing says that either of x >>= f or y >>= f are executed unless foo asks for it, and then foo of course decides what order to combine them in.
05:21:51 <oerjan> this mixes in with lazy evaluation of course: in Haskell they are not even evaluated until asked for.
05:22:06 <bsmntbombdood> foo(print(x), print(y))
05:22:20 <bsmntbombdood> foo determines the order x and y are printed?
05:22:39 <oerjan> more or less. or if either is.
05:23:00 <oerjan> foo can throw away either argument or both
05:23:33 <oerjan> in Haskell, arguments to functions are _not_ evaluated before being passed to them.
05:24:23 <oerjan> print(x) is passed unevaluated to foo. x is not passed to print either until the whole is evaluated.
05:26:25 <oerjan> consider a foo defined as foo(a, b) = b >>= (\x -> a)
05:26:49 <bsmntbombdood> i still don't understand this >>=
05:27:28 <oerjan> when foo(a,b) is evaluated and executed, it would first execute b, then a.
05:28:53 <oerjan> (\x -> a) is a Haskell lambda expression btw. It is a function that ignores its argument and returns a.
05:29:03 <bsmntbombdood> yeah
05:31:05 <oerjan> consider the Haskell action: getChar >>= (\c -> if (c == 'y') then putStrLn("yes") else putStrLn("no"))
05:31:32 <oerjan> here getChar is an action that actually returns a value when executed, a character.
05:32:29 <bsmntbombdood> getChar is the monad?
05:32:31 <oerjan> when that is executed, first getChar is executed, reading a character from stdin.
05:33:13 <oerjan> getChar is a monadic value, in the monad IO. Its type is IO Char since it returns a character when executed.
05:34:42 <bsmntbombdood> and how is that any more pure than if (getChar() == 'y') ... ?
05:37:16 <oerjan> i suppose purity is in the eye of the beholder. But consider the following:
05:39:14 <oerjan> let cmd = getChar ; loop = cmd >>= (\c -> if (c == 'y') then putStrLn("Yes") else loop) in loop
05:39:37 <oerjan> as opposed to
05:40:39 <oerjan> cmd = getChar(); while ((c = cmd)!='y'); printf("Yes");
05:42:22 <oerjan> that's called referential transparency. The Haskell version actually reads a character each iteration.
05:44:52 -!- boily has joined.
05:44:59 <oerjan> In Haskell replacing a variable by its definition does not change the meaning of the program.
05:46:12 <bsmntbombdood> but...
05:47:04 <oerjan> perhaps more importantly, the way Haskell does it makes it much easier to see which parts of the program actually perform impure actions, and which just calculate values purely. with help from the type system.
05:49:24 <oerjan> if something does not have IO in its type (and doesn't delve into some particularly dubious library modules) then it does not perform an impure action.
05:58:11 <oerjan> anyway all this becomes necessary because of laziness more than pureness. One of the big Haskell guys once wrote something like in a language without laziness, it is nearly irresistible to add impure functions (like your getChar() above) directly. But because Haskell has lazy evaluation, it _must_ have a different mechanism for ordering of effects.
05:59:34 <bsmntbombdood> it seems IO should just be done immediately
06:01:18 <oerjan> immediately when?
06:02:13 <bsmntbombdood> when it's passed to a function
06:03:23 <oerjan> so you don't believe in lazy evaluation.
06:03:41 <bsmntbombdood> for non-io stuff, sure
06:04:51 <bsmntbombdood> lazy evaluation shouldn't change the behavior of programs, though
06:07:29 <oerjan> i suppose you could make a language work like that.
06:08:12 <oerjan> maybe someone even has.
06:09:54 <bsmntbombdood> i'm going to bed
06:10:03 <oerjan> however if you wanted Haskell's flexibility in generating new control structures, you would have to add some call-by-name option for arguments. Scala does that.
06:10:23 <oerjan> good night.
06:10:53 <bsmntbombdood> macros are for control structures
06:49:45 -!- oerjan has quit ("griffel").
07:19:18 -!- boily has quit ("foo foo foo").
07:42:09 -!- Figs has left (?).
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:03:47 <pikhq> I would just like to announce that I have been inspired by LostKingdom. . .
08:03:58 <pikhq> And will start to write a game in PEBBLE.
09:03:35 -!- pikhq has quit (Read error: 110 (Connection timed out)).
09:36:19 -!- Keymaker has joined.
09:37:53 <Keymaker> i'm making an interpreter for a new esolang, could anyone who knows python (again!) paste a line of code that would replace Nth character from some string with some string?
09:39:25 <Sukoshi> (defun replace-char (string1 string2 char-pos) (let ((char (aref char-pos string2))) (setf (aref char-pos string1) char) string1)
09:40:17 <Keymaker> alright, thanks
09:40:26 <Sukoshi> Errr >_>
09:40:31 <Sukoshi> That's a joke. That's not Python.
09:40:40 <Keymaker> damn :D
09:40:40 <Sukoshi> That's CL.
09:40:55 <Sukoshi> I thought you could tell with the over-use of parentheses :P
09:41:09 <Keymaker> well i started to doubt something...
09:41:21 <Sukoshi> :D
10:31:28 <Keymaker> hm, i managed to get that part done
12:14:00 <Keymaker> yet the interpreter still has some problems... i hope i can get it working sometime, then i can start testing the language
12:14:17 -!- Keymaker has quit.
13:09:20 -!- c|p has joined.
13:10:42 -!- ihope__ has joined.
13:10:57 -!- ihope__ has changed nick to ihope.
14:02:15 -!- jix_ has joined.
14:13:29 -!- jix_ has quit ("This computer has gone to sleep").
14:51:25 -!- ihope has quit (Read error: 104 (Connection reset by peer)).
16:07:55 -!- jix_ has joined.
16:17:19 -!- crathman has joined.
16:21:35 -!- crathman has quit (Client Quit).
16:51:05 -!- sebbu has joined.
17:07:00 -!- c|p has quit ("Leaving").
17:07:25 -!- KoH has joined.
17:07:47 -!- KoH has left (?).
17:28:58 -!- ihope has joined.
17:31:45 -!- crathman has joined.
17:33:11 -!- RodgerTheGreat has quit (Read error: 104 (Connection reset by peer)).
17:33:13 -!- RodgerTheGreat_ has joined.
19:35:46 -!- clog has joined.
19:35:46 -!- clog has joined.
19:43:46 -!- pikhq has joined.
19:44:41 -!- atrapado_ has quit (Read error: 110 (Connection timed out)).
20:10:27 -!- c|p has quit ("Leaving").
21:39:21 -!- pikhq has quit (Read error: 104 (Connection reset by peer)).
21:39:40 -!- pikhq has joined.
21:40:31 -!- jix_ has quit ("CommandQ").
21:46:53 -!- pikhq has quit (Remote closed the connection).
21:47:17 -!- pikhq has joined.
21:56:04 -!- Sgeo has joined.
22:50:15 -!- c|p has joined.
22:57:04 -!- oerjan has joined.
23:21:48 <SimonRC> lament: the solution is to use a system which has a compose key
23:21:53 <SimonRC> thus:
23:22:01 <SimonRC> é
23:22:06 <lament> SimonRC: yes, for example my mac
23:22:12 <lament> fortunately
23:22:25 <lament> everybody understands me perfectly if i write spanish without accents
23:22:36 <lament> the only annoying problem is the n with the tilde on top. I write n~
23:22:38 <SimonRC> so why "espan~ol" rather than "espanñol"?
23:22:50 <SimonRC> erm "español"
23:22:53 <lament> because i'm at work and not using my mac.
23:22:57 <SimonRC> ah, ok
23:23:14 <SimonRC> does ñ really matter that much?
23:23:25 <SimonRC> apart from in "año"
23:24:07 <lament> i find it weird when it's missing
23:24:13 <lament> unlike the accents
23:24:21 <SimonRC> hm
23:24:22 <SimonRC> ok
23:35:28 <bsmntbombdood> n is not e\~ne!
23:39:11 -!- sebbu has quit ("@+").
23:50:12 -!- crathman has quit ("ChatZilla 0.9.78.1 [Firefox 2.0.0.4/2007051502]").
←2007-06-20 2007-06-21 2007-06-22→ ↑2007 ↑all