←2007-07-07 2007-07-08 2007-07-09→ ↑2007 ↑all
00:00:01 <oerjan> an ideal should have two properties: it should be closed under addition, and it should be closed under multiplication with any element of the original ring, even those that are not in the ideal.
00:00:48 <oerjan> Then you end up with a set like { m*x + n*y | x,y polynomials } generated from the m and n you start with
00:00:57 <oklopol> i'm sorry, but you're going slightly over my head : \
00:01:08 <oklopol> even though i know the concepts somewhat
00:01:14 <oklopol> i'll retry.
00:01:46 <oerjan> if it has those two properties then you can identify any two elements whose difference is in the ideal subset.
00:02:07 <ihope> That paste in pictorial form: http://i11.tinypic.com/4yf0v4i.png
00:02:20 <oerjan> and the quotient will still be a ring, with addition, subtraction and multiplication behaving almost normally
00:02:48 <oklopol> oerjan: <oerjan> but then you want to do two sets of identifications simultaneously <<< is where you lost me :)
00:03:20 <oklopol> i'm not sure how a set identifies with something wither
00:03:23 <oklopol> *either
00:03:51 <oerjan> oh. this quickly gets out of hand.
00:04:06 <oklopol> heh :)
00:04:35 <oerjan> back to the familiar (mod n) example, perhaps.
00:04:41 <oklopol> :P
00:05:00 <oklopol> i promise i'll start reading about math after summer :)
00:05:20 <oerjan> when you do calculations (mod n), you can treat any two numbers whose remainder are the same as if they were nearly the same number.
00:05:26 <oklopol> yeah
00:05:38 <oklopol> because of the closednessness or?
00:05:50 <oklopol> anyway i know the system
00:05:53 <oerjan> and you can add, multiply and subtract and the remainders are still the same
00:05:57 <oklopol> yeah
00:06:02 <oklopol> that far i go
00:07:02 <oerjan> so then you can ask, what ways are there of identifying numbers or polynomials such that addition, multiplication and subtraction preserves all the identifications you have done.
00:07:41 <oklopol> you mean... other than modulo?=
00:07:43 <oklopol> http://video.google.com/videoplay?docid=8392009975620212485&q=solve+feet+rubik%27s+cube&total=20&start=0&num=10&so=0&type=search&plindex=0
00:07:57 <oklopol> i have a rubik's cube on the floor, can't even turn it :\
00:08:01 <oklopol> with my feet i mean
00:08:14 <oerjan> exactly. except mathematicians as you see in the wp article use mod to denote the general case too
00:08:56 <oklopol> oh
00:09:12 <oklopol> i'll try what you said again
00:09:21 <oerjan> and the answer is that you must identify things whose difference are in some set, and you can do this if that set has the ideal property.
00:10:00 <oerjan> *that set is an "ideal"
00:10:51 <oklopol> any set such that for any numbers a and b doing a=a-b and a=b-a repetitively correspons to one number in the set?
00:11:09 <oklopol> i might be completely off here again
00:11:21 <oerjan> er, possibly
00:11:28 <oklopol> heh
00:12:14 <oklopol> i think i don't undestand 'difference' here
00:12:19 <oerjan> any subset such that for any numbers a and b in the subset, and any number r not necessarily in the subset, a+b, a*r and b*r are also in the subset.
00:12:21 <oklopol> is it a-b? :)
00:12:25 <oerjan> yeah
00:12:57 <oklopol> you mean, after the operation that defines the set?
00:13:01 <oklopol> like a modulo?
00:13:47 <oklopol> i mean, if r isn't in a subset, then why would a*r be :|
00:14:14 <oerjan> well, consider again the case (mod n)
00:14:34 <oklopol> then a modulo would be taken to get it back in the set
00:14:36 <oklopol> right?
00:14:43 <oerjan> in that case the ideal is the set of integers divisible by n.
00:14:52 <oklopol> oh
00:14:55 -!- jix has quit ("CommandQ").
00:14:59 <oerjan> no! the ideal is what you start with _before_ taking modulo
00:15:16 <oerjan> it is what you use to define the modulo operation
00:15:22 <oklopol> kay i understand ideal now
00:15:42 <oklopol> i guess
00:15:52 <oerjan> and it must have these two properties if the modulo operation is to make sense wrt. addition, subtraction and multiplication.
00:16:12 <oklopol> it must be a 'ring', that is?
00:16:16 <oklopol> or was it field
00:16:40 <oerjan> no, an ideal. the ring is the whole original set.
00:16:56 <oerjan> the ideal is the subset that you want to identify with 0.
00:17:11 <oklopol> okay
00:17:38 <oklopol> perhaps i should try understanding what you said again
00:17:49 <oerjan> ok
00:19:19 <oklopol> <oerjan> Then you end up with a set like { m*x + n*y | x,y polynomials } generated from the m and n you start with <<< i guess you somewhat lose me at this point now :)
00:20:14 <oklopol> i should read about this instead of bugging you
00:20:26 <oklopol> i know great books, but i'm too lazy to borrow them from the library
00:21:25 <oklopol> anyway, gotta go read physics now, i'm learning about the complex newtonian relations of time, speed and distance!
00:21:30 <oklopol> ->
00:21:42 <oerjan> well if you look at that set it happens to be an ideal :)
00:22:04 <oerjan> and it is the smallest ideal that contains m and n.
00:22:24 <oklopol> an ideal over what? :\
00:22:48 <oerjan> polynomials with integer coefficients, if we stay by the case in the wp article
00:23:04 <oerjan> or a general ring, otherwise
00:23:16 <oerjan> *commutative ring
00:23:35 <oerjan> (let's ignore noncommutative rings)
00:23:42 <oklopol> okay
00:24:16 <oerjan> you could also look at _just_ the integers.
00:24:31 <oerjan> for an example.
00:25:17 <oerjan> because then it happens to be that { m*x + n*y | x,y integers } is the same set as { gcd(m,n)*x | x integer }
00:25:42 <oklopol> yeah
00:25:43 <oklopol> true
00:25:50 <oerjan> in the ring of integers, _all_ ideals are generated by a single number
00:26:18 <oerjan> (it is what is called a "principal ideal domain".)
00:26:53 <oklopol> i'm not sure how they are 'generated by a single number' :)
00:27:16 <oklopol> i'm all for you teaching me basics, but i feel somewhat annoying here :P
00:27:22 <oerjan> basically it means that set is the smallest ideal containing gcd(m,n).
00:27:48 <oklopol> i guess i understand that
00:28:11 <oklopol> okay, i do understand that
00:28:23 <oerjan> hooray :)
00:28:52 <oklopol> with polynomials it's more complicated than that?
00:29:00 <oerjan> it can be.
00:29:12 <oklopol> plus i'm not sure how polynoms relate to primality :P
00:29:38 <oerjan> if you do polynomials in a single variable with _real_ coefficients, then they too are a principal ideal domain.
00:30:03 <oerjan> however once you restrict to integers, you may need more than one generator, as in the article.
00:30:41 <oerjan> (mod n, x^r - 1) means "modulo the smallest ideal containing n and x^r-1"
00:30:58 <oerjan> (i think i may have said that far above when this conversation started)
00:31:25 <oklopol> perhaps, it was even fuzzier to me then
00:31:54 <oklopol> okay, i think i understand the idea now
00:32:06 <oerjan> oerjan> it means modulo the ring ideal generated by n and m
00:32:53 <oklopol> so basically (ideal over mod n) + (ideal over x ^ r - 1) where + means union?
00:33:02 <oklopol> and use that for mod
00:33:14 <oerjan> not union,
00:33:40 <oerjan> but S + T = { x+y | x in S, y in T }
00:33:58 <oerjan> which happens to be common mathematical notation :)
00:34:25 <oklopol> can i just do 8 = 0 (mod 5,3)? because 8%5%3=0?
00:34:31 <oklopol> or have i gotten something wrong again? :)
00:34:49 <oerjan> that works in this case
00:35:07 <oklopol> (it's also 2)
00:35:08 <oerjan> however it can trip you up in others:
00:35:37 <oerjan> (and incidentally fibonacci numbers are good examples to show this)
00:35:49 <oerjan> 21 = 0 (mod 13, 8)
00:36:10 <oerjan> er wait
00:36:45 <oklopol> 8, 5 and 3 are indeed fibz, didn't notice :P
00:37:22 <oerjan> because successive fibonacci numbers are those that compute the gcd slowest
00:38:11 <oerjan> let's see, 21 = 0 (mod 13, 5)
00:38:18 <oklopol> fib(n) = 0 | fib(n-3) (mod fib(n-1), fib(n-2))
00:38:41 <oklopol> right?
00:38:57 <oerjan> actually it is _always_ 0.
00:39:02 <oklopol> oh
00:39:10 <oerjan> that's when you trip up.
00:39:19 <oklopol> 21 % 8 = 5, 5 % 13 = 5
00:39:20 <oklopol> okay.
00:39:55 <oerjan> you see, just because you have reached a number smaller than both generators doesn't mean you are finished
00:40:09 <oklopol> ah, i see
00:40:19 <oerjan> gcd(5,13) = 1, so it should reduce to 0
00:40:44 <oerjan> but you need to use negative coefficients to get it
00:40:58 <oklopol> hmm, is there something fun in what fibs are factors of what fibs by the way?
00:41:16 <oerjan> perhaps
00:41:32 <oerjan> i only remember that neighbors always have gcd 1
00:41:50 <oklopol> that i find obvious
00:41:56 <oklopol> i like to think it's because i own.
00:41:57 <oerjan> indeed
00:42:10 <oklopol> can't really say why it would be
00:42:20 <oklopol> though
00:42:42 <oerjan> it's because gcd is preserved when you subtract one number from the other
00:42:53 <oklopol> ah, of course
00:43:20 <oklopol> i know the algorithm for gcd
00:43:28 <oklopol> so perhaps that was why it was obvious
00:43:35 <oklopol> though, ownage, as well
00:44:10 <oklopol> now physics, unless you wanna continue the lesson.
00:44:12 <oklopol> :P
00:44:38 <oerjan> i guess that's enough for now.
00:45:49 <oklopol> goodz
00:45:53 <oklopol> because
00:46:02 <oklopol> physics is so much more nourishing
00:46:39 <oklopol> i just read about how to calculate density
00:46:53 <oklopol> pretty hard to wrap my head around it, but i think i finally managed
00:47:33 <oklopol> also, how to draw graphs
00:47:38 <oklopol> that requires some skill.
00:47:41 <oklopol> ---->
00:48:32 <oerjan> why it's just a simple application of Fubini's theorem </mathematical overgeneralization>
00:48:59 -!- RedDak has quit (Remote closed the connection).
01:17:42 -!- boily has joined.
01:40:11 -!- boily has quit ("WeeChat 0.2.5").
02:01:36 -!- sebbu has quit ("@+").
02:15:24 -!- GregorR-L has joined.
02:15:40 <GregorR-L> I've added bad collision to my JavaScript 3D engine 8-D
02:23:37 <pikhq> You have a 3D Javascript engine?!?
02:26:33 <GregorR-L> It's lame and sprite-based, but yeah :P
02:26:40 <GregorR-L> http://gregorr.homelinux.org/js3d/3d.html
02:34:15 <pikhq> Brilliant, but why isn't it in Plof?
02:37:35 <GregorR-L> Because I'm JUST THAT LAME.
03:19:15 -!- meatmanek has joined.
03:58:19 -!- edwardk has joined.
04:01:42 -!- edwardk has left (?).
04:12:01 -!- Sukoshi has joined.
04:12:19 <Sukoshi> RodgerTheGreat: Ya here? (Answer when ye are.)
04:12:34 <RodgerTheGreat> yeah
04:12:36 <RodgerTheGreat> 'sup?
04:13:22 <Sukoshi> I gots an idea, and you're the only Java programmer I know.
04:13:31 <Sukoshi> (And I will be quick since I'm in the middle of Japanese work.)
04:13:39 <Sukoshi> You wanna implement Smalltalk in Java? ;)
04:13:51 <RodgerTheGreat> erm
04:13:53 <RodgerTheGreat> eep
04:13:59 <Sukoshi> Heh. Gigantic, I know.
04:14:01 <RodgerTheGreat> that sounds rather nontrivial. :S
04:14:24 <Sukoshi> But there are books on the exact VM structure stuff, and you can draw inspiration from the Little Smalltalk distribution in C.
04:14:44 <Sukoshi> So, type out your thoughts, and I'll get back to you in about 30 mins. or so.
04:15:58 <RodgerTheGreat> hm
04:16:00 * RodgerTheGreat thinks
04:16:11 <Sukoshi> http://users.ipa.net/~dwighth/smalltalk/bluebook/bluebook_imp_toc.html <-- Read.
04:16:39 <RodgerTheGreat> GregorR-L: btw- that 3d engine is flippin' sweet
04:16:48 <RodgerTheGreat> I see tons of possibilities
04:17:15 <GregorR-L> ^^
04:17:24 <Sukoshi> Oh, and GregorR-L too if he has the time.
04:17:32 <Sukoshi> (/Drive)
04:17:54 * GregorR-L doesn't speak Java.
04:18:22 * pikhq refuses to.
04:26:31 <Sukoshi> Well pikhq, whether you like Java or not, it is popular, readily available, and its libraries are mostly well-tested across platforms, and is faster to code in than C.
04:26:51 <Sukoshi> Sometimes you have to realize that going down with your ship doesen't help anyone but your own pride ;)
04:28:26 <GregorR-L> It's too bad that the only two languages in existence are C and Java.
04:29:01 <Sukoshi> Name one more appropriate for the task, GregorR-L.
04:29:06 <GregorR-L> D
04:29:08 <Sukoshi> If you say C++, I will shoot you :P
04:29:11 <Sukoshi> Oh. Hmmm now.
04:29:23 <Sukoshi> That is a very nice idea, in fact.
04:30:00 <pikhq> Sukoshi: I'm a Tcler.
04:30:20 <pikhq> :D
04:30:22 <RodgerTheGreat> pikhq: does that mean you're TCLish?
04:30:24 <Sukoshi> Now I'm torn :\ D is popular, and compiles quite well to C ... but Java is known by hundreds of thousands of people (most of them chips off the old idiot block), and makes companies go Oooh and Aaah.
04:30:27 <RodgerTheGreat> :D
04:30:36 <Sukoshi> But D is so nice :(
04:30:44 <Sukoshi> GregorR-L: I detest you :(
04:30:45 <pikhq> Sukoshi: That last bit is a *bad* property of Java. :p
04:31:06 <Sukoshi> pikhq: Like I said, occasionally you have to swallow the pill of bad taste to get good effects.
04:31:40 <Sukoshi> You know full well that TCL is a dying profession ;)
04:31:48 <Sukoshi> (And Perl is soon to be, methinks.)
04:31:55 <GregorR-L> Thank GAWD (re Perl)
04:32:18 <pikhq> You know full well that Netcraft confirms BSD is dying.
04:32:30 <Sukoshi> Well, only Sun and IBM are capable of making a huge downloadable VM sound attractive, and that after 10 years of shameless pimping.
04:32:42 <pikhq> (I'm sorry, but Tcl's not a dying language)
04:32:44 <RodgerTheGreat> Sukoshi: did you just call me an idiot in a roundabout fashion? <:|
04:32:58 <Sukoshi> RodgerTheGreat: Not a chance. I called Larry Wall one.
04:33:03 <RodgerTheGreat> lol
04:33:21 <Sukoshi> Because I don't think Wall and his Perlilites have the pimping skills neccessary to pimp Parrot all the way through.
04:34:00 -!- GreaseMonkey has joined.
04:34:10 <pikhq> Sukoshi: Microsoft did it in much less time.
04:34:19 <Sukoshi> pikhq: Since when was .NET fashionable?
04:34:22 <pikhq> Fine, so they already have legions that bow down and grovel at any word. . .
04:34:36 <Sukoshi> Yeah. Only M$ idiot legions attached to it.
04:34:48 <pikhq> But there's *many* of them.
04:35:14 <Sukoshi> But they're becoming less and less influential. Java has a *lot* more mindshare and managershare than .NET, and that's what counts.
04:35:26 <GreaseMonkey> what about C/C++?
04:35:28 <Sukoshi> Even D does, but D doesen't have a VM.
04:35:32 <Sukoshi> C/C++ don't have VMs.
04:35:41 <GreaseMonkey> it's fast though
04:35:47 <pikhq> GreaseMonkey: That's an unstoppable force. :p
04:35:51 <Sukoshi> The topic was about pimping VMs.
04:35:55 <GreaseMonkey> oh ok
04:35:57 * GregorR-L wonders at what point you asserted that VMs are a necessity ...
04:36:02 <GreaseMonkey> LUA's VM is nice
04:36:06 <Sukoshi> Sukoshi> Well, only Sun and IBM are capable of making a huge downloadable VM sound attractive, and that after 10 years of shameless pimping.
04:36:11 <pikhq> (as long as there's a computer, there will be C. . . Or something *remarkably* similar)
04:36:14 <GreaseMonkey> it's fast and has better garbage collection than Java
04:36:17 <Sukoshi> <Sukoshi> Because I don't think Wall and his Perlilites have the pimping skills neccessary to pimp Parrot all the way through.
04:36:19 <GreaseMonkey> well, so i've heard
04:36:26 <GregorR-L> Oh, I gets it :P
04:36:36 <GreaseMonkey> hey GregorR
04:44:13 -!- edwardk has joined.
05:10:25 -!- edwardk has quit (Read error: 104 (Connection reset by peer)).
05:48:13 <bsmntbombdood> Sukoshi: use real languages, please
05:48:37 <RodgerTheGreat> bsmntbombdood: what the hell is that supposed to mean?
05:48:51 <RodgerTheGreat> Java is a real language, by any sane definition
05:49:02 <pikhq> Obviously, it means that Sukoshi should use Malbolge.
05:49:07 <bsmntbombdood> no
05:50:45 <bsmntbombdood> java is made of fail
05:51:17 <GreaseMonkey> gcc -o java crap.c
05:51:39 <Sukoshi> I'm afraid my ASM foo is not good enough for this project, sorry bsmntbombdood :(
05:51:41 <pikhq> gcj -o native foo.java
05:51:43 <pikhq> ;)
05:51:50 <RodgerTheGreat> Java is made of *scale*.
05:52:00 <RodgerTheGreat> Java is made of *design*.
05:52:04 <bsmntbombdood> i thought Sukoshi was a schemer :(
05:52:08 <bsmntbombdood> RodgerTheGreat: lol no
05:52:31 <Sukoshi> I am. But I'm not going to do a *practical* project in Scheme.
05:53:25 <bsmntbombdood> pikhq: rms replaced tcl with guile
05:53:30 <bsmntbombdood> you must obey
05:53:50 <pikhq> RodgerTheGreat: Universe.MilkyWay.SolSolarSystem.Earth.KingdomsOfLife.Animal.Mammal.Hominid.Human.Society.Western.Computers.Programming.Languages.Java sucvks.
05:54:39 <pikhq> bsmntbombdood: rms also replaced KDE with Gnome. Your point?
05:54:46 <RodgerTheGreat> (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((("lisp sucks too, if you're fucking ridiculous about it.")))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
05:55:22 <bsmntbombdood> RodgerTheGreat: ad syntaxinim arguments are not valid
05:55:35 <GreaseMonkey> i heard two things.
05:55:39 <pikhq> RodgerTheGreat: The difference being that Java defaults to "fucking ridiculous".
05:55:43 <GreaseMonkey> 1. the garbage collector is garbage.
05:55:55 <RodgerTheGreat> bsmntbombdood: tell that to pikhq over there
05:56:09 <GreaseMonkey> 2. you have to do "if (foo!=null)", not "if(foo)"
05:56:38 <GreaseMonkey> anyways, afk
05:56:43 <Sukoshi> GreaseMonkey: The latter is true. The former, sometimes.
05:57:10 <RodgerTheGreat> 1. This depends heavily on implementation and knowing what you're doing. 2. This is a clearer way to express the concept.
05:58:20 <RodgerTheGreat> if (foo) is more ambiguous than if (foo!=null). Brevity is less valuable than clarity.
05:58:41 <GreaseMonkey> in C it's still obvious though
05:59:01 <GreaseMonkey> anyways, rlyawy
05:59:18 <RodgerTheGreat> nothing in C is "obvious", unless you completely ignore the hordes of exceptions to rules and gotchas.
06:00:25 <RodgerTheGreat> C is a language that appears simple and hides complexity, while Java is a language that appears complex while containing very uniform, straightforward methodology.
06:00:35 <RodgerTheGreat> I'll take the latter any day.
06:01:32 <oklopol> there are only 2 things in languages that disgust me, python's lack of scoping and c++'s declaration order
06:01:44 <RodgerTheGreat> heh
06:01:48 <oklopol> and python and c++ are the languages i use most :)
06:01:57 <oklopol> i wonder what that tells about me
06:02:21 <RodgerTheGreat> oklopol: look into Ruby- I'm sure you can find some more things to add to that list.
06:02:32 <oklopol> i do *know* over 20 languages well enough to program with them given google
06:02:34 <oklopol> hmm
06:02:45 <oklopol> i haven't looked at that very closelt
06:02:47 <oklopol> *closely
06:03:03 <RodgerTheGreat> if you value your sight and sanity, I advise against it
06:03:14 <oklopol> well
06:03:29 <RodgerTheGreat> Ruby is a hideous, heterogenous little language
06:03:49 <oklopol> the only thing i don't like is when a programming language lets me do what i want but makes me feel like a bad guy for doing it
06:04:15 <oklopol> that also sometimes happens in java
06:04:38 <RodgerTheGreat> Java only really does that for questionable casting
06:04:44 <RodgerTheGreat> C does that for tons of things
06:05:00 <oklopol> err... i'm talking about data access mostly
06:05:28 <RodgerTheGreat> oh, as in design
06:05:29 <oklopol> java's scoping i don't like, just as i don't like python's, but in java it's okay, because it's not supposed to work that way
06:05:29 <RodgerTheGreat> hm
06:05:56 <RodgerTheGreat> I was talking about things that would compile and run, but still illicit bitching from the compiler
06:06:26 <oklopol> nope, illicit bitching from the brain that's been listening to programming lessons :)
06:07:04 <RodgerTheGreat> haha- like using break; statements. :D
06:07:14 <oklopol> that, for one
06:07:19 <oklopol> and public fields.
06:07:25 <oklopol> yes, i use them
06:07:26 <oklopol> :<
06:07:40 <RodgerTheGreat> I actually make... well, everything public most of the time
06:07:43 <oklopol> oh
06:08:09 <RodgerTheGreat> but I tend to follow Sun's OOD principles when coding classes others will build upon
06:08:25 <RodgerTheGreat> public fields can rapidly become bad juju
06:08:47 <oklopol> yarr
06:09:07 <oklopol> i do use accessors when using inheritance, but i rarely do
06:09:13 <oklopol> use it i mean
06:09:59 <RodgerTheGreat> accessors are usually a pain in the ass, but the reason for making them is so that you can use mutators, which are often genuinely useful
06:11:00 <oklopol> mutators?
06:11:42 <oklopol> the biggest problem with every language is that everything is so much easier to make using the oklotalk interface in my head
06:11:53 <RodgerTheGreat> mutators change variables
06:12:02 <oklopol> i see
06:12:05 <RodgerTheGreat> they're the counterpart of accessors
06:12:12 <oklopol> setFoo?
06:12:27 <RodgerTheGreat> getValue() vs setValue(Foo bar)
06:12:34 <RodgerTheGreat> yes
06:12:38 <oklopol> i call them accessors as well, it seems :)
06:17:50 <RodgerTheGreat> well, I'm turning in. 'Night, folks!
06:18:20 -!- RodgerTheGreat has quit.
06:18:24 -!- RodgerTheGreat has joined.
06:18:28 -!- RodgerTheGreat has quit (Client Quit).
07:06:33 -!- bsmnt_bot has quit (Read error: 145 (Connection timed out)).
07:13:29 -!- bsmntbombdood has quit (Read error: 110 (Connection timed out)).
07:59:25 -!- Tritonio has quit ("Bye...").
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:39:09 -!- edwardk has joined.
09:16:43 <GreaseMonkey> i'm doing something then heading to bed. cya.
09:17:18 <Sukoshi> We were obviously waiting tensely for your status at the hour after much previous indication of activity here.
09:17:50 <edwardk> =)
09:18:31 -!- GreaseMonkey has quit ("Type "man apt-get" for more info... Oh wait, you use Windows. My bad.").
09:39:56 -!- oerjan has quit ("Mgrvgrvladje").
09:50:48 -!- sebbu has joined.
10:15:09 -!- GregorR-L has quit ("Leaving").
10:47:51 <Sukoshi> Hmm. Java's stream operations are missing some stuff that I find very useful from GNU libc's stream ops.
10:47:58 <Sukoshi> Namely getdelim() .
12:19:28 -!- jix has joined.
12:47:07 -!- edwardk has left (?).
13:06:45 -!- ehird has joined.
13:06:53 <ehird> Where did FukYorBrane go?
13:14:58 -!- RedDak has joined.
13:29:19 <ihope> I think oklopol stole it.
13:30:02 <ehird> Hmm - various sources are saying that it's possible to write/call subroutines in brainfuck without code duplication, using a mangled loop? o.O
13:30:09 <ehird> i don't see how that's possible
13:54:22 <ehird> :/
14:43:23 -!- ihope_ has joined.
15:00:47 -!- ihope has quit (Connection timed out).
15:19:43 <SimonRC> ehird: you have a loop containing a switch statement
15:19:58 <ehird> a switch statement in brainfuck?
15:20:00 <ehird> Um
15:20:40 <SimonRC> I'm sure you'll figure it out.
15:21:18 <ehird> how helpful =)
15:21:47 <ehird> you can only do if/elses in brainfuck, not switches?
15:21:51 <ehird> switches use lookup tables
15:22:40 <SimonRC> not necessarily
15:24:08 <ehird> OK then - show me an example ;)
16:01:45 <ihope_> Here, have an S combinator in what's sort of accidentally turned into an actual programming language: http://pastebin.ca/608829
16:02:02 <ihope_> Right now, though, it's just an extremely verbose syntax for lambda calculus.
16:04:44 -!- RodgerTheGreat has joined.
16:05:04 <RodgerTheGreat> howdy, everyone
16:05:25 <ihope_> Ello.
16:07:34 <ihope_> Hmm, did JavaScript just return the least expected response?
16:07:36 * ihope_ ponders
16:07:58 <ihope_> Maybe.
16:08:10 <ihope_> For 2+"3", it returned 23. Then again, for "3", it returned 3.
16:08:32 <RodgerTheGreat> hm
16:08:52 <RodgerTheGreat> I think that's pretty much what you'd expect in a weakly-typed language.
16:09:44 <RodgerTheGreat> clearly, string operations take precedence over mathematical operations if any string literals (or casts?) exist in an expression
16:14:07 <ihope_> Or maybe it's a ChatZilla thing.
16:19:15 -!- zbrown has joined.
16:19:54 -!- jix has quit (Nick collision from services.).
16:20:08 -!- jix has joined.
16:40:14 -!- sebbu2 has joined.
16:59:19 -!- sebbu has quit (Connection timed out).
16:59:27 -!- sebbu2 has changed nick to sebbu.
17:28:46 <SimonRC> RodgerTheGreat: really?
17:29:09 <RodgerTheGreat> I dunno, seems logically consistent
17:29:10 <SimonRC> In a weakly typed languge I would expect 2 + "3" to be undefined
17:29:23 <SimonRC> Or di you mean dynamically-typed?
17:29:33 <RodgerTheGreat> I seem to remember it working as I described when I last used JS
17:29:46 <RodgerTheGreat> it's possible I'm mixing terminology here
17:29:50 <SimonRC> yup
17:54:51 <zbrown> hmmm interesting
18:37:07 <pikhq> SimonRC: I prefer dynamic typing.
18:37:40 <pikhq> 2 + "3" ought to equal 5. :p
18:40:44 <zbrown> RodgerTheGreat: Cool side note on scala. You can define things like "+" or "-" or "/" or "*" as functions for a specific class
18:41:02 <RodgerTheGreat> yes. operator overloading
18:41:18 <pikhq> That's fairly trivial.
18:41:26 <RodgerTheGreat> SmallTalk does this as well, but it's a requirement, rather than an option
18:41:42 <pikhq> C++ offers it, as well.
18:41:49 <pikhq> One of the sane additions to C, IMO.
18:42:05 <zbrown> I've never used C++ so thats probably why I'm somewhat interested in it
18:44:48 <RodgerTheGreat> in smalltalk, it makes sense because *everything* is synthetic, but I'm not generally a fan of operator overloading in conventional languages
18:47:43 <zbrown> RodgerTheGreat: by synthetic you mean...?
18:48:03 <RodgerTheGreat> built from other elements in the language
18:48:10 <RodgerTheGreat> non-primitive
18:48:10 <zbrown> ah ok
18:48:48 <zbrown> hmmm
18:49:18 <zbrown> RodgerTheGreat: know of a good book in general on language design?
18:49:37 <RodgerTheGreat> it's not the kind of thing most people write books on
18:49:53 <RodgerTheGreat> generally the people who would end up designing a language and then writing a book on *that*
18:50:08 <RodgerTheGreat> there may be some textbooks on comparative languages that could help
18:50:40 <zbrown> The closest thing I've found is Abelman and Sussman's The Structure & Interpretation of Computer Programs
19:09:56 -!- RedDak has quit (No route to host).
19:21:29 <zbrown> RodgerTheGreat: in java, are initialized boolean arrays always initalized to false? I can't recall right now
19:21:39 <RodgerTheGreat> yes
19:22:22 <RodgerTheGreat> but programming in C will give you enough paranoid knee-jerk instincts not to count on initialized values to scar you for life
19:23:56 <zbrown> ya thats pretty much where this all comes from lol
19:24:06 <zbrown> C gave me a lot of paranoia
19:25:36 <RodgerTheGreat> C is evil in a much more subtle fashion than any esolang.
19:26:46 * pikhq fails to see what's evil about something lower-level than Java
19:28:56 <RodgerTheGreat> C isn't a language. It's the swiss-cheese shadow of a language. Undefined behavior is the antithesis of a language specification.
19:40:05 -!- oerjan has joined.
20:04:30 <SimonRC> RodgerTheGreat: unidentified behaiour is the key to C's portability
20:05:15 <SimonRC> erm
20:05:22 <SimonRC> "undefined"
20:05:38 <SimonRC> is allows things like supporting multiple calling conventions
20:05:56 <SimonRC> and many of the tricks it forbids are dodgy anyway
20:06:39 <SimonRC> RodgerTheGreat: and there are primitives in Smalltalk, but they're very deeply buried
20:06:51 * SimonRC recalls the time he tried to find out how addition was done
20:07:23 <SimonRC> You find similar things in the language Factor.
20:11:18 * pikhq has no idea how you can have a language without *any* primitives. . .
20:12:41 <oerjan> Minimum!
20:16:23 <pikhq> ?
20:17:53 <oerjan> http://esoteric.voxelperfect.net/wiki/Minimum
20:24:02 <RodgerTheGreat> SimonRC: I'd have to assume it contains *some* kind of comparison and conditional primitives
20:25:36 -!- bsmntbombdood has joined.
20:26:16 <RodgerTheGreat> the language implicitly contains rough variables and function calls/definitions, so it's easy to see that you could construct things like complex flow control and looping
20:29:13 <RodgerTheGreat> and numeric operators aren't needed to synthesize math- I've seen some contorted examples of building things in LISP that make it pretty clear
20:29:27 <RodgerTheGreat> you still need some kind of conditional, at some deep level
20:33:15 <ehird> most of the time you can use a language sans any primitives
20:33:26 <ehird> -> writing in it as if it's lambda calculus
20:34:25 <ehird> So anyone care to give an example of writing "subroutines" in brainfuck without repeating code?
20:35:24 <oerjan> ehird: finally i catch you here
20:35:33 <ehird> oerjan, um -- yes?
20:35:46 <bsmntbombdood> if_zero { subroutine zero} else { - if_zero { subroutine 1 } else { ...
20:35:58 <oerjan> did you get my message that i had implemented you little regexp language properly?
20:36:01 <ehird> bsmntbombdood, that doesn't look like brainfuck
20:36:07 <ehird> oerjan, nope - link? :)
20:36:53 <bsmntbombdood> ehird: replace if_zero with its brainfuck equivalent...
20:37:06 <oerjan> http://oerjan.nvg.org/esoteric/ehird.py
20:37:15 <ehird> bsmntbombdood, well - "+[" maybe, but that fails on "255"
20:37:50 <ehird> plus, that doesn't allow doing anything apart from calling functions - you can't pass subroutines around - well, maybe you could store the number
20:37:59 * ehird is thinking about compiling a simple language to brainfuck
20:38:34 <ehird> oerjan, does my hello world work with it?
20:39:05 <oerjan> ehird: i think i tested all the programs
20:39:22 <ehird> Hello, X!\n.NEWLINEXNEWLINEworld
20:39:27 <ehird> and the infinite loop, which i forget
20:39:38 <ehird> i'm not sure if it's turing complete
20:40:41 <ehird> World, X!.\\n\nX\nworld
20:40:43 <ehird> World
20:40:44 <ehird> Hello#
20:40:49 <ehird> sans # is also worth trying
20:41:02 <ehird> should print, of course, Hello, world!
20:41:08 -!- RedDak has joined.
20:41:24 <ehird> anyway - i'll get python on this machine
20:41:27 <RodgerTheGreat> ehird: I made a brainfuck variant that allowed for pointers, which made subroutines pretty feasible
20:41:42 <oerjan> that last one didn't work
20:41:48 <ehird> oerjan, what happened?
20:42:05 <pikhq> RodgerTheGreat: Interesting.
20:42:15 <ehird> oh - oerjan, you didn't unescape escape codes in the input
20:42:16 <oerjan> it raised the Malformed program exception
20:42:25 <ehird> so \n was becoming "\\n"
20:42:42 <ehird> RodgerTheGreat, i could use procedure numbers
20:42:46 <pikhq> ehird: I *do* have a way of compiling a simple language to Brainfuck. . .
20:42:48 <RodgerTheGreat> pikhq: if you recall, it was the result of us talking about making an esoteric OS a while back- I came up with "Def-BF" to make writing a kernel somewhat more feasible
20:42:57 <ehird> but returning from procedures and calling them without ending the current procedure i haven't solved
20:43:00 <pikhq> RodgerTheGreat: Right, right.
20:43:14 <ehird> there's no goto or continuations in brainfuck after all
20:43:29 <ehird> pikhq, Yes -- inspired by your language. I've lost its code though
20:43:45 <pikhq> ehird: Oh?
20:44:30 <RodgerTheGreat> Def-BF basically adds two instructions to "jump" the pointer or the program counter to the location stored in a cell, which allows for GOTOs and indirect memory access
20:44:49 <pikhq> oerjan: ` is a primitive in Minimum.
20:44:51 <ehird> pikhq, Yes
20:45:10 <pikhq> ehird: Example?
20:45:29 <ehird> pikhq, Um?
20:45:48 <ehird> RodgerTheGreat, subroutines aren't the kind of thing i'd put in base brainfuck though - if you have computed goto you're done
20:46:24 <ehird> just add the current label to a call stack, jump to the function, and all functions end with a jump to the last item on the call stack
20:46:27 <ehird> of course, stacks in brainfuck are ugly
20:46:41 * pikhq would like to know what sort of thing to add to PEBBLE, if useful
20:46:49 <RodgerTheGreat> well, my idea was that pure Def-BF was more of a bytecode generated by a somewhat higher-level language that abstracted function calls an the like
20:47:01 <ehird> pikhq, well -- i've lost pebble's code, so
20:47:01 <RodgerTheGreat> lemme see if I can dig up the old spec
20:47:08 <ehird> RodgerTheGreat, well - yes
20:47:25 <pikhq> ehird: PEBBLE itself may be obtained from it's website: http://pikhq.nonlogic.org/pebble.php
20:48:24 <ehird> thanks
20:48:35 <ehird> bah stupid windows
20:48:39 <ehird> i hate winzip.
20:48:44 <RodgerTheGreat> http://nonlogic.org/dump/text/1183924086.html
20:48:47 <RodgerTheGreat> ^ found it
20:48:57 <Sukoshi> SimonRC: Is Factor fun to play with?
20:50:17 <SimonRC> most definitely
20:50:35 <SimonRC> see #concatenative
20:51:52 <ehird> oerjan, Hello, world!NEWLINElollerNEWLINEwtf. is not a malformed program
20:52:02 <ehird> it is a program that prints Hello, world! then a newline then loller then a newline then wtf
20:52:14 <ehird> pikhq, got that archive in another format?
20:53:22 <ehird> http://koti.mbnet.fi/yiap/aeolbonn/kquine.aeo good lord.
20:53:49 <RodgerTheGreat> hm
20:53:51 <RodgerTheGreat> wow
20:54:02 <pikhq> ehird: Um, not yet. . .
20:54:06 <zbrown> hmmm that scares me lol
20:54:21 <ehird> pikhq, winzip is sucky and hates your archive.
20:54:25 <oerjan> ehird: it is not a malformed program, it is a program that goes through one substitution
20:54:30 * ehird wishes he wasn't using windows right now
20:54:41 <ehird> oerjan, not according to my spec it isn't
20:55:12 <pikhq> http://pikhq.nonlogic.org/pebble-1.0.zip
20:55:19 <zbrown> hi Sukoshi, RodgerTheGreat told me you had a java project ;)
20:55:22 <pikhq> Why the *hell* would it not like a fucking *tarball*?!?
20:55:26 <Sukoshi> Heya zbrown.
20:55:30 <ehird> pikhq, because winzip is retarded
20:55:32 <ehird> :)
20:55:39 <pikhq> Winzip claims to support tar.
20:55:53 <Sukoshi> pikhq: People still use Winzip?
20:55:55 <oerjan> ehird: where was your spec? i have carefully implemented it so that it substitutes if it's three lines.
20:56:03 <Sukoshi> So zbrown, did RodgerTheGreat tell you what it was about?
20:56:20 <oerjan> and that this takes precedence over printing.
20:56:31 <pikhq> Sukoshi: Yeah; it pwns the Windows world.
20:56:37 <ehird> oerjan, that is not what the spec says. the spec says that you should substitute if 1. the program consists of 3 lines 2. the last line does not end with a .
20:56:41 <zbrown> Sukoshi: Alls I know is that its an interpreter VM written in Java for Smalltalk
20:56:58 <zbrown> Sukoshi: as far as the method to your madness, I have no idea :)
20:57:23 <pikhq> ehird: I recommend using 7zip. . . Or Cygwin.
20:57:34 <ehird> pikhq, indeed - i do
20:57:39 <ehird> but winzip decided to make itself the default. again
20:57:59 <Sukoshi> zbrown: http://users.ipa.net/~dwighth/smalltalk/bluebook/bluebook_imp_toc.html <-- Have fun.
20:58:14 <oerjan> ehird: i _demand_ the link to the original spec.
20:58:18 <pikhq> Just open my archive in 7zip, and rm -rf Winzip.
20:58:19 <Sukoshi> I do somewhat keep up in the Windows world, in which I use 7Zip and occasionally IZArc.
20:58:31 <oerjan> because i clearly did not read it that way.
20:58:43 <pikhq> Sukoshi: Apparently, Winzip is remarkably stupid. . .
20:58:58 <pikhq> They claim Tar is an old, deprecated format. -_-'
20:59:03 <ehird> oerjan, i demand that i have lost it :)
20:59:12 <RodgerTheGreat> in all fairness, it's called WinZIP, not WinUnTAR
20:59:17 <pikhq> Old, sure. Deprecated? No.
20:59:20 <Sukoshi> pikhq: It was when Winzip was popular.
20:59:26 <ehird> RodgerTheGreat, then why can it Unzip as well as Zip
20:59:34 <Sukoshi> pikhq: See, Winzip itself is old nowadays (nobody I know who is a power Windows user uses it at all).
20:59:38 <pikhq> RodgerTheGreat: It claims to support Tar, and .bz2.
20:59:51 <pikhq> It apparently doesn't do what it claims to.
20:59:54 <Sukoshi> pikhq: But back when Winzip was in its heydays, Linux was going through a big lull (i.e. the surge of Windows 98).
21:00:05 <pikhq> Sukoshi: Well aware.
21:00:18 <oerjan> grumble grumble google doesn't have it yet grumble
21:00:22 <pikhq> Although, actually, that lull would be called "formative years".
21:00:31 <Sukoshi> True. Because the GNOME project came out of it.
21:00:44 <oerjan> oh wait...
21:00:49 <zbrown> Sukoshi: Hmmm this should be interesting since this will be my first go at anything even remotely like a compiler or interpreter
21:01:05 <Sukoshi> zbrown: I've done fairly trivial VMs before, but nothing with garbage collection and such.
21:01:15 <Sukoshi> zbrown: Also a rule of thumb: As much Smalltalk as possible.
21:01:32 <Sukoshi> zbrown: Other than the primitives and VM, I think a full Smalltalk system would be very nice.
21:01:38 <RodgerTheGreat> I think I'm pretty solid on building something like the bytecode interpreter- it's the parser and other higher-level things that scare me
21:02:12 <Sukoshi> We'll have to read up on the Java parsers out there. I already know Flex/Bison from a previous project, so.
21:02:34 <zbrown> Hmmm, looks like I need to read up on my smalltalk then
21:03:08 <Sukoshi> zbrown: http://www.iam.unibe.ch/~ducasse/FreeBooks.html <-- Enjoy.
21:03:34 <oerjan> darn, isn't there a way to show file creation time in linux?
21:03:54 <SimonRC> zbrown: waitamo, how did you end up here?
21:03:59 <Sukoshi> Also, implementation wise, I suggest Squeak (which I hear is godsome), GST (which is a bit rough, but under active development (even though it's almost completely unused, because Seaside hasn't been ported to it)) (GNU SmallTalk), and if you have a Mac, then F-Script.
21:04:11 <RodgerTheGreat> I've been teaching myself smalltalk, and as I was saying before, the wikipedia article gives the impression that *nothing* is primitive, which I find inscrutable
21:04:14 <Sukoshi> oerjan: You mean in C or an a file manager? :P
21:04:30 <oerjan> Sukoshi: i mean on the command line
21:04:32 <zbrown> Sukoshi: any particular book you recommend?
21:04:37 <Sukoshi> RodgerTheGreat: Fire up a Smalltalk and inspect the primitives ;)
21:05:01 <Sukoshi> zbrown: I hear ``A Taste of Smalltalk'' is good for Lisp/C backgrounds.
21:05:05 <zbrown> SimonRC: by way of RodgerTheGreat though I've known of its existence for a while, I tend to regularly whois the members of nonlogic to get an idea for what people are interested in?
21:05:17 <SimonRC> ah, ok
21:05:18 <zbrown> Sukoshi: hmmm that sounds like me then
21:05:33 <zbrown> SimonRC: he asked if I was interested in Sukoshi's project, which I was, so he pointed me here
21:05:36 <Sukoshi> zbrown: A commercial book called ``Smalltalk Best Practice Patterns'' is the SICP of Smalltalk.
21:05:53 <Sukoshi> zbrown: And there's a Squeak specific book too, in the mix.
21:06:12 <zbrown> I tend to fancy functional languages as opposed to esoteric, but I'm open to alll, since I find language diesng interesting
21:06:18 <Sukoshi> Seaside is a web framework that oddly enough resurged huge interest in Smalltalk in the last 4 months its been out.
21:06:39 <Sukoshi> (Huge in comparison to what Smalltalk ailed under before.)
21:06:48 <RodgerTheGreat> zbrown: that interest is primarily why I thought of you when Sukoshi started trying to gather people for this
21:07:09 <zbrown> Sukoshi: I've heard of seaside though I've not read much of it
21:07:11 <RodgerTheGreat> and a reason why you might find hanging out in #Esoteric generally interesting
21:07:20 <ehird> pikhq, i don't see anywhere in your brainfuck compiler that compiles functions
21:07:25 <ehird> er, pebble-to-brainfuck
21:07:32 <zbrown> RodgerTheGreat: thank you much :)
21:07:39 <RodgerTheGreat> no prob. :)
21:08:07 <zbrown> Hmmm Smalltalk Best Practice Patterns doesn't sell for cheap
21:08:17 <oerjan> DOES LINUX EVEN _STORE_ FILE CREATION TIME?
21:08:49 <ihope_> Wouldn't ##linux be a better place for that question?
21:09:22 <oerjan> ihope_: no, because i am trying to find the date i first created an esoteric interpreter
21:09:31 <ehird> oerjan, NO BUT A FILESYSTEM THAT LINUX CAN INERFACE WITH MIGHT
21:09:33 <pikhq> ehird: It doesn't *have* functions; it's got macros.
21:09:42 <ehird> pikhq, oh - then that's not very helpful =)
21:09:55 <Sukoshi> oerjan: Do you want me to tell you how to do it in C?
21:09:57 <pikhq> Functions would be much, much higher-level than the design of PEBBLE opts for.
21:10:24 <Sukoshi> oerjan: ``man fstat'' should get you some information.
21:10:25 * oerjan isn't sure, his brain is very tired right now and it might be better to take a break
21:10:37 <ehird> pikhq, functions are pretty darn low level
21:10:46 <ehird> you have to try really hard to get lower than functions
21:10:53 <Sukoshi> ehird: Closures.
21:11:06 <ehird> Sukoshi, well - you know, same sort of thing: PEBBLE seems to have none
21:11:09 <pikhq> ehird: Higher level than Brainfuck or PEBBLE.
21:11:09 <ehird> just macros and primitive
21:11:11 <ehird> s
21:11:17 <Sukoshi> Oh.
21:11:27 <Sukoshi> zbrown: Yeah, unfortunately.
21:11:33 <zbrown> RodgerTheGreat: hmm you guys are out for the hardcore, though this smalltalk bit is a tad strange
21:11:40 <zbrown> lol
21:11:42 <pikhq> PEBBLE's pretty much a powerful macro system and macros for it.
21:12:00 <Sukoshi> zbrown: Tell me that after spending 1 month coding in Lisp and Smalltalk and then attempting to code in C.
21:12:00 <RodgerTheGreat> haha
21:12:02 <pikhq> Which is *exactly* what I set out for in the first place.
21:12:10 <RodgerTheGreat> zbrown: did you have a look at my old Def-BF spec?
21:12:19 <zbrown> RodgerTheGreat: yup... bf just scares me
21:12:32 <RodgerTheGreat> you'll need to make it a native tongue, zbrown
21:12:35 <Sukoshi> I love BF. Jives with my pointer-foo quite well :)
21:12:42 <RodgerTheGreat> haha
21:13:09 <zbrown> Sukoshi: heh, I program in Java a lot but due to my mathematical inclinations, languages like haskell, scala (my current lust), and erlang are my favorites
21:13:15 <zbrown> RodgerTheGreat: which language will I need to make native?
21:13:29 <RodgerTheGreat> in my cryptography course, I couldn't help but think about ways to implement the cyphers we were learning in BF
21:13:35 <RodgerTheGreat> zbrown: I was talking about BF
21:13:37 <Sukoshi> zbrown: I started pining for an inspcetor :(
21:13:53 <zbrown> Sukoshi:haha
21:14:11 <zbrown> and of course C is in my rep. as well
21:14:23 <Sukoshi> I'm more of a C coder than a Java coder, since I've done more in it.
21:14:35 <ehird> pikhq, How would you suggest implementing functions?
21:14:35 <Sukoshi> And in general, I prefer coding low-level stuff in C.
21:15:00 <Sukoshi> Pointer foo rarely scares me, by the way :)
21:15:03 <RodgerTheGreat> Sukoshi: zbrown is developing an erlang obsession as we speak
21:15:05 <zbrown> Sukoshi: Ah I'm more of a high level person. A lot of my work is algorithmically based since the majority of the programming I do is modeling
21:15:08 <pikhq> ehird: Don't ask me, ask Gregor or calamari.
21:15:21 <ehird> pikhq, =P
21:15:23 <pikhq> zbrown: I don't do Java.
21:15:25 <Sukoshi> zbrown: Try Smalltalk for a bit.
21:15:40 <ehird> GregorR, consider yourself asked
21:15:47 <Sukoshi> zbrown: If you like high-level, :)
21:16:01 <pikhq> High-level stuff, I do in a scripting language (tempted to learn Smalltalk for that, though), low-level stuff in C, assembly, PEBBLE, or Brainfuck, depending upon insanity-level.
21:16:05 <oerjan> hah! knew it! http://pastie.textmate.org/65795
21:16:07 <zbrown> Sukoshi: Ya, I've got squeak installed now, looking at some other stuff
21:16:10 <RodgerTheGreat> bbl, guys- dinner
21:16:38 <oerjan> ehird: it definitely should substitute rather than print
21:16:45 <ehird> oerjan, no it should not
21:16:56 <oerjan> that is what it says there
21:16:59 <ehird> "if input is of the form ANYTHING." should match 3 lines with a period at the end
21:17:01 <ehird> =)
21:17:26 <oerjan> but it checks for replace even in that case
21:18:09 <ehird> that was spec v1
21:18:12 <ehird> i'm sure i posted a v2
21:20:14 <zbrown> Sukoshi: some of the ideas in smalltalk seem slightly similar to erlang
21:20:20 <oerjan> yes, http://pastie.textmate.org/65806 and it is still the same in that respect
21:21:12 <Sukoshi> zbrown: :)
21:21:23 <ehird> oerjan, hrm
21:21:50 <oerjan> ehird: anyway i'm sure you can switch the code around if you want
21:22:20 <zbrown> Sukoshi: the breakdown is that we'll write as little of it as possible in java and then build up in smalltalk?
21:22:20 <ehird> OK it appears to work#
21:23:01 <ehird> X, Y!.\nY\nworld
21:23:01 <ehird> X
21:23:02 <ehird> Hello
21:23:06 <ehird> -- is not a malformed program
21:23:37 <ehird> it replaced X with Hello, giving Hello, Y!.\nY\nworld, which should then be executed, printing "Hello, world!"
21:24:43 <Sukoshi> zbrown: Yup
21:24:45 <Sukoshi> .
21:25:24 <oerjan> ehird: no, because only the replaced part is unescaped
21:25:56 <oerjan> so those \n are never turned into newlines
21:26:02 <ehird> then... that's wrong.
21:26:10 <ehird> input should have escapes expanded
21:26:37 <oerjan> not according to spec :D
21:26:44 <zbrown> Sukoshi: haha, I thought I was gonna get away (with murder) with not knowing smalltalk and just working in Java ;)
21:27:20 <Sukoshi> zbrown: :P
21:27:46 <ehird> oerjan, then my spec is wrong
21:27:47 <ehird> =)
21:28:33 <zbrown> Sukoshi: hell it couldn't hurt to have it in my repertoire.
21:29:02 <Sukoshi> zbrown: I'm hoping you genuinely fall in love with it along the way.
21:29:25 <zbrown> Well its likely, it seems the syntax has potential to be very elegant
21:29:38 * ehird thinks smalltalk has some impurities
21:29:39 <ehird> like too much syntax!
21:29:56 <zbrown> Thats why bf and I don't get along. It doesn't look pretty, not that its bad, just its ugly to me.
21:30:12 <ehird> bf is pretty!
21:30:24 <zbrown> I think concise, _clear_ syntax that expresses what the algorithm is supposed to do is pretty :)
21:30:26 <ehird> it's pretty like Forth - densely packed poetry
21:30:31 <oerjan> ehird: you can fix it by inserting prog[0] = re.sub(".", prog[0], ".") at the beginning of the while block, i think
21:30:32 <zbrown> haha
21:30:37 <ehird> well it is.
21:30:55 <ehird> and elegant...somehow
21:31:02 <ehird> elegant... in its minimalism! yes.
21:32:19 <zbrown> bloddy lag
21:32:57 <pikhq> I, for one, think that ,[.,] is quite elegant.
21:33:13 <oerjan> afk
21:33:16 <zbrown> Beauty is in the eye of the beholder ;)
21:33:48 <pikhq> "@ input;in input;while input {out input;in input}"
21:33:54 <pikhq> Happier?
21:34:45 -!- suifur has joined.
21:35:18 <ehird> Hmm
21:35:22 <ehird> Anyone remember that OOPBrain?
21:35:22 <suifur> hrm this seems much faster
21:35:24 <ehird> OOP in Brainfuck
21:35:29 <ehird> that had methods - so it stored subroutines
21:35:30 <suifur> seems nonlogic's server is most very slow
21:35:30 <ehird> I wonder how
21:37:47 <suifur> oooh, niiice i like. New algo for my model is much faster
21:38:02 <suifur> hopefully its also as accurate..
21:42:05 <Sukoshi> What's the equivalent to a C union in Java?
21:42:18 <Sukoshi> When you have something that could be of different types and won't know until runtime?
21:46:49 <suifur> Sukoshi: you do class hierarchies
21:46:55 <suifur> there's no single word replacement
21:48:11 <suifur> Sukoshi: http://nonlogic.org/dump/text/1183927651.html <--- thats an example
21:48:20 <suifur> Sukoshi: btw, this is zbrown if you didn't read my hostname
21:57:33 <suifur> Sukoshi: did that help at all or no?
22:03:52 -!- jix has quit ("CommandQ").
22:07:27 <RodgerTheGreat> I'm back
22:14:54 <RodgerTheGreat> suifur: one thing you'll have to get used to in #Esoteric is the fact that most conversations here tend to be asynchronous. Just talk, and you'll be responded to eventually
22:15:11 <bsmntbombdood> ehird: GregorR wrote a C->bf compiler, ask him how he implemented subroutines
22:15:27 <ehird> bsmntbombdood, i did - an hour or so ago
22:15:32 <ehird> GregorR, ping
22:15:33 <bsmntbombdood> oh, he
22:22:52 * ehird applies large mallot to GregorR's head as a rather more effective version of ping
22:22:53 <ehird> *mallet
22:23:40 <RodgerTheGreat> haha- I thought a "mallot" would be kinda like a "malloc"
22:23:44 <ehird> heh
22:23:55 <ehird> mallot(sizeof(GregorR.head));
22:23:59 <bsmntbombdood> free(GregorR);
22:25:10 <pikhq> person *destroyed_gregor=GC_mallot(sizeof(GregorR));
22:37:57 <bsmntbombdood> http://www.itwire.com.au/content/view/13339/53/
22:37:59 <bsmntbombdood> huh?
22:39:33 <bsmntbombdood> ehird: http://esoteric.voxelperfect.net/wiki/Brainfuck_algorithms#if_.28x.29_.7B_code1_.7D_else_.7B_code2_.7D
22:40:02 <ehird> hum
22:40:06 <ehird> i'm sure i could specialize that
22:40:42 <ehird> like CASE in lisps.
22:41:33 <ehird> i just need to work out how to do an IF 0 - i guess COPY_TO_NEXT_CELL>+[stuff[-]]<
22:43:37 <pikhq> boolnot x : temp; if x {code here}
22:44:01 <pikhq> (sorry; PEBBLE just makes for a nice, high-level way to reason about Brainfuck)
22:44:34 <ehird> http://pastie.caboo.se/77163 i think this snippit should work
22:44:49 <ehird> er, wait
22:44:52 <ehird> no
22:45:14 <pikhq> Nope. That's "if (!3) code;"
22:47:14 <ehird> yes exactly
22:47:53 <ehird> requirements: with [0] = val, and assuming all other cells are 0, run CODE if val is equal to 4 without modifying val, and clean up mess such as changing the other cells after
22:47:56 <ehird> competition? :D
22:49:02 <pikhq> >>[-]<[-]<[>+>+<<-]>>[<<+>>-]<----[>+<[-]]+>[<->-]<[code[-]]
22:50:11 <pikhq> Not at all the shortest; just what's produced by "ift val {subcons4 temp1 : temp2;boolnot temp1 : temp2} {forceinline code} : temp1 temp2"
22:50:12 <ehird> that was generated by PEBBLe. wasn't it
22:50:16 <pikhq> Yup.
22:50:17 <ehird> Knew it =D
22:50:26 <ehird> it has the distinct feel of generated code
22:50:52 <ehird> And, er, why can't you just do "if (eq val 4) {code}"
22:50:55 <ehird> (I don't know pebble)
22:51:28 <pikhq> The comp macro is a good deal more complex than subcons4 + boolnot + ift, believe me.
22:52:54 <pikhq> BTW, the solution *you* wrote is just "copy val > temp1 : temp2;subtract temp1 3;if temp1 {forceinline code}"
22:53:59 <pikhq> [>+>+<<-]>>[<<+>>-]<---[code[-]] <-- And look, it's better than your hand-written code. :p
22:54:12 <ehird> OK you're just trying to confuse me with low-level code now =)
22:55:01 <pikhq> Low-level would be without the macro engine. . . Making basically a Brainfuck equivalent.
22:55:31 <ehird> x_x
23:00:20 <suifur> RodgerTheGreat: I figured as much, thats the way it is in #erlang and #scala :)
23:00:46 <ehird> hrm
23:01:53 <pikhq> Whoo! Asynchronous multithreaded conversational engine!
23:02:06 <RodgerTheGreat> heh
23:02:17 <ehird> pikhq, So how does your language handle numerical comparisons?
23:06:33 <pikhq> ehird: Very low-level.
23:06:40 <ehird> pikhq, Helpful. =)
23:07:10 <pikhq> (foo == 25) would be treated as roughly !(foo-25)
23:07:36 <pikhq> Or, subcons25 foo : temp;boolnot foo : temp
23:08:03 <ehird> OK - what code does !((current_pointer_in_brainfuck)-4) generate? I'm not sure how one would code !
23:08:52 <pikhq> subtract val 4;boolnot val : temp
23:09:24 <pikhq> ----[>+<[-]]+>[<->-]
23:10:16 <ehird> Ok - so [>+<[-]]+ copies the value one place to the right and >[<->-] boolean-nots it
23:10:17 <ehird> ?
23:10:39 <pikhq> No, "[>+<[-]]+>[<->-]" boolnots it.
23:10:42 <pikhq> No copying.
23:10:58 <ehird> Then what's "temp" about?
23:12:48 * SimonRC wonders how his irc client managed to get disconnected from a server running on the same frikkin' machine.
23:12:52 <oerjan> [>+<[-]] moves the value one place to the right, applying !! to it
23:13:44 <ehird> i'm not exactly sure how ! would work in BF
23:13:58 <ehird> ahhh, i see
23:14:15 <ehird> [>+<[-]] only executes if the value is already true
23:14:22 <ehird> so [0] = 0, [1] = 0, nothing needs to be done
23:14:35 <ehird> but otherwise, it simply sets 1 to 1, and clears 0
23:14:55 <ehird> hmm - somehow i think there must be a simpler way
23:15:27 <SimonRC> I am surprised that NOT is that simple in BF
23:15:53 <ehird> SimonRC, well - it makes logical sense
23:16:36 <ehird> hmm...
23:17:09 <pikhq> BTW, almost all of the macros in PEBBLE are ports of the Brainfuck algorithms in the Esolangs wiki.
23:17:46 <ehird> hmm
23:17:58 <ehird> i'm not sure there IS a way to do it that doesn't involve a second cell
23:18:06 <ehird> hrm - in fact, no, there can't be
23:19:13 <oerjan> i think any bf algorithm on a single cell without IO will either add a constant or set the cell to a constant
23:19:51 <ehird> OK - well something simpler than [>+<[-]]
23:19:52 <oerjan> because once you use [], you lose all information about what the original value was
23:19:54 <ehird> i don't think its possible
23:20:25 <GregorR> ehird: Long delayed pong.
23:20:35 <oerjan> ok, it's also possible to infinitely loop for some values
23:20:53 <ehird> GregorR, How did you handle procedures in bf2c?
23:20:59 <ehird> GregorR, 'specially with funcptrs and the like
23:21:15 <GregorR> It's fairly simple but difficult to describe.
23:21:20 <oerjan> er, bf2c sounds like the wrong way?
23:21:37 <GregorR> Yeah, it's C2BF.
23:21:45 <ehird> err - yes
23:21:59 <GregorR> OK, basically ...
23:22:11 <GregorR> You have an array at the beginning of the program with one cell for each enter-able code chunk.
23:22:16 * SimonRC grins at the later comments here: http://forums.worsethanfailure.com/forums/2/123852/ShowThread.aspx
23:22:20 <ehird> GregorR, the only way i can think of is a big gigantic loop with lots of nested ifs to check for an "address", then splitting functions into multiple parts at function calls to work around no continuations/gotos
23:22:39 <GregorR> Well, sort of, but it's not that gross :)
23:23:11 <GregorR> Basically, go to the beginning, then: >[- function 1]>[- function 2]>[- function 3] etc
23:23:16 <pikhq> Mostly because it's automatic. :p
23:23:19 <GregorR> Just make sure that you get back where you were.
23:24:05 <GregorR> Then to call a function, all you have to do is go to the beginning of the buffer and mark the right function.
23:24:23 <GregorR> You can implement return addresses as in C (push an offset)
23:24:37 <ehird> I think I need several diagrams and animations to explain this. *g*
23:24:50 <GregorR> Like I said: Difficult to describe.
23:26:30 <RodgerTheGreat> I thought it was rather clear
23:26:54 <pikhq> I think it's damned clear.
23:27:17 <RodgerTheGreat> it's how you do CASE....SELECT in BF, essentially
23:27:21 <pikhq> Of course, things are easier to understand when you actually grok Brainfuck code. . .
23:27:42 <RodgerTheGreat> we just happen to be using the technique to simulate functions here
23:31:25 -!- fax has joined.
23:31:27 <fax> hi
23:32:11 <fax> oh cool I thought the wiki was broken but it seems to have fixed itself
23:32:28 <fax> (was getting some SQL erro, but not anymore)
23:32:29 <oerjan> it does tend to do that.
23:44:41 <GregorR> ehird: http://www.codu.org/bf_functions.avi
23:46:53 <ehird> GregorR, oh -- so actually the function code is duplicated for each call?
23:49:43 <SimonRC> ISTR there is an esolang around that fits the BF function call modle very well.
23:50:17 <SimonRC> ehird: no, the function code is only in one place.
23:50:23 <SimonRC> watch the video
23:50:30 -!- ehird has quit (Read error: 104 (Connection reset by peer)).
23:50:37 <SimonRC> BTW GregorR, your voice doesn't match your face
23:58:40 -!- GreaseMonkey has joined.
←2007-07-07 2007-07-08 2007-07-09→ ↑2007 ↑all