←2007-02-17 2007-02-18 2007-02-19→ ↑2007 ↑all
00:00:50 <bsmntbombdood> weird
00:42:23 -!- sebbu has quit ("@+").
00:56:39 -!- Sukoshi has quit (Read error: 104 (Connection reset by peer)).
01:08:54 -!- CakeProphet has changed nick to SevenInchBread.
01:09:17 <bsmntbombdood> foo
01:28:39 -!- anonfunc has joined.
01:34:39 -!- anonfunc has quit.
01:36:00 -!- anonfunc has joined.
02:31:43 -!- digital_me has quit ("leaving").
03:08:54 <crathman> pipes in that SII is the mockingbird
03:09:15 <crathman> I put together the Smullyan birds a while back: http://www.angelfire.com/tx4/cus/combinator/birds.html
03:09:48 <bsmntbombdood> ?
03:09:54 <crathman> wishes for a simple esoteric language that would allow combinators to be named and composed
03:10:07 <bsmntbombdood> what's a bird?
03:10:24 <crathman> Y combinator is known as the Why bird.
03:10:52 <bsmntbombdood> ...
03:10:58 <crathman> birds are kind of a trick for naming combinators - from one of Raymond Smulyan's book
03:11:21 <crathman> a mockingbird repeats whatever it hears: SIIx = xx
03:11:44 <bsmntbombdood> ok
03:12:16 <bsmntbombdood> and...
03:12:52 <crathman> no particular point... just scrolling up on some of the earlier conversation,,,
03:14:10 <crathman> realizes that I might be missing the point of this channel...
03:14:58 <crathman> but playing around with unlambda, I've been wondering if there's a similar language that actually allows you to name and combine combinator definitions
03:16:23 -!- oerjan has joined.
03:18:00 <lament> crathman: well, Scheme would be one ;)
03:18:02 -!- wooby has joined.
03:18:49 <bsmntbombdood> haskell too
03:18:52 <crathman> tis true Scheme can be used. just looking for a language that's bare bones like unlambda or K
03:20:00 <crathman> but unlambda and k doesn't go above the level of actually letting you write long chains of combinators
03:20:04 <oerjan> bsmntbombdood: V in Unlambda becomes usable because of C, the call-with-continuation operator. In fact you have to use them because the I/O is based on it.
03:20:29 <oerjan> The impure C allows you to escape from a V.
03:20:44 <bsmntbombdood> what?
03:21:06 <oerjan> Your command some hours ago, you wondered why Unlambda had V.
03:21:20 <bsmntbombdood> oh
03:21:40 <oerjan> *comment
03:22:00 * oerjan must be in IRP-mode :)
03:23:01 <oerjan> Of course the real reason to tangle V,C and I/O in this way is to make Unlambda weirder than pure combinatory logic.
03:23:18 * bsmntbombdood notices that crathman's "Crossed Konstant Mocker" SKI expansion is way longer than it needs to be
03:24:23 -!- anonfunc has quit.
03:25:32 <bsmntbombdood> can be just S(KK)(SII)
03:25:48 <crathman> I was sloppy with some of the sk chains
03:25:53 <oerjan> Another weirdness: Using C you can detect whether a function is D without actually applying it. I noticed this but I don
03:26:03 <oerjan> 't know if anyone has used it.
03:26:49 <oerjan> It could allow for a different way of list termination.
03:27:46 <oerjan> I considered using it in my Unlambda interpreter but settled on using Church numerals to build lists instead, since you have to count `'s anyhow.
03:32:22 <bsmntbombdood> but we used laminated punch cards!
03:32:32 -!- crathman_ has joined.
03:32:50 <oerjan> SimonRC: the SKI logic is "the implicational fragment of intuitionistic logic"
03:34:06 <bsmntbombdood> oerjan.logread_amount > 100
03:34:52 <oerjan> And SKI corresponds to doing that logic Hilbert style, while lambda calculus corresponds to doing it natural deduction style.
03:35:16 <oerjan> See Wikipedia, I think.
03:35:36 <crathman_> whoops. get's disconnected in the middle of conversation.
03:37:06 -!- crathman has quit (Read error: 60 (Operation timed out)).
03:37:18 -!- crathman_ has changed nick to crathman.
03:42:02 <oerjan> crathman: I found an interpreter for such a language the other day.
03:42:50 <crathman> I'm not proficient enough to write esoteric languages... but very much enjoys playing with them
03:43:26 <crathman> oerjan: got a link?
03:43:34 <oerjan> i don't think it is considered esoteric, even, more like a computational model like combinatory logic itself.
03:44:03 <oerjan> I'm trying to look through my browser logs. Although I posted it here, too.
03:44:07 <crathman> oerjan: there is a fine line between tarpit and minimalist PL. :-)
03:46:11 <oerjan> btw here is a weird one that i couldn't make any sense of: http://cstein.kings.cam.ac.uk/~chris/combinators.html
03:46:35 <oerjan> definitely something to play with, though.
03:48:15 <oerjan> Darn, I didn't know it was that many days ago, but I found it: http://www.dina.dk/~sestoft/lamreduce/index.html
03:48:52 <oerjan> actually it is lambda calculus, but it is still pretty bare-bones
03:52:23 <crathman> oerjan: thanks!
03:56:15 <bsmntbombdood> calculation by hand ftw!
03:58:51 <bsmntbombdood> ha ha!
03:59:12 <bsmntbombdood> I is XXX
03:59:28 <bsmntbombdood> hot combinators naked!
04:00:02 -!- ShadowHntr has joined.
04:00:54 <bsmntbombdood> actually no, but ok
04:12:02 -!- anonfunc has joined.
04:17:22 -!- ShadowHntr has quit (Client Quit).
06:14:29 -!- crathman_ has joined.
06:20:14 -!- crathman_ has quit (Read error: 54 (Connection reset by peer)).
06:20:36 -!- crathman_ has joined.
06:28:31 -!- crathman_ has quit ("Chatzilla 0.9.77 [Firefox 2.0.0.1/2006120418]").
06:32:42 -!- crathman has quit (Read error: 110 (Connection timed out)).
07:08:39 -!- calamari has quit ("Leaving").
07:52:49 -!- helios24 has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:00:54 -!- sebbu has joined.
08:21:34 <Sgeo> G'night all!
08:24:27 -!- Sgeo has quit (Client Quit).
09:03:01 -!- helios24 has quit (Read error: 54 (Connection reset by peer)).
09:03:03 -!- helios24 has joined.
09:09:16 <oklopol> oerjan, was it an unlambda interpreter you made with unlambda or a brainfuck interpreter? :P
09:10:56 <oerjan> unlambda
09:11:12 <oklopol> i thought so
09:11:17 <oklopol> can i have the link?
09:12:14 * SevenInchBread has fun with GUI programming?
09:12:36 <SevenInchBread> I never thought I'd say that.
09:12:46 <oerjan> http://oerjan.nvg.org/esoteric/interpreter.unl but I don't seem to get through at the moment.
09:13:16 <oklopol> thank you
09:13:40 * SevenInchBread should get his own hostname one of these days...
09:14:14 <oerjan> I didn't even know I had one until they mentioned it during a recent crash at NVG
09:14:40 <SevenInchBread> I'm actually not too familiar with how DNS works...
09:15:26 <SevenInchBread> you need a static IP address right? Either that or change the registration each time your IP changes...
09:15:59 <oerjan> well my webpage is on the NVG server so others take care of the mess...
09:16:19 <oklopol> what does C do in unlambda?
09:16:33 <oerjan> if you change the registration you have to be careful about expiration dates, I think.
09:16:56 <SevenInchBread> Tkinter (Tk in Python) is oddly fun to play with.
09:17:16 <oerjan> if you make those too long you _cannot_ change the registration reliably until it expires.
09:17:24 <oerjan> C is call-with-current-continuation
09:17:45 <oklopol> hmm... what's that mean? :D
09:18:15 <oerjan> `Cf turns into `f<cont>, where <cont> is a continuation, a special function.
09:18:29 <SevenInchBread> yeah... changing the registration will create a period of time where your website is inaccessible... because of caching.
09:19:25 <oerjan> Now `<cont>g would cause the call `Cf to return with g as its result
09:20:36 <oerjan> If `Cf hasn't already returned you can think of <cont> as a local break or return function
09:22:02 <oerjan> But if `Cf has already returned you can mysteriously use <cont> to make it return _again_.
09:24:36 <oerjan> The latter can make for even more than usually hard to understand programs. The Unlambda distribution comes with this program: ``r`cd`.*`cd
09:25:12 <oerjan> When you can understand what it does, you have a good grasp on continuations.
09:26:33 <oklopol> so... it has something to do with side-effects? :D
09:26:36 <oerjan> However, I believe my interpreter only uses continuations for escape. Not that it isn't hard enough.
09:27:36 <oerjan> Sort of. C itself is still sort of pure, it just makes for strange program logic.
09:28:11 <oklopol> i'll try to understand them later
09:28:16 <oklopol> *C, not them
09:28:37 <oklopol> unlambda is goddamn simple now that i read about it yesterday
09:29:01 <oklopol> i didn't understand it when i saw it like half a year ago
09:29:25 <oklopol> a few substitution rules
09:34:52 -!- voodooattack has joined.
09:34:57 -!- voodooattack has quit (Remote closed the connection).
09:35:25 <oklopol> maybe it was because i thought there is something super special in there
09:35:33 -!- voodooattack has joined.
09:57:26 -!- nazgjunk has joined.
09:58:11 <oklopol> hmm... i still have a hard time understanding how to do loops
09:58:22 <oklopol> can i get an s expression reduce to itself?
09:58:27 <oklopol> i mean
09:58:29 <oklopol> i can't
09:58:33 <oklopol> can you?
09:59:20 <voodooattack> what do you mean? :p
09:59:49 <oerjan> ahem
10:00:42 <oerjan> loops -> recursion -> clever use of self-application
10:01:51 <oerjan> let's say you want to make a function f = `g f
10:02:10 <oerjan> actually...
10:02:25 <oerjan> since unlambda has strict evaluation we need to be a bit careful.
10:03:17 <oklopol> okay
10:03:29 <oklopol> how would i make f ? `gf
10:03:32 <oklopol> =
10:03:33 <oerjan> Let's say we want f x = ``g f x, where g is given.
10:03:33 <oklopol> *=
10:03:59 <oklopol> yeah
10:04:12 <oerjan> the first version will only work in a lazy language.
10:04:36 <oklopol> i think i follow
10:04:51 <oerjan> the trick is to make something that becomes f when applied to itself.
10:05:06 <oerjan> say h h = f
10:05:15 <oklopol> exactly what i want, yes
10:05:27 <oklopol> hmm okay
10:05:43 <oerjan> so ``h h x = ``g f x = ``g `hh x
10:06:08 <oklopol> so it won't evaluate them too early? or?
10:06:22 <oerjan> whoops.
10:07:17 <oerjan> To avoid early evaluation, the first step is to modify g.
10:08:05 <oerjan> Make a g' such that ``g' h x = ``g `hh x
10:08:53 <oerjan> but such that g' only applies h to itself when really needed.
10:09:09 <oklopol> okay, this gets too hard for me
10:09:11 <oklopol> :)
10:09:22 <oklopol> ```SIXS
10:09:23 <oklopol> ``IS`XS
10:09:23 <oklopol> `S`XS
10:09:37 <oklopol> i just wanted `XS -> `I`XS
10:09:42 <oklopol> hmm
10:09:46 <oklopol> it's not the same thoug
10:09:47 <oklopol> *H
10:09:58 <oerjan> that's not overly hard since I is the identity.
10:10:08 <oklopol> i would need an interpreter to learn this
10:10:31 <oklopol> it's not overtly hard maybe, too hard for me though
10:10:53 <oerjan> i mean, `XS is _always_ `I`XS :D
10:10:59 <oklopol> overt :PP
10:11:14 <oklopol> well, true
10:11:49 <oklopol> but i'm having a hard time convincing myself about turing completeness
10:11:59 <oklopol> since all expressions seem to die right away
10:12:07 <oerjan> ho hum.
10:12:11 <oklopol> so i wanted to make an S expression evaluate to itself
10:12:22 <oerjan> ``sii is your friend.
10:12:43 <oerjan> ` ``sii ``sii will not die.
10:13:27 <oerjan> let me explain it a different way.
10:13:48 <oklopol> mocking bird
10:14:13 <oerjan> to make a function recursive, give it an extra parameter which is itself. Then to recurse, apply that parameter to itself.
10:14:56 -!- nazgjunk has quit (Read error: 54 (Connection reset by peer)).
10:15:05 <oklopol> yeah, that i figured, i just needed to see one simple example of S reducing into itself
10:15:09 <oklopol> an s expression
10:15:43 <oerjan> well I just gave you one, ```sii``sii
10:16:06 <oerjan> simplest there is.
10:16:18 <oklopol> i did this language once where you needed to pass everything around to be able to use them... but unlambda indeed is already like that
10:16:30 <oerjan> yeah
10:16:30 <oklopol> i wish this world was smaller
10:16:38 <oklopol> i might do something original sometime
10:16:57 <oklopol> i'll play with cheese for a while then
10:17:02 <oklopol> i'm very slow in this
10:17:09 <oklopol> *``sii`sii
10:17:54 <oerjan> Eh, right
10:18:03 <oklopol> it's actually trivial
10:18:06 <oerjan> eh, wrong
10:18:11 <oklopol> oh
10:18:16 <oklopol> what is?
10:18:31 <oerjan> It should be ```sii``sii
10:18:57 <oklopol> indeed, but i understood it
10:19:02 <oklopol> i'm a clever interpreter
10:19:25 <oerjan> Another one: ```sii``s`kk``sii
10:19:45 <oklopol> but, it basically just... sii doubles it's argument and applies it to itself, so it's trivial
10:20:09 <oerjan> but it needs lazy evaluation, hm...
10:20:15 <oklopol> but i learned these yesterday so they are not so clear yet i could write these things myself
10:20:23 <oklopol> i have to convert the big one to python :D
10:20:40 <oklopol> lambda a,b,c : (a(c))(b(c))
10:20:44 <oklopol> *ones
10:21:34 -!- nazgjunk has joined.
10:21:55 <oklopol> is there a nice command line kind of unlambda interpreter?
10:22:13 <oklopol> i'd make one fast in python though if just s and k and i
10:22:14 <oerjan> They are all command line aren't they?
10:22:19 <oklopol> probably
10:22:22 <oerjan> The ones in the distribution.
10:22:26 <oklopol> i don't know
10:22:40 <oklopol> because i've not seen one, i'll search if there are many then
10:22:41 <oerjan> And a few more on my web page
10:23:10 <oklopol> this is a language i'll prolly start making interpreters when learning languages, since it's so simple
10:23:32 <oerjan> Essentially what I did
10:23:46 <oklopol> hmm
10:23:52 <oklopol> can i see your web page? :D
10:24:09 <oerjan> Although getting C right requires some understanding.
10:24:14 <oerjan> oerjan.nvg.org/esoteric
10:24:25 <oklopol> yes, that's why i'll leave that until later
10:25:11 <oklopol> oh yeah, my thue
10:25:15 <oklopol> i'll finish it today
10:25:21 <oklopol> i might bug you later that is :D
10:25:50 <oerjan> I'm afraid I'll be leaving the house in 5 minutes
10:26:16 <oerjan> but feel free to ask me later
10:26:48 <oklopol> your haskell interpreter
10:26:52 <oklopol> it takes files
10:26:54 <oklopol> only
10:26:57 <oklopol> seems
10:27:08 <oerjan> Let me see
10:27:15 <oklopol> later tonight, i'll play with unlambda first
10:28:17 <oerjan> No, you can use stdin by giving no argument
10:29:37 <oklopol> :main?
10:29:41 <oklopol> i'll try..
10:29:42 <oklopol> :D
10:30:10 <oklopol> hmm
10:30:27 <oerjan> I wrote it in a pretty old version of Haskell, no hierarchical libraries - NVG isn't quite up to date on Haskell
10:30:39 <oerjan> anyhow, gotta go
10:30:43 <oklopol> bye
10:30:51 -!- oerjan has quit ("Bye").
10:31:30 -!- jix has joined.
10:48:00 -!- anonfunc_ has joined.
10:56:37 -!- voodooattack has quit (Nick collision from services.).
10:56:51 -!- voodooattack has joined.
11:02:51 -!- anonfunc has quit (Read error: 110 (Connection timed out)).
11:06:53 -!- jix has quit ("Bitte waehlen Sie eine Beerdigungnachricht").
11:29:35 -!- nazgjunk has quit (Read error: 104 (Connection reset by peer)).
11:29:44 -!- UpTheDownstair has joined.
11:33:41 -!- UpTheDownstair has changed nick to nazgjunk.
11:48:43 -!- jix__ has joined.
11:53:37 -!- jix__ has quit ("Bitte waehlen Sie eine Beerdigungnachricht").
12:32:56 -!- voodooattack has quit (Nick collision from services.).
12:33:10 -!- voodooattack has joined.
12:51:50 -!- jix__ has joined.
12:52:44 -!- voodooattack has quit (Read error: 54 (Connection reset by peer)).
12:53:36 -!- voodooattack has joined.
12:56:03 -!- nazgjunk has quit (Read error: 104 (Connection reset by peer)).
12:56:57 -!- nazgjunk has joined.
13:05:32 -!- nazgjunk has quit (Read error: 104 (Connection reset by peer)).
13:06:18 -!- nazgjunk has joined.
13:07:44 -!- helios24 has quit (Remote closed the connection).
13:08:51 -!- helios24 has joined.
13:26:42 -!- cz_jc has joined.
13:59:56 -!- crathman has joined.
14:20:36 -!- oerjan has joined.
14:41:26 -!- sebbu2 has joined.
14:47:24 -!- crathman has quit (Read error: 110 (Connection timed out)).
14:48:07 -!- cz_jc has left (?).
14:55:07 -!- oerjan has quit ("leaving").
15:01:08 -!- sebbu has quit (Read error: 110 (Connection timed out)).
15:01:08 -!- sebbu2 has changed nick to sebbu.
15:20:31 <SevenInchBread> whoooo...
15:20:35 * SevenInchBread is making..... paint.
15:20:55 <oklopol> my thue is almost ready!
15:21:05 <oklopol> i'm making output by passing a list around xD
15:21:32 <SevenInchBread> dirty cheater?
15:21:39 <oklopol> ya
15:21:57 <oklopol> i want to get that working before actually learning haskell io
15:22:27 * SevenInchBread shall make the best paint program ever.
15:22:33 <oklopol> :P
15:22:48 <oklopol> i made a vector drawing thingie the other day
15:22:56 <oklopol> it was fun
15:24:14 <SevenInchBread> Actually... I might rig up a CLI to a programming language specifically for drawing pretty pictures.
15:24:25 <SevenInchBread> Programming art!
15:45:45 -!- crathman has joined.
15:49:58 <oklopol> ready
15:50:07 <oklopol> goddamn that took long :\
15:51:13 <oklopol> yeah, i don't understand why there aren't programming command lines on the bottom of every program
15:58:10 -!- tgwizard has joined.
16:03:12 <oklopol> haha once again my interpreter was perfect but i couldn't use it xD
16:03:30 <oklopol> well, not perfect but worked as i'd intended it to
16:03:39 <oklopol> i should leave testing for others..
16:17:23 -!- crathman_ has joined.
16:23:49 -!- crathman has quit (Read error: 60 (Operation timed out)).
16:36:50 <SevenInchBread> Anyone want to make a nifty paint program with me?
16:37:58 <SevenInchBread> ...I need to figure out how to make Python play nice with C... so I can make little helper functions in C to do all the massive byte-crunching while still nestled in the comfort of my The Best Language Ever(tm).
16:38:04 <oklopol> OMG
16:38:21 <oklopol> this actually worked http://fvdp.homestead.com/files/eso_bfi.t.txt :P
16:40:26 -!- crathman_ has quit (Read error: 110 (Connection timed out)).
16:40:41 <oklopol> hmm... not that fast though xD
16:41:09 <oklopol> *::=,>,[-<+>]<.:101_11_
16:41:12 <oklopol> ran quite fast
16:41:18 <oklopol> *::=++++++++[>++++++++<-]>+.+.+.+.+.+.+.:
16:41:29 <oklopol> has been running for 2 minutes now
16:42:04 <bsmntbombdood> write an unlambda in brainfuck
16:42:31 <oklopol> :P
16:42:49 <oklopol> i will try when i know it better
16:43:08 <oklopol> ski shouldn't be hard
16:43:12 <oklopol> imean
16:43:15 <oklopol> impossible
16:46:55 <oklopol> now that the interpreter is ready i could make it again from scratch, since it's prolly the crappiest piece of code i've ever written/seen
16:55:05 -!- goban has quit (Read error: 104 (Connection reset by peer)).
16:55:20 -!- goban has joined.
16:57:22 -!- jix__ has changed nick to jix.
17:02:25 -!- goban has quit (Remote closed the connection).
17:02:40 -!- goban has joined.
17:33:51 <oklopol> haha
17:34:06 <oklopol> made a thue interpreter in python in 25 min :P
17:34:32 <oklopol> a little learning with haskell is needed...
17:34:36 <oklopol> ------------>
17:35:04 <oklopol> i was actually just starting to eat... but had to write it... my food's cold maybe :\
17:47:14 <SevenInchBread> Yeah... Thue is fun to make :)
17:47:20 <SevenInchBread> because it's.... super easy to parse.
17:48:06 <oklopol> well, bf is easier
17:48:34 <oklopol> okay, might be i just used bad techniques
17:48:58 <oklopol> since i didn't really reason what the best way to do it would be
17:49:09 <oklopol> just wrote a quick thing
17:50:18 <SevenInchBread> basically... split and partition. ;)
17:54:11 <SevenInchBread> for old,type,new in ((left, right[0], right[:2]) for left, right in (x.partition("=")[::2] for x in split("\n") if "=" in x))):
17:54:20 <SevenInchBread> you can parse the replacement rules in one line. :)
18:07:04 -!- goban has quit (Read error: 54 (Connection reset by peer)).
18:07:19 -!- goban has joined.
18:07:21 -!- voodooattack has quit (Read error: 113 (No route to host)).
18:10:40 -!- nazgjunk has quit (Read error: 104 (Connection reset by peer)).
18:11:04 -!- nazgjunk has joined.
18:11:57 <oklopol> def thue(str):
18:11:57 <oklopol> rules=filter(lambda a:a!=['']and a!=['',''], map(lambda a:a.split("::="),filter(lambda a:a!=' ',str).split("\n")))
18:11:57 <oklopol> return rules
18:12:15 <oklopol> formatting
18:12:28 <oklopol> that's not the optimal way though :PP
18:17:15 <oklopol> http://www.pastebin.ca/362275 this is quite sucky :P
18:19:09 <SevenInchBread> eh... maps and filters get kind of weird.
18:19:17 * SevenInchBread likes list comprehensions. :)
18:19:53 -!- ShadowHntr has joined.
18:20:19 <oklopol> i don't know how to parse that with them
18:20:39 <oklopol> maybe you did it there, that will not compile in my python 2.2
18:20:46 <oklopol> so i have no idea what it does :D
18:21:11 -!- goban has quit (Operation timed out).
18:21:32 -!- goban has joined.
18:21:37 <SevenInchBread> it's basically the same thing as map and filter.
18:21:48 * SevenInchBread has the latest version of Python... so yeah... probably isn't compatable.
18:21:55 <oklopol> prolly, i just have [.. for .. in ... if ...]
18:22:04 <oklopol> and no other list comprehensions
18:22:18 <SevenInchBread> oh... well that was a generator expression... same thing in iterator form
18:22:27 -!- nazgjunk has quit (Read error: 104 (Connection reset by peer)).
18:23:23 -!- nazgjunk has joined.
18:23:47 <oklopol> okay, i don't know what that means
18:24:07 <SevenInchBread> know how list comprehensions work?
18:24:20 <oklopol> yes
18:25:04 <SevenInchBread> a generator is the same thing... except instead of constructing a list.. it just creates an iterator (which lazily evaluates the items as it iterates over them..)
18:25:18 <SevenInchBread> list comprehensions are eager... generator expressions are lazy.
18:25:49 <oklopol> i know that
18:25:55 <oklopol> but how do they work?
18:26:02 <oklopol> show me an easy example
18:26:43 <oklopol> oh
18:26:55 <oklopol> i got it now that i read your code thoroughly
18:27:19 <oklopol> except.. what is (x.partition("=")[::2] ?
18:27:33 <oklopol> the [::2] thingie
18:27:47 <SevenInchBread> hmmm.. it's hard to explain exactly...
18:27:57 <SevenInchBread> it has something to do with modulo.
18:27:57 <oklopol> tell me what it does there
18:28:04 <oklopol> i'll try and induce
18:28:05 -!- UpTheDownstair has joined.
18:28:24 <SevenInchBread> it takes the 0th and 2nd slice from a 3-tuple
18:29:10 <SevenInchBread> >>> x = (x ** 2 for x in xrange(100))
18:29:12 <SevenInchBread> >>> print x
18:29:13 <SevenInchBread> <generator object at 0x01699148>
18:29:15 <SevenInchBread> >>> print x.next()
18:29:17 <SevenInchBread> 0
18:29:18 <SevenInchBread> >>> print x.next()
18:29:19 <SevenInchBread> 1
18:29:21 <SevenInchBread> >>> print x.next()
18:29:23 <SevenInchBread> 4
18:29:24 <SevenInchBread> >>> print x.next()
18:29:25 <SevenInchBread> 9
18:29:27 -!- nazgjunk has quit (Connection reset by peer).
18:29:27 <SevenInchBread> >>> print x.next()
18:29:29 <SevenInchBread> 16
18:29:30 <SevenInchBread> >>> print x.next()
18:29:32 <SevenInchBread> 25
18:29:34 <SevenInchBread> >>> print x.next()
18:29:36 <SevenInchBread> 36
18:29:38 <SevenInchBread> >>> for num in x: print num
18:29:39 <SevenInchBread> 49
18:29:41 <SevenInchBread> 64
18:29:42 <SevenInchBread> 81
18:29:44 <SevenInchBread> 100
18:29:45 <SevenInchBread> (...truncated...)
18:29:47 <SevenInchBread> mmm... floddy.
18:31:03 <oklopol> yeah, i thought it's like that, but now partition returns left, mid, right, mid being the thing by which it was partitioned?
18:31:27 <SevenInchBread> yeah
18:31:43 <SevenInchBread> so [::2]] effectively rmeoves the mid
18:32:02 <oklopol> yeah
18:32:10 <SevenInchBread> (It's a common technique I use with partition... :) )
18:32:21 <oklopol> can i do [:1:2] or something to get 1,3,5 etc
18:32:45 <SevenInchBread> that would just return 0
18:32:50 <oklopol> and btw i think it's brilliant they have these [stuff here] things for easy sublists etc
18:33:03 <oklopol> but, how would i get them?
18:33:05 <SevenInchBread> you mean... list literals? :)
18:33:09 <oklopol> is there a way?
18:33:10 <oklopol> maybe
18:33:21 <oklopol> i don't know python's terminology that well
18:33:30 <SevenInchBread> the brackets
18:33:34 <SevenInchBread> [stuff, here]
18:33:45 <oklopol> yeah
18:34:02 <oklopol> is that python's own?
18:34:03 * SevenInchBread ...thought that was common...
18:34:27 <SevenInchBread> yeah... comma-delimited list of expressions surrounded by brackets... makes a list.
18:34:38 <oklopol> no no nono
18:34:53 <oklopol> list literal, i didn't parse that in my head it seems :P
18:35:01 <SevenInchBread> ooooh
18:35:04 <oklopol> i mean (list here)[stuff here]
18:35:05 <SevenInchBread> the slices
18:35:08 <oklopol> ye
18:35:15 <SevenInchBread> >>> range(100)[::2]
18:35:16 <SevenInchBread> [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98]
18:35:24 <SevenInchBread> I'm guessing it uses modulo...
18:35:27 <oklopol> can you have 1, 3 etc?
18:35:38 <oklopol> yeah, from:to:filter-mod
18:35:45 <oklopol> i'd say
18:35:46 * SevenInchBread has never really figured out step... he just knows that setting it to 2 skips all the even indices.
18:35:57 <oklopol> oh
18:36:02 <oklopol> i'm a goddamn idiot :P
18:36:07 <oklopol> list[1::2]
18:36:19 <SevenInchBread> ...yup :)
18:36:26 <SevenInchBread> that would give you.....
18:36:36 <oklopol> 1, 3, etc?
18:36:38 <oklopol> i hope
18:36:42 <SevenInchBread> >>> range(100)[1::2]
18:36:44 <SevenInchBread> [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99]
18:37:59 <SevenInchBread> heh... you can do all sorts of nifty stuff with slices if you make your subclasses of list. :)
18:38:44 <oklopol> hey... range(100)[1::2:3] would that be something?
18:38:58 <SevenInchBread> nah.
18:39:09 <SevenInchBread> there's only three parts.
18:39:13 <SevenInchBread> start:end:step
18:39:14 <oklopol> would've been a fun way to slice
18:39:16 <oklopol> yeah
18:39:32 * SevenInchBread brings up numpy... which uses some kickass multidimensional slicing.
18:53:13 <oklopol> numpy-dumpy
18:57:25 <SevenInchBread> here we go...
18:57:30 * SevenInchBread had to figure out how to use it again.
18:58:45 <SevenInchBread> >>> import numpy
18:58:46 <SevenInchBread> >>> x = numpy.array([range(10), range(10,20), range(30,40), range(40,50)])
18:58:48 <SevenInchBread> >>> print x
18:58:49 <SevenInchBread> [[ 0 1 2 3 4 5 6 7 8 9]
18:58:51 <SevenInchBread> [10 11 12 13 14 15 16 17 18 19]
18:58:52 <SevenInchBread> [30 31 32 33 34 35 36 37 38 39]
18:58:54 <SevenInchBread> [40 41 42 43 44 45 46 47 48 49]]
18:58:55 <SevenInchBread> >>> x[1,3]
18:58:57 <SevenInchBread> 13
18:58:59 <SevenInchBread> >>> x[1,(3,4,5,6,7)]
18:59:00 <SevenInchBread> array([13, 14, 15, 16, 17])
18:59:02 <SevenInchBread> >>> x[(1,2),(3,4)]
18:59:03 <SevenInchBread> array([13, 34])
18:59:05 <SevenInchBread> >>> x[(1,2,3),(3,4,5)]
18:59:06 <SevenInchBread> array([13, 34, 45])
18:59:34 -!- maverickbna has joined.
18:59:55 -!- ShadowHntr has quit (Nick collision from services.).
19:00:05 -!- maverickbna has changed nick to ShadowHntr.
19:01:33 <oklopol> can you take sub-squares from a 2d-array?
19:01:50 <SevenInchBread> I think you can... I'm just trying to figure out how. :P
19:02:15 <SevenInchBread> it's also pretty damn efficient... most of NumPy's array stuff is in C.
19:03:23 <oklopol> yeah, clever trick
19:03:40 <SevenInchBread> I don't even think it uses multiple arrays actually..
19:03:55 <SevenInchBread> as long as you maintain a solid shape you can just use multiplication.
19:04:17 <oklopol> yeah, asm does that faster than it does actualy multiplication
19:04:21 <oklopol> so yeah, it's fast
19:04:26 <oklopol> *actualy
19:04:29 <oklopol> *actual
19:04:36 <oklopol> (wh the y)
19:04:43 <oklopol> *(why the typos :\)
19:05:40 <SevenInchBread> heh... there's a function for initializing an arbitrary array to nothing but zeros... perfect for a BFer :)
19:06:22 <oklopol> well, it's kind of obvious there's one :P
19:06:54 <SevenInchBread> hmmm?
19:07:10 <oklopol> i think it is... maybe not :\
19:08:47 -!- Sgeo has joined.
19:10:10 <SevenInchBread> oklopol, do you have it installed?
19:10:50 <oklopol> i don't... i'll get a newer python too if i get it
19:10:56 <oklopol> hmm
19:11:00 -!- UpTheDownstair has changed nick to nazgjunk.
19:11:13 <SevenInchBread> Numpy is incredibly fast O.o
19:11:22 <oklopol> i'll do it now, gotta see
19:12:06 <SevenInchBread> it initialized a 100 by 100 by 100 array of zeros in about the same time any other normal Python list would initialize.
19:13:01 <oklopol> hmm
19:13:28 <oklopol> 100 x 100 is pretty much an empty array :)
19:13:40 <oklopol> 10000 ~ 0
19:14:00 <SevenInchBread> well... using Python lists it would have taken up a signifigant amount of memory.
19:14:20 <oklopol> probably
19:14:37 <oklopol> i'm used to python being unbelievably slow
19:15:04 <SevenInchBread> I haven't experience much of anything else... as far as for actual use.
19:15:45 <oklopol> i know at least c++, java, python and vb thoroughly
19:15:57 <SevenInchBread> it usually works fine for what I need it to do... and there's usually some insane library out there that can accommodate those weird high-performance situations.
19:16:06 <oklopol> thoroughly being i know pretty much all the things normal people use with them :)
19:17:17 <oklopol> 2.5 is the newest?
19:18:15 <oklopol> well, it's newer at least
19:21:25 <SevenInchBread> yeah
19:21:28 <SevenInchBread> that's the newest.
19:21:53 <SevenInchBread> hmmm... alright... so a 100 by 100 by 100 by 100 matrix of zeroes made my computer bog down for a minute.
19:22:29 <oklopol> but it could allocate it?
19:22:35 <SevenInchBread> eventually.
19:22:46 <oklopol> 100 megabytes
19:22:58 <SevenInchBread> ...hmmm, oh yeah.
19:23:01 * SevenInchBread didn't consider that.
19:23:39 <SevenInchBread> yeah... if I try to go 5 dimensions of 100 each... numpy spits out a "dimensions too large" error... for good reason I imagine. :P
19:23:46 <oklopol> it's not the time that's the issue there :)
19:24:08 <oklopol> hmm
19:24:13 <oklopol> dimensions too large?
19:24:18 <oklopol> it can have 5 dim though?
19:24:23 <SevenInchBread> yeah
19:24:31 <SevenInchBread> it can have arbitrary length dimensions.
19:25:04 <oklopol> good, c had a restriction of 12 dimensions at some point :P
19:25:05 <SevenInchBread> but... since that would be well over a gigabyte... it sorta... preemptively stopped me.
19:25:16 <oklopol> (might be a lower lever restriction though)
19:25:28 <SevenInchBread> well... I haven't checked the actual max...
19:25:31 * SevenInchBread does so.
19:25:40 <oklopol> well, 10 gigabytes
19:25:56 <oklopol> a bit more if you consider the idiotic 1024==1000 thing
19:26:00 <SevenInchBread> 10 gigabytes.... of zeros... talk about useful memory.
19:26:03 <oklopol> eh
19:26:05 <oklopol> a little less
19:27:06 <SevenInchBread> typ... the dimensions look arbitrary... just however much memory we can hold.
19:27:32 <oklopol> typ?
19:28:06 <SevenInchBread> er... that was a "yep"/
19:28:43 <oklopol> ah okay
19:29:28 <SevenInchBread> ah.... 32
19:30:07 <SevenInchBread> >>> y = numpy.zeros((1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1))
19:30:09 <SevenInchBread> ValueError: sequence too large; must be smaller than 32
19:30:25 <oklopol> :\
19:30:29 <oklopol> that's stupid
19:30:40 <SevenInchBread> Still... that should be plenty of dimensions for most scenarios... unless you're doing some freaky theoretical physics shit
19:30:59 <oklopol> yeah, but it wouldn't make it harder to code to make it n dimensions...
19:31:15 <SevenInchBread> Python lists are arbitrary dimension... I believe.
19:31:25 <oklopol> i know they are
19:32:40 <SevenInchBread> >>> x = []
19:32:41 <SevenInchBread> >>> for num in xrange(1000):
19:32:43 <SevenInchBread> x = [x]
19:32:45 <SevenInchBread>
19:32:46 <SevenInchBread> >>>print x
19:32:48 <SevenInchBread> (...I'll spare you the spam...)
19:32:49 * SevenInchBread is feeling copy-pasty.
19:33:05 <oklopol> i hate you
19:34:21 <SevenInchBread> well... I tried to make a bigger dimension... but xrange() gave out on me before the trust list could.
19:35:40 <SevenInchBread> oh ho! but itertools and its trusty count function save the day.
19:35:56 <oklopol> i was just about to press paste on the same pieceeh
19:37:26 <SevenInchBread> mmmm.... this is going to take a while.
19:40:15 <oklopol> my computer should learn some manners... when i tell someone i hate them it's not the right time to freeze up just before i can explain what i meant...
19:40:30 <SevenInchBread> yeah... so..
19:40:39 <SevenInchBread> 10000000000000000000000000000000-d list took too long...
19:40:55 <oklopol> fucking python installation ....
19:40:57 <oklopol> :\
19:40:59 <SevenInchBread> hurray KeyboardInterupt.
19:41:06 -!- GregorR has changed nick to GreggorR.
19:41:41 <SevenInchBread> Python's list/iterative-stuff is probably one its stronger features...
19:41:57 -!- GreggorR has changed nick to GregorR.
19:42:58 <SevenInchBread> theoeretically speaking... Python can have infinitity-d lists.
19:43:15 <SevenInchBread> just... not with all unique values.
19:43:49 <SevenInchBread> ...but that's not really anything amazing. :P
19:44:02 <oklopol> well, any list can have any-dimension lists :)
19:44:05 <oklopol> *language
19:44:08 <oklopol> lol xD
19:44:42 <SevenInchBread> hmm... I actually don't think Python can create infinite-length lists...
19:45:16 <SevenInchBread> Lisp can... simply because they're linked.
19:47:09 <SevenInchBread> heh... you can -simulate- an infinite list..
19:47:26 <SevenInchBread> but I guess that's all Lisp is doing also.
19:48:58 <oklopol> you can't have an infinite length list because of the implementation
19:49:11 <oklopol> i don't think python has but memory limits on length
19:49:15 -!- sebbu2 has joined.
19:49:17 <SevenInchBread> I can have a set that contains everything though. :)
19:49:37 <SevenInchBread> oklopol, well... with linked lists you can simply reference the pairs beforehand...
19:49:38 <oklopol> i hate windows
19:49:47 <oklopol> i'd like a brainfuck os better
19:50:04 <oklopol> what do you mean?
19:50:27 <oklopol> why the fuck does the taskbar not hide?!?!?!?!?!?!?
19:50:49 <oklopol> why did they put a randomizer on every fucking task
19:51:06 <oklopol> i closed about 40 programs just now to get it down
19:51:12 <oklopol> i only have mirc open
19:53:07 -!- digital_me has joined.
19:53:12 <oklopol> okay, i'll throw this piece of shit out the window.
19:53:31 * SevenInchBread made an infite list in Python... cheating a little bit.
19:53:44 <oklopol> elaborate
19:54:07 <SevenInchBread> >>> x = [1,[2,[3,[]]]]
19:54:08 <SevenInchBread> >>> x[1][1][1] = x
19:54:10 <SevenInchBread> >>> x
19:54:11 <SevenInchBread> [1, [2, [3, [...]]]]
19:54:16 <oklopol> ah
19:54:17 <oklopol> yeah
19:54:32 <oklopol> i forgot python had pointers
19:54:33 <oklopol> i mean
19:54:35 <oklopol> you know what i mean
19:54:43 <SevenInchBread> heh... yeah... lists are mutables.
19:55:06 <oklopol> mutable is different, i mean addressable
19:55:09 <oklopol> ...
19:55:34 <SevenInchBread> maybe in the implementation... but it's transparent at the top.
19:55:54 <oklopol> ?
19:56:06 <oklopol> no it isn't
19:56:07 <SevenInchBread> the pointing and addressing and all that is automatic.
19:56:20 <oklopol> well, mathematically yes
19:56:27 <SevenInchBread> in other words... there is no & :)
19:56:29 <oklopol> you don't see the pointers as numbers
19:56:35 <oklopol> that's the only difference
19:57:04 <SevenInchBread> yeah well... by that logic... there's no much difference in assembly and Python.
19:57:18 <SevenInchBread> I'm just not seeing the assembly.
19:57:58 <oklopol> all you don't see is the numerical addresses... otherwise you only have pointers and calcs are with values, moving around with pointers
19:58:11 <oklopol> it's a lot of convenience
19:58:24 <oklopol> BUT you don't have a real difference like in functional langs you would
19:58:33 <oklopol> where you can't know where something is
19:58:34 <SevenInchBread> totally... I'd rip my hair out if I had to mess around with pointers.
19:58:41 <oklopol> and it isn't really anywhere
19:59:02 -!- goban has quit (Read error: 54 (Connection reset by peer)).
19:59:07 <oklopol> but i forgot python is any-style programming... there's a nice term for it
19:59:14 <oklopol> somewhere out there
19:59:14 -!- goban has joined.
19:59:18 <oklopol> pointers are nice
19:59:36 <SevenInchBread> usually they can be simulated in part... they are nice though.
20:00:02 <SevenInchBread> I've got a fairly interesting language in my head... that resembles Smalltalk... but fairly different.
20:00:24 <oklopol> that's a bit too vague to be interesting tbh :D
20:01:09 <SevenInchBread> it's looking pretty neat in my head... it uses Smalltalks message-passing (except there are no multi-argument messages) mixed with Lisp's idea of symbols....
20:01:41 <oklopol> i don't know smalltalk :<
20:02:02 <SevenInchBread> smalltalk was one of the pionerrs of OO.
20:02:06 <SevenInchBread> before it got all... weird.
20:02:54 <oklopol> you mean OO features or attitude
20:03:02 <oklopol> with weird
20:03:17 <oklopol> and yes, i know that much about smalltalk
20:03:33 <SevenInchBread> It was one of the first to do "everything is an object"...
20:03:39 <oklopol> yeah yeah
20:03:51 <oklopol> i know all the trivia stuff, just not anything real :)
20:03:54 <SevenInchBread> It doesn't really remind me of other OO languages though.
20:04:28 <oklopol> it has a metaclass everything is derived from, the metaclass being derived from itself, that's how much i know :P
20:04:41 <oklopol> because everything HAD TO be derived from something
20:06:46 <SevenInchBread> yeah... it's like Lisp for OO... there's only three syntax forms... and no keywords (aside from a few reservered booleans, self, and super)... conditionals are implemented as methods of booleans... etc.
20:07:01 <SevenInchBread> http://users.ipa.net/~dwighth/smalltalk/byte_aug81/design_principles_behind_smalltalk.html <---
20:08:32 -!- sebbu has quit (Connection timed out).
20:08:32 -!- sebbu2 has changed nick to sebbu.
20:08:58 <SevenInchBread> more flowery than implementation-specific... but eh... it's the best description I could find. :P
20:09:32 <oklopol> i like technical descriptions better.. but i'll read that if it's not long
20:09:56 <SevenInchBread> it does go into what it considers a hinderance to program design.
20:19:41 -!- Rugxulo has joined.
20:20:55 -!- Rugxulo has left (?).
20:35:26 <oklopol> i finally managed to read it :)
20:35:33 <oklopol> there was nothing i didn't know
20:36:17 <SevenInchBread> ...yeah
20:36:21 <SevenInchBread> erm...
20:36:34 <SevenInchBread> so... other languages don't have something similar to list[x:y]?
20:36:50 <oklopol> i haven't seen
20:37:01 <oklopol> that does not mean there isn't one
20:37:07 <SevenInchBread> yeah...
20:37:11 <oklopol> since i know mostly esoteric alngs
20:37:13 <oklopol> *langs
20:37:25 <SevenInchBread> Some Python-like languages probably do it... I'd guess Ruby and maybe Perl.
20:37:29 <oklopol> maybe 15-20 non-esoteric
20:37:58 <oklopol> yeah, i don't know those languages... i should learn the languages everyone knows...
20:38:00 <SevenInchBread> Hmm... I think in Smalltalk slicing is like list from: x to: y
20:38:40 <oklopol> that kind of sublisting syntax can of course be implemented in c++ in 10 min
20:39:10 <oklopol> but i won't do that :\ so it has to be in the language itself
20:39:22 <SevenInchBread> I'm surprised C(++) doesn't have... Python's for loop.
20:39:40 <oklopol> it is considered to be added
20:39:48 <SevenInchBread> it's way too common a procedure to always repeat.
20:39:54 <oklopol> but c++ is slow to change nowadays
20:40:02 <oklopol> it will take the java syntax
20:40:08 <SevenInchBread> well... maybe not in C.... arrays aren't quite as versatile as lists.
20:40:10 <oklopol> java just evolves faster
20:40:40 <oklopol> for (int i : integer_list) {}
20:40:52 <oklopol> java is like that, c++ too if they add it
20:41:12 * SevenInchBread tries to think of some more Smalltalk idioms he knows...
20:41:12 <oklopol> but you have iterators in c++, it's the same thing but no nice syntax for it
20:41:18 <SevenInchBread> I've never actually used that language... just read about it.
20:41:39 <SevenInchBread> conditionals are like.... bool ifTrue: function ifFalse: function
20:42:09 <SevenInchBread> and it has literal syntax for lambda blocks in []'s
20:44:34 <SevenInchBread> math looks like any other math... because of the binary syntax form... 2 + 2 2 / 2
20:45:48 <oklopol> the if thing i don't understand
20:45:53 <oklopol> but i know math is like that
20:46:10 <SevenInchBread> booleans are equipped with an ifTrue and an ifFalse method.
20:46:16 <SevenInchBread> that take lambdas as arguments.
20:46:52 <SevenInchBread> so....
20:47:30 <SevenInchBread> 2 > 3 ifTrue: ["Hello, World!" print]
20:47:49 <oklopol> okay
20:50:46 <SevenInchBread> so yeah... the idea I had for my own language... would eliminate that annoying colon, make all functions one-argument, remove classes entirely (prototype OO), and have some nifty ways to mess around with the evaluation of amessage
20:54:26 <oklopol> i still don't know anything about smalltalk :)
20:54:49 <SevenInchBread> ...well I don't really know what else to explain.
20:55:35 <oklopol> "..." print outputs a string
20:55:36 <SevenInchBread> it's a fairly straightforeward design... there's some objects... and some messages... and everything about the implementation can be changed in some way.
20:55:42 <oklopol> that much i know
20:55:42 -!- UpTheDownstair has joined.
20:55:48 <SevenInchBread> do you know... why?
20:55:49 -!- nazgjunk has quit (Read error: 104 (Connection reset by peer)).
20:55:53 <oklopol> plus basi arithmetics
20:56:08 <oklopol> *basic
20:56:33 <oklopol> i don't know syntax, i don't know the language
20:56:46 <SevenInchBread> oh... well syntax is a snap.
20:57:04 <SevenInchBread> there's basically thee kinds of expressions... and a few literals.
20:57:15 <oklopol> i know, the text said
20:57:17 <oklopol> or you
20:58:08 -!- goban has quit (Read error: 54 (Connection reset by peer)).
20:58:11 <oklopol> messages... how i see it is that functions are rather sent messages to objects that contain instructions
20:58:14 <oklopol> or lambdas
20:58:15 <oklopol> functions
20:58:17 <oklopol> w/e
20:58:31 <oklopol> but it's just my guess
20:58:36 <SevenInchBread> unary... which goes object message binary... which goes object message arg1 and keyword object message1: arg1 message2: arg2 message3: arg3 ... ... ..
20:58:39 <SevenInchBread> it's basicallty a method call.
20:58:43 <oklopol> i don't know what is referred to by a "message"
20:58:45 <SevenInchBread> message-passing.
20:58:49 -!- tgwizard has quit (Remote closed the connection).
20:58:54 <oklopol> like in erlang?
20:59:05 <SevenInchBread> it's like "Hello".split("e")
20:59:09 <SevenInchBread> the "split" is the message.
20:59:15 <SevenInchBread> to "Hello"... the object.
20:59:25 <SevenInchBread> it's just a method call... pretty much.
20:59:27 <oklopol> yeah, so exactly how i guessed, but it wasn't clearly said there
20:59:31 <oklopol> so i didn't know
20:59:44 <oklopol> by "message" i assumed an erlang-type message
20:59:48 <oklopol> you know erlang?
20:59:50 -!- UpTheDownstair has changed nick to nazgjunk.
20:59:51 <SevenInchBread> nope.
21:01:11 <oklopol> it's functional.. but process id's that are somewhat like continuations can be stored and you can do prodess-id ! message
21:01:49 <oklopol> the in the function that the process-id points to there can be "on receive this and this message"
21:02:01 <oklopol> on receive... anyway
21:02:07 <SevenInchBread> oh... kinda like coroutines?
21:02:12 <oklopol> kinda
21:02:18 <oklopol> you should read about erlang
21:02:25 <SevenInchBread> I've heard erland is good for threads.
21:02:25 <oklopol> it's pretty neat
21:02:29 <oklopol> yeah
21:02:40 <SevenInchBread> I'm assuming is uses a lot of coroutine-like stuff
21:02:40 <oklopol> runs 25 million threads smoothly i hear
21:03:02 <oklopol> yeah, functions can stop to wait for messages from other functions
21:03:12 <oklopol> and when you call a function you store it's process id
21:03:15 <oklopol> so you can send it data
21:03:25 <oklopol> that's the basic thing you do in erlang
21:03:26 <SevenInchBread> so it's like... a mini-OS?
21:03:39 <SevenInchBread> that sounds pretty cool actually...
21:03:47 <oklopol> ericssons language
21:04:10 <oklopol> (though the name actually comes from a guy named erlang, quite a coincidence)
21:04:12 <SevenInchBread> you could easily fork real OS subprocesses and wrap them as erland functions.
21:04:28 <oklopol> yeah
21:05:09 <oklopol> i like the idea there's only data in functions and no objects etc but you can send messages... i don't know why though :P
21:05:25 <SevenInchBread> hmm.... ah... that's interesting... so it stores processes as memory... that's usually not done.
21:05:38 <oklopol> i haven't even seen an implementation for erlang, i just read a book about it... i think
21:05:43 <oklopol> i have no ideaw when
21:05:45 <oklopol> *-w
21:05:56 <oklopol> yeah, a running function is kinda like an object
21:06:03 <oklopol> and it dies after it's executed
21:06:10 * SevenInchBread was going to ID-ify the objects in his language... he might also steal a few ideas from erland while he's at it. :)
21:06:22 <SevenInchBread> ...erlang
21:06:27 <oklopol> but long executions don't matter since they are in a stabilized state when waiting for messages
21:07:03 <oklopol> actually... a function waiting for a message is kinda like an object with a state
21:07:05 <SevenInchBread> Id-ified responses... sounds like a step-up in human-like communication... since communication is rarely linear.
21:07:12 <oklopol> ...only a lot sexier if you ask me
21:07:18 <oklopol> yeah
21:07:23 <SevenInchBread> ah... all the local variables are held like an object's state?
21:07:28 -!- goban has joined.
21:07:31 <oklopol> yes
21:07:43 <oklopol> you have pattern-matching and vars
21:07:48 <oklopol> ints, lists, strings
21:07:54 <oklopol> and of course atoms
21:07:59 <oklopol> for pattern-matching
21:08:06 <SevenInchBread> ...I've actually had an idea like that before... frozen functions with object-like state.
21:08:14 <oklopol> has all the nice functional list convenience
21:08:25 <oklopol> yep, i just realized it now actually
21:08:35 <oklopol> and started to like erlang a lot more :)
21:08:59 <SevenInchBread> hmmm...
21:09:23 <oklopol> because they can have vars, calling is an object constructor, vars are the stored state, receiving messages is waiting for function calls
21:09:35 <oklopol> kinda like
21:09:52 <SevenInchBread> the main reason I've never used threading is because it's too much of a hassle... but processes with IDs and a state (which basically mimics OS processes... except you have way more access to the memory inside)... is kind of natural.
21:10:07 <SevenInchBread> yeah.. I've noticed you can use coroutines to make objects..
21:10:30 <oklopol> yeah, well, in java threads are easy, but erlang beats it
21:10:40 <oklopol> and with most langs threads are shitty
21:11:31 * SevenInchBread incorporates some of that into his smalltalk/lisp mix.
21:11:45 <oklopol> i actually never realized what you saw in coroutines until i realized erlang has that, basically, and it's a very sweet concept
21:12:09 <oklopol> mix'm up
21:12:09 <SevenInchBread> the coroutines I've seen though are far more limited than that though.
21:12:24 <SevenInchBread> just single-input, single-output type stuff.
21:13:06 <SevenInchBread> I guess with some hackish alterations of some low-level Python stuff you could change the local state... but it's definetely not meant to happen conviently.
21:14:02 <oklopol> yeah
21:14:09 <oklopol> erlang doesn't have return values
21:15:00 <oklopol> actually
21:15:02 <oklopol> i'm lying
21:15:05 <oklopol> *wrong
21:15:36 <SevenInchBread> hmm.. basically I stole Lisps idea of a universal syntax and symbols (kind of like pointers but in reverse)... and then I stole Smalltalks idea of everything-about-an-object-is-handled-by-itself... and from erland I'll take the idea of continued processes with changable state. :)
21:15:51 <oklopol> in erlang you can call functions in a different thread with one syntax and the function returns it's id right away, or you can call it "normally", and it then returns whatever it returns when it's ready
21:16:29 <oklopol> "universal syntax and symbols" what does this mean?
21:16:31 -!- jix has quit ("Bitte waehlen Sie eine Beerdigungnachricht").
21:16:40 <oklopol> i don't know lisp that well
21:16:43 <oklopol> :D
21:16:45 <oklopol> maybe
21:16:52 <SevenInchBread> well... Lisp just has one and only one syntax.... (func arg1 arg2 ...)
21:17:06 <oklopol> ah
21:17:07 <oklopol> yeah
21:17:13 <SevenInchBread> that's it... with some minor exceptions.
21:17:19 <oklopol> yep
21:18:06 <SevenInchBread> so... Lisp can directly access its variables as a data type... a symbol data type.
21:18:36 <SevenInchBread> so... to assign a symbol to a value in Lisp... you do (set 'symbol value)
21:18:51 <oklopol> yeah
21:19:04 <SevenInchBread> ' being a special literal that keeps an expression from evaluating... and returns it as a symbol.
21:19:06 <SevenInchBread> so yeah
21:19:40 <SevenInchBread> if you have it so that every object understands the "becomes" message.
21:19:42 -!- ShadowHntr has quit ("End of line.").
21:20:06 <SevenInchBread> you can change reference to objects... or you can change objects themselves.
21:20:10 <oklopol> in common lisp is not used with defun, set and such specialties... or?
21:20:48 <oklopol> i read this book from the seventies...
21:20:55 <SevenInchBread> well... common lisp has setq... which is a macro that basically boils down to set. (it stands for "set quote"... because the ' is called the quote operation)
21:21:16 <SevenInchBread> and defune is a macro too...
21:21:31 <oklopol> yeah
21:21:40 <oklopol> set and defun they were in the book
21:22:23 <oklopol> and let and something to make functions and vars in functions...
21:22:24 <SevenInchBread> but in my language... there won't be macros... and thus no special way to make variable assignment.
21:22:32 <oklopol> and lambda separately
21:22:40 <oklopol> 3 different ways to make functions
21:22:50 <SevenInchBread> you just have to send a becomes message to a symbol object..
21:23:06 <oklopol> yeah
21:23:10 <oklopol> i see what you mean
21:24:38 <SevenInchBread> `foo becomes bar would change the foo symbol so that it pointed to bar... but foo becomes bar (without the backquote) would change foo the object to bar...
21:24:52 <SevenInchBread> so in the second one... -all- references to foo would be pointing to bar now.
21:25:02 <SevenInchBread> it's like the reverse of pointers. :)
21:25:39 <oklopol> kinda
21:25:42 <SevenInchBread> and instead of tiny little memory blocks... you have entire objects.
21:27:19 <SevenInchBread> it'll probably work using an id system... each object would have a unique ID on an list represented the global memory of the program... it sounds very much like a high-level version of pointers.
21:28:31 <oklopol> yeah, somewhat
21:30:32 <SevenInchBread> it's just the opposite of how C does it... in C the variables are implicitly references... while in this the variables evaluate to objects... and you have to "catch" them with a backquote to evaluate the reference itself.
21:31:04 <SevenInchBread> well... no
21:31:10 <oklopol> catch?
21:31:23 <SevenInchBread> actually... variable assignation copies the memory into the new block.
21:31:38 <SevenInchBread> ...er... I think?
21:31:46 <oklopol> :P
21:38:06 <SevenInchBread> well... the benefits are basically what you get with pointers... except less complicated (I think).
21:38:42 <SevenInchBread> or maybe just less tedious... you don't have to type out 4 billion *'s ...just 1 ` whenever you want to alter a variable.
21:39:56 <oklopol> well... the syntactical inconvenience of c pointers can easily be circumvented in c++
21:41:10 <SevenInchBread> with ->?
21:42:11 <SevenInchBread> the symbol design works really nice for prototype-oriented OO... familiar with it?
21:43:37 <oklopol> prolly
21:43:41 <oklopol> not the name though
21:43:48 <oklopol> sounds familiar
21:44:06 <oklopol> no, with references
21:45:30 <SevenInchBread> basically... prototype OO is OO without classes.
21:45:47 <SevenInchBread> you make new objects by spawning copies of previous objects and altering their contents.
21:45:47 <oklopol> okay
21:45:54 <oklopol> ah
21:45:56 <oklopol> like nopol
21:46:03 <oklopol> :)
21:46:11 <SevenInchBread> which is really all classes do... make copies of themselves...
21:46:21 <SevenInchBread> now we just remove the distinction of class and object altogether.
21:46:34 <oklopol> nopol does that... but it's classes and functions are the same thing
21:46:42 <oklopol> so... it's a bit different
21:47:14 <SevenInchBread> Self, Moo, and JavaScript are all prototpe.
21:47:37 <oklopol> i don't know any of them:<
21:47:59 <SevenInchBread> the copies objects all have a reference to their "parent".. and usually there's some normal OO concepts thrown in to make things convient.
21:48:08 <SevenInchBread> like delegation... which is basically arbitrary inheritance.
21:48:36 <SevenInchBread> but... I'm not going to use any sort of inheritance... because you don't need it.
21:48:52 <oklopol> yeah... modularity is for wimps
21:53:05 <SevenInchBread> nah... you just copy everything over... you've still got modularity..
21:53:34 <oklopol> if you have duckish typing
21:53:37 <oklopol> and you prolly do
21:53:50 <SevenInchBread> and since you have the ability to change both symbols and objects... you can easily override a function shared by a wide number of objects.
21:54:31 <SevenInchBread> oh definetely... I'd have trouble even conceiving of a language that can't duck type.... Python has spoiled me.
21:55:35 <oklopol> well, duck typing circumvents inheritance
21:55:40 <oklopol> not entirely
21:55:47 <oklopol> but the modularity part
21:56:09 <oklopol> because you can have similar interfaces with similar objects
21:56:25 <oklopol> with duck typing you jsut don't tell that to the compiler until at run-time
21:56:55 <oklopol> a bit slower if bad implementation, maybe a bit less clear for someone who reads the code
21:56:58 <oklopol> but it works
21:57:05 <oklopol> and makes a lot of things less verbose
21:57:38 <SevenInchBread> heh... compiler?
21:58:14 <oklopol> yeah, badly rephrased
21:58:16 <oklopol> i mean
21:58:28 * SevenInchBread usually follows a fairly straightforeward model for interpreting... scan for tokens... and then interpret the tokens to do shit.
21:58:37 <oklopol> you don't have to specify in the code which things do what
21:59:06 <oklopol> but you just hope they abide by the interface that is needed
21:59:17 <oklopol> i don't know if you follow what i'm trying to say
21:59:29 <SevenInchBread> The idea of "telling the compiler how to work" is literally completely alien to me... and doesn't even seem necessicary or that beneficial.
22:00:03 <oklopol> yeah, but it reduces run-time errors
22:00:17 <oklopol> because if you don't tell it it can't tell you you did an error
22:00:30 <SevenInchBread> well... the entire idea behind OO is that the details of the implementation are hidden behind a name...if everybody assumes that the procedures behind the names all do what they're supposed to do... then everything works fine.
22:01:02 <oklopol> yes, but with non-duck typing you also know what kind of things do what kind of stuff
22:01:34 <oklopol> with duck-typing you use everything as you wish and sometimes it works, sometimes not, because it can't be checked at compile-time
22:01:39 <oklopol> (in most cases)
22:02:37 <SevenInchBread> it's pretty useful in my experience... replacing the standard output stream with a class wrapper that implements the same methods as a file object often saves a lot of time.
22:02:58 <SevenInchBread> it makes it easy to hack things. :)
22:03:05 <SevenInchBread> make it do what you want.
22:03:16 <oklopol> yeah... that can be done with or without duck-typing
22:03:28 <oklopol> but without it you do it with inheritance
22:04:12 <oklopol> and then it's more "agreed" that it does what it's required to do
22:04:24 <oklopol> with duck-typing it's run-time checked
22:05:36 -!- anonfunc_ has quit.
22:08:09 <SevenInchBread> oklopol, hmmm?
22:08:14 * SevenInchBread is confused now. :P
22:08:33 <SevenInchBread> why would inheritance make a method work or not work?
22:09:11 <oklopol> if something is inherited from something else it has the method the parent has
22:09:27 <oklopol> so if a function need some methods a, b and c
22:09:31 -!- nazgjunk has quit ("mrahaha").
22:09:31 <oklopol> it makes a class
22:09:37 <oklopol> and then that class is derived from
22:09:38 <oklopol> but
22:09:48 <oklopol> with duck-typing you don't need that
22:09:56 <oklopol> because you can send ANY object to it
22:10:12 <oklopol> doesn't have to be derived from the class that has the methods that function needs
22:10:28 <oklopol> and the function then fails if the object it got doesn't have the methods
22:10:35 <oklopol> and this is a runtime error
22:10:55 <oklopol> without ducking it would've been a compile time type error
22:11:38 <oklopol> in my first sentence method -> methods
22:11:53 <oklopol> second, need -> needs
22:13:10 <oklopol> i think if you do the duck you oughtta have direct string manipulation for method names... which python incidentally does :P
22:15:18 <SevenInchBread> well.. hmm...
22:15:25 <SevenInchBread> what is causing this to occur?
22:15:30 <SevenInchBread> the error-at-compule-time.
22:16:09 <oklopol> because if it didn't have the method the function uses, it wasn't derived from the class the function takes as argument
22:16:30 <oklopol> because a function can only use a method it's argument has
22:16:45 <oklopol> (casting can be done of course but considered bad in most cases)
22:20:56 <SevenInchBread> oh yeah.... darn static typing
22:22:10 <SevenInchBread> it does add a layer of security to a procedure... but usually one that isn't needed...
22:23:08 <SevenInchBread> Actually... I think a nice way to do typing is by category.
22:23:44 <oklopol> well, that's interfaces for you
22:25:50 <SevenInchBread> I've never liked excessive type-checking.
22:26:10 <SevenInchBread> if something doesn't work... let it explode on its own...
22:26:34 <oklopol> yeah :D
22:29:24 <SevenInchBread> in a purely OO language... the worst that could happen is the object doesn't implement the method.
22:29:51 <oklopol> actually no
22:30:21 <oklopol> in for example java the WORST that could happen is that someone who read the code would not understand the logic at some point
22:30:36 <oklopol> that's the oo of today
22:31:28 <SevenInchBread> meh... Java is for corporate monkeys.
22:33:31 <SevenInchBread> oh... another thing I like about the smalltalk-like syntax I'll be using.
22:33:50 <SevenInchBread> there's absolutely no distinction between function calls or attribute reading.
22:34:10 <SevenInchBread> because all attributes are messages... which are function-like-things.
22:34:11 <oklopol> i don't know if it's like that with other langs, but from what i hear, it is towards that direction
22:34:22 <oklopol> i mean
22:34:32 <oklopol> the corporate-monkey-ness
22:35:15 <SevenInchBread> yeah... everybody's trying to make languages that are good for shelling out programs quickly and efficiently...
22:35:25 <SevenInchBread> I mean... whatever happend to having fun whilst programming?
22:35:30 <oklopol> yeah
22:35:57 <oklopol> i idle on this java chan... there was an hour long discussion about how to get sort() work with the swedish alphabet
22:36:36 <SevenInchBread> fully automatic unicode support... that's another thing I'll put in this language. :)
22:36:43 <oklopol> i said it's a 15 min job to make one yourself, which lead into a half an hour discussion about how much faster it is to use other's tools than to make ones own
22:36:48 <oklopol> one's
22:37:15 <SevenInchBread> ...if everyone followed that logic... no one would be making tools.
22:37:23 <SevenInchBread> sometimes it's just -fun- to make shit.
22:37:39 <SevenInchBread> you can look at it and say "I fucking made that"
22:38:21 <oklopol> yeah... i said something like that, they said you don't get money if you do stuff yourself
22:38:23 <oklopol> :\
22:38:37 * SevenInchBread is 15... totally doesn't get paid anyways. :P
22:39:01 <oklopol> i thought you must be young with your constant ideas
22:39:16 <SevenInchBread> but yeah... automatic unicode support...
22:39:25 <SevenInchBread> I don't know why people don't do it to begin with.
22:39:42 <oklopol> c++ has it, java has it, python has it, what doesn't?
22:39:57 <SevenInchBread> ASCII when you're using ASCII characters... and then when you add some unicode to the string... boom, it automatically changes encodings for you.
22:40:01 <SevenInchBread> not Python.
22:40:21 <oklopol> oh
22:40:28 <oklopol> ah, yeah, indeed it doesn't
22:40:52 <SevenInchBread> but unicode codepoints are kind of weird.
22:41:02 <SevenInchBread> but I don't it's impossible to have automatic management of encodings.
22:41:24 <SevenInchBread> oh.. and just one number type...
22:41:40 <oklopol> ?
22:41:42 <SevenInchBread> called... number.
22:42:02 <SevenInchBread> it'll convert to long, short, floating-point whatever.
22:42:31 <oklopol> hmm
22:43:05 <SevenInchBread> well... maybe an imaginary type... like Python has.
22:43:18 <oklopol> yes, exactly what i thought
22:43:27 <oklopol> actually
22:43:30 <SevenInchBread> simply because it, mathematically, operates differently.
22:43:35 <oklopol> exactly what python has, right?
22:43:42 <SevenInchBread> nope.
22:43:48 <oklopol> what is different?
22:43:54 <SevenInchBread> Python still distinguishes between integer and floating point.
22:44:06 <SevenInchBread> long and short are automatically converted... but they're still separate data types.
22:44:21 <oklopol> python has auto-bignum
22:44:32 <oklopol> you don't see the data-types really
22:44:40 <oklopol> well, rarely
22:44:41 <SevenInchBread> floating point.
22:44:56 <SevenInchBread> with true division being implemented though... it's getting close to that.
22:45:03 <oklopol> well
22:45:14 <SevenInchBread> but... there's still distinguishments in the type hierarchy... which is what I was talking about removing.
22:45:31 <SevenInchBread> the data would be represented internally in multiple ways... but abstractly it's just a "number".
22:45:32 <oklopol> you wanna get floating points perfect, you make a lazy system that NEVER calculates a function unless for output
22:45:45 <oklopol> and still maintains the actualy functional representation
22:46:08 <oklopol> and makes it nicer when it finds rules like + - x 1 1 = x etc
22:47:14 <oklopol> *actual
22:47:21 <oklopol> why the y?!?
22:47:26 <SevenInchBread> maybe a rational data type... but that's mainly only useful for algebraic solver applications.
22:47:51 <oklopol> i thought about making this math lang
22:48:10 <oklopol> since i could easily do better than matlab with basic mathematics
22:48:20 <oklopol> not the neural networks etc of course :P
22:48:32 <SevenInchBread> I like how math can be implemented without using special syntax...
22:48:59 <SevenInchBread> the only difference is that there are no precedence rules... which is fine... it's easier to remove "method calls go left to right"
22:49:11 <SevenInchBread> remove = remember
22:49:48 <oklopol> what do you mean?
22:50:08 <SevenInchBread> 2 + 2 isn't special syntax in the language I'm thinking of.
22:50:52 <oklopol> what's special syntax?
22:51:10 <SevenInchBread> well like... special rules
22:51:13 <SevenInchBread> for mathematical operators.
22:51:16 <SevenInchBread> aren't necessary.
22:51:27 <oklopol> like 5(4 + 5 )
22:51:29 <oklopol> -...
22:51:32 <oklopol> like 5(4 + 5 * 2)
22:51:34 <SevenInchBread> it just fits into the existing syntax
22:51:39 <SevenInchBread> er... well that won't work.
22:51:48 <oklopol> which is 5 * (4 + (5 * 2))
22:51:50 <SevenInchBread> I mean... basic (non-implicit) rules.
22:51:58 <oklopol> hmm
22:51:59 <oklopol> ?
22:52:18 <SevenInchBread> 5 x (4 + (5 x 2))
22:52:32 <oklopol> x is better than * ?
22:52:38 <SevenInchBread> the operators don't need special syntax... it's not exactly like math.
22:52:44 <SevenInchBread> well... I've always liked it...
22:53:00 <SevenInchBread> over *... but they can both be included and mean the same thing.
22:53:49 <oklopol> well, if you have vectors, you can have '*', '.' and 'x' be different multiplications :)
22:54:06 <SevenInchBread> on vector objects. ;)
22:54:20 <SevenInchBread> see... that's the thing... all the objects define what all the operators mean
22:54:36 <oklopol> yeah, operator overloading
22:54:43 <SevenInchBread> not even that.
22:54:51 <SevenInchBread> the operators are just... defined on the objects anyways.
22:54:54 <SevenInchBread> there's nothing to overload.
22:55:00 <oklopol> mmmmmkay
22:55:00 <oklopol> .
22:55:12 <oklopol> you make a new datatype, it has everything already?
22:55:34 <SevenInchBread> depends on where you copied from... remember there aren't really any "typeS" here... just objects.
22:56:19 <oklopol> hmm.. i still don't see where exactly you tell the computer what the multiplications mean...
22:56:26 <SevenInchBread> in 5 * 5 * is the name of a method on 5
22:56:29 <oklopol> unles you... tell it
22:56:33 <oklopol> yeah
22:56:35 <oklopol> *unless
22:56:51 <oklopol> i'm pretty sure there's something wrong with my s
22:57:09 <SevenInchBread> it'll be builtin code defining what multiplication does... but it can be overriden...
22:57:30 <SevenInchBread> it doesn't matter -how- the method is defined... simply that it is associated with the right name.
22:58:06 <oklopol> mm kay
22:58:08 <oklopol> ..
22:58:37 <SevenInchBread> if you wanted to... you could do something like
22:58:43 <SevenInchBread> True becomes False
22:59:03 <SevenInchBread> thus making all references to the True object now point to False instead.
22:59:24 <oklopol> yeah, you told that before
22:59:37 <oklopol> that's fun for esoteric purposes
22:59:43 <SevenInchBread> eh... well... boleans are kind of singletonish anyways... so `True becomes False would have much of the same effect.
23:00:10 <oklopol> but you should never have ANYTHING have any side-effect upwards without declaring it clearly in an upper lever
23:00:13 <SevenInchBread> except other symbols point to True would still be pointing to True.
23:00:36 <SevenInchBread> hmmm?
23:00:59 <SevenInchBread> nope... no restrictions.
23:01:00 <oklopol> i have a thing called infinite nesting theory
23:01:02 <oklopol> but
23:01:11 <oklopol> i'm not going to try and explain here
23:01:26 <SevenInchBread> restricting possibilities just because someone might use them stupidly is a bad idea.
23:01:27 <oklopol> hmm
23:01:48 <oklopol> in most cases, yes
23:01:51 <SevenInchBread> The Python developers do that a lot... much to my chagrin
23:02:06 <SevenInchBread> make evyerthing child proof.
23:02:47 <oklopol> yeah... it kind of takes the point of wanting things high-level if you can do low-level fuck-ups :P
23:05:33 <SevenInchBread> + - x * ^ / mod = != base inc dec !
23:05:41 <oklopol> that's exactly why c++ will become one of the slowest languages in the future, computers can do th simple mathematical algorithm reductions better than humans... actually, i realize this is basic and there's no need in explaining it :D
23:05:49 <oklopol> *the
23:06:04 <oklopol> inc and dec? :P
23:06:20 <SevenInchBread> ++ and -- are too Cish for my tastes
23:06:29 <SevenInchBread> how about... up and down?
23:06:56 <oklopol> no, reserve that for your two-dimension pointer needs
23:07:19 <SevenInchBread> these are just integer methods.
23:07:25 <SevenInchBread> anything can redefine any of those.
23:07:36 <oklopol> yeah yeah, i wasn't serious.
23:07:45 <oklopol> base?
23:07:47 <SevenInchBread> ....what is a 2d pointer?
23:07:55 <SevenInchBread> yeah... log wouldn't make any sense.
23:08:00 <oklopol> you don't wanna know what i meant
23:08:20 <oklopol> base is for what?
23:08:25 <SevenInchBread> log
23:08:30 <oklopol> but why?
23:08:36 <SevenInchBread> 10 base 2 would be log 10 base 2
23:08:52 <SevenInchBread> because everything is inherently infix notation?
23:09:07 <SevenInchBread> 10 log 2 wouldn't make any sense
23:10:02 <oklopol> 10 base 2 would be [1,0,1,0] if you ask me
23:10:04 <oklopol> :)
23:10:12 <oklopol> K has that for example
23:10:14 <SevenInchBread> yeah...
23:10:18 <oklopol> it's called base there
23:10:21 <oklopol> or __base
23:10:55 <SevenInchBread> I want to use like... base 50 represented by sequences of base 5
23:10:56 <oklopol> K has everything
23:11:13 <oklopol> ?
23:12:39 <SevenInchBread> eh... difference bases will simply different objects.
23:13:07 <oklopol> try once more please :)
23:13:19 <SevenInchBread> different bases will simply be represented by different objects.
23:13:43 <oklopol> mmm okay, what did "base 50 represented by sequences of base 5"
23:13:45 <oklopol> mean?
23:13:53 <SevenInchBread> not sure.
23:13:59 <oklopol> :D
23:14:06 <SevenInchBread> it's possible to do freaky mixes of bases though
23:14:29 <oklopol> i hope you don't see a connection between the numbers 50 and 5
23:14:49 <SevenInchBread> 5 and 55?
23:14:57 * SevenInchBread wants to adhere to the law of fives.
23:15:02 <oklopol> not that much either
23:15:20 <oklopol> 11 only has special properties in 10-base
23:15:23 <oklopol> and i hate it
23:15:30 <oklopol> that's the reason for all the hoping
23:15:37 <oklopol> hopedy-pop
23:15:38 <oklopol> i should sleep
23:16:21 <SevenInchBread> oh oh
23:16:27 <SevenInchBread> balanced 5-base
23:16:39 <SevenInchBread> represented by -2,-1,0,1,2
23:16:42 <SevenInchBread> beautiful no?
23:16:50 <oklopol> sure :P
23:20:30 <SevenInchBread> phinary?
23:20:45 <SevenInchBread> http://en.wikipedia.org/wiki/Golden_ratio_base
23:21:50 -!- oerjan has joined.
23:22:45 <SevenInchBread> oh oh oh
23:22:47 <SevenInchBread> unary base
23:22:54 <SevenInchBread> 11111 11
23:22:56 <SevenInchBread> would be seven
23:23:12 <oklopol> yeah
23:23:17 <oerjan> hm... or it could be a list [5,2]
23:23:39 <oklopol> oerjan i got the thue working :P
23:23:47 <oerjan> great :)
23:23:49 * SevenInchBread likes the idea of a base based off of the golden ratio... but not as confusing as using the actual irrational number.
23:23:53 <SevenInchBread> maybe 5 and 3.
23:24:17 <oerjan> SevenInchBread: Have you heard of the Fibonacci base?
23:24:37 * SevenInchBread just now landed on the Wikipedai article
23:24:54 <oklopol> link
23:25:42 <oerjan> I think he means http://en.wikipedia.org/wiki/Fibonacci_coding
23:25:53 <SevenInchBread> yeah
23:27:23 <SevenInchBread> hmm... maybe a mixed radix notation that alternates between 3-base and 5-base
23:27:30 <SevenInchBread> both balances
23:27:49 <SevenInchBread> -2,-1,-0,1,2 and -1,0,1
23:28:37 <oerjan> alternating means essentially using 15-base, I think
23:29:13 <oerjan> unless you use a weird alternating scheme - like one based on Fibonacci numbers :)
23:29:40 <SevenInchBread> mixed-radix
23:32:12 <oklopol> http://en.wikipedia.org/wiki/Zeckendorf%27s_theorem
23:32:17 <oklopol> rofl
23:32:37 <oerjan> i understand that. but if the mix is strictly alternating, it will be just base 15.
23:32:38 <oklopol> ai auto-proved that in a second when i heard fibonacci base
23:32:51 <oklopol> *I
23:32:53 <oklopol> ai :P
23:33:12 <SevenInchBread> hmmm
23:33:29 <oerjan> I had this urge to reedit that article to say "slightly" before the "more difficult"
23:33:32 <SevenInchBread> heh.... base 0.1 is pretty cool... it's base-10 backwards.
23:33:35 <oklopol> well, for any alternation n1, n2, ... nN it will essentially be || nX base
23:33:58 <oklopol> where || is sigma for multiplication...
23:34:03 <oklopol> where sigma is sum
23:34:09 <oklopol> i'm not good with terms :)
23:34:13 <oerjan> you mean Pi
23:34:19 <oklopol> maybe.
23:34:28 <oerjan> no, certainly :)
23:34:33 <oklopol> multiplication of a list...
23:34:52 <oklopol> sum has the E thing, multiplication a || thin with a lin on top
23:34:54 <oklopol> or smth
23:35:12 <oklopol> list.. math doesn't call them lists
23:35:23 <oerjan> like, the minutes/seconds notation is essentially itself mixing base 6 and 10 to make 60...
23:35:33 <oerjan> sequence.
23:35:51 <oklopol> really?
23:35:52 <oklopol> :o
23:35:52 <SevenInchBread> right... but you right it differently.
23:36:05 <oerjan> huh?
23:36:07 <SevenInchBread> it's essentially base 15... but you get to write it in a confusing manner.
23:36:10 <SevenInchBread> :)
23:36:11 <oklopol> i don't see 6 anywhere :\
23:36:18 <oklopol> in the clock
23:36:22 <oerjan> they are capital greek Sigma and Pi.
23:36:30 <oklopol> prolly
23:36:42 <oklopol> looks like capital pi, didn't know it was though
23:36:51 <oklopol> and i don't have the letter on this keyboard
23:36:53 <oklopol> :)
23:36:53 <oerjan> in 3:10:15, the digits after the colons can only be 0-5
23:37:08 <oklopol> ah
23:37:10 <oklopol> okay
23:37:13 <oklopol> indeed
23:37:44 <oklopol> i just think it's 60-base but there is no way to print 60-base so it's represented as 10-base
23:38:17 <oerjan> that may be true but I think the ancient babylonians wrote their base 60 in two parts as well
23:38:31 <oklopol> oh
23:38:31 <oerjan> otherwise, just too many digits
23:38:36 <oklopol> hmm
23:38:39 <oklopol> maybe
23:38:42 <oerjan> i'm not completely sure of it.
23:38:42 <oklopol> why 60 then?
23:38:44 <oklopol> :\
23:38:48 <oklopol> fractions maybe
23:39:14 <oklopol> they invented fractions actually i think... i think i read about this exact thing somewhere
23:39:26 <oerjan> the length of the year is close to 360 days.
23:39:26 <oklopol> a million years ago
23:39:53 <oklopol> yeah... 6 * 60, plus 10 for the history of finger calculation
23:39:57 <oerjan> actually fractions are frequently base 60 because the babylonians invented them, and had a base 60 system
23:40:19 <oklopol> 60 factorizes nicely
23:40:19 <oerjan> i vaguely recall it merging from a base 6 and base 10 system.
23:40:29 <oklopol> yeah, would make sence
23:41:09 <SevenInchBread> it was base 60... but the didn;t represent it with 60 individual symbols
23:43:47 <oerjan> heh, the mixed base article says the Mayans used 20 except for second place, where they used 18
23:43:56 <oklopol> :D
23:43:59 <oerjan> because 18*20 = 360
23:44:16 <oklopol> i read martians first
23:44:26 <oklopol> hmm
23:44:34 <oklopol> 20,18,20,20...
23:44:35 <oklopol> ?
23:44:46 <oklopol> the other way around of course
23:44:47 <oerjan> why, they would use base 14 of course, having that many digits...
23:44:58 <oklopol> :D
23:45:52 <SevenInchBread> I bet base-10 would have made no sense
23:46:36 <oklopol> i wish my parent would've taught me hex only :\
23:46:44 <oerjan> btw: (S)igma for (S)um, (P)i for (P)roduct.
23:46:53 <oklopol> oh
23:47:01 <oklopol> indeed
23:48:49 <SevenInchBread> hmmm... base-11 is cool.
23:49:01 <oklopol> why?
23:49:12 <SevenInchBread> It's like base-10... except there's a tiny offset as you go up.
23:49:20 <oerjan> and that part i said about using a weird mixing, i meant using what is called Fibonacci substitution.
23:49:23 <SevenInchBread> ...it's easier to think in. :P
23:49:56 <oklopol> fibonacci substitution?
23:50:42 <oerjan> 0 -> 01, 1 -> 0, repeat indefinitely to form infinite sequences.
23:51:33 <oerjan> Then use such a sequence to decide which base to use at which position.
23:53:45 <oerjan> In Haskell: fibseq = '0' : concatMap s fibseq; s '0' = "01"; s '1' = "0"
23:54:36 <oerjan> eh, wait
23:55:30 <oerjan> Make that fibseq = '0' : tail (concatMap s fibseq) where s '0' = "01"; s '1' = "0"
23:57:43 <SevenInchBread> OH
23:57:50 <SevenInchBread> base-7... with musical notes
23:58:00 <oklopol> nah
23:58:08 <oklopol> 7 makes no sence
23:58:19 <oerjan> The first 50 digits: 01001010010010100101001001010010010100101001001010
23:59:05 <oerjan> with half-notes you need base 12, plus notation for octave
←2007-02-17 2007-02-18 2007-02-19→ ↑2007 ↑all