←2004-06-25 2004-06-26 2004-06-27→ ↑2004 ↑all
01:13:35 -!- iamcal has joined.
03:45:21 -!- Toreun has joined.
05:45:27 -!- Tril has joined.
06:38:19 -!- iamcal has quit ("buh bye").
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:04:37 -!- WildHalcyon has joined.
08:13:09 -!- WildHalcyon has quit ("Goin' away now!").
19:02:49 -!- bbls has joined.
19:03:00 <bbls> hello
19:03:44 <Toreun> hi
19:03:56 <bbls> hi Toreun
19:04:14 <Toreun> how are you, bbls?
19:04:18 <bbls> hmm
19:04:29 <bbls> thinking to create a new language :)
19:04:40 <bbls> [yes.. yet another one :)]
19:05:16 <Toreun> hehe
19:05:30 <Toreun> how many have you made
19:05:31 <Toreun> ?
19:05:50 <bbls> well i have no ideea :)
19:05:57 <bbls> actually it's the same language
19:06:11 <bbls> improved, name changed several times, etc
19:06:21 <Toreun> ah, I know how that is
19:06:24 <Toreun> how's it work?
19:06:24 <bbls> :)
19:06:27 <bbls> well
19:06:31 <bbls> i have certain problems
19:07:27 <bbls> especially with floating point stuff
19:07:42 <bbls> because using floats
19:07:46 <Toreun> floating point? an esolang with floats?
19:07:56 <Toreun> not many of those, iirc
19:07:58 <bbls> a+b-a is not necesarly b
19:08:39 <Toreun> that's true
19:08:48 <Toreun> where's the problem arising? comparisons?
19:08:57 <bbls> not just comparisons
19:09:04 <bbls> my plan is to create a language
19:09:23 <bbls> that is designed in a such way so that the compiler can easly prove that it can't generate exceptions for any input value
19:10:48 <Toreun> oh. hmm
19:10:57 <bbls> for example
19:11:03 <bbls> f(x)=1/x
19:11:18 <bbls> the compilation should fail because division is not defined for x=0
19:11:27 <bbls> you have then to define
19:11:38 <bbls> NonZeroReal:= [x | x in Real and x<>0];
19:11:48 <bbls> f(NonZeroReal x):=1/x;
19:11:48 <Toreun> yeah
19:11:57 <bbls> this is ok now
19:12:15 <bbls> althrought the function
19:12:18 <bbls> f(x):=switch
19:12:19 <bbls> {
19:12:28 <bbls> x= 0 : 0;
19:12:38 <bbls> x<>0 : 1/x;
19:12:38 <bbls> }
19:12:47 <bbls> is always defined, so it's ok
19:13:11 <Toreun> yeah
19:13:27 <bbls> more complex situations arise from
19:13:42 <bbls> f(x):=1/(3*x^2-2*x+1);
19:14:01 <bbls> the compiler needs a builtin symbolic algebra engine
19:14:16 <bbls> so that it can solve that equation and find that it has no real solutions
19:14:21 <bbls> so that the function is always defined
19:15:03 <Toreun> yeah
19:15:21 <Toreun> are there any symbolic algebra libraries out there?
19:15:29 <bbls> don't know
19:15:35 <bbls> but i want to code that too
19:15:46 <bbls> not just use some out of the box lib
19:15:52 <bbls> because it need some other stuff
19:16:26 <bbls> like patterns of recursivity that can be proven to be finite by induction, etc
19:16:41 <Toreun> hm
19:16:53 <bbls> because you have to prove that the recusrivity is finite
19:16:57 <Toreun> yes
19:17:07 <bbls> you can't do that in general
19:17:22 <bbls> but for particular algorithms/particular patterns you can
19:18:26 <bbls> so you need to build some kind of database
19:18:39 <bbls> also this database will contain basic identities such a+b=b+a
19:18:54 <bbls> or basic inferences such a>b -> a+c>b+c
19:19:10 <Toreun> yeah
19:20:01 <Toreun> hmm... the TI-89 calculator I *think* uses logic to do most basic inferences, but I have no idea how, rather than a database
19:20:42 <bbls> you need a database and smart algorithms for searching in the database
19:20:57 <Toreun> you need a database?
19:21:23 <bbls> the database of proof tips (identities, etc) just what i told you before
19:21:34 <Toreun> yeah
19:21:45 <Toreun> hmm
19:21:54 <Toreun> I suppose you would need basics, thinking about it
19:22:09 <bbls> obviously there are lot of papers on the net about that
19:22:13 <Toreun> computers can't exactly handle Number Theory, etc.
19:22:24 <Toreun> are there? I haven't looked
19:22:36 <bbls> but i can't find papers that deal with the problem of limited precision
19:22:43 <Toreun> apart from Turing's thesis with deals with computational theory
19:22:45 <bbls> that result in problems like a+b-a<>b
19:26:22 <Toreun> yeah
19:27:18 <bbls> there is no problem for a symbolic math package
19:27:38 <bbls> but since the program is supposed to run on a real machine
19:27:43 <bbls> that results in big trouble
19:27:52 <bbls> a really huge problem
19:27:57 <mtve> two ways: 1) symbolic computations, 2) keeping miscalculation, i.e. keeping two numbers - result and precision
19:28:19 <bbls> or keeping 2 numbers, lower limit and higher limit or result
19:28:33 <mtve> yep, same thing.
19:30:01 <bbls> but the problem is how you do symbolic computation with that
19:30:54 -!- tonsofpcs has joined.
19:31:57 <Toreun> hi there tons
19:35:38 <bbls> hmm
19:35:48 <bbls> it might be possible to write a number
19:35:55 <bbls> as [minlin:maxlim]
19:36:13 <bbls> and still do symbolic computations
19:37:15 <bbls> but you have to provide minlim and maxlim for all primitive operations
19:37:31 -!- Tril has left (?).
20:21:40 <lament> wow we had Tril in here
20:23:07 <lament> bbls: Somehow I don't think precision is your biggest problem
20:23:23 <bbls> lament what you think then that's my biggest problem?
20:38:59 <lament> well
20:39:03 <bbls> ?
20:39:04 <lament> Would this compile?
20:39:13 <lament> for(;;);
20:39:16 <lament> return 1/0;
20:39:16 <bbls> no
20:39:23 <bbls> since the language is a pure functional language
20:39:31 <bbls> not an iterative one
20:39:37 <lament> UM
20:39:44 <lament> You see my point. Hopefully.
20:40:07 <bbls> well that's why is purely functional :)
20:40:18 <bbls> also recursion is limited to specific cases
20:40:22 <lament> ??
20:40:27 <bbls> that are known from database to be finite
20:40:54 <bbls> also 1/0 would be catched
20:41:05 <bbls> because division is not defined for 0
20:41:47 <lament> What database?
20:42:04 <bbls> you need a database
20:42:04 <lament> So your language will be incapable of running a program that doesn't halt?
20:42:09 <bbls> yes
20:42:18 <bbls> it will be impossible to compile a such program
20:42:30 <lament> then it's not Turing-complete
20:42:37 <bbls> also it would be impossible to compile a program that generates exceptions
20:42:42 <lament> hence not very fun
20:42:44 <bbls> not it is not turing-complete
20:43:40 <bbls> but that does not means that ppl really neet turing-complete languages
20:43:45 <bbls> *need
20:44:47 <lament> Well
20:44:55 <lament> If you manage to create a language like that, it will be the first.
20:45:03 <bbls> yes
20:45:08 <bbls> i know that
20:45:13 <bbls> and there are many problems
20:45:15 <lament> I'm not aware of any languages in which non-halting programs are impossible which is of any use.
20:45:39 <lament> Also, how will you construct this database?
20:45:45 <bbls> you need a database
20:45:50 <bbls> that contains all basic identities
20:46:02 <bbls> such "a>b -> a+c>b+c"
20:46:03 <bbls> and so on
20:46:11 <bbls> just like a normal symbolic algebra package
20:46:38 <lament> And what does that have to do with recursion?
20:46:53 <bbls> well
20:47:04 <bbls> you also have to prove that all recursions in the program are finite
20:47:19 <bbls> and for that you need to specify in the database
20:47:25 <bbls> some particular cases
20:47:30 <bbls> when the recusion is finite
20:47:34 <lament> Such as?
20:47:46 <bbls> f(x):=switch
20:47:47 <bbls> {
20:47:56 <bbls> x=0 : 0;
20:48:14 <bbls> x>0 : f(x)-1;
20:48:15 <bbls> };
20:48:31 <bbls> usually functions that respect that pattern
20:48:36 <bbls> can be proven to be finite
20:48:40 <bbls> using induction
20:49:01 <lament> Usually, but certainly not always.
20:49:31 <bbls> as i said
20:49:32 <lament> f(x):=switch
20:49:32 <lament> {
20:49:32 <lament> x=1 : 1;
20:49:37 <bbls> there will always be a program that can't be compiled
20:49:41 <bbls> with a specific version
20:49:55 <lament> x%2 == 0: f(x/2);
20:49:56 <bbls> you you can add support for it in next version
20:50:06 <lament> else: f(x*3 + 1);
20:50:07 <lament> }
20:50:25 <bbls> "else" is banned
20:50:32 <lament> irrelevant
20:50:38 <lament> s/else/x%2!=0
20:50:45 <bbls> not
20:50:47 <bbls> since
20:50:53 <bbls> x%2=0
20:50:57 <bbls> conflicts with first
20:50:58 <bbls> one
20:51:00 <bbls> (x=1)
20:51:06 <bbls> you can't have overlapping conditions
20:51:13 <bbls> nor you can have missing cases
20:51:30 <lament> That's pure nazism :)
20:51:44 <lament> anyway, this is irrelevant
20:51:51 <bbls> it is relevant
20:51:55 <lament> no, it's not
20:51:58 <bbls> because of those restrictions
20:52:03 <lament> no, it's not
20:52:07 <bbls> the compiler will be able to actually do some work
20:52:12 <lament> rewriting my function to fit your restrictions is trivial
20:52:21 <lament> a(x):=switch
20:52:29 <lament> {
20:52:34 <lament> er
20:52:36 * lament thinks
20:52:40 <bbls> first you mix
20:52:47 <bbls> reals with naturals
20:54:18 <lament> a(x):=switch
20:54:22 <lament> {
20:54:22 <lament> x%2==0: b(x/2);
20:54:22 <lament> x%2!=0: b(x*3+1);
20:54:22 <lament> }
20:54:22 <lament> b(x):=switch
20:54:25 <lament> {
20:54:28 <lament> x==1: 1;
20:54:30 <lament> x> 1: a(x);
20:54:33 <lament> }
20:54:35 <lament> what's wrong with it now? :)
20:54:54 <bbls> well
20:55:06 <bbls> b(x) does not catch x<1
20:55:18 <lament> let's pretend there's a clause for that there.
20:55:26 <lament> What now?
20:56:09 <bbls> a output is always real
20:56:32 <lament> Do you see my point or do you not?
20:56:35 <bbls> it is not ok
20:56:40 <bbls> since x is not decreasing
20:56:42 <lament> Because if you don't, there's little sense in talking to you.
20:56:59 <lament> So your language doesn't really support recursion.
20:57:11 <bbls> for a(11) for example
20:57:19 <bbls> you get infinite loop
20:57:24 <lament> It looks a bit like recursion, but actually it's just loops with a decreasing counter.
20:58:10 <lament> Correct?
20:59:02 <bbls> got it now
20:59:10 <bbls> you transform x into a multiply of 2
20:59:16 <bbls> and you keep dividing it
21:04:18 <bbls> anyway that does not means that's impossible
21:04:27 <bbls> it just means that it's hard
21:04:36 <lament> What is?
21:04:52 <bbls> to write the compiler
21:05:04 <bbls> so that it can recognize such patterns
21:05:19 <bbls> if there is something that can be done by a human brain
21:05:26 <bbls> then a computer can do it too
21:05:27 <lament> But it won't be able to compile this program?
21:05:39 <bbls> as long as it is clearly defined
21:05:52 <bbls> if the program is finite it will compile
21:06:05 <bbls> if the compiler proves that it is not finite won't compile
21:06:27 <bbls> in the case that it won't be able to either prove either disprove
21:06:36 <bbls> it will refuse to compile too
21:06:46 <lament> Sounds very, very useless.
21:06:57 <lament> Can't even write hunt the wumpus in it.
21:07:29 <bbls> what algorithm is that?
21:07:37 <lament> It's a game.
21:08:00 <bbls> it is an infinite game?
21:08:08 <lament> Most games are.
21:08:32 <bbls> well, there has to be a solution to that too
21:08:43 <lament> No, there hasn't.
21:09:07 <lament> When a language isn't Turing-complete, it doesn't "have" to have anything.
21:09:35 <bbls> oh
21:09:41 <bbls> there is one thing i've missed
21:09:52 <bbls> you can't get an infinite game
21:09:54 <bbls> ever
21:10:05 <bbls> every program that implements a game is finite
21:10:27 <bbls> just imagine an automata
21:10:42 <bbls> althrought the number of states the system passes thru
21:10:54 <bbls> the actual pass from one state to another is finite
21:11:03 <bbls> always, for any game
21:12:20 * lament doesn't get it
21:12:32 <bbls> ok
21:12:38 <bbls> imagine a function
21:12:46 <bbls> that receives a number of moves
21:12:52 <bbls> (one from every player)
21:12:59 <bbls> and then outputs the state of the game
21:13:22 <bbls> (eg: a bitmap)
21:13:38 <bbls> althrought the size of the list of moves
21:13:40 <bbls> is indefinite
21:13:43 <bbls> the actual process
21:13:47 <bbls> of computing the state
21:13:48 <bbls> is finite
21:13:56 <bbls> (since the number of moves is always finite)
21:14:06 <lament> The number of moves is finite? Why?
21:14:14 <bbls> not the number of POSSIBLE move
21:14:22 <bbls> the number of moves realised by the players
21:14:46 <bbls> let's say you want a game
21:14:54 <bbls> where one person things about one number
21:15:03 <bbls> and the other person tries to guess it
21:15:26 <bbls> for simplicity then game ends at first guess
21:15:39 <bbls> obviously there is an indefinite number of moves
21:15:45 <bbls> but the actual number of moves
21:15:48 <bbls> is always finite
21:16:11 <bbls> look here:
21:16:28 <bbls> State function(move_list list1, list2)
21:16:30 <bbls> {
21:17:07 <bbls> return state
21:17:08 <bbls> };
21:17:24 <bbls> the length of list1 and list2 is indefinite
21:17:25 <bbls> but always finite
21:17:28 <bbls> do you get it?
21:17:58 <lament> no, because it's not
21:18:36 <bbls> the number of moves 2 playes can make is indefinite but ALWAYS finite at a moment of time after they started the game (when you compute the new state)
21:19:07 <bbls> do you get it now?
21:19:20 <bbls> for example
21:19:27 <lament> Sure, the state is finite.
21:19:30 <bbls> let's say we have a game every 10 seconds
21:19:31 -!- tonsofpcs has quit (Read error: 104 (Connection reset by peer)).
21:19:32 <lament> The point is, the program doesn't halt.
21:19:39 <lament> And therefore isn't allowed by your compiler.
21:19:59 <bbls> it is since the actual computation of the state uses a finite number of elements (since the lists are finite)
21:20:07 <bbls> so therefore the program is finite
21:20:12 <bbls> so therefore it can be compiled
21:20:49 <bbls> simply put, f(x):=combine_state(f(x-1), last_move);
21:20:50 <lament> It doesn't halt
21:20:56 <lament> f(;;) is "finite"
21:21:02 <bbls> no
21:21:03 <lament> It doesn't have any state at all
21:21:07 <bbls> f(;;) is not finite
21:21:13 <bbls> and i don;t have a such construct in my language
21:21:28 <lament> er i meant for(;;) but anyway
21:22:02 <bbls> for a specific list of moves the function is always finite
21:22:16 <bbls> that list is taken as players make their moves
21:22:23 <bbls> so therefore it is always finite
21:22:52 <bbls> (althrought it tends to grow towards +infinite, it will never reach that)
21:23:28 <bbls> what is infinite is the number of all possible game end starting with a specific number of moves already done
21:23:56 <bbls> and trying to write a program that finds all thos solutions is invalid in any language you write it
21:24:24 <bbls> do you get it now?
21:25:36 <lament> I think you're crazy.
21:25:53 <bbls> why?
21:26:32 <lament> Just becaues.
21:26:34 <lament> Because.
21:26:50 <lament> I also think your idea can't possibly work, but i don't know enough about it to prove that.
21:36:11 <bbls> at least until you can do that i have innocence asumption :)
21:46:07 -!- tonsbot has joined.
21:47:41 <tonsbot> hi
21:51:52 -!- tonsbot has changed nick to tonsofpcs.
22:27:48 <tonsofpcs> ...
22:27:59 <bbls> hi tonsofpcs
22:31:55 <bbls> gtg
22:31:57 <bbls> bye ppl
22:31:57 -!- bbls has left (?).
←2004-06-25 2004-06-26 2004-06-27→ ↑2004 ↑all