←2009-11-30 2009-12-01 2009-12-02→ ↑2009 ↑all
00:12:06 -!- ais523 has quit (Remote closed the connection).
00:31:22 -!- adam_d has quit ("Leaving").
02:17:09 -!- SimonRC has quit (Read error: 60 (Operation timed out)).
02:17:36 -!- SimonRC has joined.
03:33:48 -!- augur has quit (Connection timed out).
04:11:23 -!- Gregor has joined.
04:13:25 -!- Pthing has quit (Remote closed the connection).
04:45:40 -!- quantumEd has quit ("Leaving").
04:54:24 -!- oerjan has joined.
04:57:34 -!- olsner has quit (Read error: 60 (Operation timed out)).
04:59:15 -!- olsner has joined.
05:24:14 <oklofok> okokokokokokokokokokokokokokokokoko
05:24:16 <oklofok> okokokokokokokoko
05:24:23 <oklofok> okokokokokokokokoko
05:24:35 <oerjan> okokokokokokoko
05:24:48 <oklofok> good evening mister
05:24:54 <oerjan> good morning
05:25:13 <oerjan> it's december already!
05:25:25 <coppro> weeew!
05:25:35 <oklofok> holy fucking shit!
05:25:37 <coppro> CRIIIIMBO
05:25:40 <oerjan> well in some time zones
05:25:48 <oklofok> in this time zone
05:26:44 <oklofok> i wish i could sleep more
05:27:09 <oerjan> time for dyslexics to start ruing the coming of satan
05:27:49 <oerjan> wait rue is the wrong word
05:28:44 <oklofok> it seems like it could be slightly wrong.
05:29:31 <oerjan> false friend with norwegian "grue", i say
05:30:26 <coppro> the only important timezone is whenever rollover ends
05:30:29 <coppro> which, fortunately, was already
05:30:40 <oerjan> hm wait english has grue too, and it fits better
05:30:50 <oerjan> rollover?
05:31:24 <oklofok> well you know where it happens last
05:31:26 <oerjan> i sincerely doubt the east pacific has changed yet
05:31:45 <coppro> oerjan: KoL
05:31:53 <oerjan> huh?
05:32:01 <oerjan> SPEAK ENGLISH YOU INFIDEL
05:32:10 <coppro> Kingdom of Loathing
05:32:15 <Gregor> coppro: What's your MOXIE?
05:32:21 <oerjan> ah?
05:32:32 <coppro> 337 buffed, 262 unbuffed!
05:33:02 <oklofok> BYE ALL OF YOU, SEE YOU IN HELL
05:33:06 <oklofok> ~>
05:34:14 <coppro> December means Crimbo (and Hanukkimbo...) in KoL, which means YAY
05:35:37 <oerjan> aha
05:45:11 -!- oerjan has quit ("leaving").
06:49:24 -!- Asztal has quit (Read error: 110 (Connection timed out)).
07:31:16 -!- augur has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:28:48 -!- Slereah_ has joined.
08:39:18 -!- Slereah has quit (Read error: 110 (Connection timed out)).
08:53:11 -!- dbc has quit (Remote closed the connection).
09:01:55 -!- dbc has joined.
09:58:41 -!- Asztal has joined.
10:23:35 -!- BeholdMyGlory has joined.
11:30:11 -!- sebbu has joined.
11:41:12 -!- sebbu2 has quit (Read error: 110 (Connection timed out)).
12:06:12 -!- BeholdMyGlory has quit (Remote closed the connection).
14:01:59 -!- BeholdMyGlory has joined.
14:17:15 -!- augur has quit (Read error: 110 (Connection timed out)).
14:19:42 -!- MigoMipo has joined.
14:23:18 -!- oerjan has joined.
14:32:59 -!- augur has joined.
14:33:04 -!- kar8nga has joined.
14:44:34 -!- quantumEd has joined.
15:05:25 -!- quantumEd has quit ("Leaving").
15:48:53 -!- coppro has quit (Read error: 110 (Connection timed out)).
15:56:37 -!- ais523 has joined.
16:01:01 -!- antoine has joined.
16:02:17 -!- antoine has quit (Client Quit).
16:03:09 -!- quantumEd has joined.
16:15:47 <AnMaster> oerjan, iwc
16:16:31 -!- Pthing has joined.
16:17:25 <oerjan> indeed
16:17:30 <oerjan> also, happy birthday
16:17:41 <oklofok> happy birthdays all around!
16:17:49 <AnMaster> thanks
16:18:01 <oklofok> but i suppose to AnMaster most of all.
16:18:21 <augur> oklofok :o
16:18:48 <AnMaster> oerjan, what is P(someone else having bday on 1 December in this channel)?
16:19:42 <oklofok> 1-(364/365)^n
16:19:49 <augur> anmaster, we know how to calculate this stuff. dont be silly.
16:20:01 <oklofok> 11%
16:20:10 <AnMaster> augur, I didn't claim you didn't
16:20:47 <oklofok> i assumed he just wanted someone to tell him the prob
16:20:59 <AnMaster> oklofok, would this be affected if we knew that some of the remaining ones didn't? And what if you were allowed to switch door then?
16:21:05 <AnMaster> </silly>
16:24:31 <oklofok> anyway we have the random variables X_i for each dude on the chan except you, 1 for having a birthday, P(\exists i: X_i > 0) = 1 - P(X_1 == 0 and ... and X_n == 0) = 1 - P(X_1 == 0)P(X_2 == 0)...P(X_n == 0) = what i said, because these are clearly independent
16:25:00 <oklofok> X_i's are bernoulli distributed with probability 1/365
16:25:36 <oklofok> or you could think of it as a binomial distribution, but i prefer this way
16:27:35 <oklofok> (where independence is to justify equality number 2)
16:28:00 <AnMaster> oklofok, what about leap years?
16:28:09 <AnMaster> (how does that work with bdays anyway?
16:28:11 <AnMaster> )
16:28:39 <oklofok> most leap people have their birthdays on feb 28th
16:28:44 <oklofok> afaiu
16:28:50 <AnMaster> ah
16:28:59 <oklofok> or 1st march
16:29:03 -!- BeholdMyGlory has quit (Remote closed the connection).
16:29:07 <AnMaster> I see
16:29:46 <AnMaster> oklofok, how would this be handled if humanity started to colonise other planets? With possibly different lengths of day and year.
16:29:59 <oklofok> but yes, i didn't account for that, it introduces less error than the fact people reproduce different amounts at different months
16:30:06 <AnMaster> what about 1.5 year per *day* for example?
16:30:30 <AnMaster> birthyear instead of birthday then?
16:30:47 <oklofok> birth unix timestamp
16:30:54 <AnMaster> ooh good idea
16:31:16 <AnMaster> oklofok, but how often would that repeat? I mean, every 10000 or such?
16:31:36 <AnMaster> no that would be too often
16:32:03 <oklofok> birthday every 3 hours does sound intriguing
16:32:07 <AnMaster> not accounting for leap years or leap seconds an earth-year would be roughly 31536000 seconds
16:33:21 <AnMaster> so to round it, what about every 32000000 second?
16:33:24 <AnMaster> or maybe 31
16:33:31 <AnMaster> (plus those zeros)
16:34:07 -!- BeholdMyGlory has joined.
16:34:42 <oklofok> 33554432 is close
16:34:56 <oklofok> 2**25
16:34:59 * AnMaster notes that writing (* 365 24 60 60) is much more compact than 365 * 24 * 60 * 60 (and skipping those spaces is ugly)
16:35:09 <AnMaster> oklofok, oh good point
16:47:13 <ais523> (365 24 60 60)'*t
16:47:32 <ais523> wait, I can shorten that
16:47:41 <ais523> (365 24 60:)'t
16:48:19 <oklofok> */365 60 60 24
16:48:25 <oklofok> (j)
16:49:15 <ais523> woah, J and Underlambda come to the same length for that?
16:49:37 <ais523> I'd expect Underlambda to be about twice as verbose on average
16:49:47 <ais523> which, considering I'm comparing it to J here, is pretty good
16:49:56 <quantumEd> that's crazy
16:50:28 <ais523> I need to get back to working on it sometime, I don't think any of the half-finished interps implement t yet
16:50:39 <ais523> but it's basically fold
16:50:55 <ais523> (map is rather harder to implement, but that's planned to be part of the lang eventually)
16:52:28 * pikhq notes that having constant arity functions is significantly easier to parse
16:52:54 <ais523> t is constant arity in Underlambda
16:53:02 <ais523> it has arity 2, a function and a list
16:53:29 <ais523> it's defined even if the function doesn't take two arguments, but I suspect taking two arguments will be the usual use-case as it makes it act like fold
16:53:39 <ais523> (that is, two arguments, one return)
16:53:44 <ais523> ooh
16:53:48 <ais523> car is '!t
16:53:48 <pikhq> (* 365 24 60 60)? Bah. That's silliness. 365 24*60*60*
16:54:02 <ais523> pikhq: that's silliness as it doesn't generalise well
16:54:16 <pikhq> ais523: Kinda joking there.
16:54:21 <ais523> 365 24*60*60* is correct Underlambda too, though
16:54:24 <ais523> given that it's an RPN language
16:54:31 <pikhq> I prefer 365*24*60*60, generally.
16:54:57 <pikhq> Unless, of course, I'm trying to just operate a calculator.
16:55:07 <oklofok> yes, what if the division of a year into pieces changed! dangerous mixing data and control
16:55:12 <pikhq> RPN, IMO, is very much write-only.
16:55:35 <oklofok> thank god ehird isn't here
16:56:08 <ais523> oklofok: why?
16:56:16 <ais523> (and you know he logreads, right?)
16:56:41 <oklofok> iirc he likes factor
16:56:49 <ais523> also, some calendars, like the Aztec calendar, you need both addition and multiplication to calculate the length of a year
16:57:04 <oklofok> and yes, i know he logreads
16:57:36 <oklofok> "oklofok: thank god ehird isn't here" was targeted to logreading ehird most of all
16:58:01 <ais523> grr, I should work on Unlambda some time but I have so much else to do right now
16:58:08 <ais523> *Underlambda
16:58:10 <oklofok> unlambda?
16:58:12 <oklofok> haha :D
16:58:14 <ais523> well, Unlambda too
16:58:25 <ais523> I want to write a compiler from Unlambda into Underlambda
16:58:28 <ais523> I used to have one, but deleted it by mistake
16:58:31 <ais523> months ago
16:58:59 <oklofok> did you specifically optimize underlambda and underload for easy mixing-up with unlambda
16:59:18 <ais523> underlambda was specifically optimised for that, underload's etymology is unrelated
16:59:35 <ais523> but underlambda is a logical enough name for a purely functional underload
16:59:44 <oklofok> underload is the one i've been confusing all my life
17:00:26 <ais523> interesting
17:00:33 <ais523> it was originally a tarpit version of overload
17:00:54 <ais523> and overload is pretty much abandoned now because underlambda does much the same thing but is more elegant
17:02:30 -!- asiekierka has joined.
17:02:31 <asiekierka> NO
17:02:32 <asiekierka> no
17:02:38 <asiekierka> NOT MY PRECIOUS SOLDERS
17:02:43 <asiekierka> I PAID A LOT FOR THM AND THEY DIED
17:03:07 <ais523> asiekierka: stop derailing the conversation, it was actually ontopic for once
17:03:10 <oklofok> that's wr for you.
17:03:28 <asiekierka> i love derailing conversations tho
17:03:36 <asiekierka> well
17:03:38 <asiekierka> what was it about
17:03:43 <ais523> anyway, I'm kind of worried
17:03:48 <ais523> there was a weird whirring sound for a while
17:03:52 <ais523> then a bang above me
17:03:56 <ais523> now there's the smell of burnt silicon
17:04:01 <oklofok> :D
17:04:03 <quantumEd> did your brain overheard
17:04:13 <ais523> no, I think it was the flourescent lights here
17:04:18 <ais523> I turned it off, anyway
17:04:19 <ais523> just in case
17:04:23 -!- calamari has joined.
17:04:36 <oklofok> overheard :P so now we're confusing overload and overheard too!
17:04:48 <ais523> and overheating
17:04:48 <oklofok> what's with these over-/under- terms
17:04:57 <quantumEd> underhead
17:05:05 <oklofok> well i'm not sure that works because it's not a name of a language of yours
17:05:23 <ais523> !ul (/)(~:S(*)*~):^
17:05:30 <ais523> ^ul (/)(~:S(*)*~):^
17:05:30 <fungot> /
17:05:33 <ais523> umm
17:05:36 <ais523> ^ul (/)(~:S(*)*~^):^
17:05:36 <fungot> / ...out of stack!
17:05:40 <ais523> again umm
17:05:48 <ais523> ^ul (/)(~:S(*)*~:^):^
17:05:48 <fungot> //*/**/***/****/*****/******/*******/********/*********/**********/***********/************/*************/**************/***************/****************/*****************/******************/*******************/********************/*********************/**********************/***********************/*********************** ...too much output!
17:05:49 <oklofok> so umm ~ was... pop?
17:05:52 <ais523> that's better
17:05:57 <ais523> ~ is swap
17:05:59 <oklofok> nono swap right
17:06:01 <oklofok> yeah
17:06:10 <ais523> gah, I've forgotten how to do loops properly
17:06:15 <ais523> or rather, failed to generalise
17:06:22 <ais523> my brain still had (:^):^ as the basic infinite loop
17:06:33 <ais523> but forgot to add one of the :^s when it came to writing a larger one
17:06:39 <oklofok> cool, i can actually still read taht
17:06:41 <oklofok> *that
17:06:50 <oklofok> take that, pikhq's wild theories about rpn!
17:06:59 <ais523> what are they? that it's unreadable?
17:07:11 <oklofok> "pikhq: RPN, IMO, is very much write-only."
17:07:13 <ais523> I find RPN natural for certain types of statements
17:07:32 <ais523> e.g. Mathematica would be a lot more readable if it was all postfix, rather than a mix of postfix, prefix, and infix
17:09:16 <oklofok> it's kinda annoying math notation is 2d, i don't know how to memorize treeform data
17:09:29 <quantumEd> treeform??
17:09:47 <oklofok> one of my dreamlets is to memorize "schaum's handbook of mathematical formulas and stuff"
17:09:50 <ais523> (((a b) (c d)) ((e f) (g h)))
17:09:54 <oklofok> err yes treeform
17:10:24 <quantumEd> what's in that book?
17:10:29 <oklofok> formulas and stuff
17:10:30 <oklofok> mostly
17:10:34 <quantumEd> ??
17:10:37 <quantumEd> what like y = sin x
17:10:58 <oklofok> yeah stuff like sin^2 x + cos^2 x = 1
17:11:07 <quantumEd> that's pythagoras theorem
17:11:40 <quantumEd> anyway you can prove everything like that in trigology by converting it to a complex rational polynomial (which has decidible equality)
17:11:46 <quantumEd> all these equations are trivial
17:11:49 <oklofok> well there's the slight difference that pythagora's theorem is just an observation about the physical world, that's a consequence of the definitions of sin and cos
17:12:24 <oklofok> well i'm not saying i just want to memorize the trivial ones
17:12:29 <quantumEd> you think triangles only work because of complex transcendental functions?
17:12:37 <ais523> quantumEd: *trigonometry?
17:12:42 <ais523> I've never heard "trigology" used before
17:12:48 <oklofok> quantumEd: you can define distance in other ways.
17:12:50 <quantumEd> ais523: yeah stuff like sin and cosine
17:13:07 <ais523> ugh, bad flashbacks
17:13:20 <oklofok> pythagorean theorem says if you define distance as sqrt(x^2 + y^2), then distance is sqrt(x^2 + y^2)
17:13:22 <ais523> one of the weirdest experiences in my life was walking into a room during Maths camp
17:13:32 <ais523> and seeing three people playing three-player table tennis while chanting trig identities
17:13:54 <ais523> admittedly, it would have been weirder still /outside/ maths camp
17:13:58 <ais523> but it was pretty jarring even then
17:14:36 <oklofok> anyway even if you're correct, and all trigonometric identities in formula books are in fact trivial to prove in your head and directly see the applications of, there's still the integration formulas, and constants.
17:15:21 <ais523> oklofok: learn Tschebychev's inequality
17:15:31 <ais523> apparently it implies most of the other interesting inequalities, but is a pain to memorise
17:18:54 <quantumEd> oklofok bull shit!!!!!
17:19:41 <quantumEd> don't make math too formal it takes the soul out of it
17:19:49 <quantumEd> pythagoras isn't about square roots
17:21:31 <oklofok> then what's it about
17:21:58 <quantumEd> right angle triangle
17:21:59 <oklofok> you have to define distance before you can prove the pythagorean theorem gives you that
17:22:07 <quantumEd> no you don't
17:22:35 <oklofok> alrighty. i'm not following you
17:23:48 <quantumEd> nobody defines distance = sqrt(x^2 + y^2) THEN learns pythoagoras theorem
17:24:23 <quantumEd> distance = sqrt(x^2 + y^2) is because pythagoras theorem is _true_
17:24:49 <oklofok> yes. it's true with the metric defined with sqrt(x^2 + y^2)
17:25:07 <oklofok> R can have other metrics
17:25:30 <quantumEd> what are you saying, non-euclidean geometry?
17:26:40 <oklofok> i don't know which metrics give non-euclidean and which give euclidean geometries
17:27:34 <quantumEd> oklofok just look at this picture, http://thinkzone.wlonk.com/MathGems/pics/pythagorean_theorem.gif -- this proves pythagoras without any "R" or "metric" or analytic geometry
17:27:57 <oklofok> i mean the pythagorean theorem is a model that's nice for doing basic physics
17:28:00 <ais523> the original proof of Pythagoras' theorem was entirely geometrical, IIRC
17:28:19 <quantumEd> well basic physics is a different matter
17:28:21 <oklofok> the prof can only be geometrical
17:28:24 <oklofok> *proof
17:28:48 <oklofok> there can be no proof that isn't purely geometrical, because there is no inherent metric for the reals, you have to define one.
17:28:51 <quantumEd> you have given a non geometrical proof -_-
17:29:07 <oklofok> where did i give one?
17:29:15 <quantumEd> you said distance = distance because it is
17:30:16 <oklofok> well right, that's the usual definition of distance in R^2, i guess definitions prove themselves
17:30:46 <oklofok> http://thinkzone.wlonk.com/MathGems/pics/pythagorean_theorem.gif <<< this is meaningless
17:31:15 <quantumEd> no it's got meaning, the meaning is what proves pythagoras theorem
17:31:22 <ais523> oklofok: I mean, not only purely geometrical, but without an attempt to translate it into mathematical language
17:31:26 <oklofok> well it's a nice experiment in kindergarden physics
17:31:36 <ais523> that image is a nice proof, though
17:31:39 <quantumEd> how does physics have anything to do with it?
17:31:40 <oklofok> but it's just a physics experiment
17:31:42 <quantumEd> I don't see any relation
17:31:47 <ais523> the whole point is that d^2 = x^2 + y^2
17:32:03 <oklofok> you're proving the paper behaves according to the definition of distance on R^2
17:32:20 <ais523> and it proves that by showing that x^2 + y^2 + 4 copies of the original triangle's area = d^2 + 4 copies of the original triangle's area
17:32:29 <quantumEd> the picture of a triangle is not important, the _Perfect_ triangle which it denotes is what you must consider
17:32:35 <oklofok> if you were traveling near speed of light, that proof wouldn't apply anymore
17:32:38 <ais523> you can express Pythagoras' theorem in terms of areas rather than distances
17:32:46 <oklofok> well, no not really
17:32:52 <ais523> oklofok: it was originally
17:33:05 <ais523> arguably, the corollary to distances is a different theorem
17:33:05 <oklofok> but with papers and you traveling all around at different speeds, i'm sure it could bend a bit
17:34:08 <oklofok> ais523: to verify areas of things have to do with multiplication is another fun kindergarden physics experiment :P
17:34:30 <quantumEd> I don't think any of this is
17:34:31 <quantumEd> kindergarden physics
17:34:36 <quantumEd> I would say it is: Mathematics
17:34:41 <oklofok> it is not: mathematics
17:34:46 <oklofok> it has nothing to do with: mathematics
17:35:01 <quantumEd> maybe to you mathematics is deduction trees which a computer can say "VALID" or "INVALID"
17:35:06 <ais523> one of my favourite proofs is the one I came up with myself that 1^3 + 2^3 + 3^3 + ... + n^3 = (1 + 2 + 3 + ... + n)^2
17:35:26 <ais523> also, I like the combinatorial proof of Fermat's Little Theorem, although it isn't mine
17:35:32 <oklofok> mathematics is taking objects that behave in a certain way, and proving that implies them behaving in some other way as well
17:35:35 <quantumEd> ais523 how did you prove that?
17:36:10 <ais523> ok, consider a "times table" (a table where the element at (i,j) is i*j)
17:36:31 <ais523> if you multiply out the RHS of that expression, you get the sum of all elements in a times tabnle
17:36:34 <ais523> *times table
17:36:50 <ais523> now, you divide the times table into areas based on the highest coordinate
17:36:57 <ais523> i.e. (1,1) has highest coordinate 1
17:37:07 <ais523> (1,2), (2,2), (2,1) have highest coordinate 2
17:37:08 <ais523> and so on
17:37:30 <ais523> up to (1,n), (2,n), (3,n), ... (n,n), ... (n,3), (n,2), (n,1) with highest coordinate n
17:37:42 <ais523> say if you take all the values with highest coordinate i
17:37:43 <oklofok> yeah
17:37:50 <oklofok> the rest is just algebra
17:37:53 <oklofok> nice
17:37:53 <ais523> then you get i*(1+2+3+...+i+...+3+2+1)
17:37:59 <ais523> which is i^3
17:38:39 <oklofok> that's a mathematical proof, you define numbers that behave in a certain way, and a few operations on them, then you prove those operations mix in an interesting way
17:38:49 <quantumEd> that's cool ais523
17:39:24 -!- kar8nga has quit (Remote closed the connection).
17:39:46 <ais523> as for the proof of Fermat's Little Theorem (which isn't mine, but is just as cool): we're trying to prove that (a^p) % p = a % p
17:39:59 <ais523> or in other words, p divides (a^p-a)
17:40:16 <ais523> now, suppose you have p objects arranged in a circle, each of which can be any of a colours
17:40:19 <oklofok> the nicest proof for that is a corollary from group theory, but go on
17:40:41 <oklofok> you might change my mind
17:40:48 <quantumEd> interruptingfok
17:40:49 <ais523> if you rotate the circle, you need to rotate it an entire revolution to get back to the original arrangement of colours, unless all the objects are the same colour
17:41:03 <ais523> because there's a prime number of colours, so there's no other way to get a repeating pattern around the circle
17:41:12 <ais523> so there are a^p-a arrangements that aren't a solid colour
17:41:50 <ais523> and because you can't get the same arrangement twice as you rotate any of them, the total number must therefore be divisible by p
17:42:01 <ais523> (because p is the number of positions you can rotate to)
17:42:25 <oklofok> ah
17:42:30 <oklofok> that's actually the corollary in disguise :)
17:42:36 <ais523> heh, same proof?
17:42:38 <ais523> it's a very neat one, anyway
17:42:40 <oklofok> well i think so
17:42:55 <ais523> this is nice, it means we don't have to debate about which is better
17:43:04 <oklofok> the idea in group theory is if you have some group, and a subgroup of its, then the size of the subgroup divides the parent groups size
17:43:06 <oklofok> *group's
17:43:21 <oklofok> let's see...
17:43:22 <ais523> yep, same proof I think
17:43:27 <oklofok> one of those arrangements
17:43:34 <oklofok> err
17:43:38 <oklofok> i need to think :P
17:44:42 <oklofok> okay i'll leave making this precise to oerjan
17:44:46 <quantumEd> I don't see that one ais523
17:45:00 <quantumEd> how does "the total number must therefore be divisible by p" follow?
17:45:18 <oklofok> quantumEd: you have a partition of a^p-a into equivalence classes of size p
17:45:27 <oklofok> q.e.d.
17:45:58 <ais523> quantumEd: because you can divide the a^p-a possible colourings into sets of p, which are the same up to rotation
17:46:29 -!- FireFly has joined.
17:46:44 <quantumEd> ah, excellent!
17:46:47 <oklofok> the equivalence classes partition the set, and each is of size p, so you have p * (number of equivalence classes) = a^p - a
17:48:26 <oklofok> ais523: the group theory one proves many other things though :P
17:48:43 <ais523> well, it's two parts to the same theorem
17:48:49 <ais523> the group theory proof is the second half of my proof
17:51:50 <oklofok> i'm not sure it's easy to extend that to the general case
17:52:02 <ais523> neither am I
17:52:06 <oklofok> oerjan: please explain that proof to me in terms of abstract algebra!
17:56:15 <oklofok> the idea for the usual proof is you take some subgroup H of a group, now it follows from the axioms of a group and the definition of a subgroup that it's an equivalence relation of the group's elements whether aH == bH, now because each aH is of the same size, we have |H| divides |G|
17:56:33 <oklofok> that one doesn't directly work for infinite groups ofc
17:56:49 <oklofok> aH just means multiplying all the subgroup's elements by a
17:57:04 -!- calamari has quit ("Leaving").
17:58:25 <ais523> ugh, more spam phone calls
17:58:47 <ais523> there are loads to this office, I take the phone off the hook until they end in the hope of costing the spammers money
17:58:50 <ais523> and don't actually listen to them
17:59:08 <oerjan> um what, i wasn't paying attention
17:59:11 <oklofok> oh and p divides a^p-a follows from this when you take the multiplicative group of p elements and consider the subgroup generated by a, it's size must divide the size of the original group, but the group's size is p, so also <a> must be the whole p, which means the first power of a that is 1 can be p-1
17:59:31 <oklofok> subgroup generated by a = take 1, a, a^2, a^3, ...
18:00:00 <ais523> oerjan: we're discussing the combinatorial and group-theoretical proofs of Fermat's Little Theorem
18:00:03 <quantumEd> well you really want <a> = {..., a^-2, a^-1, a^0, a^1, a^2, ...}
18:00:03 <ais523> and whether or not they're the same
18:00:18 <quantumEd> but that's irrelevant here I suppose
18:00:26 <oklofok> well right, i was talking about the finite case
18:00:50 <oklofok> usually you need the inverses, but in the finite case, a^k = 1 for some k, so a^(k-1) is the inverse of a, so you don't need the explicitly
18:00:57 <quantumEd> hmm I don't like this notation I used with the dots
18:01:01 <oklofok> *them
18:01:11 <oklofok> why not
18:01:12 <oklofok> ?
18:01:21 <quantumEd> it seems to suggest that all the elements are different
18:01:33 <quantumEd> but maybe a^-2 = a^0
18:02:18 <oklofok> well luckily you have { ... } there to remove duplicates!
18:02:36 <oklofok> usually implemented using a hash table
18:02:43 <quantumEd> what lol
18:04:58 <oklofok> i wanna do algebra so bad, i had a few courses in algebra in spring, but i only realized after taking them how awesome it was :P
18:07:01 <oerjan> my currently mushy brain cannot see how the two proofs would be ewuivalent
18:07:09 <oerjan> *equivalent
18:07:21 <oklofok> well i'm thinking he's implicitly defining some group of sort of permutations
18:07:30 <oklofok> but instead of p objects in p places, you have a objects
18:07:40 <oklofok> or maybe nothing like that
18:07:53 <asiekierka> I should do something in Underload.
18:08:08 <oerjan> well an action of a group of p elements on a set of a^p elements
18:08:10 <quantumEd> I've got a book on algebra but I haven't read it yet
18:08:22 <oklofok> all i know is they have the same feel, you divide the whole thing into equivalence classes of size p
18:09:01 <quantumEd> both of them prove a^p-a/p is an integer :P
18:09:19 <quantumEd> (a^p-a)/a
18:09:21 <quantumEd> sigh
18:09:35 <oklofok> no /p was correct
18:09:40 <oerjan> oklofok: his proof is also a group proof, but it's not the _same_ proof...
18:09:43 <oklofok> wel
18:09:44 <oklofok> l
18:09:53 <oklofok> (a^p-a)/a is also an integer, true :P
18:10:28 <oklofok> oerjan: oh well i suppose that's a good point
18:10:54 <oklofok> damn you, i'm always right until you show up
18:11:09 <oklofok> NOW WHY MIGHT THAT BE
18:11:27 <oerjan> IT'S PROBABLY BECAUSE OF QUANTUM
18:23:21 <oklofok> should i do fun stuff or not fun stuff? both need to be done by thursday
18:23:34 <quantumEd> fun stuff
18:23:38 <oklofok> actually food is third option
18:24:07 <ais523> eat first, then you'll enjoy both the fun and the unfun stuff more
18:24:13 <oklofok> alright, i have all the votes i need
18:24:14 <oklofok> oh
18:24:29 <oklofok> ais523: but i'm sorta full, it's just the food will go bad if i don't eat it... :P
18:24:36 <ais523> ugh
18:24:38 <oklofok> well i'm not that full, something in-between
18:24:43 <ais523> eat it just before it goes bad?
18:24:55 <oklofok> yes i'll put like a timer in the fridge
18:24:59 <oerjan> use it for mold experiments
18:25:25 <oerjan> the world needs new antibiotics!
18:25:28 <oklofok> i've ben bacheloring it up for 5 days, there's enough mold experiments here already.
18:25:32 <oklofok> *been
18:25:43 <ais523> I think possibly the best advice here is that asking #esoteric for advice on this sort of thing is a bad idea
18:26:01 <oklofok> hey i got exactly the answer i wanted
18:26:09 <oklofok> i mean at first
18:26:22 <oerjan> oh at first, yes...
18:26:24 <oklofok> also why is it so hard to remember quantumEd is fax
18:26:33 <quantumEd> why does it even matter?
18:26:37 <oerjan> oklofok: it's the uncertainty
18:26:54 <ais523> also, why would you ask if you already wanted a particular answer?
18:27:03 <oklofok> why does it matter who you are? because you have a personality
18:27:09 <ais523> except to get statements from us that you could later use to destroy our political careers
18:27:30 <oklofok> in fact a very distinct one
18:29:12 <oklofok> also it's nice to know which ones are noobies, because i behave slightly differently based on the portions
18:30:36 <oerjan> yes, you need to be polite until they are properly addicted
18:31:17 <oklofok> yes
18:34:29 -!- quantumEd has quit ("Leaving").
18:35:08 <oklofok> wait that's the opposite of what should happen if a regular has a new nick!
18:35:10 * oerjan observes quantumEd's momentum to be away from this channel
18:35:52 <oerjan> his position is now relatively unknown, though
18:35:52 <oklofok> not that i was that nice to him, i told him his math was wrong, which is pretty much the worst thing you can do to a person
18:36:05 <oklofok> i mean if my math was wrong i'd probably kill someone
18:36:08 <oerjan> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
18:36:32 <oerjan> don't speak of things too horrible to contemplate
18:37:09 <oklofok> starting to doubt your math after me and fizzie's talk about reals?
18:37:14 <ais523> oklofok: you know, it's OK to unbelieve things you previously believed if someone points out errors in them
18:37:21 <ais523> otherwise, you'd end up believing everything, which is even worse
18:37:42 <oklofok> ais523: but there's a certain point in life where your math is set. mine is.
18:37:57 <ais523> wait, what?
18:38:00 <oklofok> :D
18:38:09 <ais523> I'm a research student
18:38:15 <ais523> and therefore, /expect/ to be discovering new maths
18:38:30 <oklofok> but i expect new maths to fit my maths.
18:39:01 <oklofok> i'm using the definition of math relevant to the maths being wrong comment
18:39:43 -!- quantumEd has joined.
18:39:44 <ais523> ah
18:39:54 <oklofok> also i proved a pretty ridiculous micro-lemma today, Q is an identifying code of R
18:40:16 <oklofok> if we call R as a code, points are codewords
18:40:20 <oklofok> *a code
18:41:10 <oklofok> identifying code = there's some r such that the map x -> B(x, r) \cap I is an injection
18:41:29 <oklofok> *I is an identifying code
18:42:14 <oklofok> (basically you can determine a point by which elements of the identifing code are within some distance of it)
18:42:35 <ais523> ^ul (:^:^:^:^)(~:(*)~^S(/)S:(:)~^~(*)~^(!!()())~**~:^):^
18:42:36 <fungot> ...too much prog!
18:42:37 <oerjan> hm isn't identifying code == dense subset of R ?
18:42:52 <ais523> ^ul (:*:*:*:*)(~:(*)~^S(/)S:(:)~^~(*)~^(!!()())~**~:^):^
18:42:52 <fungot> ****************/***************/**************/*************/************/***********/**********/*********/********/*******/******/*****/****/***/**/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ...too much output!
18:42:58 <oklofok> oerjan: not exactly, consider taking all the intervals (2k, 2k+1) out
18:43:01 <oklofok> and taking radius 1
18:43:07 <oklofok> or, if that doesn't work
18:43:14 <oerjan> huh
18:43:16 <oklofok> at least you can remove some small interval
18:43:36 <oerjan> ok but any dense subset is an identifying code
18:43:40 <oklofok> yes, i think so
18:44:17 <oklofok> well, if x != y, then there's an open interval between the extremes of the balls around them
18:44:23 <oklofok> and in that open set, there's an element
18:44:31 <ais523> ^ul (:*:*:*:*)(~:(*)~^S(/)S:(:)~^~(*)~^(!!()())~**:(!())~^~a(^)~*^~:^):^
18:44:31 <fungot> ****************/
18:44:45 <ais523> ^ul (:*:*:*:*)(~:(*)~^S(/)S:(:)~^~(*)~^(!!()())~**:(!())~^(!())~^~a(^)~*^~:^):^
18:44:46 <fungot> ****************/***************/**************/*************/************/***********/**********/*********/********/*******/******/*****/****/***/**/*/
18:44:48 <ais523> yay
18:45:01 <ais523> ^ul (:*:*:*:*:*)(~:(*)~^S(/)S:(:)~^~(*)~^(!!()())~**:(!())~^(!())~^~a(^)~*^~:^):^
18:45:01 <fungot> ********************************/*******************************/******************************/*****************************/****************************/***************************/**************************/*************************/************************/***********************/**********************/**************** ...too much output!
18:45:11 <ais523> ^ul (:*::*:**:*)(~:(*)~^S(/)S:(:)~^~(*)~^(!!()())~**:(!())~^(!())~^~a(^)~*^~:^):^
18:45:12 <fungot> ********************/*******************/******************/*****************/****************/***************/**************/*************/************/***********/**********/*********/********/*******/******/*****/****/***/**/*/
18:45:27 <ais523> ^ul (::*:*:**:*)(~:(*)~^S(/)S:(:)~^~(*)~^(!!()())~**:(!())~^(!())~^~a(^)~*^~:^):^
18:45:27 <fungot> ******************/*****************/****************/***************/**************/*************/************/***********/**********/*********/********/*******/******/*****/****/***/**/*/
18:45:34 <ais523> ^ul (:*:*::**:*)(~:(*)~^S(/)S:(:)~^~(*)~^(!!()())~**:(!())~^(!())~^~a(^)~*^~:^):^
18:45:34 <fungot> ************************/***********************/**********************/*********************/********************/*******************/******************/*****************/****************/***************/**************/*************/************/***********/**********/*********/********/*******/******/*****/****/***/**/*/ ...too much output!
18:46:17 <oklofok> oerjan: first of all i think the definition of some sort of denseness closure is relevant here, take the union of all closed intervals C such that C \cap I is dense in C
18:46:26 <ais523> ^ul (:*:*::**:*)(~:(*)~^S:(:)~^~(*)~^(!!()())~**:(!())~^(!())~^~a(:(/)~^S^)~*^~:^):^
18:46:26 <fungot> ************************/***********************/**********************/*********************/********************/*******************/******************/*****************/****************/***************/**************/*************/************/***********/**********/*********/********/*******/******/*****/****/***/**/*
18:46:35 <ais523> perfect
18:46:36 <oklofok> because we just case about whether the endpoints land on somewhere like that
18:47:03 <ais523> it'd look neater in Underlambda, I wouldn't have to write all those operations out by hand
18:47:05 <oklofok> ais523: isn't it great how things are fun to relearn again once you've forgotten them :P
18:47:12 <oklofok> "relearn again"
18:47:17 <oerjan> oklofok: ok other attempt: I is an identifying code with given r iff (I-r) union (I+r) is dense subset of R
18:47:20 <ais523> oklofok: well, in this case it's more reminding myself of how it works
18:47:37 <oklofok> oerjan: ah
18:47:43 <ais523> also, interestin that there's exactly one a command in that
18:47:47 <ais523> *interesting
18:47:48 <oklofok> that's so obvious
18:47:54 * oklofok bangs head to wall
18:48:39 <ais523> actually, I've known the expression for decrement for ages, just haven't written it into a program like that
18:48:53 <oklofok> oh. i have.
18:48:59 <oklofok> on the chan
18:49:01 <oklofok> with you watching
18:49:02 <oklofok> i think
18:49:26 <ais523> after all, (:)~^~(*)~^(!!()())~** is rather messy
18:50:13 <ais523> that would be ':`'*`(!01)&* in Underlambda, just with simple abbreviations
18:50:29 <ais523> and probably just 1- with full abbreviations
18:50:52 <ais523> wait, no, not (!01)
18:50:55 <ais523> that makes no sense for this
18:51:02 <ais523> (!!()()) it would probably remain
18:51:09 <ais523> 0 pushes a 0, not runs a 0
18:51:22 <oklofok> oerjan: to humiliate myself further, i actually originally tried to prove Q is *not* an identifying code
18:51:25 <ais523> (!0^1) would work
18:51:35 <ais523> or (!!1 1)
18:51:55 <oklofok> but mentioned this to a prof, and he said think again
18:53:11 <ais523> (!())~^(!())~^ would be 0`0` in Underlambda
18:53:14 <ais523> or !! in C
18:56:52 <oerjan> mhm
18:57:50 <ais523> I'm vaguely wondering if 0` should be a single character, but it wouldn't be used enough
18:58:19 <oklofok> oerjan: so in fact the best you can do is to cover "half" of R (measuring proportions using the obvious system based on limits)
18:58:33 <oklofok> at least i think it follows from that
18:58:51 <oklofok> well cover, if you take the closure i explained earlier
18:59:11 <oklofok> taking the union of dense closed intervals first
19:00:09 <ais523> let's see... that whole section near the end, minus printing the slash, could be written :@gg^
19:00:24 <ais523> which is a lot shorter than :(!())~^(!())~^~a(:(/)~^S^)~*^~
19:00:52 <ais523> ooh, thought of a clever way to allow for the slash
19:01:12 <ais523> ^ul (:*:*::**:*)(~:(*)~^S:(:)~^~(*)~^(!!()())~**:(!())~^(!())~^~a(^)~*^~:^):((/)S)*^
19:01:13 <fungot> ************************************************************************************************************************************************************************************************************************************************************************************************************/
19:01:16 <ais523> or not
19:01:21 <ais523> ^ul (:*:*::**:*)(~:(*)~^S:(:)~^~(*)~^(!!()())~**:(!())~^(!())~^~a(^)~*^~:^):((/)S)*~^
19:01:21 <fungot> ************************************************************************************************************************************************************************************************************************************************************************************************************///////////////////////
19:01:36 <ais523> wait what, why did those do the same thing
19:02:09 <ais523> oh, they didn't
19:02:17 <ais523> heh, appending to the wrong end of the loop
19:02:21 <ais523> ^ul (:*:*::**:*)(~:(*)~^S:(:)~^~(*)~^(!!()())~**:(!())~^(!())~^~a(^)~*^~:^):((/)S)~*~^
19:02:22 <fungot> ************************/***********************/**********************/*********************/********************/*******************/******************/*****************/****************/***************/**************/*************/************/***********/**********/*********/********/*******/******/*****/****/***/**/*
19:07:32 -!- Gracenotes has quit (Remote closed the connection).
19:07:47 -!- oerjan has quit ("Good night").
19:12:49 <ais523> ooh, seems my issue with the Windows 7 computer that used to be here was actually Microsoft's fault
19:12:58 <ais523> rather than incompetence by the IT support department
19:13:02 <ais523> http://news.bbc.co.uk/1/hi/technology/8388253.stm
19:13:51 <ais523> hmm, actually mine might be different, as it happened during boot rather than after login
19:23:17 <oklofok> these exercises just get easier and easier because students never manage to present all 7 during the 2 hour session, so we keep falling more and more behind, next week there's 3 last week's problems to show
19:23:41 -!- asiekierka has quit (Read error: 110 (Connection timed out)).
19:23:47 <oklofok> (we usually have 7 problems, and a random student is chosen to present each)
19:26:24 <oklofok> so not exactly a foolproof system
19:38:19 <pikhq> Man, I really must be not feeling well: typing is hard.
19:39:15 <ais523> maybe you're tired
19:39:24 <ais523> I know I am, and probably I'm typoing more as a result
19:39:38 <ais523> after all, I had to type "typoing" three times before I got the first two letters right
19:39:42 <pikhq> Headache.
19:39:51 <ais523> and I somehow managed to spell "probably" with a capital P, and had to correct that too
19:39:56 <pikhq> I'm doing "okay" so long as I avoid flourescent lights.
19:40:04 <pikhq> (such as are in every building on campus)
19:40:22 <pikhq> Flickering lights hurt like fuck.
19:40:49 <ais523> sounds like migrane, then
19:40:55 <pikhq> 'Tis just that.
19:41:03 <pikhq> Migraines suck.
19:53:08 -!- MigoMipo has quit.
20:07:47 -!- MigoMipo has joined.
20:17:54 -!- BeholdMyGlory has quit (Remote closed the connection).
20:18:19 -!- adam_d has joined.
20:21:21 -!- BeholdMyGlory has joined.
20:25:34 -!- jpc has joined.
20:25:41 -!- jpc has left (?).
20:25:44 -!- jpc has joined.
20:26:23 <jpc> heya FireFly
20:26:30 <FireFly> Hi :P
20:26:37 * jpc is jcp, I just have two accounts since I have too many channels for one
20:27:23 <FireFly> Oh, didn't even notice the difference at first glance
20:41:12 -!- calamari_ has joined.
20:41:33 <AnMaster> argh I just ran into a system that lacked less
20:41:42 <AnMaster> as in, only pager around is "more"
20:41:53 <ais523> AnMaster: use vi
20:41:59 <ais523> it has similar bindings to less
20:42:02 <ais523> just allows editing too
20:42:03 <AnMaster> ais523, not around, nor emacs. There is nano however
20:42:12 <ais523> wait, no vi? not even vim.tiny?
20:42:19 <ais523> something is wrong with the universe
20:42:21 <AnMaster> ais523, no vi or vim
20:42:43 <AnMaster> ais523, shell is zsh. There is also ash, but no bash
20:42:52 <AnMaster> *what the fracking hell*
20:42:56 <ais523> ok, something is /very/ wrong with the universe
20:43:09 <ais523> I wonder if the same pattern repeats for other programs
20:43:15 <AnMaster> coreutils is gnu btw
20:43:20 <AnMaster> as far as I can tell it is sane
20:43:28 <ais523> AnMaster: contradiction
20:43:39 <AnMaster> ais523, well, "no less sane than usually"
20:44:09 <ais523> hmm, what calculators are available? let me guess, dc and Mathematica?
20:44:25 <ais523> languages... asm and Haskell?
20:44:50 <AnMaster> ais523, dc isn't there
20:44:55 <AnMaster> nor is bc
20:45:04 <AnMaster> nor Mathematica.
20:45:10 <ais523> ok
20:45:12 <AnMaster> but I'm not sure what the binary for it is called
20:45:14 <ais523> I was just trying to guess the pattern
20:45:23 <AnMaster> /usr/bin/mathematica?
20:45:36 <AnMaster> ais523, it has gcc but not g++
20:46:01 <AnMaster> gnu as exists. No ghc or hugs
20:46:03 <AnMaster> nor erlang
20:46:07 <ais523> which is strange as g++ is generally the same or a very similar binary
20:46:09 <AnMaster> nor any scheme that I know of
20:46:28 <AnMaster> ais523, you can use --enable-languages iirc to say you don't want c++
20:46:40 <ais523> yes
20:46:51 <ais523> I mean, they must have /deliberately/ excluded C++ support
20:46:58 <ais523> only time I've done that was for gcc-bf
20:47:00 <oklofok> i just made a reduction in the wrong direction
20:47:09 <ais523> because I didn't want to bother working out an ABI for exception handling
20:50:14 <AnMaster> ais523, apart from that, hm... there is joe too. The text editor I mean
20:50:15 <AnMaster> no pico
20:50:29 <ais523> joe?
20:50:38 <ais523> also, nano /and/ pico would be ridiculous
20:50:55 <ais523> IIRC, nano's bug-compatible with pico by default, apart from supporting more commands
20:53:16 -!- quantumEd has quit ("Leaving").
20:53:30 -!- quantumEd has joined.
20:55:45 <calamari_> ais523: you've done gcc-bf?
20:55:45 <ais523> it's my project, yes
20:55:55 <ais523> not finished, and unlikely to be for a while due to RL pressures, and not being top of my esolang priorities (Feather and Underlambda are higher)
20:56:03 <calamari_> ahh
20:56:13 <ais523> but finished enough to feel like an incredibly buggy finished program rather than an unfinished one
20:56:33 <calamari_> so you compile c to bf?
20:56:45 <ais523> yes
20:56:52 <ais523> well, in two stages
20:56:59 <ais523> I compile C to ABI, which is an invented asm-like language
20:57:01 <ais523> then ABI to BF
20:57:06 <ais523> the first compiler is done, the second isn't
20:57:13 <calamari_> neat!
20:57:35 <calamari_> I tried to figure out gcc a few times but I always got bogged down
20:57:47 <calamari_> congrats on getting past that point :)
20:57:59 <ais523> I even found a bug in gcc, but it was in a codepath that isn't used for any of the architectures they support
20:58:05 <ais523> so arguably, it isn't a bug, and probably they don't care
20:58:13 <calamari_> so is ABI something you created?
20:58:22 <ais523> yes
20:58:30 <ais523> most of it maps onto BF pretty simply
20:59:01 <ais523> e.g. tadd2.8 %r0, %r1, %r2 would be (with the pointer at r0) [-<+<+>>]
20:59:17 <ais523> but some bits, e.g. compare, multiplication, and, are harder
20:59:35 <ais523> basically it's about as powerful as a typical RISC assembly language
20:59:37 <calamari_> may I see a buggy copy?
20:59:39 <ais523> but designed to be good for BF in particular
20:59:53 <ais523> calamari_: yes, except for the difficulty of transferring the files in question
21:00:09 <ais523> the entire gcc source distribution is rather large, as is that for newlib
21:00:15 <calamari_> I made a bf assembly language a while back and tried to port it, but again, like I say I got stuck hehe
21:00:34 <ais523> and I'm not entirely sure if it would work if you downloaded a current gcc version, rather than the one I'm working with
21:00:39 <ais523> also, gcc-bf isn't on this computer
21:00:50 <ais523> but I have a computer with it on, 'twould just take a while to boot
21:01:12 * ais523 boots it
21:01:16 <calamari_> well honestly I was just going to look at it to understand
21:01:34 <ais523> also, the gcc build process is truly insane
21:01:43 <ais523> so much so, that I have my own parallel build process that is also insane
21:01:55 <ais523> and runs it a bit at a time, occasionally using Perl scripts to modify gcc's own build process
21:02:23 <calamari_> that sounds about right for gcc
21:02:39 <calamari_> you must have an incredible amount of patience
21:02:49 <ais523> fun fact: gcc .md files are all polygolts
21:02:52 <ais523> *polyglots
21:02:57 <ais523> between two similar but not identical languages
21:03:04 <pikhq> ais523: Patch of GCC, rather than full source tree?
21:03:10 <pikhq> Still probably large, but less so.
21:03:21 <ais523> it's mostly confined to one directory
21:03:33 <pikhq> And yeah, GCC's build system is freaking insane.
21:03:45 <ais523> and a few patches to the build system, lying to it to tell it that bf-unknown-none is a processor supported by GNU
21:04:12 <calamari_> what is your register size, 32 bits?
21:04:17 <ais523> 8
21:04:27 <calamari_> oh, nice
21:04:27 <ais523> although, int=32
21:04:33 <pikhq> ais523: Well, ideally it is a supported processor. :P
21:04:37 <ais523> so an int takes up 4 registers
21:04:59 <pikhq> Though the binutils probably don't much care for it...
21:05:19 -!- ais523_ has joined.
21:05:24 <ais523_> binutils are custom
21:05:30 * pikhq nods
21:05:32 <ais523_> ld does the actual assembling
21:05:38 <ais523_> ar is a wrapper around tar
21:05:42 -!- ais523 has quit (Nick collision from services.).
21:05:45 -!- ais523_ has changed nick to ais523.
21:06:17 <pikhq> And ranlib is a noop?
21:07:38 <ais523> yes
21:07:47 <ais523> actually, it's a no-op even on most sane systems
21:08:21 <Gregor> It's a no-op on Linux.
21:08:27 <Gregor> It's not a no-op on Mac OS X.'
21:08:46 <Gregor> Wots all this about bf-gcc now?
21:08:54 <Gregor> Is it still maintained/developed?
21:09:14 <pikhq> It is such a shame that the ar format is not even remotely standardised.
21:09:32 <pikhq> Gregor: Yeah, ais523 still develops it, just not a whole lot.
21:09:39 <ais523> Gregor: not really; I haven't abandoned on it, but it's so far down my list of priorities there's unlikely to be progress for years
21:11:56 <AnMaster> ais523, if you made the diff against base gcc available
21:12:06 <ais523> AnMaster: I'm trying to do that right now
21:12:07 <AnMaster> someone else could set up a repo and take over
21:12:15 <AnMaster> ais523, oh and tell us what version the base gcc is
21:12:25 <ais523> you can guess from the build script
21:12:33 <ais523> as it has the exact version number and date in
21:13:26 <calamari_> do you have a bf hello world it made?
21:13:26 <AnMaster> ais523, I would probably begin by porting it to modern gcc. to avoid all hell breaking loose. Well I guess less of a risk of that actually when it isn't bootstrapped
21:13:47 <ais523> AnMaster: bootstrapping it would be insane
21:13:48 <AnMaster> calamari_, that's several MB when encoded with runlength
21:13:51 <AnMaster> ais523, yes
21:13:54 <calamari_> hahaha
21:14:22 <AnMaster> calamari_, I have seen it
21:14:24 <ais523> due to the need to add in a runtime, etc
21:14:25 <AnMaster> not sure if I have it around
21:14:27 <calamari_> bootstrapping what?
21:14:31 <ais523> calamari_: gcc
21:14:36 <AnMaster> gcc-bf compiled to bf
21:14:37 <ais523> because that would imply compiling gcc into brainfuck
21:14:37 <calamari_> nah it's okay I'll believe you
21:14:38 <AnMaster> would be insane
21:15:13 <ais523> http://filebin.ca/akqbhj/gcc-bf.tar.gz is the diff against gcc and newlib, and the build script
21:15:14 <calamari_> I bootstrapped my bf assembler, but that's at a completely different scale hehe
21:15:30 <ais523> also, I haven't got a hello world to work that uses either stdio, or unix syscalls
21:15:38 <AnMaster> hah
21:15:50 <ais523> the famous several-MB one requires use of __bf_out
21:15:52 <AnMaster> ais523, do you know if it is gcc->abi or abi->bf issue?
21:16:02 <ais523> the second, almost certainly
21:16:06 <AnMaster> ais523, actually it seems to be 435K
21:16:10 <ais523> it's less-well tested, also less complete
21:16:15 <AnMaster> it was several MB if *not* RLL encoded
21:16:16 <AnMaster> that was it
21:16:24 <calamari_> ais523: thanks! :)
21:16:26 * AnMaster just found it
21:16:28 <ais523> gcc-bf assumes that runlength is optimised
21:16:49 <AnMaster> ais523, do you have an ABI interpreter?
21:16:56 <AnMaster> ais523, or any other useful testing tools
21:17:00 <ais523> source tarballs you need: gcc-4.2-20070719.tar.lzma newlib-1.16.0.tar.gz
21:17:01 <ais523> AnMaster: no
21:17:06 <ais523> oh, there is one testing tool
21:17:09 <AnMaster> oh?
21:17:13 <ais523> bfrle, my BF interp
21:17:17 <AnMaster> ais523, link?
21:17:18 <ais523> which is designed specifically to debug gcc-bf
21:17:24 <ais523> link = not online, let me tarball it up too
21:17:44 <ais523> oh, no need, it's in the tarball I've already posted
21:17:51 <ais523> in the patches/ dir
21:17:57 <AnMaster> ais523, does this support out of tree builds?
21:18:19 <ais523> AnMaster: the build system is very inflexible
21:18:21 <pikhq> So, the really major thing that GCC-BF misses is functioning syscalls? (and therefore most of libc)
21:18:31 <ais523> it always cp -rs the original tree
21:18:33 <ais523> and then modifies it
21:18:49 <AnMaster> pikhq, and ABI->BF stuff
21:18:49 <ais523> then it builds gcc and newlib in a mix of in-tree and out-of-tree
21:18:51 <AnMaster> I guess
21:18:55 <ais523> copying the resulting files into a fourth tree
21:18:59 <ais523> which is the one you actually run it from
21:19:04 <AnMaster> *blink*
21:19:08 <ais523> pikhq: no, the really major thing it's missing is multiplication
21:19:19 <pikhq> ais523: ... Multiplication. Really.
21:19:20 <ais523> which is, I suspect, the reason that the syscalls aren't functioning
21:19:30 <ais523> pikhq: I told you I hadn't finished
21:19:39 <pikhq> True.
21:19:39 <ais523> /you/ try writing a 64-bit multiply in BF
21:19:45 <AnMaster> argh I was just adding it to a bzr repo
21:19:54 <AnMaster> turns out it was already darcsed
21:19:54 <ais523> that has some modicum of efficiency
21:19:58 <ais523> AnMaster: it isn't, really
21:20:02 <ais523> that darcs repo isn't a proper repo
21:20:06 <AnMaster> adding patches/config-bf/_darcs/inventory
21:20:08 <AnMaster> see?
21:20:09 <ais523> it's basically used as a versions repository
21:20:16 <AnMaster> ais523, huh?
21:20:17 <pikhq> ais523: I presume you have 64-bit adding?
21:20:18 <ais523> normally, you commit code after you write it
21:20:21 <ais523> pikhq: yes, of course
21:20:24 <AnMaster> ais523, well yes
21:20:32 <ais523> in that repo, I was commiting just before I did something potentially disasterous
21:20:40 <ais523> so I could roll back to before what I did
21:20:46 <pikhq> Hmm. That makes it only *quite* painful.
21:20:47 <ais523> also, ignore all the documentation in that tree, it's wrong
21:21:28 <ais523> well, it's accuratish enough to give an idea of what I'm doing, but not the details
21:21:28 <ais523> the comments in the source, OTOH, are up to date
21:21:28 <AnMaster> ais523, hm... so can I use darcs on it
21:21:28 <ais523> AnMaster: yes
21:21:30 <AnMaster> or is there some crucial part missing
21:21:39 <ais523> just don't expect the version history to make any sense, unless you're drunk at the time
21:21:47 <AnMaster> ais523, it seems only part of patches/ has _darcs?
21:21:51 <AnMaster> the top dir does not
21:21:54 <AnMaster> in fact
21:21:54 <ais523> AnMaster: correct
21:21:59 <AnMaster> only config-bf does?
21:22:02 <ais523> it's just the gcc bit that was in darcs
21:22:09 <ais523> my suggestion is that you rm -r the _darcs dir
21:22:15 <AnMaster> ais523, only config-bf has darcs stuff
21:22:15 <ais523> and then, version with any versioning system you like
21:22:19 <ais523> AnMaster: yes
21:22:25 <AnMaster> ais523, I will use bzr as you probably know
21:22:31 <ais523> I don't mind that at all, why should I?
21:23:30 <AnMaster> gcc-4.2-20070719 hm
21:24:03 <AnMaster> ais523, is that based on upstream or some distro?
21:24:19 <AnMaster> because only gcc-4.2-20070719 I can find is from ubuntu bug reports
21:24:28 <ais523> it's what I got by doing apt-get source gcc-source
21:24:30 <ais523> or something like that
21:24:39 <ais523> it's probably a nightly
21:25:02 <AnMaster> ais523, do you remember what version of debian or ubuntu you did that on?
21:25:04 <AnMaster> considering my jaunty has 4.3.3
21:25:08 <AnMaster> not 4.2*
21:25:43 <ais523> no, but considering the date, 7.10 seems plausible
21:25:52 <AnMaster> ais523, what was that one called?
21:26:03 <ais523> feisty
21:26:13 <AnMaster> huh
21:26:32 <AnMaster> ais523, what about gutsy? would that match?
21:26:37 <AnMaster> it match better with googling
21:26:44 <ais523> oh, miscounted
21:26:46 <ais523> yes, it was gutsy
21:26:53 * AnMaster looks for a timeline
21:28:45 <AnMaster> ais523, why is lucid 10.04? rather than 10.0
21:28:54 <ais523> date-based
21:28:57 <ais523> april 2010
21:28:58 <AnMaster> oh
21:29:11 <ais523> if somehow they're late with the release, it'd be 10.05
21:29:25 <ais523> the pressure to release every 6 months is one of the things that leaves Ubuntu rather buggy
21:29:32 <AnMaster> is that the reason for 6.06?
21:29:45 <AnMaster> two months of delay
21:30:00 <AnMaster> ais523, which one will be the next LTS?
21:30:10 * AnMaster is going to aim for next LTS and stay on that
21:31:13 <ais523> I think lucid is an LTS
21:31:42 <AnMaster> ah yes
21:31:51 <AnMaster> ais523, well I guess karmic before then for a bit
21:32:05 <AnMaster> ais523, was jaunty unusually stable or what?
21:32:14 <ais523> it was stabler than karmic, at least
21:32:19 <AnMaster> right
21:32:25 <ais523> different versions seem to be stable for different people, for some reason
21:32:38 <ais523> OTOH, the wireless works even better with karmic than it did with jaunty
21:32:51 <ais523> (with earlier versions it was somewhat broken)
21:32:52 <AnMaster> ais523, I would say my gentoo system is one of the most stable systems I owner
21:32:54 <AnMaster> owned*
21:33:07 <AnMaster> in fact my arch system manages to be bleeding edge *and* stable
21:33:54 <AnMaster> ais523, what is config-bf?
21:34:18 <ais523> it's a directory that becomes config/bf inside gcc itself
21:34:23 <AnMaster> oh?
21:34:29 <ais523> it contains all the patches to gcc that deal with actually doing interesting things
21:34:33 <ais523> as opposed to build tweaks, etc
21:34:41 <AnMaster> what is the darcs command to show full log?
21:34:46 <ais523> darcs changes
21:34:49 <ais523> but you won't get much out of it
21:34:53 <AnMaster> ah
21:35:19 <AnMaster> what is cc0
21:35:37 <ais523> it's a pseudo-register that refers to the flags
21:35:40 <ais523> like overflow, carry, etc
21:35:50 <ais523> gcc-bf has a physical cc0, also cc1, cc2, and cc3
21:35:55 <ais523> which are used as temporaries when doing comparisons
21:36:06 <AnMaster> ais523, what is collect2?
21:36:11 <ais523> a wrapper for ld
21:36:19 <ais523> which is actually named ld, normally, when it's installed
21:36:28 <ais523> it deals with things like constructors in C++
21:36:33 <ais523> by wrapping around main
21:36:42 <AnMaster> ais523, you use little endian?
21:36:42 <AnMaster> why?
21:36:46 <ais523> it's an awful hack, and something that gets in my way a lot, and that I don't actually need
21:36:55 <ais523> and I use little-endian to make casting easier
21:37:09 <AnMaster> ais523, huh?
21:37:28 <ais523> (short)x is in the same memory location as (long)x
21:37:43 <ais523> if you use big-endian, you have to write code for downcasting
21:37:58 <ais523> this is the main theoretical advantage for little-endian, as far as I know
21:37:59 <AnMaster> ah
21:38:01 <AnMaster> ais523, please explain the purpose of patch-libgcc-mk.pl to someone who don't know perl
21:38:14 <ais523> AnMaster: it patches the build system
21:38:20 <AnMaster> why a perl script
21:38:21 <AnMaster> for that
21:38:22 <ais523> I could have used sed instead, but the Perl is cleaner
21:38:28 <AnMaster> why not just a diff?
21:38:37 <ais523> basically, libgcc contains implementations of things like floating-point emulation
21:38:54 <ais523> the build script for libgcc is generated dynamically during the compilation of gcc
21:38:59 <ais523> so doesn't exist initially, to be patched
21:39:09 <AnMaster> ais523, did you consider doing an llvm backend instead?
21:39:15 <ais523> AnMaster: not at the time
21:39:18 <ais523> I might, at some point
21:39:25 <AnMaster> ais523, since llvm supports PIC16 and such even
21:39:44 <ais523> anyway, gcc assumes, for some reason, that the largest possible integer is twice the native word size
21:40:04 <ais523> which is a strange assumption to make, given that __int128_t exists and it compiles on 32-bit systems
21:40:11 <AnMaster> ais523, heh?
21:40:15 <ais523> so it's even violating its own assumptions there
21:40:18 <AnMaster> how does that work then
21:40:30 <ais523> probably there's a separate hack in an entirely different part of the code
21:40:39 <AnMaster> ais523, of course llvm backend would imply C++ that really feels like C++
21:40:51 <ais523> anyway, one of the things that libgcc does is things like 64-bit operations in terms of 32-bit operations
21:41:07 <ais523> my idea, basically, was to get it to also do 32-bit in terms of 16-bit, and 16-bit in terms of 8-bit
21:41:27 <ais523> that means I don't need to write an enormous number of cases in the linker
21:41:37 <ais523> things like 64-bit multiplication are bad enough
21:41:57 <AnMaster> ais523, is newlib from gutsy too?
21:42:05 <ais523> probably
21:42:18 <ais523> as ehird will tell you, I rarely look for things on the Web
21:42:22 <AnMaster> ais523, and did you use the patches from ubuntu?
21:42:31 <ais523> definitely no in the case of gcc
21:42:36 <AnMaster> for newlib?
21:42:39 <ais523> given that the tarball I downloaded contained another tarball
21:42:42 <ais523> for newlib, I'm actually not sur
21:42:44 <ais523> *sure
21:43:08 <AnMaster> ouch nested tarballs
21:43:16 <ais523> I know
21:43:46 <AnMaster> ais523, what is libbf for?
21:43:56 <ais523> syscalls
21:44:09 <ais523> it's basically the libc
21:44:15 <ais523> well, newlib is the libc
21:44:40 <ais523> but you can't write a libc entirely from scratch
21:44:40 <ais523> as it would be unable to do I/O, etc
21:44:40 <ais523> so it's all the bits of libc that can't be written in pure C
21:44:53 <ais523> libbf is, instead, written in magic
21:44:59 <AnMaster> <ais523> but you can't write a libc entirely from scratch <-- why not? it would just take some time
21:45:12 <ais523> AnMaster: I/O, etc
21:45:17 <ais523> as in, you need inline ASM
21:45:19 <ais523> or something else similar
21:45:23 <AnMaster> ais523, well. that isn't what you said
21:45:32 <ais523> I meant, in pure C
21:45:35 <AnMaster> ah
21:45:42 <AnMaster> now it makes sense
21:45:47 <ais523> the funny thing is, some of it is pure C
21:45:55 <ais523> given that the filesystem is a linked list stored on the heap
21:46:02 <ais523> the C standard requires files
21:46:08 <ais523> but doesn't require them to persist past the end of the program
21:46:09 <AnMaster> ais523, is the ABI documented anywhere?
21:46:36 <ais523> which?
21:46:42 <ais523> ABI the asm, or ABI the application binary interface?
21:46:54 <ais523> the interface is documented, to some extent, in comments in bf.g
21:46:54 <AnMaster> ais523, your own fault for confusing it
21:46:55 <AnMaster> and
21:46:57 <ais523> *bf.h
21:47:00 <AnMaster> both would be useful
21:47:00 <ais523> AnMaster: I did that deliberately
21:47:07 <AnMaster> but I meant asm in this case
21:47:09 <ais523> and the asm is documented, to some extent, in bf-ld
21:47:16 <oklofok> http://en.wikipedia.org/wiki/String_operations <<< look at the definition of prefix-closed, is it just me or does that make no sense?
21:47:19 <AnMaster> ais523, where is the asm -> bf translator?
21:47:23 <AnMaster> is it the perl bf-ld?
21:47:28 <ais523> yes
21:47:31 <AnMaster> if so I will probably rewrite it
21:47:31 <ais523> bf-ld does most of the actual work
21:47:36 <AnMaster> to be in python or something
21:47:44 <ais523> AnMaster: that'd be rewriting more than half the project
21:47:51 <AnMaster> ais523, well, I don't know perl
21:47:53 <ais523> although, don't let that stop you if you really want to
21:47:53 <oklofok> for instance Pref({aaa}) would be the empty set
21:48:13 <AnMaster> ais523, is your longjmp stuff tested?
21:48:35 <ais523> no, and indeed I think it doesn't work
21:48:35 <ais523> it took long enough to get just regular function calls working
21:48:35 <AnMaster> ais523, oh? I have no clue about how it should work really
21:48:40 <ais523> AnMaster: same way it's implemented in any other language
21:48:47 <AnMaster> ais523, "any other target"
21:48:50 <AnMaster> you mean
21:48:50 <AnMaster> but
21:48:51 <AnMaster> well
21:48:58 <ais523> except that in gcc-bf, you also have to clear the frame pointer stack
21:49:00 <AnMaster> I have no clue how it usually work
21:49:07 <AnMaster> ais523, wait what?
21:49:09 <ais523> which is something that AFAIK no processor has in hardware
21:49:13 <ais523> normally it's implemented as a linked list instead
21:49:32 <AnMaster> ais523, what would happen with -fomit-frame-pointer in gcc-bf?
21:49:39 <ais523> AnMaster: I don't think you can actually do that
21:49:47 <ais523> OTOH, the frame pointer doesn't take up a register
21:49:48 <AnMaster> ais523, why do you need the frame pointer?
21:50:05 <ais523> so you can return from functions when you use alloca or VLAs
21:50:21 <AnMaster> ais523, hm? how does "normal" targets handle that?
21:50:32 <ais523> by adding a frame pointer for functions that use them, IIRC
21:50:44 <ais523> omit-frame-pointer doesn't necessarily omit it everywhere
21:50:46 <ais523> only when it's safe
21:50:49 <AnMaster> why not do that?
21:51:30 <ais523> because, there is a hardware frame pointer stack
21:51:33 <ais523> which is a lot lot more efficient than storing the pointer as an intege
21:51:35 <ais523> *integer
21:51:42 <ais523> dereferencing a numeric pointer is slow slow slow in BF
21:51:52 <ais523> just doing [<] until you find a 0 is much faster
21:51:53 <AnMaster> XD
21:52:28 <ais523> also, it would reduce the computational class
21:52:33 <AnMaster> -abi
21:52:33 <AnMaster> Output the ABI produced by the link as well as the final brainfuck
21:52:33 <AnMaster> code.
21:52:33 <AnMaster> -asm
21:52:33 <AnMaster> Output the low-level ABI that shows what the ABI was transformed to
21:52:34 <AnMaster> just before final ABI output.
21:52:36 <AnMaster> hm
21:52:38 <ais523> gcc-bf has no problems allowing you to go over the top of pointer-accessible memory
21:52:47 <ais523> you can't actually overflow the stack
21:53:02 <ais523> just, you mustn't ask for or dereference a pointer to stack elements above the top of memory
21:53:22 <AnMaster> ais523, what happens to the frame pointer in callees? like a VLA-allocating function calling one using alloca?
21:53:33 <ais523> it stays on the frame pointer stack, obviously
21:53:44 <ais523> oh, on other processors, it gets saved in a register somewhere, I think
21:53:44 <AnMaster> oh you said register I thought?
21:53:55 <ais523> well, the registers get mapped to memory when you call a function anyway
21:54:08 <AnMaster> ais523, like uh sparc?
21:54:14 <ais523> no, I mean manually
21:54:17 <AnMaster> oh
21:54:22 <ais523> if you need to preserve the content of a register across a function call
21:54:32 <ais523> be it the frame pointer or anything else
21:54:37 <ais523> then you copy it to memory
21:54:39 <AnMaster> ais523, aren't usually half of them caller saved and half callee-saved?
21:54:40 <AnMaster> or such
21:54:40 <ais523> standard compiler design
21:54:45 <ais523> AnMaster: actually, correct in this case too
21:54:56 <AnMaster> ais523, how many registers?
21:55:00 <ais523> 64 general-purpose
21:55:05 <ais523> 32 caller-saved, 32 callee-saved
21:55:14 <ais523> also, many special-purpose ones
21:55:16 <AnMaster> ais523, not more?
21:55:19 <ais523> no
21:55:40 <AnMaster> ais523, why not? if memory is slow and registers less so you would want more no?
21:56:05 <ais523> partly to prevent register scheduling taking forever
21:56:27 <AnMaster> ais523, oh? but what about current arches with lots of registers?
21:56:38 <ais523> 64 is lots
21:56:40 <AnMaster> ais523, and llvm internally uses 1024 virtual registers
21:56:46 <ais523> I could add more, I suppose
21:56:58 <AnMaster> ais523, would have to check if it would help or not
21:57:15 <AnMaster> ais523, what special purpose registers are there?
21:57:31 <ais523> there's a nice list in bf-ld somewhere, let me find it
21:57:52 <ais523> look at argloc
21:58:18 <AnMaster> ais523, hm a lot of regexes?
21:58:23 <AnMaster> regexpes*
21:58:25 <AnMaster> *
21:58:41 <AnMaster> ais523, what are their functions?
21:59:06 <ais523> a scratch register, two carry registers, two maintained at 0, three temp registers
21:59:06 <ais523> also three pointers (mark, stack, frame)
21:59:06 <AnMaster> two maintained at 0?
21:59:17 <ais523> AnMaster: for leaving loops, etc
21:59:23 <AnMaster> ais523, why two?
21:59:23 <ais523> it's two a specific distance apart
21:59:25 <AnMaster> ah
21:59:28 <ais523> so that you can become sure where the pointer is
21:59:33 <ais523> when you weren't sure where it was before
21:59:38 <ais523> it's the easiest way to do conditionals
21:59:56 <ais523> *four temp registers
22:00:10 <AnMaster> ais523, you went for softfloat?
22:00:15 <ais523> yes
22:00:20 <AnMaster> ais523, why?
22:00:21 <ais523> wait, why are you even asking that question?
22:00:37 <ais523> AnMaster: if it is not utterly obvious why you'd use softfloat in a brainfuck-based simulated processor
22:00:41 <ais523> then what is wrong with you
22:00:48 <AnMaster> ais523, softfloat would be even slower wouldn't it than one that is optimised bf one, right?
22:01:16 <AnMaster> ais523, I mean, it would need to split across registers
22:01:23 <AnMaster> and what if they aren't next to each other?
22:01:30 <AnMaster> even if they were, would it help much?
22:01:50 <ais523> floating's going to be soft anyway
22:01:56 <ais523> and if you do write a good hard float library for BF
22:01:57 <AnMaster> well yes
22:02:02 <AnMaster> XD
22:02:03 <ais523> publish it, it'd be useful even outside gcc-bf
22:02:23 <AnMaster> ais523, does a bf library even make sense
22:02:23 <AnMaster> outside the context of gcc-bf
22:02:28 <ais523> err, yes?
22:02:32 <AnMaster> oh?
22:02:35 <AnMaster> well
22:02:40 <ais523> you could use it #define-style
22:02:42 <AnMaster> I guess as a set of functions listed on a page
22:02:50 <ais523> or possibly do cleverer things, depending on what you were doing
22:03:12 <AnMaster> ais523, did you consider compiling to pebble first?
22:03:33 <ais523> no, there wouldn't be much of a point
22:03:43 <AnMaster> hm
22:03:58 <AnMaster> ((test x$1 = xrc || test x$1 = xcr || test x$1 = xcru) && shift && tar czvf $* ) || (test x$1 = xx && shift && tar xzvf $* ) || (echo Usage: bf-ar cr archive.a file.o [file.o [...]])
22:04:00 <AnMaster> bf-ar
22:04:01 <AnMaster> is nice
22:04:04 <AnMaster> but what the hell?
22:04:20 <ais523> void _exit (int rv) { (void) rv; goto *(void*)0; }
22:04:35 <AnMaster> ais523, uh
22:04:41 <ais523> possibly my favourite C function I've ever written
22:04:48 <Deewiant> :-D
22:04:50 <AnMaster> that would go to start of program no?
22:04:54 <ais523> not in gcc-bf
22:04:57 <ais523> which starts at origin 1
22:04:58 <AnMaster> in gcc-bf
22:05:00 <AnMaster> ais523, oh hah
22:05:26 <ais523> or possibly some other value, determined by the linker
22:05:26 <AnMaster> ais523, so lowest page is mapped?
22:05:26 <AnMaster> or wait
22:05:26 <AnMaster> "page"
22:05:26 <AnMaster> does not make sense
22:05:42 <ais523> function pointers are just tags in gcc-bf
22:05:47 <ais523> they don't point to actual memory locations
22:05:53 <ais523> they're just used to identify which function you mea
22:05:53 <AnMaster> ais523, same or separate code and data pointers?
22:05:54 <ais523> *mean
22:05:57 <AnMaster> ah separate
22:06:05 <ais523> code and data pointers are in separate ranges of values
22:06:13 <ais523> in fact, code, stack, and heap are
22:06:16 <AnMaster> ais523, limits?
22:06:26 <ais523> they're distinguished by the first byte, which is 0x0, 0x1, or 0x2
22:06:33 <ais523> well, top byte
22:06:37 <AnMaster> ais523, shouldn't you provide a limits.h?
22:06:39 <ais523> the less significant bytes are the value
22:06:44 <ais523> also, limits.h is in newlib, I think
22:07:07 <AnMaster> ais523, well it is target-specific
22:07:13 <AnMaster> to some extent
22:07:27 <AnMaster> bf-old.c bf-old.h bf-old.md bf-protos.h bf.c bf.h bf.md notesfromesolang.txt t-bf
22:07:28 <AnMaster> hm
22:07:31 <AnMaster> what's those
22:07:41 <ais523> um, you don't want to know
22:07:49 <ais523> well, bf-old you can ignore
22:07:49 <AnMaster> ais523, they are in config-bf
22:07:52 <ais523> that's before I created the darcs repo
22:07:56 <AnMaster> I would *need* to know
22:07:59 <ais523> t-bf is to do with the build system
22:08:07 <ais523> and is a timestamp file (no content but the modification time)
22:08:08 <AnMaster> # Generate floating point emulation libraries.
22:08:09 <AnMaster> in t-bf
22:08:11 <AnMaster> hm
22:08:20 <ais523> wait, what?
22:08:24 <AnMaster> ais523, yes
22:08:30 <AnMaster> FPBIT = fp-bit.c
22:08:30 <AnMaster> DPBIT = dp-bit.c
22:08:31 <ais523> oh, no it isn't
22:08:34 <ais523> t-bf is a makefile fragment
22:08:40 <ais523> that gets dynamically injected into gcc's makefiles
22:08:42 <ais523> there's one for every arch
22:08:45 <AnMaster> ais523, where are those .c files
22:08:47 <ais523> (sorry, I muddled it with something else)
22:08:52 <ais523> and somewhere in gcc
22:09:00 <ais523> those are the standard single and double precision float emu libraries
22:09:47 <AnMaster> ais523, do you have any sort of todo list or roadmap or such?
22:10:00 <ais523> look for unimplemented bits in bf-ld
22:10:03 <AnMaster> hm
22:10:09 <ais523> the gcc side is finished, barring bugfixes
22:10:18 <AnMaster> and the bf-protos.h bf.c bf.h bf.md files?
22:10:21 <ais523> anyway: bf.h is a header file that describes the application binary interface
22:10:25 <ais523> bf.c is code generation
22:10:36 <ais523> and bf.md is hard to describe in a single line
22:10:47 <ais523> basically, it's code in a gcc-specific DSL
22:10:57 <ais523> which generates RTL, and compiles it to asm
22:11:06 <ais523> the RTL is modified by other bits of gcc after it's been generated, though
22:11:18 <ais523> bf-protos.h I can't remember, I'd have to look at it
22:11:19 <AnMaster> /* TODO: hook TARGET_ADDRESS_COST to give the optmizer some clues about how
22:11:19 <AnMaster> expensive various operations are. Possibly TARGET_RTX_COSTS too. */
22:11:21 <AnMaster> afail
22:11:23 <AnMaster> afaik*
22:11:29 <AnMaster> that depends on interpreter/compiler
22:11:31 <AnMaster> for bf
22:11:35 <ais523> oh, it's just function prototypes
22:11:46 <ais523> which have to be in a separate file for a gcc-build-system-related reason I can't remembe
22:11:48 <ais523> *remember
22:12:08 <ais523> AnMaster: well, on the ABI compiler, yes
22:12:15 <AnMaster> ais523, ?
22:12:19 <ais523> basically, it's telling it things like xor is slower than mov for setting things to 0
22:12:24 <ais523> which it can't guess without being told
22:12:29 <AnMaster> ais523, oh right
22:12:38 <AnMaster> ais523, is [-] "mov"?
22:12:52 <ais523> yes
22:12:57 <ais523> well, mov.8 0
22:13:08 <ais523> and you'd have to say where it was, too
22:13:09 <AnMaster> ais523, one operand?
22:13:14 <ais523> two operands
22:13:25 <AnMaster> ais523, also what about mov reg->reg or mov mem->reg
22:13:26 <AnMaster> or such
22:13:35 <ais523> "mov.8 $0, %r4" is the actual syntax
22:13:41 <AnMaster> instead of mov immediate->*
22:13:58 <ais523> that isn't mov, as you can't do that in brainfuck
22:14:00 <AnMaster> ais523, why the . thing
22:14:01 <ais523> instead, you'd use tadd
22:14:04 <ais523> AnMaster: bitwidths
22:14:17 <AnMaster> ais523, unusual notation for it?
22:14:26 <ais523> mov.8 $0, %r4
22:14:28 <ais523> tadd2.8 (%mark), %r4, %scratch
22:14:29 <ais523> tadd.8 %scratch, (%mark)
22:14:35 <ais523> and it isn't an unprecedented notation
22:14:37 <ais523> and it isn't an unprecedented notation
22:14:47 <AnMaster> no need to repeat that
22:14:49 <ais523> anyway, that above there is an addition from a register to memory
22:14:51 <ais523> AnMaster: typo
22:14:54 <AnMaster> right
22:14:59 <ais523> wait, no
22:15:11 <ais523> it's a move from memory to register
22:15:14 <AnMaster> above that in what file?
22:15:19 <ais523> first step: set $r4 to 0
22:15:24 <ais523> AnMaster: no, what I just pasted
22:15:27 <ais523> above in the conversation
22:15:39 <ais523> second step: add (%mark) to %r4 and %scratch
22:15:40 <AnMaster> ais523, does llvm use a similar .x thingy?
22:15:55 <ais523> third step: add %scratch to (%mark)
22:16:00 <ais523> AnMaster: I don't know
22:16:10 <AnMaster> why is there a bf.h outside config-bf?
22:16:11 <ais523> but gcc's pretty flexible in asm notations, I imagine llvm is too
22:16:16 <ais523> different one
22:16:18 <ais523> that's <bf.h>
22:16:20 <ais523> for use by user programs
22:16:22 <ais523> I think
22:16:44 <ais523> also, note those are transfer-additions
22:16:49 <ais523> which set their first argument to 0
22:17:12 <ais523> that clear, transfer-add, transfer-add is the usual way to copy a value without destroying the original
22:17:42 -!- MigoMipo has quit ("When two people dream the same dream, it ceases to be an illusion. KVIrc 3.4.2 Shiny http://www.kvirc.net").
22:17:45 <ais523> (%mark) is special, btw
22:17:55 <ais523> the mark is a pointer, that marks a memory location on the heap or stack
22:18:03 <ais523> and you can use the place that pointer points to like a register
22:18:12 <ais523> it's the only way you can access memory in general
22:18:29 <AnMaster> ais523, how much memory does bfrle try to allocate
22:18:43 <ais523> what do you mean by that?
22:18:53 <AnMaster> klee: Executor.cpp:566: void klee::Executor::initializeGlobals(klee::ExecutionState&): Assertion `mo && "out of memory"' failed.
22:18:58 <AnMaster> when I try to run it under klee
22:19:04 <ais523> what's klee?
22:19:06 <AnMaster> which handles cfunge file after dropping mmap
22:19:19 <AnMaster> ais523, llvm tool that symbolically executes all possible paths in the program
22:19:19 <ais523> oh, and it allocates just enough to hold the program
22:19:20 <oklofok> http://www.mikseri.net/artists/sortokausi.40541.php
22:19:22 <AnMaster> really cool
22:19:22 <oklofok> oh lol
22:19:23 <oklofok> not here
22:19:28 <oklofok> sry :P
22:19:28 <ais523> and the BF tape
22:19:28 <AnMaster> ais523, still rather buggy
22:19:44 <ais523> my guess is, it noticed that it was possible for it to allocate unlimited amounts of memory
22:19:48 <ais523> which a BF interp can
22:19:51 <AnMaster> ais523, not likely.
22:19:52 <ais523> and as a result, tried
22:20:20 <AnMaster> ais523, as I didn't even mark any variable as symbolic yet
22:20:31 <AnMaster> you have to tell it what variables/what input is symbolic
22:20:37 <AnMaster> so it tries that when finding bugs
22:20:56 <AnMaster> like argc/argv usually
22:20:56 <AnMaster> or sometimes a specific variable directly in source
22:21:20 <AnMaster> without that it would just say "generated one test case, on one path"
22:21:25 <ais523> oh: #define TAPELENGTH 100663378
22:21:31 <ais523> that's what's happening
22:21:42 <ais523> I set the length of the tape to the area of the tape that gcc-bf can use
22:21:46 <AnMaster> ais523, that seems extremely long
22:21:52 <AnMaster> how many mb is it?
22:22:02 <ais523> around 100
22:22:07 <AnMaster> heh
22:22:30 <ais523> 96.000078201 MB, it seems
22:22:39 <ais523> gcc-bf can access 16 MB of tape and 16 MB of stack
22:22:46 <AnMaster> ais523, right
22:22:51 <AnMaster> 16+16 < 96
22:23:00 <ais523> there are four bytes of bookkeeping for every byte of heap/stack
22:23:06 <ais523> I meant heap and stack
22:23:18 <ais523> every six bytes contains one heap, one stack, four bookkeeping
22:23:19 <AnMaster> that's 128 MB then
22:23:29 <ais523> so 16*6 = 96MB
22:23:33 <AnMaster> oh wait
22:23:34 <ais523> and the tiny extra amount is registers
22:23:42 <AnMaster> (16+16)*4?
22:23:43 <AnMaster> no?
22:23:48 <ais523> no
22:23:59 <ais523> as in, one byte of heap and stack need four bytes of bookkeeping between them
22:24:07 <AnMaster> ais523,oh
22:24:12 <ais523> they have one dedicated byte of bookkeeping each, and two between them, to be precise
22:24:15 <ais523> but that's an implementation detail
22:24:16 <AnMaster> (16+16)*2 ?
22:24:33 <ais523> 16*6
22:24:36 <AnMaster> right
22:24:42 <AnMaster> ais523, how comes some are shared?
22:25:29 <AnMaster> well I need to sleep
22:25:46 <ais523> every six bytes contains: one unused value (to keep locations a multiple of 6), mark pointer for the stack, stack data, stack/heap pointer, mark pointer for the heap, heap data
22:25:59 <ais523> where pointers are set to 1 if the pointer doesn't point there, or 0 otherwise
22:26:11 <ais523> *stack/frame poitner
22:26:13 <ais523> *pointer
22:26:17 <AnMaster> ais523, what is the padding used by gcc-bf? none?
22:26:18 <ais523> there can be multiple frame pointers
22:26:22 <ais523> correct, no padding
22:26:27 <ais523> it would be a waste of space
22:26:31 <AnMaster> right
22:26:54 <ais523> except for bitfields up to a multiple of 8 bits, but you don't use those if you want the program to run at all efficiently
22:27:04 <AnMaster> ais523, what are the sizes of char/short/int/long/long long/float/double/long double ?
22:27:26 <ais523> in octets, 1/2/4/4/8/4/8/8
22:27:40 <AnMaster> hm
22:27:49 <AnMaster> right
22:27:49 <ais523> double and long double are the same, as are int and long
22:28:03 <ais523> because everyone seems to assume 32-bit int nowadays
22:28:16 <AnMaster> ais523, wouldn't bitfields be just turned into bitwise and/or?
22:28:17 <ais523> and I want as many existing programs as possible to compile unmodified
22:28:19 <ais523> AnMaster: yes
22:28:21 <ais523> and shifts
22:28:22 <AnMaster> oh wait, those are slow
22:28:32 <ais523> I rather like my implementation of bitwise and and or
22:28:42 <ais523> it involves repeated multiplication by 128, IIRC
22:29:29 <AnMaster> ais523, idea for next project: gcc-intercal
22:29:41 <AnMaster> for compiling C to C-INTERCAL
22:29:47 <ais523> AnMaster: I'm likely to continue working on gcc-bf until at least such time as it can port C-INTERCAL to BF
22:30:10 <AnMaster> ais523, I doubt c-intercal will fit
22:30:16 <AnMaster> in the memory
22:30:18 <ais523> in 96MB?
22:30:19 <ais523> that's quite a lot
22:30:28 <ais523> bear in mind that I grew up with floppy disk
22:30:30 <ais523> *disks
22:30:32 <AnMaster> ais523, in 96 *inefficiently used* MB
22:30:44 <ais523> well, 16 MB stack, 16 MB heap, from the C program's point of view
22:30:51 <AnMaster> indeed
22:30:52 <ais523> *16 MiB
22:31:03 <AnMaster> ais523, and cfunge would burst that for heap at least
22:31:06 <AnMaster> not for stac
22:31:09 <AnMaster> stack*
22:31:18 <AnMaster> I doubt if cfunge ever uses more than 1 MB stack
22:31:21 <ais523> but it's trying to store a giant hash table
22:31:30 <AnMaster> ais523, giant static array too
22:31:33 <ais523> yes
22:31:40 <ais523> if you got rid of the static array, or made it relatively small
22:31:44 <AnMaster> ais523, but what sort of program uses 16MB *stack*?
22:31:52 <ais523> anything that recurses a lot
22:31:57 <ais523> or that declares large arrays on the stack
22:31:59 <AnMaster> "meh"
22:32:07 <ais523> or especially, botbh
22:32:09 <ais523> *both
22:32:30 <AnMaster> ais523, will check cfunge stack and heap usage with massif tomorrow
22:32:53 <ais523> are you going to all this trouble just to port cfunge to brainfuck?
22:32:57 <AnMaster> no way
22:33:04 <ais523> good
22:33:08 <ais523> I thought you'd gone mad for a moment
22:33:11 <ais523> well, madder than normal
22:33:19 <AnMaster> ais523, there is no way I will try to port cfunge to anything non-POSIX.
22:33:28 <AnMaster> it's just way way too much work
22:33:30 <ais523> gcc-bf is meant to be POSIX, eventually
22:33:39 <ais523> it has quite a bit of POSIX already, via newlib
22:33:42 <ais523> e.g. signals
22:33:43 <AnMaster> ais523, that day it might run cfunge *shrug*
22:33:53 <ais523> it's single-process, though
22:33:57 <ais523> if you call fork, you get EAGAIN
22:34:09 <AnMaster> ais523, and what about mmap()?
22:34:19 <ais523> that would actually be surprisingly easy
22:34:22 <ais523> given that the files are in memory anyway
22:34:36 <ais523> it would just be a wrapper around realloc
22:34:42 <AnMaster> ais523, uh what
22:34:53 <AnMaster> ais523, how would a read only mmap be a wrapper around realloc?
22:35:07 <ais523> read only means undefined behaviour if you try to write, doesn't it?
22:35:11 <AnMaster> ais523, what about aio? I considered adding that to cfunge, just for the hell of it
22:35:15 <AnMaster> ais523, well yes.
22:35:19 <AnMaster> or rather
22:35:27 <ais523> aio wouldn't work, for the same reason forking doesn't work
22:35:28 <AnMaster> PROT_READ Pages may be read.
22:35:43 <AnMaster> ais523, poll()?
22:35:46 <ais523> AnMaster: I don't think anything explicitly bans allowing people to write if they just requested read access
22:35:53 <ais523> AnMaster: I can't remember what that one does
22:36:01 <AnMaster> ais523, what about PROT_NONE?
22:36:13 <AnMaster> ais523, anyway you need to have a page size for mmap
22:36:15 <ais523> oh, poll would be rather degenerate
22:36:17 <AnMaster> what is your page size?
22:36:21 <ais523> 1, probably
22:36:26 <AnMaster> *shudder*
22:36:28 <ais523> no reason to make it anything else
22:36:43 <AnMaster> ais523, I'm sure that will break something
22:36:47 <ais523> given that you can map to more than one page, IIRC
22:37:02 <ais523> page break has to be 1, I think
22:37:10 <ais523> given that sbrk works on 1-byte granularity
22:37:13 <AnMaster> heh
22:37:27 <ais523> (the implementation of sbrk is also rather fun, but nowhere near as fun as that of exit)
22:37:30 <AnMaster> The two constants _SC_PAGESIZE and _SC_PAGE_SIZE may be defined to have the same value.
22:37:31 <AnMaster> huh
22:37:37 <AnMaster> go team POSIX
22:37:40 <AnMaster> that is all I can say
22:38:00 <ais523> I like the "may be"
22:38:14 <AnMaster> ais523, yeah exactly the bit I referred to
22:38:24 <ais523> anyway, here's probably the confusingest bit from the implementation to sbrk: static void* brk = &__brkpos;
22:38:31 <ais523> that only works with gcc
22:38:33 <AnMaster> actually make that "go austin group"
22:38:34 <AnMaster> iirc
22:38:37 <AnMaster> that is "team posix"
22:38:43 <ais523> given that brkpos is defined as extern void __brkpos;
22:38:48 <ais523> OTOH, it only needs to work with gcc
22:39:34 <AnMaster> XD
22:39:43 <AnMaster> ais523, what about boehm-gc
22:39:46 <AnMaster> it needs to be ported
22:40:16 <AnMaster> if nothing else to allow gcc bootstrap
22:40:17 <AnMaster> :P
22:41:06 <ais523> its entire method of operation wouldn't work
22:41:16 <ais523> given that pointers and ordinary integers look very similar in gcc-bf
22:41:30 <ais523> although, actually
22:41:41 <ais523> given that stack and heap memory always starts 0x01 or 0x02
22:41:47 -!- BeholdMyGlory has quit (Read error: 104 (Connection reset by peer)).
22:42:01 <ais523> the chance that an integer and a pointer clashed would be low enough that it probably would manage to actually collect something
22:42:33 <AnMaster> ais523, libgcc
22:42:37 <AnMaster> how do you handle that
22:42:41 <AnMaster> isn't it partly asm?
22:42:44 <ais523> no
22:42:47 <AnMaster> oh?
22:42:47 <ais523> it's written entirely in C
22:42:54 <AnMaster> ais523, for all arches?
22:43:05 <ais523> yes, except you can write bits of asm and they take precedence over it
22:43:10 <AnMaster> ah
22:43:22 <AnMaster> and not all arches has everything?
22:43:26 <AnMaster> I mean
22:43:36 <AnMaster> you wouldn't need 64-bit division stuff there on x86-64
22:43:49 <ais523> yep
22:43:55 <ais523> this is why its makefile is generated by script, I think
22:43:59 <ais523> and therefore has to be patched by script
22:44:20 <ais523> one amusing fact: if you don't implement enough primitives to be able to implement all operations
22:44:24 <ais523> e.g. no multiplication at all
22:44:33 <ais523> then libgcc goes into an infinite recursive loop
22:44:37 <ais523> as it's compiled into calls to itself
22:45:06 <calamari_> fun
22:45:33 <AnMaster> colordiff -Naur <(nm -D /lib32/libgcc_s.so.1 | grep ' T ' | cut -d' ' -f3- | sort -n) <(nm -D /lib64/libgcc_s.so.1 | grep ' T ' | cut -d' ' -f3- | sort -n)
22:45:35 <AnMaster> interesting
22:46:07 <AnMaster> ais523, hah
22:46:29 <AnMaster> ais523, shouldn't it do multiplication by addition?
22:46:41 <ais523> for 8-bit, yes
22:46:48 <ais523> beyond 8-bit, that's hilariously inefficient
22:47:01 <AnMaster> ais523, so it could do it in terms of the 8-bit
22:47:04 <AnMaster> I mean, in theory
22:47:06 <ais523> yes
22:47:11 <ais523> in practice, it seems to screw up
22:47:24 <AnMaster> ais523, "<ais523> beyond 8-bit, that's hilariously inefficient" <-- hah isn't that what gcc-bf does?
22:47:28 <AnMaster> oh wait
22:47:28 <ais523> or at least, gcc's incapable of comprehending that a system's only multiplier can only handle 8-bit numbers
22:47:33 <AnMaster> well yes
22:47:35 <AnMaster> and no
22:47:35 <ais523> AnMaster: gcc-bf is surprisingly efficient, on an RLE system
22:47:37 <ais523> it's meant to be
22:48:48 <AnMaster> ais523, what about division
22:48:59 <AnMaster> I know of CPUs lacking integer division
22:49:07 <AnMaster> PIC12F* for example
22:49:07 <ais523> they may well be special-cased
22:49:19 <AnMaster> I doubt you would use C for it
22:49:22 <calamari_> AnMaster: probably not lacking a bit shift tho, right?
22:49:25 <ais523> are there any CPUs that /gcc targets/ that lack integer division?
22:49:25 <AnMaster> what with the limited memory
22:49:31 <AnMaster> calamari_, I forgot. it was years ago
22:49:34 <AnMaster> I coded for it
22:49:50 <AnMaster> it is an "embedded microcontroller" kind of thing
22:49:54 <calamari_> AnMaster: you can use that shift to do division..
22:49:59 <AnMaster> calamari_, well yes
22:50:17 <AnMaster> calamari_, think it had 12 bit address space or something
22:50:58 <AnMaster> calamari_, http://ww1.microchip.com/downloads/en/DeviceDoc/41190E.pdf
22:51:00 <AnMaster> datasheet
22:51:31 <calamari_> I finally started work on the bf interp for my wristwatch
22:51:40 <AnMaster> calamari_, XD
22:51:48 <AnMaster> joking right?
22:51:53 <calamari_> no
22:51:56 <AnMaster> WHAT?
22:52:18 <calamari_> Timex Datalink USB
22:52:19 <AnMaster> uh?
22:53:05 <calamari_> AnMaster: http://en.wikipedia.org/wiki/Timex_Datalink#Timex_Datalink_USB
22:54:26 <calamari_> it should be able to fit about 200 bf instructions in ram
22:54:38 <calamari_> (using a simple 4 bit encoding)
22:55:12 <calamari_> I considered 3 bit, but the overhead isn't worth it
22:55:36 <calamari_> and it only buys like 20 more instructions
22:58:18 <calamari_> it's a fun toy.. I once destabilized my watch running a program in my debugging app, and it took about 30 minutes before it finally reset, fortunately it did not beep
22:58:52 <ais523> how long would the tape be?
22:59:25 -!- FireFly|xchat has joined.
22:59:43 <calamari_> ais523: whatever is left from the program memory plus 24 bytes
23:00:07 <ais523> you're not going to be able to run very big BF programs, then
23:00:32 <calamari_> no, but that's okay because I'm not going to want to enter big programs using the crown of a wristwatch
23:00:52 -!- FireFly has quit (Read error: 110 (Connection timed out)).
23:00:55 -!- FireFly|xchat has changed nick to FireFly.
23:01:20 <calamari_> and since it doesn't use ascii, programs would have to custom written for the watch
23:02:08 <calamari_> well that and only being able to display 14 characters on one screen
23:02:43 -!- ais523 has quit (Remote closed the connection).
23:03:22 -!- calamari_ has changed nick to calamari.
23:06:10 -!- FireFly has quit ("Leaving").
23:33:30 -!- augur has quit (Read error: 110 (Connection timed out)).
←2009-11-30 2009-12-01 2009-12-02→ ↑2009 ↑all