code logs -> 2010 -> Fri, 09 Apr 2010< code.20100408.log - code.20100410.log >
--- Log opened Fri Apr 09 00:00:51 2010
00:36 Orthia [orthianz@Nightstar-94ce50d7.xnet.co.nz] has joined #code
--- Log closed Fri Apr 09 00:47:00 2010
--- Log opened Fri Apr 09 02:23:32 2010
02:23 TheWatcher[zZzZ] [chris@Nightstar-b4529b0c.zen.co.uk] has joined #code
02:23 Irssi: #code: Total of 21 nicks [6 ops, 0 halfops, 0 voices, 15 normal]
02:23 mode/#code [+o TheWatcher[zZzZ]] by Reiver
02:24 Irssi: Join to #code was synced in 51 secs
02:24 Derakon[DMC] is now known as Derakon
03:08 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
03:10 Reiv [NSwebIRC@Nightstar-1055e8af.waikato.ac.nz] has joined #code
04:03 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *hums* Can't stay now!]
04:42 ryan [revfitz@Nightstar-23a13631.scrm01.sbcglobal.net] has joined #code
04:43
< ryan>
I'm trying to get my head around headers and declarations in c++ and I feel like I'm almost there but not quite
04:44
< ryan>
specifically, say I have a class that uses <string> and is defined in a .h and .cpp file
04:44
< ryan>
my understanding is that you don't put #include <string> in the .h, because then it will fuck up any program that includes the header and also uses <string> itself
04:44
< ryan>
but if I only put #include <string> in the .cpp, it won't compile because the "string" type isn't defined in the header
04:45
< ryan>
is there some way to declare that std::string exists in a way that the header will believe, so that I can compile it without actually including <string> in the header?
04:46
< ryan>
uh this is an actual problem I'm having right now, just to clarify, not a hypothetical
04:46
<@Vornicus>
ryan: you need to include string in the h if any of the public interfaces use string types.
04:46
< ryan>
but like
04:46
< ryan>
if I make multiple classes that all need string
04:46
<@Vornicus>
right...
04:46
< ryan>
and I include their headers from inside my main program
04:47
< ryan>
won't that crash and burn because it's seeing the string definitions more than once?
04:47
<@Vornicus>
No.
04:47
< ryan>
really?
04:47
< ryan>
huh.
04:47
<@McMartin>
You always want to engineer your .h files so that they're only included once.
04:47
<@McMartin>
There are two ways to do this
04:47
<@Vornicus>
Bcause string, like all the other standard headers, are built so they only actually get included once.
04:47
< ryan>
oh.
04:47
< ryan>
that makes sense.
04:47
<@McMartin>
And they work regardless of how many times they are #included
04:47
<@Vornicus>
(and that's how /yours/ should work too!)
04:47
< ryan>
gotcha
04:47
<@McMartin>
The easy way for modern compilers is to put "#pragma once" as the first line.
04:47
<@McMartin>
This works in MSVC and gcc
04:48
<@McMartin>
Everyone else can die in a fire~
04:48
< ryan>
I'll try that, my version of gcc behaves a little oddly
04:48
< ryan>
it's the one from mac xcode circa like 2004 and I've noticed a couple ways that it acts differently from the linux gcc at my school
04:49
< ryan>
so I might need the #ifndefs and stuff
04:49
< ryan>
but that is pretty much all I needed to know, thanks
04:50
<@McMartin>
what does "gcc --version" say when you enter it in Terminal.app?
04:50
< ryan>
powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer, Inc. build 4061)
04:50
< ryan>
so, yeah.
04:51
< ryan>
it accepts pragma though
04:51
< ryan>
unless it is just failing silently
04:52
<@McMartin>
4.x will accept #pragma once
05:04 AnnoDomini [annodomini@Nightstar-232c0cdd.adsl.tpnet.pl] has joined #code
05:04 mode/#code [+o AnnoDomini] by Reiver
05:39 Orthia [orthianz@Nightstar-a8ac8b29.xnet.co.nz] has joined #code
05:42 Orth [orthianz@Nightstar-20d39170.xnet.co.nz] has quit [Ping timeout: 121 seconds]
05:49 Reiv [NSwebIRC@Nightstar-1055e8af.waikato.ac.nz] has quit [Ping timeout: 121 seconds]
06:03 Derakon is now known as Derakon[AFK]
06:43 Vornicus is now known as Vornicus-Latens
06:56 Orth [orthianz@Nightstar-d264dd32.xnet.co.nz] has joined #code
06:59 Orthia [orthianz@Nightstar-a8ac8b29.xnet.co.nz] has quit [Ping timeout: 121 seconds]
07:15 Serah [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
07:26 Attilla [Attilla@FBC920.482E2D.971EED.6317D6] has joined #code
07:26 mode/#code [+o Attilla] by Reiver
07:36 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
08:10 ryan [revfitz@Nightstar-23a13631.scrm01.sbcglobal.net] has quit [[NS] Quit: leaving]
08:20 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
08:24 Reiver [reaverta@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: I ATENT'T DEAD]
08:25 DiceBot [Reiver@Nightstar-54389b51.xnet.co.nz] has quit [Connection reset by peer]
08:30 Reiver [reaverta@ServerAdministrator.Nightstar.Net] has joined #code
08:30 mode/#code [+qo Reiver Reiver] by ChanServ
09:21 You're now known as TheWatcher
09:24 AnnoDomini [annodomini@Nightstar-232c0cdd.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
09:26 AnnoDomini [annodomini@Nightstar-c6e6ad49.adsl.tpnet.pl] has joined #code
09:26 mode/#code [+o AnnoDomini] by Reiver
10:02 Orthia [orthianz@Nightstar-7fe57987.xnet.co.nz] has joined #code
10:04 Orth [orthianz@Nightstar-d264dd32.xnet.co.nz] has quit [Ping timeout: 121 seconds]
10:34 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
10:58 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
12:30 cpux is now known as shade_of_cpux
13:14 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
15:18 Rhamphoryncus [rhamph@Nightstar-8931f88f.abhsia.telus.net] has quit [Client exited]
15:39 Orthia [orthianz@Nightstar-7fe57987.xnet.co.nz] has quit [Client closed the connection]
15:45 Orthia [orthianz@Nightstar-7fe57987.xnet.co.nz] has joined #code
15:45 Orthia [orthianz@Nightstar-7fe57987.xnet.co.nz] has quit [Connection reset by peer]
15:54 Orthia [orthianz@Nightstar-7fe57987.xnet.co.nz] has joined #code
15:58 Zed_ [Zed@Nightstar-d7ade99d.or.comcast.net] has joined #code
15:58 Orthia [orthianz@Nightstar-7fe57987.xnet.co.nz] has quit [Client closed the connection]
16:01 Zed [Zed@Nightstar-d7ade99d.or.comcast.net] has quit [Ping timeout: 121 seconds]
16:04 Orthia [orthianz@Nightstar-7fe57987.xnet.co.nz] has joined #code
16:09 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
16:10 Orthia [orthianz@Nightstar-7fe57987.xnet.co.nz] has quit [Ping timeout: 121 seconds]
16:17 Zed_ [Zed@Nightstar-d7ade99d.or.comcast.net] has quit [Ping timeout: 121 seconds]
16:40 Zed_ [Zed@Nightstar-d7ade99d.or.comcast.net] has joined #code
17:15 Zed_ [Zed@Nightstar-d7ade99d.or.comcast.net] has quit [Ping timeout: 121 seconds]
17:33
< Serah>
When defragging: If given the option, will sorting files by name or date increase transfer time / decrease seek time / yield any benefit at all?
17:34 Vornicus-Latens is now known as Vornicus
17:36
<@Vornicus>
No.
17:36
< Serah>
I wonder why some defragging programs offer the opportunity then.
17:37
<@Vornicus>
I don't know.
17:44
< Serah>
Oh, and thank you for your assistance.
18:00
< gnolam>
http://whydoeseverythingsuck.com/2010/04/steve-jobs-has-just-gone-mad.html
18:26
< PinkFreud>
'If you need to "originally" write your code in Swahili, while listening to Milli Vanilli, while reclining in a patch of mud, and then you need fifty oompa loompas to translate the Swahili into C, that is none of Steve Jobs fucking business.'
18:26
< PinkFreud>
lol
18:27
< JBeshir>
They found out my secret.
18:27
< JBeshir>
Hmm.
18:27
< JBeshir>
This is not my nick.
18:27 JBeshir is now known as Namegduf
18:28 * jerith gives Namegduf an exam about nerves.
18:29
< Namegduf>
Bad day to drink coffee.
18:34 Attilla [Attilla@FBC920.482E2D.971EED.6317D6] has quit [Client closed the connection]
18:35 Attilla [Attilla@FBC920.482E2D.971EED.6317D6] has joined #code
18:35 mode/#code [+o Attilla] by Reiver
18:37 Attilla [Attilla@FBC920.482E2D.971EED.6317D6] has quit [Client closed the connection]
18:37 Attilla_ [Attilla@FBC920.482E2D.971EED.6317D6] has joined #code
18:37
< Namegduf>
As rules on iPhone apps go, that's probably of about medium ridiculousness and anti-competitiveness.
18:38
< Namegduf>
They're doing a very, very good job of abusing the closed platform model so badly it'll hopefully wind up discredited for a bit.
18:39 Attilla_ [Attilla@FBC920.482E2D.971EED.6317D6] has quit [Client closed the connection]
18:39
< Namegduf>
Even aside those two aspects, they even have the bureaucratic "months to get approved" and "judged by someone who can't seem to understand what it is" parts down.
18:39 Attilla [Attilla@FBC920.482E2D.971EED.6317D6] has joined #code
18:39 mode/#code [+o Attilla] by Reiver
18:42
< gnolam>
Namegduf: I assume you've seen http://www.geekculture.com/joyoftech/joyimages/1151real.jpg
18:43
< Namegduf>
Haha.
18:48
< celticminstrel>
...what does that commenter mean by "jailbroken iPhones"? Stolen is the first thing to come to mind, but that doesn't quite seem right...
18:49
< Namegduf>
celticminstrel: Ones modified to run any software.
18:49
< celticminstrel>
Ah.
18:49
< celticminstrel>
Is that difficult?
18:49
<@jerith>
celticminstrel: Modified firmware, which removes a bunch of the lockdown.
18:49
<@jerith>
Difficult to modify the firmware, probably, but not hard to install.
18:50
< Namegduf>
Although Apple are wonderfully unfond of them.
18:50
<@jerith>
I know some rather nontechnical people who've done it.
18:55 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
18:57
< Tarinaky>
The fact that Apple have declared that one may only use one of three programming languages has soured any interest I might have had in an i-anything.
18:58
< Namegduf>
And "We will remove competition to ourselves" didn't?
18:58
< Namegduf>
I have an iPod, but I wouldn't get anything larger.
18:59
<@ToxicFrog>
Tarinaky: wait, what?
19:00
< Tarinaky>
It rather rubbed me the wrong way :/
19:00
<@ToxicFrog>
When, why, and which languages?
19:01
< Tarinaky>
ToxicFrog: None. I've never developed for the iPhone.
19:01
< Tarinaky>
It's an academic point >.>
19:01
< Tarinaky>
I don;t have the money to buy an i-anything anyway.
19:02
<@ToxicFrog>
Er
19:02
<@ToxicFrog>
<Tarinaky> The fact that Apple have declared that one may only use one of three programming languages has soured any interest I might have had in an i-anything.
19:03
<@ToxicFrog>
<ToxicFrog> When, why, and which languages?
19:03
<@ToxicFrog>
<Tarinaky> ToxicFrog: None.
19:03
<@ToxicFrog>
What?
19:03
< Tarinaky>
Oh. The C, C++ and Objective C thing.
19:03
< Tarinaky>
http://whydoeseverythingsuck.com/2010/04/steve-jobs-has-just-gone-mad.html << This story
19:04
<@ToxicFrog>
Apple has previously approved apps written in (for example) Lua, though.
19:04
<@ToxicFrog>
Are they going to retroactively remove those?
19:05
< Tarinaky>
I wouldn't put it past Apple.
19:06
< Tarinaky>
When did Microsoft stop being the Bad Guy?
19:06
< Tarinaky>
:/
19:07
< Tarinaky>
I want to go back to those simpler, halcyon days.
19:07
<@ToxicFrog>
Apple being the Bad Guy does not stop Microsoft from also being the Bad Guy~
19:07
< Tarinaky>
When really expensive phones used Java apps.
19:07 celmin [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
19:08
< Tarinaky>
And Flash was something you made shitty videos/games with for Newgrounds.
19:08
< Tarinaky>
When MMORPGs were something only total geeks played....
19:08
< Tarinaky>
When Ragnarok Online was new.
19:09
< Tarinaky>
When 160GB of Storage was a lot.
19:09 celmin [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [Client exited]
19:10
< Tarinaky>
The future sucks :(
19:11
< Tarinaky>
And now I'm all depressed and nostalgic.
19:18
<@jerith>
Did the things that make you weak and strange not get engineered away?
19:25
< Tarinaky>
Afraid not.
19:25
< Tarinaky>
That which did not kill me only made me weaker and stranger.
19:25
<@jerith>
:-(
19:25
< Tarinaky>
Just be glad I'm only complaining about nostalgia and not the weird stretchmarks I seem to be getting on my arms this year.
19:26 * jerith has a rash he could show you, if you like...
19:27
< Tarinaky>
I'll raise you a pock on my inner thigh.
19:27 * jerith is slightly uncomfortable with the directio nthis conversation is taking...
19:37 Serah [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
20:35 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code
20:35 mode/#code [+o Derakon] by Reiver
20:36 * Derakon writes a quick whitespace-fixer in Perl that seems to work rather well.
20:36
<@Derakon>
(I was trying to read some C++ code that mixed tabs and spaces, so I used vim to convert tabs to 4 spaces, and then ran my script to line things up better)
20:49
< PinkFreud>
heh. perl's good at that.
20:56
<@Derakon>
Here's the script, if you're curious. Very simple and brain-dead. http://pastebin.starforge.co.uk/247
20:57
<@Derakon>
The chop line is to deal with Windows-style newlines. ?.?
21:00 * Vornicus beats up on various software download sites that say they have ottd 1.0 for mac but in fact have 0.7.5
21:05
< PinkFreud>
I would've just done s/\t/ /g;
21:05
< PinkFreud>
but that may be too simplistic for what you were trying to accomplish ;)
21:06
<@Derakon>
PinkFreud: well, I did the initial conversion in vim, and then realized it was insufficient to my needs.
21:06
<@Derakon>
The whitespace in this file is all over the place, really.
21:06 * PinkFreud nods
21:07
<@jerith>
M-x indent-region
21:08
<@Derakon>
Bah, emacs.-
21:08
<@Derakon>
s/-//
21:08
<@TheWatcher>
:P
21:12
<@Derakon>
Incidentally, I don't suppose any of you have familiarity with working with DSP cards?
21:12
<@Derakon>
(Though, as I understand it, we're largely using ours as a programmable voltage source with strict timings)
21:14 Serah [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
21:16 * Derakon sighs at "InitDio" for "initial digital I/O states".
21:17
<@Derakon>
What's wrong with chaining capital letters in variable names?
21:53 Serah [Z@2C3C9C.B2A300.F245DE.859909] has joined #code
22:09 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed]
22:18
<@Derakon>
From the DF bugs forum, a bug report on elven caravans: "Along with a lot of other things, they bring me four elephants. Three mules, carrying four elephants."
22:18
< Namegduf>
XD
22:20
<@AnnoDomini>
Buying elephants is an excercise in futility.
22:20
<@AnnoDomini>
With what they weigh, you'll never get them off the depot.
22:31 AnnoDomini [annodomini@Nightstar-c6e6ad49.adsl.tpnet.pl] has quit [[NS] Quit: PARTY.]
23:21
< celticminstrel>
Oh! Is it possible to do "<?php /* stuff */ if($some_variable) { ?> <!-- more stuff --> <?php } ?>"? I've been assuming no, but...
23:22
<@McMartin>
celticminstrel: That's a classic technique in JSP; I don't see why PHP wouldn't support it.
23:22
<@McMartin>
Like, doing that with "for" is one of the ways to automatically populate a table
23:23
<@Vornicus>
celmin: that's how I do php.
23:24
<@Derakon>
Yes, it works.
23:25
<@Derakon>
It's the standard way to have conditional page content.
23:25
<@Derakon>
You can basically think of everything outside a <?php> tag as being a big print statement.
23:27
< celticminstrel>
And here I've been using echo whenever I need conditional content. 9_9
23:27
<@Derakon>
Whups.
23:28
< celticminstrel>
?
23:28
< celticminstrel>
I've also been wondering if <?php ?> blocks can appear inside HTML attributes.
23:29
<@Derakon>
Yep.
23:29
< celticminstrel>
Really?
23:29
<@Derakon>
Though usually you want to use the short form <?=> instead.
23:29
< celticminstrel>
Nice.
23:29
< celticminstrel>
...what?
23:29
<@Derakon>
E.g. <img src="<?= $imagePath ?>">
23:29
< celticminstrel>
Ah.
23:29
< celticminstrel>
I did not know about that.
23:30
<@Derakon>
It's a short-form tag that evaluates a single statement and returns the result.
23:30
< celticminstrel>
Nice to know.
23:30
< celticminstrel>
So, I guess PHP tags could appear anywhere in the middle of HTML tags, then.
23:31
<@Derakon>
I'm not aware of any exceptions, yeah.
23:32
< celticminstrel>
Apparently <?xml tags confuse PHP.
23:33
<@McMartin>
Heh. D'oh
23:34
< celticminstrel>
Well, I'd call that a bug, but whatever.
23:34
<@McMartin>
PHP tends to make me twitch and shudder generally, so ;-)
23:35
< celticminstrel>
I like the idea of using Python for CGI.
23:35
<@Derakon>
Perl, Python, and PHP all make good CGI languages.
23:35
<@Derakon>
They're the 'P' in LAMP.
23:35
<@Derakon>
(Linux, Apache, MySQL, Programming language of choice)
23:36 * TheWatcher readsup, notes that while php can appear in the middle of html, he utterly hates the practice of doing so
23:36
<@Derakon>
PHP is more CGI-oriented than the other two, so depending on your reliance on third-party modules, it can be more or less useful.
23:36
<@Derakon>
TW: how would you handle the img tag example I made?
23:38
<@TheWatcher>
By doing the entire thing a different way - generate the page from a template containing markers, using a cgi script and filling in the appropriate places
23:38
<@TheWatcher>
I detest the practice of mixing content and logic.
23:38
<@Derakon>
Wouldn't "<?= $imagePath ?>" qualify as a marker in a template?
23:40
<@Derakon>
I agree that logic and content should be separate, but to me that generally means having a proper control/content/container separation, and doing any content logic at the top of the page.
23:40
<@Derakon>
So once you get into the actual content, the only PHP you should see are <?=> short tags and <?php if ($previouslyPreparedBoolean) {?> bits.
23:41 * TheWatcher shrug
23:41
<@McMartin>
What TW is saying is "never write Type 1 webapps"
23:41
<@McMartin>
Which is hard to argue with except when students are forced to
23:41
<@Derakon>
I'm not familiar with that term.
23:42
<@McMartin>
Type 1 is the standard ASP/JSP/PHP thing where the page has logic in it that's run server-side to produce the real page. Source is organized by visible output page.
23:42
<@McMartin>
Type 2 is MVC-based.
23:42
< Namegduf>
Hmm.
23:42
< Namegduf>
I'm agreeable for a sensible definition of app.
23:43
< Namegduf>
If we're taking what is basically a flat HTML page and adding a couple of bits of dynamically generated/DB-pulled content, then the "type 1" approach is not only reasonable, it's simpler to read and understand.
23:43
<@McMartin>
Right setup for the right job, yeah
23:43
< Namegduf>
If you're actually writing something you'd call an "app", though.
23:44
<@McMartin>
The problem is when someone tries to scale that to something, well, that *ought* to be enterprisey.
23:44
< Namegduf>
Oh yeah.
23:44
<@TheWatcher>
Indeed. But at least in my experience, the minute you start adding dynamic/db content to a page, you're on the path to something that is eventually going to need something more complicated
23:44
<@TheWatcher>
because you are going to need to add features
23:44
<@McMartin>
Or that's simple enough that you can handle client-side.
23:45
<@Derakon>
In my opinion, logic in the page itself should be limited to "This boolean says I should display this variant of the page" and "I need to insert these values here." The boolean and values should be calculated elsewhere.
23:45
<@Derakon>
Page logic certainly shouldn't be accessing the DB.
23:45
< Namegduf>
Hmm. I disagree.
23:45
< Namegduf>
This is, however, because I don't use a CMS, largely.
23:45
<@McMartin>
"I need to insert these values here" is code for "This app doesn't have enough XSS vulnerabilities" >_>
23:46
<@TheWatcher>
snrk
23:46 * Derakon facepalms.
23:46
<@Derakon>
Not what I meant.
23:46
< Namegduf>
I should be clearer.
23:46
<@McMartin>
Early versions of PHP were absolutely face-palm horrendous about this
23:46
< Namegduf>
I disagree with "expasion is inherent"
23:47
< Namegduf>
If I have a simple index page which has some dynamically loaded news information, a block of text pulled from forum PHP here, and some news boxes containing text here, in static positions, then there's no reason that's inherently going to increase in complexity over time.
23:47
< Namegduf>
At least, aside feature creep-which is not something you want to permit on informational pages if you can do the slightest thing about it.
23:48
<@Derakon>
Namegduf: I would say, what context is this index page in?
23:48
<@Derakon>
Is it commercial, or even large-scale hobbyist? If so, expect it to add stuff.
23:48
<@Derakon>
If it's good commercial, expect it to remove stuff too.
23:49
<@Derakon>
In general, content changes, because it's content and if it's not being read then there's no point to it.
23:49
< Namegduf>
It does, yes.
23:49
< Namegduf>
Change is inherent, but increase in complexity to the point that the "logic" part is significant is not, I feel.
23:50
<@Derakon>
Well, it's true that when I worked at TripIt (which had a very standard PHP-based MVC setup), the index page's "controller" logic was almost a no-op.
23:51
<@Derakon>
It also didn't have any dynamic content though, aside from the "hello, we know who you are" stuff which was its own module.
23:52
< Namegduf>
You could argue that it sort of does invoke something like "backend" stuff for the real content, because the most complex thing on it is a series of news posts pulled from a forum.
23:53
< Namegduf>
And it uses the forum's provided API for that, which is presumably nicely separated in itself from display logic.
23:53
< Namegduf>
Aside that, though, the dynamic content is literally one SQL query and some echos.
23:53 shade_of_cpux is now known as cpux
23:54
< Namegduf>
It's administrator set, not user set, so there's security issues bypassed there.
23:54
< Namegduf>
(Not that they'd be hard to get right anyway, if it wasn't supposed to be able to contain HTML, which it is)
23:55
< Namegduf>
I guess my point is, if you're not doing anything complex, I feel overengineering is unnecessary. I suppose I agree that a substantial website with a lot of dynamic content qualifies, though.
23:57
<@McMartin>
Ahaha, oh man.
23:57
<@McMartin>
This C# tutorial teaches goto before it teaches for/while.
23:57
< Namegduf>
Oh dear.
23:57
< Namegduf>
I think I understand what they're going for, but that feels misguided.
23:57
<@McMartin>
Yeah
23:57
<@McMartin>
It's funnier because it's C#
23:57
< Namegduf>
Yeah.
23:57
<@Derakon>
Is this a "learn to program in C#" tutorial, or a "learn to program, in C#" tutorial?
23:58
<@McMartin>
Some of both
23:58
< Namegduf>
If you're trying to teach fundamentals of how programming stuff is built up
23:58
<@McMartin>
I'm skimming the latter to get to the former
23:58
< Namegduf>
C# does not feel like the right language to use
23:58
< Namegduf>
That seems like a C job, to me.
23:58
<@Derakon>
Python~
23:58
<@McMartin>
Namegduf: As it happens, here they're doing it because they're doing if and switch before loops
23:58
<@McMartin>
And you can't do switch without break
23:58
<@McMartin>
And break makes a lot more sense if goto is around
23:58
< Namegduf>
Ah.
23:59
<@Derakon>
I would personally have delayed switch until later.
23:59
<@Derakon>
Since you can work around it just fine with chained if statements.
23:59
< Namegduf>
Switch is kinda speciality nowadays, yeah.
23:59
<@Derakon>
Inelegant, sure, but beginners aren't going to write elegant code anyways.
23:59
<@McMartin>
C# switch is pleasingly general.
23:59
< Namegduf>
Ah.
23:59
<@McMartin>
(And is also one reason I'm skimming this early stuff instead of skipping it; it has some extra options for arrays, too)
--- Log closed Sat Apr 10 00:00:23 2010
code logs -> 2010 -> Fri, 09 Apr 2010< code.20100408.log - code.20100410.log >