Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
defmacro
Sep 27, 2005
cacio e ping pong

biznatchio posted:

Well I think sheds should be painted blue.

You would you goddamn hippie.

Adbot
ADBOT LOVES YOU

defmacro
Sep 27, 2005
cacio e ping pong

Victor posted:

Clearly, return is a function. :psyduck:

For what it's worth, I have a hunch this was how it was originally written back when C was very young as evidenced by it appearing in UNIX Version 6. I could be wrong, but I knew I'd seen return treated as a function somewhere reputable before.

defmacro
Sep 27, 2005
cacio e ping pong
:shroom::shroom::shroom:

Mikey-San posted:

meh

Thanks

defmacro fucked around with this message at 15:42 on Apr 8, 2008

defmacro
Sep 27, 2005
cacio e ping pong

Mikey-San posted:

No no, it wasn't in response to anyone. I posted something, realized I spoke too quickly and the post was bad, and removed it. That's all. I would've just deleted the post if I could've.

No problem, I just like being mean :(.

To contribute, I recently found this and almost spit out my drink laughing.
code:
                                // QUERY EXECUTION
// the FROM field starts with ", "...take it out
//if (varsToTable.size() > 0) 

//  BBB  U  U  GGG
//  B  B U  U G
//  BBB  U  U G GG
//  B  B U  U G  G
//  BBB   UU   GG
//
// more code

defmacro
Sep 27, 2005
cacio e ping pong

rotor posted:

I don't understand how this is supposed to be especially awful for what is, I assume, supposed to be an in-class example or something.

It's GUI code and no one likes writing GUIs? :hellyeah: <--- (this smiley shows how insanely clever I am, fyi)

defmacro
Sep 27, 2005
cacio e ping pong
I saw this in some research code recently:
code:
if (integer % 1 == 0) { ... 
Pretty sure it started as something other than 1, but it certainly made me chuckle.

defmacro
Sep 27, 2005
cacio e ping pong

yaoi prophet posted:

Not to mention, what the gently caress is up with #?

At least one other language, Clojure, uses # as a reader macro for declaring anonymous functions, the following two expressions are equivalent:
code:
user=> (map (fn [x] (* x x)) [1 2 3 4])
(1 4 9 16)
user=> (map #(* % %) [1 2 3 4])
(1 4 9 16)
% is used for an argument if there is only one and %1, %2, ..., %n are used for multiple arguments. Quite succinct syntax... not so much for Java unfortunately.

defmacro
Sep 27, 2005
cacio e ping pong

Incoherence posted:

And then you read your automata theory textbook a little more closely and discover that regexps in the sense that most languages use them do not fit under the formal definition of "regular expressions". So... maybe that's not such a good idea.

The formal definitions offer great approximations of how they're used in practice. You learn about what, lazy/greedy matches and backreferences and you're all set? Do you honestly think understanding formal languages will somehow make it harder to learn regular expressions?

defmacro
Sep 27, 2005
cacio e ping pong
part of the problem is there's a shitload of CS PhDs relative to other fields and they can't all get faculty jobs so they gotta end up somewhere. doesn't help that the code they wrote really only needs to work once for the paper.

Adbot
ADBOT LOVES YOU

defmacro
Sep 27, 2005
cacio e ping pong

raminasi posted:

Hell, that's any academic programming. The standard of correctness for research code is "has to generate at least one result set, once, that looks superficially plausible to a credulous supervisor and two or three reviewers of varying skepticism." That's it. It's a really bad state of affairs.

it's definitely better in some fields. it seems like statisticians slap their R monsters on CRAN pretty readily. and security is starting to improve at the big paper venues by giving more credit for open data/code.

but yeah the bar is super low.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply