←2007-11-02 2007-11-03 2007-11-04→ ↑2007 ↑all
00:03:20 <bsmntbombdood> someone come up with a run length encoding of brainfuck
00:03:24 <bsmntbombdood> that's still brainfuck
00:03:35 <bsmntbombdood> ie a brainfuck->brainfuck transformation
00:03:48 <ehird`> isn't that er, impossible
00:03:54 <bsmntbombdood> dunno
00:04:03 <bsmntbombdood> you might have to embed an interpreter
00:04:12 <ehird`> what would be cool is just a BF->BF compiler
00:04:19 <ehird`> i.e. implementing it like you would a BF->C compiler
00:04:36 <ehird`> you could call it pfsdbfs (Program For Slowing Down Brainfuck Sources)
00:04:50 <bsmntbombdood> it's been done
00:04:55 <ehird`> seriously?
00:04:56 <ehird`> ohmigawd
00:04:59 <ehird`> show me
00:05:18 <bsmntbombdood> maybe
00:05:43 <ehird`> DOOO EEET
00:06:02 <bsmntbombdood> you can just do ${code to load program onto tape}${bf-in-bf interpreter}
00:06:15 <ehird`> no, that's not what i mean
00:06:21 <bsmntbombdood> yes it is
00:06:26 <ehird`> that's like writing a bf->c program that does "bf("...")"
00:06:30 <ehird`> and an implementation of bf
00:06:37 <bsmntbombdood> yeah
00:06:46 <ehird`> which isn't what i mean
00:06:56 <bsmntbombdood> yes it is
00:07:04 <ehird`> no it isn't, stop pretending you know what my mind is thinking
00:07:46 <bsmntbombdood> here's a compiler: sed 's/x/x/'
00:07:57 <ehird`> sigh
00:08:11 <bsmntbombdood> you can't compile x->x without some restrictions on the target language
00:08:28 <bsmntbombdood> x->x' where x' is restricted x
00:08:35 <ehird`> BF->BF, without a 1-1 translation or simple variant thereof, and without embedding an interpreter
00:08:52 <bsmntbombdood> all bf compilers are 1-1 translations
00:09:04 <ehird`> like, use GregorR's tape/stack thingy (i.e. E1E1E1 where E is an element) for the tape
00:09:15 <ehird`> it's very simple what i'm explaining
00:09:24 <bsmntbombdood> i know what you mean
00:09:33 <ehird`> so you're just arguing for the sake
00:09:37 <bsmntbombdood> no
00:09:58 <bsmntbombdood> whatever
00:10:09 <bsmntbombdood> write a bf->unlambda and an unlambda->bf
00:10:14 <bsmntbombdood> there you have it
00:10:21 <ehird`> sigh
00:10:29 <bsmntbombdood> what?
00:10:41 <bsmntbombdood> that would do it
00:11:22 <ehird`> in an incredibly convoluted fashion
00:11:23 <ehird`> :P
00:11:39 -!- oerjan has joined.
00:12:27 <bsmntbombdood> in an incredibly increasing code size fashion
00:12:30 <bsmntbombdood> which is what you want
00:12:48 <ehird`> i kind of meant something simple
00:12:49 <ehird`> i mean
00:12:53 <ehird`> take the BF->C paradigm
00:12:57 <ehird`> and apply it but replacing C with BF
00:13:08 <bsmntbombdood> bf->c is nothing, 1-1
00:13:40 <bsmntbombdood> actually
00:13:47 <bsmntbombdood> GregorR: how good is c2bf?
00:13:53 <ehird`> bsmntbombdood: it is NOT 1 to 1
00:13:57 <ehird`> because you allocate an array on the stack
00:14:02 <ehird`> char bf[3424234]
00:14:07 <bsmntbombdood> yes it is
00:14:12 <ehird`> the idea is to do that, in BF
00:14:21 <GregorR> bsmntbombdood: Not as bad as getting shot, not as good as fine champagne.
00:15:01 <bsmntbombdood> can it compile the output of a bc->c compiler?
00:15:29 <ehird`> that's not really the same but ok :P
00:15:34 <bsmntbombdood> arrays, pointer manipulation, i/o?
00:15:36 <ehird`> GregorR: how does bf2c handle libs?
00:15:44 <GregorR> c2bf
00:15:52 <ehird`> yes yes
00:15:55 <ehird`> what does it do with, e.g. malloc?
00:16:02 <ehird`> ... what about if you tried to use sockets? you know.
00:16:12 <GregorR> It has no libc :P
00:16:29 <ehird`> so can you not malloc? how does printf work?
00:16:42 <bsmntbombdood> printf can be implemented in C
00:16:59 <bsmntbombdood> given write_char or somesuch
00:17:06 <bsmntbombdood> and varargs :P
00:17:07 <ehird`> is there a write_char? :)
00:17:08 <ehird`> presumably
00:17:15 <GregorR> There is a putchar.
00:17:22 <ehird`> what about malloc
00:17:23 <GregorR> It's something like: asm("."); :P
00:17:25 -!- cpressey has joined.
00:17:28 <ehird`> is there a way to do tape manipulation?
00:17:32 <ehird`> if so i could implement malloc i guess
00:17:40 <ehird`> actually
00:17:46 <ehird`> it'd be a lot easier if you could access the tape as an infinite pointer
00:17:48 <ehird`> well
00:17:48 <bsmntbombdood> given sbrk you can implement malloc in C
00:17:54 <ehird`> the space of tape not being used by c2bf
00:17:58 <ehird`> i.e. no-mans-land
00:18:08 <ehird`> because, a basic allocator is really simple of course
00:18:23 * GregorR reappears.
00:18:43 <GregorR> It divides the tape using that whatsisname's hotel rooms problem.
00:18:50 <GregorR> (Infinite hotel rooms, all full, add more people)
00:19:11 <ehird`> malloc without free: int top = 0; void *malloc(int size) { void *res = no_mans_land[top]; top += size; return res; }
00:19:17 <ehird`> with free requires a bit more, but meh
00:19:30 <ehird`> assuming no_mans_land is c2bf's no-mans-land (i.e. tape not used for c2bf stuff)
00:19:38 <bsmntbombdood> you don't need free when compiling to bf...
00:19:49 * oerjan wonders if there are any bf-hosted languages on at least PEBBLE's level, or if it will be the first when ehird` is finished...
00:20:04 <ehird`> oerjan: bf hosted = compiler in BF?
00:20:05 <ehird`> if so, i doubt it
00:20:11 <ehird`> pebble.bfm will probably be the first
00:20:12 <oerjan> compiler + result
00:20:40 <oerjan> i.e. you need essentially nothing more than a bf interpreter to use it
00:21:49 <oerjan> i guess i mean, the compiler is self-hosting + compiles to bf
00:22:32 <ehird`> GregorR: is there a no_mans_land? :)
00:23:02 <GregorR> Sort of ... not really.
00:23:17 <ehird`> How could I get one? :P
00:23:19 <ehird`> Well, I mean
00:23:25 <ehird`> how can I get some unused space in c2bf?
00:23:27 <ehird`> or rather
00:23:28 <ehird`> any space
00:23:31 <ehird`> that isn't reserved for stack etc
00:23:39 <GregorR> Once a libc is implemented, you'd just up the sbrk.
00:23:45 <GregorR> In short: malloc.
00:23:54 <GregorR> Right now, you don't, C2BF is far from far from far from complete :P
00:24:20 <ehird`> So right now any memory allocation is impossible in c2bf
00:24:22 <ehird`> Right?
00:24:38 <GregorR> Wrong, but you'd have to roll-your-own sbrk.
00:24:47 <GregorR> Right now, the heap is your no-mans-land :P
00:24:53 <GregorR> It's just reserved for the heap in the future.
00:24:54 <ehird`> Ok.
00:24:57 <ehird`> Bah
00:24:58 <ehird`> Ok :P
00:25:04 <ehird`> So, nothing uses the heap right now. correct?
00:25:12 <GregorR> Correct.
00:25:24 <ehird`> Can I programmatically access it?
00:25:26 <ehird`> That is, as a pointer
00:26:17 <oerjan> i.e. can you write c2bf malloc in the C part?
00:26:22 <ehird`> oerjan: obviously
00:26:26 <GregorR> Yes.
00:26:26 <ehird`> but can you, GregorR? :)
00:26:28 <ehird`> Woot
00:26:28 <ehird`> how
00:26:42 <GregorR> You don't want to hear this, it's so hacky X-D
00:26:45 <GregorR> OK, here 'tis:
00:26:57 <ehird`> I just want to know how to get at the heap, with c2bf
00:26:57 <ehird`> :)
00:27:05 <GregorR> Traditional (correct) C: Heap is in one place, stack is in another.
00:27:16 <ehird`> c2bf... intertwined?
00:27:17 <GregorR> C2BF: Heap and stack are in the same place, all pointer math is modulo-2.
00:27:23 <ehird`> Aieeeeeeeeeeeeeeeeee!
00:27:31 <GregorR> SO, the heap is 1, 3, 5, 7, 9, 11, etc.
00:27:33 <ehird`> Ok, while I'm having a seizure, tell me how to programmatically mess with the heap :P
00:27:35 <ehird`> Ahh
00:27:36 <ehird`> Ok
00:27:41 <ehird`> So just cast 'em to a pointer?
00:27:57 <ehird`> So (void *)5 = third heap entry?
00:27:59 <GregorR> Yeah - but no guarantees it'll actually work, I don't really remember how complete C2BF is :P
00:28:58 <ehird`> void *top = (void *)0; void *malloc(int amount) { void *ptr = top; top += amount*2; return ptr; }
00:29:01 <GregorR> And why are you so interested in this?
00:29:21 <ehird`> GregorR: Run bf2c translator on brainfuck code, use c2bf to get significantly larger, slower program
00:29:27 <GregorR> Remember what I said? All pointer math is modulo-2.
00:29:43 <ehird`> Oh.
00:29:51 <ehird`> Ok, that makes things harder
00:29:52 <ehird`> :P
00:29:53 <GregorR> It's like how: int *a = &foo; a += 1; // a is increased by (e.g.) 4
00:30:00 <GregorR> No, it makes things easier.
00:30:03 <ehird`> Oh
00:30:07 <ehird`> I just need top += amount then
00:30:12 <GregorR> Yuh
00:30:20 <oerjan> i don't think modulo-2 is the right word
00:30:22 <ehird`> void *top = (void *)0; void *malloc(int amount) { void *ptr = top; top += amount; return ptr; }
00:30:27 <ehird`> oerjan: yeah, i got confused by that
00:30:37 <ehird`> GregorR: does c2bf work in cygwin?
00:30:37 <GregorR> Oh, it isn't, hahah X-D
00:30:45 <GregorR> ehird`: Idonno, probably?
00:30:53 <GregorR> modulo-2 would mean there are two cells of memory :P
00:30:59 <oerjan> indeed
00:31:12 <ehird`> So
00:31:15 <ehird`> svn.sourceforge.net is down
00:31:17 <ehird`> Who wants to give me c2bf
00:31:35 <GregorR> I don't think I even have a copy on my home computer :P
00:31:49 <ehird`> Who else wants to :P
00:32:08 <oerjan> it's not in the file archive?
00:32:18 <GregorR> No, there are no releases.
00:33:08 <GregorR> And, it could use a rewrite - the method by which I did this nasty stack/heap trick needs to be replaced :)
00:33:28 <ehird`> I JUST WANT A TAR :(
00:33:37 <GregorR> I JUST WANT TO TAR AND FEATHER YOU
00:35:24 <cpressey> GregorR: if stack and heap are in the same place, why not just allocate (chunks of) the stack, on the heap?
00:35:37 <cpressey> makes push and pop a bit more involved i suppose
00:35:49 <ehird`> anyone? :(
00:36:01 <GregorR> Because then you would have either a fixed stack size, or have to maintain multiple stacks >_>
00:36:11 * cpressey gives ehird` Jeffry's BASIC-to-Brainfuck compiler instead
00:36:33 <cpressey> GregorR: I was thinking, store it in chunks, with the chunks linked together... when you run out of stack space in one chunk, allocate another
00:36:34 <ehird`> but i want c2bf
00:36:34 <ehird`> :(
00:39:12 <GregorR> cpressey: Hence multiple stacks.
00:39:38 <cpressey> GregorR: ok -- i thought you meant multiple seperate stacks
00:39:54 <cpressey> instead of what i would call just one stack, broken up :)
00:39:59 <GregorR> Oh, no, just multiple "physical" stacks for one "virtual" stack :)
00:40:01 <ehird`> :|
00:40:30 <cpressey> wow, c2bf is hex for 48955
00:40:55 <bsmntbombdood> so?
00:41:05 <ehird`> anyone have c2bf?
00:41:09 <GregorR> Wow, that's ... a number with no real significance :P
00:41:19 <GregorR> ehird`: I do believe you'll find that nobody has it :)
00:41:24 <ehird`> GregorR: why =(
00:41:29 <cpressey> bsmntbombdood: i did a web search for c2bf and got hex values :)
00:41:33 <GregorR> ehird`: Because it's old and crap? :P
00:41:40 <ehird`> but it's fun
00:41:58 <GregorR> Sure, but until this day nobody has mentioned it for months and months and months :P
00:42:05 <GregorR> Therefore I'm not particularly inclined to finish it.
00:42:26 <bsmntbombdood> GregorR: finish it!
00:42:38 <GregorR> FINISH YOUR FACE
00:42:39 <GregorR> (burn)
00:42:42 <ehird`> i've always found c2bf interesting
00:42:45 <ehird`> i just want a copy
00:42:48 <ehird`> :P
00:42:54 * cpressey wants a hs2bf
00:43:06 <ehird`> that will NEVER happen
00:43:08 <ehird`> i guarantee it
00:43:14 <bsmntbombdood> there's already hs2c
00:43:14 <ehird`> if that ever happens, i will pay you £100
00:43:18 <GregorR> Probably easier to do hs2c and c2buf :)
00:43:19 <ehird`> bsmntbombdood: Fuck.
00:43:23 <GregorR> Erm, c2bf ...
00:43:25 <bsmntbombdood> so when GregorR finishes c2bf...
00:43:27 <ehird`> Uh, I was just joking <.<
00:43:32 <GregorR> Hashahaha
00:43:37 <GregorR> Damn it, typos X_X
00:53:32 <oerjan> doing a garbage collected language with lots of pointer indirection in bf will _not_ be pretty.
00:54:04 <ehird`> oerjan: like said above there's a hs2c
00:54:20 <ehird`> but beh
00:54:22 <ehird`> i want c2bf
01:00:27 <lament> oerjan: you don't _have_ to implement garbage collection
01:02:10 <oerjan> running haskell without garbage collection will _not_ be pretty, either.
01:02:43 <lament> who cares, it's in brainfuck anyway
01:04:28 <GregorR> "The simplest garbage collector is no garbage collector" :P
01:08:02 * cpressey is trying to implement a garbage collector in 6502 asm on the C64
01:09:23 <ehird`> one thing i have always wanted to do is build a system from scratch
01:09:32 <ehird`> homebrew a CPU and put some ram there
01:09:37 <GregorR> PNEUMATIC
01:09:39 <ehird`> get an instruction set working
01:09:46 -!- ihope_ has quit (Connection timed out).
01:09:46 <ehird`> implement some form of an OS
01:09:52 <ehird`> add a programming language
01:09:56 <GregorR> One thing I've always wanted to do but don't have the skills or resources is to make a pneumatic CPU :)
01:10:02 <ehird`> put a simple video card in, attach it to a monitor
01:10:09 <ehird`> make keyboard+mouse work
01:10:18 <ehird`> invent new gui paradigm, code to work on OS with video card in programming language
01:10:21 <ehird`> write software
01:10:27 <ehird`> voila, system from nil
01:10:29 <ehird`> well, nearly nil
01:10:45 <GregorR> You forgot about forging the atoms from the ether.
01:10:53 <ehird`> heh
01:10:58 <ehird`> i'll start at the cpu level i think
01:10:59 <ehird`> but, that would be fun
01:11:03 -!- i4nic8 has joined.
01:11:21 <cpressey> i wanted to build a brainfuck CPU out of TTL chips once
01:11:29 <ehird`> I mean, you might even get interesting results
01:11:37 <cpressey> i also wanted to build an OISC CPU out of discrete transistors
01:11:38 <i4nic8> howzit
01:11:46 <ehird`> A fun experiment would be to connect it to the net and use it and only it for e.g. a month
01:11:57 <ehird`> try and have no preconceptions about what software should be like
01:12:07 <ehird`> i.e. don't mimic anything, just let it work how you think it should intuitively
01:12:23 -!- ihope has joined.
01:12:37 <ehird`> also, using a computer with a whole stack - cpu, isa, proglang&os, gui, software - that you made yourself, would be pretty 1337 :P
01:13:15 <ihope> There's a limit to how much one can make oneself.
01:13:20 <ihope> Are ICs allowed?
01:13:25 <ehird`> ICs being?
01:13:28 <ehird`> sorry, i'm n00b :P
01:13:34 <ihope> Integrated circuits.
01:14:01 <ehird`> I dunno, whatever most homebrew CPUs are
01:14:11 <cpressey> valves
01:14:22 <ehird`> if you could safely say every part of it was made by you (transisitors, etc withstanding) then i guess it'd be ok :P
01:14:24 <GregorR> Again, pneumatic CPU = whoot ^^
01:14:34 <ihope> Yay, fluidics.
01:14:56 <GregorR> I just think watching a pneumatic CPU extremely-slowly calculate 1+1 would be awesome.
01:15:26 <ihope> Extremely slowly? Just blow into it and the result blows out the other end.
01:15:38 <ehird`> One thing I imagine would emerge from a system like I describe
01:15:40 <GregorR> I mean a real CPU - programmable.
01:15:40 <ehird`> is extreme mouse-use
01:15:44 <ihope> Oh.
01:15:54 <ehird`> mice actually tend to come out /faster/ than keyboards, in practice, when the interface is good
01:15:59 <ehird`> contrary to actually most research
01:16:10 <ihope> You know, I think I'm comfortable just making the software myself.
01:16:16 <ehird`> ;)
01:16:19 <GregorR> ehird`: Touchscreen > both
01:16:31 <ehird`> GregorR: OK let's assume this custom computer has a budget
01:16:34 <ehird`> A very small budget
01:16:36 <GregorR> Hahaha
01:16:45 <ehird`> Let's assume that everything should be as low powered as possible while still producing a useful machine
01:16:49 <GregorR> I would just try to build LCARS :P
01:17:00 <ehird`> (of course every part of current computers are bloated so you can't really use their specs to compare:P)
01:17:14 <GregorR> The more I use a tablet PC, the more I realize that LCARS is the best UI imaginable.
01:17:44 <ihope> LCARS?
01:17:46 * cpressey wants to know whatever happened to light pens
01:17:56 <ehird`> I might try that from-scratch computer
01:17:56 <ihope> Is that a type of brain interface?
01:17:59 <ehird`> PROBLEM: I suck at everything
01:18:01 <GregorR> ihope: LCARS is the computer system on Star Trek (>NG)
01:18:18 <ehird`> I could never make a cpu, I would probably stumble designing an ISA, I would have much trouble programming it - especially a full OS
01:18:19 <ehird`> etc :P
01:19:15 <ihope> Don't make a CPU; use a really cheap one.
01:19:25 <ehird`> No
01:19:27 <ehird`> That's not from scratch
01:19:28 <ehird`> :P
01:19:39 <ehird`> I mean, using an external CPU you get locked into an ISA etc
01:19:48 <ehird`> That forces you into a certain other-persons model of thinking
01:19:52 <ehird`> That's against the spirit of the idea
01:19:54 <ihope> I see.
01:20:05 <ihope> Make it be cellular automata, then!
01:20:13 <ehird`> xD no
01:20:45 <ihope> No?
01:21:00 <ihope> Quit ridiculing my greatest idea! :-P
01:21:05 <ehird`> :P
01:24:39 <i4nic8> oh snap someone wrote a quine for my esolang rofl
01:25:00 <ihope> Which esolang is that?
01:25:04 <i4nic8> http://koti.mbnet.fi/yiap/programs/phawn/kquine.phn
01:25:07 <i4nic8> phawn
01:25:24 <ehird`> wow
01:25:35 <ehird`> somebody likes your language apparently
01:25:45 <i4nic8> cool
01:25:47 <i4nic8> http://esolangs.org/wiki/PHAWN
01:25:57 <ehird`> ahh keymaker
01:26:13 <i4nic8> is he a regular on the wiki?
01:26:29 <i4nic8> or, enjoys writing quines?
01:26:30 <ehird`> he just writes an awful lot of quines etc
01:26:54 <i4nic8> lol
01:27:32 <i4nic8> he helped me fix the interpreter too
01:32:18 <ehird`> So
01:32:26 <ehird`> Who thinks I should try that from-scratch idea? ;)
01:33:11 <i4nic8> the brainfuck cpu?
01:33:18 <ehird`> naw
01:34:27 <i4nic8> which one?
01:34:52 <ehird`> you weren't in here for it
01:35:49 -!- bsmntbombdood_ has joined.
01:37:50 <i4nic8> ic
01:40:02 <ehird`> anyone have comments? ;)
01:42:03 <cpressey> ehird`: "cheap" and "simple" and "low-power" and "non-preconceived idea of an isa" are conflicting requirements
01:42:15 <cpressey> although i guess you didn't say "simple"
01:42:47 <ehird`> cpressey: ;)
01:42:55 <cpressey> if cheap, i'd go with a Z80 cpu and maybe wire it up after i've had a few, to make it interesting
01:43:44 <ehird`> megh
01:43:45 <ehird`> anyway
01:43:48 <ehird`> i'm going now
01:43:50 <cpressey> if non-preconceived... use a FPGA or discrete ICs... depending on how much soldering you want to do
01:43:52 <ehird`> see you all tomorrow :)
01:43:55 <cpressey> ok, cya ehird`
01:43:59 <ehird`> and porbably fpga
01:44:20 -!- bsmntbom1dood has joined.
01:44:48 <bsmntbombdood_> how to get rid of all this <<<<<<.>>>>>>
01:45:06 <i4nic8> ounch a child
01:45:39 -!- ehird` has quit (Read error: 104 (Connection reset by peer)).
01:46:33 -!- bsmntbombdood_ has quit.
01:47:08 -!- bsmntbombdood has quit (Nick collision from services.).
01:47:13 -!- bsmntbom1dood has changed nick to bsmntbombdood.
01:48:12 -!- i4nic8 has quit ("ChatZilla 0.9.78.1 [Firefox 2.0.0.9/2007102514]").
02:04:39 -!- Tritonio has quit (Remote closed the connection).
02:57:21 -!- ihope has quit (Read error: 110 (Connection timed out)).
03:24:36 -!- Sgeo has joined.
04:55:26 -!- cpressey has quit (Read error: 110 (Connection timed out)).
06:42:35 -!- Sgeo has quit (Read error: 110 (Connection timed out)).
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:28:34 -!- oerjan has quit ("leaving").
08:38:30 <ttm> Here's a simple program that outputs 2^(2^65536) bytes. Add another '+' to the start and it will output 2^(2^(2^65536)) bytes, and so on.
08:38:44 <ttm> +++++++[>>+<[>[>+<-]>[<++>-]<<-]>[<+>-]<<-]>[.-]
08:41:07 <ttm> (Naturally, this assumes integer cells as in ihope's challenge. And it's way too tidy to be the best answer for this length.)
08:59:19 <bsmntbombdood> haha
09:42:53 -!- sebbu2 has changed nick to sebbu.
09:58:11 -!- bartw has quit.
10:04:30 -!- bartw has joined.
10:45:34 <ttm> Hey bsmnt. >>>>>>>>>++++++++[<[++<]++[>]<-]<[<]>[[<++++++++>-]>]
10:48:13 <ttm> bsmntbombdood and depending on what context you need it in, you may be able to lose the >>>>>>>>> and/or the <[<] part.
11:10:51 -!- bartw has left (?).
11:42:56 -!- jix has joined.
12:03:12 -!- SEO_DUDE56 has quit (Remote closed the connection).
12:13:19 -!- RedDak has joined.
12:23:06 -!- SEO_DUDE56 has joined.
13:07:48 -!- RedDak has quit (Remote closed the connection).
13:36:21 -!- ihope_ has joined.
13:36:36 -!- ihope_ has changed nick to ihope.
13:38:12 -!- ihope has quit (Client Quit).
14:05:40 -!- RedDak has joined.
14:20:37 -!- ehird` has joined.
14:20:55 <ehird`> ooh, ololobot
14:20:58 <ehird`> oklopol: anything changed with it?
14:31:41 -!- RedDak has quit (Remote closed the connection).
14:42:52 -!- ihope has joined.
15:01:37 <oklopol> ehird`: not really.
15:01:45 <oklopol> >>> numbda "o\no"
15:01:46 <ololobot> o\no
15:01:54 <oklopol> i added that, but it's on the other ololobot
15:01:55 <ehird`> defmacro? :P
15:01:55 <oklopol> :)
15:02:03 <oklopol> i mean, added multiple lines
15:02:10 <ehird`> other ololobot?
15:02:21 <oklopol> on my other comp, the real ololobot
15:02:33 <oklopol> this one is just an old version i opened since you asked
15:03:06 <ehird`> hahah
15:57:05 -!- ihope has quit (Read error: 104 (Connection reset by peer)).
16:29:04 -!- Tritonio has joined.
16:49:58 <ehird`> I'm implementing a GC in Python, am I crazy?
16:50:09 <ehird`> (it's for something similar to oklopol's lisp, but more complete :))
16:51:44 -!- puzzlet has quit ("Lost terminal").
17:15:26 -!- bsmntbom1dood has joined.
17:24:10 -!- puzzlet has joined.
17:26:14 -!- bsmntbombdood has quit (Read error: 110 (Connection timed out)).
17:27:46 -!- jix has quit (Nick collision from services.).
17:27:54 -!- jix has joined.
17:32:16 <ehird`> oklopol: hey, how do i set values in scope with olololisp
17:32:20 <ehird`> >>> sch (set a 1)
17:32:23 <ehird`> >>> a
17:32:37 <oklopol> huh?
17:32:52 <oklopol> >>> sch (define a 1)
17:32:53 <ololobot> ()
17:32:55 <oklopol> >>> sch a
17:32:56 <ololobot> 1
17:32:59 <oklopol> ?
17:33:00 <ehird`> define is global
17:33:02 <ehird`> no?
17:33:07 <oklopol> ya
17:33:12 <ehird`> what about local
17:33:13 <oklopol> well...
17:33:13 <oklopol> hmm
17:33:31 <ehird`> (set a 1) would set a in the very topmost scope
17:33:35 <oklopol> >>> sch ((lambda () (define a 1)))
17:33:36 <ololobot> ()
17:33:36 <ehird`> i.e. local var
17:33:40 <oklopol> like that.
17:33:45 <ehird`> >>> sch a
17:33:45 <ololobot> 1
17:33:49 <ehird`> O RLY
17:33:50 <oklopol> >>> sch ((lambda () (define a 4)))
17:33:51 <ololobot> ()
17:33:52 <oklopol> >>> sch a
17:33:53 <ololobot> 1
17:33:54 <ehird`> ah
17:33:55 <ehird`> ok
17:33:56 <ehird`> thanks :)
17:34:19 <oklopol> isn't it always like that?
17:34:35 <ehird`> >>> sch (define test (lambda () (define test2 (lambda () x)) (define x 2) (test2)))
17:34:36 <ololobot> ()
17:34:40 <ehird`> >>> sch (test)
17:34:41 <ololobot> ()
17:34:51 <ehird`> i'm... pretty sure that's not right
17:34:55 <ehird`> it should give a variable definition error
17:34:58 <ehird`> since in the scope x is not defined
17:35:07 <oklopol> hmm
17:35:09 <oklopol> >>> sch drhg
17:35:10 <ololobot> None
17:38:03 -!- ttm has quit ("Seeeeeya").
17:38:10 -!- ttm has joined.
17:38:31 <ehird`> phew
17:38:33 <ehird`> i just implemented my lisp
17:38:40 <ehird`> well, all of the types
17:38:44 <ehird`> now i need to do some minimal eval stuff
17:38:48 <ehird`> and the stdlib
17:40:22 <oklopol> fast
17:41:07 <ehird`> ;)
17:41:19 <ehird`> technically, i still need to do the gc
17:41:24 <ehird`> but i'm leaving that for later
17:41:40 <ehird`> (i've stopped python collecting itself by pushing every object to an array called "heap" :D)
17:41:41 <oklopol> what do you use gc for
17:41:48 <oklopol> myeah
17:41:49 <ehird`> garbage collecting
17:41:52 <ehird`> :P
17:42:24 <oklopol> put it on
17:42:41 <ehird`> nah
17:42:47 <ehird`> i need to implement:
17:42:51 <ehird`> 1. some simple scoping functions
17:42:57 <ehird`> 2. parsing
17:43:05 <ehird`> 3. the actual functions - right now you can't actually do anything, but all the code is there
17:43:12 <ehird`> won't take long
17:43:15 <oklopol> scoping was the only part that took time in my implementation
17:43:25 <ehird`> i've actually done the lexical scoping for functions
17:43:54 <oklopol> yar
17:43:56 <ehird`> my LFunc class is ridiculously simple
17:43:57 <ehird`> http://rafb.net/p/LJGsOA14.html
17:45:15 <ehird`> Damnit!
17:45:18 <ehird`> I forgot to make LString
17:45:52 -!- ttm has changed nick to dbc.
17:48:41 <ehird`> OK! All done apart from parsing and stdlib (stdlib includes e.g. lambda ;))
17:50:28 <ehird`> >>> sch (1 . 2)
17:50:29 <ololobot> not-callable(1)
17:50:37 <ehird`> you don't support (x . y) syntax?
17:50:37 <ehird`> good
17:50:39 <ehird`> i don't have to, then
17:50:40 <ehird`> ;)
17:51:04 <oklopol> heh
18:04:17 <ehird`> back
18:05:01 -!- bsmntbombdood has joined.
18:07:23 <ehird`> now i'm doing the parser
18:09:59 <ehird`> >>> sch "lollerburger"
18:10:00 <ololobot> None
18:10:03 <ehird`> hm
18:10:06 <ehird`> no string parsing oklopol?
18:13:27 <oklopol> nope :)
18:13:40 <oklopol> >>> numbda "has it"
18:13:40 <ololobot> has it
18:14:04 <ehird`> numbda isn't lisp though, no?
18:14:08 <ehird`> >>> numbda (lambda (x) x)
18:14:09 <ololobot> error:syntax:multiple-adjacent-objokens
18:14:30 <oklopol> >>> numbda {A->A}
18:14:30 <ololobot> lazy:[apply opr:-> to id:A(0) and id:A(0)]
18:14:36 <oklopol> >>> numbda {A->A}!3
18:14:36 <ololobot> num:3
18:15:03 <ehird`> hmm
18:15:05 <ehird`> numbda == oklotalk?
18:15:12 <oklopol> no
18:15:26 <oklopol> although some of it is legal oklotalk.
18:15:35 <oklopol> since oklotalk is pretty flexible
18:16:02 -!- bsmntbom1dood has quit (Read error: 110 (Connection timed out)).
18:19:07 <oklopol> 2 The earth was without form, and void; and darkness was on the face of the deep. And the Spirit of God was hovering over the face of the waters. <<< what's "being on the face of the deep"?
18:19:40 <oklopol> there is something deep, and over it there's darkness?
18:20:05 <ehird`> the bible isn't meant to make sense
18:20:09 <oklopol> :P
18:22:31 <ehird`> hmm
18:22:32 <ehird`> bugs in parser
18:22:35 <ehird`> ((lambda (x) x) 2) is not parsing
18:23:00 <ehird`> ah i see
18:24:09 <ehird`> hehe, my parser recurses like hell
18:26:39 <ehird`> hah
18:26:39 <ehird`> return LCons(parse(string), parse_list(string))
18:26:49 <ehird`> parse* modify string, so that is actually right
18:26:49 <ehird`> :)
18:36:14 <ehird`> ( . (<error unmatched )> . NIL))
18:36:17 <ehird`> not meant to happen!
18:39:59 <bsmntbombdood> dbc: nice
18:42:54 <ehird`> >>> sch -5
18:42:55 <ololobot> -5
18:42:58 <ehird`> >>> sch (+ -5 1)
18:42:58 <ololobot> -4
18:43:08 <ehird`> >>> sch 5.4
18:43:09 <ololobot> None
18:43:15 <ehird`> i should probably handle -
18:46:54 <ehird`> oklopol: :D it's almost done!
18:47:00 <ehird`> then i can write some functions...
18:47:00 <ehird`> ... like lambda...
18:47:42 <bsmntbombdood> lambda isn't a function
18:48:38 <ehird`> it is in mine :)
18:48:57 <ehird`> special forms are just functions with evalargs=false
18:51:08 <ehird`> loooool
18:51:08 <ehird`> error, not callable: error, not callable: error, unbound symbol: lambda
18:52:48 -!- Tritonio has quit (Read error: 104 (Connection reset by peer)).
18:56:29 <ehird`> woot
18:56:33 <ehird`> oklopol: parser, evaller, works :)
18:56:35 <ehird`> now for stdlib
18:59:21 <oklopol> i actually realized you weren't nearly as fast as i thought
18:59:31 <oklopol> time is slipping again
18:59:50 <oklopol> i think i'll translate genesis to my language today
19:00:12 <ehird`> my interp is currently 324 lines
19:00:12 <ehird`> :D
19:02:43 <oklopol> is that a lot or a little
19:02:44 <oklopol> ?
19:03:19 -!- bsmntbom1dood has joined.
19:06:06 <ehird`> dunno
19:06:06 <ehird`> :P
19:06:19 <ehird`> its quite a mess
19:07:58 <ehird`> yay, writing lambda!
19:08:58 <ehird`> my code for defining a function written in Python looks like some kind of c calling interface
19:08:59 <ehird`> scope[0][SymbolF("lambda")] = LFunc(p_lambda, (-1, ""), False)
19:14:45 -!- bsmntbombdood has quit (Read error: 110 (Connection timed out)).
19:17:56 <ehird`> woot!!
19:18:00 <ehird`> oklopol: it works! :)
19:18:47 <ehird`> oklopol: http://rafb.net/p/ijMepf32.html
19:19:01 <ehird`> time for a gc
19:19:03 <ehird`> methinks
19:19:22 * oklopol want in bot it.
19:19:35 <ehird`> all it has right now is lambda :P
19:19:36 <ehird`> but ok
19:19:42 * ehird` hooks up quick irc bot
19:19:47 <ehird`> what's the IRC message syntax again?
19:19:48 <ehird`> it's:
19:19:59 <oklopol> PRIVMSG #channel :sadoijfoidjhitr eotihjerg iajergoi
19:20:05 <oklopol> orrr whutta ya mean?
19:20:09 <ehird`> You have stuff in front of it too
19:20:10 <ehird`> i think
19:20:15 <oklopol> nope
19:20:16 <oklopol> ioh
19:20:17 <ehird`> :asdfsdf PRIVMSG #channel :adbsad
19:20:20 <ehird`> yeah
19:20:21 <oklopol> well yeah, when you receive
19:20:21 <ehird`> you do
19:20:31 <oklopol> it's <maskity maskity> PRIVMSG #channel :asdfiugh aeuhg
19:20:38 <oklopol> <maskity maskity> is teh hostmasker
19:25:36 <ehird`> almost done with the bot oklopol
19:29:15 <ehird`> oklopol: is there a way to read one line from a socket? :|
19:33:55 -!- bsmntbombdood has joined.
19:37:01 <ehird`> ok
19:37:03 <ehird`> here he comes
19:37:06 <ehird`> > code
19:37:08 -!- lithp has joined.
19:37:08 <ehird`> to eval lisp code
19:37:16 <ehird`> arg
19:37:18 <ehird`> registered
19:37:19 -!- lithp has quit (Remote closed the connection).
19:37:25 -!- ehird` has changed nick to lithpbot.
19:38:06 <lithpbot> ok
19:38:08 <lithpbot> here he comes
19:38:14 -!- lithp has joined.
19:38:15 <lithpbot> oklopol: > code means "eval code"
19:38:17 <lithpbot> > 2
19:38:23 <lithpbot> allow me to rephrase
19:38:25 <lithpbot> it SHOULD mean that
19:38:36 -!- lithp has quit (Remote closed the connection).
19:38:59 <lithpbot> ok
19:39:04 <oklopol> heh
19:39:07 -!- lithp has joined.
19:39:07 -!- lithpbot has changed nick to ehird`.
19:39:08 -!- lithp has quit (Remote closed the connection).
19:39:10 <ehird`> baah
19:39:10 <ehird`> ok
19:39:12 <ehird`> #esoteric-blah
19:39:12 <ehird`> ;P
19:39:15 <oklopol> :D
19:39:32 -!- lithpbot has joined.
19:40:02 <oklopol> surry
19:40:30 -!- lithpbot has quit (Remote closed the connection).
19:40:41 -!- lithpbot has joined.
19:41:04 -!- lithpbot has quit (Remote closed the connection).
19:41:30 -!- lithpbot has joined.
19:41:33 -!- lithpbot has quit (Remote closed the connection).
19:42:04 -!- lithpbot has joined.
19:42:39 -!- ehird` has changed nick to lithpbo1.
19:42:43 -!- lithpbot has quit (Remote closed the connection).
19:42:44 -!- lithpbo1 has changed nick to lithpbot.
19:43:22 -!- bsmntbom1dood has quit (Read error: 110 (Connection timed out)).
19:43:33 -!- bsmntbom1dood has joined.
19:43:53 -!- lithpbot has changed nick to ehird`.
19:44:26 -!- lithpbot has joined.
19:44:48 <ehird`> oklopol: It's done! :D #esoteric-blah
19:44:57 -!- lithpbot has quit (Remote closed the connection).
19:46:46 -!- lithpbot has joined.
19:46:59 -!- lithpbot has quit (Remote closed the connection).
19:47:05 <ehird`> Oops.
19:47:09 <ehird`> quitspam :P
19:47:10 -!- lithpbot has joined.
19:47:14 <ehird`> that's all over now
19:47:15 <ehird`> it works
19:47:55 -!- lithpbot has quit (Remote closed the connection).
20:04:33 -!- lithpbot has joined.
20:04:56 -!- lithpbot has quit (Remote closed the connection).
20:05:18 -!- lithpbot has joined.
20:05:38 -!- lithpbot has quit (Remote closed the connection).
20:06:03 -!- lithpbot has joined.
20:06:38 -!- lithpbot has quit (Remote closed the connection).
20:07:12 -!- bsmntbom1dood has quit (Read error: 104 (Connection reset by peer)).
20:07:35 -!- lithpbot has joined.
20:08:00 -!- bsmntbom1dood has joined.
20:08:32 -!- lithpbot has quit (Remote closed the connection).
20:08:43 -!- lithpbot has joined.
20:08:46 -!- lithpbot has quit (Remote closed the connection).
20:09:25 -!- lithpbot has joined.
20:09:30 -!- lithpbot has quit (Remote closed the connection).
20:10:03 -!- lithpbot has joined.
20:10:54 -!- lithpbot has quit (Remote closed the connection).
20:11:05 -!- lithpbot has joined.
20:11:29 -!- lithpbot has quit (Remote closed the connection).
20:11:52 -!- lithpbot has joined.
20:13:43 -!- lithpbot has quit (Remote closed the connection).
20:14:38 -!- oerjan has joined.
20:14:44 -!- lithpbot has joined.
20:15:53 -!- lithpbot has quit (Remote closed the connection).
20:16:42 -!- lithpbot has joined.
20:16:45 -!- lithpbot has quit (Remote closed the connection).
20:17:49 <oerjan> darn i was just going to test (LITHT (PLUTH 2 2) (TIMETH 3 3))
20:18:49 -!- lithpbot has joined.
20:18:53 -!- lithpbot has quit (Remote closed the connection).
20:19:39 -!- lithpbot has joined.
20:19:49 <oerjan> (LITHT (PLUTH 2 2) (TIMETH 3 3))
20:19:53 <ehird`> you need > code
20:19:54 <ehird`> not code
20:20:06 <ehird`> > (LITHT (PLUTH 2 2) (TIMETH 3 3))
20:20:06 <lithpbot> error, unbound symbol: LITHT
20:20:08 <ehird`> :)
20:20:27 <oerjan> > (PLUTH 2 2)
20:20:28 <lithpbot> error, unbound symbol: PLUTH
20:20:39 <ehird`> no arithmetic atm
20:21:23 <oerjan> > (CONTH 1 (CONTH 1 NIL))
20:21:47 <oklopol> > ul ```skki
20:21:47 <lithpbot> error, unbound symbol: ul
20:21:53 <oklopol> > sk ```skki
20:21:54 <lithpbot> error, unbound symbol: sk
20:21:58 <oklopol> ...
20:22:00 <oklopol> i fail
20:22:02 <oklopol> >>> sk ```skki
20:22:03 <ololobot> -> i
20:22:12 <ehird`> oerjan: i don't even hvae cons! ;)
20:22:21 <oerjan> no p in the repl?
20:22:31 -!- lithpbot has quit (Remote closed the connection).
20:22:37 <oerjan> em, does it have any functions at all?
20:23:09 <ehird`> yeah, it does have functions
20:23:11 -!- lithpbot has joined.
20:23:20 <ehird`> > (def id (x) x)
20:23:20 <lithpbot> <function at 0x16>
20:23:23 <ehird`> > (id 2)
20:23:23 <lithpbot> 2
20:23:29 <ehird`> > (if #t 1 2)
20:23:30 <lithpbot> 1
20:23:36 <ehird`> > (set a 2)
20:23:36 <lithpbot> 2
20:23:38 <ehird`> > a
20:23:38 <lithpbot> 2
20:23:50 <ehird`> #esoteric-blah if you want to test it, to avoid spamming here
20:23:56 <oerjan> don't you mean THET?
20:24:18 <oerjan> something tells me this is not quite LITHP
20:24:36 <ehird`> lithpbot is just a name :P
20:24:50 <oklopol> >>> sch (define s (lambda (a) (lambda (b) (lambda (c) ((a c) (b c))))))
20:24:51 <ololobot> ()
20:25:05 <ehird`> oklopol: my lexical scoping is borked
20:25:06 <oklopol> >>> sch (define k (lambda (a) (lambda (b) a)))
20:25:07 <ololobot> ()
20:25:07 <oerjan> waa, giving us false hopes :(
20:25:13 <oklopol> >>> ((k 5) 2)
20:25:14 <ehird`> oerjan: aww
20:25:17 <oklopol> >>> sch ((k 5) 2)
20:25:17 <ololobot> 5
20:25:26 <ehird`> oklopol: MY LEXICAL SCOPING IS BROKEN
20:25:29 <oklopol> >>> sch (((s k) k) 9)
20:25:30 <ololobot> 9
20:25:40 <oklopol> BUT I WAS SCARED I FAILED
20:25:47 <oklopol> luckily i didn't
20:26:06 -!- lithpbot has quit (Remote closed the connection).
20:26:10 <ehird`> added scoping debug
20:26:15 <ehird`> i'll find out what's wrong with set
20:26:18 -!- lithpbot has joined.
20:26:20 -!- lithpbot has quit (Remote closed the connection).
20:26:20 <oklopol> kayzorz
20:26:26 <ehird`> Hah.
20:26:48 * oklopol dances a little dance for having made a workind lexical scoping faster
20:26:50 <oklopol> *working
20:27:03 -!- sebbu has quit (Connection timed out).
20:27:12 -!- lithpbot has joined.
20:27:12 <ehird`> lexical scoping is hard when your implementation sucks
20:27:13 <ehird`> :P
20:27:15 -!- lithpbot has quit (Remote closed the connection).
20:27:22 <oklopol> heh
20:27:27 <oklopol> iqkdo gcsieegubue goupeievife devezzda gesemoevevi goceliekuemua liekue gos^yeliehmerylieede gozoleydiedeyni viekue miekue deisoekue
20:28:42 <oerjan> that a real language? o_O
20:28:45 <ehird`> ATTEMPT #45056
20:28:47 <ehird`> oerjan: oklopol's
20:28:50 -!- lithpbot has joined.
20:29:33 <oklopol> oerjan: yeah!
20:29:53 <oklopol> vocabulary may change completely, but i think semantics are ready.
20:29:56 <oklopol> i mean
20:29:58 <oklopol> err
20:29:59 <oklopol> syntax
20:30:00 <oklopol> grammar
20:30:03 <oklopol> whatever :)=
20:31:00 <oerjan> polysynthetic?
20:31:29 <oerjan> given those long words...
20:32:17 <oklopol> hmm, what's polysynthetic? :)
20:33:00 <oerjan> when one word combines what is several words, or even a whole sentence in other languages
20:34:25 <oerjan> Greenlandic is one example
20:35:03 <oklopol> hmm
20:35:38 <oklopol> well, basically you can just squeeze sentences into single words, since parsing is unambiguous... at least i think (..hope) it now is
20:36:08 <oklopol> >>> (define test lambda (a) b)
20:36:09 <oerjan> http://en.wikipedia.org/wiki/Polysynthetic_language
20:36:13 <oklopol> >>> (define b 7)
20:36:18 <oklopol> >>> sch (define test lambda (a) b)
20:36:19 <ololobot> ()
20:36:23 <oklopol> >>> sch (define b 7)
20:36:24 <ololobot> ()
20:36:32 <oklopol> >>> sch (test 6)
20:36:43 <oklopol> >>> sch (define test (lambda (a) b))
20:36:43 <ololobot> ()
20:36:46 <oklopol> >>> sch (test 6)
20:36:46 <ololobot> 7
20:36:50 <oklopol> :DDDD
20:37:00 <oklopol> okay... i also have dynamic scoping xD
20:37:07 <ehird`> hahahahaha
20:37:33 <ehird`> yeah
20:37:53 <oklopol> i realized that as i was looking at my implementation, kinda lolled
20:38:40 <ehird`> so who actually knows how to implement lexical scoping? :p
20:39:30 <oklopol> that's trivially made lexical if you just check every variable is actually bound when you make a lambda
20:39:44 <ehird`> so like what?
20:39:45 <oklopol> but i'm not gonna add that, since i kinda like it now :))
20:39:52 <ehird`> oh
20:39:54 <ehird`> mine isn't?
20:39:56 <ehird`> i mean
20:39:59 <ehird`> mine isn't trivially made lexical
20:40:00 <ehird`> ?
20:40:03 <oklopol> i meant mine
20:40:07 <ehird`> aw
20:40:12 <oklopol> (ehird`) so who actually knows how to implement lexical scoping? :p <<< i was referring to this.
20:40:27 -!- sebbu has joined.
20:40:41 <ehird`> ok
20:42:00 <oklopol> does lConst work?
20:42:02 <oklopol> ...
20:42:04 <oklopol> lCons
20:42:10 <oklopol> ...LCons
20:42:46 <ehird`> it's a cons structure...
20:42:48 <ehird`> (a . b)
20:42:54 <ehird`> (car that) -> a
20:42:57 <ehird`> (cdr that) -> b
20:43:08 <oklopol> i kinda guessed that. now does it work?
20:43:08 <ehird`> a list is (e1 . (e2 . (e3 . ())))
20:43:20 <ehird`> umm
20:43:21 <ehird`> look at it
20:43:22 <ehird`> it works
20:43:32 <ehird`> what is confusing about it
20:43:33 <oklopol> hehe, actually, how could it not work ;)
20:43:42 <oklopol> i read code very slowly.
20:44:19 <oklopol> lookup has a fun implementation
20:44:33 <oklopol> you have the same stack structure i have
20:44:43 <ehird`> of course
20:44:52 <ehird`> the stack itself is fine
20:44:56 <ehird`> it'd the binding that's up
20:45:04 <ehird`> presumably LFunc is where I go wrong
20:45:09 <ehird`> specifically self.closure = scope[:]
20:46:22 <oklopol> hmm
20:46:33 <oklopol> you don't need to save *everything* in the closure
20:46:36 <oklopol> just what's used
20:46:55 <ehird`> yeah but that shouldn't be the problem
20:46:57 <ehird`> .. should it?
20:47:00 <oklopol> nope.
20:47:09 <ehird`> global scope
20:47:09 <ehird`> old_scope = scope[:] # poof
20:47:09 <ehird`> scope = self.closure # zoop
20:47:11 <ehird`> maybe thats wrong
20:47:20 <oklopol> yeah
20:47:39 <oklopol> you should just push the closure on the scope, methinks.
20:47:55 <ehird`> ok
20:47:56 <ehird`> so
20:48:02 <ehird`> scope.extend(self.closure)
20:48:19 <ehird`> then pop off the scope len(self.closure) times?
20:48:37 <oklopol> scope.extend?
20:48:37 <oklopol> hmm.
20:48:41 <ehird`> scope is a list
20:48:49 <ehird`> x.extend(y) is x = x + y, for lists
20:48:50 <ehird`> but quicker
20:49:05 -!- lithpbot has quit (Remote closed the connection).
20:49:07 <ehird`> anyway
20:49:09 <ehird`> i did that
20:49:12 <ehird`> let's see how it goes
20:49:18 -!- lithpbot has joined.
20:49:27 <ehird`> > (set a 2)
20:49:28 <lithpbot> 2
20:49:28 <ehird`> > a
20:49:29 <lithpbot> 2
20:49:29 <oklopol> didn't know that, weird.
20:49:39 <ehird`> > (def get-a () a)
20:49:40 <lithpbot> <function at 0x3b>
20:49:43 <ehird`> > (get-a)
20:49:43 <lithpbot> 2
20:49:44 <oklopol> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
20:49:44 <lithpbot> <function at 0x8b>
20:49:46 <oklopol> esesesese
20:49:46 <ehird`> sto
20:49:47 <ehird`> stop
20:49:47 <ehird`> STOP
20:49:48 <ehird`> STOP
20:49:54 <ehird`> > (set a 5)
20:49:55 <lithpbot> 5
20:49:56 <ehird`> > (get-a)
20:49:57 <lithpbot> 5
20:49:58 <oklopol> :<
20:49:58 <ehird`> ok
20:50:00 <ehird`> that is broken
20:50:01 <ehird`> correct?
20:50:01 <oklopol> what a meanie.
20:50:23 <ehird`> (set a 2) (def get-a () a) (set a 5) (get-a) should return 2 right
20:50:26 <oklopol> well broken in that it's not lexical
20:50:36 <oklopol> err
20:50:40 <oklopol> yeah.
20:50:50 <ehird`> ok, i think i get it
20:50:51 <ehird`> so
20:50:57 <ehird`> what is the best way to get the closure?
20:51:01 <ehird`> loop through, check for symbols?
20:51:04 <ehird`> that's ugly, slow
20:51:13 <oklopol> it should be correct already.
20:51:17 <oklopol> and no, it's not slow or ugly.
20:51:30 <oklopol> of course you have to check what variables a lambda encloses...
20:51:44 <oklopol> if you don't, you *have* to save every variable in the closure.
20:51:52 <ehird`> yeah
20:51:52 <ehird`> i guess
20:51:57 <ehird`> i think my implementation is kinda broken
20:51:59 <ehird`> don't you?
20:52:01 <oklopol> you can just do that while parsing.
20:52:30 <oklopol> hmm... well we know it *is* broken in that the closures don't work, but i can't really say what's broken.
20:52:38 <ehird`> well, i mean
20:52:42 <ehird`> i thought about it the wrong way
20:52:43 <ehird`> from the start
20:53:32 <oklopol> rewriting a program is often more fruitful than debugging it.
20:53:51 <ehird`> you're the anti-joel
20:54:11 <oklopol> I AM TEH ANTICHRIST
20:54:11 -!- lithpbot has quit (Remote closed the connection).
20:54:24 <ehird`> ono
20:54:41 <ehird`> ok
20:54:43 <ehird`> Lisp, mark two
20:54:51 <ehird`> #esoteric-blah
20:55:56 <ehird`> oklopol: ping #esoteric-blah
20:56:56 <ehird`> sheesh
20:59:29 -!- bsmntbom1dood has quit (Read error: 104 (Connection reset by peer)).
20:59:42 -!- bsmntbom1dood has joined.
21:13:34 <bsmntbombdood> i think the word for the time complexity of this algorithm is "fuck-assly slow"
21:14:54 <oklopol> what algo?
21:15:32 <bsmntbombdood> bf text generation
21:16:07 <oklopol> can you specify a bit?
21:16:23 <bsmntbombdood> it's hard to explain
21:22:15 <bsmntbombdood> http://pastebin.ca/760176
21:22:18 <bsmntbombdood> there's the code though
21:23:15 <oklopol> sex + pee = heaven
21:23:39 <bsmntbombdood> indeed
21:25:03 <bsmntbombdood> i think its time complexity is O(l**2 * f**l)
21:25:20 <oklopol> what's f?
21:25:59 <bsmntbombdood> the length of the tape
21:28:31 <bsmntbombdood> goddamn
21:28:38 <bsmntbombdood> i started doing hello world like 10 minutes ago
21:33:33 -!- Sgeo has joined.
21:35:30 -!- pikhq has joined.
21:36:27 <oklopol> >>> (define a 7)
21:36:30 <oklopol> >>> sch (define a 7)
21:36:31 <ololobot> ()
21:36:39 <oklopol> >>> sch (lambda (b) a)
21:36:40 <ololobot> <lambda>
21:36:45 <oklopol> >>> sch (define c (lambda (b) a))
21:36:46 <ololobot> ()
21:36:49 <oklopol> >>> sch (define a 7)
21:36:49 <ololobot> ()
21:36:52 <oklopol> >>> sch (define a 4)
21:36:52 <ololobot> ()
21:36:58 <oklopol> >>> sch (c 6)
21:36:59 <ololobot> 7
21:37:04 <oklopol> it's lexical alright
21:37:04 <pikhq> ehird`: Any progress?
21:37:09 <ehird`> pikhq: on...
21:37:46 <pikhq> pebble.bfm
21:37:58 <bsmntbombdood> STILL going
21:38:06 <ehird`> pikhq: doh
21:39:16 <bsmntbombdood> and i thought EgoBot's algorithm was slow
21:41:48 <bsmntbombdood> hmmm, it is very parellizable
21:49:06 <bsmntbombdood> who wants to set up a cluster for it?
21:58:03 <oerjan> oklopol: in scheme, define usually doesn't create a new variable if there is already one in the exact same scope
21:58:10 <oerjan> iirc
21:58:34 <oerjan> in other words, (c 6) should have returned 4
21:59:19 <oerjan> (ML does it the other way around, btw)
22:00:43 <oklopol> err hwat
22:01:32 <oerjan> if there is already an a defined at the same level, (define a 4) in scheme acts as (set! a 4)
22:01:40 <oklopol> oh.
22:01:53 <oerjan> and any old references to a will get the update
22:02:17 <oklopol> i don't really know the imperative side of scheme
22:02:28 <oklopol> actually
22:02:33 <oklopol> i don't really know scheme.
22:02:51 <oerjan> btw bus to catch
22:03:04 -!- oerjan has quit ("Bus").
22:05:03 * ehird` catches oerjan's quit message
22:15:13 -!- fizzie has joined.
22:17:45 <bsmntbombdood> dbc: how do you generalize that?
22:22:51 <bsmntbombdood> this has been going for over an hour now :(
22:25:06 <bsmntbombdood> this better be one damn good hello world
22:38:55 <oklopol> :D
22:39:22 <oklopol> if it's okay, i'll lol a bit if EgoBot beats it :)
22:39:58 <bsmntbombdood> !bf_txtgen Hello, world!
22:40:41 <bsmntbombdood> ...
22:40:41 <EgoBot> 119 +++++++++++++++[>+++++>+++++++>++++++++>+++<<<<-]>---.>----.+++++++..+++.>>-.------------.<-.<.+++.------.--------.>>+. [995]
22:41:03 <bsmntbombdood> whoa
22:41:09 <bsmntbombdood> that's pretty much the same approach i took
22:41:27 <oklopol> haven't you ever seen EgoBot's output? :|
22:41:37 <bsmntbombdood> i've never really looked at it
22:41:54 <bsmntbombdood> is it random?
22:41:55 <oklopol> hmm, understandabel
22:41:57 <oklopol> elele
22:41:57 <bsmntbombdood> !bf_txtgen Hello, world!
22:42:09 <oklopol> it's genetic, it may not find the same thing every time
22:42:16 <bsmntbombdood> yeah that's what i meant
22:42:26 <oklopol> but, it usually finds the same thing
22:42:39 <EgoBot> 117 +++++++++++[>++++++>+++++++++>+++>++++<<<<-]>++++++.>++.+++++++..+++.>>.<-.<++++++++.--------.+++.------.--------.>+. [906]
22:42:42 <oklopol> heh
22:42:44 <oklopol> or not.
22:43:01 <bsmntbombdood> and that one's shorter!
22:43:04 <bsmntbombdood> !bf_txtgen Hello, world!
22:43:10 <oklopol> 2 shorter
22:43:12 <oklopol> hmm
22:43:12 <oklopol> or
22:43:43 <oklopol> impossible to calculate.
22:43:48 <EgoBot> 122 ++++++++++++++[>+++++>+++++++>++++++++>+++<<<<-]>++.>+++.>----..+++.>++.------------.<++++++++.--------.+++.------.<-.>>+. [400]
22:43:52 <oklopol> "mommy, what's 6*8?" "oh, sweetie, those are two completely different numbers!"
22:43:54 <bsmntbombdood> bah
22:44:09 <bsmntbombdood> i was hoping it stored the previous one and improved on it
22:44:17 <bsmntbombdood> like google maps does
22:44:24 <oklopol> well, that's a separate program
22:45:50 <ehird`> oklopol: hm
22:46:30 <oklopol> ehird`: olp?
22:57:50 <ehird`> olp
22:58:01 <bsmntbombdood> !bf_txtgen Hello, world!
22:58:44 <EgoBot> 121 ++++++++++++++[>+++++>+++++++>+++><<<<-]>++.>+++.+++++++..+++.>++.------------.<++++++++.--------.+++.------.--------.>+. [192]
23:04:21 <jix> i once did a bf textgen that produced short output most of the time.... but back then i was trying out lisp .... so i can't read or run that code anymore ^^
23:04:46 <jix> and it was awfully slow
23:05:51 <bsmntbombdood> i bet it's faster than mine
23:06:02 <oklopol> bsmntbom1dood: still going? :D
23:06:31 <ehird`> bsmntbombdood: why are you still running it? rewrite it already
23:06:43 <bsmntbombdood> i dunno how to make it faster
23:06:47 <bsmntbombdood> oklopol: yep
23:06:55 <oklopol> ehird`: don't ruin the fun!
23:07:27 <jix> i should write one in c++...
23:07:37 <ehird`> bsmntbombdood: make it print debug output, see what's happening
23:07:44 <ehird`> jix: you shouldn't write ANYTHING in c++
23:07:54 <jix> ehird`: tell me a better language
23:07:54 <bsmntbombdood> ehird`: why?
23:07:58 <bsmntbombdood> jix: scheme, c
23:08:01 <ehird`> jix: C or something higher level
23:08:08 <ehird`> if you're going for speed, probably C
23:08:24 <jix> c is a pain in the ass
23:08:25 <ehird`> bsmntbombdood: because you'll get even incomplete results asap
23:08:32 <ehird`> jix: because you try to use it like c++
23:08:33 <jix> dynamic arrays in c...
23:08:37 <ehird`> ... are trivial
23:08:41 <bsmntbombdood> that's true
23:08:42 <jix> are annoying as hell
23:08:47 <jix> i programmed c for years before learning c++
23:08:56 <ehird`> bsmntbombdood: so you'll be able to see if it works well, how it's doing etc
23:08:59 <jix> so don't tell me i try to use c like c++
23:09:04 <bsmntbombdood> but i don't want to waste 2 hours of time
23:10:46 <jix> i'm not going to use c for anything besides linux kernel modules and maybe 4k intros anymore
23:10:47 <ehird`> bsmntbombdood: keep running it
23:10:52 <ehird`> just set its priority lower
23:11:24 <bsmntbombdood> hmm ok
23:12:07 <bsmntbombdood> how do you renice a running proccess?
23:12:15 <jix> bsmntbombdood: with renice
23:12:30 <bsmntbombdood> oh lol
23:12:42 <ehird`> bsmntbombdood is clinically retarded, news at 11
23:12:43 <ehird`> ;)
23:13:22 <jix> but i don't want a language war right now...
23:17:27 <bsmntbombdood> ok, now it's going to print the best so far 255 times in its running
23:20:41 <ehird`> maybe you should do more than 255 times
23:20:47 <ehird`> I mean, that's an awful lot considering how long it's taking
23:25:26 <bsmntbombdood> those are the only places where there is a complete product
23:28:53 <bsmntbombdood> and the only place to print that wouldn't print every single step
23:29:07 <ehird`> why not print every single step?
23:34:54 <bsmntbombdood> ...because that would print O(l**2 * f**l) times
23:34:58 <ehird`> so what
23:34:59 <ehird`> :)
23:36:11 <bsmntbombdood> it would spend more time printing than calculating, and that's too much information to be usefull
23:36:43 <ehird`> alright, make it print every iteration % 1000 == 0
23:36:47 <ehird`> or 10000
23:37:07 <bsmntbombdood> ...that would require a shitload of bookkeeping to number iterations
23:37:18 <bsmntbombdood> that's a disadvantage of functional programming
23:37:50 <ehird`> oklopol: lithpbot is ready!
23:37:51 -!- lithpbot has joined.
23:37:55 <ehird`> with REAL LEXICAL SCOPING(TM)
23:38:00 <ehird`> i just, haven't written any functions yet
23:38:00 <ehird`> > 2
23:38:01 -!- lithpbot has quit (Remote closed the connection).
23:38:03 <ehird`> heh
23:39:10 -!- lithpbot has joined.
23:39:10 <bsmntbombdood> the glottal stop in lisp bot is unpleasant
23:39:27 <ehird`> bsmntbombdood: even worse in "lithp bot"
23:39:28 <ehird`> > 2
23:39:28 <lithpbot> 2
23:39:33 <ehird`> > (2 2)
23:39:33 -!- lithpbot has quit (Remote closed the connection).
23:39:35 <ehird`> WTF
23:39:39 <jix> haha
23:39:39 <ehird`> oh
23:40:16 -!- lithpbot has joined.
23:40:17 <ehird`> > (2 2)
23:40:17 <lithpbot> (err)not callable: 2
23:40:31 <bsmntbombdood> lookie what i made: http://abacus.kwzs.be/~bsmntbombdood/book1.jpg
23:40:34 <jix> > (+ 1 2)
23:40:35 <lithpbot> (err)unbound: +
23:40:37 <bsmntbombdood> book2.jpg, book3.jpg
23:40:39 <jix> > (add 1 2)
23:40:40 <lithpbot> (err)unbound: add
23:40:49 <ehird`> jix: i said i didn't impl any functions yet
23:40:54 <bsmntbombdood> it even has a elastic keep-closed strap and pocket in the back cover (not shown)
23:40:57 <ehird`> the infrastructure is there though
23:46:16 -!- lithpbot has quit (Remote closed the connection).
23:46:29 -!- lithpbot has joined.
23:47:26 <ehird`> > lambda
23:47:27 <lithpbot> #native-function:1
23:47:29 <ehird`> :D
23:47:33 -!- Sgeo has quit ("Ex-Chat").
23:47:41 <ehird`> > (lambda () 2)
23:47:41 -!- lithpbot has quit (Remote closed the connection).
23:47:48 <ehird`> typical
23:48:09 -!- lithpbot has joined.
23:48:10 <ehird`> > (lambda () 2)
23:48:10 <lithpbot> None
23:48:14 <ehird`> hm
23:48:15 <ehird`> oh
23:48:38 -!- lithpbot has quit (Remote closed the connection).
23:49:10 -!- lithpbot has joined.
23:49:11 <ehird`> > (lambda () 2)
23:49:11 <lithpbot> #function:8
23:49:13 <ehird`> > (lambda () 2)
23:49:14 <lithpbot> #function:e
23:49:15 <ehird`> > (lambda () 2)
23:49:15 <lithpbot> #function:14
23:49:23 <ehird`> that's... odd growth
23:49:23 <ehird`> :)
23:49:31 <ehird`> ah, no
23:49:32 <ehird`> that's right
23:49:37 <ehird`> > ((lambda () 2))
23:49:37 -!- lithpbot has quit (Remote closed the connection).
23:49:40 <ehird`> ifgiushf
23:50:10 <ehird`> finally
23:50:10 <ehird`> fixed
23:50:18 -!- lithpbot has joined.
23:50:21 <ehird`> > ((lambda () 2))
23:50:22 <lithpbot> 2
23:50:25 <ehird`> :D
23:50:26 <ehird`> oklopol: ping
23:50:43 <oklopol> pong
23:50:45 <ehird`> > (lambda () ((lambda () 2)))
23:50:45 <lithpbot> #function:14
23:50:48 <ehird`> > ((lambda () ((lambda () 2))))
23:50:48 <lithpbot> 2
23:50:52 <ehird`> it's rewritten
23:50:55 <oklopol> niec
23:50:56 <bsmntbombdood> ??
23:50:57 <ehird`> > (
23:50:58 <lithpbot> (err) unmatched (
23:51:04 <ehird`> bsmntbombdood: lithpbot!
23:51:12 <ehird`> > (quote 2)
23:51:12 <lithpbot> (err) unbound: quote
23:51:23 <ehird`> no strings right now either
23:51:23 <oklopol> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
23:51:23 <lithpbot> (err) unmatched (
23:51:27 <oklopol> > (def k (a) (lambda (b) a))
23:51:27 <lithpbot> (err) unmatched (
23:51:33 <ehird`> ...
23:51:34 <oklopol> > (((s k) k) 3)
23:51:34 <ehird`> wait, what
23:51:34 <lithpbot> (err) unmatched (
23:51:34 <oklopol> asd.
23:51:40 <ehird`> > (2)
23:51:40 <lithpbot> (err) not callable: 2
23:51:43 <ehird`> > ((2) 2)
23:51:43 <lithpbot> (err) not callable: 2
23:51:46 <ehird`> > ((2 3) 2)
23:51:46 <lithpbot> (err) not callable: 2
23:51:48 <jix> for my lisp textgen i used A* for the 2nd part... i wonder whether there is a better algoritm for that
23:51:52 <jix> better as in faster
23:51:52 <ehird`> > (((2 3) 2) 4)
23:51:53 <lithpbot> (err) not callable: 2
23:52:10 <oklopol> > (def s (a) (lambda (b) (lambda (c) ((a c) (b c)))))
23:52:10 <lithpbot> (err) unmatched (
23:52:12 <oklopol> ..
23:52:13 <oklopol> hmm
23:52:18 <ehird`> yeah
23:52:20 <ehird`> my parser is borked, somehow
23:52:26 <oklopol> i see, darn
23:52:30 <ehird`> anyway
23:52:32 <ehird`> no def right now
23:52:33 <ehird`> ;P
23:52:36 <ehird`> just lambda
23:52:48 <oklopol> kay.
23:52:49 <ehird`> however
23:52:51 <ehird`> you can do this
23:52:51 <ehird`> > 2 3
23:52:52 <lithpbot> 3
23:53:01 <ehird`> > ((lambda () 2)) (lambda () 2)
23:53:01 <lithpbot> #function:7a
23:53:08 <ehird`> i really need a gc
23:53:09 <ehird`> :|
23:53:41 <oklopol> > ((((lambda (a) (lambda (b) (lambda (c) ((a c) (b c))))) (lambda (a) (lambda (b) a))) (lambda (a) (lambda (b) a))) 8)
23:53:41 <lithpbot> (err) unmatched (
23:53:44 <oklopol> ...
23:54:05 <oklopol> YOUR MOTHER IS AN UNMATCHED (
23:54:05 <ehird`> it's broken!
23:54:06 <ehird`> ok!
23:54:18 <ehird`> > (abc def)
23:54:18 <lithpbot> (err) unmatched (
23:54:22 <ehird`> > (abc d)
23:54:22 <lithpbot> (err) unmatched (
23:54:24 <ehird`> > (a d)
23:54:24 <lithpbot> (err) unmatched (
23:54:26 <ehird`> i see
23:54:43 -!- lithpbot has quit (Remote closed the connection).
23:54:47 * ehird` adds debug calls
23:54:54 -!- lithpbot has joined.
23:54:57 <oklopol> i thought just def was, but anyways, gotta sleep soon
23:55:05 <ehird`> aww
23:55:09 <ehird`> > (a d)
23:55:10 <lithpbot> (err) unmatched (
23:55:28 -!- lithpbot has quit (Remote closed the connection).
23:55:37 <ehird`> oklopol: after i fix this, i'm doing def etc
23:55:40 -!- lithpbot has joined.
23:55:43 <ehird`> > (a d)
23:55:44 -!- lithpbot has quit (Remote closed the connection).
23:56:04 <oklopol> we don't need no steeenking def
23:56:10 <ehird`> well whatever
23:56:12 <bsmntbombdood> > 'a
23:56:12 <ehird`> i'm fixing this atm
23:56:21 <oklopol> yeah
23:56:21 <ehird`> bsmntbombdood: 1. it's gone 2. you mean (quote a)
23:56:26 <ehird`> 3. quote isn't implemented yet
23:56:29 <oklopol> :D
23:56:38 <bsmntbombdood> lol how can quote not be implemented yet
23:56:58 <ehird`> how can it not not be?
23:57:19 <oklopol> bsmntbombdood: the interp isn't that old
23:57:27 <ehird`> it's about an hour old
23:57:28 <ehird`> :|
23:57:37 <oklopol> interps grow quotes at about 3 hours old
23:57:42 <ehird`> lmao
23:58:43 -!- lithpbot has joined.
23:58:43 <bsmntbombdood> oh, this has been studied already?
23:58:46 <ehird`> > (a d)
23:58:47 <lithpbot> (err) unmatched (
23:58:51 <ehird`> sdfsdjfhsaidfh4i4thdkjbdkjgbxnckl;v
23:59:02 <bsmntbombdood> > ?1
23:59:02 <lithpbot> (err) unbound: ?1
23:59:12 <bsmntbombdood> > wtf does this lithp have
23:59:12 <lithpbot> (err) unbound: wtf
23:59:22 <bsmntbombdood> > (let ((x 1)) x)
23:59:22 <lithpbot> (err) unmatched (
23:59:22 <ehird`> it has core lisp stuff.
23:59:25 <ehird`> shut up
23:59:27 <ehird`> THE PARSING IS BROKEN
23:59:27 <ehird`> THE PARSING IS BROKEN
23:59:30 <ehird`> ^^^^^^^^^
23:59:31 <ehird`> I AM FIXING IN
23:59:32 <bsmntbombdood> no shit
23:59:34 <ehird`> *IT
23:59:39 -!- lithpbot has quit (Remote closed the connection).
23:59:46 <ehird`> why do you think it keeps restarting!
23:59:52 -!- lithpbot has joined.
23:59:59 <ehird`> > (a d)
23:59:59 <lithpbot> (err) unmatched (
←2007-11-02 2007-11-03 2007-11-04→ ↑2007 ↑all