←2007-10-22 2007-10-23 2007-10-24→ ↑2007 ↑all
00:26:48 <pikhq> I promote obfuscated C via the bifid cipher.
00:27:02 <pikhq> Although it *does* suffer from a known plaintext. . .
00:33:32 -!- ehird` has quit (Read error: 104 (Connection reset by peer)).
01:12:47 -!- oklopol has quit (Connection timed out).
02:03:48 -!- cmeme has quit (Excess Flood).
02:06:16 -!- cmeme has joined.
02:19:34 <GregorR> Anybody have some .smv files for a portable music player they'd be willing to give me? (I'm hacking up a converter for GNU/Linux)
02:23:52 <bsmntbombdood> anyone able to run windows executables and has a lot of bandwidth and hard drive space and smarts?
02:24:14 <GregorR> Heh
02:37:45 <bsmntbombdood> i'm serious
02:42:30 -!- pikhq has quit (Read error: 110 (Connection timed out)).
03:02:34 -!- pikhq has joined.
03:26:24 -!- SF|008 has joined.
05:35:07 -!- SF|008 has quit (Connection timed out).
06:06:44 -!- immibis has joined.
06:08:35 -!- Mark__ has joined.
06:09:06 <Mark__> hello?
06:09:26 -!- Mark__ has quit (Client Quit).
06:09:42 -!- StapleGun_ has joined.
06:10:02 <StapleGun_> anyone here?
06:12:57 <immibis> me
06:13:20 * immibis wonders why Mark/StapleGun changed his name
06:14:05 <StapleGun_> :)
06:14:14 <StapleGun_> is this irc very active?
06:15:39 <StapleGun_> clearly not ... >_>
06:18:31 <GregorR> Varies.
06:19:20 <StapleGun_> gg
06:21:30 -!- StapleGun_ has quit ("ChatZilla 0.9.78.1 [Firefox 2.0.0.8/2007100816]").
06:22:35 -!- StapleGun_ has joined.
06:26:56 <StapleGun_> so u guys only tok bout esolangs here?
06:28:41 <GregorR> In principle, but really the conversation is just as often on something else esoteric.
06:31:46 <StapleGun_> isee
07:05:34 -!- immibis has left (?).
07:13:19 -!- g4lt has left (?).
07:42:33 -!- StapleGun_ has quit ("ChatZilla 0.9.78.1 [Firefox 2.0.0.8/2007100816]").
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:47:36 -!- SEO_DUDE38 has quit (Remote closed the connection).
09:37:24 -!- oerjan has joined.
09:46:51 -!- StapleGun_ has joined.
09:46:59 <StapleGun_> hello
09:47:11 <oerjan> hello
09:47:50 <StapleGun_> how long has esolangs.org been aorund for?
09:49:08 <oerjan> i don't know, i've been here a year
09:49:38 <oerjan> oh wait
09:49:47 <oerjan> thought you were asking about the channel
09:51:14 <oerjan> the history of the main page goes back to April 2005
09:52:03 <oerjan> so does the brainfuck page
09:55:23 <oerjan> btw this is probably _the_ slowest period of day on this channel.
09:55:48 <oerjan> (saw your earlier question in the logs)
10:40:58 <StapleGun_> ah k
10:41:38 <StapleGun_> im working on an esoteric language as a learning experience, im trying to make the hello world example and ive confused myself
11:10:22 <StapleGun_> brb
11:20:26 <StapleGun_> hmm, what time is this channel active?
11:22:31 <oerjan> mostly when the americans are awake, is my impression
11:23:41 <oerjan> you could take a look at the logs
11:25:36 <StapleGun_> kk
11:26:12 <StapleGun_> hmm is it possible to join to a different server using chatzilla?
11:26:19 <oerjan> the red days are those with more activity
11:26:35 <StapleGun_> i cant seem to find the log, ive never used irc b4
11:26:37 <oerjan> don't know, not using it
11:26:48 <oerjan> http://ircbrowse.com/cdates.html?channel=esoteric
11:26:58 <StapleGun_> ty
11:26:59 <oerjan> it's listed in the channel topic
11:27:48 <StapleGun_> goes from dark blue to light blue to red?
11:28:06 <oerjan> i think so
11:28:27 <StapleGun_> cool
11:28:35 <StapleGun_> which irc do u use?
11:28:44 <oerjan> irssi
11:29:21 <StapleGun_> looks cool
11:30:16 <StapleGun_> is it linux based
11:30:18 <StapleGun_> ?
11:30:52 <oerjan> mine is running on linux
11:31:22 <oerjan> also, terminal-based
11:31:35 <StapleGun_> ah cool
11:31:45 <StapleGun_> u dont know wot game maker is by any chance do u?
11:32:04 <oerjan> "UNIX systems", says the webpage
11:32:37 <oerjan> not really
11:33:08 <oerjan> http://en.wikipedia.org/wiki/Game_Maker
11:33:13 <oerjan> i assume
11:33:43 <StapleGun_> yea, id be a full time linux user if i could get game maker to run on linux ... that and company of heroes
11:34:12 <oerjan> heh
11:43:38 <StapleGun_> im going thx for the infos
11:43:52 <oerjan> cu
11:44:02 -!- StapleGun_ has quit ("ChatZilla 0.9.78.1 [Firefox 2.0.0.8/2007100816]").
12:51:49 -!- sebbu has joined.
12:54:25 -!- oklopo1 has joined.
12:55:12 -!- oklopo1 has changed nick to oklopol.
13:30:50 -!- oerjan has quit ("Lunch").
13:40:32 -!- SEO_DUDE38 has joined.
14:15:23 -!- Tritonio has joined.
15:58:02 -!- Sgeo has joined.
16:35:29 <RodgerTheGreat> hey, folks
16:36:45 -!- sebbu2 has joined.
16:44:08 <bsmntbombdood> i has a lenny
16:50:28 -!- sebbu has quit (Connection timed out).
17:09:34 -!- jix has joined.
17:24:54 -!- ehird1 has joined.
18:35:50 <SimonRC> hi
18:35:56 <ehird1> hi
18:36:00 <oklopol> hi
18:37:06 <bsmntbombdood> hi
18:37:12 <bsmntbombdood> oink.cd got pwnt
18:37:29 <SimonRC> I just heard elsenet
18:37:42 * SimonRC reads: http://news.bbc.co.uk/2/hi/uk_news/england/tees/7057812.stm
18:37:43 <bsmntbombdood> and i just got an account a few days ago :(
18:38:00 <ehird1> looks like a torrent site? i've never heard of it
18:38:03 <ehird1> (ex-torrent site.)
18:38:16 <oklopol> TORRENTS ARE EVIL
18:38:26 * oklopol has to leave! ->
18:38:30 <ehird1> i'm not even sure oklopol is joking...
18:38:35 <ehird1> you can never be sure with him
18:39:12 <SimonRC> I really need to stop reading "British Phonographic Industry" as "British Pornographic Industry".
18:39:26 <bsmntbombdood> me too :P
18:39:28 <SimonRC> and how is free music distributing "lucrative"?
18:39:38 <bsmntbombdood> the site was exclusive
18:39:51 <ehird1> british phornographic industry
18:39:59 <bsmntbombdood> invite only, etc
18:58:04 <ehird1> I just had a crazy, crazy idea.
18:58:08 <ehird1> A Forth system in Brainfuck.
18:58:36 <ehird1> Actually, the memory is laid out perfect for forth stacks and dictionaries - you just have a slab of infinite memory (let's assume an infinite memory implementation) to do stuff with
18:58:44 <ehird1> And the execution model isn't hard... Hey, that could work.
19:00:17 <bsmntbombdood> uh?
19:00:37 <ehird1> bsmntbombdood: maybe if you said something more than uh? i could give you an answer
19:01:00 <bsmntbombdood> ooops
19:03:45 <ehird1> ;)
19:11:13 <ehird1> any comments? ;)
19:13:40 -!- Tritonio has quit (Connection timed out).
19:26:51 <ehird1> :)
19:29:04 -!- oerjan has joined.
19:39:45 <RodgerTheGreat> http://craphound.com/overclocked/Cory_Doctorow_-_Overclocked_-_When_Sysadmins_Ruled_the_Earth.html <- I thought this was a fantastic read
19:45:46 <RodgerTheGreat> I'd highly recommend it to anyone with half an hour or so to blow
19:47:05 <ehird1> back
19:47:30 <ehird1> RodgerTheGreat: any thoughts on a Forth written in brainfuck? :)
19:48:38 <RodgerTheGreat> hm
19:49:08 <ehird1> the memory layout is good for it, the core execution could be done with some minimal work
19:49:10 <RodgerTheGreat> sounds difficult, but possible. I'll bet we could benefit from using gregor's approach to building a stack in BF
19:49:13 * SimonRC goes away.
19:49:13 <ehird1> and i think it shouldn't be too hard
19:49:21 <ehird1> RodgerTheGreat: well -- a forth system isn't hard
19:49:44 <RodgerTheGreat> I've built some stack-based languages myself- I'm familiar
19:49:48 * SimonRC has thought about Forth in BF too...
19:49:55 <ehird1> still, if you look at e.g. JonesForth
19:50:08 <ehird1> the core is basically some minimal assembly, then lots of memory pushing to define the core words
19:50:23 <SimonRC> though you would really want a faster way to access the "main memory"
19:50:24 <RodgerTheGreat> yeah
19:50:26 <ehird1> then you define the rest in forth itself... so i think writing one in BF should be pretty easy
19:50:26 * SimonRC goes away.
19:50:52 <ehird1> the problem with gregorr's stack mechanism, is that it requires double memory
19:50:57 <ehird1> ABC = A1B1C1
19:52:15 <RodgerTheGreat> main thing is, for a good forthlike, you need multiple data structures: at least a stack, variable dictionary and either a dedicated linked-list dictionary for storing code or the ability to store those in your variable dictionary
19:52:46 <RodgerTheGreat> so we'd need to carve our BF tape into at least two pieces, which means we must place absolute limits on stack or dictionary size
19:52:52 <ehird1> RodgerTheGreat: variable dictionary? uh, no
19:52:56 <RodgerTheGreat> (limited stack > limited dictionary)
19:52:56 <ehird1> variables are just memory locations
19:53:06 <RodgerTheGreat> with NAMES.
19:53:11 <ehird1> VARIABLE n -> : n <new memory location> ;
19:53:18 <ehird1> n @ -> <memory location> @
19:53:22 <ehird1> no dictionary there
19:53:31 <ehird1> it just finds an unused memory location and defines a word that just returns it
19:53:36 <ehird1> s/return/pushes it to stack
19:53:47 <RodgerTheGreat> it's possible to do that
19:53:54 <ehird1> that's what all the forth's i've used have done
19:54:20 <ehird1> well, it's a simple way to do it
19:54:23 <ehird1> also
19:54:34 <ehird1> the code dictionary is really just a stack
19:54:41 <ehird1> except, you can non-destructively pop
19:54:45 <ehird1> i.e. there's a "previous" pointer
19:54:53 <ehird1> a linked-list, then, i guess
19:54:59 <ehird1> except, it has "prev" instead of "next"
19:55:15 <ehird1> making a word is just making the entry then: prev = CURRENT, CURRENT = self
19:55:35 <ehird1> so, really, you will have this memory layout:
19:56:04 <ehird1> [stack of fixed size (you shouldn't let it grow big anyway...)][dictionary of finite, but expanding size][HERE BE DRAGONS]
19:56:19 <ehird1> (dragons = variables and other misc. memory, of course)
19:56:37 <ehird1> of course, the dictionary can tiptoe over the dragons when adding a new entry
19:59:21 <ehird1> RodgerTheGreat: you know i really think a forth in brainfuck could be tiny
19:59:31 <ehird1> i mean, it needs very little
19:59:38 <RodgerTheGreat> hm
19:59:50 <ehird1> without comments and whitespace (well, apart from 80col line breaks) i'd bet it could be pretty short... a few hundred lines?
19:59:53 <ehird1> maybe less
20:00:17 <RodgerTheGreat> and I suppose the interesting thing is that most libraries you'd want are already written in more or less pure FORTH, so we could rapidly expand the language
20:00:27 <ehird1> indeed
20:00:40 <ehird1> things you won't find: graphics, networking
20:00:41 <RodgerTheGreat> we'd want to whip up a BF interpreter that can load/save states to make it less painful to work with
20:00:42 <ehird1> files
20:00:43 <ehird1> :P
20:00:54 <RodgerTheGreat> FORTH is it's own filesystem
20:00:59 <ehird1> hehe yes
20:01:16 <ehird1> it's not its own tcp/ip stack, however
20:01:17 <ehird1> :-)
20:01:31 <RodgerTheGreat> true
20:01:37 <ehird1> maybe first a plain BF implementation
20:01:43 <ehird1> then it could be hacked to work with one of the outside-layers
20:01:46 <ehird1> like PSOX or EsoAPI
20:02:06 <ehird1> they'd act identical except the latter would have the neccessary words for doing stuff that isn't possible in pure BF
20:02:10 <Sgeo> Wait, what?
20:02:15 <Sgeo> PSOX == highlighted
20:02:34 <ehird1> Sgeo: PROTIP: if you have something on highlight, READ THE GODDAMN MESSAGE!
20:03:12 * Sgeo should work on PSOX at some point
20:06:05 <ehird1> RodgerTheGreat: what's your estimate for source size? ;) in instructions. i bet about 24000 instructions, minimum (300 lines at 80 characers(
20:08:10 <ehird1> maybe less, maybe more
20:14:42 <ehird1> RodgerTheGreat: actually maybe that's a bit overboard, less i'd say
20:17:22 <ehird1> =)
20:23:57 <ehird1> anyone know a way to make a BF stack that doesn't require len*2 usage? RodgerTheGreat?
20:27:27 <oerjan> ehird1: probably you can replace 2 by something smaller by having only occasional gaps
20:27:56 <oerjan> i guess that will complicate the code however
20:28:00 <ehird1> oerjan: yeah
20:28:18 <ehird1> i mean, ideally there should be some sort of sentinel value at the start and end, but then you can't access an arbitary element
20:37:01 -!- oerjan has quit (zelazny.freenode.net irc.freenode.net).
20:39:36 <ehird1> it's puzzling
20:40:04 -!- oerjan has joined.
20:40:34 <ehird1> oerjan: at least i don't thinnk you can access arbitary elements with fixed sentinels
20:42:08 <oerjan> unless you shuffle everything
20:42:35 <ehird1> so i think a1b1c1...z0 is the best way, for now?
20:42:42 <ehird1> or rather: the only way, really
20:43:50 <oerjan> i'm not quite sure - since you are probably doing lots of copying even with that, perhaps shuffling everything _isn't_ that much worse
20:44:10 <ehird1> shuffling everything being what?
20:44:15 <ehird1> bogosort access?
20:44:16 <ehird1> :P
20:44:24 <oerjan> er, shifting
20:45:17 <ehird1> in what way?
20:45:27 <oerjan> swapping the carry-along index with the cells, until you get to the desired point
20:45:39 <ehird1> i don't quite understand
20:46:12 <oerjan> let's say your stack is abcdefgh and you want to access element 3 from the end
20:47:05 <oerjan> abcdefgh3 -swap- abcdefg2h -swap- abcdef1gh -swap- abcde0fgh
20:47:23 <ehird1> i see
20:47:32 <ehird1> that would mean stack access would be quite a lot of code, though, no?
20:47:35 <oerjan> you need some extra room to carry along the value, but only a _constant_ amount
20:48:16 <oerjan> perhaps, but you could make it a subroutine i think
20:48:46 <oklopol> PEBBLE
20:49:26 <ehird1> i don't want to use pebble
20:49:43 <ehird1> nor indeed subroutines, i think it'd be pretty easy to write a forth without subroutines
20:51:06 <oerjan> actually, only the word that accesses _arbitrary_ stack needs to use this method
20:51:17 <oerjan> so it would be a subroutine anyhow
20:51:23 <oerjan> (a forth one)
20:51:30 <ehird1> oerjan: all stack-manipulation words need to do it, and they shouldn't be forth words
20:51:31 <oklopol> why not PEBBLE?
20:51:33 <ehird1> (e.g. rot)
20:51:42 <ehird1> oklopol: because i want to use BF, not pebble (i know pebble can compile to bf)
20:51:50 <oerjan> no, most stack-manipulation words only need to access the top few values
20:51:57 <ehird1> true i guess
20:52:00 <oklopol> pebble is a very low-level thingie.
20:52:04 <ehird1> oklopol: i don't care!
20:52:18 <ehird1> how big should the stack be?
20:52:24 <ehird1> i say 15 ints
20:52:34 <ehird1> i mean, you shouldn't let the stack grow beyond that in forth anyway
20:52:50 <oerjan> o_O
20:53:01 <ehird1> [data stack of course]
20:53:15 <ehird1> oerjan: chuck moore agrees (although he is bat-shit insane)
20:54:11 <ehird1> for example, colorforth's stack is about that size
20:54:23 <ehird1> and, personally, the stack length has never grown >20 or so in my usage
20:54:27 <ehird1> 16 seems like a good size to me
20:54:42 <ehird1> also, i assume that i won't do floats, negative integers etc
20:54:51 <ehird1> so, we can use a standard 0-255, wrapping BF int
20:55:10 <oklopol> (PEBBLE!!)
20:55:11 <oklopol> (sorry)
20:57:24 <ehird1> what BF interp/compilers does everyone here use?
20:57:29 <ehird1> i actually have no idea what the most commonly used are
21:07:42 <oklopol> i always make a new one
21:08:37 <oklopol> but if you want something with good debugging... hmm..
21:08:44 <oklopol> that thingie with the blue leaf
21:08:53 <oklopol> i don't remember the name actually :P
21:08:56 <oklopol> blue fern?
21:09:05 <oklopol> i wonder if that was the good one
21:58:55 <ehird1> Damnit! I didn't think this bf interpreter through...
21:59:24 <ehird1> I was reading in code char-by-char/.
21:59:38 <ehird1> So, I can't jump. :|
22:06:46 <oerjan> you mean reading and executing simultaneously?
22:11:56 <ehird1> yeah
22:12:01 <ehird1> execute(read character), basically
22:12:43 <ehird1> rewrite time!
22:12:45 <ehird1> well, not really rewrite
22:12:46 <oerjan> not even saving the char? o_O
22:12:48 <ehird1> oerjan: yeah
22:12:50 <ehird1> pretty stupid
22:12:51 <ehird1> :P
22:12:54 <ehird1> i wasn't thinking
22:13:29 <ehird1> (i wouldn't even be writing a bf interp if i didn't want to add state saving/loading)
22:13:50 <ehird1> (basically: you can save the tape and code pointer to a file, then recall it again to resume your session)
22:14:06 <ehird1> (you initiate the saving by pressing ^Z - it handles SIGSUSP by asking for a filename)
22:14:17 <ehird1> (and then just "interp dump")
22:15:47 <ehird1> besides that it resizes the tape pretty well
22:15:53 <ehird1> it first tries len*2
22:15:57 <ehird1> then that-1 if it fails
22:16:00 <ehird1> that-2 if that fails
22:16:04 <ehird1> all the way down to (current size)
22:19:06 <ehird1> oerjan, oklopol: what do you think is a reasonable default size for code?
22:19:15 <ehird1> (code is read into a variable sized array, i need to know a good starting point)
22:19:24 <ehird1> i was thinking 1000
22:21:19 <oerjan> dunno
22:25:29 <oklopol> mwwwahahaha use pebble and make that easy to change
22:25:39 <bsmntbombdood> weird
22:25:44 <oklopol> yeah
22:25:50 <oklopol> pretty cizra indeed
22:26:01 <bsmntbombdood> upgrading from sarge to lenny changed a bunch of fonts
22:26:18 <bsmntbombdood> er, etch to lenny
22:38:25 <ehird1> my 138L, 2960C, 2.9K brainfuck interpreter is almost done (with sane bracket handling, i.e. very fast, scans at start with stack) ... then i have to do state_saving
22:39:07 <ehird1> (state saving isn't hard, i just need to save the tape{,size,ptr}, code{,size,length,ptr} and bracket-map{,size})
22:39:12 <ehird1> so... dump all the vars basically
22:41:40 -!- oerjan has quit ("Too late, good night").
22:43:22 -!- StapleGun_ has joined.
22:43:35 <StapleGun_> hello
22:43:56 <ehird1> hi
22:43:57 <oklopol> hi
22:44:22 <oklopol> ehird1: brainfuck interpreter in what languagE?
22:44:27 <ehird1> oklopol: C
22:44:27 <oklopol> EE
22:44:29 <oklopol> oh
22:44:33 <ehird1> it's for speed.
22:44:37 <ehird1> i'm writing a Forth in this remember
22:44:56 <ehird1> howver
22:44:57 <ehird1> however
22:45:00 <ehird1> it is very understandable c
22:45:21 <oklopol> my "oh" was very neutral
22:45:29 <oklopol> we should all be speaking lojban
22:45:32 <ehird1> heh
22:45:54 <ehird1> neutral attiduntal oh!
22:46:54 <StapleGun_> lol
22:46:56 <ehird1> dereferencing type-punned pointer will break strict-aliasing rules
22:46:58 <ehird1> fuck you, gcc
22:47:06 <ehird1> you are retarded and pedantic
22:47:08 <ehird1> this is C!!
22:47:19 <ehird1> i am allowed to play loose and fast with my pointers and their types
22:47:24 <StapleGun_> u use linux?
22:47:44 <ehird1> os x most of the time but i am stuck on windows right now. i am using the software i love by virtue of cygwin
22:47:54 <StapleGun_> ic
22:48:16 <StapleGun_> what r u writing?
22:48:55 <ehird1> a brainfuck interpreter that can dump and load states
22:49:08 <ehird1> i.e. you can end a session then resume it later, it just dumps the state to a file
22:49:09 <StapleGun_> cool
22:49:11 <ehird1> it is also pretty fast
22:49:19 <StapleGun_> thats awesome
22:49:36 <ehird1> it's also only 137 lines
22:49:46 <StapleGun_> holy crap
22:49:48 <StapleGun_> thats intense
22:49:57 <StapleGun_> mines like 200 for this prototype im working
22:50:06 <StapleGun_> but i didnt comment and now im confused
22:50:48 <ehird1> mine has about 3 comments, none of which are particularly helpful
22:50:52 <ehird1> but it's really easy to understand, so
22:50:57 <ehird1> (whee, hello world hangs. what fun)
22:51:01 <StapleGun_> It's supposed to interpret this:
22:51:03 <StapleGun_> _ <
22:51:04 <StapleGun_> _ $ 33> 100>_ 114^
22:51:06 <StapleGun_> _<72< 101< <108>\^ \
22:51:07 <StapleGun_> _.32> /^/ </111\>\87>
22:51:09 <StapleGun_> &{ {{ { { { { { {{{ {#
22:51:11 <StapleGun_> , Output: Hello World!
22:51:12 <StapleGun_> But I end up control+alt+deleting after a few seconds
22:51:13 <ehird1> hmmm
22:51:15 <ehird1> what language is that?
22:51:18 <ehird1> it looks like snusp
22:51:19 <ehird1> or path
22:51:21 <StapleGun_> its the one im working
22:51:26 <StapleGun_> its sort of like path i guess
22:51:44 <StapleGun_> it has an instruction pointer
22:51:52 <StapleGun_> and it bounces between the line start and finish
22:51:55 <ehird1> clever
22:51:58 <StapleGun_> _ drops it down the line
22:52:02 <StapleGun_> ^ jumps it up
22:52:14 <ehird1> it's like the turtles in mario going through execution tokens, i guess
22:52:14 <ehird1> heh
22:52:20 <StapleGun_> lol yes
22:52:27 <StapleGun_> u can skip the next instruction with /
22:52:32 <StapleGun_> but only if going ->
22:52:37 <StapleGun_> otherwise u need \
22:52:51 <StapleGun_> and best of all > means push, but means pop if going the othrt way lol
22:53:46 <oklopol> hmm... aren't brainfuck interpreters usually like 10 lines?
22:54:00 <StapleGun_> r they?
22:54:07 <StapleGun_> i wrote one in game maker that was well over 400
22:54:13 <StapleGun_> its also very slow
22:54:15 <oklopol> game maker :P
22:54:19 <StapleGun_> and no one understood it
22:54:22 <oklopol> the scripting languagE?
22:54:23 <oklopol> *e
22:54:32 <StapleGun_> eh, its evvolved from that
22:54:33 <oklopol> or the graphical interface?
22:54:40 <StapleGun_> ppl make some pretty sophisticated stuff
22:54:44 <ehird1> oklopol: yeah but mine scans all brackets before execution to put them in a table, intelligently resizes the tape, and other stuff
22:54:48 <StapleGun_> well it has drag and drop, but u can c style code now
22:55:14 <StapleGun_> omfg im dislexic, i thot ehird1 was talking the whole time ...
22:55:20 <oklopol> ehird1: naturally you parse the code, and what's intelligent resizing?
22:55:29 <ehird1> oklopol: it goes:
22:55:31 <ehird1> len*2
22:55:33 <ehird1> len*2-1
22:55:34 <ehird1> len*2-2
22:55:34 <ehird1> len*2-3
22:55:35 <ehird1> ...
22:55:38 <ehird1> until it reaches len+1
22:55:43 <ehird1> at which point it gives up and errors out
22:55:58 <ehird1> so it squeezes out as much memory as it can
22:56:06 <StapleGun_> brb
22:56:41 <oklopol> hmm
22:56:48 <oklopol> i don't get it
22:57:12 <oklopol> 0, -1, -2, -3 ... 2, 1?
22:57:19 <ehird1> no
22:57:22 <ehird1> len is the current tape len
22:57:25 <oklopol> yeah
22:57:28 <ehird1> so if it can't resize the tape to len*2
22:57:31 <ehird1> i.e. no memory left for it
22:57:34 <ehird1> then it tries that-1
22:57:34 <oklopol> ah.
22:57:36 <ehird1> then that-2
22:57:36 <ehird1> etc
22:58:11 <ehird1> technically if you have the memory my program can support any brainfuck program up to MAX_INT characters
22:58:14 <ehird1> actually
22:58:14 <oklopol> i recommend rather doing len*2, len*1.5, len*1.25 etc.
22:58:15 <ehird1> MAX_UNSIGNED_INT
22:58:23 <ehird1> and, of course, that is fucking huge
22:58:34 <ehird1> (4,294,967,295 instructions)
22:58:50 <ehird1> well
22:58:52 <ehird1> characters, really
22:58:53 <oklopol> or just not allocation the full memory each time...
22:59:02 <ehird1> it doesn't strip out comments, because it uses fread for speed
22:59:10 <oklopol> why not do a stack with every cell being 256 brainfuck cells?
22:59:19 <ehird1> nah, mine is pretty good
22:59:27 <ehird1> although there's some simple bug that is making it infinite lopo
23:00:28 <oklopol> i agree it could suck more.
23:00:32 <oklopol> !
23:00:33 <EgoBot> Huh?
23:01:58 <ehird1> yay
23:02:00 <ehird1> +. works
23:02:04 <ehird1> it was a simple reading error
23:02:27 <ehird1> hello = infini loop :(
23:03:59 <ehird1> ok, my "," is bugged
23:04:02 <oklopol> hmm, don't wanna be mean here, but how can you not make a brainfuck interpreter work :|
23:04:11 <oklopol> it's like incredibly trivial :P
23:04:16 <ehird1> it's more complex than a regular interp :|
23:04:37 <ehird1> however i must admit
23:04:40 <ehird1> how can "case ',': tape[ptr] = getchar(); if (feof(stdin)) tape[ptr] = 0; break;" not work
23:05:21 <oklopol> what doesn't work with it?
23:05:51 <ehird1> infini loop on ,[.,]
23:06:22 <oklopol> well make it output the current cell
23:06:24 <ehird1> oh
23:06:26 <ehird1> my bad...
23:06:32 <ehird1> i forgot to save the BF program i was testinh
23:06:33 <ehird1> ahahahah
23:06:36 <oklopol> heh
23:06:37 <ehird1> i had left it as my infinite lopo
23:06:55 <oklopol> are you purposefully typing it as lopo?
23:07:06 <ehird1> haha
23:07:07 <ehird1> no
23:07:07 <ehird1> :P
23:07:25 <ehird1> real0m0.070s
23:07:25 <ehird1> ^ running time for ",[.,]" to be cat|'d to itself with the interp
23:07:30 <ehird1> not a bad speed i'd say
23:07:54 <oklopol> that's 100% io.
23:08:15 <oklopol> try a real program and we'll compare with EgoBot :)
23:08:21 <bsmntbombdood> PLooo
23:08:45 <oklopol> bsmntbombdood: YuRRRFEkcmm
23:08:55 <oklopol> i have magnets!
23:09:15 <bsmntbombdood> i think next year we should have an #esoteric camp at burning man
23:09:43 <ehird1> egobot's optimizes.
23:09:44 <ehird1> mine doesn't.
23:10:16 <oklopol> bsmntbombdood: is that a drug fest?
23:10:26 <bsmntbombdood> oklopol: not really
23:10:36 <oklopol> ehird1: well naturally you make it optimize before the big benchmarks!
23:10:42 <StapleGun_> r u wrting in c or c++?
23:11:14 <oklopol> bsmntbombdood: what then? it was on fg
23:11:21 <oklopol> err
23:11:24 <oklopol> sorry, american dad
23:11:31 <bsmntbombdood> http://en.wikipedia.org/wiki/Burning_man
23:11:50 <lament> of course burning man is a drug fest
23:12:22 <oklopol> i've always wanted to try drugs
23:12:51 <lament> when there's a will, there's a way.
23:13:42 <StapleGun_> how do u register for this irc?
23:16:41 <StapleGun_> u guys ever program in assembly?
23:16:57 <ehird1> back
23:17:06 <ehird1> StapleGun_: c
23:17:27 <StapleGun_> ah k
23:17:30 <ehird1> oklopol: it optimizes braces pretty well
23:17:35 <ehird1> StapleGun_: nobody should ever use C++
23:17:37 <ehird1> it is a failure
23:17:45 <oklopol> ehird1: what does that mean?
23:18:17 <StapleGun_> how do i register?
23:18:21 <ehird1> oklopol: it has a lookup table of [ and ]. literally, there's an array "brackets" and brackets[CODE_POSITION_OF_BRACE] = brackets[CODE_POSITION_OF_MATCHING_BRACE]
23:18:27 <ehird1> it makes [ and ] EXTREMLELY fsat
23:18:30 <ehird1> here, i'll show the code
23:18:43 <oklopol> so basically a hacked-in parse tree
23:18:54 <oklopol> well, naturally you parse the code :P
23:18:55 <ehird1> oklopol: no
23:18:59 <ehird1> not a hacked in parse tree
23:19:06 <ehird1> it has no nesting
23:19:11 <ehird1> but it does work VERY well
23:19:14 <ehird1> and it VERY fast
23:19:36 <oklopol> it's basically the same thing as a parse-tree.
23:20:00 <ehird1> no.
23:20:01 <ehird1> it is not.
23:20:03 <ehird1> that is bullshit.
23:20:18 <oklopol> i see :|
23:20:18 <ehird1> it is not [ blah [ blah ] ]
23:20:24 <ehird1> it's [ = ], [ = ]
23:20:37 <ehird1> it's a direct mapping from brackets[CLOSE] = OPEN, and brackets[OPEN] = close
23:21:11 <oklopol> well, orly, i just mean it's the same thing as a parse tree if you think about the jumps of the cp
23:21:14 <ehird1> http://rafb.net/p/f9C1U032.html here's the interpreter, it's valid ANSI C89
23:21:31 <ehird1> there's some mysterious infinite-loop bug there and i can't figure out what triggers it, but i'll find out
23:21:44 <ehird1> also, state saving/loading comes later. it'll be trivial to do
23:24:21 <oklopol> err when you expand, where do you move the data to the new array?
23:24:47 <ehird1> i pass a reference to expand_array
23:24:49 <ehird1> *array = new
23:25:01 <ehird1> note: "unsigned char **array"
23:25:05 <oklopol> umm
23:25:14 <oklopol> doesn't that kinda lose the original array?
23:25:22 <ehird1> uhh, learn what realloc does
23:25:26 <oklopol> ah
23:25:32 <oklopol> i've never done pure C
23:25:36 <ehird1> i can tell
23:25:39 <ehird1> ;)
23:26:33 <StapleGun_> sweet
23:26:40 <oklopol> and even if i had done it, i'd most likely never have used realloc
23:26:50 <ehird1> eups, i have a major bug
23:26:55 <ehird1> realloc doesn't 0 out :-)
23:28:34 -!- StapleGun_ has quit ("ChatZilla 0.9.78.1 [Firefox 2.0.0.8/2007100816]").
23:29:06 -!- StapleGun_ has joined.
23:29:36 <StapleGun_> hmm
23:29:51 <StapleGun_> wots with the underscore?
23:30:01 <oklopol> you had that earlier too
23:30:06 <oklopol> just /nick it off
23:30:46 -!- StapleGun_ has changed nick to staples.
23:31:23 <staples> it says its already in use lol
23:31:33 <ehird1> http://rafb.net/p/dRDGg445.html bf interpreter v0.5
23:31:42 <ehird1> if anyone knows why that won't run hello world, please enlighten me ;)
23:32:41 <staples> thats too advanced for me, im a cnoob
23:32:59 <ehird1> i didn't say anything about you, did i?
23:33:24 <staples> >.>
23:35:07 <oklopol> ehird1: what crashes?
23:35:25 <ehird1> try hello world
23:35:27 <ehird1> it just hangs there
23:35:30 <ehird1> and sucks up memory
23:35:33 <ehird1> and i have no idea why
23:36:03 <oklopol> but... i'd need to use a C compiler... :<
23:36:11 <oklopol> that'd be SO MUCH WORK :O
23:36:41 <ehird1> gcc -g -O3 -Wall -fno-strict-aliasing bf.c -o bf
23:36:44 <ehird1> have yourself a compile line
23:37:06 <oklopol> check the "parse tree"
23:37:13 <oklopol> i think that's your problem
23:37:56 <ehird1> no, the parse tree concept is basically ripped from one of daniel b cristofani's interpreters
23:38:00 <ehird1> also, it is correct.
23:38:22 <oklopol> the concept works, just thought that might be where minor bug would easiest slip in
23:38:28 <oklopol> *bugs
23:38:49 <oklopol> but you actually checked it parses correct?
23:39:13 <oklopol> since i'm failing something in that case
23:39:30 <oklopol> not that that's rare or anything.
23:39:46 <ehird1> ok, i may not know what the fuck i'm talking about
23:39:55 <ehird1> .[+.] hangs forever
23:40:01 <oklopol> you didn't check?
23:40:01 <ehird1> and, uh, that loop shouldn't even fucking RUN!
23:40:04 <ehird1> i did
23:40:05 <ehird1> but
23:40:06 <ehird1> WTF
23:40:09 <oklopol> well
23:40:13 <oklopol> wait
23:40:27 <ehird1> it's short enough i can gdb it
23:40:27 <ehird1> thankfully
23:41:18 <oklopol> http://www.vjn.fi/pb/p364443342.txt
23:41:19 <ehird1> aah
23:41:20 <ehird1> the parsing is fine
23:41:23 <oklopol> okay
23:41:24 <ehird1> i just need to skip ONE AHEAD
23:41:28 <ehird1> on both
23:41:33 <ehird1> i, uh, think
23:41:43 <oklopol> then no need to explain that to me, although i'm a bit curious about how i could fail so badly.
23:42:23 <ehird1> god damnit you're right
23:42:25 <ehird1> daniel's interp has
23:42:27 <ehird1> stack[stackp++]
23:42:33 <ehird1> mine gets it wrong
23:42:34 * ehird1 fixes
23:42:44 <oklopol> so you didn't check the parse tree ;))
23:42:51 <ehird1> ... no
23:42:52 <ehird1> :(
23:43:04 <ehird1> woot
23:43:05 <ehird1> hello world works
23:43:18 <oklopol> heh, niec
23:43:22 <ehird1> 0.015s for hello world
23:43:24 <ehird1> not a bad speed
23:43:40 <oklopol> i'll try my python one
23:43:51 <staples> runs at 0.011 on my computer =D
23:43:52 <oklopol> if i can find one of them
23:44:43 <ehird1> ok, well you must remember this computer is ancient
23:44:48 <ehird1> on my mac it's likely even faster =)
23:44:57 <ehird1> http://www.hevanet.com/cristofd/brainfuck/tests.b i'm doing these now
23:45:13 <staples> python is interpreted isnt it?
23:45:17 <ehird1> yes
23:45:25 <ehird1> and i highly doubt it's 0.011
23:45:29 <ehird1> i mean, python is slow, really
23:45:33 <oklopol> >>>
23:45:33 <oklopol> Hello, world!
23:45:33 <oklopol> 0.0060052325086
23:45:33 <oklopol> >>>
23:45:35 <staples> hehe
23:45:40 <staples> wow
23:45:44 <ehird1> wow
23:45:44 <oklopol> and this is a joke interpreter
23:45:46 <ehird1> that's not possible
23:45:47 <oklopol> i'll paste the code
23:45:49 <ehird1> but anyway
23:45:54 <ehird1> mine does some more stuff
23:45:58 <ehird1> and, it's still fucking fast
23:45:58 <ehird1> so
23:45:59 <ehird1> ;)
23:46:00 <oklopol> http://www.vjn.fi/pb/p654251462.txt
23:46:09 <ehird1> what the fuck
23:46:11 <ehird1> yow
23:46:16 <ehird1> it's an interpreter-expression!
23:46:17 <staples> piss
23:46:18 <oklopol> heh
23:46:27 <oklopol> i wanted to do that with lambdas
23:46:35 <ehird1> aaah
23:46:36 <ehird1> i know why
23:46:39 <ehird1> you don't factor in python startup!!
23:46:44 <ehird1> remove your clock stuff
23:46:44 <oklopol> hmm?
23:46:47 <ehird1> then use the unix "time" utility
23:46:50 <ehird1> (it's in cygwin)
23:46:54 <ehird1> just start up cygwin
23:46:56 <staples> looks like lisp lol
23:47:01 <ehird1> time python interp
23:47:07 <ehird1> "real" is the one you want
23:47:09 <oklopol> i'm timing the hello world program.
23:47:10 <ehird1> tell me it :-)
23:47:14 <ehird1> and that isn't the point
23:47:18 <ehird1> mine factors in interpreter startup too
23:47:20 <ehird1> yours does not
23:47:37 <oklopol> yeah, and it owns you because of that.
23:47:47 <ehird1> that's retarded
23:47:54 <oklopol> sure, but owny!
23:47:55 <ehird1> show me what time(1) says, or i am still right
23:48:10 <oklopol> hmm, okay, what was i supposed to do now?
23:48:12 <staples> piss
23:48:14 <staples> brb
23:48:14 <oklopol> something about cygwin
23:48:17 -!- staples has quit ("ChatZilla 0.9.78.1 [Firefox 2.0.0.8/2007100816]").
23:48:39 <ehird1> first
23:48:42 <ehird1> remove the clock from your code
23:48:43 <ehird1> second
23:48:47 <ehird1> start up cygwin
23:48:50 <oklopol> removed... then?
23:48:52 <ehird1> cd (DIRECTORY TO CODE)
23:49:14 <ehird1> time /cygdrive/c/(PATH TO PYTHON REPLACE "\" WITH "/" AND LEAVE OUT C:\) interp
23:49:26 <ehird1> tell me what it says under "real" at the end
23:50:10 <oklopol> hmm... how do i know where the prompt is when i open it?
23:50:13 <oklopol> i just says ~
23:50:24 <oklopol> and "dir" gives nothing
23:51:35 <ehird1> c:\documents and settings\username
23:51:38 <ehird1> and use "ls"
23:51:50 <oklopol> "ls" gives nothing
23:52:07 <ehird1> just do:
23:52:10 <ehird1> well
23:52:13 <ehird1> is it in My documents
23:52:15 <ehird1> or somewhere in c
23:52:17 <ehird1> if it's in c:
23:52:27 <ehird1> cd /cygdrive/c/DIRECTORY/SUBDIRECTORY/etc
23:52:42 <oklopol> ah cool
23:53:38 <oklopol> err... does it know how to run python?
23:53:54 <ehird1> time /cygdrive/c/path/to/python/python.exe FILE
23:54:03 <oklopol> ah.
23:54:13 <ehird1> bah, my interpreter seems to suck with multiple lines
23:54:14 <ehird1> :(
23:54:55 <oklopol> 0.031ms when i don't run anything, just time
23:55:00 <oklopol> so... i think you won then?
23:55:04 -!- staplegun_ has joined.
23:55:04 <ehird1> uhh
23:55:06 <ehird1> don't run anything?
23:55:10 <ehird1> you run the hello world surely
23:55:21 <oklopol> "time o" is what i wrote
23:55:29 <ehird1> time o????
23:55:39 <ehird1> what is o????????????
23:55:44 <ehird1> look
23:55:45 <oklopol> time python.exe says "python.exe command not found" and says "real: 0.031ms"
23:55:48 <ehird1> well duh
23:55:52 <ehird1> i just said
23:55:53 <ehird1> time /cygdrive/c/path/to/python/python.exe FILE
23:56:05 <ehird1> is "python.exe" /cygdrive/c/PATH/TO/PYTHON/python.exe?
23:56:08 <ehird1> no.
23:56:22 <oklopol> i assumed you can just use python.exe if you're in the folder :DD
23:56:30 <oklopol> ./
23:56:30 <ehird1> no
23:56:30 <ehird1> wait
23:56:32 <ehird1> yes
23:56:35 <ehird1> time ./python.exe script
23:56:41 <ehird1> then tell me what it says after "real"
23:56:50 <staplegun_> wots a good python ide?
23:57:23 <ehird1> stop saying wot
23:57:40 <oklopol> 0.227ms
23:57:55 <oklopol> but i don't really see what that tells ya
23:58:12 <oklopol> why don't you just time your parsing&execution and tell me that?
23:58:13 <ehird1> it tells you mine takes about 0.2 seconds less than yours
23:58:15 <ehird1> which is a long time
23:58:19 <oklopol> who cares how long the program starts :|
23:58:31 <oklopol> i didn't code the python interpreter
23:58:32 <ehird1> it's benchmarks - who cares how fast hello world runs in the first place?
23:58:38 <oklopol> well, it'
23:58:50 <oklopol> ^H^H^H^H^H
23:59:11 <staplegun_> >_>
23:59:18 <oklopol> i just wanted to know how much faster yours was
23:59:27 <ehird1> 0.2 seconds faster
←2007-10-22 2007-10-23 2007-10-24→ ↑2007 ↑all