←2007-01-18 2007-01-19 2007-01-20→ ↑2007 ↑all
00:00:13 -!- CakeProphet has quit (Read error: 110 (Connection timed out)).
00:04:50 -!- CakeProphet_ has changed nick to CakeProphet.
00:53:47 <bsmntbombdood> maybe logfuck doesn't need a dup
01:05:27 -!- pikhq has joined.
01:05:54 <CakeProphet> I'm devising a language based on the rhythm of sound.
01:06:23 <CakeProphet> where the rhythm is the data rather than the operation.
01:06:34 <pikhq> . . .
01:07:09 <CakeProphet> . . .
01:07:38 <bsmntbombdood> .. .. ..
01:07:45 <CakeProphet> . .. .. .
01:07:56 <CakeProphet> .-.-.-.-.--.--.--...--...-.-.-.-.-.-.-.
01:08:08 <CakeProphet> hmm..
01:08:24 <CakeProphet> I could probably have an infinite memory... despite being a finite medium.
01:08:31 <CakeProphet> because rhythm is infinitely divisble.
01:09:15 <pikhq> It's a theoretically infinite medium, actually.
01:09:39 <pikhq> Unless your arbitrarily limit the music size?
01:10:05 <CakeProphet> I probably would... just to see if the inifitely-visibleness makes it infite.
01:10:05 * pikhq recommend something like opcodes encoded in the notes, initial data encoded via rythm
01:10:17 <CakeProphet> nah.. no notes
01:10:32 <pikhq> So just a drumbeat, then?
01:10:44 <CakeProphet> I'm going with a non-musical structure operating on the data.
01:10:49 <CakeProphet> rhythm only being the analogy for the data
01:10:57 <pikhq> That's no fun.
01:11:07 <pikhq> I want to be able to pay my code!
01:11:23 <CakeProphet> it's technically a finite strip of inifitely divisble data with regular segments of "sound" and "no sound"... a binary encoding that can be divided by any ratio.
01:11:35 <pikhq> (besides, at least with something like GNU Lilypad, there's a simple syntax for music encoding)
01:12:43 <CakeProphet> there will be maybe 3 sound-manipulation commands... and 3 or 4 pointer manipulation commands...
01:13:15 <CakeProphet> the pointer is basically three pointers... forming two segments... on which the sound-manipulation commands operate.
01:14:02 <pikhq> Make a rythmic output device, then.
01:14:12 <CakeProphet> with the control commands being proportional
01:14:14 <pikhq> Maybe tie into MIDI and make it play your data like a drumbeat.
01:14:16 <pikhq> >:D
01:14:18 <CakeProphet> yeah, that seems to be a thing to do.
01:14:40 <pikhq> (in addition to ASCII, maybe?)
01:14:57 <CakeProphet> so if you have -----|--|-------|------
01:15:31 <CakeProphet> doing "zoom tuk" (tuk is the formal name for the segment formed between the middle and right pointers)
01:15:34 <CakeProphet> you would get...
01:15:51 <CakeProphet> something like -------|--|-----|------
01:16:37 <CakeProphet> it's kinda like the golden ratio.
01:16:46 <pikhq> Heheh.
01:16:55 <CakeProphet> you take a part of the ratio... and make it the whole of the ration.
01:18:29 <CakeProphet> commands for operating on the data would be like... flip segments...
01:18:49 <CakeProphet> which gives you conditions... if both the flipped segments are the same type... nothing is changed.
01:19:03 <CakeProphet> otherwise... they swap type.
01:20:48 <CakeProphet> that could actually be consider the string-rewriting paradigm.
01:21:02 <CakeProphet> if ASCII is converted into the rhythm... and the entire program is merely operations on that string.
01:23:57 <CakeProphet> other ideas could be to use polythym to program.
01:24:14 <CakeProphet> you play two rhythms side by side... with the combinations being operations.
01:34:51 <CakeProphet> OH
01:34:58 <CakeProphet> how about a concurrent programming language.
01:35:05 <CakeProphet> with like... single character commands.
01:35:13 <CakeProphet> each thread is separate by two newlines.
01:35:34 <CakeProphet> and they're all interpreted at the same time (albeit, with a nanosecond so between them), and on different resources.
01:35:40 <CakeProphet> haha... threaded BF
02:08:22 <CakeProphet> wrote up a spec for it: http://esolangs.org/wiki/Weave :D
02:13:08 * SimonRC thinks there needs to be way to program a collection of processes instead of individual processes; you don't say "send to foo" in one and "receive from bar" in the other, but you specify a "copy from foo to bar".
02:13:12 * SimonRC realises there must be dozens of obscure academic papers on many ways of doing this.
02:13:15 * SimonRC goes to bed.
02:13:33 <CakeProphet> ...what?
02:21:02 * CakeProphet is organizing the esolang wiki's categories a bit.
02:21:06 <CakeProphet> they're kind of disgruntled.
03:02:23 <bsmntbombdood> owtf
03:02:30 <bsmntbombdood> why isn't AND a function in common lisp
03:02:32 <bsmntbombdood> stupid macros
03:03:26 <bsmntbombdood> I thought I could do (reduce #'and list)
03:03:35 <CakeProphet> it isn't?
03:03:48 <CakeProphet> I thought and was a valid function.
03:04:26 <bsmntbombdood> (funcall #'and 1 2)
03:04:34 <bsmntbombdood> > The function AND is undefined.
03:08:50 <bsmntbombdood> that's dumb
03:32:10 -!- pikhq has quit ("leaving").
03:57:32 -!- bsmntbombdood has changed nick to bdsmbombdood.
04:13:53 -!- bdsmbombdood has changed nick to bsmntbombdood.
04:22:42 -!- RodgerTheGreat has quit (Read error: 110 (Connection timed out)).
04:26:47 -!- CakeProphet has quit (Read error: 113 (No route to host)).
04:44:30 -!- wooby has quit ("BitchX: often imitated, never duplicated!").
05:22:50 -!- Sgeo has quit ("Leaving").
05:53:35 -!- MM2 has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
09:11:30 -!- oerjan has joined.
09:58:10 -!- oerjan has quit ("Destruction").
11:13:36 <SimonRC> bsmntbombdood: ISTR there is a FAND, which *is* a function.
11:14:15 <SimonRC> anyway, AND takes as many arguments as you want, so I suspect it is not useful to reduce with it.
11:14:53 <SimonRC> Discouraging the evaluation-control usage of macros is why Haskell has laziness, you know.
12:37:43 -!- MM2 has quit (Read error: 131 (Connection reset by peer)).
12:39:12 -!- MM2 has joined.
15:07:30 -!- tgwizard has joined.
17:11:01 -!- sebbu has joined.
18:14:57 -!- tgwizard has quit (Remote closed the connection).
18:29:37 * SimonRC goes to dinner.
19:35:04 <bsmntbombdood> bsmnt_bot is bored
19:35:19 <oklopol> !fuckyerself
19:35:59 <oklopol> make it say "* bsmntbot is bored" if idle for a day :)
19:36:04 <bsmntbombdood> oklopol: make logfuck better!
19:36:06 <oklopol> easy
19:36:08 <oklopol> :O
19:36:12 <bsmntbombdood> or come up with a better name
19:36:13 <oklopol> i meant the bored thing :)
19:36:24 <oklopol> name, better?
19:36:31 <bsmntbombdood> yeah
19:36:48 <oklopol> XXXfuck, where XXX is the shortest possible string related to the subject
19:37:05 <bsmntbombdood> naaah
19:37:11 <oklopol> is the naming convention for languages that have relations with bf
19:37:21 <bsmntbombdood> I don't want it to have fuck in it, so that I can tell normal people about it
19:38:08 <oklopol> logarythm would be nice if combined with CakeProphet's
19:38:10 <oklopol> :)
19:38:20 <oklopol> i'll try again
19:38:57 <oklopol> hmm
19:39:11 <oklopol> i only come up with stupid wordplays :)
19:39:43 <oklopol> how about just "logic"?
19:39:51 <bsmntbombdood> logic?
19:40:08 <oklopol> okay, bad then
19:40:11 <oklopol> hmm
19:41:57 <oklopol> make it better how?
19:42:07 <oklopol> what solution did you choose?
19:42:17 <bsmntbombdood> ?
19:42:26 <oklopol> for the dup/drp thing
19:43:03 <bsmntbombdood> didn't
19:43:08 <bsmntbombdood> I think that dup isn't needed
19:43:29 <oklopol> it is
19:43:41 <bsmntbombdood> as long as pooping in a [] is deffered to the ]
19:43:55 <oklopol> deffered?
19:44:48 <oklopol> i didn't understand that
19:45:47 <bsmntbombdood> delayed
19:46:00 <oklopol> ah deferred
19:46:05 <oklopol> still
19:46:06 <bsmntbombdood> and s/poop/pop/
19:46:24 <oklopol> it starts making sence eventually .D
19:46:39 <oklopol> so, ] pops -> it works?
19:46:46 <bsmntbombdood> I think
19:46:57 <oklopol> k
19:46:57 <oklopol> dup
19:47:04 <oklopol> shuwwit!
19:47:30 <bsmntbombdood> you can't dup
19:47:40 <oklopol> ah sorry
19:47:54 <oklopol> hmm
19:47:58 <oklopol> i think you need to dup
19:48:06 <bsmntbombdood> I think you can do it without dup
19:48:54 <oklopol> do "get input -> subtract log(input) from input"
19:49:02 <oklopol> then i'm happy
19:50:50 <bsmntbombdood> hrm
19:51:18 <oklopol> i'm not saying it's impossible
19:51:20 <oklopol> but i am
19:53:14 <bsmntbombdood> I can't figure out how
19:54:33 <oklopol> you can only do a subtraction of two adjacent numbers on the stack, there is no way to transmit ANY information between two numbers, so it is impossible to get the two numbers input and log(input) on top of the stack
19:56:35 <bsmntbombdood> I think it's still turing complete
19:56:42 <oklopol> nah
19:57:12 <oklopol> a turing complete system must be able to turn a number x to (x-log(x))
19:57:18 <oklopol> well
19:58:10 <oklopol> hmm, i think it's not turing complete if a number used in x calculations must be input x times
19:58:32 <bsmntbombdood> turing completeness doesn'thave to do with input/ouput
19:58:45 <oklopol> and i think if the example is impossible, other, more clear cases aren't either
19:58:59 <oklopol> well, okay
19:59:17 <oklopol> hmm
19:59:25 <oklopol> my example didn't work :)
19:59:27 <bsmntbombdood> argh
19:59:33 * bsmntbombdood adds dup
19:59:37 <oklopol> why is that?
19:59:49 <oklopol> it wasn't turing complete after all?
20:00:35 <bsmntbombdood> i dunno
20:00:35 <oklopol> :)
20:01:33 <oklopol> with that, if you want to, at any point of execution, subtract a from log(a), you will have to duplicate the whole program sofar
20:02:19 <bsmntbombdood> ,dg-
20:02:57 <bsmntbombdood> x-log(x)
20:02:59 <bsmntbombdood> :/
20:03:01 <oklopol> i know
20:03:05 <oklopol> i'm not blind :)
20:03:21 <bsmntbombdood> 11 commands :(
20:04:22 <oklopol> :(
20:04:41 <bsmntbombdood> i have to leave
20:04:46 <oklopol> bye
20:47:40 -!- oerjan has joined.
21:15:53 -!- anonfunc has joined.
21:21:42 -!- helios24 has joined.
21:44:21 <oklopol> made a new language today (1 fully)
21:44:30 <oklopol> brainfuck with floating point arithmetic
21:44:36 <oklopol> which has been my goal for long
21:44:55 <lament> how can that work? explain.
21:45:12 <oklopol> it adds a few constraints to programs
21:45:27 <oklopol> you have to have as many >'s as you have <'s in one level
21:45:30 <oklopol> or, []
21:45:42 <oklopol> and input allowed only at "base" level
21:46:05 <oklopol> +++[------->+<]>: would print 3/7
21:46:08 <oklopol> whatever that is
21:46:51 <oerjan> That >< constraint implies you can only use a finite number of cells.
21:47:04 -!- sebbu2 has joined.
21:47:05 <oklopol> yes
21:47:30 <oklopol> i think it's turing complete, i don't care whether it is or not, tho, it's a nice toy
21:47:32 <oerjan> Same as named whiles in pikhq's BFM
21:48:08 <oerjan> You get a Minsky machine that way, which is Turing complete.
21:48:24 <oerjan> (Ignoring non-integer values)
21:48:42 <oklopol> ;>++++>++++++++[<<[>>>+>>+<<<<[<->>>>+<<<]>>>[-<<<+>>>]<<<<-]>>>>>[-<<<<<+>>>>>]<<[-<<+>>]<-]<:
21:48:48 <oklopol> calculates sqrt of input :)
21:49:25 <oklopol> the 8 in the beginning is the number of iterations, 4 is the initial guess
21:49:52 <oklopol> i'm not yet sure whether it is possible to make an interpreter without adding even more constraints
21:50:18 <lament> hm
21:50:24 <lament> i still don't get how that works
21:50:35 <oerjan> Only increment and decrement? Are you using differentiation implicitly?
21:50:39 <oklopol> (i think i can implement any math-related function even with the constraint a sub-[] can't change a parent-[]'s data)
21:50:43 <oklopol> yes
21:50:44 <oklopol> :)
21:50:51 <oerjan> Curiously I had the exact same idea today!
21:50:53 <lament> i'm quite sure that's not turing-complete actually
21:50:55 <oklopol> difference is the name of the language
21:50:57 <oklopol> really :D
21:50:59 <oklopol> cool
21:51:20 <oerjan> Probably caused by the logfuck discussion
21:51:53 <oklopol> lament, i think it is, and i'd add all bf features if they'd make algorithmic sence like <'s and >'s being predictable
21:52:27 <oklopol> i mean, mathematically pretty hard to say how the differentiation works if there are for example inputs in a [] :)
21:53:08 <lament> i just don't understand what the semantics of - are
21:53:10 <oklopol> oerjan, i've thought about that some time ago, but heard about differential just a few months ago... and maybe the logfuck discussion too
21:53:20 <oklopol> lament, it decreases one
21:53:30 <oklopol> one 1/inf
21:53:38 <oerjan> You might want to look at non-standard analysis.
21:53:43 <lament> one 1/inf.
21:54:38 <oklopol> well, if you put [->++<] in brainfuck, you are multiplying a number. if you put [-->+<] then you either divide a number or do something unpredictable
21:54:50 <lament> so ++[->[->++<]] is exponentiation?
21:54:51 <oklopol> using differentials that makes sence too
21:55:13 <lament> err not like that
21:55:15 <oklopol> that does what it does in bf
21:55:20 <lament> ++[->++[->++<]]
21:55:31 <oklopol> 0,0,8
21:55:36 <oklopol> is the memory
21:55:49 <oklopol> if you add a <
21:55:58 <lament> hm.
21:55:59 <oklopol> i presumed you meant that
21:56:21 <lament> interesting
21:56:26 <oklopol> lament, most simple bf programs would work still...
21:56:36 <oklopol> [] is what does the funny stuff
21:56:43 <lament> still not sure if it's gonna be well-defined
21:57:03 <oerjan> It may be well-defined though not necessarily computable.
21:57:05 <oklopol> should a number go over / under zero during a loop, it is retried with a smaller increase
21:57:22 <oklopol> it is possible to interpret if i add constraints
21:57:49 <oklopol> BUT, these constrains are already used in many mathematical functions done with bf
21:58:04 <oklopol> you rarely depend on overflow
21:58:19 <oklopol> and in math you rarely have to iterate through memory
21:58:27 <lament> so you define [expr] as lim n->0 of evaluating [expr] in a language where - and + mean subtract and add n
21:58:33 <lament> right?
21:59:02 <oklopol> yes
21:59:33 <lament> possibly you could do that to the entire program and don't need the matching > and < restriction
22:00:14 <oklopol> nah
22:00:33 <oklopol> hmm
22:00:44 <oklopol> i'll try and find an example why it wouldn't work
22:00:44 <oerjan> There are some subtleties with that definition, since some values of n cause loops not to hit 0.
22:01:04 <lament> we define [] as checknig for when the index goes below 0
22:01:23 <lament> actually no, we define - as having bounds-checking
22:01:38 <lament> that makes more sense since i assume you want to keep all numbers positive?
22:01:42 <oklopol> nah
22:01:44 <oklopol> i don't
22:01:44 <lament> oh
22:01:55 <lament> that does make it more difficult :)
22:02:27 <oerjan> There may be cases where wrapping around at infinity works nicely.
22:02:28 <oklopol> you are missing the fact that inner []'s can move the pointer too, they are theoretically done infinity times
22:02:37 <oklopol> which is no problem with my constraint
22:02:38 <lament> oerjan: doubtful
22:02:51 <oerjan> Not at all doubtful.
22:03:12 <lament> oerjan: not well-defined
22:03:21 <lament> oklopol: that's fine, it's just a limit
22:03:30 <lament> (if it IS just a limit, which it doesn't seem to be)
22:03:33 <oerjan> It is well-defined if the limit is defined
22:04:38 <oerjan> (at infinity)
22:04:48 <oklopol> >+++++>++++>++++<<[-[>]<-[<]>] for example would be undefined
22:05:01 <oklopol> nah, maybe not
22:05:25 <oklopol> ah
22:05:30 <oklopol> it makes sence actually
22:05:55 <oklopol> it's the same as in BF
22:05:59 -!- sebbu has quit (Read error: 110 (Connection timed out)).
22:06:14 <lament> weird stuff.
22:06:32 <oklopol> all i added to bf was this differentials thing, ; and :, you can figure what they are
22:07:15 <oklopol> i actually thought making () a separate differentiation loop where constraints lie
22:07:18 <oerjan> Oh, I thought they were just decoration :)
22:07:25 <oklopol> and [] normal
22:07:27 <oklopol> no, addition
22:07:34 <oklopol> ,.;:
22:07:34 <oklopol> io
22:08:09 <oerjan> that's pretty logical notation for floating point IO
22:08:18 <oklopol> yes
22:08:27 <oklopol> obvious, tho
22:08:35 <oerjan> almost like Ocaml
22:08:47 <oklopol> fuck you with your names i don't know :(((((
22:08:51 <oklopol> wuzzit?
22:09:31 <oerjan> Ocaml is a functional language with object extensions. ML dialect.
22:10:17 <oklopol> okay
22:10:21 <oerjan> The point of my comment is that Ocaml uses +. etc. to mean floating point addition etc.
22:10:23 <oklopol> ; and : are like it? :D
22:10:31 <oklopol> ooo
22:10:45 <oerjan> Because it doesn't have arithmetic overloading.
22:10:48 <oklopol> yeah
22:10:53 <oklopol> guttit
22:11:51 <oklopol> but, i don't care whether it's touring complete, i can easily translate a calculation on it
22:12:01 <GregorR> oklopol: Gut tit?
22:12:08 <oklopol> yeah
22:12:09 <oklopol> sure
22:12:18 <GregorR> I don't even want to think about what that's supposed to mean O_O
22:12:24 <oklopol> got it
22:12:36 -!- Sgeo has joined.
22:13:20 <oklopol> now... now.... ()?
22:13:24 <oklopol> needed? is?
22:14:15 <oerjan> You can emulate ordinary [] I think
22:14:29 <oklopol> hmmmmmm
22:14:39 <oerjan> Or rather, ordinary +-
22:14:57 <oklopol> i don't know if the implicity will work everywhere
22:15:04 <oerjan> By having a cell with a fixed value.
22:15:16 <oklopol> yeah, i thought of that
22:16:30 <oklopol> 1 could assign a 1 in the current cell, that was one thing i thought... another were ^ and v, ^ would convert a differential into it's counterpart number, v the other way xD
22:16:42 <oklopol> counterpart number...
22:17:36 <oerjan> I don't think any of those are strictly needed though.
22:18:56 <oklopol> maybe not, i just think the fact that (3 here)[->[SMTH]<] will execute SMTH infinity times will in some cases make it hard for the interpreter to know what to do, actually
22:18:56 <oerjan> If you keep one cell with a known value you can convert everything with a little copying.
22:19:07 <oklopol> yes, true
22:19:44 <oklopol> but i liked the idea of using only one kind of numbers
22:19:57 <oklopol> everything being used as a differential when needed
22:20:10 <oklopol> but that requires the <>-limit i'm afraid
22:20:18 <oerjan> Well no matter what you do some limits will fail to exist
22:20:33 <oklopol> liek?
22:21:18 <oerjan> [>+<]
22:21:39 <oklopol> mem: 0 INF
22:22:07 <oklopol> 0 on this level, 1 on the other, infinity steps done -> 0 INF
22:22:15 <oklopol> not 0
22:22:18 <oklopol> but what there was
22:22:37 <oerjan> You will get inconsistencies.
22:23:21 <oklopol> +[>+<] (1 INF) >[->+++++<] (INF 0)
22:23:26 <oklopol> i can't see them
22:23:51 <oerjan> What happens with [>+<]>+<[>-<]
22:23:58 <oklopol> i'm just running the algorithm in my head, crash it and i see the inconsistencies
22:24:09 <oklopol> nothing
22:24:13 <oklopol> 0 1
22:24:17 <oklopol> if there is stuff tho
22:24:22 <oklopol> in the beginning
22:24:23 <oklopol> then
22:24:53 <oklopol> [>+<] (0 INF) >+< (0 INF) [>-<] (0 0)
22:25:23 <oklopol> replace 0 with your var
22:25:33 <oklopol> that's what it'd've done
22:25:45 <oklopol> you can, indeed, call that an inconsistency :)
22:26:02 <oklopol> but, it could be made crash
22:26:15 <oklopol> or infinite loop
22:27:02 <bsmntbombdood> I was working on brainfuck -> logfuck conversions in math today
22:27:16 <oklopol> did it work?
22:27:23 <bsmntbombdood> dunno
22:27:37 <bsmntbombdood> well, i got conversions for everything, but i haven't tested them
22:27:41 <bsmntbombdood> I'll type em up
22:27:43 <oklopol> ya
22:29:07 <bsmntbombdood> http://pastebin.ca/321969
22:30:20 <oklopol> ,
22:30:40 <oklopol> ah
22:30:57 <bsmntbombdood> because , replaces the top
22:31:00 <oklopol> sorry, i'm once again mixing the new standard with the old one :)
22:32:03 <oklopol> don't think > and < are correct tho
22:32:10 <bsmntbombdood> look good?
22:32:11 <oklopol> well, actualyl
22:32:13 <oklopol> yeah
22:32:22 <oklopol> they are the same, yeah
22:32:36 <oklopol> oh
22:33:05 <oklopol> yeah
22:33:07 <oklopol> xD
22:33:25 <oklopol> i had to think it over a few times
22:33:44 <oklopol> well, if you have an interpreter for the latest standard, try em
22:33:51 <bsmntbombdood> I will
22:34:51 <oklopol> i'm pretty sure a quine qouldn't work!
22:38:34 <bsmntbombdood> what's some brainfuck to test?
22:38:54 <oklopol> eh
22:39:01 <oklopol> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-.
22:39:15 <bsmntbombdood> ...that won't be a good test
22:39:28 <oklopol> ++++++++[->++++++++<]>.?
22:39:36 <oklopol> ++++++++[->++++++++<]>+.
22:39:41 <bsmntbombdood> i'll just do hello world
22:39:44 <oklopol> that would be a test
22:39:47 <oklopol> yeah
22:39:48 <oklopol> same thing
22:40:01 <bsmntbombdood> 1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--[<1g1--1g1--1g1--1g1--1g1--1g1--1g1--<1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--<1g1--1g1--1g1--<1g1-->>>>1-d]<1g1--1g1--d.<1g1--d.1g1--1g1--1g1--1g1--1g1--1g1--1g1--d.d.1g1--1g1--1g1--d.<1g1--1g1--d.>>1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--1g1--d.<d.1g1--1g1--1g1--d.1-1-1-1-1-1-d.1-1-1-1-1-1-1-1-d.<1g1--d.<d.
22:40:13 <bsmntbombdood> is the code I get
22:40:17 <oklopol> runnit
22:40:36 <bsmntbombdood> shit
22:40:41 <oklopol> :D
22:40:50 <bsmntbombdood> it prints ":QXX[I[^X"
22:40:53 <oklopol> ++++++++[->++++++++<]>+.
22:40:55 <oklopol> try that
22:41:22 <bsmntbombdood> 1
22:41:27 <oklopol> ?
22:41:34 <bsmntbombdood> it prints "1"
22:41:38 <oklopol> i know your problem
22:41:45 <oklopol> your's prints numbers? btw
22:41:59 <bsmntbombdood> no, it prints ascii
22:42:19 <oklopol> if a cell is empty, bf assumes it 0
22:42:26 <bsmntbombdood> mine does too
22:42:26 <oklopol> yours doesn't have it
22:42:28 <oklopol> oh
22:42:57 <oklopol> i thought a - would use the underlying number if there was one and only making a new one when the stack is empty
22:43:08 <oklopol> *make
22:44:32 <oklopol> [<1g1-- this here will use the number in the last cell, right?
22:44:46 <bsmntbombdood> huh?
22:44:55 <oklopol> hey
22:44:56 <oklopol> yeah
22:44:59 <oklopol> it would
22:45:00 <oklopol> not
22:45:46 <oklopol> +[->+<]>.
22:45:48 <oklopol> try that
22:46:31 <bsmntbombdood> What's it supposed to do?
22:46:35 <oklopol> print a 1
22:46:40 <bsmntbombdood> nope
22:46:44 <bsmntbombdood> it hangs forever
22:46:45 <oklopol> put numeric io on
22:46:48 <oklopol> a-ha
22:46:52 <oklopol> show the code
22:47:09 <bsmntbombdood> 1g1--[1-<1g1-->d]<d.
22:48:03 <bsmntbombdood> it's non-wrapping
22:48:14 <oklopol> it should work imo
22:48:21 <bsmntbombdood> no
22:48:29 <bsmntbombdood> yes
22:49:22 <oklopol> hmm
22:49:23 <oklopol> okay
22:49:34 <oklopol> what does < do if the rightmost stack is empty?
22:49:38 <bsmntbombdood> 0
22:49:43 <oklopol> good
22:51:19 <bsmntbombdood> argh
22:51:20 <bsmntbombdood> bug
22:51:24 <oklopol> 1g1-- (put one on stack) [1- (subtract one... at zero now) < (push a zero, stack now [0 0]) 1g1-- (add one, stack now [0 1]) > (stacks: 1:[0] 2:[1]) d ([0, 0] [1], so end loop sith [0] [1]) ] < (stack now [0 1]) d. (print topmost... 1)
22:51:34 <oklopol> point me where it goes wrong
22:51:40 <bsmntbombdood> bug in interpreter
22:51:40 <oklopol> ....and win a cookie!
22:51:44 <oklopol> i knwo
22:52:25 <oklopol> more like, i knew it!
22:53:42 <oklopol> if not secondary:
22:53:43 <oklopol> secondary.append(0.)
22:53:43 <oklopol> primary.append(secondary.pop())
22:53:49 <oklopol> the bug was the no else?
22:53:56 <bsmntbombdood> no
22:53:58 <oklopol> okay
22:54:03 <bsmntbombdood> in the '-' code
22:54:31 <oklopol> yeah
22:54:40 <oklopol> i should've read that :)
22:54:51 <bsmntbombdood> I need to write a stack object
22:54:53 <oklopol> pop returns none and you can append that?
22:54:56 <oklopol> you don't
22:55:18 <oklopol> you could, but since that is already done, no use
22:55:26 <oklopol> that as in that interpreter
22:55:47 <oklopol> the function is easily fixed
22:56:09 <oklopol> well yeah, stack might be easier
22:57:36 <oklopol> class stack:
22:57:36 <oklopol> def __init__(self):
22:57:36 <oklopol> id=[]
22:57:36 <oklopol> def push(a):
22:57:36 <oklopol> id.append(a)
22:57:37 <oklopol> def pop(a):
22:57:39 <oklopol> if id:
22:57:41 <oklopol> return id.pop()
22:57:43 <oklopol> else:
22:57:45 <oklopol> return 0
22:57:56 <oklopol> 27 seconds
22:58:11 <oklopol> i'm getting godd it seems
22:58:12 <oklopol> :\
22:58:21 <oklopol> ah
22:58:24 <oklopol> min 27 secs
22:58:33 <oklopol> then it makes more sence :)
22:59:07 <oklopol> since i had a moment of thought on [] or recursion but then remembered [] is a list :D
23:01:05 <bsmntbombdood> yes!
23:01:08 <bsmntbombdood> it works!
23:01:32 <bsmntbombdood> :D
23:01:43 <oklopol> the progz?
23:01:51 <bsmntbombdood> hello world
23:01:55 <oklopol> good
23:02:56 <oklopol> for a brainfuck interpreter, a hello world usually find all bugs
23:03:23 <bsmntbombdood> I hope so
23:03:50 <oklopol> well, now it's brainfuck with multiplication and addition :)
23:04:02 <oklopol> actually all basic arithmetic
23:04:02 <bsmntbombdood> yep
23:04:14 <bsmntbombdood> more complex math is loads easier too
23:04:20 <oklopol> i can do sqrt
23:04:26 <bsmntbombdood> 3 extra instructions though :(
23:04:27 <oklopol> if you can wait
23:04:30 <oklopol> yeah :(
23:05:15 <bsmntbombdood> sqrt is >1 11g1-- >g<g - p<g >g<g >1g<-- p p
23:05:38 <bsmntbombdood> or >1 TWO DIV<g MULT p
23:06:28 <oklopol> ah you can just simulate it with logs
23:07:04 <bsmntbombdood> what do you mean, simulate it?
23:07:10 <bsmntbombdood> There's no simulation
23:07:13 <oklopol> i mean, calculate :)
23:07:18 <bsmntbombdood> yeah
23:07:22 <bsmntbombdood> great, eh?
23:07:54 <oklopol> it's pretty cool
23:08:07 <oklopol> i needed your macros to see it tho :(
23:12:49 <bsmntbombdood> I need my macros to write it
23:14:11 <oklopol> yeah, but i'm very sensitive about my human weaknesses
23:14:31 <oklopol> the 1 is the input tho?
23:14:40 <bsmntbombdood> no
23:14:45 <bsmntbombdood> the 1 is to get .5
23:14:52 <oklopol> yeah
23:14:57 <oklopol> goddamned
23:15:45 <oklopol> i misunderstood it a little
23:16:33 <oklopol> since i just glanced at it and realized base^(log(a)*log(b))=a^b
23:17:57 <oklopol> i should have someone here whack me in the head if i start just staring at the screen idle :)
23:19:25 <bsmntbombdood> haha awesome
23:19:44 <bsmntbombdood> I came up with an algorithm to generate an arbitrary number on the stack
23:20:08 <bsmntbombdood> http://pastebin.ca/322010
23:21:46 <bsmntbombdood> works for floating point too
23:22:26 <oklopol> nice
23:24:23 <bsmntbombdood> now it's the output is smaller: http://pastebin.ca/322014
23:24:50 <oklopol> okay, now i figured it
23:24:58 <oklopol> i'm slow :\
23:25:35 <bsmntbombdood> figured what?
23:25:56 <oklopol> i mean, took me 5 minutes to get the function fully :\
23:26:09 <bsmntbombdood> the gen_number function?
23:26:12 <oklopol> yeah
23:28:05 <bsmntbombdood> I'm not sure how it works with floating point numbers
23:29:13 <bsmntbombdood> It does though
23:31:45 <bsmntbombdood> Might be able to make it more efficient by using multilication too
23:31:48 -!- jix__ has joined.
23:33:11 <oklopol> hmm
23:33:23 <oklopol> log(the float) returns a negative number
23:33:27 <oklopol> which can be created
23:33:36 <oklopol> and... it is normally added and exp'd
23:34:15 <bsmntbombdood> hmm
23:36:23 <bsmntbombdood> well, I think that's a very elegant algorithm
23:36:54 <oklopol> yes, have nothing to add :\
23:36:59 <oklopol> perfect.
23:37:01 <oklopol> :D
23:38:26 <oklopol> as long as the numbers are of finite length in the base system, that is fast
23:38:50 <oklopol> if you'd've used 3-base in your language, that would cause infinite loops
23:38:59 <bsmntbombdood> ?
23:39:42 <oklopol> because number-base**int(log(number)) would never be zero
23:40:02 <oklopol> since there would be an infinite series of numbers as the decimal tail
23:42:09 <bsmntbombdood> ah ha!
23:42:15 <bsmntbombdood> I made it more effiecient
23:42:21 <oklopol> show!
23:42:35 <bsmntbombdood> s/math.floor/round/
23:42:53 -!- jix__ has quit ("Bitte waehlen Sie eine Beerdigungnachricht").
23:43:01 <oklopol> that's not an algorithmical improvement :)
23:43:04 <bsmntbombdood> is what I did
23:43:15 <oklopol> *-al
23:43:23 <bsmntbombdood> well, it makes numbers like 2**16-1 a lot shorter
23:43:34 <oklopol> ah
23:43:39 <oklopol> it is, true
23:43:52 <oklopol> not much tho
23:43:59 <bsmntbombdood> yes much
23:44:32 <oklopol> not much, 2**16*0.75 would be almost as inefficient then
23:45:01 <bsmntbombdood> before: 336 chars, after: 24
23:45:17 <oklopol> okay :)
23:45:32 <bsmntbombdood> 2**16*0.75 is 34 chars
23:45:44 <oklopol> and used to be?
23:45:52 <bsmntbombdood> one sec
23:46:03 <oklopol> actually
23:46:10 <oklopol> should be about the same
23:46:12 <oklopol> i think
23:46:24 <bsmntbombdood> used to be 69 chars
23:46:45 <oklopol> well, nice improvement then :D
23:47:15 <bsmntbombdood> whoa
23:47:31 <bsmntbombdood> .1 is 1435 chars
23:47:41 <oklopol> well, given
23:48:08 <bsmntbombdood> I think I have an idea
23:48:09 <oklopol> it's 2-base presentation is more than 30 bits
23:49:18 <bsmntbombdood> How do we convert a floating point number into a fraction?
23:50:52 <oklopol> hmm
23:50:57 <oklopol> you mean
23:50:58 <oklopol> like
23:51:36 <oklopol> wtf i can't find the word :\
23:51:41 <bsmntbombdood> I want f(.2) => (1,5)
23:51:50 <oklopol> oh
23:52:04 <bsmntbombdood> ei 1/5 == .2
23:52:27 <oklopol> (floor(number), 1/(number-floor(number)))
23:52:39 <oklopol> ?
23:52:54 <bsmntbombdood> nope
23:53:18 <oklopol> then what do you mean? :D
23:53:50 <bsmntbombdood> the gives (0.0, 5.0) for .2
23:54:10 <oklopol> yeah, i don't know what you meant by (1,5) :)
23:57:16 <bsmntbombdood> yes!!
23:57:29 <bsmntbombdood> .1 is now 31 chars!
23:57:38 <oklopol> what did you do?
23:58:12 -!- CakeProphet has joined.
23:58:29 <bsmntbombdood> http://pastebin.ca/322047
23:59:10 <bsmntbombdood> erm, crap
23:59:12 <bsmntbombdood> buggy
23:59:43 <bsmntbombdood> yeah, doesn't work for numbers > 1
←2007-01-18 2007-01-19 2007-01-20→ ↑2007 ↑all