code logs -> 2009 -> Sun, 05 Jul 2009< code.20090704.log - code.20090706.log >
--- Log opened Sun Jul 05 00:00:56 2009
00:01
<@Consul>
Presumably, it has something to do with threads.
00:01
<@Consul>
And safety.
00:03
<@Derakon>
It largely amounts to ensuring that only one thread can use/change a given resource at a time.
00:03
<@Consul>
Oh, do'h!
00:03
<@Derakon>
You wouldn't want a string to go from "Hello, World" to "Oh Hai" when you're busy reading it.
00:04
<@TheWatcher>
Well, one simple example: say that you have a variable 'int foo' and two threads. foo starts out as 1, and the two threads contain the code 'foo = foo + 1'. Now, say that the two threads hit that code at the same time, both read foo as 1, add one, and write it back... so foo is now 2, when it should be three.
00:04
<@Consul>
Exactly the same way the OS locks resources to a single process, you can lock a resource to a single thread.
00:04
<@Derakon>
Pretty much.
00:06
<@Consul>
Duh, it all makes sense now.
00:10
<@TheWatcher>
The proper way to do it is to have some kind of mutual exclusion on the int - like pthread's mutex, or a semaphore - and then only one thread can access it at a time, so proper behaviour is preserved at the cost of forcing one or the other thread to wait
00:16 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
00:20
<@Consul>
Thanks. I feel just a little bit smarter now. :-)
00:21
<@Consul>
I guess I understood the basic idea. I just needed the term matched up to it.
00:38
<@ToxicFrog>
Ok, I'm having a variable naming problem.
00:38
<@ToxicFrog>
I have a buffer.
00:38
<@ToxicFrog>
I have a bunch of functions that can be applied to it in any order.
00:39
<@ToxicFrog>
Some of these collect and report information about the buffer; others convert it into new formats and save those; and still others mutate it in place.
00:39
<@ToxicFrog>
Each buffer is associated with a queue of such functions to be applied to it.
00:39
<@ToxicFrog>
What should they be called?
00:39
<@Derakon>
The buffers?
00:40
<@Derakon>
What do the buffers store?
00:40
<@ToxicFrog>
The functions (and by extension the list of functions)
00:40
<@ToxicFrog>
Troff-like data.
00:41
<@ToxicFrog>
Some examples of the functions:
00:42
<@ToxicFrog>
- report number of images used, length in lines, and other statistics
00:42
<@ToxicFrog>
- generate HTML output
00:42
<@ToxicFrog>
- generate BBCode output
00:42
<@ToxicFrog>
- report all images referenced in the input but not present on disk
00:42
<@ToxicFrog>
- upload all images to a given hosting service and rewrite the buffer to point to their uploaded forms
00:43
<@Derakon>
Why can't they be e.g. generateHTMLOutput, generateBBCodeOutput, reportNumImages, etc?
00:43
<@ToxicFrog>
And I need a name that encompasses all of these.
00:43
<@SmithKurosaki>
So you need function names or a name for the central buffer?
00:43
<@ToxicFrog>
They are.
00:43
<@ToxicFrog>
I don't need names for the individual functions
00:43
<@ToxicFrog>
I need a name for this class of function
00:43
<@Derakon>
Ah.
00:43
<@Derakon>
BufferFunc?
00:43
<@Derakon>
<--- Unimaginative.
00:43
<@ToxicFrog>
And data structures that hold them, such as the queue of functions pending on a given buffer.
00:44
<@SmithKurosaki>
ProcessBuffer?
00:44
<@TheWatcher>
TheWranglertron ¬¬
00:44
<@ToxicFrog>
Also, this is a documentation/interface name as well as a typename.
00:44
<@ToxicFrog>
wranglers!
00:44
<@ToxicFrog>
TW, you are brilliant.
00:44
<@Derakon>
Hee.
00:44
<@SmithKurosaki>
I have little imagination atm, it's all being consumed by the mafia machine
00:45
<@SmithKurosaki>
Quick, give me some alcohol!
00:45
<@SmithKurosaki>
Or some really old coffeee
00:45
<@ToxicFrog>
Are you sure you have enough vim for that?
00:46 * SmithKurosaki checks
00:46
<@SmithKurosaki>
No :(
00:47
<@ToxicFrog>
return {
00:47
<@ToxicFrog>
text = buf
00:47
<@ToxicFrog>
wranglers = { "setup" };
00:47
<@ToxicFrog>
}
00:47
<@SmithKurosaki>
o/
00:50
<@ToxicFrog>
This also means I need a local function wrangle(post), of course
00:50
<@ToxicFrog>
Excellent.
00:54 You're now known as TheWatcher[T-2]
00:56 You're now known as TheWatcher[zZzZ]
01:30 Tarinaky [~Tarinaky@Nightstar-16638.plus.com] has quit [Client exited]
01:45
<@ToxicFrog>
First-class high-order functions: still totally fucking awesome.
03:06 Attilla [~The.Attil@92.23.182.ns-12275] has quit [Ping Timeout]
03:13 Attilla [~The.Attil@92.10.176.ns-4793] has joined #code
03:13 mode/#code [+o Attilla] by ChanServ
04:51 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Quit: restarting router]
05:02 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
05:03 mode/#code [+o gnolam] by ChanServ
05:42 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
05:44 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Leaving for the Czech Republic.]
06:13 Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Quit: ]
06:15 Vornicus [~vorn@ServicesOp.Nightstar.Net] has joined #code
06:15 mode/#code [+o Vornicus] by ChanServ
07:26 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Ping Timeout]
07:27 SmithKurosaki [~Smith@Nightstar-10074.dsl.teksavvy.com] has quit [Ping Timeout]
07:39 Derakon is now known as Derakon[AFK]
08:02 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Operation timed out]
08:04 Thaqui [~Thaqui@121.98.166.ns-22683] has joined #code
08:04 mode/#code [+o Thaqui] by ChanServ
08:04 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
08:05 Vornicus is now known as Vornicus-Latens
10:20 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Connection reset by peer]
10:21 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
10:23 You're now known as TheWatcher
11:02 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Operation timed out]
11:03 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
11:06 SmithKurosaki [~Smith@Nightstar-10074.dsl.teksavvy.com] has joined #code
11:06 mode/#code [+o SmithKurosaki] by ChanServ
11:07 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
11:07 mode/#code [+o ToxicFrog] by ChanServ
11:07 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Operation timed out]
11:07 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
11:31 * TheWatcher eyes this
11:32 * TheWatcher bleghs, sets about making a minimal, thread-safe queue class
12:29 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out]
12:30 SmithKurosaki [~Smith@Nightstar-10074.dsl.teksavvy.com] has quit [Ping Timeout]
13:36 Tarinaky [~Tarinaky@Nightstar-16638.plus.com] has joined #code
14:03 Thaqui [~Thaqui@121.98.166.ns-22683] has quit [Client exited]
14:18 UndeadAnno [AnnoDomini@Nightstar-29769.neoplus.adsl.tpnet.pl] has joined #Code
14:18 mode/#code [+o UndeadAnno] by ChanServ
14:22 UndeadAnno is now known as AnnoDomini
15:03 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Operation timed out]
15:03 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
15:49 AnnoDomini [AnnoDomini@Nightstar-29769.neoplus.adsl.tpnet.pl] has quit [Quit: Some people find sanity a little confining.]
15:53 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Ping Timeout]
15:53 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
15:54 AnnoDomini [AnnoDomini@Nightstar-29769.neoplus.adsl.tpnet.pl] has joined #Code
15:54 mode/#code [+o AnnoDomini] by ChanServ
15:59 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Operation timed out]
15:59 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
16:21 ToxicFrog [~ToxicFrog@Nightstar-3932.dsl.yaknet.ca] has joined #code
16:21 mode/#code [+o ToxicFrog] by ChanServ
16:30 SmithKurosaki [~Smith@Nightstar-3932.dsl.yaknet.ca] has joined #code
16:30 mode/#code [+o SmithKurosaki] by ChanServ
16:59 You're now known as TheWatcher[afk]
17:01 Thaqui [~Thaqui@121.98.166.ns-22683] has joined #code
17:01 mode/#code [+o Thaqui] by ChanServ
17:34 Vornicus-Latens [~vorn@ServicesOp.Nightstar.Net] has quit [Quit: Leaving]
17:36 Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code
17:36 mode/#code [+o Vornicus] by ChanServ
17:55 Derakon[AFK] is now known as Derakon
19:15 TarinakyKai [~Tarinaky@Nightstar-16638.plus.com] has joined #code
19:16 Tarinaky [~Tarinaky@Nightstar-16638.plus.com] has quit [Ping Timeout]
20:04 Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Quit: ]
20:11 Vornicus [~vorn@ServicesOp.Nightstar.Net] has joined #code
20:11 mode/#code [+o Vornicus] by ChanServ
20:13 Vornicus [~vorn@ServicesOp.Nightstar.Net] has quit [Quit: Leaving]
20:25 Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code
20:25 mode/#code [+o Vornicus] by ChanServ
20:31
<@AnnoDomini>
Could someone paste me a frontquote character?
20:33
<@AnnoDomini>
Or is there no such thing?
20:33
<@Vornicus>
a frontquote?
20:33
<@AnnoDomini>
Like a backquote, only the other way around.
20:34
<@AnnoDomini>
It may be that this font is just silly.
20:38
<@Vornicus>
Possible.
20:39
<@Vornicus>
There's " ' ", but that's probably not what you're looking for.
20:39
<@Vornicus>
There's also smart quotes, but those are deep in unicode and you usually don't want them!
20:53
<@jerith>
ASCII has only two single quote characters.
20:53
<@jerith>
` and '
20:54
<@jerith>
The latter is variously displayed as an apostrophe (or closing quote) or an ambidextrous single quote suitable for both opening and closing.
21:23 You're now known as TheWatcher
22:50 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
22:58 AbuDhabi [AnnoDomini@Nightstar-29345.neoplus.adsl.tpnet.pl] has joined #Code
23:00 AnnoDomini [AnnoDomini@Nightstar-29769.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
23:18 Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Quit: ]
23:26 AbuDhabi [AnnoDomini@Nightstar-29345.neoplus.adsl.tpnet.pl] has quit [Quit: Don't trust the skull.]
23:31 Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code
23:31 mode/#code [+o Vornicus] by ChanServ
23:34 You're now known as TheWatcher[T-2]
23:37 You're now known as TheWatcher[zZzZ]
--- Log closed Mon Jul 06 00:00:11 2009
code logs -> 2009 -> Sun, 05 Jul 2009< code.20090704.log - code.20090706.log >