←2008-12-16 2008-12-17 2008-12-18→ ↑2008 ↑all
00:06:14 <zuff> checkerboard (x,y)
00:06:14 <zuff> | even x = if even y then white else black
00:06:16 <zuff> | odd x = if even y then black else white
00:06:18 <zuff> haskell is pretty.
00:06:29 <lament> so ugly
00:06:32 <lament> disgusting code
00:06:36 <zuff> lament: how is that ugly
00:06:39 <zuff> that's lovely code
00:06:45 <lament> the dimensionality is hard-coded right in
00:06:50 <zuff> wat
00:06:59 <zuff> lament: whaddya mean
00:07:00 <Slereah> Haskel is pig disgusting
00:07:04 <Slereah> Monad is murderer
00:07:06 <lament> makes me puke
00:07:11 <zuff> lament: wat
00:07:14 <zuff> Slereah: lol
00:07:27 <lament> zuff: it's a 2d checkerboard, and it's dimensionality is actually part of the program logic
00:07:34 <zuff> dimensionality?
00:07:42 <oklofok> the fact it's 2d
00:07:44 <lament> yes
00:07:45 <zuff> ah.
00:07:48 <zuff> well, so?
00:07:54 <zuff> it's a 2d checkerboard
00:07:57 <zuff> in a library for 2d images.
00:07:57 <oklofok> zuff: that's lack of modularity
00:08:03 <lament> if you have something like
00:08:04 <zuff> you're all bonkers
00:08:08 <oklofok> lament's point is you can't really generalize it.
00:08:14 <zuff> well duh
00:08:15 <zuff> of course you can't
00:08:16 <lament> struct point { int x, y }
00:08:19 <lament> then that's 2d
00:08:23 <lament> but at least it's easy to add z
00:08:33 <lament> and adjust whatever formulas
00:08:59 <lament> but in your scenario the dimensionality is stuck right into "if even y then white else black" in a non-trivial way!
00:09:20 <oklofok> well yeah but that's not a haskell issue on the other hand
00:09:39 <lament> i just wanted to insult zuff's code
00:09:39 <oklofok> you could (even x+y) it, and get over that
00:09:42 <oklofok> ah
00:09:44 <lament> to which i have no real complaints
00:09:48 <oklofok> thought you wanted to insult haskell.
00:09:54 <lament> but yeah, even(x+y) is way better
00:10:07 <oklofok> and then even . sum
00:10:08 <zuff> well, you can't even use even/odd on a Double
00:10:14 <zuff> as I have just discovered.
00:10:23 <lament> checkerboard (x,y) = if even(x+y) then white else black
00:10:27 <zuff> well yes
00:10:42 <oklofok> (even . sum) ? white : black
00:10:47 <lament> ugh
00:10:49 <zuff> checkerboard :: ImageC
00:10:49 <zuff> checkerboard (x,y)
00:10:50 <zuff> | even (x+y) = white
00:10:52 <zuff> | otherwise = black
00:11:07 <zuff> now to figure out why you can't uyse even/odd on floats/doubles :D
00:11:14 <zuff> well I guess I could just round it
00:11:17 <lament> because haskell sucks
00:11:25 <zuff> so does your mom
00:11:30 <oklofok> zuff: why could you?
00:11:46 <zuff> well why couldn't you
00:11:46 <oklofok> even with modulus
00:11:56 <oklofok> even with modulus defined for doubles, even doesn't really make that much sense
00:12:08 <lament> modulus SHOULD be defined for doubles
00:12:11 <oklofok> well i guess there's an obvious definition
00:12:14 <lament> and i ranted in #haskell for days about that
00:12:17 <oklofok> lament: naturally.
00:12:26 <lament> but even/odd clearly makes no sense for them
00:12:29 <oklofok> i actually haskelled assume does that already
00:12:38 <oklofok> lament: stop stealing my thoughts.
00:12:44 <zuff> welp
00:12:45 <zuff> checkerboard :: ImageC
00:12:46 <zuff> checkerboard (x,y)
00:12:48 <zuff> | even (floor x + floor y) = white
00:12:50 <zuff> | otherwise = black
00:12:52 <zuff> still pretty as hell
00:13:35 <lament> what type is white?
00:13:43 <zuff> Colour
00:13:45 <zuff> type Colour = (Int,Int,Int)
00:13:49 <zuff> r,g,b
00:13:56 <zuff> type Image a = Point -> a
00:13:56 <zuff> type ImageC = Image Colour
00:13:58 <zuff> type Point = (Double,Double)
00:14:00 <zuff> type Colour = (Int,Int,Int)
00:14:22 <oklofok> looks okay to me
00:14:53 <oklofok> and yeah you should round the coords if you're using it like that
00:15:13 <oklofok> but you shouldn't think that's the obvious definition for even for doubles.
00:15:20 <zuff> well yea
00:15:21 <zuff> still
00:15:53 <oklofok> i do agree even should be defined for doubles *somehow*, oklotalk defines everything, and it's pretty much perfect so haskell probably should do.
00:16:05 <oklofok> *should too
00:16:07 <lament> you mean
00:16:24 <lament> all values should be of one type, and all functions should be total?
00:16:31 <oklofok> lament: yes!
00:16:39 <lament> and all possible function names should be defined?
00:16:44 <oklofok> yes!
00:16:47 <lament> hm
00:16:52 <lament> consider using Jot :)
00:16:58 <oklofok> and all possible program codes should be parseable.
00:17:03 <lament> yeah, Jot
00:17:08 <oklofok> also oklotalk
00:17:12 <oklofok> isn't jot stack-based
00:17:14 <oklofok> that's cheating
00:17:30 <lament> joy is stack-based
00:17:37 <oklofok> is "}" valid in jot? of course i'm making an additional guess here
00:17:45 <lament> jot only has two operations, 0 and 1
00:17:46 <oklofok> or...
00:17:49 <oklofok> OH
00:17:51 <oklofok> that jot :P
00:18:06 <zuff> render :: Integer -> Integer -> ImageC -> [[Colour]]
00:18:06 <zuff> render w h img = map (\x -> map (img . (,) x) [0..h']) [0..w']
00:18:08 <zuff> where h' = fromInteger h
00:18:10 <zuff> w' = fromInteger w
00:18:12 <zuff> soooooo prettyyyyyyy
00:18:29 <oklofok> yeah sorry i wasn't thinking esolangs, because in esolangs it isn't really much to ask to have everything defined
00:18:34 <zuff> hmm
00:18:36 <zuff> that fails a bit
00:18:39 <oklofok> you can just use the brainfuck card
00:18:43 <zuff> it's n+1
00:18:49 <oklofok> i should get back to reading
00:19:03 <zuff> render :: Integer -> Integer -> ImageC -> [[Colour]]
00:19:03 <zuff> render w h img = map (\x -> map (img . (,) x) [0..h']) [0..w']
00:19:04 <zuff> where h' = fromInteger h - 1
00:19:06 <zuff> w' = fromInteger w - 1
00:19:13 <lament> it would probably look much more readable as a list comprehension
00:19:21 <zuff> it looks fine to me
00:19:22 <zuff> but maybe
00:19:27 <zuff> but damn, that's the first pretty haskell I've written
00:19:30 <zuff> it's just >clicked<
00:19:40 <oklofok> Integer -> Integer, here you are setting an arbitrary currying order for w and h, HOW IS THAT GOOD CODING?
00:19:44 * zuff writes scale :: Float -> Image a -> Image a
00:19:46 <zuff> oklofok: lol
00:19:57 <zuff> wait
00:20:01 <zuff> I don't even need an ImageC requirement ther
00:20:10 <zuff> render :: Integer -> Integer -> Image a -> [[a]]
00:20:10 <zuff> render w h img = map (\x -> map (img . (,) x) [0..h']) [0..w']
00:20:12 <zuff> where h' = fromInteger h - 1
00:20:14 <zuff> w' = fromInteger w - 1
00:20:35 <lament> oklofok: yeah, and in another function he used a tuple for the same thing
00:20:51 <zuff> no
00:20:52 <zuff> i didn't
00:20:55 <zuff> (x,y) is a point
00:21:00 <zuff> width and height are rendering details
00:21:14 <zuff> you should be able to pass around points
00:21:21 <zuff> but apssing around a width/height combination is useless it's just for rendering
00:21:34 <oklofok> lament: yes, my second point, but i assumed you'd fill that out for me
00:21:46 <lament> zuff: how often do you pass around just a width or just a height?
00:21:57 <lament> maybe you need a RenderingDetails datatype?
00:22:05 <oklofok> :D
00:22:11 <zuff> lament: just in render :P
00:22:16 <oklofok> i love being over-pedantic about code
00:22:27 <zuff> scale :: Double -> Image a -> Image a
00:22:27 <zuff> scale n img (x,y) = img (x/n, y/n)
00:22:29 <zuff> wow, that was trivial
00:23:02 <zuff> seriously
00:23:03 <zuff> that worked first try
00:23:32 <zuff> hmm
00:23:36 <zuff> should I make colours doubles too? :P
00:23:37 <zuff> Naw.
00:24:01 <oklofok> multiplication is pretty hard to get correct given a multiplication primitive, yes :P
00:24:21 <zuff> lol
00:24:56 <oklofok> if you're working on reals, scaling is trivial. it's only algorithmically interesting when working with discrete images.
00:25:11 <oklofok> if you're working with reals, you get scaling straight from the definition of scaling
00:25:12 <oklofok> which you did.
00:25:17 <zuff> well yeah
00:25:21 <zuff> however
00:25:23 <zuff> my rendering is discrete
00:25:26 <oklofok> i should read, i have an exam in 6.5 hours
00:25:28 <zuff> but it just calls as N.0
00:25:43 <oklofok> and i haven't read about my hintikka sets yet!
00:25:55 <zuff> hmm
00:25:59 <zuff> oklofok: do you know how to write out bmps?
00:26:08 <oklofok> you mean the format?
00:26:13 <zuff> ya
00:26:24 <oklofok> header, list of bgr iirc
00:26:34 <oklofok> just byte after another
00:27:20 <oklofok> header is the standard microsoft stupid_blah_here, sizes and file lengths, just look it up
00:27:31 <zuff> helfpul
00:27:39 <Asztal> it is very simple
00:27:46 <oklofok> it's so easy you don't need help, is my point
00:27:47 <Asztal> not as simple as TGA, but simple
00:28:00 <zuff> oh, tga is simpler?
00:28:09 * zuff looks up tga instead
00:28:23 <oklofok> i don't even know tga :)
00:28:44 <Asztal> easier for writing to, anyway, IIRC
00:28:54 <zuff> ok, a tutorial that isn't a spec? :D
00:30:50 <oklofok> for bmp you don't need a tutorial
00:31:04 <zuff> oklofok: well explain it
00:31:32 <oklofok> i don't remember, i reverse-engineered the format from the hex, it's just a few bytes of header, only things that are dynamic are (w,h), and file length
00:31:52 <oklofok> i was like your age back then, so show some balls :P
00:31:59 * oklofok leaves quickly!
00:32:16 <Asztal> and also there is a restriction that the rows of the bitmap must be padded to be 4-byte aligned
00:32:38 <oklofok> this i didn't know, but yeah figures
01:51:31 -!- KingOfKarlsruhe has quit (Remote closed the connection).
02:01:37 -!- psygnisfive has joined.
02:09:09 -!- jix has quit ("...").
02:22:10 <Asztal> renderTGA "blah.tga" (0,0) (256,256) (256,256) . supersample (0.25,0.25) . magnify 16 . rotateImage 0.4 origin $ checkerboard red white
02:22:12 <Asztal> fun :)
02:22:26 <Asztal> (kind of slow here, though)
03:24:46 -!- Asztal has quit (Read error: 110 (Connection timed out)).
05:50:46 -!- Sgeo has quit ("Ex-Chat").
07:48:14 -!- oerjan has joined.
07:54:49 <oerjan> <zuff> Don't worry it's mostly perfectly innocent apart from the one bit which is all of it.
07:54:54 <oerjan> how reassuring.
07:56:53 -!- Judofyr has joined.
07:57:03 -!- Judofyr has quit (Read error: 104 (Connection reset by peer)).
07:57:46 -!- Judofyr has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:04:14 -!- psygnisfive has quit (Remote closed the connection).
08:04:36 -!- psygnisfive has joined.
08:10:29 -!- Judofyr has quit.
09:05:51 -!- GreaseMonkey has quit ("You only need one wheel. Bikers are just greedy.").
09:28:39 -!- oerjan has quit ("leaving").
12:50:18 -!- zuff has changed nick to ehird.
12:56:56 <ehird> 12:51 psygnisfive has joined (n=psygnisf@c-71-57-164-119.hsd1.fl.comcast.net)
12:56:56 <ehird> 12:51 Asztal: renderTGA "blah.tga" (0,0) (256,256) (256,256) . supersample (0.25,0.25) . magnify 16 . rotateImage 0.4 origin $ checkerboard red white
12:56:58 <ehird> 12:51 Asztal: fun :)
12:57:00 <ehird> 12:51 Asztal: (kind of slow here, though)
12:57:11 <ehird> What is it with asztal and MizardX stealing everyone else's ideas? :P
13:42:28 <ehird> graph :: [Integer] -> ImageC
13:42:28 <ehird> graph lst (x,y) | (lst `genericIndex` floor x) > floor y = black
13:42:29 <ehird> | otherwise = white
13:42:31 <ehird> graph, but the wrong way around
13:42:37 <ehird> (vertiaclly)
13:53:47 -!- Sgeo has joined.
14:33:25 -!- jix has joined.
14:35:29 -!- Judofyr has joined.
14:46:19 -!- Asztal has joined.
14:48:17 <Asztal> hey, I wasn't stealing it, I was borrowing it
14:49:43 <ehird> Yeah, but you both then take the idea and finish it while the creator sleeps. :-P
14:50:00 <Asztal> I'm impatient :D
14:50:31 * ehird rm Image.hs
14:50:33 <Asztal> you could build a raytracer out of this quite easily, too :)
15:05:34 -!- Hiato has joined.
15:06:18 <Hiato> Is anyone here willing to quickly aid someone (me) struggling with a bit of horrible C++ (that is, all C++ is horrible)
15:07:23 <ehird> Why C++? Why god why? :P
15:08:46 <Hiato> Indeed - irrlicht is why, and I'm useless with Ogre, so my options are limited
15:08:53 <Slereah> I'm already barely able to hack some C.
15:09:27 <Hiato> Why doth the heavans punish us so?
15:12:50 -!- Hiato has quit ("Leaving.").
15:14:57 -!- Sgeo has quit (Read error: 110 (Connection timed out)).
15:44:06 -!- Slereah has quit.
16:05:51 -!- Judofyr has quit (Read error: 110 (Connection timed out)).
16:15:01 -!- Slereah_ has joined.
16:43:21 <AnMaster> Deewiant, there?
16:43:33 <Deewiant> aye
16:43:35 <AnMaster> I was going to implement DATE, but I'm unsure of the rcs specs
16:43:40 <Deewiant> unsurprising
16:43:48 <Deewiant> Mycology tests it, no?
16:43:58 <AnMaster> Deewiant, indeed and you implement it
16:44:04 <Deewiant> it's more precise than the specs, unless Mike changed the specs
16:44:19 <Deewiant> I wouldn't be surprised if he didn't amend them
16:44:28 <AnMaster> hm
16:44:31 <AnMaster> more precise how?
16:45:03 <Deewiant> tests some things which Mike accepted (read: I made Mike accept) as correct but weren't explicitly in the spec
16:45:14 <AnMaster> heh
16:45:33 <AnMaster> jd == julian day it says
16:45:39 <AnMaster> but that doesn't tell me much
16:45:45 <AnMaster> how is it defined
16:45:48 <Deewiant> wikipedia
16:46:21 <AnMaster> "The Julian date (JD) is the interval of time in days and fractions of a day, since January 1, 4713 BC Greenwich noon, Julian proleptic calendar.[1]"
16:46:21 <AnMaster> ok
16:46:27 <AnMaster> so it pushes in FPDP format?
16:46:30 <AnMaster> since it says fraction
16:46:33 <fizzie> Deewiant: "So if I edit the Wikipedia page, the definition changes?" :p
16:46:41 <Deewiant> fizzie: yeah, exactly
16:46:50 <Deewiant> AnMaster: nah, I can't remember exactly
16:47:02 <Deewiant> probably in days so you ignore the fraction
16:47:03 <fizzie> If it says "julian day", it's probably just the day number without the fractional part.
16:47:29 <AnMaster> Deewiant, damn you use tango instead of calculating it yourself
16:47:43 <AnMaster> if you have to consider leap years this seems painful in plain C
16:48:04 <Deewiant> I did about half of it myself and then realized that I can just use tango directly
16:48:25 <AnMaster> duh
16:48:45 <AnMaster> :/
16:48:51 <fizzie> Wikipedia has a calculation formula too.
16:49:00 <fizzie> If you trust it! I see no citations there!
16:49:05 <AnMaster> heh
16:49:12 <Deewiant> I think it gave a wrong answer which is why I turned to tango
16:49:13 <AnMaster> we will see if mycology agrees
16:49:20 <Deewiant> I probably misimplemented it though
16:49:25 <Deewiant> too many variables
16:52:05 <AnMaster> assuming roughly 365 days / year... (4713 + 2008) * 365... probably ~ 2453000 or so
16:52:18 <AnMaster> yes I know that is way off, like leap years, no year zero, and so on
16:52:52 <AnMaster> seems like a painful date representation for everyday use
16:54:07 -!- jix has quit ("...").
16:54:52 <fizzie> It's certainly nicer to calculate with than Gregorian dates; the numbers are just too big to be human-friendly.
16:57:21 <fizzie> Also it has a huge drawback in that the nice round-number celebrations will not occur during my lifetime; 2.4*10^6 was in 1858, and 2.5*10^6 will be in 2132. Well, I guess I can't be sure about that latter one, but I think I'll be a bit surprised if I'm still alive then.
16:59:56 <Deewiant> You probably won't be surprised then, if you are; you would be now, if you found out that you will be
17:00:33 <fizzie> Let's hope I remember to comment about it on the channel in 2132.
17:01:06 <fizzie> At least the Unix time counts seconds, so there are more excuses to celebrate. 1.25*10^9 is next August, for example.
17:03:49 <AnMaster> fizzie, hehe
17:03:57 <AnMaster> anyway you should celebrate powers of two
17:03:59 <AnMaster> not of 10
17:04:03 <AnMaster> for unix date
17:06:25 <fizzie> The 2^30th went already, and there's still some time before the year 2038 problem. Still, I might even be alive for that one, that's only 30 years to go.
17:09:02 <ehird> I will definitely be alive for that one. :P
17:09:27 <ehird> And most likely using a 64-bit computer and OS, you know, like os x 10.6. :P
17:09:34 <fizzie> Not if someone KILLS YOU. Not that I'm planning anything.
17:09:42 <ehird> tru
17:09:44 <AnMaster> throw new Object;
17:09:46 <AnMaster> interesting decipher
17:09:48 <AnMaster> err
17:09:49 <AnMaster> Deewiant, ^
17:09:52 <AnMaster> sorry for mistab
17:10:02 <ehird> throw new Knife(destination = AnMaster);
17:10:50 <Deewiant> yeah, what ehird said :-P
17:11:50 <fizzie> except Knife, k: print "it's not nice to throw knives at %s" % k.destination
17:12:27 <ehird> whoa
17:12:28 <ehird> python++
17:12:28 <ehird> XD
17:12:33 <ehird> it's c++ and python!
17:12:33 <ehird> horrid
17:12:51 <Deewiant> `catch` \(k :: Knife) -> printf "You hit %s. He collapses, blood pouring out of the wound."
17:13:08 <psygnisfive> ehird
17:13:12 <ehird> psygnisfive
17:13:20 <psygnisfive> why were you quoting my signin?
17:13:25 <ehird> wat
17:13:26 <fizzie> The named parameter in the throw just reminded me of Python; since that's not C++.
17:14:00 <psygnisfive> <ehird> 12:51 psygnisfive has joined (n=psygnisf@c-71-57-164-119.hsd1.fl.comcast.net
17:14:08 <ehird> o.o
17:16:34 -!- Judofyr has joined.
17:16:39 <psygnisfive> o.o
17:28:23 -!- jix has joined.
17:32:18 -!- psygnisfive has quit ("Leaving...").
17:50:58 -!- Corun has quit ("This computer has gone to sleep").
18:14:04 <GregorR> LOL KITTENS PWNS!!!
18:14:06 <GregorR> Discuss.
18:22:32 -!- Asztal has quit (Read error: 110 (Connection timed out)).
18:25:05 <lament> No.
18:25:07 <AnMaster> Deewiant, hm I found some internal code in glibc that seems to solve one of the major issues
18:25:12 <AnMaster> for generic dates
18:25:23 <AnMaster> well license is ok so :)
18:25:39 <lament> AnMaster: have you learned haskell yet?
18:25:51 <AnMaster> lament, xmas holidays haven't started yet
18:27:40 <lament> that's ok. You have two hours.
18:27:54 <lament> The deadline has been moved, you see.
18:28:50 <AnMaster> lament, no
18:29:02 <AnMaster> and I wanted to learn it for fun
18:29:08 <AnMaster> and still want
18:32:36 <lament> I think I can recommend Real World Haskell
18:32:40 <lament> as the tutorial
18:32:50 <lament> it does seem to be good
18:33:03 <lament> (i'm just reading it myself)
18:33:09 <ehird> learn you a haskell
18:33:11 <ehird> end of.
18:33:15 <ehird> then go on to rwh
18:33:26 <ehird> lyah teaches you what haskell's about, rwh tells you how to write programs with it.
18:35:17 <lament> no
18:35:19 <lament> i mean
18:35:25 <lament> rwh starts from scratch
18:35:34 <lament> there's no need for another tutorial beforehand
18:35:34 <ehird> I know it does.
18:35:41 <ehird> But LYAH is a way better introductory tutorial.
18:35:50 <lament> if you're a child with ADHD.
18:35:54 <lament> which you are.
18:35:59 <ehird> I don't have ADHD.
18:36:09 <lament> oh.
18:36:32 <ehird> But regardless of any ridiculous cartoons to the side LYAH is nicely paced, simple but not condescending, and explains the concepts nicely.
18:36:40 <ehird> real world haskell is then useful to learn how to write real programs in hs.
18:36:57 <lament> sure
18:37:14 <lament> it seems so far, though, that RWH is nicely paced, simple but not condescending, and explains the concepts nicely.
18:37:25 <ehird> you already knew a lot of haskell, though.
18:37:52 <ehird> also, when there are two equal options and one has badly drawn elephants, the latter one wins out.
18:38:22 <AnMaster> Deewiant, why are there several literal � in mycology in the DATE code?
18:38:36 <AnMaster> some sort of non-printable char
18:39:46 <Deewiant> I don't think there are any non-printable chars, I avoid those
18:39:52 <Deewiant> but there will be non-ASCII bytes
18:40:14 <Deewiant> just a handy way of pushing values in the range 0-255
18:41:44 <AnMaster> Deewiant, hm invalid in utf8 I believe
18:41:52 <Deewiant> duh?
18:42:02 <Deewiant> what makes you think it's UTF-8 :-P
18:42:20 <Deewiant> and why would I be so stupid as to use UTF-8 in Befunge-98 code
18:42:28 <AnMaster> true
18:42:31 <Deewiant> especially in Mycology - how UTF-8 works at the Funge-Space level is UNDEF
18:42:35 <AnMaster> but irritating when editor is set to it
18:42:42 <Deewiant> set editor to autodetect
18:42:51 <Deewiant> if editor can't, change editor
18:42:52 <Deewiant> goto 10
18:43:00 <AnMaster> Deewiant, well an interpreter could potentially interpret any non-ascii as utf8 then
18:43:12 <AnMaster> or whatever
18:43:20 <ehird> what
18:43:29 <Deewiant> The Funge character set is 'display-independent.' That is to say, character #417 may look like a squiggle on system Foo and a happy face on system Bar, but the meaning is always the same to Funge, 'character #417', regardless of what it looks like.
18:43:46 <Deewiant> it's not UNDEF, brain fart
18:43:56 <AnMaster> Deewiant, well you said it was
18:44:02 <AnMaster> indeed it isn't
18:44:02 <Deewiant> it's not UNDEF, brain fart
18:46:33 <fizzie> Well, it still doesn't sound portable to use characters as "a handy way of pushing values", especially in the >127 range, if no-one says you need to load the program as bytes.
18:46:46 <Deewiant> It does say, which is my point.
18:47:56 <fizzie> It *doesn't* say an interpreter couldn't read the input as UTF-8, still.
18:49:03 <Deewiant> I think it's a matter of how literally you take the spec and how portable you want to be
18:49:09 <fizzie> It just says the source files are made of characters, and characters have some associated numbers.
18:50:07 <fizzie> And it especially allows for having characters greater than 255; to me it doesn't sound too far-fetched to read in UTF-8 encoded source files.
18:50:09 <Deewiant> It also says that on systems where characters are single-byte, the values are in the range 0-255
18:50:28 <Deewiant> And the way I see it characters are single-byte on all modern systems; UTF-8 is just an encoding on top of that
18:50:44 <Deewiant> The fundamental unit of storage on modern OSs is the byte (besides the bit)
18:50:58 <fizzie> It could still be argued that "characters" are stored in multiple (a variable amount of) bytes.
18:51:59 <Deewiant> And thus we come to how literally you want to read it and what meaning you ascribe to "system" :-)
18:52:26 <Ilari> Sounds like discussion I had on this channel some time ago... :-)
18:52:29 <fizzie> Not that I care too much. But I think some Java-based Funge-98 core I wrote for one purpose or another used the character-based IO routines (especially since the spec says source files contain "characters"), which use the platform's default encoding for actual file-reading, which most likely is UTF-8.
18:52:43 <Deewiant> On Windows it most likely won't be UTF-8
18:53:01 <Deewiant> It'll most likely be locale-dependent (in europe, Windows-1252) or UTF-16BE
18:53:29 <fizzie> s/most likely is/might well be/, if you want to nit-pick; that's just a detail.
18:53:40 -!- Asztal has joined.
18:54:22 <Deewiant> True. I guess I was jabbing at the fact that that code will work differently on different systems, which is generally a Bad Thing
18:55:24 <fizzie> Some could argue it's a Good Thing that it reads character-based text files the way the user expects them to be read, though. I don't have a firm onion on this.
18:55:51 <fizzie> I guess it's the interpreter's user's responsibility to feed it sources in an acceptable format, anyway.
18:56:18 <Deewiant> Yeah, I should think so.
18:57:13 <Ilari> And what about saving parts of funge-space? Some values are invalid as unicode codepoints, and some values exceed even what the original up-to-6-bytes UTF-8 can represent.
18:59:00 <fizzie> Unicode-invalid values including anything that's negative; I guess it's again rather undefined.
19:00:43 <Ilari> Presumably one could take as requirement that funge could dump anything funge-space might contain and can read its own dumps...
19:01:33 <fizzie> But "o" is defined in terms of "text files"; and anyway I don't think current interpreters make it so that 'o' followed by 'i' doesn't mess anything up.
19:03:22 <fizzie> Since the spec speaks of "text files", so I guess you could even map all invalid codepoints to U+FFFD REPLACEMENT CHARACTER and claim to be conforming. The FILE fingerprint operations are more sensible anyway if you want to do "binary IO", whatever that means. At least the spec there (currently, anyway) sort-of says that W/R deal with values in the [0, 255] range and strip away higher bits.
19:03:47 <fizzie> Oh, and I see the current spec for FILE has added a 'D' "Delete specified file" command. That wasn't there the last time I looked.
19:04:50 <Deewiant> It was one of Mike's early additions.
19:05:33 <fizzie> Well, maybe it was there the last I looked, then, but it just didn't register.
19:27:13 <GregorR> I'm trying to write a program that will reliably thrash the memory cache so I can test how long a cache miss takes.
19:27:43 <GregorR> To do this, I'm allocating 128MB of memory, then stepping through a page at a time and doing nothing with it (but calling a function that the compiler can't know does nothing), then doing the same but stepping an int at a time.
19:28:00 <GregorR> Hypothetically, the second time around it should always be in the cache, so should almost always be faster.
19:28:03 <GregorR> But noooooooooo.
19:28:10 <GregorR> (Oh, I'm stepping 1,000,000 times either way)
19:33:42 <GregorR> Ah, well I'm an idiot.
19:33:49 <GregorR> Bump it to a billion and suddenly I'm seeing giant differences :P
19:34:40 <GregorR> On my Core 2 quad, a cache miss costs on average 2.705207e-08 seconds (27 nanoseconds)
19:36:19 <fizzie> To put that into perspective, light travels about 8 metres in that time. (Okay, so it doesn't really provide any sort of perspective; it's still nifty.)
19:37:16 <fizzie> Conclusions: light is slow as molasses.
19:38:13 <GregorR> lol
19:55:52 <Ilari> GregorR: You really can determine it to that many signaficant digits?
19:56:26 <GregorR> No, but it came consistently to something around 27nanoseconds for three runs.
19:56:37 <GregorR> (That is, it always rounds to 27 nanoseconds)
20:02:29 <Ilari> Does that test somehow preclude fist access to each cacheline from missing?
20:12:54 <Ilari> If time it takes to perform fetch that always misses is x and y for fetch where every nth acess misses, the miss penalty is not x - y, but n/(n-1) * (x - y), a relative error of -1/n. That's about 6% for n=16...
20:17:32 <GregorR> Touché.
20:35:49 <GregorR> Well now I'm confused.
20:36:26 <GregorR> I made some changes (amongst them, now the int-at-a-time loop actually just loops between [0] and [1]), and now the results I'm getting suggest that it takes only double as much time on a cache miss as a cache hit.
20:36:30 <GregorR> That can't be right.
20:37:29 <GregorR> Unless I have an absurdly massive L2 cache I'm ignoring ...
20:41:07 <GregorR> (And no, it's not that absurdly large :P )
20:47:58 <fizzie> Maybe your processor designer has just been more clever than you.
21:22:20 -!- Asztal has quit (Read error: 110 (Connection timed out)).
21:33:43 -!- KingOfKarlsruhe has joined.
21:43:29 <KingOfKarlsruhe> exec cmd "echo 'Hello world!' >> /dev/null"
21:46:30 <olsner> cmd and /dev/null?
21:47:08 <KingOfKarlsruhe> i'm chatting with /dev/null :)
21:57:24 -!- KingOfKarlsruhe has quit (Remote closed the connection).
22:10:02 -!- Asztal has joined.
22:44:06 -!- oerjan has joined.
23:42:15 -!- Judofyr has quit (Read error: 60 (Operation timed out)).
23:43:39 -!- olsner has quit ("Leaving").
23:45:19 <ehird> nethack is 247760 fucking lines of code?
23:45:21 <ehird> holy shit.
23:49:25 <Dewi> note to self: re-aquaint with nethack instead of working today
23:50:01 <ehird> Dewi: Hi Deewiant--
23:50:19 <Dewi> I'm just Dewi
23:50:41 <ehird> if you don't like that name you can be (name = "Deewiant"; name[:3] + name[3:5])
23:51:28 <Dewi> oh crap they are testing me
23:51:43 * Dewi doesn't get the notation, sorry
23:51:59 <ehird> python
23:51:59 <ehird> :P
23:52:04 <Dewi> indexing from 1 or 0 ?
23:52:09 <ehird> 0
23:52:18 <Dewi> second param absolute or relative?
23:52:26 <Dewi> or should I say operand
23:54:02 <ehird> relative
23:54:05 <ehird> err
23:54:06 <ehird> absolute
23:54:17 <oerjan> i'm relatively sure it's absolute
23:54:28 <ehird> http://uncyclopedia.wikia.com/wiki/Objectivist_C
23:54:40 <oerjan> but i can't absolutely rule out relative either
23:56:42 <Slereah_> A = A >:|
23:57:03 <Slereah_> Dude.
23:57:15 <Slereah_> I had the idea for an objectivist language before!
23:57:17 <Slereah_> THEFT!
23:57:24 <ehird> (cur) (last) 00:53, 21 December 2005 IMed (Talk | contribs) (New article)
23:57:34 <ehird> only change since: http://uncyclopedia.wikia.com/index.php?title=Objectivist_C&diff=1907626&oldid=447901
23:57:38 <ehird> wait...
23:57:40 <ehird> .wikia.com?
23:57:42 <ehird> fuck wikia
23:57:44 <ehird> they take over everything
23:57:57 <ehird> they have to fucking put their fucking grubby hands on every wiki
23:58:05 <ehird> first it's hosting, then it's a bunch of ads, a new theme, let's take over your domain
23:58:07 <ehird> pieces of shit.
23:59:58 <GregorR> My hair forms haircicles.
←2008-12-16 2008-12-17 2008-12-18→ ↑2008 ↑all