code logs -> 2013 -> Thu, 04 Jul 2013< code.20130703.log - code.20130705.log >
--- Log opened Thu Jul 04 00:00:32 2013
00:02 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
00:02 mode/#code [+qo Vornicus Vornicus] by ChanServ
00:07 VirusJTG__ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Client closed the connection]
00:07 VirusJTG__ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
01:15 You're now known as TheWatcher[T-2]
01:18 You're now known as TheWatcher[zZzZ]
01:32 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
01:33 Turaiel[Offline] is now known as Turaiel
01:36 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
02:06 Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code
02:06 Turaiel is now known as Turaiel[Offline]
02:08
<&ToxicFrog>
Design question
02:09
<&ToxicFrog>
How should vstruct handle attempts to seek beyond the start/end of the buffer?
02:09
<&Derakon>
What is vstruct?
02:10
<&ToxicFrog>
Struct (un)packing library, a la python's "struct"
02:11
<&ToxicFrog>
It has operators for relative and absolute seeks.
02:12
<&ToxicFrog>
It looks like fseek() will cheerfully let you seek past EOF, but will error if you try to seek past the start of the file.
02:14
< RichyB>
seek()ing past EOF is allowed pretty much specifically for the sake of causing the allocation of sparse files
02:15
<&ToxicFrog>
...which doesn't make a lot of sense when the file is opened read-only.
02:15
< RichyB>
Maybe there are other reasons, but I don't know of them.
02:15
< RichyB>
Is a vstruct is a view on a fixed-size-at-allocation blob of memory?
02:16
<&ToxicFrog>
I mean, as a practical matter, when writing this will get you a sparse file and when reading it will error anyways when you try to fread() and get EOF
02:16
< RichyB>
Is a vstruct a view on a growing-as-you-append-to-it region of memory?
02:16
<&ToxicFrog>
Depends on how you use it.
02:16
<&ToxicFrog>
It can use anything that supports the stdio interface; it can also support strings, which it will automatically wrap in a stdio interface and grow as needed
02:16
< RichyB>
Well, if it's fixed-size like a bytes[] then it attempts to seek past the end are just bounds exceptions.
02:17
< RichyB>
If it's a thing that's going to feel like a StringIO or StringBuilder or whatever, then seeking past the end is a way of extending the buffer right now, and kindly fill the gap with nulls.
02:18
< RichyB>
So the latter, I think.
02:18
<&ToxicFrog>
Hmm.
02:18
< RichyB>
You could imagine something like an assembler or linker that, hitting a .offset declaration, seek()s to the named address and starts writing bytes from there.
02:18
<&ToxicFrog>
Looking at cursor(), it mimics the stdio behaviour (reads past eof return eof, writes past eof extend the buffer, seeks to <0 soft error)
02:19
<&ToxicFrog>
So I think the only actual question here is "should a seek to <0 be a hard error", and I think the answer is yes
02:19
< RichyB>
I think you're right to extend the buffer on writes past eof.
02:19
<&ToxicFrog>
Otherwise everything after the bad seek is garbage data anyways.
02:19
< RichyB>
I agree with you there, too.
02:19
<&ToxicFrog>
(and probably something before it, or you wouldn't attempt it in the first place...)
02:19
< RichyB>
:)
02:21 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has quit [Ping timeout: 121 seconds]
02:22
<&ToxicFrog>
(I am finally getting around to writing the unit tests for error handling)
02:29 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has joined #code
02:29 mode/#code [+o Reiv] by ChanServ
02:32 Karono is now known as Karono_
02:34 Karono_ is now known as Karono
02:58 Karono [Karono@Nightstar-03f66622.optusnet.com.au] has quit [[NS] Quit: sleep]
03:09 Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code
03:10 Karono [Karono@Nightstar-03f66622.optusnet.com.au] has quit [[NS] Quit: ]
03:10 Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code
03:25 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Client exited]
03:41 VirusJTG__ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:06 ktemkin[work] is now known as ktemkin
04:07 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has quit [[NS] Quit: ]
04:11 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has joined #code
04:11 mode/#code [+o Alek] by ChanServ
04:36 Kindamoody[zZz] is now known as Kindamoody
04:50 gnolam [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
05:38 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
05:38 mode/#code [+ao Derakon Derakon] by ChanServ
05:45 Karono [Karono@Nightstar-03f66622.optusnet.com.au] has quit [Ping timeout: 121 seconds]
05:49 Derakon is now known as Derakon[AFK]
06:07 ErikMesoy|sleep is now known as ErikMesoy
06:32 celticminstrel [celticminst@Nightstar-8403057e.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
07:16 Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code
08:47 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
08:56 ktemkin is now known as ktemkin[awol]
09:31 You're now known as TheWatcher
10:05 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
11:29 gnolam [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has joined #code
11:29 mode/#code [+o gnolam] by ChanServ
11:42 Kindamoody is now known as Kindamoody|out
12:26 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
12:41 cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has joined #code
12:41 mode/#code [+o cpux] by ChanServ
14:13 Karono is now known as Karono[stream]
14:50 celticminstrel [celticminst@Nightstar-8403057e.dsl.bell.ca] has joined #code
14:50 mode/#code [+o celticminstrel] by ChanServ
15:01 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
15:27 ErikMesoy is now known as Harrower
15:27 Harrower is now known as ErikMesoy
16:07 Karono[stream] is now known as Karono
16:23
<&ToxicFrog>
Good: having comprehensive test coverage.
16:23
<&ToxicFrog>
Better: refactoring the parser.
16:23
<&ToxicFrog>
Best: all tests pass afterwards.
16:26
<@Azash>
https://blog.crypto.cat/2013/07/new-critical-vulnerability-in-cryptocat-details/ http://tobtu.com/decryptocat.php
16:27
<@Azash>
ToxicFrog: Woo \o/
16:53
< Xon>
ToxicFrog, I'm still trying to get people todo this new fangled thing called testing for one fo the new projects I've been working on. =\
16:54
< Xon>
some of the ideas of my coworkers have suggested for the enviroment this project is going into also make me want to cry too. Microsoft's NLB. hardcoded IPs in config files, etc.
16:58
<@Tamber>
Azash, "Crypto is hard, let's go shopping"
16:59
<@Tamber>
(Otherwise known as "Why I don't even *try* to fuck about with anything that involves crypto at some point, because I *will* get it wrong.")
17:04
<@Azash>
Tamber: Pretty much, but I suppose in practice most of it is "be less wrong than the rest" :P
17:04
<@Tamber>
*chuckle*
17:14
<&ToxicFrog>
Xon: this is a project where someone filed a dozen bugs against it and, as an appendix, the 1200-line dynamic test case generator they had used to expose the bugs. (At the time, that was as large as the rest of the project combined; it still accounts for a third of it by LOC)
17:14
<&ToxicFrog>
It is probably my single most well tested project after stuff I work on professionally.
17:19 Karono [Karono@Nightstar-03f66622.optusnet.com.au] has quit [[NS] Quit: ]
17:20
<@gnolam>
https://twitter.com/raganwald/status/352089641073127426 :D
17:34
<@froztbyte>
Azash: my favourite part of that was "Cryptocat is run by people that don't know crypto, make stupid mistakes, and not enough eyes are looking at their code to find the bugs."
17:35
<@froztbyte>
which is pretty much the exact feeling that I got from /just the praise cryptocat got/
17:35
< Syka>
wait
17:35
< Syka>
i thought cryptocat was by appelbaum
17:35
< Syka>
or did he do another crypto-chat service after tor
17:36
<@froztbyte>
wikipedia mentions nothing of appelbaum in relation to cryptocat
17:36
<@froztbyte>
(not an empirical test, sure, but it's good enough for informational)
17:37
< Syka>
hmm
17:37
< Syka>
maybe he just mentioned it in that 29c3 talk then, don't remember
18:19 Turaiel[Offline] is now known as Turaiel
19:28 Kindamoody|out is now known as Kindamoody
20:37 Kindamoody is now known as Kindamoody[zZz]
20:54 cpux|2 [cpux@Nightstar-98762b0f.dyn.optonline.net] has joined #code
20:56 cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
20:57 Typh|offline is now known as Typherix
21:12 Turaiel is now known as Turaiel[Offline]
21:30 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
21:30 mode/#code [+ao Derakon Derakon] by ChanServ
21:33 ErikMesoy is now known as ErikMesoy|sleep
21:33 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
22:00 Typherix is now known as Typh|offline
23:08 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:08 mode/#code [+qo Vornicus Vornicus] by ChanServ
23:44 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has quit [[NS] Quit: Page closed]
23:44 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has joined #code
23:44 mode/#code [+o Reiv] by ChanServ
--- Log closed Fri Jul 05 00:00:47 2013
code logs -> 2013 -> Thu, 04 Jul 2013< code.20130703.log - code.20130705.log >

[ Latest log file ]