00:00:08 Oh, there are details, too. Motorola is building these chips; the model number is "BT 952000". 00:01:52 do they come with that leap year bug that Zune got from that Motorola spinoff? 00:02:32 BT 952000 --http://www.hiddenmysteries.org/themagazine/vol8/articles/montex.shtml 00:02:38 so, some consistency' 00:03:12 Yes; I didn't know that the corporation called "Lucent" got its name from "LUCifer ENTerprises". 00:03:17 One would think that's not very good PR. 00:03:24 -!- Judofyr has quit (Remote closed the connection). 00:03:27 ha 00:06:11 * oerjan now wants to look up dev.* corporation names :D 00:08:22 i suggest staying away from Canada's DEVCO 00:10:35 -!- fizzie has set channel mode: -o fizzie. 00:10:49 Incidentally, have to sleep; do you want me to leave that +t on or what? 00:12:13 No. 00:12:15 Turn it off. :D 00:12:24 -t is nice when you have no trolls. 00:15:28 I'm not that sure that particular topic-sillitude will not come back, but I guess there's not much Real Talk during the "night-time" anyway. 00:15:43 -!- ChanServ has set channel mode: -t. 00:15:52 Sleepitude, now; g'night. 00:16:51 WE ARE DOOMED! DOOMED, I SAY! 00:21:53 I just made a great misreading 00:21:57 "with enough bugs, all eyes are shallow" 00:22:23 THEY ARE EATING OUR EYES! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 00:29:09 -!- bloreg has quit. 00:29:09 -!- puzzlet_ has joined. 00:29:17 -!- puzzlet_ has quit (Read error: 104 (Connection reset by peer)). 00:31:49 -!- kar8nga has left (?). 00:34:11 -!- puzzlet_ has joined. 00:36:33 * ehird puts a black background on everythin before his eyes cave in 00:38:03 BLACK IS THE (NON-)COLOR OF EVIL 00:39:25 dear apple: i would like a free leopard upgrade so that I don't get ugly white window mesh clashing with my ultimat blakk 00:42:00 -!- puzzlet has quit (Read error: 110 (Connection timed out)). 00:47:53 -!- GreaseMonkey has joined. 01:08:36 ehird, eh? 01:08:43 ehird, can't you change theme in OS X? 01:08:51 Not the window chrome, no. 01:08:57 how strange 01:08:59 Didn't you know that Apple is always right? :-P 01:09:08 ehird, you just said they weren't? 01:09:17 Steve Jobs would disapprove of your sacrelige of his perfect design. 01:09:21 You uncouth savage. :D 01:10:03 NEWS: Today ehird was making fun of Apple. Read more on page 7, 9, 12-13 and 17 01:10:06 -!- Vendan has joined. 01:10:29 I'm sure I've done that before :| 01:10:49 no you complained when I was doing it! 01:11:38 I wonder if Apple stopped disobeying their own HIG in 10.5. 01:11:40 ehird, anyway, iirc you can change theme even on windows xp 01:11:46 HIG? 01:11:52 HIGH? 01:11:57 AnMaster: Human Interface Guidlines 01:11:59 ah 01:12:01 *Guidelines 01:12:04 if you added an H 01:12:09 it would explain a lot 01:12:11 :-P 01:12:21 like, you know, imac 01:12:29 They sa(y|id) metal chrome should be used only for apps that are similar to real-world devices 01:12:37 but I don't think Safari, a web browser, fits that definition. 01:12:47 maybe it's imitating a refridgerated-mounted browser 2000 01:12:48 ehird, oh? iirc finder had the metal look in 10.4 01:12:53 yeah, it did 01:12:56 and 01:13:03 what on earth is it in real world? 01:13:10 Uh. A filing cabinet? XD 01:13:16 about the only time where apple listens to that guideline is with calculator. 01:13:20 Which looks like ar eal calculator at a glance. 01:13:33 ehird, in metal chrome? 01:13:34 well 01:13:39 their graph calc doesn't iirc 01:13:45 I mean Calculator.app. 01:13:53 ehird, ok, maybe they are separate 01:13:56 Yes. 01:13:59 I don't use mac a lot 01:14:02 as you probably know 01:14:03 One is a graphing calculator, one is a regular calculator :P 01:14:12 ehird, well I have no regular calc 01:14:15 Although Grapher.app is metal in 10.4, too... 01:14:20 I only have a graphing one 01:14:24 and it is black plastic 01:14:38 scratched black plastic 01:14:39 I want a TI-83 & an HP. Because that's like using both vi and emacs. 01:14:43 with worn out keys 01:14:50 ehird, this is a TI-83+ 01:15:31 ehird, had to replace the batteries once the in the ~6 years or so that I had it 01:15:43 maybe 5 years 01:15:43 not sure 01:16:35 doesn't use much power at all since those are 4 AAA 01:17:29 * ehird examines how hard it'd be to rescheme cgit to fit with the rest of his design 01:17:40 cgit? 01:17:49 http://hjemli.net/git/cgit/about/ 01:18:03 hey 01:18:06 that is a webinterface 01:18:07 ... 01:18:14 ... yes, yes it is. 01:18:17 ... And? 01:18:24 ehird, do you re-scheme google? 01:18:33 /facepalm. 01:18:36 It's a piece of software. 01:18:38 That you install on your server. 01:18:40 To view repositories. 01:18:41 true 01:18:42 On your server. 01:18:44 yes 01:18:45 I know 01:18:50 but you talked about desktop apps 01:18:53 just a few seconds ago 01:19:01 I know. It was a seperate musing. 01:19:02 I thought you planned to use greasemonkey or something 01:19:06 Ah. 01:19:10 No. 01:19:16 hey that would be fun 01:19:23 change the layout of every page you visit 01:19:29 to match your own style 01:19:29 http://userstyles.org/ 01:19:35 The interwebs are way ahead of you, mon. 01:19:41 hah 01:19:48 * AnMaster doesn't use greasemonkey himself 01:19:53 hello. 01:20:00 GreaseMonkey, hah not you 01:20:04 GreaseMonkey: If you don't want to be pinged, stop infringing on intellectual property. :P 01:20:13 ehird, err maybe trademark 01:20:18 I was being sarcastic. 01:20:23 I would assume greasemonkey is GPL 01:21:07 hmm. making cgit fit into a 33em (base = 16px) layout could be hard. 01:21:11 Solution: expand the width for those pages. 01:21:15 Crazy! 01:21:21 a grease monkey is also a mechanic. 01:21:27 GreaseMonkey: Quite. 01:21:35 It is also a monkey. That is greasy. 01:21:45 anyways, back to what i was doing (teaching starnes how to rickroll on a keyboard) 01:21:52 GreaseMonkey, ouch 01:21:53 how 01:21:54 evil 01:22:03 that is just too evil 01:22:11 ha 01:22:15 "I learned a song yesterday, come see!" 01:22:20 "Dun dan dun dun dan dun-dun-dun" 01:22:21 AnMaster: there's more horrible songs than that 01:22:26 "Dun dun dun dun dun, dun-dah-dah-dah!" 01:22:35 GbMaj7, Ab, Fm, Bbm 01:23:21 * ehird likes how his irc bouncer + client handle logging the whole of #wikipedia and playing it back immediately on reconnect with only a few seconds of lag 01:24:32 also, I propose this become the next rick roll: http://uk.youtube.com/watch?v=nuyY9WjNpgs 01:24:54 -!- jix has quit ("Computer has gone to sleep"). 01:30:54 * oerjan didn't notice the # on wikipedia first, and was sorta skeptic 01:32:13 -!- Sgeo has joined. 01:45:48 oerjan: ? 01:45:50 oh 01:45:50 lol 02:04:34 GbMaj7, Ab, Fm, Bbm <-- chords? 02:04:37 not melody 02:04:47 AnMaster: yes. 02:04:50 chords. 02:04:50 GbM7 isn't much of a note. 02:05:05 kerlo, true 02:05:06 it's a series of tubes notes! 02:05:20 GreaseMonkey, so what about the actual melody? 02:05:23 does it have one? 02:05:25 or? 02:05:26 * kerlo thinks, "G flat? What kind of crazy key is this?" 02:05:40 GbM7 isn't much of a note. <-- several 02:05:59 AnMaster: it does, but chords are still good 02:06:23 also, the melody is covered by a different instrument, i think 02:06:28 maybe several 02:06:30 Let's see. A minor, five fifths down... 02:06:52 That's B flat minor, all right. 02:07:52 kerlo, I was trying to figure out the chord too 02:07:58 The key, I mean. 02:08:27 no I fail at this time of the night 02:08:31 Now someone quickly get me a program or an applet or something that can play me those chords. I don't want to wake anyone up with the piano and I'm not very good at sonification. 02:08:32 what are the keys of GbMaj7 02:08:49 kerlo, well I connected my headset to my synth 02:08:57 err keyboard/synth 02:09:01 Gb, Bb, Db, F. 02:09:06 though it probably uses samples 02:09:09 ah right 02:10:02 hm the keyboard claims that is Ebm(add9) 02:10:04 strange 02:10:06 Yell if you see a Cb or an Fb in any of these. 02:10:09 too tried to figure that out 02:10:22 kerlo, ? 02:10:30 Ebm(add9)? It doesn't even *have* an Eb, does it? 02:10:38 kerlo, no clue 02:11:02 * AnMaster pulls the power plug and hopes it helps to reset it 02:11:31 Ebm(add9) is Eb, Gb, Bb, F. 02:11:57 Gb, Bb, Db? 02:12:17 ok my fault, I hit the wrong key -_- 02:12:31 ok... 02:12:40 F#M7? 02:13:00 kerlo, does that match better? :P 02:13:15 well it would if reversed 02:13:17 Ab is Ab, C, Eb; Fm is F, Ab, C; Bbm is Bb, Db, F. 02:13:37 F#M7 is enharmonic to GbM7. 02:13:45 true 02:13:58 so yes it makes sense 02:14:00 I loathe treating enharmonics as the same, but only a little. 02:14:39 kerlo, depends on which way you take it 02:25:40 -!- Sgeo has quit (Remote closed the connection). 04:36:03 -!- Sgeo has joined. 05:19:48 -!- Sgeo has quit (Remote closed the connection). 05:29:11 -!- oerjan has quit ("Good night"). 05:48:34 -!- Sgeo has joined. 06:57:00 -!- Sgeo has quit (Read error: 110 (Connection timed out)). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:01:31 lol. my dream just reminded me i need to renew my library books xD 08:01:42 also i slept like 13 hours 08:01:44 so cool. 08:05:05 ais523: also, yay for a client that stores topic history <<< yeah i wish mine did, i mean when someone changes the topic, there's essentially no way to get the old one back. 08:09:19 ehird: freenode don't do that kind of thing. <<< freenode k-lined my friend, many times. 08:14:53 ehird: ais523: I've ran clonebots in #esoteric-blah for an okoplay. | ehird: i had another variation | ehird: with like 30 <<< dear fuck i wanna see 08:21:36 hey oklo 08:33:19 AnMaster: you've never heard about sex in the city? god i envy your style 08:37:30 oerjan: oklosol: feeling particularly bright today? <<< actually, yes. well. not the day you asked, but now. 08:39:37 AnMaster: s/the/then/? <<< no, parses as "oerjan: the (nothing is possible unless there is a rule allowing it) kind, i assume" 08:42:04 01:46… ehird: AnMaster: The centralized UK provider that handles the block blocked this page recently: http://en.wikipedia.org/wiki/Virgin_Killer [you might not want to click] <<< i still think blocking a page containing child porn as an album cover is not as bad as blocking a thousand pages of normal porn 08:42:19 (we looked through the whole finnish list, 5 pages of cp, rest was just porn.) 08:42:39 (also the 5 needed a few links forward, nothing was cp to begin with) 08:52:06 AnMaster: GreaseMonkey, so what about the actual melody? <<< 02307..7..5.....b02b5..5..3..20.02303..5..2..0b...b.5...3....... repeat iirc 08:53:35 kerlo: Ebm(add9)? It doesn't even *have* an Eb, does it? <<< it has all but it. 08:54:03 ebadd9 just drops gb a third down 08:54:14 also why am i commenting this part, you're obviously noobs :-) 08:54:41 nice. could do that without anyone commenting back 08:55:02 and took only an hour, should really get back to only taking a glance at the logs. 09:02:13 -!- oklosol has changed nick to oklopol. 09:04:02 -!- kar8nga has joined. 09:29:11 -!- tyrelle has joined. 09:29:15 hello 09:35:24 i'm here 09:35:48 oh 09:35:53 psygnisfive: sorry i missed you 09:35:55 i mean 09:35:56 of course 09:36:02 that i missed your comment, didn't see it 09:40:02 its ok 09:40:08 and i know you missed me darling dont worry 09:40:09 im here now 09:40:15 * psygnisfive coddles oklopol 09:40:19 also, im off to bed. :P 09:40:52 again? 09:40:57 have a fun 09:41:05 what do you mean again? 09:41:11 its 4:40 am :P 09:41:17 any math students 09:41:17 night <3 09:41:25 you were going to sleep when i was 09:41:27 and i just woke up 09:41:32 and you're going to sleep again. 09:41:51 tyrelle: i've had two courses! 09:47:44 -!- Corun has joined. 09:49:40 think i gotta go. cya 09:49:45 -> 09:51:31 oh brother 09:51:40 #lisp has some opinionated ops 10:11:27 -!- GreaseMonkey has quit ("You only need one wheel. Bikers are just greedy."). 11:47:26 -!- Corun has quit ("This computer has gone to sleep"). 12:26:40 -!- judotest has joined. 12:29:50 :P 12:32:46 woot 12:32:53 was that me? :S 12:32:57 -!- judotest has changed nick to Judofyr. 12:33:30 that's why the smilie didn't show up in MSN :P 12:46:29 -!- Corun has joined. 12:48:42 -!- kar8nga has quit (Read error: 110 (Connection timed out)). 12:49:04 -!- kar8nga has joined. 12:51:11 -!- jix has joined. 12:53:18 -!- jix has quit (Client Quit). 13:30:31 -!- moozilla has joined. 13:32:42 -!- metazilla has joined. 13:32:48 -!- moozilla has quit (Read error: 104 (Connection reset by peer)). 13:32:52 -!- metazilla has changed nick to moozilla. 13:45:20 -!- Judofyr has quit (Read error: 104 (Connection reset by peer)). 13:45:37 -!- Judofyr has joined. 13:55:04 -!- metazilla has joined. 13:55:04 -!- moozilla has quit (Read error: 54 (Connection reset by peer)). 13:55:14 -!- metazilla has changed nick to moozilla. 13:55:52 -!- jix has joined. 13:57:42 -!- moozilla has quit (Read error: 104 (Connection reset by peer)). 13:57:45 -!- metazilla has joined. 14:06:23 -!- Judofyr_ has joined. 14:10:18 -!- metazilla has quit (Read error: 104 (Connection reset by peer)). 14:10:23 -!- moozilla has joined. 14:12:57 -!- metazilla has joined. 14:12:57 -!- moozilla has quit (Read error: 104 (Connection reset by peer)). 14:13:05 -!- metazilla has changed nick to moozilla. 14:22:04 -!- ais523 has joined. 14:24:35 -!- Judofyr has quit (Read error: 110 (Connection timed out)). 14:24:36 * ais523 wonders how the trolling went yesterday 14:24:36 hmm... I wonder if that's interesting enough to actually open up logs to read 14:27:44 -!- metazilla has joined. 14:27:44 -!- moozilla has quit (Read error: 104 (Connection reset by peer)). 14:27:54 -!- metazilla has changed nick to moozilla. 14:29:29 Trolling esoteric language enthusiasts about their tastes in programming languages is like trying to annoy a duck by pouring water on it 14:29:34 so true 14:30:20 -!- moozilla has quit (Read error: 104 (Connection reset by peer)). 14:30:23 -!- moozilla has joined. 14:38:08 I should read the logs more often 14:47:50 -!- moozilla has quit (Read error: 54 (Connection reset by peer)). 14:47:50 -!- moozilla has joined. 14:47:57 -!- Judofyr_ has changed nick to Judofyr. 14:50:40 -!- moozilla has quit (Read error: 104 (Connection reset by peer)). 15:22:06 ehird will like this quote: "MySQL is a very fast database because it takes out the parts of a database that make it a database." 15:22:19 which explains why lots of people don't like it, and also why lots of people use it 15:42:19 -!- ehird has left (?). 15:42:24 -!- ehird has joined. 15:42:26 -!- ehird has left (?). 15:42:29 -!- ehird has joined. 15:43:16 graph serialization for the fecking win 15:43:26 graph serialization for the fecking win 15:43:28 hi ehird 15:43:40 hai 15:44:11 00:14:53 ehird: ais523: I've ran clonebots in #esoteric-blah for an okoplay. | ehird: i had another variation | ehird: with like 30 <<< dear fuck i wanna see 15:44:13 im sure i showed you 15:45:23 also, our troll was awesomely bad. 15:57:19 ehird: i read the logs. 15:57:26 and yes, you probably showed me, i just don't remembe 15:57:27 oklopol: wat 15:57:27 yes, I read the logs too 15:57:28 r 15:57:57 ehird: well i thought you were telling about the troll from last night 15:58:04 *telling me 15:58:31 no 15:58:37 was replying to ais523's logmsg 15:59:06 what do you think of the quote about MySQL/ 16:00:10 15:42 graph serialization for the fecking win 16:00:12 that was my reply 16:00:18 oh, I didn't realise 16:00:43 actually, viewing MySQL as not a database, but still useful for certain tasks, is probably best 16:00:50 ehird: yes, i know, you told that with your wat. 16:00:52 even if it isn't a database, it seems to have found itself a niche 16:01:09 what does mysql take out? 16:01:17 oklopol: just about everything 16:01:22 until recently, it had no transactions 16:01:44 oklopol: it's sort of the C of databases, it lets you do stupid and nonsensical things without complaining, and most high-level features have to be written by hand 16:01:47 transactions are one of the crucial things about irl databases that are not a part of databases as such 16:01:58 oklopol: er yes they are 16:01:59 ACID 16:02:05 of course, this means it's very fast 16:02:17 i don't actually think mysql did any of ACID until recently 16:02:42 they started a project recently, Drizzle, which aims to.. make it even less of a database, for the "web 2.0" crowd 16:02:45 i'm wondering what it'll have left 16:03:01 ehird: they aren't an inherent part of databases. 16:03:05 no. 16:03:17 cool, what does it do? 16:03:17 I actually think they're onto something here 16:03:17 printf("hello world\n")? 16:03:19 ais523: barely anything 16:03:20 never. 16:03:31 http://en.wikipedia.org/wiki/Drizzle_(database_server) 16:03:31 hmm... this morning I was thinking about an esolang idea I haven't thought about in ages, and realised I hadn't told you lot about it 16:03:41 i bet it ends up as PERSISTENT MEMCACHED 16:03:50 basically, it's an attempt to create a programming language which is as computationally powerful as possible without being TC 16:04:02 the highest "named" class in common use seems to be linear bounded automaton 16:04:09 so I thought I'd make an Ackermann-function-bounded automaton 16:04:19 i've always thought that most real world programming need not use a turing complete language 16:04:31 and that the static-verification gains you could get from using a sub-TC language 16:04:34 would be highly useful 16:04:35 Actually, none of them do 16:04:44 Slereah: they do, just the interps are buggy 16:04:44 Slereah: they use TC languages 16:04:46 just not on TC machines 16:04:50 Yes, but they don't need to 16:05:00 Because the languages can't be use to their fullest 16:05:07 Slereah: ok, lower than "TC bar memory storage" 16:05:08 happy now 16:05:08 incidentally, I was also wondering about whether it was possible to actually get a true-TC interp in the real universe 16:05:14 ais523: uh, no. 16:05:17 I think you need the universe to not expand 16:05:20 and unlimited energy 16:05:23 ehird: i mean, i do agree transactions are a crucial part of a real database system, because you need it, in practise; i'm just you could just have the database not have any errors or synchronization problems, and get by without transactions. 16:05:27 but apart from that there are no obvious obstacles 16:05:27 you need it to expand to grow the tape 16:05:32 ... 16:05:32 i'm just 16:05:35 *i'm just saying 16:05:35 also, um 16:05:36 entropy? 16:05:38 ehird: having it infinitely large to begin with 16:05:45 and free-energy, I meant 16:05:47 ais523: that's Impossible, though 16:05:50 which is sort of the opposite of entropy 16:05:58 ehird: the universe is only finitely large because it's expanding 16:06:00 Entropy isn't really a law 16:06:05 the expansion of the universe causes it to get smaller 16:06:13 ... wait, what? 16:06:14 _smaller_? 16:06:15 But you're screwed anyway on infinite time 16:06:18 which is counterintuitive, but so is most of physics 16:06:23 i'm physics-retarded, I htink 16:06:31 ais523 : What are you talking about 16:06:32 ehird: limechat is awesome! thanks for the tip :-) 16:06:36 Judofyr: yw :) 16:06:36 basically, the expansion is homogenous, so the speed at which a particular point is receding depends on its distance from you 16:06:43 the further away it is, the faster it recedes 16:06:55 So? 16:07:00 if a point is so far away it's moving away faster than the speed of light, it's technically outside the universe 16:07:03 That makes it bigger, not smaller :o 16:07:05 that's how the boundary of the universe is defined 16:07:06 i still can't think how a universe expanding gets smaller. 16:07:09 that makes no sense. 16:07:22 I think you mean "visible universe" 16:07:28 yes 16:07:29 Which is irrelevant to the discussion 16:07:35 and no, not at all 16:07:35 Slereah: no. 16:07:37 Also the visible universe gets larger also 16:07:49 clearly you can't use data outside the visible universe for calculation 16:07:56 i'm with ais523 on this one 16:08:09 Yes, if you stay on earth 16:08:20 Slereah: well, technically, but everything else expands at the same rate too, so it gets smaller compared to all the objects inside it 16:08:21 If you use a TC machine, it will need to move to read the data anyway 16:08:25 So its horizon will move 16:08:35 Slereah: its horizon always moves inwards 16:08:38 It doesn't get smaller, it gets emptier. 16:08:47 you can't move the horizon outwards except by moving faster than the speed of light, or using time travel 16:08:52 and both are believed impossible 16:09:03 (not to mention time travel gives you computational classes above TC) 16:09:04 What are you talking about. 16:09:14 Just moving will move your horizon 16:09:29 Slereah: yes, but the horizon moves inwards at the speed of light 16:09:29 hmm. 16:09:33 so we're just lucky it's so far away 16:09:41 the horizon's getting smaller, all the time 16:09:48 at least, if the universe keeps expanding 16:09:49 *larger 16:09:53 *smaller 16:10:02 Define "smaller" 16:10:09 Slereah: less distance to it 16:10:19 I'm afraid I must disagree then 16:10:19 and so a smaller surface area, because it's spherical 16:10:35 you may be thinking of it getting /older/ over time 16:10:36 "Programming language authors image gallery" <-- I thought this was a sentient language that authored a web gallery script... 16:10:57 The horizon increases in size just with time. 16:11:16 I'm not sure if it also increases with expansion, but it also might 16:11:31 does anyone want to write up a well-worded and thought-provoking seed to a Usenet flamewar, on this? 16:11:34 so we can see who's right? 16:11:35 (Doing the speed of light + enlarged metric isn't easy to do in your head) 16:12:01 Slereah: well technically not, say the universe consisted of cells of some size that was constantly getting bigger 16:12:08 and it grew faster than light would let us see 16:12:21 ehird: as for Drizzle, they're taking out all the features that you don't technically have to use in a MySQL database AFAICT 16:12:27 they seem to be making some form of tarpit 16:12:34 i still love this http://www.malevole.com/mv/misc/killerquiz/ 16:12:34 so once in a while, even though we're seeing farther and farther, the cell size would let us see less and less cells 16:12:39 e.g. you don't actually need prepared statements, you can just send the statement each time 16:12:57 oklopol : Except the universe doesn't do that. 16:12:58 i mean i don't know or care whether this is what actually happens, i'm just saying that's what i though ais523 meant. 16:13:03 Slereah: i don't care. 16:13:03 You see more cells, not bigger cells. 16:13:06 yes, that is what I meant 16:13:22 and no, expansion of the universe doesn't create more cells, at least not in the popular theories 16:13:26 Slereah: explain to ais523, not me. 16:13:28 I think steady-state theory has it doing that 16:13:43 What does "more cells" mean anyway. 16:13:53 It's continuous in general relativity 16:13:57 well, the cells are just a way of thinking about it, given they're infinitely small 16:14:02 do you know about the delta function? 16:14:09 Slereah: planck's constant or something like that getting bigger? 16:14:09 Yes, yes I do. 16:14:17 ugh 16:14:20 -14 C outside 16:14:22 way too cold 16:14:24 well, how do you know it integrates to 1, given that it's 0 everywhere and infinity at one point 16:14:27 oklopol : Not proved in any way 16:14:34 AnMaster: much colder here. 16:14:34 AnMaster: you've never heard about sex in the city? god i envy your style <-- my style? 16:14:43 the cell-size thing is sort of like that 16:14:46 Slereah: i'm sure. 16:14:48 there are no actual cells, and they're infinitely small 16:14:51 yet they're getting bigger 16:15:11 Slereah: don't respond to that "i'm sure", it was an accidental message :) 16:15:13 you know who we need in here? 16:15:16 chris pressey 16:15:23 why, does he know about this sort of thing? 16:15:29 no 16:15:32 or just because it would be great to have such a prominent esolanger? 16:15:35 yep :P 16:15:42 AnMaster: GreaseMonkey, so what about the actual melody? <<< 02307..7..5.....b02b5..5..3..20.02303..5..2..0b...b.5...3....... repeat iirc <-- what on earth is that notation? 16:15:51 AnMaster: being completely ignorant about popular culture 16:15:54 i mean, he made befunge 16:15:57 what more do you want? 16:15:58 AnMaster: glad you asked 16:16:06 ehird: Xigxag? 16:16:13 yes, yes, I know 16:16:15 but he made befunge :P 16:16:22 oklopol, sure, I don't care about popular culture 16:16:22 actually, I think AnMaster would scare him away 16:16:25 and lots of others, too 16:16:30 I don't even HAVE a tv since a few months 16:16:33 since I never used it anyway 16:16:42 AnMaster: http://www.theonion.com/content/node/28694 16:16:43 what i use for melodies, a subset that explains that little melody, "z-a0-9A-Z" are notes, from left to right, "."'s are pauses 16:16:47 AnMaster: wow, you sound just like me 16:16:50 everything is ...equilong 16:16:55 if I want to watch the news of the public service TV I can just go to their website 16:17:03 AnMaster: i haven't watched tv in years 16:17:03 I think UK users can do the same for BBC 16:17:15 oklopol: I'd guessed hexadecimal with . to continue notes 16:17:18 so I was almost right 16:17:19 and i don't care about *physics*, let alone pop culture 16:17:27 -!- oerjan has joined. 16:17:36 and still i know what sitc is 16:17:39 and i don't care about *physics*, let alone pop culture 16:17:40 what i use for melodies, a subset that explains that little melody, "z-a0-9A-Z" are notes, from left to right, "."'s are pauses <-- left to right of what? 16:17:43 and took only an hour, should really get back to only taking a glance at the logs. 16:17:47 AnMaster: yes 16:17:48 that may be for the best. 16:17:49 where do you begin? 16:17:51 I mean 16:17:52 z is the lowest 16:17:55 Z is the highest 16:17:57 oklopol: that has to be one of my favourite lines of yours ever 16:17:57 oklopol, on what instrument? 16:18:00 it sums you up so well 16:18:06 AnMaster: singing 16:18:10 but that's the main melody 16:18:15 who cares what the instrument is 16:18:33 i don't believe in existence 16:18:35 oh fuc--------- 16:18:44 caring about instruments is for people who don't understand music, you know, the kind of people who like music that "sounds good" 16:18:52 -!- Epic_Fail_Guy has joined. 16:18:53 ais523 : It's not, it's just defined like that, not by infinity. 16:18:55 :D 16:19:14 Was I saying. 16:19:15 ais523: heh, thanks, i liked that line too 16:19:19 ehird: don't put descartes before the horse 16:19:20 oklopol, well 1) I can't sing, but I can play the piano a bit 2) If I could sing I would be really low bass I think 16:19:28 Epic_Fail_Guy: if you're talking about the delta function like that, you're missing its essential esoness 16:19:29 * AnMaster has a really low voice 16:19:42 oerjan: ugh 16:19:49 AnMaster should have a Standard Context pack of lines which he just links to so he doesn't have to say the same things 16:19:51 every five seconds 16:19:54 did you have that pun prepared? 16:20:13 ehird, what did I repeat? 16:20:22 AnMaster: i know all that, like ehird pointed out. my point is, just use any instrument 16:20:27 it's the same melody no matter what you use 16:20:37 * AnMaster has a really low voice <-- one of your standard lines 16:20:46 along with "i recommend emacs" 16:20:46 * AnMaster greps to check 16:20:46 oklopol: in some cases the instruments can affect the harmony 16:20:56 if it's correct, i just woke up and didn't really try playing it in my head to check it or anything. 16:20:59 such as an organ with a 3/7 stop, or one of the other silly ones 16:21:21 ais523: no, but it was recycled of course 16:21:28 ais523: umm. what do you mean? 16:21:30 er that may mean yes 16:21:37 ehird, I said it just once the last 3 months, and that was the instance I said just now 16:21:38 oklopol: gggggggggggggggggggggggg 16:21:41 I rotate logs every 3 months 16:22:05 wait, sorry, cleaning my keyboard 16:22:05 oklopol: I meant, organs have 'stops' which let you automatically add harmony 16:22:05 it's alright if organs have a 3/7 stop, unless of course it's the heart 16:22:12 a 3/7 stop will add a note whose frequency is 3/7 higher than the one you play 16:22:17 and sorry about that. 16:22:18 as a chord with it 16:22:30 it's one of the silly ones, most of the stops are at frequencies which actually correspond to chords 16:22:36 or at least notes 16:23:11 ais523: right. i didn't know it does that 16:23:20 -!- jix has quit ("..."). 16:23:27 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg 16:23:31 ugh, my g key is still dirty 16:23:36 anyone here know how to clean keyboards? 16:23:45 -!- jix has joined. 16:23:51 ais523: i thought you were grinning widely 16:23:58 ais523: use water :P 16:24:08 * oerjan swats ehird -----### 16:24:10 anyway, something played with an instrument will always just be an approximation of the pure sine/square wave melody 16:24:12 not in a position to do that easily right now 16:24:16 although I may try when I get home 16:24:25 oklopol: well, yes 16:24:30 if you have a 3/7 stop there, it will be closer to being an approximation of having that higher note there. 16:24:31 although square waves aren't exactly pure 16:24:34 -!- Slereah2 has joined. 16:24:34 ais523: take the key out and figure something out 16:24:35 >:| 16:24:37 well no, they're not 16:24:54 ehird: I've never tried to remove a keycap from this laptop, I have no idea how securely or not they're glued on 16:24:59 and I don't want to break it 16:25:00 oh, a laptop 16:25:08 I know they just come off on desktops, not sure about laptops though 16:25:16 ais523: well, it'll almost certainly come off OK 16:25:18 but it might be a bit tricky 16:25:27 oklopol: actually, organs are pretty similar to additive synthesizers 16:25:33 ofc they don't manage perfect sine waves to add together 16:25:44 but you get to add together a lot of organ-waves to create the timbre you want 16:25:44 my organs synthesize things, then add them 16:26:06 Hm 16:26:09 Organ wave. 16:26:13 (It's also not a function) 16:26:17 (So there) 16:27:17 organ waves are all in the blood 16:27:19 ais523: i don't like timbres. i'm more of a theoretical musician, so i prefer keeping it all pure and ...sinous? yes, that must be it. 16:27:35 who wants to help me write a Magenta compiler? 16:27:36 yes, I know about the curse :-P 16:27:57 oklopol: sinusoidal is the real word, but I prefer yours 16:28:06 i am already cursed. i wouldn't want to add to it. 16:28:07 and no, I don't want to help 16:28:26 mostly because if you succeed, you'll break the curse, then Magenta won't be so interesting to talk about 16:28:39 in a way, I'd prefer you to fail so we can all have a laugh about it and talk about how Magenta is truly cursed 16:28:49 but if I want you to fail, then I shouldn't really work on the project, that wouldn't work out well 16:28:51 sine -> sinusoidal? does sine come from a longer word i don't know or whazz thaddabout? 16:29:01 well sinusoid prolly 16:29:09 English makes no sense, but it might be fun to look up 16:29:30 oklopol: sine <- sinus, latin 16:29:38 ais523: i think it's interesting :P 16:29:46 adding -oid to that is probably not very classical 16:29:50 oerjan: and what's this oidal subbic?= 16:29:52 hmm... Wiktionary doesn't know, but apparently "sinusoidal" is "sinimuotoinen" in Finnish 16:29:52 ... 16:29:55 *suffix. 16:29:58 and that's the only translation given 16:30:19 sinimuotoinen = of sinusoidal form 16:30:26 hmm... an ellipsoid is a 3D shape which corresponds to what an ellipse is in 2D 16:30:30 lol 16:31:04 -oid is a greek suffix i think, put on things to make family names in biology. like hominoid 16:31:11 well. "of sine form", we don't want recursive translations 16:31:25 ais523, hm what is a 3/7 stop on an organ? I have no clue how organs work apart from blowing air through pipes 16:31:25 oh it may be -o + ides 16:31:36 the latter meaning offspring 16:31:46 * oerjan should check 16:32:05 ais523: well yes, i know what oid *means*, i just meant what's it doing there 16:32:07 AnMaster: organs are so complicated because they have one pipe for each stop/note combination, more or less 16:32:19 hmm. i didn't really ask it that way. 16:32:21 ais523, I thought it was one pipe / note? 16:32:23 -!- Slereah has quit (Connection timed out). 16:32:24 and all the stops basically multiply or divide the frequency of a note by a given value 16:32:24 also, what is a stop 16:32:31 ais523, huh 16:32:35 strange 16:32:37 stops you can either turn on or off, they're like booleans 16:32:48 and when you play a note, you get the sound of that note for each stop that's on 16:32:55 AnMaster: stops flow of air, presumably 16:33:01 normally organs have multiple keyboards, and stops can be on or off for individual keywords 16:33:02 hm reminds me of the university organ in Discworld, with "silly fam animal sounds" 16:33:05 *keyboards 16:33:06 farm* 16:33:13 http://en.wikipedia.org/wiki/-oid 16:33:14 and I think that's the etymology 16:33:40 it goes all the way from 1/16 stops which are so low that you can't actually hear them, just annoy the Headmaster because for some reason the pipes come out directly behind his chair 16:33:44 err. oerjan: what does sinus mean? 16:33:48 to stops with numbers like 4 16:33:53 i mean i thought it meant what "oid" meant 16:33:54 AnMaster: s/fam/farm/ ? 16:33:54 ais523, hm I see, I thought the multi-keyboard thing was due to having such a large range 16:34:01 oerjan, farm* 16:34:03 which is why i didn't understand why the suffix 16:34:22 oklopol: "bukt" although it is a mistranslation from arabic iirc 16:34:28 oklopol: sinuses are the parts of the human body which connect the nose to the back of the mouth, IIRC 16:34:32 or possibly to the ears 16:34:34 oh. 16:34:38 * oerjan doesn't remember the english word 16:34:42 but I think that's irrelevant, at least I hope it is 16:34:55 ohhhhh 16:35:10 ais523, you could hear 1/16 for the notes at the upper end of the range 16:35:13 lol i thought -oid meant like "ball" :D 16:35:31 at least I think so 16:35:32 i've probably reverse-engineered it from ellipsoid 16:35:54 makes things more clear. 16:35:59 also explains monoids and the like 16:35:59 :D 16:36:05 i've always wanted a language that can jump through the calls tack 16:36:06 so "like a sine", in this case 16:36:16 ais523, also do you know what the similarity is between organs and MRI scanners? 16:36:17 ;P 16:36:25 AnMaster: is this an attempt to make a pun? 16:36:28 ais523, yes 16:36:31 if so, I utterly fail to get it 16:36:34 or maybe no 16:36:35 not pun 16:36:37 joke yes 16:36:37 also "asteroid" could have a ball etymology 16:36:39 but not pun 16:36:43 oklopol: oh, "bay" in english 16:36:45 ais523, "neither is portable" 16:36:58 oerjan: bay? you mean sinus? 16:37:06 oh 16:37:11 ais523 already explained. 16:37:16 according to Wiktionary, the Latin word "sinus" has loads of meanings 16:37:19 all of which seem to be irrelevant 16:37:19 yes. but the use for trigonometric sines is a mistranslation from arabic 16:37:30 a(x) { 16:37:30 x = x + 1; 16:37:32 A: return x; 16:37:33 } 16:37:34 ok, that would explain a lot 16:37:34 ais523: the "See also: sine" at the bottom 16:37:36 b(x) { 16:37:38 x = x - 1; 16:37:39 goto A; 16:37:41 } 16:37:44 guess what b(3) returns 16:37:48 also i've known what sinuses are like forever 16:37:48 um 16:37:50 ehird: 2? 16:37:53 ais523: yep 16:38:01 ais523, what is the thing about bays and sin() that you are discussing 16:38:05 why the fuck did i ask. 16:38:05 in a, "x" is now a reference to the first local var 16:38:07 I'm unable to figure out what the topic is 16:38:13 ehird: ick_ec can do that 16:38:13 and b has a var in the same position 16:38:15 almost 16:38:16 so it ends up accessing that 16:38:19 and returning it 16:38:36 basically, i'm trying to make a language where you can goto/comefrom ----anywhere----- 16:38:47 even in in while () 16:38:52 oklopol: don't worry, people on IRC are there to help when you're too lazy to do your own remembering 16:38:57 I know it helps me when I'm in that state 16:38:59 ehird, cool 16:38:59 which is quite often 16:39:11 ehird: well, famously asm works like that 16:39:22 well i just had 6 hours of band training 16:39:23 as can INTERCAL, fwiw 16:39:27 that was kinda tiring. 16:39:28 -!- Epic_Fail_Guy has quit (Read error: 110 (Connection timed out)). 16:39:41 oklopol: I'm not criticising you, it happens to everyone 16:39:42 well of course asm works like that 16:39:45 just most people don't admit it 16:40:08 well yes, but i'm very insecure about my intelligence. 16:40:13 hmm 16:40:20 not insecure... blargh. 16:40:38 * oklopol bangs head to wall 16:40:44 But how many of us actually run an operating system that Richard Stallman would consider free? 16:40:53 a(x) { 16:40:53 while (A: (x -= 1) > 0) { 16:40:54 printf("hello world\n"); 16:40:56 } 16:40:58 } 16:40:58 oh dear, someone mod the article flamebait again 16:41:00 b(x) { 16:41:01 goto B; 16:41:04 comefrom A; 16:41:06 printf("x = %i\n", x); 16:41:08 B: a(x); 16:41:09 } 16:41:11 discuss(ting) 16:41:18 and yes, that -actually works- 16:41:28 ehird: would the comefrom only happen if you called B, not A directly? 16:41:38 also, what's the precedence of label vs. > 16:41:38 ais523: i think so, yes 16:41:40 ais523, how many gNewSense users are there? 16:41:46 also, label is high precedence 16:41:47 and how many Hurd users are there? 16:41:50 so it's A: (...) 16:41:53 add them toegether 16:41:53 AnMaster: I don't know, but I'd guess less than use Ubuntu 16:41:56 together* 16:42:00 haha, "dynamic comefrom scope" 16:42:06 oklopol: yes 16:42:10 ais523, well that is the answer to But how many of us actually run an operating system that Richard Stallman would consider free? 16:42:16 AnMaster: latin "sinus" means "bay" 16:42:29 i like how you have to do the goto B; thing so that you never land on it directly 16:42:30 AnMaster: I was commenting more on the fact that Slashdot are trying to inspire debate about a contentious topic, than the actual question 16:42:36 hmm 16:42:38 ehird: please use that term in the spec like it's a standard term, not explaining further. 16:42:39 I should have no return 16:42:44 ehird: what happens if you hit a comefrom directly? Nothing, like in INTERCAL? 16:42:48 just a way to get a reference to the label of the caller 16:42:50 to go to it 16:42:55 also, "pocket", "curve", or "bosom", says wp 16:42:56 and a way to assign to the right variable in the caller 16:43:00 also, gerund comefroms plz 16:43:02 ais523: hmm 16:43:11 i like how you have to do the goto B; thing so that you never land on it directly 16:43:12 hm 16:43:19 ais523: hitting {comefrom A;} directly goes to A 16:43:20 just an idea... 16:43:22 comefrom +; 16:43:25 so that the rest runs, but you do _come from_ A 16:43:28 a+=1; b-=1; 16:43:36 + isn't a label 16:43:37 ehird: haha 16:43:44 ehird: no, that's what I meant by gerund comefroms 16:43:50 maybe 16:43:54 ais523: i dont' get it 16:43:56 oklopol: i will 16:43:57 gerund nextfrom would be more useful, actually 16:44:07 ehird, conditional come from? 16:44:08 nextfrom +; number_of_additions++; resume 1; 16:44:13 I know ick has computed come from 16:44:18 AnMaster: just put your comefrom in an if () 16:44:23 example: 16:44:25 ehird: that doesn't work 16:44:28 ehird, really? that will work? 16:44:28 no, it does 16:44:30 watch: 16:44:33 because you want to be able to jump into the body of ifs, don't you? 16:44:36 (warning: this is perverse...) 16:44:41 * ehird writes 16:44:43 ais523, yes 16:44:47 oh, comefroms only become active inside the block they're in 16:44:48 so it does work 16:44:55 ugh, that's worse than INTERCAL 16:44:58 wait what? 16:45:04 can't you come from anywhere? 16:45:04 although arguably leads to more maintainable code 16:45:12 AnMaster: yes, but comefroms are dynamically scoped 16:45:16 so they're not active all the time 16:45:27 ais523: well you can probably comefrom into inside a block, if the label is inside the block from where the coming occurs 16:45:36 sort of if you write {int a;} {a=1;} in C, you get an error 16:45:39 ais523, ouch ouch ouch 16:45:47 ais523: nah, you will be able to jump into them manually 16:45:49 i mean { ... conditional comefrom A: ... } ... A: ... 16:45:50 it just won't happen automatically 16:46:07 isn't this _awful_? :D 16:46:11 ehird: nextfrom too, plz 16:46:16 dijkstra is cutting himself in his grave 16:46:19 it's just as useful in practice 16:46:20 ais523: wut 16:46:22 ais523, what is nextfrom in ick now again? 16:46:28 AnMaster: like comefrom, but saves return address 16:46:33 ah 16:46:33 well 16:46:38 that should be manual 16:46:38 ais523: oh so comefrom with a stack? 16:46:39 like: 16:46:40 CLC-INTERCAL had it first 16:46:41 ehird: yes 16:46:44 exactly that 16:46:52 ais523: all of my gotos/comefroms/function calls have a "stack" 16:46:57 yay 16:47:00 in that they can get a reference to the right place to goto 16:47:00 ais523: i think it's already with a stack, although locals overwrite the top of it 16:47:03 from whence you came 16:47:09 *stack++ = &this_function_name_goes_here; goto ... 16:47:10 thats how you return a value 16:47:12 then the other one does 16:47:26 goto *(--stack) 16:47:29 or something like that 16:47:34 looks something like this: 16:47:41 well different syntax than that I gues 16:47:45 but something like it 16:47:47 a(x) { x = x + 5; goto ->; } 16:47:56 then 16:48:01 so how do you undo the previous comefrom? 16:48:01 in intercal, it would be RESUME #4 to undo the last 4 nextfroms, for instance 16:48:01 a(1) evaluates to 6 16:48:05 oh and yes the #4 can be computed 16:48:07 ais523: goto ->; 16:48:15 ehird: uh-oh, that's exactly how gcc-bf actually implements function calls 16:48:19 HAHA 16:48:24 ais523, wait what!? 16:48:35 I call goto ->; the "finnish maneuver" 16:48:46 because you do it when you "finnish" your function! 16:48:48 AnMaster: what, how would you do it? 16:48:52 somebody call the pun police 16:48:55 oerjan! 16:49:00 ais523, ? 16:49:12 AnMaster: well, I had to implement function calls somehow 16:49:13 ais523, well I haven't considered that 16:49:18 I though you used a switch case 16:49:22 to select block 16:49:32 yes, that's how goto is implemented 16:49:41 what was above is how function calls are implemented in terms of goto 16:49:45 so there isn't a contradiction 16:49:45 ais523, oh return you mean 16:49:49 call/return, yes 16:49:55 right 16:50:03 exactly what does goto -> do? 16:50:07 i explained that. 16:50:15 ehird, yes but I didn't understand it 16:50:16 goto *--TOS 16:50:19 ah 16:50:19 -> is a label reference to the exact point one up in the goto stack 16:50:19 right 16:50:20 ok 16:50:31 ehird: does it pop the stack at the same time, or does the goto do that? 16:50:31 ->+1 is two levels up 16:50:35 ->+10 is ten levels up 16:50:37 actually, does the goto pop two levels when returning? 16:50:38 ehird: will the local variable x, after goto ->;, overwrite whatever local was created last in the calling function? 16:50:39 yes, overloading addition on label references 16:50:42 it works on every label reference 16:50:44 I am so perverse 16:50:52 and yes, that means you can do A-2 even if you haven't gone anywhere near A 16:50:59 ehird: heh, finds the label in the stack, then moves 2 away from it? 16:51:00 and get a reference to the point two levels up from A 16:51:04 ehird, why do you have functions at all? 16:51:06 ais523: something like that 16:51:11 AnMaster: well, good point 16:51:15 just do it all with labels 16:51:22 ehird, too close to basic 16:51:23 so 16:51:25 no no no 16:51:26 AnMaster: presumably the functions are to generate infinite data storage 16:51:28 they're nested, scoped labels. 16:51:32 ais523, oh? 16:51:41 well, you need infinite data somehow 16:51:44 true 16:51:48 nested scoped labels, hmmmmm 16:51:51 { var a = 0; var b = 0; call smth } { smth: var x = 5; goto -> }, what will a and b be after that? 16:51:51 ais523, infinite next stack 16:51:55 ehird: ^ 16:51:58 AnMaster: that's only one stack 16:51:59 oklopol: lemme look 16:52:10 ais523, you need to have local variables somewhere 16:52:10 oklopol: a will be 5 16:52:17 because it's on the same position in the local variable storage as a 16:52:18 and it should be common knowledge here what happens if you only have one stack, and no way to index arbitrarily deep into it so it isn't really a stack 16:52:20 pretty muchers 16:52:20 ais523, also you could just add array variables 16:52:22 i thinky 16:52:23 i dunno 16:52:24 lol 16:52:25 AnMaster: that's cheating 16:52:30 this is #esoteric 16:52:34 in fact, this thing really fucking confuses me 16:52:36 ais523, hm true 16:52:38 i don't get the semantics at all 16:52:43 I think it's a huge heap of special cases 16:52:43 besides, you can't have infinitely large arrays without bignum dimensions 16:52:46 ehird: why a? i mean wouldn't b be on top of the stack 16:52:51 oklopol: ok maybe 16:52:52 I don't know 16:52:53 or bignum numbers of dimensions, I suppose 16:53:01 hmm 16:53:05 I think we strayed away from this a bit 16:53:07 when we got into -> 16:53:12 I can imagine a lang where all arrays were indexed 0 to 1, but could have bignum numbers of dimensions 16:53:13 let's rewind a bit to the while (A: ...) & comefrom example 16:53:14 and go from there 16:53:22 ehird: no, it's just starting to get interesting 16:53:23 and anyway, you're just reinventing INTERCAL with a different syntax 16:53:30 ehird, what is the name of the language? 16:53:33 ais523: i'm not now, i'm rewinding 16:53:38 oklopol: yes, but let's rewind to get a better picture 16:53:41 AnMaster: i don't know! 16:53:59 ehird, also an idea: cometo 16:54:05 like goto and comefrom combined 16:54:08 so you do like 16:54:18 hmm. 16:54:32 { A: foo; } { B: bar; } { C: A cometo B } 16:54:54 so that means it will act as if there had been a "comefrom A" at B 16:55:01 dynamically scoped of course 16:55:07 18:52… ais523: and it should be common knowledge here what happens if you only have one stack, and no way to index arbitrarily deep into it so it isn't really a stack <<< what do you mean not really a stack? 16:55:08 ehird, what do you think of that idea? 16:55:08 AnMaster: code injection? 16:55:12 ais523, certainly 16:55:15 that's pretty much the definition of a stack 16:55:21 ais523, non-local effect too 16:55:27 i like it. 16:55:30 oklopol: if you can index arbitrarily deep without popping, it's basically an array which also has stacklike operations 16:55:39 AnMaster: that doesn't really work, it doesn't scale, semantically, methinks 16:55:44 will not have any uses, that is 16:55:45 oklopol, oh? 16:55:49 ehird: AnMaster; I've been looking for a way to do that in INTERCAL for a while 16:55:54 it's possible to do it right now, but hacky 16:56:09 AnMaster: what does it mean exactly to act as if it came from A? 16:56:11 anyway 16:56:12 just adding it as a new command didn't actually cross my mind for some reason 16:56:14 a(x) { 16:56:15 x = x + 1; 16:56:16 A: return x; 16:56:18 } 16:56:20 b(x) { 16:56:22 x = x - 1; 16:56:24 goto A; 16:56:26 } 16:56:28 a(x) { 16:56:30 while (A: (x -= 1) > 0) { 16:56:32 printf("hello world\n"); 16:56:34 } 16:56:34 oklopol: it's effectively self-modifying code, just dynamically scoped 16:56:36 } 16:56:38 b(x) { 16:56:39 so it unmodifies itself when you leave the block 16:56:39 goto B; 16:56:42 comefrom A; 16:56:44 printf("x = %i\n", x); 16:56:44 ais523: oh, i guess i misread your negations then 16:56:45 B: a(x); 16:56:47 } 16:56:50 let's go from thar 16:56:52 oklopol, like if C had comefrom A; goto B; but C will never end up on the stack 16:56:54 thought you said it's not a stack if you can't access all indices 16:57:08 http://www.cobolportal.com/index.asp?bhcp=1 16:57:19 oklopol, also if something was comefrom C it wouldn't affect it 16:57:25 AnMaster: ohhhhhh 16:57:29 i misunderstood it 16:57:34 oklopol, oh? 16:57:36 yeah that's an awesome instruction 16:57:41 oklopol, haha 16:57:47 cometo should be an unary operation 16:57:50 i don't know how 16:57:51 well i thought hitting that instruction would somehow flip A on top of stack, then call B 16:57:51 but it should 16:58:01 ehird, well it would be hard to do 16:58:08 if you can figure it out sure 16:58:13 but yeah, it just says "if, while this block is on stack, you hit A, goto B" 16:58:32 I must get back to thinking about DO INEVITABLY 16:58:40 which was a primitive which let you implement that sort of thing and more 16:58:44 wait 16:58:44 ais523: finally? 16:58:45 oklopol: 16:58:48 it basically meant "do this statement, but not quite yet" 16:58:49 that's just 16:58:49 "finally {}" 16:58:50 comefrom A; goto B; 16:58:52 idiots 16:58:55 :D 16:58:56 oklopol, no no, that would be: "C: camefrom A to B" 16:58:57 :P 16:58:58 the statement ran, but delayed a couple of cycles 16:58:59 see? 16:59:01 you're idiots. 16:59:02 ehird, what do you think of that one then? 16:59:03 listen tomeeeeeeeeeee 16:59:12 A cometo B 16:59:13 --> 16:59:15 comefrom A; goto B; 16:59:19 comefrom A; goto B; 16:59:21 ehird: that was the hack I was planning to use 16:59:21 not exactly 16:59:25 ehird: yes i heard 16:59:26 ehird, different 16:59:26 ais523: that's not a hack :P 16:59:28 AnMaster: how 16:59:28 it doesn't work, because it disrupts the callstack 16:59:34 ais523: ok, use nextfrom them 16:59:34 you end up with two entries rather than 1 16:59:35 then 16:59:40 ehird, 1) that will put the location of "goto B;" on the stack frame 16:59:52 well that's easy, just destackerize it or whatever 16:59:52 if you have separate comefrom/nextfrom, it works 16:59:54 ehird, 2) it will be affected by any comefrom at the location of comefrom A 17:00:17 except in INTERCAL it still doesn't work in all cases, it works for fixed labels A but not for gerunds 17:00:23 which is why you need hacks 17:00:28 ehird, 3) wouldn't this goto B when it was first executed? 17:00:34 since it is dynamically scoped 17:00:34 AnMaster: just goto out of it 17:00:41 hmm... you might be able to manage it for cometo by mixing nextfrom and forget, but not for nextto 17:00:41 { goto X; comefrom A; goto B; X: } 17:00:47 ah right 17:00:51 you don't create a new block of scope 17:00:55 so it still applies 17:00:56 right 17:01:07 just have a way to write "stack functions", that don't work on the normal stack, and that can be called to alter it 17:01:08 also AnMaster 17:01:10 isnce there's a comefrmo 17:01:13 it'd actually goto A 17:01:14 ehird, still the return issue is unsolved 17:01:14 then come from A 17:01:16 then go to B 17:01:16 unless you do 17:01:18 :D 17:01:35 { goto X; comefrom A; goto B; goto ->; X: } 17:01:42 oklopol: INTERCAL solves that problem by making all stack manipulation implicit 17:01:42 yeah 17:01:44 that's what I was thinking AnMaster 17:01:54 you could just make it a function 17:02:06 ehird, still this wouldn't work for goto ->+2 17:02:11 cometo(A,B) { goto X; comefrom A; goto B; goto ->+1; X: } 17:02:11 ais523: and i'm essentially saying maybe you could try making it explicit 17:02:12 then 17:02:13 or whatever the syntax was 17:02:14 cometo(A,B) 17:02:25 ehird, err, what if B does goto ->+10 17:02:28 then it would be one off 17:02:33 AnMaster: modify -> 17:02:35 just have it be implicit for the functions that have an explicit view of the stack under them 17:02:36 since that code would be skipped 17:02:43 ehird, what if you can't modify B's code? 17:02:46 cometo(A,B) { goto X; comefrom A; -> = -> + 1; goto B; goto ->; X: } 17:02:52 ehird, AH! 17:02:54 also 17:02:55 - 1 17:02:56 AnMaster: MWAHAHAHAHAHA :D 17:02:57 not + 1 17:02:58 also 17:02:59 er 17:03:00 yeah 17:03:03 cometo(A,B) { goto X; comefrom A; -> = -> - 1; goto B; goto ->; X: } 17:03:11 err 17:03:11 i think my brain just broke 17:03:12 wait 17:03:12 no? 17:03:13 :DDDDDDDDDD 17:03:18 ehird, I'm unsure 17:03:22 AnMaster: well, -1 17:03:24 i think 17:03:24 is best 17:03:26 ah yes 17:03:28 since the stack goes downwards 17:03:31 -!- ais523 has quit (Remote closed the connection). 17:03:33 oh 17:03:33 but seriously, what 17:03:35 right 17:03:35 XD 17:03:38 -!- ais523 has joined. 17:03:41 cometo(A,B) { goto X; comefrom A; -> = -> - 1; goto B; goto ->; X: } 17:03:44 THAT JSUT DOES NOT MAKE SENSE 17:03:47 and even that doesn't solve the problem, because what if the code at B wants to return more than one level at once? It'll have to add 1 to the distance to return, for no reason obvious to it 17:03:52 ais523: no 17:03:52 cometo(A,B) { goto X; comefrom A; -> = -> - 1; goto B; goto ->; X: } 17:03:56 ehird, I think the goto -> will never be executed 17:03:56 ehird: aha 17:04:03 AnMaster: oh, right 17:04:03 it won't 17:04:05 you've just added yet another INTERCAL operator 17:04:06 cometo(A,B) { goto X; comefrom A; -> = -> - 1; goto B; X: } 17:04:08 ais523: no 17:04:09 that's "FORGET #1" in INTERCAL 17:04:12 I'm generalizing the whole control flow thing 17:04:15 yes 17:04:22 also, intercal isn't quite as hectic as this 17:04:26 I still think you're reinventing INTERCAL, though 17:04:27 this is completely freeform 17:04:43 also 17:04:43 ehird, what about return values? 17:04:49 INTERCAL has no label refs apart from constant ones and -> 17:04:50 and it's completely freefrom in INTERCAL too, if only because it's sufficiently low-level that "inside expressions" in your lang = "between statements" in INTERCAL 17:04:56 and wrong 17:04:56 as my cometo shows, they can be passed around 17:04:57 ehird, you could use a global variable for it 17:05:00 computed COME FROM 17:05:00 like $return 17:05:03 or whatever 17:05:03 ais523: yes 17:05:05 that's different 17:05:10 and you can do computed gotos too 17:05:11 AnMaster: no 17:05:12 just not directly 17:05:15 ehird, no? 17:05:16 you make it so that the func you returns to 17:05:16 it takes a few statements 17:05:17 oerjan! 17:05:17 gets teh value 17:05:20 on the top of the stack 17:05:27 ehird, right... 17:05:30 givemeatwo() { a = 2; goto -> } 17:05:30 ehird, example? 17:05:32 ehird: well, yes, that's the normal way to do call/return in INTERCAL 17:05:33 * oerjan belatedly puts ehird in handcuffs for punning without a license 17:05:37 since a resides on the top of the stack 17:05:41 ehird, ouch 17:05:42 givemeatwo() evaluates to 2 17:05:46 because when you go back, it's still on the top of the stack 17:05:48 as the result 17:05:49 :DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD 17:05:52 * oerjan then gives up reading the channel again 17:05:56 ehird, err no 17:05:57 only difference is that scoping is explicit 17:05:57 -!- ais523 has quit (Remote closed the connection). 17:06:01 AnMaster: oh yes 17:06:03 the goto -> will have popped it 17:06:06 nope 17:06:10 not using a stack there 17:06:11 or is the call stack separate? 17:06:14 the value stack stays the same 17:06:16 oerjan: the beginning was actually pretty interesting 17:06:18 -!- ais523 has joined. 17:06:25 [17:05] ehird: well, yes, that's the normal way to do call/return in INTERCAL 17:06:27 [17:05] only difference is that scoping is explicit 17:06:30 we saw 17:06:35 ah, I didn't realise 17:06:36 ehird, ouch that means you will have to remember to pop the stack of any local variables before returning 17:06:39 how would you do it 17:06:40 of course, i now believe ais523 in that all this is already intercal 101 17:06:46 my connection must have dropped for recieve but not send, for some reason 17:06:52 *receive 17:06:53 AnMaster: um, let me think 17:06:58 hmm 17:07:01 just don't do that 17:07:01 xD 17:07:03 AnMaster: RETRIEVE .2 + .3 + .4 17:07:05 or whatever 17:07:10 we're talking about my language, ais523 17:07:12 ehird, hm? 17:07:20 ehird: ok, well INTERCAL gives each variable name its own stack 17:07:24 ehird, it would make variables kind of useless 17:07:25 so you can use them all synchronized for scoping 17:07:27 AnMaster: nope 17:07:34 just take the variables from your caller 17:07:36 or you can have two different interlocking scoping schemes, if you like 17:07:37 and put them back before returning 17:07:41 you could write a function to do it 17:07:49 just do ->-2 in the function, and examine the variables 17:07:50 ehird, you need to know who your caller is 17:07:51 put them on the stack 17:07:53 then goto -> 17:07:55 AnMaster: you do 17:07:56 -> 17:07:57 to know what number of variables it has 17:08:04 -> is the reference to your caller 17:08:08 hm 17:08:09 ok 17:08:15 imagine C where you could write { braceint a = 2; /* a valid */ [ bracketint b = 3; /* a and b valid */ } /* b valid */ ] /* neither valid */ 17:08:32 ais523, haha 17:08:51 INTERCAL's like that, except you can have a practically unlimited number of independent scoping mechanisms 17:08:52 ais523: i like that 17:08:59 (although there are only finitely many variable names) 17:09:03 WHAT. A ONE CHARACTER DOMAIN NAME. 17:09:03 WANT. 17:09:15 oh? 17:09:16 wher? 17:09:18 *where? 17:09:21 Over there! 17:09:25 ais523, believe it or not, but I actually wanted something like that when doing "serious" programming recently 17:09:47 ehird: plz show me i can't see. 17:09:51 oklopol: look closer 17:10:04 AnMaster: I've said several times before that INTERCAL's control flow is really nice and actually suited to serious programming, just the lang isn't because its expressions are bad and string handling is awful 17:10:10 only I didn't think anyone was listening 17:10:22 ehird, what tld? There are so many now when since ICANN did that thing with them... I can't find witch one 17:10:24 ehird: is it a whitespace character, by any chance? 17:10:28 AnMaster: .cx 17:10:29 ais523: no 17:10:35 ehird, ah 17:10:41 also, whose was .cx originally? 17:10:45 cook islands 17:10:47 before it got taken over by goatse? 17:10:48 err 17:10:48 no 17:10:50 that's .ck 17:10:54 well, .co.ck 17:11:00 ah 17:11:01 christmas island 17:11:01 checkoslovakia iirc? 17:11:05 http://en.wikipedia.org/wiki/Christmas_Island 17:11:05 ah no 17:11:10 AnMaster: that isn't even a real country any mroe 17:11:11 ehird, that should be .xmas 17:11:12 IMO 17:11:13 it got split into 2 17:11:17 Population 17:11:17 - 2006 estimate1,493 (n/a) 17:11:19 ais523, oh right true 17:11:21 and all country codes are two chars 17:11:22 AnMaster: tat makes no sense :P 17:11:37 ais523, ah true 17:12:17 ehird, hm for balance I still think you need cometo and gofrom 17:12:23 quick! what's your favourite shade of gray? 17:12:26 in hex 17:12:27 192 17:12:31 in hex 17:12:31 c0c0c0 17:12:40 and I said 192 before you said in hex 17:12:40 * AnMaster don't know 17:12:44 darker? :D 17:12:59 010101 17:13:23 why would you ask grey especially in hex? 17:13:23 #eee 17:13:34 actually no 17:13:40 because you don't want people to do it the hard way? 17:13:41 #fefefe 17:13:47 that is my favourite grey 17:13:49 AnMaster: that's pretty light 17:13:58 lol 17:14:00 fefefe shows as white on every screen 17:14:00 ais523, yes I prefer white over grey 17:14:01 i think 17:14:04 that just about sums up me and AnMaster 17:14:04 so light that it would probably go out the other side of white on my screen at some angles 17:14:05 :D 17:14:13 19:12… oklopol: 010101 || 19:13… AnMaster: #fefefe 17:14:21 ha 17:14:21 agreed 17:14:34 WE'RE THE SAME ONLY OPPOSITES 17:14:35 ... 17:14:39 my screen's weird, it gets darker and darker as you adjust the angle (or lighter and ligher in the other direction), until it goes past the blackest or whitest colour and comes out the other side 17:14:41 drinking time -> 17:14:42 in inverse video 17:14:43 oklopol, oh hm, this is some classical symbology(sp?) in that I think 17:14:50 ais523: that's not odd 17:14:53 that's typical LCD behaviour 17:14:55 well, yes 17:15:00 oklopol, like evil and good 17:15:01 typical LCD behaviour is weird, though 17:15:02 or something 17:15:07 (I even know how it happens, to some extent) 17:15:25 yes, 010101/fefefe is one of the texts in those jing-jang t-shirts 17:15:27 ais523, how does it happen 17:15:30 I don't know 17:15:36 AnMaster: do you know how an LCD works? 17:15:38 oklopol, "jing-jang t-shirts"? 17:15:46 AnMaster: it's ying/yang in English, if that helps 17:15:47 ais523, yes 17:15:48 AnMaster: t-shirts with the symbol. 17:15:53 hmm 17:15:54 right, ofc 17:15:56 ais523, it helps slightly 17:15:59 well, Yin/Yang 17:16:08 I prefer ping/pong 17:16:08 AnMaster: well, it's to do with the screens not being infinitely thin 17:16:26 so if you see them at an angle, the polarisation twisting isn't lined up perfectly 17:16:34 right 17:16:44 different voltages affect the amount of twisting to produce different colours, so it's possible you can twist more than 90 degrees and come out the other side of black 17:16:45 i don't believe in polarization, i think. 17:16:47 that I know of, though this one has a pretty good viewing angle 17:16:59 if a weird viewing angle is rotating it too far 17:17:07 I need to go around 80 degrees before I notice anything 17:17:08 i haven't decided really, but that sounds like something i don't have to believe in 17:17:15 AnMaster: it must be a good thin one then 17:17:20 * ehird licenses his stuff under Creative Commons Attribution 1.0 Generic 17:17:22 because he is oldschool 17:17:24 oklopol: do you have a calculator? 17:17:26 and because newer versions are useless 17:17:30 ais523, a 21" 1400x1050 TFT 17:17:32 ais523: yes 17:17:43 oklopol: if you don't believe in polarisation, how can you see the numbers on it/ 17:17:51 ais523, also it isn't inverted video even at 90 degrees 17:17:51 ais523: by looking 17:18:04 oklopol: have you ever looked at your calculator through a polarising filter? 17:18:05 or close to that anyway 17:18:05 doesn't involve polarizing anything afaik! 17:18:08 oklopol: don't ever start making sense <3 17:18:15 ais523: think i believe in those? 17:18:16 :D 17:18:17 from inside another calculator would do, although it's a bit hard to climb inside them 17:18:25 they're just slightly shaded glass 17:18:47 oklopol: if you have two polarising filters next to them, and start rotating them 17:18:52 then it becomes clear they aren't shaded glass 17:19:08 ais523, you think oklopol is serious? 17:19:17 actually, that would be ehird's comment to me 17:19:19 heh 17:19:27 oklopol is serious 17:19:29 ais523: well. that's a bit hard to explain ;=) 17:19:29 that's the thing. 17:19:33 ehird, hm 17:19:38 I GUESS WE'LL NEVER KNOW WHY THAT HAPPENS. 17:19:48 there are lots of things you can more or less get away with not knowing, or not agreeing with whilst being wrong 17:19:48 maybe i should open my rwh now 17:19:55 oklopol, do you believe in Star Trek? 17:20:31 rwh? 17:20:32 wtf is that 17:20:39 ais523: true. but science isn't exact, knowing it might be useless if it happens to be wrong. 17:20:46 real world haskell 17:20:48 well, yes 17:20:50 so i say why bother 17:20:50 ah 17:20:53 ! 17:20:57 oklopol, do you believe in Star Trek? 17:21:08 well okay, i guess i should believe in polarization, because it's so effing cool 17:21:12 anyway, I'm an engineer, and engineers know things that tend to work in practice are often useful even if they are wrong 17:21:19 i'll believe it's a close approximation of how light works 17:21:33 heh 17:21:57 i hate... 17:21:59 i hate things 17:22:03 ais523: well, an abstraction can't really be "wrong" 17:22:06 ais523, anyway the color issue is much larger on laptops than desktop TFTs in my experience 17:22:08 no idea why 17:22:17 you might just realize it's a bad abstraction 17:22:22 and call it wrong 17:22:27 well, I suppose so 17:22:30 but if it was once useful, probably it's still useful 17:22:35 polarisation's just statistical behaviour anyway 17:22:36 ais523, do you know? 17:22:39 but one which is nice to know about 17:22:41 of course 17:22:45 all physics is 17:22:51 AnMaster: I'd guess the screens are better-quality on desktop TFTs 17:22:57 well not all physics. 17:23:00 ais523, hm. 17:23:00 but kinetics and the like 17:23:04 grrrrrrrrrrrrrr 17:23:58 ais523, I do notice colour shift at the edge for certain slightly off white values, need to be around 254,254,254 before I notice it though 17:24:07 but very very slight 17:24:21 who wants to stop things sucking????? 17:24:24 ais523, in other aspects this monitor is really low quality :( 17:24:35 ais523, like the foot of it, not very well adjustable 17:24:47 or the fact it is VGA only, no DVI 17:24:55 ais523: do you play chess? 17:25:02 I used to, although I haven't for ages 17:25:19 I was the captain of the house chess team, and played for the school first team 17:25:24 but I haven't played for about 4 years now 17:25:26 so you're awesome? 17:25:34 my brother's much better than I am 17:25:42 and sort of lapsed-decent, rather than awesome 17:25:48 I'm awful at chess. 17:25:49 Awful. 17:25:49 really out of practice 17:25:51 wanna teach me the art? 17:26:06 wait 17:26:11 oklopol: you're not perfect at something? 17:26:13 holy shit 17:26:14 you can get a lot better at chess by not making mistakes 17:26:28 in fact, I think that gets you right up above grandmaster level 17:26:34 lol 17:26:34 the mistakes just get more subtle as time goes on 17:26:37 ehird: i'm actually relatively bad at games where every move can get you killed 17:26:41 hmm... chess is like NetHack in that respect 17:26:48 the more robust the better i get 17:26:54 i'm like an anticomputer at games 17:27:00 proto: chess, the FPS 17:27:08 ehird: how? 17:27:17 ais523: if i knew that it wouldn't be a proto 17:27:22 * ais523 games little enough that they had to think about the acronym... 17:27:35 ehird: even you aren't that fast at coding 17:27:36 ais523: oh, that wasn't a joke? 17:28:19 i mean 17:28:25 the reason i can't do chess is 17:28:34 it wasn't much of a joke 17:28:36 i think like 7 plies ahead 17:28:45 then move the last piece in my train of thought 17:28:46 generally speaking, the person who loses a game of chess is the first to make a mistake 17:28:50 unless the other makes a bigger mistake later 17:28:51 because at that point i've solved the situation 17:28:56 and heh, I do that as well 17:29:01 although not 7 ahead 17:29:01 and lose my concentration 17:29:05 well. 17:29:07 i meant many plies 17:29:19 7 was just a random number 17:29:24 I'm no good at visualising more than about 2 plies 17:29:31 I -can't- think ahead. :P 17:29:51 heh, once I wrote a tic tac toe solver whose objective was to beat itself 17:29:55 ehird: you're forked, then 17:29:56 -!- kar8nga has quit (Connection timed out). 17:30:01 (when it looked ahead (brute-force), it played against itself) 17:30:12 ehird: that's how you always do it 17:30:13 naturally, it was pretty awful 17:30:16 oklopol: nope 17:30:23 because it only ever tried to be better than itself 17:30:24 that's the way to brute-force games 17:30:27 it's a recursive issue 17:30:47 oklopol: it depends on what the evaluation function was 17:30:56 but for noughts-and-crosses, you can analyse until the game ends 17:31:12 ais523: basically, "if I beat or tie myself, this is a good solution" 17:31:20 but since that's the definition of itself, it kind of sucked 17:31:35 ehird, still have the code? 17:31:42 nah 17:31:44 I think it would always end at a draw 17:31:49 um, no shit 17:31:49 ehird: that's actually the best possible (if not fastest) algorithm if you brute-force to the end and know whether a position's won, lost, drawn or unfinished 17:31:50 :P 17:31:52 hmm. i don't understand how that's different from just brute-forcing the perfect solution 17:32:02 ais523: i think you misunderstand :D 17:32:08 oklopol: because it doesn't fight against every possibility 17:32:11 just every possibility that is tried 17:32:18 and yet that's how you determine what to try... 17:32:26 ehird: if it's brute-forcing, it does try every possibility 17:32:27 huh? 17:32:30 so what does top-level try? 17:32:35 ais523: nope, it didn't 17:32:41 what happens when first move happens? 17:32:44 happen happen 17:32:46 then you aren't brute-forcing, so what are you doing? 17:32:50 ais523: i wish I knew 17:33:02 hmm, cgit's template files are c files 17:33:06 that's disappointing 17:33:14 isn't taking the middle square the best first move in tic tac toe? 17:33:20 well. the idea is brute-forcing, maybe you're just fucking it up somehow ;) 17:34:20 http://hjemli.net/git/cgit/tree/ui-log.c :( 17:34:25 AnMaster: it doesn't matter which square you take 17:34:36 ais523: errr yes ti does? 17:34:37 it's a draw for all 9 possible starting moves 17:34:53 although if you start in a corner, the opponent has to reply in the middle to avoid losing 17:34:58 right but with the middle you have more of a chance of -winning- against an idiot 17:35:08 ah 17:35:17 ehird: only if you assume the idiot plays in the middle given the chance 17:35:26 even idiots do that. 17:35:26 if you play in the corner, the idiot has 7 losing moves and only 1 drawing move 17:35:33 if you play in the middle, the idiot has a 50/50 chance 17:35:37 same if you play at an edge 17:35:38 hm. 17:35:53 hm 17:36:29 how many possible tic tac toe games are there? 17:36:37 few hundred thousand 17:36:38 I think 17:36:40 nine factorial 17:36:42 less if you discard symmetrical ones 17:36:48 hm 17:36:48 so yes, about a few hundred thousand 17:36:49 right 17:36:52 362880 17:36:54 except 17:36:56 if you discard symmetry, it's less than 100 IIRC 17:36:57 nine factorial is an upper bound 17:36:58 less if you discard duplicates. 17:37:12 oklopol: oh, because the games can end before all the squares are filled/ 17:37:16 not all games only after last move 17:37:21 ais523: yes 17:37:26 ... 17:37:28 ais523, even when the other person don't play perfect? and when you consider taking a first then b or b first then a different? 17:37:30 not all games *fucking end* only after last move 17:37:36 though both could lead to the same end result 17:37:48 and what oklopol said 17:38:02 AnMaster: the one that was incorrect or the one with fuck? 17:38:04 AnMaster: yes and no to your two questions 17:38:37 i mean if you meant the first one, why would you quote a broken sentence? and if you meant the latter one, please don't swear, it's not your style 17:38:40 oklopol, the latter 17:39:10 AnMaster: say fuck 17:39:22 -!- tyrelle has left (?). 17:39:30 * ais523 wonders whether to surprise everyone by saying lol 17:39:32 ehird, why would I? 17:39:33 yes of course nine factorial is a pretty loose upper bound also because the order doesn't matter 17:39:38 AnMaster: novelty 17:39:39 ais523, you just did 17:39:46 i mean 17:39:46 ehird, not when you told me to 17:39:49 AnMaster: I've typed it before, but only in quoted contexts 17:39:51 AnMaster: don't say fuck 17:39:56 I haven't actually used it, just mentioned it 17:40:00 not taking order into account isn't even much harder than taking the factorial 17:40:01 ehird, too late, I don't fall for that trick 17:40:12 ais523, ah right 17:40:16 you just take 4 out of 9... 17:40:20 I only ever quote the word too 17:40:22 I think 17:40:24 of course I know of the existence of lol 17:40:29 I think I used "lol" once really 17:40:30 same verb character in j 17:40:32 just people don't use it with its intended meaning 17:40:35 only dyadic vs. monadic 17:40:37 so it's become meaningless recently 17:41:04 sometimes I do laugh out loud; I have been for about 5 minutes now (good thing there's nobody else in here) 17:41:08 also 17:41:13 but "lol" is no longer a good way to express that 17:41:14 the correct answer isn't 9! 17:41:17 the correct answer is: 17:41:32 "as long as there are humans or other creatures to play it there can be more" 17:41:33 AnMaster: Of course it isn't, there are more than 9 games! 17:41:33 :P 17:41:49 wut 17:41:50 ais523, that was ! as in factorial 17:41:54 AnMaster: no shit 17:41:59 way to ruin his joke 17:42:02 ehird, lame joke yes 17:42:09 oh as a joke. 17:42:14 I never said unique games :P 17:42:27 also 17:42:29 wtf is this 17:42:36 and really 17:42:39 * AnMaster looks at the SQL statement 17:42:46 9 choose 4, *not* nine factorial 17:43:04 you can tell I was joking due to the capital letter at the start of the sentence, the joke didn't work without it 17:43:07 it's like one character longer, and seven billion times smaller. 17:43:12 and I rarely do that normally 17:43:40 hmm... maybe we should come up with a new IRC convention, which states that correct capitalisation and punctuation indicates sarcasm 17:43:45 17:19:29 PESOIX? 17:43:45 17:19:33 <-- new 17:43:47 -- 2005 17:43:49 ais523: it already does imo 17:43:50 I mean, completely correct, initcaps and fullstop at the end 17:44:24 well, not completely correct, but that's one standard way to indicate you're not being serious, if you don't do that normally 17:45:40 btw 17:45:41 >>> !9 17:45:41 362880 17:45:41 >>> 4!9 17:45:41 126 17:45:53 oklopol: teach me j 17:45:57 err 17:45:59 in ssql 17:46:00 sql* 17:46:06 what is the ORDER BY to sort backwards 17:46:13 AnMaster: DESC 17:46:14 I forgot the keyword 17:46:16 desc/asc 17:46:17 ah thanks 17:46:27 wait... 17:46:35 actually that upper bound actually isn't correct 17:46:38 but for a moment, I thought you were correcting ehird, saying that ehird really meant to ask oklopol to teach him J in SQL 17:46:41 once you take into accound games can end prematurely 17:46:45 which would be weird 17:47:04 ais523: i thought AnMaster thought oklopol was showing AnMaster some code that he'd asked for 17:47:05 blah. is suck at translating reality into math 17:47:08 and he wanted it in sql instead 17:47:18 err? 17:47:19 what? 17:47:23 AnMaster: desc 17:47:23 nothing. 17:47:28 ehird, no I'm multitasking 17:47:30 asc/desc, asc is implicit 17:47:37 also ais523 said that already 17:47:43 wait, I'm trying to follow the threads of conversation here 17:47:46 great it didn't sort correctly when selecting from the sorted view 17:47:48 wonder why 17:47:56 it's almost feels as if there are two conversations 17:47:59 only they're impossible to separate 17:48:04 ais523: there are always multiple 17:48:10 yes, but rare for them to get this intertwined 17:48:20 21:04:58 It would be more esoteric to make pop-from-empty-stack read from stdin :) 17:48:22 -- 2005 17:48:26 it's like befunge 17:48:49 that's not esoteric 17:48:51 what, on division by 0? 17:48:54 ais523: yep 17:48:57 "why not have the arguments of the program in the stack!!" 17:49:01 well 17:49:04 not arguments 17:49:06 and <> reads from stdin on Perl when it runs out of argv 17:49:07 oklopol: thats not related 17:49:08 it means like 17:49:13 but if you consider stdin the args to the program 17:49:19 "The stack is empty. What value should be on top?> " 17:49:21 oh, from any stack? 17:49:25 yep 17:49:29 ah. 17:49:45 hm, 17:49:54 is INNER JOIN or LEFT JOIN fastest in general? 17:50:01 all those join types confuse me 17:50:03 well then that's just an object that has two separate uses, which are intertwined to make it very error-prone 17:50:05 AnMaster: inner IIRC 17:50:07 so yeah, pretty eso 17:50:10 because it doesn't have to compare against NULL 17:50:14 but they do different things 17:50:30 ais523, all columns are NOT NULL, and in my case they end up doing the same result 17:50:30 if you're asking which is fastest, either you're doing something really weird or you aren't thinking about the problem 17:50:36 you know what sucks? 17:50:39 oh, then they should take exactly the same length of time 17:50:40 navigation 17:50:45 navigation should be implicit 17:50:46 always 17:50:46 if you have at least a half-decent database engine 17:51:06 inner is faster for the same reason ++i is faster than i++ 17:51:17 ais523, except this is mysql (eww yes I know, I hate it, not my choice), and EXPLAIN says INNER JOIN here doesn't use the indexs 17:51:20 which is very strange 17:51:23 the question is how you implicitify navigable aids without making a separate form for them. 17:51:25 while left join does 17:51:31 AnMaster: MySQL's optimiser is strange, it seems to pick at random 17:51:37 what happens if you add a FORCE INDEX to it? 17:51:37 ais523, yes I agree 17:51:48 ais523, SQL error... let me try again 17:52:01 I never can remember exactly where you're supposed to put it 17:52:28 hmmm. 17:52:35 i don't think form is inherently navigable. 17:52:36 ais523, actually if I add a WHERE = first explains says they are the same 17:52:42 this make really no sense 17:52:48 makes* 17:53:39 AnMaster: is it a small table? 17:53:53 ais523, currently yes, expected to grow a lot in the future 17:53:54 on small tables, MySQL sometimes randomly decides that using an index isn't worth the bother 17:53:58 and often it's actually right 17:54:11 it would be nice to have an EXPLAIN ON HYPOTHETICAL BIG TABLE SELECT 17:54:17 yes it would 17:54:41 huh 17:54:46 now this is just crazy 17:55:01 1 SIMPLE history ref tid,pid pid 4 const 2 Using where 17:55:14 * AnMaster tries to change join type 17:55:31 AnMaster: well, const is a pretty useful join type to have 17:55:41 it's the second-fastest 17:55:53 ais523, which one is the fastest then? PRIMARY I assume? 17:56:01 AnMaster: no, the type where the table only has one row 17:56:03 or zero 17:56:06 well thing is... I *only* select on primary keys 17:56:13 in this case 17:56:14 PRIMARY's not a join type, it's a key type 17:56:25 and join on "not primary -> primary" 17:56:30 ais523, true 17:56:35 but primary index should be the fastest 17:56:43 AnMaster: not on MyISAM 17:56:52 all indexes are equally fast there IIRC 17:57:00 ais523, innodb since I need foreign key constraints 17:57:05 I hate mysql and innodb 17:57:06 oh, primary is fastest there 17:57:15 SELECT history.revid, history.tid, text.uid, text.timestamp, text.title, user.realname FROM (history INNER JOIN `text` ON (history.tid = text.tid) INNER JOIN user ON (text.uid = user.uid)) WHERE history.pid = 4 ORDER BY history.revid DESC 17:57:16 btw 17:57:22 InnoDB is too much trying to be like other database engines, IMO 17:57:34 ais523, I would much prefer postgresql 17:57:38 they should stick to MyISAM which is not a database in the conventional sense, but is nonetheless useful 17:57:55 ais523, anyway can you see anything obviously stupid in the above query? 17:58:15 I guess I can let this pass for now... 17:58:20 that should be 3 const lookups, one using where 17:58:23 which should be very fast 17:58:32 unless you have duplicate pids in the history table 17:58:42 or duplicate tids in text, or duplicate uids in user 17:58:42 ais523, yes that can exist 17:58:48 no duplicate tids though 17:58:56 nor uids? 17:58:56 pids in history can be duplicate 17:59:08 no other key I'm testing on can be 17:59:11 in that case, it should be const/const/const, with affected rows (small number), 1, 1 17:59:14 ais523, oh yes they are dup 17:59:18 in the text tample 17:59:20 which is very fast 17:59:21 table* 17:59:27 so no, nothing looks wrong with that 17:59:27 ais523, sorry for that 17:59:32 id select_type table type possible_keys key key_len ref rows Extra 17:59:32 1 SIMPLE history ref pid pid 4 const 2 Using where 17:59:32 1 SIMPLE text eq_ref PRIMARY PRIMARY 4 vcms.history.tid 1 17:59:32 1 SIMPLE user eq_ref PRIMARY PRIMARY 4 vcms.text.uid 1 17:59:35 is what it says 17:59:54 that's a good query 18:00:01 ais523, and sorry, text.uid and history.pid can be dup 18:00:08 ref const, eq_ref primary, eq_red primary 18:00:17 three O(1) queries joined 18:00:21 well, O(number of results) 18:00:26 ais523, where are those abbreviations explains 18:00:31 which is much faster than O(size of database), which is what slow queries are 18:00:37 also number of results depend on number of edits on the page 18:00:43 AnMaster: there's a whole chapter of the MySQL docs about it 18:00:54 also, you can't possibly get faster than O(n) in the number of results, for obvious reasons 18:01:03 well yes 18:01:15 ais523, I expect at least quite a few results. 18:01:38 you can't optimise that any faster in computational class terms, so don't try 18:01:50 micro-optimising is just not worth it 18:02:07 true 18:02:23 ais523, I agree 18:02:23 I was just confused why it didn't want to use indexes sometimes 18:02:37 AnMaster: because the table was so small that a full table scan was faster than loading the indexes 18:03:44 ais523, true I don't have a lot of entries yet since I'm continually changing the schema when I find bugs 18:03:57 so I have an sql file that I change then import that resets the database 18:04:15 ais523, also what about longtext type, is it sane for using to store pages in? 18:04:27 longtext is too long 18:04:29 try text. 18:04:29 I have been unable to find info about that in the mysql docs 18:04:31 I'm not sure, but I think so 18:04:36 err left join was join + keep all entries of leftie, inner was just join? 18:04:37 longtext is for pretty massive pages 18:04:47 oklopol: yes, pretty much 18:04:48 ehird, hm isn't text like 32 kb? 18:04:56 i think mor 18:04:57 e 18:05:02 * AnMaster looks 18:05:04 64 kb probably 18:05:11 as MySQL like using whole numbers of bytes 18:05:16 well 18:05:22 I need more than that 18:05:28 what are you storing 18:05:30 and 64 KiB = a two-byte length 18:05:36 ehird, wiki pages 18:05:42 64 kb is enough. 18:05:45 if it isn't, fix your pages :P 18:05:54 ehird, well ever looked at gentoo wiki? 18:05:57 ehird: what if they have embedded data: URLs to images? 18:06:01 yes, and I never looked again, AnMaster 18:06:10 ehird, some are over 100 kb 18:06:12 quite a few in fact 18:06:14 yes. fix that. 18:06:30 well, long text it is, though this isn't gentoo wiki 18:07:00 sql doesn't have an infinitely extending type? 18:07:07 or am i completely out of context 18:07:08 no. 18:07:27 (i don't really know much about practical db's, as should be obvious) 18:07:38 oklopol: what do you think about my work in progress db? 18:07:41 it serializes objects to a graph 18:07:44 GRAPHS 18:07:47 FUCKING GRAPHS. 18:07:50 you love graphs. 18:08:04 (except queries, but of course just the actual query syntax) 18:08:15 graphs are pretty awesome 18:08:29 exactly 18:08:34 well 18:08:43 contact me the day when the product is ready :P 18:08:51 go to hell, practical jackass. :| 18:09:25 yeah, who wants to finish a program when you already know how to do it 18:09:26 ehird, hey I was all for your comefrom/goto lang 18:09:30 and I still am 18:09:35 I hate doing things I already know how to do. 18:09:48 kerlo, like eating? 18:09:53 kerlo: yeah they're almost as bad as things i don't know how to do 18:10:03 Well, eating is an exception. It's an instant gratification thing. 18:10:11 ah 18:10:15 kerlo, sleeping? waking up? 18:10:26 I hate doing both. :-) 18:10:34 Well. 18:10:43 I hate eating, sleeping and waking up, but not messing around on IRC 18:10:59 Yeah, messing around on IRC is fine because you don't have to actually do anything. 18:11:17 well at least you don't have to achieve anything. 18:11:21 ok this is evil, a wiki that requires users to use valid xhtml 1.1 syntax (filtered to a safe set of whitelisted tags, attributes and attribute values) 18:11:22 :) 18:11:29 no horrible wiki syntax thing 18:11:37 markdown isn't horrible 18:11:37 Unfortunately, I have obligations. 18:11:38 xhtml 1.1 is 18:11:45 therefore, fail 18:11:48 ehird, well I was thinking of mediawiki syntax 18:11:57 AnMaster: the requirement for valid xhtml 1.1 is so it can be filtered more easily? 18:11:58 also for extra eww this is coded in php 18:12:06 please die. 18:12:07 :) 18:12:11 ais523, no because otherwise firefox renders it badly 18:12:14 ais523, like "error" 18:12:20 when you send the correct mime type 18:12:21 and such 18:12:27 AnMaster: yes, I know 18:12:31 but I mean, why did they pick XHTML 18:12:34 not, say, HTML? 18:12:39 my guess is so it's easier to filter 18:12:41 ais523: AnMaster loves XHTML because it's newer. 18:12:43 ais523, s/they/me/ 18:12:47 what am postel's law? what am server-side filtering? 18:12:51 what am intelligence 18:12:55 ais523, also it is easier to filter 18:13:06 ehird: yes, what /am/ postel's law? 18:13:13 also 18:13:18 ais523: what am google 18:13:20 although "what am intelligence" seems surprisingly philosophical 18:13:21 all the layout is in css 2.1 18:13:22 :D 18:13:32 no tables for layout 18:13:39 only tables for actual tables 18:13:51 not even tables for form layout 18:13:57 no shit 18:13:59 you're so unique 18:14:02 AnMaster: how do you enforce that rule? 18:14:03 never mind that 500 other people do that. 18:14:04 ehird, sadly I am 18:14:16 ais523, I don't, but I mean the software in itself 18:14:32 iirc even mediawiki use(ed?) tables for login form 18:14:40 s/ed/d/ 18:15:16 yep it does 18:15:18 18:15:18 18:15:18 tabindex="1" 18:15:18 value="" size='20' /> 18:15:19 18:15:21 and so on 18:15:22 s/\((.*\?\)/$1/ 18:15:31 ais523, hah 18:15:37 not sure if it still does 18:15:56 ais523, that was from en.wikipedia 18:16:02 like 10 seconds ago 18:16:13 ais523, maybe it doesn't in trunk 18:16:17 but on wikipedia it does 18:16:46 AnMaster: I doubt they've fixed it 18:16:59 changing one CSS identifier in MediaWiki causes people to kick up a stink sometimes 18:17:09 ais523, btw: http://rafb.net/p/LWWpzm49.html 18:17:12 "You should have consulted the community before messing up all our non-robust scripts!" 18:17:22 ais523, that is my login form, that renders the same way 18:17:25 also 18:17:33 yes mediawiki themeing is a mess 18:17:34 what am grammar 18:17:39 no Captcha? 18:17:39 it should be just changing a css file 18:17:43 ais523, not for login 18:17:46 ah, ok 18:17:58 ais523, for register there is such support, but register isn't coded yet 18:18:15 AnMaster: you're actually building a wiki that requires completely valid, whitelisted xhtml 1.1 as its page input? 18:18:20 as in, register.php is: 18:18:20 wow, you're more idiotic than I previously thought possible 18:18:33 ehird, not my choice, this is for a school course 18:18:33 actually, I like the idea 18:18:46 although it would be for different purposes than Wikipedia, say 18:18:47 AnMaster: I am sure "completely-valid XHTML 1.1" is your choice. 18:18:54 ehird, yes... 18:18:56 Also, I really don't care who likes the idea, because it's a bad one. 18:19:03 ais523, oh and it uses object orientation in php 18:19:04 instead of a quick-edit anyone-can-join wiki, it would be a lets-use-this-to-maintain-a-website wiki 18:19:08 NOT my choice 18:19:12 AnMaster: so do lots of other PHP programs 18:19:16 true 18:19:19 Maintaining a website in XHTML 1.1 is grounds for the death penalty. 18:19:22 but php OOP is horrible 18:19:24 ever used it? 18:19:35 ais523, btw my login form css basically works similar to this: http://www.websiteoptimization.com/speed/tweak/forms/ 18:19:37 no, but I've tried to read code that uses it 18:19:45 except not px but em for the sizes 18:19:51 to make it scale correctly 18:19:53 ehird: maintaining a website in XHTML is taking all the suffering onto yourself for the good of the rest of the world 18:19:58 writing in plain HTML is being selfish 18:19:59 ais523: no, there is no good 18:20:04 there are no exceptions to postel's law 18:20:14 ehird: writing in XHTML /is/ postel's law 18:20:22 it's not 18:20:29 wtf is postel's law 18:20:29 ? 18:20:33 it is, because it's very strict and easy to parse for other programs 18:20:34 google it. 18:20:42 valid, well-formed, XHTML 1.1 is no more cleaner and easy to process than the same with HTML 4.01 18:20:46 AnMaster: check on Wikipedia, which calls it something else but has a redirect 18:20:47 so sorry, that's just bullshit. 18:20:49 hm 18:20:52 ehird: and yes it is, you can't process HTML with CSLT 18:20:55 *XSLT 18:21:08 except you shouldn't process with XSLT, one because it sucks ,and two because it violates postel's law 18:21:23 ais523, I don't do that, but it would be nice to allow 18:21:56 ehird, also the code is made so it would be easy to plug in a wiki-syntax engine 18:22:00 in the page render function 18:22:02 if you wanted 18:22:11 -!- Corun has quit (Read error: 110 (Connection timed out)). 18:22:26 two places only, vcms_page->preview(); and vcms_render->render() 18:22:28 ;P 18:22:51 oh and never touch page id -1 because that means it is some internally generated page, like the login page 18:22:58 but yes quite simple 18:24:51 ehird: do you favour Postel's Law for everything, or only for internet communications? 18:24:59 do you favour it for, say, functions inside a C program? 18:25:15 ais523: It is complicated. 18:25:26 ais523, I don't think so, he claimed he disliked "defensive coding" recetly 18:25:28 recently* 18:25:28 For closed-world things -- e.g., functions inside a C program -- it doesn't apply. 18:25:41 For open-world things -- e.g., the entry point of a C program, or a website -- it applies. 18:25:50 and I tend to agree, though assert() is an exception. 18:25:56 it is for debugging 18:25:57 One is controlled, the other isn't. 18:26:24 AnMaster: I'm currently trying to get a BF interpreter to pass splint strict mode 18:26:32 it requires jumping through all sorts of hoops 18:26:34 ais523, heh 18:26:34 http://diveintomark.org/archives/2004/01/08/postels-law 18:26:35 http://www.aaronsw.com/weblog/001025 18:26:37 http://www.b-list.org/weblog/2008/jun/18/html/ 18:26:38 ais523, such as? 18:26:41 Read those (in order.) 18:26:43 I have an auxiliary /function/ guarded by NDEBUG 18:26:58 which checks if argc is larger than a certain value 18:27:02 and takes argv as an argument and ignores it 18:27:22 the function is expressing the fact that argv has argc elements, in a way that splint can understand and verify is correct 18:27:39 I have a few NDBUG guarded funcs in cfunge, dumping functions, "clean up on exist to make valgrind output simpler, even though this could be left to the OS" 18:27:43 and such 18:28:11 ais523, but your sounds strange 18:28:16 ais523, really strange 18:28:20 maybe I should paste it 18:28:25 I would check argc in main() probably 18:28:32 or actually, I would use getopt() 18:28:40 oh, so do I, but Splint didn't notice it there 18:28:43 yes it is POSIX, but I don't care about windows 18:28:45 and I'm not even getting options 18:29:00 I'm trying to persuade Splint that I can read the first command-line arg without buffer overflow 18:29:03 The nice thing about dependently typed languages is that you can statically prevent incorrect data. 18:29:21 the buffer-overflow checks are a bit primitive, you have to jump through loads of hoops to guarantee to it that you're doing things right 18:29:23 ais523, hopefully the OS should leave a \0 at the end of it... 18:29:39 AnMaster: again, it does 18:29:50 but Splint doesn't have a "this is a null-terminated array of strings" annotation 18:30:04 ais523, well paste that function then 18:30:28 ais523, also does it have a "this is a null terminated string?" annotation? 18:30:32 if yes then doing: 18:30:34 e.g., main :: [string] `ofLength` 2 -> io () 18:30:47 then (main a = print a) will fail 18:30:48 char * argv1 = *argv; 18:30:49 would work 18:31:02 and then annotating argv1 18:31:17 strange, my web browser's going slow 18:31:21 also, I don't think so, strange really 18:31:32 because you need to _prove_ to the compiler that you can't pass it non-2 length arrays 18:31:32 or rather 18:31:32 when you call it 18:31:32 you have to prove to the compiler that the array you passed it is of length 2 18:31:35 so in your entry point, you have to check the length of the array 18:31:41 before calling main 18:31:47 ehird, what lang was that? 18:31:51 AnMaster: http://rafb.net/p/sRPjBK56.html is the whole program 18:31:56 AnMaster: a hypothetical Haskell with dependent types 18:31:59 check_argc_argv is the relevant function 18:32:01 ah 18:32:19 dependent types give you immense flexibility and awesome, at the expense of not being able to prove that your compilation will terminate 18:32:30 (because the type system == the normal language, and is therefore TC) 18:32:31 /*@*/ ? 18:32:36 wtf does that do 18:32:39 AnMaster: "This function does not modify any global variables" 18:32:49 assert(argc >= minlength); 18:32:49 /* Splint seems not to know about assert... */ 18:32:49 if (argc < minlength) {abort();} 18:32:58 if it doesn't know, why not remove it? 18:33:08 it does know about assert, just doesn't notice it for some reason 18:33:45 ais523, know what? I would give up on splint instead of doing that 18:33:56 AnMaster: you don't understand, this is an eso project 18:34:03 also the splint project was in practise dead last I checked 18:34:05 I have splint's warning levels /way/ above the typical levels 18:34:10 ais523, ok why? 18:34:14 cfunge is designed to be as fast as possible 18:34:21 this program is designed to be as Splintable as possible 18:34:27 still not perfect, btw 18:34:28 ah right 18:34:30 makes sense 18:34:42 it thinks there are some potentially undefined structure fields, and I have to resort to /*@- on occasion and I don't want to 18:34:43 /\? 18:34:44 i think you could get very far by hooking a dependent types layer onto C 18:34:48 e.g. 18:34:48 as in 18:34:49 AnMaster: and 18:34:50 /*@requires maxRead(argv) == argc 18:34:51 /\ maxSet(tape) >= 100663378 18:34:51 /\ maxRead(tape) >= 100663378;@*/ 18:34:54 ais523, hm ok 18:34:58 strange notation for it 18:35:02 AnMaster: it's from logic 18:35:04 & or && would make more sense 18:35:23 ais523, well the splint devs were making a program checking C source, maybe C notation would have made sense then 18:35:46 also the logic notation is one symbol and not some sort of mini-ascii art of it 18:35:47 don't ask me to make Splint make sense 18:35:56 although Splint has inspired me to write an esolang, btw 18:35:59 void real_main(int argc /**@ == length(array)*/, char **argv /**length(@) == 3 */) 18:36:01 or something 18:36:02 ais523, oh? 18:36:06 and then the layer requires you to prove it in calls 18:36:07 so 18:36:14 which is like C, but impossible to write buggy programs in 18:36:16 is the idea 18:36:20 well, logic bugs still possible 18:36:24 ais523, hm details? 18:36:28 int main(int argc, char **argv) { if (argc != 3) { ...error... } else { real_main(argc, argv); } } 18:36:29 also there are langs like that 18:36:30 but memory leaks and buffer overflows and so on impossible 18:36:35 and since argc == length(argv) 18:36:37 and of course there are 18:36:38 and argc is verified to be 3 18:36:40 the preconditions are met 18:36:41 but the point is, to do it in C 18:36:43 ais523, BitCC and Cyclone may interest you 18:36:44 and the program can compile 18:36:49 so you still have to write the free()s and so on 18:36:50 and bounds checks 18:36:54 both are made to be hard to write buggy things in 18:36:55 the compiler just verifies they're there 18:37:00 and both are C-like 18:37:27 ais523, hah 18:37:42 ais523, could be done as a GCC middle end maybe? 18:37:47 maybe 18:37:48 if such a thing exists 18:37:50 I didn't even know it had middle ends 18:37:59 the problem is that the front end/back end transition is blurry 18:38:00 ais523, note what I said after 18:38:10 there's a chain of back ends, more or less 18:38:11 hm ok 18:38:18 and the various front ends filter into different places in it 18:38:28 even gcc-bf has to interact with the front ends slightly 18:38:28 ais523, where does mudflap in GCC insert it's calls? 18:38:37 to tell them how to send data to the back ends 18:38:41 also, I don't know 18:38:53 ais523, I assume you know what -fmudflap is though? 18:38:57 (gcc-bf has to request varargs calls to be sent a certain way, so it can handle them) 18:39:00 very useful thing 18:39:02 AnMaster: I do, but not how it works 18:39:21 ais523, inserting lots of canary values iirc and checking every read/write access 18:39:27 yes, I mean inside gcc 18:39:30 I don't know what it hooks into 18:39:31 somewhat like valgrind except it can catch some stuff gcc doesn't 18:39:43 err catch some stuff valgrind doesn't 18:39:52 like 2 valid variables after each other 18:40:11 if both are static valgrind can't check that access doesn't pass from one over to the other 18:40:28 yes 18:40:48 mudflap can catch that 18:40:51 of course valgrind finds stuff mudflap doesn't 18:41:32 /*@-retvalint@ We don't care if fputs fails, we can't do anything... */ 18:41:33 wtf 18:41:40 ais523, why not cast each to (void) 18:41:41 instead? 18:42:20 AnMaster: hmm... I wonder if that works 18:42:25 I've been casting to void elsewhere 18:42:32 ais523, also: default: continue; /* a comment */ 18:42:35 but possibly Splint doesn't let you do that for non-printf functions 18:42:39 well is this a C tutorial? 18:42:52 I must have phased out there 18:42:57 no idea what the comment was meant to say 18:43:03 oh, no it is right 18:43:07 line 195 18:43:09 that case catches comments in the input BF 18:43:20 oh ok 18:43:26 Musings on a static analyzer for C: http://pastie.org/352320 18:43:52 let's make something like Splint that actually works 18:43:58 ais523: see http://pastie.org/352320 18:44:01 ais523, and works for C99 18:44:13 ehird: I have 18:44:15 that's very splint-like 18:44:21 yes, but more general 18:44:21 and sane 18:44:23 ais523, and can handle ## in macros 18:44:28 [and compile-time turing complete :DDDDDD] 18:44:52 AnMaster: and trigraphs? 18:44:59 (N.B. I haven't tried to run Splint with trigraphs) 18:44:59 ais523, I don't use them 18:45:04 neither do I normally 18:45:09 ais523, what about digraphs? 18:45:12 besides, you're in C99, you have digraphs now 18:45:12 they exist too iirc 18:45:13 in C 18:45:18 ah that is C99? 18:45:20 hm ok 18:45:26 ais523, I don't use digraphs either 18:45:26 yes, they were added as they're easier to type than trigraphs 18:45:39 oi, people, obsess over my awesome. 18:45:51 AnMaster: they're useful if your character set doesn't have { in 18:46:03 I mean, how else would you type C in such a character set? 18:46:12 ais523, I'm not sure if it does, but I sure hope POSIX requires that 18:46:26 AnMaster: there's a standard for which characters are guaranteed in a character set 18:46:29 { is not one of them 18:46:32 OI :| 18:46:37 which is why C has digraphs 18:46:48 (and formerly trigraphs) 18:46:49 ais523, true, but I think all POSIX systems would have it or? 18:46:55 does POSIX require ASCII/ 18:47:05 ais523, not sure 18:47:41 incidentally, you can take proves further 18:47:42 e.g. 18:47:51 Conforming implementations shall support one or more coded character sets. Each supported 18:47:51 locale shall include the portable character set, which is the set of symbolic names for characters in 18:47:51 Table 6-1. This is used to describe characters within the text of POSIX.1-200x. The first eight | 18:47:51 entries in Table 6-1 are defined in the ISO/IEC 6429: 1992 standard and the rest of the characters | 18:47:51 are defined in the ISO/IEC 10646-1: 2000 standard. 18:47:52 hm 18:47:55 * AnMaster reads the table 18:48:04 void assert_not_empty(char *s) /*@ proves (strlen(s) > 0) */ 18:48:10 also those | are due to this being a "diff from 2001 edition" 18:48:13 that's only useful if you roll your own logic in there though 18:48:14 if you just do 18:48:14 ehird: ok, that's clever 18:48:17 assert(strlen(s) > 0) 18:48:20 then it works anyway 18:48:24 since assert(x) proves x 18:48:33 would strlen be special-cased in the linter? 18:48:36 ehird, the meaning of strlen is built in? 18:48:40 nope 18:48:41 or would it deduce strlen's properties from its source? 18:48:52 well, it'd come with a standard block of definitions 18:48:56 for the c standard library 18:49:03 but you could easily add your own for any function 18:50:05 ais523, {} are in table T-1 18:50:05 err 18:50:05 6-1 18:50:05 so I think this means posix requires that 18:50:05 { LEFT CURLY BRACKET 18:50:05 { LEFT CURLY BRACKET 18:50:05 | VERTICAL LINE 18:50:05 } RIGHT CURLY BRACKET 18:50:05 } RIGHT CURLY BRACKET 18:50:05 wtf? 18:50:11 several names for the same symbol? 18:50:17 ais523: essentially, this system would be an extensible system for writing code checkers 18:50:22 from inside the actual code 18:50:25 yes 18:50:33 with a large base checker built in 18:50:57 i can forsee, e.g., people offering checker files for all sorts of libraries 18:51:04 ais523, yes POSIX.1-2008 at least requires {} 18:51:06 and you just import them and off you go, compile-time verification 18:51:11 I don't have a 2001 copy 18:51:51 i think what i'm saying here, is that i am crazy, and awesome 18:52:34 and yeah 18:52:34 ehird, somewhere in between I think 18:52:51 ehird: yep, pretty much what I was thinking too 18:52:59 does it track memory allocation the same way? 18:53:13 it is a very nice idea ehird 18:53:13 AnMaster: no, void assert_awesome(Person *person) /*@ need (is_crazy(person)); proves (is_awesome(person)) */ 18:53:25 ehird, that is a logic bug 18:53:30 no, that's life 18:53:37 ehird, life isn't boolean 18:53:48 ais523: i'm pretty sure you could write that to be non-core 18:53:57 you'd need to put a property on (*x) 18:54:04 need (valid_memory(x)) 18:54:13 ehird, I think ais523 meant tracking memory leaks 18:54:22 i'm not sure I get what you mean 18:54:23 as in finding missing free 18:54:31 when pointers go out of scope 18:54:33 yes, memory leaks and use after free 18:54:41 what splint's meant to do but doesn't because the annotations are too general 18:55:00 use after free is easy 18:55:11 just add that property to (*x) and define free(x) as proves (!valid_memory(x)) 18:55:12 what about tracking when allocations go out of scope? 18:55:34 AnMaster: like how 18:55:38 ehird, also it need to track when pointers are copied and this one being applied to other copies of that pointer 18:55:54 otherwise it wouldn't detect stuff like: 18:55:55 ehird: int* foo (void) {int a = 4; return &a;} 18:55:56 AnMaster: pointers are copied is just variable assignment 18:55:59 and of course it'd track variable assignment 18:56:01 char* x = y; 18:56:02 that's an error, you should be able to detect it 18:56:04 free(y); 18:56:09 use(*x); 18:56:16 AnMaster: yep, that's variable assignment :P 18:56:20 ais523: ah 18:56:22 ehird: the problem is tracking what's aliasing what 18:56:25 gcc already warns about that, does it not? 18:56:25 ehird, but: 18:56:32 int x = y; 18:56:36 y = 0; 18:56:45 then x is still valid 18:56:50 so you need to treat that specially 18:56:52 AnMaster: no duh 18:56:53 :P 18:56:58 ehird: lots of things do 18:57:02 but that's an obvious case 18:57:03 ehird, yes that = "*" 18:57:18 ais523: right, but you can make gcc make just that an error can't you? 18:57:22 consider {char* a = malloc(20); b = a; free(a);} 18:57:27 gcc won't catch that 18:57:28 i mean, this is really for the sort of non-trivial stuff, like hugely nested frees and such 18:57:32 ehird, gcc is far from perfect 18:57:36 ais523: right, it'll notice b is invalid 18:57:37 but it's the same thing, really 18:57:41 because it contains the same pointer as a 18:57:46 and a is no longer valid_memory 18:57:50 so b isn't, obviously 18:57:51 ehird, all the sort of memleaks that valgrind can detect 18:57:54 yes, that's the sort of tracking that I was talking about 18:57:55 it should try to do 18:58:02 AnMaster: yes, hopefully 18:58:05 now, suppose you have the C-INTERCAL Threading Structure 18:58:14 how do you detect that memory's being freed exactly once there 18:58:16 ais523: i don't want to suppose that :D 18:58:16 ais523, oh no 18:58:26 ehird, I agree, thought it should try to do that 18:58:31 AnMaster: it's the most complex memory structure I know of offhand 18:58:36 it's full of aliases 18:58:40 and other interesting stuff 18:58:42 ais523, I think runtime checking of it is the only sane way 18:58:46 such as valgrind 18:58:50 ais523: remember that it can't just magically infer stuff 18:58:52 of mudflap 18:58:53 if you say a function proves (x) 18:58:54 hmm... for something saner, what about a skiplist? 18:58:57 then it takes your word for it 18:59:02 ugh, no 18:59:08 well, it has to 18:59:11 you should state the proves by hand 18:59:14 um 18:59:15 no duh 18:59:16 but it should verify that it is indeed proven 18:59:19 that's what Splint does 18:59:20 it can't 18:59:22 it can't 18:59:23 ehird, there should be a mode to check what you tell it 18:59:24 that's impossible 18:59:29 that's halting problem impossible 18:59:33 ehird: it's normally possible, though 18:59:36 at least trying to 18:59:39 and what ais523 said 18:59:42 ais523: it's not even worth it 18:59:42 just because it's halting impossible sometimes doesn't mean you can't do it in the general case 18:59:48 *non-general 18:59:57 and then, you just make programs where it can't prove compile errors 18:59:58 the amount of functions you declare as proving things is a small amount compared to other types 19:00:00 that was my idea 19:00:01 and you should check them carefully 19:00:13 as, well, if it can't trust validators to validate, it can't do anything, can it? 19:00:29 *it can't /trust/ anything 19:00:31 it can do a lot 19:00:39 no, it can trust this: 19:00:39 it can trust + to add, for instance 19:00:46 and the control variable of a while to be 0 when it ends 19:00:47 void assert(int x) 19:00:47 /*@ proves (x) */ 19:00:48 { 19:00:50 if (!x) { 19:00:52 /* error out here... */ 19:00:54 } 19:00:55 ais523, yes of course 19:00:56 } 19:00:58 that's one of the rare provers 19:01:00 and it should be effectively foolproof 19:01:02 there's not much room for error there 19:01:03 ais523, unless you use while ++ 19:01:12 as a good rule of thumb, if you can't look at every line and certify that it works correctly 19:01:13 ehird: it can easily deduce that that proves, though 19:01:14 don't make it a prover :P 19:01:17 or some a non-trivial while 19:01:23 you don't need to take the programmer on trust 19:01:27 ais523: really, it's best to use discretion when defining provers. 19:01:32 just don't, in general 19:01:33 ais523: while (str[i] != 0) { ... } 19:01:33 ? 19:01:34 you know exit (or what ever you use) errors out permanently 19:01:35 use assert(), or whatever 19:01:37 make a primitive prover 19:01:38 so the function never ends unless x is true 19:01:38 and use it 19:01:39 actually 19:01:40 and get its assurance 19:01:41 so it does in fact prove 19:01:42 ais523: while (str[i++] != 0) { ... } 19:01:42 even 19:01:51 because that will work much better 19:01:55 and it will edtect when it doesn't really prove it 19:02:00 beacuse it uses an asserted-prover incorrectly 19:02:13 that's the thing, provers should be rare and very carefully written and small 19:02:20 everything else can be inferred on top of them 19:02:24 ehird: what I'm saying is there should be /no provers/ under your definition 19:02:30 ais523: yes, but that's shaky 19:02:32 not just rare and carefully written and small 19:02:33 it's not general 19:02:35 and you could slip up 19:02:38 you can infer everything from the lang itself 19:02:39 very easily 19:02:39 it's very general 19:02:40 no 19:02:41 no slips 19:02:41 you can't 19:02:45 because it's the fucking halting problem 19:02:53 ehird: no, it isn't 19:03:02 no? 19:03:04 look at your assert above, for instance 19:03:08 anyway, you CAN'T even inferr it, ais523 19:03:08 beacuse 19:03:10 you don't know 19:03:12 what it does 19:03:14 on 19:03:16 error 19:03:17 it's very easily to statically prove that x is true if it ever reaches the end of the function 19:03:18 it could print out to the screen 19:03:20 it could set a toaster off 19:03:22 and I'm assuming something like an abort here 19:03:23 it could eat loads of memory on purpose 19:03:25 it could play pacman 19:03:27 ais523: aha, assuming 19:03:31 so now you have a new class 19:03:32 aborters 19:03:39 and you can't handle errors your own way 19:03:40 great 19:03:41 ehird: yes, all static analysers use those AFAIK 19:03:43 and you can 19:03:49 yes, but they shouldn't 19:03:55 because that method is itself verifiable to abort 19:04:04 if it doesn't abort, then the assert isn't actually proving anything 19:04:05 idea: just use haskell, should be way easier to prove 19:04:05 it's far more robust to have a few primitive provers that are carefully checked 19:04:09 and rarely ever declare anything as a prover 19:04:15 ehird: yes, it's called the operators of the language 19:04:15 AnMaster: er, shut up, it's exactly the same for haskell 19:04:17 like while and + 19:04:25 those are your primitives 19:04:27 ais523: have fun solving the halting problem 19:04:30 ehird, excepts the dirty bits are all in monads 19:04:42 AnMaster: stop bullshitting... 19:04:44 ehird: it doesn't need to solve the halting problem, it's a static analyser by definition 19:04:48 it only has to do a finite amount of work 19:04:48 ehird, sorry :P 19:04:59 ehird, I meant nomads of course 19:05:01 it may not be able to prove everything, but if it can't, that's a warning/error 19:05:17 and the programmer should annotate the program defensively so it can 19:05:32 ais523: if you think you can write a program that takes an arbitrary function and verifies whether it actually "proves" (where you don't know how it will handle success/failure of this proof) an arbitrary piece of code boolean condition 19:05:41 for instance, you can get assert to find a counterexample to the Riemann hypothesis if it finds the assertion is false 19:05:43 even though it may use different ways to say the same value than the prof 19:05:44 proof 19:05:46 then you're a crackpot 19:05:52 and I'm not going to continue talking 19:05:53 then, the static analyser will mark that code as buggy, even though it might not be 19:05:55 if you don't believe that 19:05:59 then provers are a better solution 19:06:36 ehird: I think I can write a program that takes an arbitrary function, and a statement about what it's meant to prove, and either deduce (in the 99% of cases that matter in practice) that it does indeed prove that, or be unable to prove it proves that and errors out 19:06:47 go do it 19:06:55 you can't solve the halting problem. But you can write a program in such a way that it can be verified that the program halts 19:06:57 there's a difference 19:07:06 meanwhile i'll spend the extra 5 seconds when writing a program to make sure the provers are correct, after having saved 5 years that it'll take you to write your mythical program 19:07:13 hf 19:07:22 ehird, " then you're a crackpot" <-- just remember he *did* win the wolfram price 19:07:25 ehird: but then, it's theoretically possible that someone could write a buggy program 19:07:29 AnMaster: yep, I'm a crackpot 19:07:32 AnMaster: Argument to authority also makes you a crackpot. 19:07:33 even if he *is* a crackpot as you say, he is a smart one 19:07:34 :P 19:07:53 ais523: there are always buggy programs. 19:07:57 fuck, this checker will have like 500 bugs 19:08:04 the point is mitigation to a reasonable level 19:08:15 [i for i in [1,2,3,4,5] while i<3] i'm sad this doesn't exist in python 19:08:15 and since provers should be rare, you can mitigate their correctness almost 100% 19:08:20 save things like the stdlib failing 19:08:21 oklopol: you can 19:08:24 ehird, same as the difference between eccentric(sp?) and mad 19:08:26 [i for i in [1,2,3,4,5] if i<3] 19:08:34 except not about money 19:08:36 ehird: that's only the same in that case 19:08:55 i meant, you know [i for i in [1,2,3,4,5,4,3,2,1] while i<3] >>> [1,2] 19:09:34 ehird: the thing is, I don't see why on earth you're saying that your assert needs to be marked as a prover, when it's trivially veifiable 19:09:43 it's much easier to verify than most of the nonprover functions out there 19:09:55 you're saying provers should be trivially verifiable. If it's so trivial, why not verify them automatically? 19:09:59 ehird, it should have fewer bugs than qmail 19:10:01 ais523: because assert is a trivial example 19:10:37 and i really don't care what you think is theoretically possible because the difference in the two in practice is neligible except mine invites more careful checking of programs, and takes years less tow rite 19:10:55 AnMaster: isn't qmail very bug-free? 19:10:56 ehird: yours takes longer to write, and checks less of the program 19:11:06 ais523: you're wrong. 19:11:22 ehird, yes it is 19:11:59 ehird, there hasn't been a bug for years iirc, and between 1.0 and now there has been less than 10 bugs iirc 19:12:10 ehird: can you give an example of a complicated prover? 19:12:20 Is qmail licensed yet? 19:12:37 ais523: sure -- think about e.g. KDE/Qt 19:12:38 ehird, public domain since some time iirc 19:12:52 ehird: what would it be proving? 19:12:53 ehird, that would involve proving X first 19:12:53 they almost certainly have bulky assertion functions which do things like report the error to a gui 19:13:01 ais523: who knows? 19:13:02 something. 19:13:08 ehird: yes, but it's trivial to verify that the functions in question exit 19:13:13 rather than returning 19:13:16 exiting is NOT ALWAYS CORRECT 19:13:17 ehird, and yet qmail is one of the most used (the most used?) MTAs out there 19:13:18 you don't even have to analyse the whole function for that 19:13:24 it could change the program to bug reporting mode instead 19:13:27 ehird: do they exit the program, or do they continue it? 19:13:34 ais523: continuing COULD BE CORRECT 19:13:35 if they're changing to bug report mode, your assertion is in fact /false/ 19:13:39 you've proved something false in that case 19:13:45 so your prover is actually buggy 19:13:49 ... no 19:13:50 that's retarded 19:13:58 you've found that somethign is false, and you're handlnig that 19:13:59 ehird, it is theoretically correct 19:14:01 if continuing from an assert when the condition is false is /ever/ correct, it /hasn't proved what it's claiming to prove/ 19:14:14 your definition of prove is completely wrong in the context 19:14:16 a more interesting case is if assert somehow alters the program's state so the condition becomes true 19:14:25 i'm not even talking about it any longer because it's worthless 19:14:26 seems ehird is one of those people who take the halting problem as the end of topic of proving. 19:14:32 no 19:14:35 ehird: using your method, assert(x != NULL); putchar(*x); could segfault 19:14:41 ais523: no, it couldn't 19:14:48 it could pop up a bug reporting window 19:14:51 yes it could, if assert ever returned when x was null 19:14:53 which then exit()s in itself 19:14:55 yes 19:14:59 or 19:15:03 in that case, it's trivial to determine that assert exits 19:15:03 maybe the platform doesn't do exit() 19:15:05 maybe it's embedded 19:15:09 oklopol, oh yes, somewhat like a Godwin's law for TC discussions? 19:15:10 maybe it goes into an infinite loop of flashing a warning light 19:15:14 ehird: yes 19:15:25 anything but a complicated infiniloop is relatively easy to analyse 19:15:27 you can't fucking say that the program exiting is the only way it can handle a false proof 19:15:31 because that is simply WRONG 19:15:41 ehird: no, the only way it can handle it is /failing to continue past that point/ 19:15:48 there are only two ways to do that, exit and infiniloop 19:15:59 and NEITHER HAS TO HAPPEN IN THE ACTUAL FUNCTION 19:16:04 well, exactly 19:16:06 it could happen in a function in a binary blob that it calls 19:16:09 that's what the static analyser is for! 19:16:10 there's no way to prove THAT works 19:16:11 ais523, err 19:16:14 ais523, not correct 19:16:14 you analyse the functions it calls 19:16:21 AnMaster: yes, kinda like tcness is for language discussions 19:16:22 ais523, if another thread alters this thread 19:16:23 ais523: except you can't assert that a function in a binary blob exits 19:16:25 it could return 19:16:29 because it needs to fucking statically analyze the source for that 19:16:31 ais523, ! 19:16:32 beacuse it uses your retarded scheme 19:16:33 ehird: well, those do need annotations as primitives 19:16:39 o ho ho 19:16:40 but then, you're just taking the programmer on trust 19:16:41 ais523, this gets hugely complicated if you use phtreads 19:16:42 so now you have proves as an annotation 19:16:43 which is a bad idea 19:17:09 ehird: yes, but you have to realise that you're sacrificing guaranteed correctness in that situation 19:17:17 ais523, I'm uncertain you could prove anything in fact if the program was threaded 19:17:18 in fact, trusting binary blobs to do anything particular at all is a bad idea 19:17:22 if you want to make sure your program is gine 19:17:32 arguing with you is so pointless, you just continually reassert that you're right immediately after admitting you're wrong 19:17:33 AnMaster: you can, you just need to make assertions about how the threads affect each other 19:17:34 ais523, also I would love to see what splint did on #pragma omp 19:17:50 ais523, #pragma omp is OpenMP btw 19:17:56 much the same way as you annotate how you affect global variables in SPlint 19:17:57 i didn't really read much of this, anyone feel like quickly explaining what the argument is about? 19:18:16 oklopol, writing a static analyzer for a C like language that could verify the program 19:18:16 and what's the topic 19:18:17 oklopol: ehird's arguing that a static analyser should take the programmer on trust for things rather than verifying them itself 19:18:22 ... 19:18:25 shut up 19:18:27 that's not what i fucking said 19:18:35 ais523: that's what i thought he meant 19:18:37 I'm arguing that a static analyser should in all cases possible determine things for itself 19:18:41 oklopol, want some popcorn? 19:18:45 ehird: yes it is 19:18:45 this is interesting 19:18:53 AnMaster: I'm popping some! 19:18:55 please give an example of how that isn't your viewpoint 19:18:58 AnMaster: not yet, i want context before i start watching :P 19:19:00 GregorR, great! 19:19:01 REOWR HISS 19:19:06 GregorR, hm? 19:19:10 that's true IFF every function in every program is a prover. 19:19:16 whereas barely any are. 19:19:16 AnMaster: I'm watching a cat fight :P 19:19:21 and furthermore, this is tiring. goodbye. 19:19:22 -!- ehird has left (?). 19:19:24 what's a prover? 19:19:28 ehird: there is no difference between provers and nonprovers 19:19:28 damn he left 19:19:28 Awwww 19:19:31 ouch 19:19:33 oklopol: an idea invented by ehird 19:19:35 * GregorR turns off his popper. 19:19:47 basically it's a function that the programmer asserts does something 19:19:54 special functions that can assert things the compiler then takes on trues? 19:20:01 and the static analyser takes the programmer at their word 19:20:02 rather than checking that it actually does that 19:20:04 ais523: right. that's an assert 19:20:07 assert ...; 19:20:12 yes, assert was the example we were mostly using 19:20:17 it's just an assert that doesn't actually fail. 19:20:25 it just helps the proves 19:20:29 *prover 19:20:33 I was arguing that it's better and more robust to get the compiler to look in the source of assert to make sure it actually does what it's supposed to dp 19:20:35 *do 19:20:52 ais523, well for assert() that is simple 19:20:57 after all, ehird's idea was that provers should be so simple that they can be checked by hand to unambiguously make sure they always work 19:20:57 it goes something like this: 19:21:01 AnMaster: I know 19:21:12 no need to argue this point with me, I'm on the same side as you I think 19:21:22 /usr/include/gentoo-multilib/amd64/assert.h:extern void __assert (const char *__assertion, const char *__file, int __line) 19:21:23 nice 19:21:26 well, if provers are so simple, just analyse them yourself like the rest of things 19:21:27 didn't exepect that 19:21:30 ais523: and what would their point be? 19:21:44 oklopol: ehird had to resort to things like binary blobs which couldn't be statically checked 19:21:49 or mentioining the halting problem 19:21:50 that the programmers would more easily believe the programmer is correct? 19:21:51 # define assert(expr) \ 19:21:51 ((expr) \ 19:21:51 ? __ASSERT_VOID_CAST (0) \ 19:21:51 : __assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION)) 19:21:54 ais523, ^ 19:21:59 that is assert on my system 19:22:05 i mean, that's what modularity and asserts are for 19:22:20 and that whole idea is equivalent to the assert statement found in all languages 19:22:25 ais523, can you prove it? I think it ends up calling a compiler built in 19:22:25 oklopol: ehird thought it was impractical/impossible to verify that all provers worked statically 19:22:39 AnMaster: you need to know what compiler builtins do to be able to analyse them, ofc 19:22:45 except in a round-about fashion that i don't really see a use for. 19:22:47 ais523, right 19:22:47 there is a bottom level of provers as ehird calls them, obviously 19:22:56 but they shouldn't be programmer-written functions 19:23:02 ais523, a few standard C ones? 19:23:07 would make sense 19:23:08 they should be the primitives of the language, the operators, commands, functions and builtins 19:23:15 you can either do it on libc 19:23:19 or just look in the source of libc 19:23:34 for instance, you can run through the source of newlib and determine that assert doesn't always assert 19:23:40 ais523, gcc uses builtins for lots of things 19:23:43 because it raises a SIGABRT, which might be masked 19:23:49 ais523: you could do that when proving something trivial that's hard to prove in the language of the prover 19:23:52 AnMaster: this isn't really relevant... 19:23:56 oklopol: yes 19:23:59 assuming you're using a system where you can help the prover 19:24:01 except I don't see this situation coming up 19:24:08 ais523, also I believe assert() raises sigabort on glibc too 19:24:13 ais523, since it drops you into gdb 19:24:15 AnMaster: it does on all POSIX systems by default 19:24:21 right 19:24:21 ais523: proofs tend to get three times bigger when you get technical 19:24:25 which means it's actually kind-of useless for asserting 19:24:49 i'm assuming there would be automatic proving too? 19:24:52 maybe that's why Splint was complaining about my asserts! 19:24:56 oklopol: yes, that's the whole point 19:25:02 ais523, unless you prove SIGABRT isn't masked 19:25:03 yeah, that's why i assumed it 19:25:07 AnMaster: ah, yes, ofc 19:25:13 Splint isn't that sophisticated 19:25:17 a good static analyser would be though 19:25:18 well i agree with ehird, that would be helpful 19:25:28 ais523, you could see if there is any call to signal() or sigaction() involving sigabrt 19:25:31 although probably for a different reason than him 19:25:35 AnMaster: yes I know 19:25:37 for example cfunge only masks sigpipe 19:25:40 oklopol: what in particualr are you agreeing with? 19:25:41 i'm thinking it would be useful for the trivial things, not the complicated ones. 19:25:49 ais523: that they would be useful 19:26:05 that you could tell the prover about a high-level idea 19:26:05 oklopol: what sort of trivial things are you thinking of which couldn't just be static-analysed like the rest of the code? 19:26:09 ais523, what would you do if the program used alarm() then everything is suddenly a timing issue 19:26:23 AnMaster: bail out if you couldn't prove for certain that it worked 19:26:39 ais523, well cfunge uses alarm() in fuzz testing builds 19:26:41 ais523: probably something that's intuitively clear, but the prover just happens not to get right, and you don't feel like explaining it to it 19:26:45 I mean, you could write a program where on a failed assert it searched for a counterexample to the Riemann Hypothesis, then kept on going 19:26:48 ais523, to run for a limited time 19:26:56 oklopol: I'd call that a bug in the linter 19:27:17 that's the sort of example that the linter couldn't prove correct 19:27:25 but people don't do that in practice, and IMO shouldn't use it in maintainable code 19:27:31 ais523, also you do need to trust the compiler to not have bugs in code generation 19:27:36 AnMaster: yes 19:27:37 like what + - and so on does 19:27:49 the idea is to avoid bugs in the original source code 19:28:01 bugs in the linter or in the compiler can still cause buggy output, of course 19:28:01 ais523, and you couldn't just run it on the compiler to see if it found issues 19:28:02 because 19:28:04 ais523: i'm not saying there's any use with a good prover 19:28:14 i just don't know how good provers are. 19:28:17 1) You could have a buggy build of the linter 19:28:28 2) you could have logic bugs causing such issues in the compiler 19:28:38 oklopol: not very good atm, but the whole idea was a project to build a good one 19:28:58 and we got sidetracked over the issue of where the primitives should be 19:29:10 ais523, well you got any idea how? 19:29:10 I certainly don't 19:29:10 i mean some intuitively clear graph algorithms, even something as simple as dijkstra, aren't trivial to prove 19:29:25 well dijkstra is trivial to prove for a human, but an actual proof is pretty long 19:29:37 oklopol, hm? 19:29:41 oklopol, what? 19:29:48 oklopol, that things are harmful? 19:29:49 !? 19:29:53 oklopol: proving that it works, you mean? 19:29:54 what has that got to do with it 19:30:01 ais523: yes 19:30:03 my point is 19:30:11 my vision is that you'd include a proof that it always returns the best answer 19:30:16 you might want to, even if your prover can't prove that part, to be sure about the parts it can prove 19:30:17 a machine-readable one, in C 19:30:31 and yes, a proves_unsafe pragma would be helpful during development 19:30:43 but if I'm using such a superlinter as this, I wouldn't want any in a production build 19:30:48 ais523: yes, that's better, i'm just saying you might want to be able to skip some of the proof, for instance to be able to try it out 19:30:52 (or, you could just do expected-error instead) 19:30:54 ais523, also there will be programs where it would be useful to prove parts of the code even if you can never prove it all 19:31:11 assuming you couldn't compile a program that hasn't been proven to be correct or something 19:31:18 ais523, for example you can't prove X ever since it depends hugely on agp card bugs 19:31:19 and such 19:31:49 -!- oerjan has quit ("Bus"). 19:31:50 but yes, of course, in the end, the proof should be given to the prover as steps in whatever system it uses for deduction itsel 19:31:51 f 19:32:04 oklopol, yes 19:32:25 ais523, if you can write this linter it would rock 19:32:28 and i think ehird fails to realize most of the "intuitively clear" things you'd end up telling the prover like by trust, are exactly things that are trivial to prove in its own language 19:32:33 but I certainly know I couldn't help you 19:32:37 I don't know how simply 19:32:37 oklopol: that was my main point 19:32:46 anyway, it seems assert crashes the program even if SIGABRT is masked 19:32:55 according to man assert, it unmasks SIGABRT first 19:32:58 *man abort 19:33:08 ais523, hm 19:33:18 well, unblocks 19:33:23 If the SIGABRT signal is ignored, or caught by a handler that returns, the abort() function will still terminate the process. It does 19:33:24 this by restoring the default disposition for SIGABRT and then raising the signal for a second time. 19:33:24 you can longjmp out of a signal handler 19:33:25 what? 19:33:31 ah no 19:33:35 ais523, indeed you can 19:33:50 if you don't longjmp out, though, it ensures that the code nevertheless terminates 19:34:04 now, this is the sort of thing it would be great to have an automatic verifier for 19:34:12 assert isn't nearly as simple as I thought it was 19:34:26 ais523, one issue, consider the infiniloop way of exiting you mentioned 19:34:26 ais523: well, i agreed with you all along, but i still also agree with ehird's idea's possible usefulness, although for just getting the prover to skip some unproven part for now. 19:34:30 and really I wasn't confident that assert(0) always exits, but I am now 19:34:33 ais523, what if there are other threads 19:34:43 and they modify the first threads program memory 19:34:45 AnMaster: they'd need pointers into the program to change stuff in it 19:34:45 to jump out 19:34:54 ais523, sure, what about proving a jit compiler! 19:35:03 heh, that would be fun 19:35:13 we can certainly prove that it jumps into memory it's just modified 19:35:18 but not really what's happened from there 19:35:25 ais523, indeed 19:35:27 but at least we'd know there was something we couldn't handle 19:35:30 ais523, and if it is multi-threaded 19:35:34 ... 19:35:36 multithreading isn't so bad 19:35:45 as you can analyse which threads can access what in which other threads 19:35:56 but still the variable execution times between the threads is still a pain 19:35:58 ais523, if you believe the valgrind docs: they are 19:36:05 valgrind does handle it 19:36:11 apart from condition variables 19:36:17 that's an issue for the wider linter though, not for the recent me/ehird argument 19:36:25 ais523, indeed 19:36:34 AnMaster: by the way, you have a tendency of focusing on points on the wrong level during these debates 19:36:51 yes, i actually was about to point that out too 19:36:55 it gets annoying sometimes when you're focusing on a corner case that isn't part of the main debate, for instance 19:37:04 and not even the program we're originally planning to write 19:37:06 -!- ehird has joined. 19:37:20 but i'm assuming that's at least partly on purpose 19:37:28 ais523, true 19:37:37 oklopol, not fully 19:37:41 11:32:25 ais523, if you can write this linter it would rock <-- I see i'm getting all the credit for, you know, actually formulating this thing. 19:37:50 ehird: you weren't in-channel 19:37:56 and we both had similar ideas for it independently 19:38:00 yes 19:38:05 interesting, I cease to exist when I leave. 19:38:06 -!- ehird has left (?). 19:38:12 who was that? 19:38:14 :D 19:38:27 oklopol, wrong, you should have said "who was who?" 19:38:31 :/ 19:38:38 * oklopol is pretty sure ehird is getting younger as time goes by :D 19:38:48 oklopol, who? 19:39:19 AnMaster: a guy i once knew 19:39:23 like a few minutes ago 19:39:34 what? 19:39:37 but he's gone now 19:39:42 who? 19:39:50 AnMaster: you can drop the joke now 19:39:57 what joke? 19:39:58 ;P 19:40:01 ais523, right 19:40:02 ais523: stop being an ehird :D 19:40:14 oklopol, stop being an what? 19:40:15 ;P 19:40:28 a what* 19:40:48 anyway 19:41:32 ais523, the prover the way you plan it sounds cool, but I think there needs to be some kind of override mechanism when the program can't prove something but a human can verify easily 19:41:43 AnMaster: yes 19:41:43 I don't know what it would look like 19:41:50 expected warnings, I think, just like in every other linter ever 19:41:59 you tell it "don't complain about this, I know you think it's wrong" 19:42:08 and it shuts up 19:42:08 ais523, that sounds ok 19:42:28 ais523, unless this means it doesn't know if other memory is invalid any more 19:42:29 or such 19:42:56 AnMaster: well, my idea is pretty similar to ehird's, in that you can tell it "this function is meant to prove that strlen(x) >= 5", for instance 19:43:04 ais523, just consider for example that memory pool system I wrote, I was unable to express with valgrind annotations if the memory was valid or not 19:43:06 if it can't prove that, that's a warning 19:43:10 but it can assume it elsewhere 19:43:20 and I didn't even know there was such a thing as valgrind annotations 19:43:23 ais523, due to it being used internally in the allocator as a linked list of blocks after freeing 19:43:45 so memory was legally accessed as something else after the allocator_free() call 19:43:53 ais523: so like an assert? 19:43:56 basically all memory blocks were like this: 19:43:57 AnMaster: ah, you weren't using malloc/free? 19:44:01 oklopol: yes, pretty much 19:44:09 in fact, just adding assert statements would be a good solution to that 19:44:16 i mean isn't it exactly that, except that you don't specify what happens when the expression is false 19:44:20 yes 19:44:28 ais523, union memblock { union memblock *nextfree; struct datatype; } 19:44:34 ais523, I said mem pool 19:44:42 because you except it to be true even more than with an assert, in a way. 19:44:44 ais523, it allocated from a pool and returned to a free list 19:44:44 in actual code, that is a good place to put an actual assert statement though 19:44:52 ais523, single linked free list 19:45:00 well, nm my last comment 19:45:01 I generally don't put in assert statements if I ever expect them to be triggered 19:45:08 if an assertion is false, it's a bug in the program 19:45:12 and you can NDEBUG them out anyway 19:45:18 ais523, thus the memory is to be considered "inaccessible" outside the allocator functions but "accessible" inside it 19:45:21 ais523, ^ 19:45:29 could you express that? 19:45:29 AnMaster: ok 19:45:34 ais523: ndebug? 19:45:42 oklopol, ifndef NDEBUG 19:45:47 oklopol: #define NDEBUG turns off all the assert statements in the program 19:45:57 oh you meant like that. 19:45:57 and other assert-like code is normally conditioned on NDEBUG by hand 19:46:05 i thought you meant you can autoprove them out :D 19:46:11 and i was like k. 19:46:12 -!- ehird has joined. 19:46:24 oklopol: that would be good, warning if you can't prove an assert statement always has a true assertion 19:46:39 ais523, so could you handle that memory accessibility definition? even valgrind can't 19:46:43 that's a different kind of proving, it's "proving this program won't abort out with an assertion" rather than "proving this program won't work" 19:46:47 11:42:56 AnMaster: well, my idea is pretty similar to ehird's, in that you can tell it "this function is meant to prove that strlen(x) >= 5", for instance 19:46:51 you win the completely missing the point award 19:46:55 void atleast5(char *s) { assert(strlen(s) >= 5); } 19:46:57 that works 19:47:01 but assert itself has to be tagged proves 19:47:03 because it's a primitive 19:47:13 ehird: my argument is you're putting the primitives on the wrong level 19:47:23 for instance, does assert always exit? 19:47:23 yes, you're wrong though. 19:47:25 in POSIX? 19:47:30 that is irrelevant. 19:47:34 no, it definitely isn't 19:47:44 sorry, 'tis. 19:47:44 -!- ehird has left (?). 19:47:45 I don't know all the details of the system library 19:47:46 I had to look it up just now 19:48:02 why would it be irrelevant? 19:48:12 to me it sounds highly relevant 19:48:17 because ehird wants the programmer to arbitrarily declare it irrelevant 19:48:30 I'm arguing that they shouldn't have to, and that way is likely to lead to buggier code 19:48:37 as it's definitely relevant in the bigger scheme of things 19:50:03 -!- ehird has joined. 19:50:18 ais523: hmm. i think you'd need two different asserts, ones that specify what you want it to do, ones that specify what you know it does 19:50:48 readers are advised to not trust any results of ais523's mind-reading ability, as it has never been shown to be correct. 19:50:49 -!- ehird has left (?). 19:51:02 hmm... joining, making a few comments than parting before anyone can reply 19:51:08 wasn't someone doing that yesterday? 19:51:14 well you can reply, he's just making a statement 19:51:21 yes, I know 19:51:28 and also reading the logs, clearly 19:51:31 but yeah, i get your reference 19:51:34 which rather misses the point of parting the channel 19:51:36 and i agree with it 19:51:54 as for your two asserts thing, I'm not quite sure I know what you mean 19:52:00 well. 19:52:13 ones that say "this is true, assume it in your proofs" 19:52:21 and ones that say "this must be true" 19:52:25 "check that it is" 19:52:29 well, assert() is the second sort 19:52:40 i mean, you have to have some way to tell the program what you want it to do, obviously 19:52:42 because it bails out if the statement is in fact false, thus forcing it true if the program continues 19:53:07 the first sort is what ehird wanted all primitives to be 19:53:15 and the question is: what to do if it is in fact false? 19:53:20 -!- decipher has quit (kornbluth.freenode.net irc.freenode.net). 19:53:20 -!- rodgort has quit (kornbluth.freenode.net irc.freenode.net). 19:53:21 -!- psygnisfive has quit (kornbluth.freenode.net irc.freenode.net). 19:53:23 -!- Dewi has quit (kornbluth.freenode.net irc.freenode.net). 19:53:23 -!- flexo has quit (kornbluth.freenode.net irc.freenode.net). 19:53:25 -!- Badger has quit (kornbluth.freenode.net irc.freenode.net). 19:53:25 -!- AnMaster has quit (kornbluth.freenode.net irc.freenode.net). 19:53:26 -!- Slereah2 has quit (kornbluth.freenode.net irc.freenode.net). 19:53:26 -!- Vendan has quit (kornbluth.freenode.net irc.freenode.net). 19:53:26 -!- Asztal has quit (kornbluth.freenode.net irc.freenode.net). 19:53:26 -!- sebbu2 has quit (kornbluth.freenode.net irc.freenode.net). 19:53:28 -!- GregorR has quit (kornbluth.freenode.net irc.freenode.net). 19:53:30 -!- lament has quit (kornbluth.freenode.net irc.freenode.net). 19:53:31 -!- mtve has quit (kornbluth.freenode.net irc.freenode.net). 19:53:31 -!- SimonRC has quit (kornbluth.freenode.net irc.freenode.net). 19:53:33 if that's a programmer bug if it's false, you may as well use the second sort of assert 19:53:33 but the first one would be for skipping proofs of trivialities you don't feel like translating into the language of the prover, the thing you call ehird's idea, even though i guess he says it's not 19:53:39 as otherwise you're just going to have a mysterious crash later on 19:54:13 * ais523 points and laughs at christel 19:54:33 although it's not all that bad a netsplit 19:54:49 ais523: well this is what you and ehird were arguing about (i think), i just just now realized they are both asserts, in a way, just different 19:54:50 oklopol: well, the whole point is that the prover language == the language you're writing in 19:55:01 ais523: ohhhh 19:55:05 that i didn't know 19:55:06 -!- Slereah2 has joined. 19:55:06 -!- Vendan has joined. 19:55:06 -!- psygnisfive has joined. 19:55:06 -!- decipher has joined. 19:55:06 -!- rodgort has joined. 19:55:06 -!- GregorR has joined. 19:55:06 -!- Dewi has joined. 19:55:06 -!- flexo has joined. 19:55:06 -!- Badger has joined. 19:55:06 -!- AnMaster has joined. 19:55:06 -!- Asztal has joined. 19:55:06 -!- sebbu2 has joined. 19:55:06 -!- SimonRC has joined. 19:55:06 -!- lament has joined. 19:55:06 -!- mtve has joined. 19:55:09 thus there's no need to translate, unless you have a triviality that can't easily be asserted in C 19:55:10 lol that changes everything 19:55:28 then of course just the second kind is needed 19:55:31 and or whatever lang 19:55:33 and ehird's idea has nothing to do with it 19:56:10 also the netsplit report came after everyone had already rejoined 19:56:18 oklopol: lag my end 19:57:36 wait wait 19:57:55 actually of course it doesn't make ehird's idea irrelevant, i somewhat misunderstood 19:58:10 no, it doesn't; I just think ehird's putting the primitives at the wrong level 19:58:17 it's a minor argument really which blew up somehow 19:58:32 well if he thinks all proofs should have primitives with the programmer asserting something 19:58:40 back 19:58:46 then he if obviously wrong 19:59:21 I agree with the idea of only using a few well-checked primitives; but I think they should be the language's primitives themselves, not some layer the programmer puts on top of things 19:59:43 AnMaster: what do you think of bfrle.c, by the way? It's a BF interp designed specifically to debug gcc-bf 19:59:46 ais523: well those are really two different ideas 20:00:10 well. 20:00:14 ais523, link? 20:00:15 they are different ideas, but I think they should be the same operators/commands/functions/whatever to reduce the chance of error 20:00:20 AnMaster: http://rafb.net/p/sRPjBK56.html 20:00:32 same one as before, just a different context for linking 20:00:44 it's not quite ESO-standard brainfuck 20:00:56 partly because ESO still hasn't started, and partly because it gives special meanings to % and * 20:01:03 % and * ? 20:01:08 what on earth do they do? 20:01:09 * because run-length-encoded BF is so much shorter 20:01:15 +*6 is equivalent to ++++++ 20:01:22 ah 20:01:26 and % followed by a number means "assert the pointer is here" 20:01:36 so %80 means that the pointer should be on the 80th cell 20:01:41 hm 20:01:42 how's that useful? 20:01:43 not sure offhand if it's 0-based or 1-based 20:01:52 oklopol: to prevent mysterious crashes later 20:02:06 if the pointer isn't where it thinks it is, it's basically UB 20:02:09 which makes it hard to debug 20:02:39 the pointer not being where it thinks it is means there's a bug somewhere, at that point it dumps tape so I can debug what caused it 20:03:01 ais523, what about proving for programs like cfunge, what could you prove about it? 20:03:09 AnMaster: you could prove the state of globals 20:03:16 and that you neve read past the null terminator of a string 20:03:20 *never 20:03:24 and that you didn't overflow any buffers 20:03:36 ais523, the former totally depends on what the befunge program does 20:03:42 AnMaster: not all globals 20:03:50 ais523, true, a few are set at load time 20:03:56 but I mean, you could prove that whenever you tried to read the fungespace it had been allocated 20:04:01 ais523, however I had them overwritten once 20:04:05 due to an indexing errors 20:04:22 a static array overflowed a lot and wrote in another static variable 20:04:23 well, ideally a linter would detect that your program could potentially overwrite the wrong global 20:04:38 or something as simple as accessing element -1 of an array 20:04:44 only with mudflap did I detect it 20:04:47 hmm... this might be a good time to use some of the stranger features of C pointers 20:05:01 ais523, also it was a hard to prove case 20:05:02 for instance, if a is an array then even calculating a-1 is UB 20:05:13 ais523, and it was after, not before 20:05:18 AnMaster: well, I'm not really going for practicality here, but for idealism 20:05:24 ais523, true 20:05:38 also: what about VLA? 20:05:44 they are sure to mess up proving 20:05:45 AnMaster: that's much the same as malloc 20:05:48 I don't use VLA 20:05:49 and not at all 20:05:59 ais523, I *do* use flexible array members 20:06:01 VLAs are slightly easier to lint than the equivalent malloc/free pair 20:06:07 because you know they aren't there when they go out of scope 20:06:17 as in struct with a variable size last element 20:06:21 ais523: okay yeah i see how it's useful 20:06:23 wasn't thinking 20:06:28 ais523, and which is resized in chunks 20:06:35 i haven't been thinking much today 20:06:46 and only shrunk if the difference is too large 20:06:51 AnMaster: well, it could prove that the allocated size was always equal to the size the struct said it was 20:07:04 anyway, I have to go home, it's been an interesting conversation but I have to have dinner sometime 20:07:06 ais523, it isn't because of the flexible struct member... 20:07:18 AnMaster: I was giving an example of what a linter could prove 20:07:32 bye everyone, anyway 20:07:35 ais523, so how would you be able to track what flexible struct member indexes are valid 20:07:36 oh well 20:07:42 -!- ais523 has quit (Client Quit). 20:07:59 dang. i was just about to need him. 20:08:17 also the reason I use flexible struct members instead of a linked list is cache locality (ehird will love that) 20:08:18 ;P 20:08:30 yes it did impact performance 20:08:37 what are flexible struct members? 20:08:53 -!- Corun has joined. 20:08:59 oklopol, you know what struct mystruct { int foo; int bar }; is? 20:09:01 well 20:09:11 AnMaster: i know c/c++ 20:09:14 oklopol, struct mystruct { int foo; int bar; int someints[] }; 20:09:16 C99 20:09:21 oh 20:09:28 oklopol, it allows the last member to be variable size 20:09:30 you specify at allocation? 20:09:38 well yeah, makes sense they'd allow that 20:09:44 oklopol, malloc(sizeof(mystruct) + whatever) 20:09:53 ah. 20:09:55 right right 20:10:04 what about mystruct x; 20:10:07 and then you can access it as mystructvariable->someints[4] 20:10:10 or whatever 20:10:20 oklopol, I don't know, don't think it is legal 20:10:24 AnMaster: well you could just do someints[0] and have that same behavior. 20:10:35 oklopol, err 0 isn't valid there 20:10:36 or rather 20:10:39 GCC allows it 20:10:39 1 then. 20:10:44 but not valid C89 20:11:00 i thought they allowed it at some point, but may have been c++, or just my imag 20:11:03 oklopol, some compilers might complain that is out of valid range 20:11:16 AnMaster: i guess. 20:11:42 they *should* allow that for locals 20:12:08 oklopol, eh? 20:12:16 i mean how hard is it to compute how much to move the stack pointer at runtime 20:12:36 AnMaster: that you could do mystruct x WITHLASTSIZE 100; 20:12:38 16 As a special case, the last element of a structure with more than one named member may 20:12:38 have an incomplete array type; this is called a flexible array member. In most situations, 20:12:38 the flexible array member is ignored. In particular, the size of the structure is as if the 20:12:38 flexible array member were omitted except that it may have more trailing padding than the omission would imply. 20:12:47 WITHLASTSIZE being a keyword 20:13:05 oklopol, GCC extension: alloca 20:13:18 oklopol, also there is variable size array 20:13:23 which is variable sized array on stack 20:13:24 like 20:13:41 -!- MizardX has joined. 20:13:51 int foo(int x) { int array[x]; } 20:13:58 not very useful function 20:14:13 oklopol, also I prefer to avoid that, larger risk for stack overflow 20:14:22 and most automated tools can't protect that 20:14:29 like stack smashing protection 20:14:37 well us real programmers don't use tools : D 20:15:03 oklopol, stack smash protection means that the compiler inserts special values on the stack and verify them on return 20:15:07 if they were overwritten... 20:17:00 oklopol: 20:17:02 EXAMPLE After the declaration: 20:17:02 struct s { int n; double d[]; }; 20:17:02 the structure struct s has a flexible array member d. A typical way to use this is: 20:17:02 int m = /* some value */; 20:17:02 struct s *p = malloc(sizeof (struct s) + sizeof (double [m])); 20:17:03 and assuming that the call to malloc succeeds, the object pointed to by p behaves, for most purposes, as if 20:17:06 p had been declared as: 20:17:08 struct { int n; double d[m]; } *p; 20:17:10 (there are circumstances in which this equivalence is broken; in particular, the offsets of member d might 20:17:15 not be the same). 20:17:17 from C99 specs 20:17:29 and: 20:17:31 struct s t1 = { 0 }; // valid 20:17:32 struct s t2 = { 1, { 4.2 }}; // invalid 20:17:32 t1.n = 4; // valid 20:17:32 t1.d[0] = 4.2; // might be undefined behavior 20:18:11 The initialization of t2 is invalid (and violates a constraint) because struct s is treated as if it did not 20:18:11 contain member d. The assignment to t1.d[0] is probably undefined behavior, but it is possible that 20:18:11 sizeof (struct s) >= offsetof(struct s, d) + sizeof (double) 20:18:11 in which case the assignment would be legitimate. Nevertheless, it cannot appear in strictly conforming 20:18:11 code. 20:18:25 oklopol, does that answer the issue of such structs on stack? 20:22:00 -!- moozilla has joined. 20:24:31 -!- moozilla has quit (Read error: 54 (Connection reset by peer)). 20:24:33 -!- moozilla has joined. 20:27:55 AnMaster: well all that was new was you could declare them as locals, and the array was by default empty. 20:28:06 which i don't consider that relevant a detail 20:31:49 -!- Corun has quit ("This computer has gone to sleep"). 20:39:41 -!- metazilla has joined. 20:39:43 -!- moozilla has quit (Read error: 104 (Connection reset by peer)). 20:39:51 -!- metazilla has changed nick to moozilla. 20:42:00 -!- moozilla has quit (Read error: 104 (Connection reset by peer)). 20:42:03 -!- moozilla has joined. 20:46:35 -!- Judofyr has quit (Read error: 54 (Connection reset by peer)). 20:59:33 -!- moozilla has quit (Read error: 104 (Connection reset by peer)). 21:06:38 -!- CakeProphet has joined. 21:21:47 -!- Corun has joined. 21:21:58 -!- ehird has joined. 22:22:27 -!- Sgeo has joined. 22:25:58 -!- seveninchbread has joined. 22:26:03 -!- CakeProphet has quit (Read error: 110 (Connection timed out)). 22:26:06 -!- seveninchbread has changed nick to CakeProphet. 22:32:29 -!- oerjan has joined. 22:36:28 -!- GreaseMonkey has joined. 22:41:19 -!- Sgeo has quit (Remote closed the connection). 23:14:17 -!- Corun has quit ("This computer has gone to sleep"). 23:23:45 -!- psygnisfive has quit ("Leaving...").