code logs -> 2009 -> Tue, 27 Oct 2009< code.20091026.log - code.20091028.log >
--- Log opened Tue Oct 27 00:00:22 2009
01:06 Derakon[AFK] is now known as Derakon
01:11 * McMartin wonders if he can close his last bug this release before dinner
02:01 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
02:16 Dae is now known as tabborg
02:17 tabborg is now known as fff
02:22 fff is now known as Dae
02:35 Dae [Dae@Nightstar-6bffd408.dial.as9105.com] has quit [[NS] Quit: ;D]
02:46 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
03:08 Attilla [The.Attilla@FBC920.A5C359.15BD32.425F3F] has quit [[NS] Quit: ]
05:04 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection reset by peer]
06:03 Derakon is now known as Derakon[AFK]
06:16 Netsplit *.net <-> *.split quits: simon`, @Vornicus, gnolam, @Kazriko, GeekSoldier, @Reivles, jerith
06:16 Netsplit over, joins: simon`, jerith, @Reivles, GeekSoldier, @Kazriko, @Vornicus, gnolam
06:16 629AAABGL [dmlandrum__@Nightstar-fab1cd53.sfldmi.ameritech.net] has joined #code
06:19 dmlandrum [dmlandrum__@Nightstar-fab1cd53.sfldmi.ameritech.net] has quit [Ping timeout: 121 seconds]
06:37 ErikMesoy|sleep is now known as ErikMesoy
06:42
<@Vornicus>
Hm. Random challenge: create an operator symbol for "roll left" and "roll right"
06:46 AnnoDomini [farkoff@Nightstar-7dc80cf4.adsl.tpnet.pl] has joined #code
06:46 mode/#code [+o AnnoDomini] by Reivles
07:06
<@Kazriko>
I'd probably start with a perspective drawn line from near to far, then arrows around it left and right also on the same perspective line. A bit tricky.
07:07
<@Vornicus>
AS in the bitwise operations.
07:07
<@Kazriko>
Ahh.
07:07
<@Kazriko>
Need to be clearer. heh. I'm immersed in the world of industrial interfaces...
07:09 Namegduf [namegduf@Nightstar-7ec84b32.bath.ac.uk] has quit [Operation timed out]
07:09 Namegduf [namegduf@Nightstar-7ec84b32.bath.ac.uk] has joined #code
07:17
< gnolam>
Vornicus: what glyphs are we allowed to use? :)
07:19
<@McMartin>
<<>, >><, by analogy with shift left and right.
07:19
<@Vornicus>
gnolam: ASCII. And McM's work, I guess
07:20
<@McMartin>
Hm
07:20
<@McMartin>
I find them somewhat ugly, tbh
07:20
<@McMartin>
Hee
07:20
<@McMartin>
<_<, >_>
07:21
<@McMartin>
Which is _>> and <<_, rolled.
07:21
<@McMartin>
(It's also better because those are unidirectional arrows)
07:21
<@Vornicus>
...I like those.
07:22
<@Vornicus>
...though _ is technically a valid name in most C-shaped langauges.
07:22
<@McMartin>
Been there, done that; <_< is not the same as < _ <.
07:22
<@McMartin>
(nested templates in C++)
07:23
<@McMartin>
where "vector<T<1>>2> >" is unambiguous
07:23
<@Vornicus>
wh...
07:23
<@McMartin>
vector is templated on a type, T;
07:23
<@Vornicus>
vast craziness.
07:23
<@McMartin>
T is itself a template type which is templated on an integer, here specialized to 1>>2
07:24
<@Vornicus>
I get it now, but damn.
07:24
<@McMartin>
The main thing is that, for instance, vector<basic_string<wchar_t>> is not legal.
07:24 * Vornicus wonders why people use / / and < > for delimiters anyway!
07:24
<@McMartin>
It is required to be vector<basic_string<wchar_t> >
07:24
<@Vornicus>
...though I do admit there are shockingly few.
07:25
<@McMartin>
Hey, Perl will let you use 'e' as a delimeter.
07:25 * Vornicus weeps openly.
07:25
<@AnnoDomini>
There, there, Brad.
07:26
<@McMartin>
IIRC, the first character after the "m" is the delimiter and it's only '/' by convention (because using '/' means the 'm' is optional)
07:26
<@McMartin>
It's been awhile, though; I go out of my way to not learn things about Perl.
07:27
<@McMartin>
(And it could be worse; C's trigraphs are a horrible remnant of the days when many commonly used text encodings could not encode braces.)
07:28
<@McMartin>
Upon further reflection, <_< is better than <<_ because <_< means that "1<<_" still parses the same way it would in C.
07:29
<@McMartin>
(And, of course, it's a strictly binary operator yielding a boolean, so a < _ < c isn't legal in the first place, and thus you wnn't see the now-legal-but-not-comparison-based a<_<c)
07:33
<@Vornicus>
>-> and <-< might work better; there's no ambiguity whatsoever there.
07:55
<@Vornicus>
well okay technically then you break one of the nice friendly lexer models.
08:07
<@McMartin>
Yeah; the nice friendly lexer models is why the "usual" case of nested templates is required to look funny
09:18 You're now known as TheWatcher
09:38 Netsplit *.net <-> *.split quits: @Derakon[AFK], simon`, @Vornicus, KazWork, @Kazriko, @Reivles, jerith, 629AAABGL, @MyCatVerbs, gnolam, (+3 more, use /NETSPLIT to show all of them)
09:39 Netsplit over, joins: simon`, jerith, KazWork, @Derakon[AFK], @Reivles, GeekSoldier, @MyCatVerbs, Alek, @Kazriko, @Vornicus (+3 more)
09:57 Netsplit *.net <-> *.split quits: Alek, @MyCatVerbs, SmithKurosaki, KazWork, @Derakon[AFK]
10:03 Netsplit over, joins: KazWork, Alek, @Derakon[AFK], SmithKurosaki, @MyCatVerbs
10:03 Netsplit *.net <-> *.split quits: Alek, @MyCatVerbs, SmithKurosaki, KazWork, @Derakon[AFK]
10:18 KazWork [kazrikna@Nightstar-55f6a2b4.xen.prgmr.com] has joined #code
10:18 Alek [omegaboot@Nightstar-02457fcc.emhril.sbcglobal.net] has joined #code
10:18 Derakon[AFK] [Derakon@Nightstar-5abd3ac9.ca.comcast.net] has joined #code
10:18 SmithKurosaki [Smith@Nightstar-683a7925.dsl.teksavvy.com] has joined #code
10:18 MyCatVerbs [mycatverbs@Nightstar-492e7e67.co.uk] has joined #code
10:18 ServerMode/#code [+oo Derakon[AFK] MyCatVerbs] by *.Nightstar.Net
10:19 Netsplit *.net <-> *.split quits: Alek, @MyCatVerbs, SmithKurosaki, KazWork, @Derakon[AFK]
10:29 Netsplit over, joins: KazWork, Alek, @Derakon[AFK], SmithKurosaki, @MyCatVerbs
10:38 Attilla [The.Attilla@FBC920.A5C359.15BD32.425F3F] has joined #code
10:38 mode/#code [+o Attilla] by Reivles
11:11 AnnoDomini [farkoff@Nightstar-7dc80cf4.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
11:17 AnnoDomini [farkoff@Nightstar-e12081df.adsl.tpnet.pl] has joined #code
11:17 mode/#code [+o AnnoDomini] by Reivles
12:05 Tarinaky [Tarinaky@Nightstar-7b7d9e6f.adsl.virginmedia.net] has joined #code
13:13 629AAABGL is now known as dmlandrum
15:06 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
15:07 Syloqs_AFH is now known as Syloqs-AFH
17:21 You're now known as TheWatcher[afk]
17:22 Tarinaky [Tarinaky@Nightstar-7b7d9e6f.adsl.virginmedia.net] has quit [Ping timeout: 121 seconds]
17:53 Tarinaky [Tarinaky@Nightstar-48526c0f.adsl.virginmedia.net] has joined #code
18:16 * McMartin stabs MacPorts in the face
18:18 Derakon[work] [Derakon@Nightstar-d44d635e.ucsf.edu] has joined #code
18:18
< Derakon[work]>
Latest bit of madness: my boss wants me to print out the manual for the new 24-port switch we installed.
18:18
< Derakon[work]>
Said manual is 618 pages long. ?.?
18:19
< Derakon[work]>
(He's apparently not comfortable with electronic versions of the manuals, and puts a lot more faith in the big binders we have on a bookshelf in the microscope room)
18:22
<@McMartin>
I... ARGH
18:22
<@McMartin>
I just want to install some header files
18:22
<@McMartin>
Why are you building Perl from source as a prereq
18:22
<@McMartin>
Especially since Perl is already installed because it is a Mac
18:23
< Derakon[work]>
Because this is FOSS and works on Linux and they can shoehorn Macs into behaving like Linux by just ignoring everything that Macs provide by default.
18:24
<@McMartin>
What I mean is, "how is Perl possibly even a prereq in the first place"
18:24
< Derakon[work]>
As for why Perl's needed in the first place, maybe to customize said headers to your system? *shrug*
18:24
<@McMartin>
I'm building for distribution!
18:25
<@McMartin>
At this point, I give even odds that the thing I actually wanted won't even build right because it's Snow Leopard, and I will be forced to uninstall 70 packages by hand in exactly the right order
18:40
<@McMartin>
Oh hey, it built
18:40
<@McMartin>
Now to see if it plays right with the Cocoa version of Qt.
18:53
<@McMartin>
In other news, hooray, Windows 7 VPN working
18:53
<@McMartin>
Answer: No, Qt dies horribly
18:54
<@McMartin>
... because installd segfaulted
18:54 * SmithKurosaki laughs
18:54
< SmithKurosaki>
Poor Mcm
18:55 * McMartin goes back to the Win7 laptop.
18:59
< SmithKurosaki>
Are there any differences between directed and undirected graphs other than arrows?
18:59
<@McMartin>
That works out to a fairly large conceptual difference, of course, but no
19:01
< SmithKurosaki>
o0
19:01
< SmithKurosaki>
What else is different?
19:03
< Derakon[work]>
An undirected graph is simply a directed graph with arrows on the ends of each edge.
19:03
<@McMartin>
It all follows from the arrows. It's easier for a directed graph to be acyclic
19:03
<@McMartin>
And yeah, Derakon's right that you can consider undirected graphs to be a special kind of directed graph with twice as many edges
19:07
< SmithKurosaki>
Ahh, that is a better way to look at it considering the math
19:10
<@McMartin>
If you learn directed first, it's easier to go then to undirected than the other way around
19:13
< SmithKurosaki>
Hate wireless down here
19:14
< SmithKurosaki>
He is not going over Dir vs undir, he is just going over different things you can do with graphs
19:47
< gnolam>
The Graphs (And What To Do With Them)
20:23 * Derakon[work] sends the Whitespace Union 0x2a after Sebastian to break his kneecaps.
20:25
< Derakon[work]>
I don't understand how someone can decide that "if( foo+bar<baz )" is the right way to write an if statement.
20:26
< Namegduf>
Eww.
20:31
< Derakon[work]>
Oh, awesome. I just discovered that vim supports multiple copy buffers.
20:31
< Derakon[work]>
For example, just 'Y' yanks (copies) the current line into the default buffer.
20:31
< Derakon[work]>
But "aY will yank it into buffer a.
20:32
< Derakon[work]>
And then "ap will paste the contents of buffer a.
20:32 * Derakon[work] <3 vim.
20:36
< Derakon[work]>
Okay, folks, take a look at this: http://paste.ubuntu.com/303098/
20:36 * McMartin boos for having to go into the office despite already giving WFH notice
20:36
< Derakon[work]>
Is the "else" statement supposed to execute both of those lines?
20:37
< gnolam>
The else statement just applies to line 6. Line 7 will be executed no matter what (assuming the condition on line 1 was met).
20:37
<@McMartin>
Well, I mean, it will regardless.
20:37
<@McMartin>
Also, why are there break statements dominating the exit from this if
20:37
< Derakon[work]>
Gnolam: oh, I know what it does (at least, syntax-wise).
20:37
< Derakon[work]>
I'm asking for an interpretation of intent.
20:37
<@McMartin>
Does he realize break doesn't work on arbitrary blocks?
20:38
< Derakon[work]>
Probably not!
20:38 * SmithKurosaki hugs Der
20:39
< gnolam>
Then he probably intended it to apply to both 6 and 7, yes.
20:40
< gnolam>
Has he written /any/ code that doesn't belong on the Daily WTF?
20:40
< SmithKurosaki>
from what I have heard, no
20:40
< Derakon[work]>
Most of it is just a crime against code style guidelines.
20:41
< Derakon[work]>
And for the most part his algorithms are sound.
20:41
< Derakon[work]>
Just ass-ugly.
20:41 * Tarinaky blinks.
20:41
< Tarinaky>
What language is that supposed to be?
20:41
< SmithKurosaki>
Should he be hanged for crimes against codekind?
20:42
< Derakon[work]>
Tarinaky: C/C++.
20:42
< Derakon[work]>
And SK: if we hung all of the bad coders out there we'd run out of rope.
20:42
< Tarinaky>
Ah. Yeah. The nested if confused me and made me think there was a bracket mismatch.
20:42
< Derakon[work]>
Nope. Just whitespace dumassedness.
20:42
< Derakon[work]>
Er, dumbassedness.
20:42
< Derakon[work]>
Dumas has nothing to do with this.
20:43
< SmithKurosaki>
;.;
20:44
< Derakon[work]>
I remain hopeful that I can start turning this trainwreck around at some point.
20:44
< Tarinaky>
I remain hopeful that I will one day find true love.
20:44 * Tarinaky inserts laughter.
20:46
< SmithKurosaki>
I seek the same Tar
20:46
< Tarinaky>
asl? :p
20:47
< SmithKurosaki>
Heh
20:47
< SmithKurosaki>
Well, I live in ontario
20:48
< ErikMesoy>
I remain hopeful of true love too.
20:50
< SmithKurosaki>
I m
20:50
< SmithKurosaki>
I'm out, will ttyl
21:08
< Derakon[work]>
Why did the developers of C ever let you do if/else/for/while statements without curly braces? :(
21:08
< ErikMesoy>
Inspired by Python?
21:09
< Derakon[work]>
That would require some interesting temporal shenanigans.
21:09
< ErikMesoy>
import antigravity, import timetravel
21:09
< ErikMesoy>
:P
21:09
< Derakon[work]>
And in any event, Python does have consistent block delimeters.
21:10
< Derakon[work]>
It says something about Python that I had to actually check if those were in the __future__ module.
21:37
<@McMartin>
Hee
21:39
< Derakon[work]>
% python -c 'from __future__ import braces'
21:40
<@McMartin>
Not a chance
21:40
<@McMartin>
Also, re: "without braces"
21:40
<@McMartin>
Because the grammar becomes so much easier that way; the real question is why functions mandate them
21:40
<@McMartin>
Otherwise, braces are to statements what parens are to expressions in every case
21:41
<@McMartin>
if (expr) stmt [else stmt]
21:41
< Derakon[work]>
I.e. a good idea?
21:41
<@McMartin>
"A generic grouping mechanism for turning many into one"
21:41
< Derakon[work]>
I'm increasingly of the opinion that mandating good style is a good idea, since if you don't do it, then other coders will make your life unpleasant.
21:41
<@McMartin>
You see this more in code being backfitted from C99 to C89, mind you
21:42
<@McMartin>
(putting braced statements in the middle of straight line code so that they can declare variables immediately before use, etc)
21:43
< Derakon[work]>
Let's play Spot the Brace Mismatch! http://paste.ubuntu.com/303128/
21:44
< Derakon[work]>
...actually, now that I count it out, it does line up.
21:44
< Derakon[work]>
But it sure as hell looks godawful.
21:47
< Derakon[work]>
I think the thing I hate most about this code, at the moment, is that it is consistently inconsistent.
21:47
<@McMartin>
Was that first paste (with the breaks) inside a loop?
21:48
< Derakon[work]>
You mean this one? http://paste.ubuntu.com/303098/
21:48
< gnolam>
Gah... the indentation... the horrible horrible indentation...
21:48
<@McMartin>
Yes, that one.
21:48
< Derakon[work]>
It was in a switch/case block.
21:48
<@McMartin>
I'm not actua
21:49
<@McMartin>
Aha
21:49
<@McMartin>
Yeah
21:49
<@McMartin>
(Note: ^J and ^K not the same)
21:49
<@McMartin>
(That was going to be "I'm not actually confident he wouldn't do that in straight line)
21:52
< gnolam>
I like how he mixes %i and %d in that sprintf statement too.
21:53
<@McMartin>
I wish there were standard % codes for specific bit widths. =(
21:54
<@McMartin>
I am reminded of another terrible coder I have been ranted at about
21:54
<@McMartin>
His preferred method of signalling errors was by evaluating 18/0
21:54
<@McMartin>
Sometimes multiple times
21:54
<@McMartin>
Sometimes inside asserts
21:55
< gnolam>
...
21:55
<@McMartin>
The best was when it was in dead code
21:55
<@McMartin>
So you'd have
21:55
<@McMartin>
# Do computation here, putting it in result, etc.
21:55
<@McMartin>
return result
21:55
<@McMartin>
18/0
21:55
<@McMartin>
18/0
21:55
<@McMartin>
return 18/0
21:56
<@ToxicFrog>
..
21:56
<@McMartin>
You know
21:56
<@McMartin>
In case the return didn't return *hard* enough the first time.
21:56
< ErikMesoy>
what the
21:56
<@ToxicFrog>
<McMartin> I wish there were standard % codes for specific bit widths. =( -- seconded
21:56
< Derakon[work]>
This is the kind of code you get from someone who doesn't understand how programming works.
21:56
<@ToxicFrog>
Especially with recent work I'm doing on message-passing libraries.
21:56
<@McMartin>
One of the souls forced to maintain this after he was laid off described the system as "a stopped clock that we check twice a day"
21:56
< Derakon[work]>
Whereas the code I'm dealing with here is from someone who basically understands how programs work; just not how they're designed.
21:57
< Derakon[work]>
McM: hee.
21:57 * ToxicFrog had a fun bug to track down earlier that stemmed from one of the nodes being 64-bit, and thus having 64-bit size_ts, but all of the nodes using %d
21:57
<@McMartin>
There *is* a non-standard %-code for "however big a size_t is" but I forget what it is. z?
21:57
<@ToxicFrog>
Also, one of the things I like about both Lua and Java is that dead code like that is a compile time error.
21:58
< Derakon[work]>
Oh, look, a function where Sebastian momentarily forgot how arrays work!
21:59
< Derakon[work]>
Hence why we have the arguments AnaListN, nxN, and nAnalogN, for N in [0..3].
21:59
<@ToxicFrog>
;.;
22:00
<@McMartin>
"this was preceded by about 15-20 lines of in-fiction description of the various castles in LotR"
22:00
<@McMartin>
My response to this
22:00
< Derakon[work]>
Mind, this is what it looks like when the Python code calls it...
22:00
< Derakon[work]>
c.Profile_Set(string, digList, anaDeltaList0, anaDeltaList1, anaDeltaList2, anaDeltaList3)
22:00
<@McMartin>
Comments are extremely important for maintainable code!
22:00
<@McMartin>
They give off magic Comment Rays that make the code better
22:00 * Derakon[work] snerks.
22:00 * gnolam guffaws.
22:01 * Derakon[work] <3 vim. Where else could you do something like ":.,'bg/sizeof/s/$/\r }"?
22:01
< ErikMesoy>
Perl?
22:01
< Derakon[work]>
Mm. Point.
22:01
< jerith>
Der: TECO?
22:02
< Derakon[work]>
And sed.
22:02
< Derakon[work]>
TECO wouldn't actually be legible, Jerith~
22:02
< jerith>
Derakon[work]: Every string of characters is a valid TECO command.
22:03
< jerith>
So there's plenty of legible TECO. It's just unexpected in its effects.
22:03
< Derakon[work]>
(Translation of that command: "From the cursor location to marker b, find lines that contain the string "sizeof", and insert the line " }" after them)
22:03
< Derakon[work]>
Jerith: yeah, I'm aware of that.
22:03
< Derakon[work]>
Useful TECO is illegible; legible TECO is not useful.
22:04
< jerith>
Hey, don't forget emacs was originally a collection of TECO macros.~
22:04
< ErikMesoy>
Really?
22:04
< jerith>
Well, the sort of proto-emacs.
22:04 Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code
22:04
<@McMartin>
I vaguely recall this
22:04
< jerith>
Assuming I'm not misremembering.
22:04
< Derakon[work]>
Hullo, Rhamphoryncus.
22:05
< Rhamphoryncus>
yarrrr
22:06
< jerith>
http://www.emacswiki.org/emacs/TecoEmacs
22:07
< jerith>
The name comes from Editor MACroS.
22:19 * Derakon[work] finally finishes fixing the whitespace problems in this 866-line file.
22:35
< Derakon[work]>
% hg diff C67lib.cpp|wc -l
22:35
< Derakon[work]>
1694
23:02 ErikMesoy is now known as ErikMesoy|sleep
23:31 Derakon[work] [Derakon@Nightstar-d44d635e.ucsf.edu] has quit [[NS] Quit: Leaving]
23:32 AnnoDomini [farkoff@Nightstar-e12081df.adsl.tpnet.pl] has quit [[NS] Quit: Quem quer o garfo?]
--- Log closed Wed Oct 28 00:00:36 2009
code logs -> 2009 -> Tue, 27 Oct 2009< code.20091026.log - code.20091028.log >