<<20-12-2012>>

00:05:29*zahary1 quit (Read error: Operation timed out)
01:45:46*q66 quit (Quit: Quit)
03:34:12*FreeArtMan quit (Ping timeout: 260 seconds)
06:13:53*ccssnet quit (Ping timeout: 245 seconds)
07:22:49*Trix[a]r_za is now known as Trixar_za
07:24:20*gour joined #nimrod
09:05:03*Trixar_za is now known as Trix[a]r_za
09:34:20*Araq_ joined #nimrod
10:26:36*Araq_bnc joined #nimrod
10:29:04*Amrykid quit (Ping timeout: 245 seconds)
10:29:04*dom96 quit (Ping timeout: 245 seconds)
10:29:05*dom96 joined #nimrod
10:29:11*dom96 quit (Changing host)
10:29:11*dom96 joined #nimrod
10:29:45*Araq quit (Ping timeout: 260 seconds)
11:05:30*ccssnet joined #nimrod
12:09:53*zahary joined #nimrod
13:07:33*q66 joined #nimrod
13:40:48*Amrykid joined #nimrod
14:58:49*Amrykid quit (Changing host)
14:58:54*Amrykid joined #nimrod
16:07:39dom96hello
16:36:54*Trix[a]r_za is now known as Trixar_za
17:31:10*Araq_bnc is now known as Araq
17:35:30Araqping zahary
17:42:30Araqhi dom96
17:42:35dom96hello Araq
17:44:50dom96So, I am now officially off school
17:46:50Araqlol, what did you do wrong?
17:47:00dom96what? it's christmas
17:47:50Araqthat is your answer for everything, hu?
17:56:55dom96no, 'what?' is not my answer for everything?
17:57:20AraqI'm referring to "it's christmas" ;-)
17:57:55Araqsorry, tried to be funny ...
18:05:35dom96sorry, I didn't realise you were joking...
18:11:15*gradha joined #nimrod
18:24:55Araqhi gradha
18:25:10gradhahi Araq
18:25:50Araqso does babel work on macosx?
18:26:15gradhait will when https://github.com/Araq/Nimrod/issues/272 is dealt with
18:26:35Araqwell can you have a look at #272 and fix it?
18:26:50gradhait's on my todo list
18:29:50Araqgradha: excellent, thank you
18:34:50gradhathere's also an alternative: tell mac people to wait patiently
18:35:00Araqthey are used to that anyway :P
18:35:30dom96it's ok. I have an idea on how to fix it.
18:35:35Araqbut I think on linux the problem is the same?
18:35:50Trixar_zaIf you're going with what their used to, you should probably charge for the port too
18:36:00AraqTrixar_za: nice idea :D
18:36:10gradhaTrixar_za: that's old school. Instead nimrod should be free, and each babel module paid for
18:36:30Trixar_zaOf course
18:36:35Trixar_zaWith it's own Apple Shop price
18:37:10Araqbabel needs to be intregrated into iTunes for that to work
18:37:30Araqheck, Nimrod should be part of iTunes for that matter
18:37:50Araqbut iTunes needs a much better facebook integration ...
18:38:20gradhathey already send all your privacy data "to the cloud", that's pretty well integrated
18:38:30Araqso that iTunes can tell facebook that I just downloaded a new Nimrod module with the iTunes Babel plugin
18:39:15*apriori| joined #nimrod
18:39:30gradhadom96: last time I tried using the buffered socket with json parsing it failed with extraneous data, so it's seems it's not just taking long, also getting extra bytes
18:40:00dom96gradha: It simply shouldn't use buffered sockets.
18:40:10dom96The code was designed for unbuffered sockets.
18:40:40dom96now the problem with SSL's recvLine not working with unbuffured sockets might be a bit tricky.
18:41:10AraqI still don't get the sockets API
18:41:35gradhawhy would be a problem that code designed for unbuffered sockets to use buffered ones?
18:41:40AraqI don't want to do an OS <-> userspace context switch for every single byte
18:42:00Araqbut since we don't know how many bytes arrived what else can you do?
18:42:31dom96I think httpclient does its own buffering
18:42:56dom96well actually, the way http works is that it may send you the content length.
18:43:11dom96You then simply recv(contentLength, ...)
18:43:21Araqyeah I know
18:43:31dom96But with buffering enabled it might request more.
18:43:36Araqbut that's backwards and shouldn't be HTTP's business
18:43:41dom96hrm, maybe this is a bug with buffering
18:43:51gradhadoes that work too with gzip deflate? the http protocol reports the compressed size
18:44:11Araqapparently buffering on the socket level is very bad idea
18:44:21Araqbut then as I said, how is it supposed to work?
18:44:31gradhabut at least on iOS the network layer returns you the uncompressed data, so it's bigger
18:45:01AraqI think HTTP does report the compressed size then, yes
18:45:56dom96it shouldn't matter for httpclient as it doesn't request compressed data.
18:46:16Araqmany website only send compressed data
18:46:21Araq*websites
18:46:31Araqno matter if you requested it or not
18:46:41gradhaheh, thought the other way round was more frequent
18:46:51dom96Araq: Example?
18:47:11Araqdom96: uni frankfurt iirc
18:47:36Araqmaybe they changed it
18:47:51gradhaI scraped some days ago the web minus.com, which is a picture image, whenever they see fit they return gzip content, without you requesting it
18:54:31dom96A web crawler would be a nice test for httpclient
19:03:41dom96damn, I can't remember the reason why unbuffered ssl sockets cannot use recvLine.
19:04:31Araqyou should have made a comment ;-)
19:04:56dom96I remember now.
19:05:16dom96Normal recv allows you to peek.
19:05:31dom96OpenSSL's does not.
19:07:51dom96Araq: fields in object variants are always there anyway right?
19:08:11Araqfor now, yes
19:08:21Araqthat won't stay though :P
19:08:31dom96hrm, but then again this will make the implementation a bit confusing.
19:08:51dom96I'll simply add a little 1 char buffer to the SSL implementation :D
19:09:11Araqsounds like a good idea
19:09:31Araqbtw never ever look at SSL's implemenation
19:09:51Araqand never think about it's the base of the "secure" internet
19:10:31Zoropenssl is the scariest C code base I have ever looked at, hands down
19:10:36Araq"My definition of an expert in any field is a person who knows enough about what's really going on to be scared."
19:10:41Araq P. J. Plauger,
19:23:31Araqso according to SO buffering the socket is the way to go
19:23:41Araqso I dunno why it should block ...
19:24:11Araqmaybe we overlooked some non-posix flag?
19:25:51Araqhrm you can call it once with MSG_PEEK to retrieve the number of bytes that can be read
19:27:41dom96link?
19:27:51Araqhttp://msdn.microsoft.com/en-us/library/windows/desktop/ms740121%28v=vs.85%29.aspx
19:31:21Araq"The receive calls normally return any data available, up to the requested amount, rather than waiting for receipt of the full amount requested. " says http://linux.die.net/man/2/recv
19:32:17dom96well then there is no reason for it to block.
19:32:32Araqyeah
19:32:52dom96I shall investigate once I implement recvLine for unbuffered ssl sockets.
19:32:57Araqso is it a macosx problem or a problem in general?
19:33:02dom96as that feature is useful anyway
19:35:17dom96wait. OpenSSL does have a peek function? how did I miss this.
19:38:52gradhahow is it named?
19:40:57dom96SSL_peek
19:41:12dom96It seems as if it has been removed.
19:41:17dom96I can't find it in the official docs.
19:41:22Araqit was a security risk
19:41:37Araqpeople could use it to know about how many bytes to read
19:42:02Araqso they could in fact, read *data*
19:42:12Araqbig security risk
19:42:22dom96Are you joking again?
19:42:57gradhait's not really reading, just knowing how much you will read
19:43:17dom96it is reading.
19:43:52dom96The only difference between SSL_read and SSL_peek is that SSL_peek does not remove the data that is returns.
19:43:57dom96*it
19:44:32Araqdom96: yes :D
19:45:32gradhathat's nice documentation, not a single reference to SSL_peek from SSL_read
19:45:37Zoropenssl documentation is fucking terrible
19:46:02Zorfrom the BN_rand man page:
19:46:12ZorIf top is 0, it is set to 1, and if top is 1, the two most significant bits of the number will be set to 1, so that the product of two such random numbers will always have 2*bits length.
19:46:22AraqXD
19:46:32Zorbut what do the two most significant bits in openssl's magical bignum format mean? nobody knows!
19:47:37Zor(here's a fun fact, neither of them means signed)
19:47:52gradhasounds like in older versions top == 0 meant something different
19:48:17gradhacan't understand anything else, I'm afraid
19:48:52dom96well no one is answering me in #openssl
19:48:57Zorthat's okay, neither can I, after googling around and asking several reverse engineer friends for days
19:49:12Zorall I could gather is that signedness is not part of those two bits
19:49:22gradhayou reverse engineer your friends for days?
19:49:37gradhaoh, wait, it's another day where I read everything wrong, sorry
19:49:52Araqyou know, that's why I consider computing surreal: open, read/write, close; how hard can it be to design such an API?
19:50:17Araqturns out the international posix standard couldn't do even that
19:50:52Zoroh, I didn't paste the full explanation of top
19:50:57ZorIf top is -1, the most significant bit of the random number can be zero. If top is 0, it is set to 1, and if top is 1, the two most significant bits of the number will be set to 1, so that the product of two such random numbers will always have 2*bits length.
19:51:02Zorthere it is
19:51:07Zor(more magic values, wheeee)
20:09:12gradhaso github disallows downloads now, but they still allow/host web pages through the gh-page branch where you can put any binary
20:09:23gradhadoes somebody understand?
20:09:53Araqyou just found a hole in their system
20:10:23gourwhen i asked tcl/tk folks about migrating from SF to fossil, they replied "we do not want to have anything critical at SF"...it looks that GH is going similar router
20:38:23*gradha quit (Quit: gradha)
20:46:13*FreeArtMan joined #nimrod
22:01:14*gour quit (Disconnected by services)
22:01:19*gour_ joined #nimrod
22:01:34*gour_ is now known as gour
22:07:59*gour is now known as Anaphaxeton
22:10:14*Anaphaxeton is now known as gour
22:29:54*Trixar_za is now known as Trix[a]r_za
22:45:04*apriori| quit (Quit: Konversation terminated!)
23:03:19*Araq__ joined #nimrod
23:03:39*Araq_ quit (Ping timeout: 255 seconds)
23:10:54*zahary quit (Read error: Operation timed out)
23:19:45*gour quit (Quit: WeeChat 0.3.8)
23:26:20*Araq__ quit (Read error: Connection timed out)
23:28:45*Araq_ joined #nimrod