00:04:01 -!- impomatic has left. 00:31:17 -!- clivebombejingle has joined. 00:33:11 Aloha 00:34:43 -!- clivebombejingle has quit (Remote host closed the connection). 00:45:05 Annoying thing about Tcl: Libraries that use callbacks can take the callbacks in several different forms, some of which are harder to deal with than others 00:45:18 The irc package in tcllib takes scripts 00:46:15 OK so broken teabags are like 20% of what's wrong with the world. 00:47:04 Sgeo_: If by "scripts" you mean what I think you mean, that's by far the most normal means of callbacks. 00:47:06 luckily, it's trivial to live entirely without tea 00:47:22 pikhq_, ah 00:47:36 pikhq_, I'm under the impression that command prefixes are better 00:47:49 You can pass a script to something expecting a command prefix via apply 00:48:21 And using apply like that also makes it easy for arguments provided by the callback to go into arbitrary places in the script 00:48:32 Sgeo_: Keep in mind that apply is relatively recent. 00:49:17 What's the normal way to pass in arguments to scripts? Make commands that give the data in question? 00:49:41 Yeah, generally. 00:50:55 The normal way to have the callback include data specified when calling the thing that takes the callback is to make a proc and generate the script with [list]? 00:54:53 i.e.: 00:55:32 somesnitobj registerevent someevent [list myhandler $data1 $data2] 00:55:39 (e.g. not i.e.) 01:07:30 So, I'm pondering how to implement computation in Proce. 01:09:05 Logic gates are easy enough to implement. Suppose that 0 and 1 represent true and false, respectively, and f and g are signals. 01:09:45 Then NOT f is f - 1; f AND g is r!(f + g - 1); and... you can figure out the rest. 01:10:45 It should in theory be possible to write long scripts in "[list ...];[list ...]..." form, right? 01:11:00 Although probably not the best way to go 01:15:10 -!- pikhq_ has quit (Ping timeout: 245 seconds). 01:15:19 -!- pikhq has joined. 01:17:26 So yeah, you get arbitrary finite state machines for free. You can also create Minsky machine registers, if you have an exactly accurate clock. 01:17:38 And from there, of course, you can create a Minsky machine. 01:39:43 Doing logic gates like I said seems like cheating, though. It's not supposed to be possible to store information outside of i! signals. 01:43:17 -!- david_werecat has joined. 01:46:55 -!- derdon_ has joined. 01:48:09 -!- derdon_ has quit (Remote host closed the connection). 01:49:54 -!- derdon has quit (Ping timeout: 264 seconds). 02:25:37 pikhq, is this a bad idea http://nopaste.dk/p13368 02:27:01 -!- Phantom_Hoover has quit (Read error: Connection reset by peer). 02:28:42 -!- david_werecat has quit (Ping timeout: 255 seconds). 02:57:49 -!- ogrom has joined. 04:14:46 -!- monqy has joined. 04:20:48 -!- pikhq_ has joined. 04:21:06 -!- pikhq has quit (Ping timeout: 264 seconds). 04:21:45 monqy: what does a monqy do. 04:22:01 hi 04:22:01 monqy: You have 1 new message. '/msg lambdabot @messages' to read it. 04:26:36 monqy: word problem: a train leaves London traveling at 5 knotts. The london skyline's width decreases at a rate of 0.25 centimeters per second. What is the circumfrence of the sun in the sky? 04:27:38 idk 04:27:46 correct! 04:30:46 i think that if one knew the circumference of the sun in general it would be the correct answer 04:31:06 but i think it is too trivial a fact to keep 04:33:06 hichaf 04:33:42 shachaf: is your alt nick sha1chaf? 04:33:45 because it should be 04:35:17 I want to devise a word problem where the facts given in the word problem seem completely unrelated to the question at the end 04:35:27 but the answer can be accurately derived from the facts. 04:36:20 actually I know 04:36:28 the facts for the word problem can be 04:36:29 wikipedia 04:36:53 and the question can be: "How do you distribute wealth equally among all people in the world?" 04:37:06 kallisti: It's not. 04:37:14 himc 04:37:52 i found Xhorxh W. Bush Street 04:43:34 i speculate that you can't play google pacman on the namco offices in google maps street view 04:45:36 -!- Jafet has joined. 04:46:20 -!- kallisti has changed nick to unaffiliated. 04:46:48 unaffiliated@unaffiliated/unaffiliated 05:03:06 The irc package in tcllib is disgustingly low-level 05:03:07 $conn registerevent 001 [list $conn join $config(chan)] 05:03:13 ^^how to join a channel 05:03:49 Sgeo_: my perl bot is better yo 05:03:53 -!- unaffiliated has changed nick to kallisti. 05:22:42 -!- itidus21 has changed nick to detail_if_fan_u. 05:27:53 -!- detail_if_fan_u has changed nick to itidus21. 05:37:39 -!- zzo38 has joined. 05:45:42 -!- pikhq has joined. 05:45:42 -!- pikhq_ has quit (Ping timeout: 240 seconds). 06:21:17 asdnlfjkashjkfawihefwkalfra 06:21:20 Trying to make an IRC bot 06:21:33 Latest bug in millionth test: Arbitrary code execution 06:25:02 Not arbitrary code, just arbitrary string commands 06:37:12 -!- asiekierka has joined. 06:53:47 I have gotten some messages on nesdev about my improvements to PPMCK 06:56:03 Some people had their own improvements so some of them I have also added on to my program too, such as allowing #EX-VRC-VII as an alias to #EX-VRC7 06:56:57 http://www.phun.org/newspics/funny_friday_2/7065.jpg 06:57:00 America in a nutshell 06:57:52 Will they fit? 07:00:02 zzo38: Well, if the whole universe can fit in a nutshell, surely just America can as well. 07:00:17 Unless perhaps ego has an anti-TARDIS effect on space. 07:00:44 Space In Dimension Relative And Time? Yes, clearly that is the anti-TARDIS effect. 07:01:10 pikhq, do Tumblr and Twitter not know how to send 304? 07:01:48 Sgeo_: I presume not. 07:02:51 -!- pikhq_ has joined. 07:05:57 What is a anti-TARDIS effect? 07:06:42 -!- pikhq has quit (Ping timeout: 264 seconds). 07:08:54 -!- Jafet has quit (Quit: Leaving.). 07:09:42 -!- Taneb has joined. 07:14:08 Hello 07:15:25 -!- azaq23 has quit (Remote host closed the connection). 07:25:28 -!- epicmonkey has joined. 07:25:33 -!- pikhq_ has quit (Ping timeout: 244 seconds). 07:25:39 -!- pikhq has joined. 07:30:28 I have thought of idea of some kind of programming language for compression, having four blocks: Archive block, Control block, Compress block, Calculate block. 07:30:48 O, and also Data block. 07:34:43 Calculate block are pure functions. Compress block are always reversible programming. Archive block has no flow controls (and always halts), except it can call Control block (but cannot decide what to do from the result), and the Archive block can also set values of registers. 07:40:53 -!- ogrom has changed nick to Cornholio. 07:41:02 -!- Cornholio has changed nick to ogrom. 07:47:34 -!- pikhq_ has joined. 07:50:21 -!- pikhq has quit (Ping timeout: 244 seconds). 07:51:48 Well, I mean, the functions can be partial, but it is reversible when in range and otherwise error message if given wrong input. 07:54:23 What is a psychosimulator test? 07:57:10 -!- epicmonkey has quit (Ping timeout: 252 seconds). 08:04:09 zzo38: when i saw this i thought you might like it http://www.youtube.com/watch?v=vtbsje5dHtM 08:04:19 Too bad. 08:04:55 it should be clear from 30 seconds in why 08:05:44 i dont like this sort of game at all 08:05:54 but someone linked this 08:06:16 Stop linking videos too much, especially YouTube 08:06:52 the 8bit sound effects is only fun part 08:07:08 -!- Phantom_Hoover has joined. 08:07:10 sorry about that zzo38 08:07:19 Morning, PH 08:07:42 Hello Taneb. 08:09:09 I am in an argument with someone 08:09:16 who is claiming that the peano axioms are not a definition of the natural numbers 08:09:19 because it defines other sets 08:09:21 such as the powers of two. 08:09:23 >_> 08:09:25 <_< 08:09:33 They aren't 08:09:33 wow 08:09:35 Does it? 08:09:38 They contain, but aren't 08:09:41 I think 08:09:42 you can't even /have/ the powers of two 08:09:46 without the natural numbers 08:09:47 It seem to me that they don't 08:10:06 kallisti, hey now don't start getting all philosophical. 08:10:08 As far as I know they define natural numbers only 08:10:17 Axioms one and six define the natural numbers 08:10:30 Phantom_Hoover: this argument is entirely philosophical 08:10:39 I think you need more than just axioms one and six. 08:10:40 because it's about what defines something in mathematics. 08:10:46 "In mathematical logic, the Peano axioms, also known as the Dedekind–Peano axioms or the Peano postulates, are a set of axioms for the natural numbers[...]" 08:11:29 zzo38, seven, I think you need too 08:12:30 Actually I think you need all of them if they are to define the natural numbers, without all of them there would be other things too which follow these axioms 08:12:41 Maybe 08:13:15 you can't really define the ordering of natural numbers with only the first and sixth axioms 08:13:29 the sixth one only says "oh btw, if n is a natural, then so is S(n). good luck" 08:14:35 but that doesn't say whether S(S(n)) is a distinct natural number from S(n) 08:14:46 True, yeah 08:14:57 I'm wrong, as usual 08:15:12 Well duh, if you leave out the axioms defining the equality relation you don't have an equality relation. 08:15:23 yes, pretty much 08:15:39 -!- ogrom has quit (Quit: Left). 08:16:15 You need all the axioms to define the natural numbers, by definition. 08:20:52 do you think that math is arbitrarily defined? 08:21:29 Ugh this conversation you're having sounds unbearable. 08:21:32 I think most of math exists as it does because either a) it describes something with useful applications b) we find it aesthetically pleasing 08:21:45 and otherwise we could rearrange all the axioms arbitrarily 08:22:31 The basic portions of maths are based on the real world 08:22:36 yes that's true. 08:22:40 that's a) really 08:22:48 If I have three apples, and someone gives me two more apples, I have 5 apples 08:22:54 we've defined math as it is because it describes a lot of shit we've encountered in the world. 08:22:56 And a mysterious apple-donor 08:26:08 but it's still... man-made 08:26:21 I think it's claiming too much to say that math describes "universal truths" 08:26:55 Any system with consistent axioms describes universal truths 08:27:03 -!- monqy has left. 08:28:30 What's the correct course of action when finding a typo in a paper written 62 years ago? 08:28:52 Tippex and a steady hand. 08:29:21 I lack both of those, and I'm reading it as a PDF 08:29:23 :( 08:30:02 perhaps take a note of it somewhere 08:30:07 Use PDF editing software! 08:30:52 Taneb: Does the journal in which it was published still exist? 08:31:08 Yes 08:31:31 It may be a transcription error, though :( 08:31:46 It's a pretty famous paper, so somebody's bound to have seen it before 08:32:04 Computing Machinery and Intelligence by Alan Turing 08:34:45 Found another 08:45:12 Challenge: create a finite state automaton with lambda calculus at its core 08:45:33 I think I might need Haskell 08:45:47 I make so many dumb mistakes while programming, and Haskell catches them sooner 08:46:04 Example? 08:46:17 The 20 million bugs while writing my bot 08:46:24 :) 08:46:32 Sgeo_: I have this problem with perl 08:46:33 Forgetting $, putting it in the wrong place, not initializing an array consistently 08:46:34 but it's not major. 08:47:07 Also, make global variables too easy, and I think I use them 08:47:38 I like Haskell because it's how I think 08:49:46 And there's a random '['! 08:53:56 ? 08:54:10 Typos in this paper I am reading 08:54:15 Ah 08:54:43 Yeah, maybe you've noticed that tendency I have to entertain multiple trains of thought simultaneously 08:54:56 And make no distinction between them while talking 08:56:55 seen elliott 08:58:02 He was here yesterday, I seem to recall 08:58:16 -!- Vorpal_ has joined. 08:58:39 -!- Vorpal_ has changed nick to Vorpal. 08:59:28 why does windows insist on reinstalling drivers for an USB device if you connect it to a different port. What sort of crazy model requires that 08:59:51 Windows does 09:00:01 well obviously 09:00:13 anyway it doesn't apply to all devices, only most 09:00:19 which is even stranger 09:00:34 -!- Taneb has left ("Leaving"). 09:00:39 -!- Taneb has joined. 09:00:44 wb 09:00:47 I need to work out why that happens 09:00:57 Taneb, you click the close button? 09:01:05 in case you missed it: 09:01:06 anyway it doesn't apply to all devices, only most 09:01:07 which is even stranger 09:01:12 I think it's me shift-clicking on the channel name 09:01:25 -!- asiekierka has quit (Quit: Wychodzi). 09:01:32 try it again? 09:01:37 -!- Taneb has left ("Leaving"). 09:01:42 -!- Taneb has joined. 09:01:46 well there you are then 09:01:49 don't shift click it 09:01:54 why would you shift click it anyway 09:02:00 Not intentionally! 09:02:14 My mouse is over the channel name, because I've just switched to it 09:02:15 Vorpal: There's some sort of a port-specificness-weirdness also with the Windows drivers for the PS3 pad. It's certainly some kind of a thing. 09:02:28 Taneb, how can shift-click happen unintentionally? Shift clicking is not a common operation in most irc clients 09:02:41 I'm holding shift down because I'm typing a capital letter 09:02:55 fizzie, "some kind of a thing"? 09:03:03 Yes. 09:03:03 Taneb, why do you type and click at the same time 09:03:03 And I tap my laptop's touchpad? 09:03:19 Taneb, turn on the touch pad palm detection? 09:03:23 or turn off the touch pad 09:03:33 I have the touch pad turned off, I use the trackpoint instead 09:03:46 Don't have a trackpoint, or a mouse lying around 09:04:22 Fixed the problem 09:04:25 palm detection then 09:04:31 Disabled clicking with touchpad 09:04:33 I don't even have touchpad. my only pointing device is trackpoint 09:04:48 I now have to use the buttons just below the touchpad 09:05:09 The synaptics driver has some kind of a feature for autodisable-when-actively-typing, but I've never quite made it work. 09:05:28 trackpoint is much nicer to use 09:06:27 tapping to click with touchpad is quite bad too 09:06:33 as in, it usually doesn't work properly 09:06:46 nortti, indeed 09:06:57 I like tap-to-click, and ~never have problems with it. YMMV. 09:07:07 Someone recently asked me how to click with a trackpoint. 09:07:14 They kept trying to press it. 09:07:19 actually trackpoint is the biggest reason why I use this computer 09:07:27 I remember seeing laptops with trackballs 09:07:31 might have been an early powerbook 09:07:43 and old pc laptops 09:07:45 -!- asiekierka has joined. 09:07:46 The biggest reason I use this computer is because it's the fastest I have access to with working internet 09:07:46 There used to be laptops with balls, that's true. 09:08:15 would be cool to have that as a scroll wheel in combination with a trackpoint for mouse movement 09:08:26 nortti, modern thinkpads still have it 09:08:41 nortti, so did a brand new toshiba netbook I recently interacted with 09:09:16 Vorpal: yes but those also have trackpad that always gets in the way 09:09:16 Haven't seen that many separate trackballs around either, lately. 09:09:30 nortti, you can turn those off though easily in linux 09:09:39 nortti, like I did on the thinkpad I'm typing on atm 09:09:57 in fact I bet it works under windows too, since there is an fn-key for it 09:10:20 no clue why you would want stock windows on this though, it came with vista 09:10:41 Vorpal: well what I meant by "trackpad that always gets in the way" I meant that they can't put large enough buttons under spacebar 09:10:54 The fact that there are separate mouse buttons for the trackpad and trackpoint, and that the latter are often adjacent to the trackpad (right above it) puzzles me for some reason. (Obviously they're there for the positioning, but still.) 09:11:01 nortti, I don't find my buttons to be too small, let me take a photo. 09:11:16 but yes. trackpad would also randomly move your pointer 09:11:24 -!- ogrom has joined. 09:11:38 wow the dust certainly shows up in the camera 09:11:45 nortti not if you turn that off 09:11:54 true 09:11:56 besides modern trackpads are not quite as terrible wrt that 09:12:37 actually I find new trackpads worse with that than old 09:13:36 for example I never accidentaly moved mouse with my iBook G4 but I do it all the tine when I have to fix my sisters 2 years old hp laptop 09:13:45 *time 09:13:51 I've gotten reasonably used to having a two-finger scroll on laptops too. (Don't interact with so many ThinkPads so don't really have a trackpoint habit.) 09:14:21 nortti, I had terrible problems with phantom movements on my first model ibook 09:14:28 (one of those blue clamshell ones) 09:14:57 nortti, and I guess it could be a issue with quality rather than modernness 09:15:03 I vaguely recall that I had to do something special to the G4 iBook in order to make a two-finger scroll happen. 09:15:04 HP is not exactly high quality 09:15:11 kmc: One day you'll quit every IRC channel. :-( 09:15:12 a thinkpad is way better 09:15:34 nortti, I don't have problems with phantom movements on my Lenovo Thinkpad touchpad unless I put my palms on it. 09:15:43 fizzie: I actually used iScroll2 mouse driver with my iBook that enabled two finger scrolling. I never got really used to it and I'd just always use arrow keys 09:15:44 and that was the reason I turned it off, because doing so was way too easy 09:16:01 nortti: Right, iScroll2, exactly. 09:16:24 nortti, my dell latitude d610 (somewhat dated) has the touchpad slightly lowered into the palmrest, rather than at the same level 09:16:27 so that helps a lot 09:16:32 (and it also has a trackpoint) 09:16:46 I wonder if iScroll2 works with my new iBook G3 (white) 09:16:51 didn't have to turn the touchpad off there, since you don't end up putting your palm on it 09:18:19 "Supported models include most aluminum PowerBooks introduced from 2003 to 2004 as well as most G4 iBooks." 09:18:24 nortti, not sure if this link will work for you. I hope it will: https://www.dropbox.com/sh/cmy7xsmk3xlxrci/CD5mgXYRV5 09:18:44 nortti, those buttons are just the right size for me 09:19:02 fizzie, also middle mouse button 09:19:05 can't live without it 09:19:10 which is why I love this laptop 09:19:14 (see photos) 09:19:16 Vorpal: what format id that picture? 09:19:25 Vorpal: I just left-and-right-click for that. 09:19:27 nortti, format? It is a web album 09:19:33 nortti, click on the images to see them 09:19:35 nortti, I took a few 09:19:57 Vorpal: I can't do that. It requires javascript 09:20:00 nortti, just the standard dropbox auto-album for anything you put under Photos 09:20:05 (I have no idea how to middle-click in Windows on that laptop, though.) 09:20:28 nortti, does this work? https://photos-6.dropbox.com/thumb/AAA2GwVU2_I-BqLTkFaePxHNgcq-s7yihQJIAtG1-hj5qQ/87474461/jpeg/o/2/1343557081/0/2/20120729_111221.jpg/lzLGnpTgvMZ-Eus5EQpZJZUnvmZ0d2ZyU7eEvkV-64Q?size=800x600 09:20:31 and https://photos-6.dropbox.com/thumb/AADUvhtK7AOFlYVZCxbyUvJLQbbavq4pI_Lf-aWjvVwebA/87474461/jpeg/o/2/1343557081/0/2/20120729_111227.jpg/0696oNZ4gQ5KhrnPBAqT3bcOxmRQ5SXfdfZsO1lz4Lo?size=800x600 09:20:40 and also https://photos-2.dropbox.com/thumb/AABwx8n-oZ_Fq62CrCyhLgUiQm3ekERxOSeJTBCwgJht9w/87474461/jpeg/o/2/1343557081/0/2/20120729_111239.jpg/bEx8pgZLQvGYh2iDmLqkddqCv_Sqzpg9MhoFUC584sM?size=800x600 09:20:50 nortti, if those don't work then I don't know 09:20:52 -!- Taneb has quit (Quit: Leaving). 09:22:25 Vorpal: they work. how large is that thinkpad? 09:22:48 nortti, 15.4" 09:22:58 ok. then those buttons are tiny 09:22:58 nortti, 16:10 screen 09:23:09 nortti, anyway the keys on the keyboard are full size 09:23:22 well the letter and number ones 09:23:26 obviously not the arrow keys 09:23:50 nortti, anyway I have huge hands and I have no issues with those buttons 09:24:39 nortti, I can reach from fn to p with my right hand. (fn to o comfortably) 09:24:55 -!- derdon has joined. 09:25:01 fn to Ã¥ if I don't have to be able to press down the key 09:25:20 I think all thinkpad keyboards are sized for the smallest thinkpad models 09:25:46 Vorpal: on T20 my left and right mouse buttons are bit larger that all of the mouse buttons and middle buttons is under them and is is around the same size as all of your mouse buttons 09:26:06 olsner, well the keys on the main area of the keyboard have the same size as the keys on my full size PS/2 keyboard that I use for my desktop 09:26:10 *left and right mouse button combined 09:26:27 olsner, not as deep obviously, but the same area for the raised bit 09:26:45 also my T20 lacks screen and battery 09:27:01 nortti, this is an R500 btw 09:27:26 nortti, your mouse buttons must cover most of the area below the keyboard then? 09:27:30 nortti, can you take a photo 09:28:05 Vorpal: I don't have camera on my phone 09:28:13 hm 09:28:20 nortti, thought you had an old android one? 09:28:25 upload over wifi? 09:28:28 anyway the key area is 6 cm x 1.8 cm 09:29:03 nortti, I'm pretty sure that the Android compatiblity spec said "has a camera" until like 4.0 or 4.1 09:29:30 (same for "has wifi" until 3.0 I believe?) 09:29:55 Vorpal: yes. I have HTC Widlfire but it doesn't work very well. I can try it later when it strarts charging the battery 09:30:15 olsner, hm then the smallest one must be like 14" based on my keyboard 09:30:21 maybe 13" 09:30:51 on my 15" T20 keyboard spans the entrire width of thre laptop and keys are full size 09:31:02 nortti, you should get one of the crazy thinkpads. With the butterfly keyboard 09:31:10 why? 09:31:15 because they are awesome 09:31:22 aren't those old 09:31:31 I meanj like 90's old 09:31:40 *mean 09:31:59 nortti, full size keys here again, except for the F-keys, esc, the windows keys, prtsc,scrlk,pause,insert,delete,home,end,pgup,pgdn and the arrow keys 09:32:13 oh and those keys below shift and above the left and right arrows 09:32:19 which are "back" and "forward" 09:32:24 kind of neat 09:32:31 works to switch tabs in kate 09:32:37 also back/fwd in browser 09:32:56 Misread "keyboard spans the entrire width of three laptops". 09:33:01 That's be quite a keyboard. 09:33:11 fizzie, hah 09:33:24 fizzie, it would be a butterfly style keyboard 09:33:37 or the laptop would have infinite width 09:33:52 since you obviously measure the width of the laptop based on a folded up laptop 09:33:52 oh. I also have not-completely-full-size-but-almost keys for esc, F keys, SysRq, SrcLk, Break , Insert, Delete, Home, End, PgUp, PgDn 09:34:22 right 09:34:42 nortti, my F-keys are only slightly less wide but about half the height 09:35:03 esc is a bit taller than that 09:35:10 about 2/3 of a normal key 09:35:14 same with T20 09:35:27 nortti, do you have hardware volume buttons too 09:35:32 no 09:35:37 All keys on this things next to me are full-size-when-it-comes-to-width, but the top row (esc, f1-f12, sysrq, break, ins/del, / and * from numpad) is a bit less tall than the others. Maybe that 2/3rds. 09:35:56 ar maybe I had at the empty holes at the top of the keyboard 09:35:57 btw my old dell laptop has both hardware volume buttons and volume on fn-combos 09:35:58 *or 09:35:59 I have no idea why 09:36:08 it lacks screen brightness on fn though 09:36:32 Vorpal: My old laptop (the model of which I've forgotten) has a hardware volume *knob*. Now *that's* retro. 09:36:42 :P 09:36:46 yes that was awesome 09:37:03 because I normally like my volume below the lowest step 09:37:04 on anything 09:37:16 seriously, why is everything so god damn loud 09:37:19 Well, I guess "knob" is a bit of a wrong word since it's a sunk-in thing. But a thing you rotate. (Awkwardly.) 09:37:33 I had to use the equaliser settings on my phone to counteract the loudness for example 09:37:45 so I set everything in the equaliser down as far as possible 09:38:01 then music is about the right volume in the headphones 09:38:21 fizzie, I remember seeing that on an old toshiba 09:38:25 I have alsamixer at about 80% and mplayer at 39% 09:38:31 nortti, whoa 09:39:02 anyway I do turn it up a bit when I'm in a loud environment, normally one or two steps, not much anyway 09:39:10 and the volume control on my headphones at the lowest setting possible 09:39:15 hm 09:39:21 Vorpal: It's a Toshiba Tecra 730CDT, apparently. 09:39:54 fizzie, I don't remember what toshiba it was I saw it on 09:39:59 http://www.recycledgoods.com/product_images/b/886/s_p_10719_1__07188_zoom.jpg -- the knob is up there. 09:40:06 fizzie, did they make a series called Satellite or something? 09:40:10 Yes. 09:40:10 I think that might have been it 09:40:24 fizzie, probably was around 2000-2004 or so 09:40:32 okay your one is even older I bet 09:40:38 This is from 1996. 09:40:48 right 09:40:49 "Raw speed. A 150 MHz Intel Pentium processor and PCI bus provide the kind of speed that would have been practically unthinkable in a notebook PC. Until today! Now there's the Tecra 730CDT." 09:40:53 fizzie: that is one awesome laptop 09:40:58 (From Toshiba's product page.) 09:41:05 nortti: Mine doesn't have a battery, though. 09:41:09 fizzie, they called them notebook then? 09:41:18 fizzie: how much memory does it have? 09:41:26 nortti: "And the hard disk and memory capacity are also pushing back the boundaries of what you thought possible: the 2.16 billion byte hard disk and 16 MB EDO RAM (expandable up to 144 MB - yes that's one hundred and forty four MB) will take care of the most complex programs and data-hungry applications - no problem." 09:41:28 I thought that was a word invented after the stuff about "uh, it is bad to use it in your lap" 09:41:38 nortti: I think 32 or 48 in my particular case. 09:41:57 I like the "2.16 billion byte hard disk" part. 09:42:07 Somehow a billion bytes is much more impressive than a gigabyte. 09:42:09 fizzie: ok. it fits inside my processing power requirement 09:42:12 fizzie, so that is... 216 MB? 09:42:19 oh wait 09:42:23 2.16 GB 09:42:23 Two gigs. 09:42:25 right 09:42:36 "Communications are just as easy on the Tecra 730CDT, with 2 PC-card slots and the integrated 28.8 kbps modem with full telephony functions (including hand-free and answer-phone options). The built-in infra-red port even makes cable-free data transfer with printers or other PCs possible. A further highlight of the Tecra 730CDT is the 6-speed CD-ROM drive. And when you want to use the floppy ... 09:42:43 ... disk drive, all you do is swap them over. Or simply attach the floppy disk drive externally. 09:42:46 Multimedia heaven is complete with the super-sharp 12.1-inch SVGA screen and a resolution of 1024 x 768 pixels. The PCI-bus, special graphics drivers and 2 MB Video RAM guarantee you the ultimate in visual experiences." 09:42:55 -!- MoALTz has joined. 09:42:57 fizzie, hey you could hook it up to my dell, it has IRDA too 09:43:13 1024x768! that is the resolution of my iBook G4's screen 09:43:22 nortti: It's got two megs of video memory, so you can't run 1024x768 in truecolor. 64k colors is fine, though. 09:43:36 hm my dell can attach it's ultrabay-style floppy drive externally via USB too 09:43:47 fizzie: does it have ethernet? 09:43:49 Vorpal: I don't have a floppy drive for this either, actually. 09:43:56 that dell is quite strange, a lot of hardware on it seems very thinkpad-ish 09:44:04 nortti: Not built-in, but I have a CardBus card in it. 09:44:11 like the trackpoint and the ultrabay 09:44:25 cool. I could use that computer as my main machine 09:44:43 A D-Link one that has a full-sized RJ45 port right in the proturding thick part; I have some 3com pcmcia cards that use an adapter cable instead, and those are always breaking/getting lost. 09:44:44 nortti, fancy, my ibook (g3) had 800x600 09:45:13 -!- zzo38 has quit (Remote host closed the connection). 09:45:34 Vorpal: my iBook g3 has 1024x768. it is the white 500MHz one 09:45:38 hm 09:45:39 nortti: The HD is not the original model, though; I think it's something slightly smaller than two gigs. 09:46:31 I think I've last used this for something that needed a DOS and a serial port. 09:46:47 do modern PCs still have an ISA bus? I know my laptop does (I believe there are some hardware sensors on it) but I don't remember if my desktop does 09:46:50 can't check on it atm 09:46:50 I'd boot it up to see what it's running except I'm not entirely sure where I stored the charger. 09:46:57 my desktop uses EFI and what not 09:47:11 fizzie, are you back from Belgium then? 09:47:13 Vorpal: the toilet seat ones have the 800x600 screen also used in PowerBook G3 "mainstreet" but later ones use same screen as "wallstreet" pb g3s 09:47:22 nortti, you mean clamshell? 09:47:27 Vorpal: yes 09:47:29 Vorpal: Yes, arrived late last Friday. 09:47:34 fizzie, ah 09:48:01 And I believe they often have a thing that looks like an ISA bus programmatically (e.g. for those sensors), but I'm not sure you can count that as a real ISA bus. Maybe so. 09:48:37 The sensors on this desktop are hooked to an IT8718 chip connected via "ISA". 09:49:09 Sometimes it's some sort of a smbus/i2c thing instead, though. 09:49:18 fizzie, my laptop has both an ISA bus and an SMbus 09:49:35 00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03) 09:49:35 00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03) 09:49:47 00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3a) 09:49:48 sensors seem to be on isa though 09:49:49 00:14.3 ISA bridge: ATI Technologies Inc SB7x0/SB8x0/SB9x0 LPC host controller 09:50:00 intel graphics on this one 09:52:11 From the laptop: 09:52:11 00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05) 09:52:15 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05) 09:52:22 hm 09:52:28 intel graphics? 09:52:32 Nnno. 09:52:37 Just an Intel chipset. 09:52:40 why the multitude of n? 09:53:07 00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03) 09:53:10 00:02.0 CardBus bridge: Texas Instruments PCI1450 (rev 03) 09:53:17 Oh, in the "nnno". Well, nnno particular reason. I was just thinking. 09:53:26 nortti, 15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba) 09:53:41 -!- Taneb has joined. 09:53:48 nortti, I have Express Card too 09:53:57 can't spot it in lspci though 09:54:18 one PC Card slot and one Express Card slot 09:54:59 fizzie, displayport or hdmi? 09:55:11 @tell zzo38 Prelude.Generalize.choice is identical to Data.Foldable.asum, which Prelude.Generalize exports anyway 09:55:11 Consider it noted. 09:55:26 Vorpal: On the laptop? There's HDMI, DVI and VGA ports, IIRC. 09:55:35 fizzie, DVI on a laptop? 09:55:41 fizzie, what sort of monster is that 09:56:06 I suppose they had space left over. 09:56:10 fizzie, where? 09:56:22 In the back. It's kind of a big laptop. 09:56:26 must be 09:56:31 Okay, just 15.4", but kinda on the thick side. 09:56:39 hm okay 09:56:47 I don't really carry this one around. 09:56:51 I only have power and modem on the back. On and the battery slides in from the back too 09:56:57 fizzie, then why laptop 09:57:07 a desktop monitor would be ergonomically better 09:57:24 Because I sometimes do want to take it with me, e.g. for trips like this Belgium thing. 09:57:36 fair enough 09:57:46 oh was this that custom made one from Germany? 09:58:04 or was that someone else 09:58:12 Well, "custom made" is perhaps a bit of an overstatement, but yes, it had some custom component selection involved, and it did come from germany. 09:58:22 hm 09:59:04 The base laptop is fixed, I just got to choose what sort of graphics card, HD, wifi things etc. went into it. 09:59:07 Vorpal: I use desktop monitor with my T20 because original screen was partly nonfunctional and it fell of at the hands previuos owner 09:59:16 I wonder how hard it would be to buy components and build your own laptop... I guess finding a laptop case might be the hardest part 09:59:32 and I guess they aren't really standardlized, so probably custom mobo then too 09:59:41 Vorpal: there are instructions how to build one around beagleboard 10:00:11 beagleboard hm 10:00:13 which one is that 10:00:15 Vorpal: I think you can buy the same "skeleton" that was used for this laptop even as a regular customer, though that's of course only about halfway building your own laptop. 10:00:17 is it like the pi? 10:00:28 Vorpal: yes but more expensive 10:00:31 right 10:00:36 oh ARM based 10:00:46 So's the Pi. 10:00:50 Vorpal: and it has faster processor and it is ARMv7 10:00:58 nortti, I meant for a higher end laptop. Something with maybe a x86 and nividia or AMD graphics 10:01:20 fizzie, yes of course 10:01:35 Vorpal: that will be hard 10:01:41 fizzie, did the skeleton include the mobo? 10:01:46 nortti, indeed 10:02:58 fizzie, because I don't think laptop mobo form factor is standarlised 10:03:15 Vorpal: Sure. It's got the case (with the display panel) and the motherboard; then you plug in a graphics card using that whatever-it-was thing they have for laptops; some memory; there's I guess minipci slots for wifi; a slot for a 2.5" SATA disk; and I think that's about it for the customization. The optical drive is also part of the thing, since it needs to fit the chassis. 10:03:42 The front is sloped to match and so on. 10:04:08 So there's not terribly much you can change. I guess the graphics card is pretty much the major piece. 10:04:12 fizzie, no ultrabay? 10:04:26 and I guess battery must be custom made for it too 10:04:42 I don't think you can have an UltraBay if you're not a ThinkPad. 10:04:49 I mean, I'm sure they have patents or whatnot on it. 10:05:09 A thing called UltraBay, I mean. 10:05:19 well sure it is probably trademarked 10:05:28 you could have the same idea anyway 10:05:31 my old dell has 10:05:32 There could obviously be some sort of a different swappable slot, but that'd be proprietary too. 10:05:54 Yeah, but it's still limited to different parts from the same company. 10:05:59 true 10:06:00 fizzie, does the optical drive do DVD-RAM? 10:06:33 I think it does. Anyway, they do have a selection. It's not exactly UltraBay-like in that it's not hotswappable, but they have a selection. 10:06:34 you can do: $ cd-info | grep DVD-RAM 10:06:41 You could have ordered this with a bluray thing. 10:06:52 -!- Taneb has quit (Quit: Leaving). 10:06:56 I don't have a "cd-info". 10:07:18 fizzie, hm let me see which package it is from 10:07:19 http://sprunge.us/jWZa 10:07:30 libcdio-utils on Ubuntu, apparently. 10:07:44 right 10:07:49 mine is still searching 10:07:51 slow disk 10:07:59 libcdio-utils: /usr/bin/cd-info 10:08:00 yeah 10:08:18 Vorpal: http://sprunge.us/hIIK from cdrecord -prcaps. 10:08:26 s/caps/cap/ 10:09:05 (It continues a whole lot longer, but those were the most interesting parts, perhaps.) 10:09:17 Does not read CD bar code <-- huh? 10:09:24 (from that command's output on my laptop) 10:09:28 Mine doesn't either. 10:09:28 CD bar code? 10:09:39 I'm sure there's some kind of weird standard. 10:09:46 Perhaps it's written in the rim or something. 10:09:51 the full output of mine http://sprunge.us/ZRHY 10:10:29 Well, http://sprunge.us/GfZF for comparison purposes. 10:10:59 what is R-W subcode? 10:11:10 I've known that, but forgotten. 10:11:18 There's all kinds of complications in the CD standards. 10:11:26 In addition to the main data bit. 10:11:47 right 10:11:51 I remember that some of these things were relevant when it came to getting PSX disk images done correctly. 10:13:15 heh 10:13:43 There are subchannels P, Q, R, S, T, U, V and W; P and Q are somewhat standard (and related to audio CD positioning, apparently) but the R-W subchannels are unused in the basic audio CD standard. 10:13:50 Extensions (and copy protection schemes) use those, though. 10:14:04 ah 10:14:25 fizzie, so if the drive can't read them, the copy protection could not check them I guess? 10:14:46 I wonder why the drive simply can't return a raw data stream of the disk 10:14:50 would be so much easier 10:15:11 Yes. And in the case of the PSX, it also means you couldn't use the drive to make a copy that'd work in the original device, since the drive in that can read those. 10:15:28 fair enough 10:15:42 how advanced is PSX emulation these days? 10:16:07 Good enough, I'd suppose. 10:16:13 You can do PS2 these days too. 10:16:31 really? 10:16:50 didn't it have too many co-processors all running on the same clock line or something? 10:16:51 Sure. I've played through FFX and a large part of FFXII with PCSX2 on the laptop we were speaking about. 10:17:12 It's not perfect, but "high-profile" things are playable. 10:17:20 They do quite a lot of recompilation and whatnot there, though. 10:17:49 right 10:17:54 Also offloading things on the GPU. At least based on the configuration menus; haven't looked closer than that. 10:18:36 Original PSX is probably a solved problem. There's a PSX emulator in the N900 repositories. 10:18:45 Haven't tried it, and that might not work so well, but it exists. :p 10:18:49 hah 10:19:15 fizzie, do you happen to know anything about video for linux? 10:19:30 I've written some code for the API, and it wasn't very pleasant, but that's about it. 10:19:30 some sort of kernel framework for cameras 10:19:44 fizzie, oh is it a standard API for all devices or a different one for each device? 10:20:22 It's standard as seen from the userland side. But I'm under the impression there's all kinds of messiness there to account for the widely different hardware. 10:20:27 hm 10:20:35 fizzie, I'm trying to figure out if it would be possible to extract raw data from my phone camera 10:20:43 They've smungled video capture cards and webcams and digital-TV devices all under the same thing. 10:20:58 That depends on what the driver exports via V4L, I suppose. 10:21:00 the drivers are badly commented for it and not in the standard kernel tree 10:21:14 they are in the samsung open source kernel dump thingy 10:21:37 I realised I really needed documentation for the hardware to understand it 10:21:38 You can query the capabilities via the standard API, you could start with that. 10:21:43 fizzie, how do you do that? 10:21:57 and where is the v4l docs 10:22:04 You'd need to write a bit of code. Or, well, find some sort of a utility APP, I'm sure there's one. 10:22:22 fizzie, well I do have a cross compiler setup 10:22:33 so not an issue, I might need to copy some headers 10:22:37 s/APP/app/, I don't know why I capitalized it. 10:22:42 http://v4l2spec.bytesex.org/ for V4L2, apparently. 10:22:51 bytesex, really... 10:22:54 I remember I've used the wiki that's linked from there. 10:23:09 That's on linuxtv.org, they have a lot of V4L-related stuff there. 10:23:17 god damn, what a massive spec 10:23:20 Not sure if there's an API reference, though. 10:24:18 It's a lot of ioctls, that's for sure. 10:24:47 I don't have an issue with ioctls 10:25:23 I wrote a piece of code to feed /dev/random with (hashed) bits from noise from a webcam. (There are quite a few other such pieces of code too.) 10:25:27 anyway it was two ioctls for the actual photo bit, a bit more for either setup or preview. (I used strace on the camera app yesterday) 10:25:37 -!- MoALTz_ has joined. 10:26:15 I'm pretty sure there's also v4l-oriented libraries that try to make things better, and those might have better API docs too. 10:26:25 -!- MoALTz has quit (Ping timeout: 252 seconds). 10:26:25 any recommendations 10:26:31 because that API seems horrible 10:26:41 I don't know of them; the single webcam-related software I did just spoke raw V4L2. 10:27:40 fizzie, was that v4l or v4l2? 10:27:49 2, I don't think 1 is very current at all. 10:28:17 ah 10:28:45 mplayer has a V4L2 input driver which you could possibly also abuse to find out what you can get from the card, though it's kind of video-oriented. (I'm sure someone's compiled mplayer for your thing already.) 10:29:52 Anyway, it's very possible that the driver doesn't export the raw sensor data over V4L. You need a custom camera driver on the N900 to get that kind of stuff. (Then again, it still might.) 10:30:16 hm 10:30:45 fizzie, I think the preview image arrives at the android API level as RGBA data (still not raw, but at least uncompressed). 10:30:59 Yeah, the JPEG compression you might be able to avoid. 10:31:07 but yes there is a jpeg folder in the samsung kernel code bit 10:31:11 which worries me 10:31:55 fizzie, then again it might do jpeg even before the kernel level, since there are some references to hwjpeg in the user space *.so file for the camera. 10:32:09 That's possible, yes. 10:32:10 or that might just be a hardware accelarator called from the kernel 10:32:16 or it might even refer to another model 10:32:21 they just reusing the same *.so 10:32:49 The N900 does JPEG on the DSP chip, but I believe the userland camera app just calls into that, after getting uncompressed RGB from the camera. Haven't looked at it closely. 10:33:10 can't find source code for the user space part of it 10:33:24 CM9 build script just copies that file from a stock rom XD 10:33:29 I have a cheapo webcam here which does JPEG already on the camera side, and (as far as I know) doesn't support returning non-uncompressed stuff at all. 10:33:51 The V4L api has image formats for things returning JPEG-compressed stuff, so it's possible to do it in the driver. 10:34:02 right 10:34:04 (And of course it could be using a custom extension if V4L didn't have a standard for it.) 10:34:13 fizzie, so how would I go about figuring out if it is possible 10:34:23 -!- ogrom has quit (Quit: Left). 10:34:26 that API looks horrible 10:35:07 where are the headers for v4l 10:35:11 I can't find them 10:35:34 oh videodev2.h 10:36:20 -!- derdon has quit (Remote host closed the connection). 10:37:56 wow... I was wondering why tab complete for ~/src was broken. Turned out I was sshed to the wrong system 10:38:12 with a host name of about the same length 10:38:19 and the same prompt colouring 10:39:02 If strace supports logging read(2) data into file, you could also do that, take a picture, then try to see if there's some kind of a full-frame sized (sequence of) reads that looks like raw RGB data. 10:40:07 fizzie, thing is, the process issuing ioctls to the device file never read from it 10:40:10 as far as I could tell 10:40:21 very strange 10:40:49 Hrm. Well, it could have some sort of a camera daemon involved. I'unno. 10:42:19 hm my compiler errors out on including linux/videodev2.h 10:42:35 with field timestamp having incomplete type 10:43:00 oh timeval 10:43:04 which header is that 10:43:37 ah 10:51:18 wait what, why is open() in a different header than close()? 10:52:21 fizzie, do you know why? 10:56:00 Not really, though they're not exactly coupled. I mean, you can close anything (so unistd is a reasonable place for it), but you can open only files. 10:56:24 "Reflects existing practice" is probably the official (un)reason. 10:59:21 The "ultra high speed +" in that cdrecord -prcap output is approaching Super Street Fighter 2 Turbo levels of nomenclature. 10:59:39 well I read the caps successfully and it returned what I expected, that just lists the name of it though 10:59:57 fizzie, hah 11:00:23 fizzie, USB is having the same issue 11:00:45 why do they keep inventing names like that for USB. Everybody just calls it USB2 or USB3 11:02:20 Vorpal: have you ever looked at display resolution names 11:02:34 I thought the video capture interface had a separate query-capabilities thing, but maybe it just has the really awkward thing where you probe with VIDIOC_TRY_FMT to find how high you can go. 11:05:49 nortti, yes. I tried to forget I did. 11:06:04 nortti, it was okay when it was VGA and SVGA. Then it got absurd 11:06:29 fizzie, hm I'm looking at the general capability thing so far only 11:06:36 -!- impomatic has joined. 11:06:41 fizzie, I want to use it anyway to find out why I have so many /dev/video* 11:07:04 Vorpal: How many is so many? 11:07:09 one is output of some sort, since the android window compositor (called surfaceflinger) has it open 11:07:28 /dev/video0 /dev/video11 /dev/video16 /dev/video20 11:07:28 /dev/video1 /dev/video12 /dev/video2 /dev/video3 11:07:29 fizzie, there 11:07:39 That's quite many. 11:08:02 fizzie, here is the /sys info about them: http://sprunge.us/WCjS 11:08:16 fizzie, video0 is the back camera, video1 is the user facing camera 11:08:41 surfaceflinger uses video2 and video16 11:08:41 Which one is the one the window compositor has open? 11:08:43 Ah. 11:09:00 fizzie, I have no idea what those virtual ones are 11:09:11 Vorpal: what is wrong with WHUXGA (Wide Hexadecatuple Ultra Extender Graphics Array)? 11:09:53 One of them could be a V4L2 video overlay thing, I suppose. Though I'm not so sure why. 11:10:36 well WHUXGA, es un estándar de pantalla que puede soportar una resolución máxima de 7680 × 4800 pixels, con una relación de 16:10! 11:11:04 Un monitor de 7680 × 4320, podría considerarse también como un WHUXGA 11:11:09 is that spanis? 11:11:16 +h 11:11:18 yes but i don't understand it 11:11:22 nortti, ouch 11:12:20 fizzie, video11 driver is s5p-jpeg 11:12:22 whatever that is 11:12:31 same for video12 11:12:49 video16 driver is s5p-tvout-tvif 11:13:02 card is "Samsung TVOUT TV Interface" 11:13:14 Heh, messy. 11:13:24 There's only a video0 and video1 on the N900; I suppose corresponding to the front and back cameras. 11:13:35 I suppose the TV-out is handled differently. 11:13:37 fizzie, video20 is s5p-tvout-vo, and "Samsung TVOUT Video Overlay" 11:14:03 other than the tv out stuff, none of the devices reported useful "card" values 11:14:22 either just the same as the driver name, or something similar 11:14:43 WHUXGA is a display standard that can support a resolution maximum of 7680 x 4800 pixels , with a ratio of 16:10. A monitor of 7680 × 4320, could also be considered as a WHUXGA 11:14:55 hmm google translate did really well on that 11:15:44 fizzie, http://sprunge.us/XWQe (haven't written code to decode capabilities yet) 11:15:57 how did you stringify arguments in CPP now again 11:15:59 was it ##? 11:16:02 #. 11:16:06 ## is token-pasting. 11:16:13 #. or just #? 11:16:20 Just '#'. 11:16:22 ah 11:16:27 (Curse my proper punctuation.) 11:18:51 english hasn't really prepared itself for having notations embedded within it 11:19:39 g 24 11:20:34 g 23 11:20:40 hmm 11:20:45 huh, I guess the cross compiler header doesn't match my system header 11:20:53 some defines give errors 11:21:20 right, it is different, stripped of all comments for a start 11:21:20 why 11:22:13 So Chuck says, ""Hello, world", and then he quotes me as saying "Chuck, I want you to print "Hello, world!""" 11:22:13 Optomized for compilation speed. :p 11:22:29 Those capabilities are kinda weird if I look at my own . The 0x40000000 and 0x08 bits that most of them have don't match anything, and they all have V4L2_CAP_VBI_CAPTURE and V4L2_CAP_VBI_OUTPUT set, which sounds pretty strange. 11:22:30 but i think what i just said doesn't count as good writing 11:22:50 my phone has a newer kernel than my desktop. But I guess the header might be older, from whatever oldest version the NDK supports 11:24:59 You're supposed to alternate between " and ' when nesting quotations in English, I believe. 11:25:07 fizzie, http://sprunge.us/cQTO 11:26:07 Vorpal: That's quite a few bits in the caps that don't match any of your defines, I suppose. (And it's slightly weird that all of them claim output (and most, overlay) capabilities. 11:26:20 quite 11:26:21 hrrm 11:26:45 fizzie, what is overlay in v4l context? 11:26:51 anyway I guess it might be that the driver claims that 11:27:09 since the s3c-fimc seems to handle both input and output devices 11:27:41 It's a thing that can be used to write video into a graphics card's screen. A bit like XVideo except done at the V4L level. 11:27:47 ah 11:28:05 hm I need to test something then 11:29:11 aha, playing a video with the built in video player makes the mediaserver process open video3 11:29:52 I see no difference from the lsof point of view if I use full screen video or "floating window" video 11:30:23 same thing happens when I open a video in vlc for android 11:30:42 can't test floating window for it, since it lacks that feature 11:31:11 Well, the overlay API can specify a window position and size, so it should be pretty same for floating or fullscreen, if it's using that directly. 11:31:28 probably 11:31:47 both use hardware acceleration anyway, iirc vlc has an option to turn that off, might try that 11:32:13 yeah it doesn't open video3 then 11:32:52 fizzie, and I wonder what those high bits in the caps are 11:33:13 actually... 11:33:31 those are accounted for 11:33:41 Vorpal: That's quite a few bits in the caps that don't match any of your defines, I suppose. (And it's slightly weird that all of them claim output (and most, overlay) capabilities. <-- which device do you mean? 11:34:19 All of them, pretty much. 0x4000007d has 7 set bits but only four outputs. 11:34:37 And 0x2d has five set bits but only one decoded line. 11:34:48 s/five/four/ I can't count. 11:34:49 hm 11:34:53 true 11:35:06 also the stuff doesn't match 11:35:32 itidus21: most notations aren't actually embedded in english 11:35:39 0x4000007d decodes to include V4L2_CAP_STREAMING, but that is 0x4000000 not 0x40000000 11:35:41 what 11:35:45 the notion itself doesn't even make sense. 11:35:52 notations are seperate from english 11:35:58 huh 11:36:07 you could say that ASCII isn't prepared for "notations" 11:36:09 but not english. 11:36:10 Vorpal: Yeah, I assumed the numbers in your other header are different. 11:36:19 -!- augur has quit (Remote host closed the connection). 11:36:30 fizzie, how does that work then 11:36:38 why does it report V4L2_CAP_STREAMING 11:36:51 I mean, the one you're using to compile, as opposed to the one I was looking at. 11:36:59 right 11:37:14 fizzie, the one I'm using to compile matches my system one except a few defines are missing 11:37:22 That's kinda weird, then. 11:37:27 -!- augur has joined. 11:37:35 n 11:37:35 -!- augur has quit (Remote host closed the connection). 11:37:36 oh wait 11:37:39 fizzie, printf typo 11:37:45 the d at the end is wrong 11:37:50 Ohhhh. 11:37:50 I did %xd 11:37:51 XD 11:38:03 Well, that explains a lot. I *was* wondering about weird-looking numbers. 11:38:24 I forgot that x wasn't a modifier for d 11:38:46 %od, for octo-decimal. 11:39:01 fizzie, well %d as opposed to %u 11:39:10 it would make sense 11:39:22 then you could do signed and unsigned %x and %o 11:39:51 There's the %i alias for %d to muddy the waters more. 11:39:57 hah 11:40:04 (And the subtle difference for %i and %d for *scanf.) 11:41:21 what is that difference? 11:42:37 now to figure out the various capture queries 11:43:34 %d is explicitly decimal, but %i is like base 0 for strtol, so you can type in 0123/0x123 for octal/hex. 11:44:34 heh 11:45:07 I tend to avoid the scanf family of functions, never liked that interface. And error handling is too much of a pain with it 11:45:32 It's quite bad. Especially for any line-oriented input, since it tends to leave the newline if things fail. 11:45:48 A getline-style thing followed by sscanf could work for something, though. 11:45:57 -!- olsner has quit (Quit: Leaving). 11:46:13 fizzie, any idea how to control the flash btw? 11:46:20 is that a v4l thing? 11:46:50 None whatsoever. It's not a standard-standard V4L thing, since it's not really camera-oriented at all. It could be some sort of a common extension, though. 11:46:57 hm 11:47:44 Even the way of doing "take a picture" (i.e. get a single high-resolution frame) isn't really a V4L thing, though I suppose it can be just a "switch formats, read one frame, switch back" thing. 11:47:57 Also I don't know about focus control. 11:48:46 hm 11:49:27 fizzie, well that might be easier to figure out once I get the hang of the general v4l interface 11:51:45 well I understand why android uses a user space daemon for camera access now. The API doesn't look multitask friendly at all 11:51:46 All your devices apparently deal with the V4L2_CAP_STREAMING way of IO, so you'll need to bother with that too. (You never read(2) anything; you just VIDIOC_REQBUFS some suitable buffers, then mmap them, and the device will communicate data that way. 11:52:44 aha 11:52:49 that explains the lack of read() then 11:52:53 in the strace 11:53:14 itidus21: most notations aren't actually embedded in english -- #. ## is token-pasting. #. or just #? Just '#'. ah (Curse my proper punctuation.) 11:53:19 :P 11:54:21 what 11:54:26 I'm not actually paying attention 11:54:49 fizzie, anyway the mmap style of interface makes sense when you are dealing with 8MP images 11:55:05 fizzie, also I like this page: http://v4l2spec.bytesex.org/spec/x5950.htm 11:55:18 Heh. 11:55:34 It makes sense for video in general, thanks to having to move lots of frames. 11:55:38 true 11:55:51 fizzie, doesn't matter for a 320x280 or whatever webcam though 11:56:05 I think I have such a device around somewhere 11:56:15 one of those quickcam thingies (USB one) 11:56:17 320x240 sounds more likely. 11:56:19 256x240 11:56:20 right 11:56:27 ^256x224 11:56:36 it had a triangular base 11:56:40 256x224 = ZGA 11:57:14 I have a very cheap USB webcam somewhere, but it does do 640x480 at least. 11:57:50 ZGA is when zzo finally decides to do a movie player for NES 11:59:03 oh its already been done 11:59:25 well mine might do 640x480 11:59:26 I don't know 11:59:53 Ohhhh, 640x360 is called "nHD" because it's one ninth of a 16:9 1080p frame. I wondered about the name at some point. 12:01:03 "HD" as a term is such a mess, too, since you never know whether it means 720p or 1080p. 12:06:05 -!- epicmonkey has joined. 12:06:58 "To query the current image format applications set the type field of a struct v4l2_format to V4L2_BUF_TYPE_VIDEO_CAPTURE and call the VIDIOC_G_FMT ioctl with a pointer to this structure. Drivers fill the struct v4l2_pix_format pix member of the fmt union." 12:07:01 well that didn't work 12:07:02 at all 12:07:08 EINVAL 12:07:57 fizzie, and I heard talk about 4096p in the future. Presumably HD as well 12:08:20 -!- asiekierka has quit (Quit: Wychodzi). 12:08:59 Well, they have that "4K" 3840×2160 for which screens exist, and the proposed "8K" 7680×4320 thing. 12:09:12 how is 3840×2160 4k? 12:10:09 I don't really know why it's called that. 12:10:15 QFHD is I guess the "proper name". 12:10:29 It's twice the "full-HD" 1920x1080 in both dimensions. 12:10:49 hd seems to mean twice the width resolution as a svga monitor, but the size of a tv and price of $5000 at first 12:11:17 If you count pixels, it's in the same ballpark as the 4K digital cinema formats. 12:11:24 Which aren't all 4096 pixels wide either. 12:12:30 oh I see 12:12:32 i kinda feel sorry for all the people for whom a hdtv was luxury for a few years and along came cheaper 12:13:15 fizzie, fun thing: the format query only works right after I close the camera app. Presumably the camera enters some sort of sleep mode very quickly 12:13:29 how the hell do I deal with that... 12:13:37 time to strace I guess 12:13:59 -!- epicmonkey has quit (Ping timeout: 272 seconds). 12:14:12 Presumably it will stay open if you open the device and set a format, then keep doing stuff. 12:14:21 hm 12:14:36 Anyway, even querying the current format will probably only give you the preview stream sizes. 12:15:06 At least on the N900, the same video0 interface is used for the preview video and the full-frame capture. 12:16:09 fizzie, sure but I have to start somewhere 12:16:24 and yes it game me some sizes that seemed reasonable for preview: 960x720 12:17:10 hm strace on mediaserver didn't do what I intended... it gave I/O errors this time 12:18:04 what the hell 12:18:29 I remember reading something about the long-ish (half a second?) shutter lag of the N900 coming from the lag of switching capture resolution from the viewfinder size to the full-frame size and resetting things in the process. 12:18:50 Apparently once it gets going, you can stream full-frame images at 10fps, assuming you had a place where to put them. 12:19:01 fizzie, you know what, it doesn't ever call open. Yet the device is suddenly open 12:19:07 any idea how else you could get an fd to a device 12:19:27 You could receive a fd over Unix socekts, but that sounds quite unlikely. 12:19:27 because yes, according to /proc it is not there before but then it is open while the camera app is running 12:19:36 fizzie, what system calls are involved in that? 12:20:50 Uh... depends on whether the socket is kept permanently open. If it is, then it's just a sendmsg/recvmsg at least code-wise. 12:20:55 Don't know what it is under the hood. 12:21:00 hm 12:21:06 fizzie, does strace follow thread forks? 12:21:47 I would assume so, but I'm not sure. It has that -f for following child processes from fork(2). 12:22:05 right, this thing calls clone() with arguments to create threads 12:22:29 it seems to use msgget at lot 12:22:38 that is for ipc 12:23:31 and recv with MSG_OOB 12:23:31 Yes. I don't know if there's some other IPC mechanism that can send credentials, other than Unix sockets. (And I'm not sure if I've ever seen that happen either, though I have a vague feeling that perhaps maybe once.) 12:23:44 no recvmsg though 12:23:47 maybe that isn't a syscall 12:24:10 fizzie, maybe some of the android specific IPC thingies? 12:24:24 there is that binder thing I guess 12:24:30 not sure what syscalls that expose 12:26:46 I have vague recollections that Linux grouped a lot of socket syscalls into one, but also that strace unentangles them again. 12:27:04 If you see recv as standalone, probably so. 12:28:12 -!- asiekierka has joined. 12:28:48 MSG_OOB is a curious thing to do, even if it's not related. Can you see what kind of socket it is that it does that to? 12:29:03 sec 12:29:57 fizzie, socket ids are just fds right? 12:30:02 Yes. 12:30:19 (So you can get new fds from socket(2) too, but probably not the video device.) 12:30:19 fizzie, and first argument of the syscall is the fd? 12:30:28 Of recv? Yes. 12:30:36 then uh, either strace is broken or wtf 12:31:18 fizzie, socket 11348704 once, then 11348700 and then other numbers of that magnitude 12:31:29 and they don't match anything open 12:31:41 that I can see at least 12:31:45 Uh. 12:31:48 yeah 12:32:00 Systems nowadays are so complicated. :/ 12:32:28 fizzie, hm it seems that these are the ones strace gave I/O errors on 12:32:46 specifically: "ptrace: umoven: I/O error" 12:33:12 yes, doing &> instead of -o puts that error inside the log of those calls 12:33:24 I wonder what is wrong 12:34:19 fizzie, none of the other arguments it recorded look relevant at all 12:34:35 or what is the value of MSG_OOB? 12:35:02 -!- asiekierka has quit (Remote host closed the connection). 12:35:05 1 12:35:08 nope doesn't help 12:37:26 fizzie, any idea what /dev/ashmem is? 12:37:32 this thing has a lot of copies of that open 12:37:34 whatever it is 12:38:24 http://elinux.org/Android_Kernel_Features says it's "similar to POSIX SHM but with different behavior and sporting a simpler file-based API". 12:39:24 "As a remedy the present version of the V4L2 API relaxed the concept of device types with specific names and minor numbers. For compatibility with old applications drivers must still register different minor numbers to assign a default function to the device. But if related functions are supported by the driver they must be available under all registered minor numbers. The desired function can be select 12:39:24 ed after opening the device as described in Chapter 4." 12:39:34 that could explain why everything reported every feature 12:39:43 Yes. 12:40:03 Also it doesn't sound impossible that the binder thing is responsible for some of the weirdness. 12:40:08 sure 12:40:24 fizzie, iirc binder has been merged in to vanilla as of 3.4 or 3.5 or some such 12:40:35 probably under staging drivers or such 12:41:30 fizzie, anyway if every device support every feature, then why does /dev/video0 and /dev/video1 both correspond to the same driver and presumably controller device, but represent different cameras 12:43:05 I suppose a single driver can still have different minor numbers that expose different cameras. It just says "if related functions are supported"; capturing from different cameras aren't so related. 12:43:22 hm 12:43:43 fizzie, hm there is /dev/binder opened as fd 3, and there were a lot of ioctls done on that 12:44:12 apart from that 78 and 80. Which were the cameras that were never opened? 12:44:23 In the old way you used to have /dev/video0 and /dev/vbi0 and whatnot related to the same card (with different minor numbers), and I suppose what your quotation means is just that you can nowadays do all that on the /dev/video0. 12:44:30 I feel like I'm not smart enough to see a third option between global variables and OO 12:44:34 At least in TCL 12:44:35 oh wait, 80 was the camera 12:44:36 not 78 12:44:39 78 was ashmem 12:45:03 Sgeo_, monads? 12:45:10 (I don't know if you can do that) 12:45:12 I don't know anything about binder, so I don't know if it could cause a sneaky file-opening. 12:45:21 (given that it is tcl, you probably could emulate it) 12:45:28 $ ls -l /dev/{vbi,video}* 12:45:28 crw-rw----+ 1 root video 81, 1 2012-07-28 00:05 /dev/vbi0 12:45:28 crw-rw----+ 1 root video 81, 0 2012-07-28 00:05 /dev/video0 12:45:33 These are actually the same device. 12:45:47 Even though they have different minor numbers. 12:46:10 Incidentally, what was that '+' there in the mode? 12:47:28 fizzie, ACL I think? Maybe? 12:47:29 not sure 12:47:34 where is that on 12:47:35 That would make sense. 12:47:38 On this desktop. 12:47:42 hm okay 12:47:47 does tmpfs even do ACL? 12:47:57 check mount to see if ACL is mentionedf 12:48:00 mentioned* 12:48:07 or anything else of that sort 12:48:27 fizzie, could perhaps be selinux or similar as well 12:49:04 well the binder.h file has an enum value called TF_ACCEPT_FDS 12:49:24 -!- Taneb has joined. 12:49:27 Hello 12:50:32 Vorpal: Posix ACLs were a good guess, there's an extra "user:fis:rw-" entry according to getfacl. (No idea what sets that up.) 12:50:51 fizzie, consolekit I would /guess/ 12:50:56 fizzie, which distro? 12:51:07 -!- elliott has joined. 12:51:10 elliott, hi 12:51:14 hello 12:51:14 elliott: You have 5 new messages. '/msg lambdabot @messages' to read them. 12:51:40 Vorpal: Some not too new Ubuntu. 12:51:54 hm okay 12:52:03 my ubuntu doesn't do that for other devices at least 12:52:12 don't have any video* on it 12:52:17 fizzie, 10.04? 12:52:49 (This is an old PCI analog-TV card that I don't use for anything at all.) 12:53:28 fizzie, well it looks like it might be possible to send fds over binder 12:53:44 in replies at least 12:53:50 can't really find any docs on it 12:55:32 (Away a while.) 12:58:08 -!- augur has joined. 12:58:26 -!- itidus21 has quit (Quit: Leaving). 12:58:44 -!- augur has quit (Read error: Connection reset by peer). 12:58:56 -!- augur has joined. 13:03:24 -!- MoALTz__ has joined. 13:04:14 -!- MoALTz__ has quit (Read error: Connection reset by peer). 13:06:02 -!- MoALTz_ has quit (Ping timeout: 244 seconds). 13:07:56 -!- nooga_ has joined. 13:07:57 -!- nooga has quit (Read error: Connection reset by peer). 13:08:28 -!- MoALTz has joined. 13:13:32 http://www.androidenea.com/2010/03/share-memory-using-ashmem-and-binder-in.html "The solution is to share the file descriptor with the binder since the binder has special functions that can be used to transfer file descriptors over it's interface." 13:13:42 (It's for how to share ashmem blocks between processes.) 13:13:45 I guess it could be that. 13:15:02 hm 13:15:08 I wonder where that device was opened then 13:15:24 since it isn't open in the background 13:17:04 fizzie, any idea how to find out which groups a running process is a member of? 13:17:22 my guess is that perhaps mediaserver doesn't have the proper permissions to open /dev/video0 directly 13:18:19 It's in /proc//status. 13:18:27 "Gid" and "Groups" for the supplementary groups list. 13:18:51 ("Gid" list is the usual suspects, real/effective/saved/fs.) 13:18:52 yeah, wrong user and wrong groups for the file 13:19:15 annoying that android doesn't have /etc/passwd 13:19:25 hard to map these values to anything meaningful 13:19:48 mediaserver is in 8 different groups 13:21:45 And speaking of ACLs in /dev, I've got '+'s for /dev/{kvm,rfkill,sg3,sr0,vbi0,video0}. 13:21:52 he 13:21:53 heh* 13:22:05 oh I have that for sr0 13:22:31 and a few more 13:22:47 (sg3 is the sg corresponding to sr0 here.) 13:22:51 adsp, audio, dsp, mixer, rfkill, sequencer, sequencer2, sr0 13:23:09 not for sg* though 13:24:00 Oh, right, ~everything in /dev/snd/ too. (Only looked at top level, don't have any audio things there apparently.) 13:24:32 let me check recursively 13:25:20 everything in /dev/snd, some stuff in /dev/input (far from all) and /dev/dri/card0 13:25:42 and in /dev/input those are event9 to event12 13:25:46 that have those 13:25:53 what are /dev/input/event* btw? 13:26:38 arvid@dragon ~ $ LC_ALL=C getfacl /dev/dri/card0 13:26:39 getfacl: Removing leading '/' from absolute path names 13:26:39 # file: dev/dri/card0 13:26:43 why does it do that? 13:27:43 /dev/input/event* are the generic (as opposed to type-specific, like js/mouse/whatever) interface to input devices, though all kinds of things seem to end up as input devices these days. 13:27:53 -p, --absolute-names 13:27:53 Do not strip leading slash characters (`/'). The default behavior is to strip leading slash characters. 13:27:58 okay that doesn't help... 13:28:00 fizzie, ah 13:28:04 Power buttons and whatnot. 13:28:39 fizzie, those are ACPI things 13:28:59 /sys/class/input/event0 here is /sys/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0/event0 for example. 13:29:06 Don't know what comes in that way. 13:29:33 fizzie, how did you figure out that mapping? 13:29:53 oh wait 13:29:54 right 13:30:06 -!- asiekierka has joined. 13:30:14 I was looking under /sys/dev/char and couldn't find the device 13:30:19 why is /sys/dev/char incomplete 13:33:33 http://sprunge.us/ZbhM -- two power buttons for some reason. 13:34:14 And the keyboard has two event devices for it. 13:35:12 Still, that's quite a short list by modern standards; compare the laptop: http://sprunge.us/bSfF 13:36:43 There's things like event6 "BisonCam, NB Pro", "usb-0000:00:1d.0-1.6/button" even though the (built-in) webcam doesn't have any sort of button exposed. 13:38:09 I don't know what all those "HDMI/DP,pcm=X" EV_SW (switch) type things are either. 13:38:23 hm 13:38:55 installing lsinput now 13:39:17 $ sudo lsinput 13:39:18 /dev/input/event0 13:39:18 protocol version mismatch (expected 65536, got 65537) 13:39:21 well that was interesting 13:39:26 Heh. 13:39:45 fizzie, I have a custom kernel though to work around some issues with wifi monitor mode 13:39:51 so I guess that is it 13:47:55 I don't know what that second device of the keyboard is doing. 'input-events' dumping says all regular keypresses come in via the first one. And the second one has EV_REL EV_ABS (relative and absolute motion events) listed in the types, which sounds a bit strange for a keyboard. 13:48:55 Oh, the multimedia keys use the other device. 13:51:20 heh 13:51:44 fizzie, multimedia keys are often done by ACPI iirc 13:55:37 This is a separate USB keyboard, though. 13:55:55 fizzie, interesting note: there is no speed difference between grep "constant string" and grep -F "constant string", but there is a large if you add -i to those 13:56:03 grep -Fi is much faster than grep -i 13:56:31 (checked by grep -Ri / grep -RFi on kernel sources) 13:57:39 According to lsusb, the keyboard is also a mouse: http://sprunge.us/QEiE 13:59:43 fizzie, fancy keyboard 14:00:11 Based on matching the lsusb bInterfaceNumber and sysfs stuff, it's the mouse that is reporting all the multimedia key events. 14:00:37 I'm sure there's a good reason. 14:02:36 heh 14:09:19 brb 14:22:08 -!- ais523 has joined. 14:22:08 -!- oonbotti has quit (Remote host closed the connection). 14:22:43 hi, ais523 14:39:22 back 14:42:16 Is it bad that I've just figured out how to make the thingy on the left hand side of the screen on Ubuntu appear? 14:44:56 Taneb, what are you talking about? 14:45:50 The thing that's in Unity, I suppose. 14:46:05 http://en.wikipedia.org/wiki/File:Unity_5.12_on_Ubuntu_12.04.png 14:46:07 That thing. 14:47:00 Yeah 14:47:29 I don't know how to make it appear either, but it might be different if you've actually been using it. 14:48:00 Yeah, Ubuntu's my primary OS 14:48:29 ah 14:48:43 It's mine, too, but despite all their efforts, Unity != Ubuntu quite yet. 14:49:01 I'm going xubuntu on next LTS release 14:49:13 And I can't really be bothered to switch to GNOME or X or CLI or whatever 14:49:26 well the new LTS is out, but not for upgrading from last LTS yet 14:49:32 Taneb: you've used unity for months and only now figure out how to launch applications from it? 14:49:46 it won't notify me about that until the first point release of the new LTS 14:49:47 elliott, nah, I just used to press flag to bring the whole thing up 14:50:22 flag 14:50:31 Windows key 14:50:37 It's got a picture of a flag on it 14:50:45 Preview of program I'm writing: S I I (S (K (S (S (K S) (S (K (S (K (S (S (K S) (S (K K) (S (K S) (S (K (S (S K K))) K)))) (K K))))) (S (K S) (S (K (S ( K S))) (S (K K)))))))) (S (S (K S) (S (K K) S)) (K (S (K S) (S (K (S ( K S))) (S (K K))))))) (K I) I 14:51:23 This one, however, will be EFFICIENT ish 14:51:35 Actually, it probably won't be 14:54:56 Taneb: pure SKI or LazyK? also what it does? 14:55:06 nortti, pure SKI 14:55:19 Infinite list of fibonacci numbers, I hope 14:56:38 brb 14:57:34 -!- oonbotti has joined. 14:58:25 Back 14:58:29 -!- derdon has joined. 15:06:14 I've got some pretty epic type errors 15:06:23 Occurs check: cannot construct the infinite type: 15:06:23 a0 15:06:23 = 15:06:23 ((a0 -> a0 -> a0) -> a0 -> a0) 15:06:24 -> ((a0 -> a0 -> a0) -> a0 -> a0) -> a0 15:06:26 Expected type: (((a0 -> a0 -> a0) -> a0 -> a0) 15:06:28 -> (a0 -> a0) -> ((a0 -> a0 -> a0) -> a0 -> a0) -> a0) 15:06:30 -> ((a0 -> a0 -> a0) -> a0 -> a0) -> a0 15:06:32 Actual type: (((a0 -> a0 -> a0) -> a0 -> a0) 15:06:34 -> (a0 -> a0) -> ((a0 -> a0 -> a0) -> a0 -> a0) -> a0) 15:06:36 -> (((a0 -> a0 -> a0) -> a0 -> a0) -> a0 -> a0) 15:06:38 -> ((a0 -> a0 -> a0) -> a0 -> a0) 15:06:40 -> ((a0 -> a0 -> a0) -> a0 -> a0) 15:06:42 -> a0 15:06:44 In the first argument of `k', namely `s' 15:06:46 In the first argument of `s', namely `(k s)' 15:06:48 I should really keep my working 15:10:25 elliott: what does black pudding taste like 15:10:36 meat 15:10:52 okay 15:11:05 i have no intentions of ever tasting black pudding 15:11:18 because it looks like it would taste like disgusting cooked congealed blood with random shit stuffed in it. 15:11:31 but maybe I'm mistaken 15:11:37 Taneb: SKI doesn't type in Hindley-Milner 15:11:37 ais523: You have 1 new message. '/msg lambdabot @messages' to read it. 15:11:43 @messages 15:11:43 elliott said 1d 1h 37m ago: ais is always surprising i wish i had a twisted mind like his at my disposal like a brain-in-a-jar or something like that 15:11:48 ais523, it does if you're insane 15:12:09 * kallisti made the Y combinator in Haskell with the help of unsafe coerces 15:12:23 * Taneb made a factorial program based on that 15:12:28 Maybe you've seen it 15:12:35 ais523: hi 15:12:39 hi elliott 15:12:45 kallisti: then you're not really in Hindley-Milner any more 15:12:51 ais523: right 15:13:00 but I was still surprised that GHC's runtime knew what to do with my code. 15:13:25 kallisti, you've got exactly the opposite mindset to me 15:13:40 I'm surprised when it core-dumps when I try to use 10 as a function 15:13:50 why is that surprising at all? 15:14:12 if you're unsafely coercing things, you'd expect trying to use 10 as a function to attempt to call a function in the eleventh memory location 15:14:34 I'm not entirely sure how unsafeCoerce works 15:14:36 It's kinda magic to me 15:14:42 pretty sure unsafeCoerce 10 :: functiontype will interpret 10 :: Integer 15:14:43 not :: Int 15:14:46 it does absolutely nothing 15:14:52 so it'll be a pointer still 15:14:56 elliott: ah, OK 15:15:06 it'll attempt to call a block of memory, as a function, that contains a bignum representation of 10 15:15:17 huh, couldn't you use that mechanism to run arbitrary asm 15:15:29 ais523: functoins are more than just funptrs, obviously. 15:15:30 closures 15:15:36 it needs to be in the same format 15:15:36 Are you INSANE ENOUGH TOO!? 15:15:39 well, OK 15:15:40 i would expect it to just give an RTS error 15:15:41 as other STG closures 15:15:45 iirc that case is handled 15:15:55 but you can probably find a block of memory that's a closure/bignum polyglot 15:16:11 because a good bignum representation will use pretty much every possible byte sequence 15:16:21 seems possible 15:16:27 ais523: only if you don't understand how stg works 15:16:40 there is a standard object format in GHC 15:17:01 I guess the byte sequence would need to point at things that /actually/ exist though 15:17:04 that would be the tricky part 15:17:58 isn't there more than one level of indirection? 15:18:15 the first section of the closure points to a structure that contains all the free variables. 15:19:40 no 15:19:45 the first word in a closure points to the info table 15:19:50 the rest of the words *are* the free variables 15:20:07 ah okay 15:20:19 and the info table contains the function pointer? 15:20:36 yes 15:20:50 with the tables next to code optimization, the info table pointer is the function pointer 15:20:56 and the info table itself appears immediately before the function 15:21:00 serves me right for only half-assedly reading papers about STF. 15:21:02 *G 15:21:09 because jumping to that function is by far the most common operation you do with the info ptr 15:21:33 ah right 15:21:47 so the function pointer is basically the first field of the info table. 15:22:19 and C cast magic makes it so that you can jump to the function pointer without the extra level of indirection. 15:22:25 er, not C 15:22:26 neverminde 15:22:32 uh, computer magic 15:22:35 yes. 15:22:42 if the function pointer is the first field of the info table, you still need to dereference twice 15:22:57 with tables next to code, the info table appears immediately before the function code in memory 15:22:57 ah, indeed. 15:23:17 and the closures store a pointer to that function code 15:23:29 so that calling the function is accomplished through a single indirect jump 15:23:44 and doing other things with the info table requires that you subtract the table size from the function pointer 15:23:57 this is a weird thing to do, interleaving data and code 15:24:01 some tools like LLVM have trouble with it 15:24:03 ah I see 15:24:05 but it makes sense 15:24:21 if you disassemble a GHC produced binary you will see these tables in the .text segment 15:26:17 it's not weird, it's just an efficient memory layout. 15:26:44 -!- david_werecat has joined. 15:27:16 what is wrong with this code? 15:27:17 #define ML_GETINT(x) \ 15:27:17 ptr = strtok(NULL, " "); if(!ptr) break; \ 15:27:17 mmt.##x = atoi(ptr); 15:27:20 ML_GETINT(HDisplay); 15:27:43 I get error: error: pasting "." and "HDisplay" does not give a valid preprocessing token 15:28:00 what on earth is ##x 15:28:05 i think you don't want paste there 15:28:09 just mmt.x 15:28:24 it is part of svgalib code 15:28:47 kallisti: to preprocess «foo##bar», you preprocess foo and bar, and then concatencate the results into a single token 15:29:06 used to e.g. prefix variable names with some standard prefix within a macro 15:29:52 ah. I thought CPP was just simple text substition. didn't realize it worked at a token level. 15:30:17 yeah, it won't substitute within a single word 15:30:27 if you #define foo to something, a variable named foobar is left alone 15:31:02 * kallisti learns something new about C everytime it's brought up . 15:31:17 probably because I haven't read a legitimate resource on it. 15:31:35 just countless shitty C tutorials that appear prominently on google searches. 15:31:48 I've seen some other piece of code use token-pasting for member access, though. Perhaps it has worked in one compiler or another. 15:33:20 umh. src/vgamisc.c:50: static void *__svgalib_linearframebuffer; src/vgabg.h:30: void *__svgalib_linearframebuffer; 15:33:37 how do they ever get svgalib to compile? 15:33:46 Perhaps they don't. 15:33:52 I haven't seen much svgalib users lately. 15:35:14 "However, two tokens that don't together form a valid token cannot be pasted together. For example, you cannot concatenate x with + in either order. If you try, the preprocessor issues a warning and emits the two tokens. Whether it puts white space between the tokens is undefined. It is common to find unnecessary uses of `##' in complex macros. If you get this warning, it is likely that you ... 15:35:20 ... can simply remove the `##'." 15:35:25 (GCC's CPP's manual.) 15:36:14 I suppose spurious ##s have been mostly used with compilers that are silent and just produce the two tokens. 15:37:36 "I've just installed gcc 3.2.2 and I get the warning [in question] when compiling code that worked just fine with 2.95.3." Yeah. 15:37:51 ... 15:38:23 getting svgalib to compile with gcc 4.5 is huge pain in the ass 15:38:40 That is not a terrible surprise. 15:38:47 Perhaps it would compile just fine with gcc 2.95. 15:39:16 Are you sure someone hasn't already done the required pain, though? People do the strangest things. 15:39:43 I am not going to compile old gcc with new gcc so I can compile old gcc again this time with the broken old gcc new gcc produced 15:40:12 There's e.g. a file called "svgalib-1.9.19-gcc4.patch" in the Gentoo svgalib ebuild. 15:41:03 how do I access gentoo ebuild with slitaz? 15:41:24 http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/svgalib/files/ for example. 15:41:42 Though interestingly I'm not seeing the gcc-4 patch there. 15:41:50 (The changelog promised one.) 15:41:56 Which svgalib you're compiling, anyway? 15:42:26 the newest one, 1.4.3 15:42:33 Well, there you go. 15:42:39 You could try 1.9.25. 15:43:04 Though it's going to be different and all that. 15:47:34 -!- Taneb has quit (Quit: Leaving). 15:59:27 -!- Nisstyre has quit (Ping timeout: 272 seconds). 16:13:34 -!- itidus21 has joined. 16:14:00 -!- Taneb has joined. 16:14:05 Hello! 16:14:20 nortti, what does svgalib even do? 16:15:04 I am not going to compile old gcc with new gcc so I can compile old gcc again this time with the broken old gcc new gcc produced <-- I have run into that problem when doing a gcc 3.x cross compiler 16:15:17 had to compile gcc 3.x native with gcc 4.1 or something like that first 16:15:31 and had to build gcc 4.1 with 4.6 which was what my system had 16:27:46 did they ever fix the thing in minecraft where 16:27:50 if you use a bed in the nether it just explodes 16:27:55 please say no 16:29:20 I don't think that was a thing that was to be fixed 16:29:37 elliott, that is a feature, not a bug 16:29:45 elliott, you are not supposed to be able to sleep in the nether 16:35:38 well yes 16:35:44 i mean "fix" as in "make less silly" 16:36:13 how would you make it less silly? 16:36:18 an error message? 16:36:22 idk 16:36:26 an explosion is pretty silly!!! 16:36:40 yeah they should totally remove TNT and creepers too 16:37:04 I'm sort of on the fence on this issue 16:37:10 Exploding beds is rather silly 16:37:44 But it's more fun than a message saying "The eery whispers trapped beneath your pillow won't let you sleep" 16:37:52 I don't think it is all that silly for sleeping in the nether. Better than an arbitrary "you can't rest here" 16:38:51 speaking of which, does vanilla minecraft still do "you can't sleep while there are monsters nearby"? 16:39:03 I don't think so? 16:39:07 hm okay 16:39:10 what does it do instead 16:39:27 ??? 16:39:31 I can't test it out atm 16:39:43 New computer, still setting up 16:39:51 I haven't got Java installed yet 16:40:11 I play with a mod called Somnia that basically simulates the entire night (but without rendering it and trying to run the simulation as fast as possible, so generally it takes less than half a minute to simulate an entire night, or day) 16:40:14 beds are cheaper than tnt right 16:40:38 elliott, but the issue is, you will be at the centre of the explosion 16:40:44 unlike with TNT where you can be at a distance 16:40:54 you can activate them from a fair range i think 16:41:20 I believe it moves you to the bed first though 16:41:28 try it out though, I don't know for sure 16:42:32 why must iptables be so complicated 16:42:56 like, does anyone know what a match on !lo+ means for the in-interface value? 16:43:09 I guess "not lo+" but I don't know what the + does to "lo" 16:43:09 You could say "Oi, Phantom_Hoover! Go lie down on that bed there! I wanna test whether this explosion prevention mechanism works or not!" 16:43:18 brb 16:43:19 -!- Taneb has quit. 16:44:05 Ease of use and flexibility: You can't have both 16:45:06 or well, lets say you can't have both something that is easy to master and also flexible. And making something that is easy to use and flexible is not easy 16:45:27 s/both something that is/something that is both/ 16:45:54 Someone mistyped os:timestamp/0 as os:timestampe/0. I got kickse out of that. 16:46:08 ion, is that erlang? 16:46:13 yeah 16:46:22 -!- Taneb has joined. 16:46:32 ion, not in my erl -man os? 16:46:32 ye old timestampes of os 16:46:35 which version has that 16:46:51 I might have forgot to keep up-to-date on it 16:47:00 I have Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false] 16:47:09 Probably not up do date at all, it’s the Ubuntu 12.04 package. 16:47:22 R14B03 here 16:47:24 (and it does have timestampe in -man os) 16:47:31 looks like R15B01 is out 16:48:24 ion, I suspect that they will deprecate the typo when they find it, then keep it around for about 2 major versions for compatibility 16:48:28 Back 16:49:35 -!- azaq23 has joined. 16:49:50 -!- azaq23 has quit (Max SendQ exceeded). 16:50:18 -!- azaq23 has joined. 16:52:54 ion, what are you writing in erlang? 16:53:16 vorpal: Not anything at the moment. 16:53:37 Actually, not anything for a long time. 16:53:45 ion, hm why is my os:timestamp/0 correctly spelled in R14B03 then if your R14B04 is typoed 16:54:55 vorpal: Ah, we both seem to have misunderstood each other. :-) I thought you knew i was kidding when i said -man os has “timestampe†and i thought you were continuing the joke when you said they’ll keep it for compatibility. 16:57:07 -!- asiekierka has quit (Quit: Wychodzi). 16:57:47 ion, where was it typoed then? 16:57:57 on IRC 16:57:59 oh 16:58:13 ion, anyway if they did typo the function name they would seriously keep it around like that 16:58:22 sure 16:58:34 referer 16:58:43 :-) 16:58:46 I'm not kidding, I remember them doing that for something around R12 or R11 16:58:57 elliott, ? 16:59:05 vorpal: Yes, i know you’re not kidding. :-) 16:59:06 oh right 16:59:10 vorpal: (HTTP) 16:59:12 elliott, which standard was that? 16:59:15 right 16:59:58 That typo has saved the world a countless amount of bandwidth over the years. 17:02:06 hah 17:02:29 can we estimate the number of HTTP requests world wide per time unit in any way 17:02:30 -!- Taneb has quit (Ping timeout: 245 seconds). 17:02:43 even a low estimate would be interesting 17:03:04 how many people with internet is there approx? 17:04:19 something like a billion, IIRC 17:04:47 hm estimated in 2010 to be 35% in 2011 is the best number I can find 17:05:00 out of approx 7 billion 17:05:13 so 2.45 billion then 17:06:08 since background stuff (i.e. web services and similar) won't use referer most of the time probably we can discount such stuff 17:06:50 elliott, and such causes referer right? 17:07:02 idk, maybe 17:07:05 i think so 17:07:07 right 17:07:10 i think that's how you do hotlink prevention 17:07:17 ah yes 17:07:59 19:14 < Vorpal> nortti, what does svgalib even do? // svgalib provides programs a way to set and use (s)vga video modes 17:08:18 -!- monqy has joined. 17:08:39 so lets say 2 billion people to be on the safe side. Each visiting 5 pages per day (low arbitrary number). None of them with referer. Each having maybe 10 images, javascripts, css files and so on. Then we get 2 billion * 10 17:08:58 billion is 10^9 in English right? 17:09:26 right 17:09:49 it's better to waste the internet bandwidth by running it inefficiently than letting criminals control it 17:09:53 `frink 10^9*5*2 bytes to gigabytes 17:10:04 ​[] 17:10:07 itidus21, completely unrelated to current discussion 17:10:08 what 17:10:14 elliott, how do I use frink 17:10:38 also *10 not *2 17:10:41 "10^9*5*2 bytes to gigabytes" 17:10:55 oh quotes? 17:10:59 good one 17:10:59 `frink "10^9*5*10 bytes to gigabytes" 17:11:00 no 17:11:01 ok, well for instance, i reload say 40 pages when i restart.. often on account of firefox memory leaks 17:11:06 i just found it funny 17:11:07 10^9*5*10 bytes to gigabytes 17:11:20 I don't remember the syntax for frink 17:11:24 so.. i waste bandwidth for convenience 17:11:27 Vorpal: hm? 17:11:28 use ->, not to 17:11:30 i have never heard of fronk 17:11:30 oh 17:11:33 frink neither 17:11:40 elliott, WOLFRAM ALPHA WOULD HAVE UNDERSTOOD ME! 17:11:42 cc -Wall -Wstrict-prototypes -fomit-frame-pointer -O2 -fno-strength-reduce -pipe -I../include -L../sharedlib -s -o restorefont restorefont.o -lvga -lm 17:11:45 /usr/bin/ld: cannot find -lvga 17:11:46 `frink 10^9*5*10 bytes -> gigabytes 17:11:55 50 17:11:59 shouldn't -lvga be before sourcw file? 17:12:02 shocking!! 17:12:03 so 50 gb per day in this case 17:12:13 and that is probably a low count 17:12:23 in fact it is probably a very low count 17:12:27 apparently 50 billion in billions is 50 17:12:53 we need to inform the ministry of numbers 17:13:11 `frink 10^9*5*10 bytes -> gibibytes 17:13:17 is more interesting 17:13:21 48828125/1048576 (approx. 46.566128730773926) 17:13:40 oklopol, it turns out it is in fact ~46.57 17:13:40 i think that's far less interesting 17:14:07 anyway on the whole it doesn't save much 17:14:17 the ministry of numbers would be all like meh dude that's boring 17:15:22 -!- Taneb has joined. 17:15:26 Hello 17:16:41 nortti: By convention, libraries after sources, because some linkers process command line left-to-right, and when encountering a "-lfoo" will only pull out from libfoo.a objects that resolve any as-yet unresolved symbols; so if you -lfoo first, nothing will get taken from the library. 17:17:32 fizzie, do you need to start with the file containing main first then? 17:17:37 as opposed to some other object file 17:17:49 or is this just for libraries? 17:18:52 btw I remember having to do -lx -ly -lx style sometime to resolve some complex semi-circular thing, since it didn't pull the entire libx.a, just what was needed from it 17:18:59 and liby.a needed some other parts 17:19:15 might not have been on a *nix system 17:19:17 don't remember 17:19:44 (and yes, liby was only pulled in from libx) 17:20:01 Just for libraries. If you give an object file, those tools will generally assume you want to link it regardless. 17:25:01 http://c-faq.com/lib/libsearch.html 17:28:19 -!- Taneb has quit (Quit: Leaving). 17:30:38 -!- Nisstyre has joined. 18:01:08 -!- Phantom_Hoover has quit (Quit: Leaving). 18:01:24 -!- Phantom_Hoover has joined. 18:25:53 -!- epicmonkey has joined. 18:47:05 -!- Taneb has joined. 18:47:13 Hello 18:47:24 -!- asiekierka has joined. 18:48:32 Change of plans, bye 18:48:35 -!- Taneb has quit (Client Quit). 19:00:33 -!- oerjan has joined. 19:05:16 23:15:36: kmc: 16:15 How can I convert `Maybe a` to `IO ()`? 19:05:19 23:15:40: Refreshing, isn't it? 19:05:22 word. 19:08:26 that's a good one 19:11:23 -!- pikhq_ has quit (Remote host closed the connection). 19:14:17 -!- pikhq has joined. 19:17:42 -!- ais523 has quit. 19:17:56 -!- ais523 has joined. 19:20:29 Pulseaudio: the audio breaking daemon. 19:23:23 The "pulse" in the name refers to the fact that if you're exceedingly lucky, you might get short "pulses" of working audio when the planets align. (That said, this is a PulseAudio system and it has no trouble with the audio part either.) 19:23:49 I recently had a weird problem: mpd and only mpd could play audio. 19:23:56 I fixed it by removing pulseaudio. 19:24:38 I have PulseAudio in my phone, too. (A sad state of affairs?) 19:31:45 Speaking of audio, I'd also like if the laptop could partake in producing sound out of the stereo system, and there's an unused coax s/pdif wire already in cable channels between the laptop (approx) and the stereo... but the laptop does digital audio only via a 3.5mm jack that has a TOSLINK led behind the electric parts. The only TOSLINK cable I have is just 1m; and anyway from what I hear ... 19:31:51 ... TOSLINK cables only go up to about 5m well, and break if bent too sharply. 19:32:47 Last I looked at doing general-purpose network audio, things seemed very messy. Especially if Windows was involved. 19:34:13 -!- zzo38 has joined. 19:42:00 elliott: Look, an SO question! http://stackoverflow.com/questions/11707171/haskell-sub-typeclass-requires-undecidableinstances 19:42:04 I guess it's already been answered by now. 19:48:41 -!- Vorpal has quit (Ping timeout: 240 seconds). 20:08:36 -!- asiekierka has quit (Remote host closed the connection). 20:13:57 -!- monqy has quit (Quit: hello). 20:20:13 Which (non-interactive) assemblers do you know that have an emulator built-in? 20:20:14 zzo38: You have 1 new message. '/msg lambdabot @messages' to read it. 20:24:59 ?messages 20:24:59 Taneb said 10h 29m 48s ago: Prelude.Generalize.choice is identical to Data.Foldable.asum, which Prelude.Generalize exports anyway 20:28:05 There are emulators/simulators with an assembler built-in; does that count? 20:29:56 -!- MoALTz has quit (Quit: Leaving). 20:33:37 fizzie: I don't know. Which ones do you mean? 20:34:01 I mean non-interactive systems so they might not count. 20:35:49 SPIM, the MIPS simulator, (IIRC) works so that you just give it an assembly source file, and it uses the integrated assembler to assemble it, then emulates a MIPS system to run the result. Though I suppose it also has an interactive debugger mode. 20:37:49 OK. What is then done by the result when emulated? 20:46:12 Nothing, really. I think you can inspect the contents of the memory afterwards, and the emulator has system calls that can produce output, which you can then inspect. (Come to think of it, I suppose it counts as interactive since I believe it has some input syscalls too, I've just never used them.) 20:47:40 -!- augur has quit (Remote host closed the connection). 20:51:39 -!- oerjan has quit (Remote host closed the connection). 20:51:49 -!- oerjan has joined. 20:52:03 gah disconnections are back 20:52:37 and simultaneously ruining my theory that they were due to something my previous housemates were doing 20:53:27 Is that true? Do you know what your previous housemates are doing right now? 20:53:31 They might be doing the same things. 20:53:41 -!- oerjan has quit (Remote host closed the connection). 21:10:39 fizzie: I was hoping that would be "How do I find C libraries that aren't shit?" 21:20:55 I don't know. 21:22:35 I think asking people can be a profitable strategy, but even that has the slight problem that *someone* needs to wade through the bad ones. 21:23:49 the real answer seems to be "don't use libraries, reinvent the wheel" 21:23:55 make your own shit library 21:26:03 Sometimes that is the choice, but it also depend, what library are you trying to make? Maybe there is one. 21:28:29 I have added an emulator to the MagicKit assembler (which is used for NES/Famicom and PC-Engine), a 6502 code in the .EMU block will be executed after the assembler is finish before it make the output file, so you can use that to affect the output and some other things too. 21:30:26 (It is using a slightly modified version of lib6502; it suppresses the error message for illegal instructions.) 21:31:44 I would also like to know if there are assemblers for other systems which have similar feature. 21:35:09 -!- nortti_ has joined. 21:38:22 i think i want to learn 6503 21:38:43 what is that? 21:38:47 SUB 6503, 1 21:39:02 hmm.. i don't suppose i can do that 21:39:11 MOV AX(?), 6503 21:39:21 DEC AX 21:39:29 oh. 6502 21:39:39 ya.. some kind of joke 21:39:53 irony i think 21:40:04 What kind of computers with 6502 did you want to program? 21:41:17 BBC Micro 21:41:26 OK 21:41:36 actually thats not true 21:41:49 maybe it's another attempt at irony. 21:42:11 but its not ironic because BBC Micro is probably actually fun.. just found it on wikipedia 21:42:28 no.. the computer i have in mind is NES/Famicom 21:42:45 OK. What assembler did you want to use? 21:43:42 it's on my bucket list to: learn japanese, learn 6502 assembly language, finish reading akira manga, finish watching rurouni kenshin anime, ... bleh 21:44:06 zzo38: my first goal of 6502 is actually to help with reading the disassembly of super mario bros. 21:44:37 You would have to learn the system too, not only the 6502. Also, the NES/Famicom does not have decimal mode other than that it is the same 6502 including unofficial instructions. 21:45:11 it's a nice disassembly, i've peeked at it before 21:45:30 i think it's one of the few games that i actually care how they did it 21:46:41 perhaps also i need more patience 21:52:50 -!- nooga_ has quit (Ping timeout: 250 seconds). 21:54:07 zzo38: i will have to get around to it in my own time.. so many things to learn about hardware 21:54:57 such as.. how graphics accelration actually works in a modern pc 21:59:47 as i started to learn about blitters then, gradually i can see that something about my conception of a computer is too simple 22:02:03 what is your conception of a computer? 22:02:57 Have you ever read Akagi and Kaiji manga and anime? 22:05:58 who does "you" include? 22:06:22 I meant itidus21 but others too if you want to 22:12:29 itidus21, just curious, have you ever moved past the "realising how little I know" stage and actually reached "learning more things"? 22:13:03 at this point you could probably generalize some of the lessons about how little you know 22:13:20 preemptively question the assumptions you make about how things work 22:13:22 stuff like that 22:13:31 -!- nooga has joined. 22:14:27 -!- impomatic has left. 22:15:51 * Phantom_Hoover tries to remember a specific conversation we've had with iti where we try to explain something. 22:17:03 Nope, it's too fuzzed together. 22:19:53 Is it proper in boxing to stay on the floor until they count to nine the second time you are knocked out in an attempt to avoid being TKO'd? 22:21:11 -!- augur has joined. 22:22:30 -!- augur has quit (Read error: Connection reset by peer). 22:22:49 -!- augur has joined. 22:23:26 zzo38, no. 22:23:50 Is there specifically a rule against it? 22:25:42 Yes. 22:26:04 How do they enforce it? 22:26:24 If you break the rule you're banned from punching people. 22:26:29 Ever. 22:26:40 You can still box, it's just kind of pointless. 22:26:59 But how to they check if you are legitimately knocked out for that amount of time or not? 22:29:15 I do not know how they could do anything about it other than giving your opponent more points. But maybe I am wrong. 22:30:02 They whallop you in the side when they reach nine and see if you cry out. 22:32:34 If they do that then you can instead get up just before they reach nine. Anyways if they do that, then if you are legitimately knocked out but would get up anyways then you may remain knocked out longer unfairly. And you could be able to learn self-control to decide by yourself to cry or not as much as you want. 22:40:54 (I know nothing about boxing FWIW, that was all made up.) 22:41:28 I certainly did not believe "If you break the rule you're banned from punching people."; but that's all. 22:46:24 -!- nooga has quit (Ping timeout: 255 seconds). 22:47:44 -!- nortti_ has quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )). 22:59:28 Well, this thread went bizarre http://www.reddit.com/r/funny/comments/xcjnf/found_a_bull_in_hobby_lobby_obviously_there_was/c5l84sv 23:01:48 The direct children of that comment are funny. Can’t tell if trolling or just stupid. 23:07:31 I can definitely see someone not realising that it's is not the possessive of it when asked. 23:10:19 -!- glogbackup has joined. 23:29:45 -!- epicmonkey has quit (Ping timeout: 272 seconds). 23:56:47 kmc: Wait, what happened? 23:56:58 -!- derdon has quit (Remote host closed the connection). 23:59:08 * shachaf looks at scrollback