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
tef
May 30, 2004

-> some l-system crap ->
i'd make a lilliputian reference to big-endian and little-endian, but satire is dead.

http://en.wikipedia.org/wiki/Endianness#Etymology

Adbot
ADBOT LOVES YOU

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

tef posted:

i'd make a lilliputian reference to big-endian and little-endian, but satire is dead.

http://en.wikipedia.org/wiki/Endianness#Etymology

I don't think the joke was lost on the folks who borrowed the terms for computing.

Germstore
Oct 17, 2012

A Serious Candidate For a Serious Time
It's high time that you knew
of the terrible horrible things that Zooks do.
In every Zook house and in every Zoon town
every Zook writes his code
with the braces one line down!

Germstore fucked around with this message at 14:17 on Jul 10, 2013

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I hate all of you for the past 5 pages.

Pilsner
Nov 23, 2002

Why is it that people get upset as soon as a discussion thread (on this discussion forum) runs off the slightest tangent for just as much as a page? It's pretty much guaranteed that some doofus will come in and do those "fictional breadcrumbs" (The Something Awful Forums > Discussion > etc...) with his own witty jab at the current topic of discussion. It's not like this thread is super sacred.

Bunny Cuddlin
Dec 12, 2004

Pilsner posted:

Why is it that people get upset as soon as a discussion thread (on this discussion forum) runs off the slightest tangent for just as much as a page? It's pretty much guaranteed that some doofus will come in and do those "fictional breadcrumbs" (The Something Awful Forums > Discussion > etc...) with his own witty jab at the current topic of discussion. It's not like this thread is super sacred.

It's not that it's a tangent, it's this specific stupid loving lovely pointless argument that has literally been going on since the early 80s without producing anything useful.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Bunny Cuddlin posted:

It's not that it's a tangent, it's this specific stupid loving lovely pointless argument that has literally been going on since the early 80s without producing anything useful.

This is exactly it. Not only is this discussion (and its ilk) pointless, it happens all the time all over the internet and it happens in this very thread every couple of months.

This time we'll come to some sort of resolution, though!

Dren
Jan 5, 2001

Pillbug
People complain and make snide remarks because they tire of waiting for everyone engaged in the discussion to realize they've been fighting windmills and decide to self-impose a limit on their pedantry.

tef posted:

the obvious way is to basically kill anyone who has an opinion on "brace/formatting", because it's basically programmers arguing over their favourite colour.

color

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Dren posted:

People complain and make snide remarks because they tire of waiting for everyone engaged in the discussion to realize they've been fighting windmills and decide to self-impose a limit on their pedantry.


color

You're both wrong:

https://kuler.adobe.com/

Dren
Jan 5, 2001

Pillbug

That thing is sweet!

Rottbott
Jul 27, 2006
DMC

GrumpyDoctor posted:

It seems "obvious" to store your source code in a binary format that needs its own, special editor (or at the very least editor plugin) and source control toolchain?
If you take the exact opposite of what I wrote, yes.

Dicky B
Mar 23, 2004

Bunny Cuddlin posted:

It's not that it's a tangent, it's this specific stupid loving lovely pointless argument that has literally been going on since the early 80s without producing anything useful.
The funny thing is that whenever it's discussed in this thread it's just more or less everybody agreeing with each other that it doesn't actually matter and you should just be consistent, or otherwise making satirical assertions. But without fail the "i didn't read the thread" brigade always marches in at the end to tell us we're all stupid for arguing :allears:

evensevenone
May 12, 2001
Glass is a solid.

GrumpyDoctor posted:

It seems "obvious" to store your source code in a binary format that needs its own, special editor (or at the very least editor plugin) and source control toolchain?

It is kind of funny that after 60 years of development in computer science, we still store source code as hand-edited text files and create these super-complicated parsers just to compile/interpret them. And then to source control them, we have a whole different set of complicated parsing and comparison algorithms, and that we actually choose source control tools based on which on is better at comparing two versions of a text file and merging them.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Honestly, when the alternative is some giant monolithic proprietary system that behaves nothing like any other piece of software, I'll take what we've got on startup time alone.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Dicky B posted:

The funny thing is that whenever it's discussed in this thread it's just more or less everybody agreeing with each other that it doesn't actually matter and you should just be consistent, or otherwise making satirical assertions. But without fail the "i didn't read the thread" brigade always marches in at the end to tell us we're all stupid for arguing :allears:

It's not that you're arguing, it's that it's like a bunch of old people sitting around discussing the weather every day. We all know what the weather was like and what the forecast says. Why do we need to spend 5 pages talking about it?

1337JiveTurkey
Feb 17, 2005

Semi-serious idea: Cut out the middleman and store the parse tree directly in an open format like XML, YAML or JSON. Then have editors use a grammar to display the file for editing and to save the edited file. Use stylesheets to format the displayed source code. If you don't give a gently caress about whitespace, then you might as well have a language that doesn't give a gently caress about whitespace.

qntm
Jun 17, 2009
And then we can express diffs using XSLT!

Qwertycoatl
Dec 31, 2008

1337JiveTurkey posted:

Semi-serious idea: Cut out the middleman and store the parse tree directly in an open format like XML, YAML or JSON. Then have editors use a grammar to display the file for editing and to save the edited file. Use stylesheets to format the displayed source code. If you don't give a gently caress about whitespace, then you might as well have a language that doesn't give a gently caress about whitespace.

The problem with normalised formatting schemes is that people come up with the idea, then as they refine it they make a series of decisions that seemed to make sense at the time, and end up proposing a system that uses XML.

Zombywuf
Mar 29, 2008

1337JiveTurkey posted:

Semi-serious idea: Cut out the middleman and store the parse tree directly in an open format like XML, YAML or JSON. Then have editors use a grammar to display the file for editing and to save the edited file. Use stylesheets to format the displayed source code. If you don't give a gently caress about whitespace, then you might as well have a language that doesn't give a gently caress about whitespace.

Why not store it in an open format like source code and have the editors use a grammar to parse the file then display it for editing.


answer: because of diffing


Anyway, lets talk about strong typing - personally I'm for it.

..btt
Mar 26, 2008

evensevenone posted:

It is kind of funny that after 60 years of development in computer science, we still store source code as hand-edited text files and create these super-complicated parsers just to compile/interpret them. And then to source control them, we have a whole different set of complicated parsing and comparison algorithms, and that we actually choose source control tools based on which on is better at comparing two versions of a text file and merging them.

You realise that it used to be a lot more common to write directly in machine code, right? And that for most of the past 60 years we have been coming up with methods of representing code that make more sense to humans than machines. These things are called "high-level languages" :v:

I honestly like the fact that all I need to write code is a text editor. Even prefer it to heavyweight IDEs with lots of helpful functionality. And I like that I can easily understand the source control system I use because it operates on text files.

e: ^^ I used to think like that, these days I enjoy duck-typing a lot more, it can be far more expressive with a minimal syntax.

raminasi
Jan 25, 2005

a last drink with no ice

qntm posted:

And then we can express diffs using XSLT!

I don't recall most of the details, but I believe there was a talk at a Ruby conference a few years back where some people demonstrated exactly this. It was a joke, but they did have a working implementation of something that would convert a parse tree to XML and then transform it with XSLT.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Pilsner posted:

Why is it that people get upset as soon as a discussion thread (on this discussion forum) runs off the slightest tangent for just as much as a page? It's pretty much guaranteed that some doofus will come in and do those "fictional breadcrumbs" (The Something Awful Forums > Discussion > etc...) with his own witty jab at the current topic of discussion. It's not like this thread is super sacred.

I believe I've posted those exact breadcrumbs at least three times in this thread. The reason I do it is because it has worked every single of those three times to stop the pettiest internet argument I've ever seen that does not need to keep happening every goddamned five months.

gently caress.

Don Mega
Nov 26, 2005

Suspicious Dish posted:

I believe I've posted those exact breadcrumbs at least three times in this thread. The reason I do it is because it has worked every single of those three times to stop the pettiest internet argument I've ever seen that does not need to keep happening every goddamned five months.

gently caress.
You only put 1 space after a new sentence? You need to put 2. Bro.

Edit: It automatically defaults to 1 space! The travesty!

Bunny Cuddlin
Dec 12, 2004

Dicky B posted:

The funny thing is that whenever it's discussed in this thread it's just more or less everybody agreeing with each other that it doesn't actually matter and you should just be consistent, or otherwise making satirical assertions. But without fail the "i didn't read the thread" brigade always marches in at the end to tell us we're all stupid for arguing :allears:

Eat chain, toolbag.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Just probate everyone who continues a tabs v. spaces (or similar) argument beyond the third consecutive reply.

Coffee Mugshot
Jun 26, 2010

by Lowtax

pokeyman posted:

Just probate everyone who continues a tabs v. spaces (or similar) argument beyond the third consecutive reply.

As long as you make sure the probation message is within 80 characters.

b0lt
Apr 29, 2005

Rainbow Pony Deluxe posted:

As long as you make sure the probation message is within 80 characters.

72.

ToxicFrog
Apr 26, 2008


..btt posted:

e: ^^ I used to think like that, these days I enjoy duck-typing a lot more, it can be far more expressive with a minimal syntax.

I used to think like that and then I discovered structural typing with type inference and scope-based implicit conversion.

(Dynamic typing is still alright. Weak typing can get hosed.)

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Depends on your indentation level. Better make sure everyone uses the same one!

Bongo Bill
Jan 17, 2012

1337JiveTurkey posted:

Semi-serious idea: Cut out the middleman and store the parse tree directly in an open format like XML, YAML or JSON. Then have editors use a grammar to display the file for editing and to save the edited file. Use stylesheets to format the displayed source code. If you don't give a gently caress about whitespace, then you might as well have a language that doesn't give a gently caress about whitespace.

Greenspun's Tenth Rule comes to mind.

Opinion Haver
Apr 9, 2007

Have you ever hated the convenience of exceptions having stack traces?

Java code:

public abstract class ReaderException extends Exception {

  ReaderException() {
    // do nothing
  }

  // Prevent stack traces from being taken
  // srowen says: huh, my IDE is saying this is not an override. native methods can't be overridden?
  // This, at least, does not hurt. Because we use a singleton pattern here, it doesn't matter anyhow.
  @Override
  public final Throwable fillInStackTrace() {
    return null;
  }

}

public final class NotFoundException extends ReaderException {

  private static final NotFoundException instance = new NotFoundException();

  private NotFoundException() {
    // do nothing
  }

  public static NotFoundException getNotFoundInstance() {
    return instance;
  }
}

Opinion Haver fucked around with this message at 01:16 on Jul 11, 2013

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

yaoi prophet posted:

Have you ever hated the convenience of exceptions having stack traces?

Java code:

public abstract class ReaderException extends Exception {

  ReaderException() {
    // do nothing
  }

  // Prevent stack traces from being taken
  // srowen says: huh, my IDE is saying this is not an override. native methods can't be overridden?
  // This, at least, does not hurt. Because we use a singleton pattern here, it doesn't matter anyhow.
  @Override
  public final Throwable fillInStackTrace() {
    return null;
  }

}

public final class NotFoundException extends ReaderException {

  private static final NotFoundException instance = new NotFoundException();

  private NotFoundException() {
    // do nothing
  }

  public static NotFoundException getNotFoundInstance() {
    return instance;
  }
}

Why would anyone do this? I mean, if your code needs to be so secure that even stacktraces give away information, just don't enable logging :psyduck:

Foiltha
Jun 12, 2008

Volmarias posted:

Why would anyone do this? I mean, if your code needs to be so secure that even stacktraces give away information, just don't enable logging :psyduck:

Because Java developers.

csammis
Aug 26, 2003

Mental Institution

Volmarias posted:

Why would anyone do this? I mean, if your code needs to be so secure that even stacktraces give away information, just don't enable logging :psyduck:

We once had a minidump faxed to us for debugging purposes. It ended up being 84 pages long. When we asked why they had to fax it the answer was "in case it needs redaction" :psypop:

edit: in case this sounds like I'm recalling a distant memory this happened in March of 2013.

spitefulcrow
Jun 16, 2013
For the Python developers in this thread, some truly horrible things you can do to Python: http://www.slideshare.net/r1chardj0n3s/dont-do-this-24000445.

A brief taste:

code:
>>> def f():
...     print('ohai there!')
...
>>> def g():
...     print('hello, world!')
...
>>> g.__code__ = f.__code__
>>> g()
ohai there!
:doh:

School of How
Jul 6, 2013

quite frankly I don't believe this talk about the market

spitefulcrow posted:

For the Python developers in this thread, some truly horrible things you can do to Python: http://www.slideshare.net/r1chardj0n3s/dont-do-this-24000445.

A brief taste:

code:
>>> def f():
...     print('ohai there!')
...
>>> def g():
...     print('hello, world!')
...
>>> g.__code__ = f.__code__
>>> g()
ohai there!
:doh:

How is that any more horrible than this?

code:
>>> def f():
...     print('ohai there!')
...
>>> def g():
...     print('hello, world!')
...
>>> g = f
>>> g()
ohai there!

spitefulcrow
Jun 16, 2013

DAT NIGGA HOW posted:

How is that any more horrible than this?

code:
>>> def f():
...     print('ohai there!')
...
>>> def g():
...     print('hello, world!')
...
>>> g = f
>>> g()
ohai there!

Because your snippet merely reassigns to the name 'g' in the current namespace, whereas the original overwrites the code object stored on the function object named g? There's just about no reason for anything that isn't Python itself or a framework (test harness, profiler, etc.) to be doing such trickery. Read the rest of the slides for how to do truly gross things with this.

EssOEss
Oct 23, 2006
128-bit approved

Fixed your link

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



spitefulcrow posted:

Because your snippet merely reassigns to the name 'g' in the current namespace, whereas the original overwrites the code object stored on the function object named g? There's just about no reason for anything that isn't Python itself or a framework (test harness, profiler, etc.) to be doing such trickery. Read the rest of the slides for how to do truly gross things with this.

"Languages that have first class functions and decent reflection support can do crazy poo poo if you really want them to :supaburn:"? As someone who's been using JavaScript for years, I'd just like to say: you don't loving say.

Intentionally being horrible can be pretty interesting, but it's not nearly as funny as, say, 10gen's decision to eat some error 90% of the time.

Edit: or that example from Ruby where something in a conditional block that wasn't executed changing the surrounding scope (or something like that - it was a couple months back, I think) and maybe that was only surprising because I haven't learned Ruby yet.

Munkeymon fucked around with this message at 16:36 on Jul 11, 2013

Adbot
ADBOT LOVES YOU

Dren
Jan 5, 2001

Pillbug
I'd just like to say, even if I've said it before, gently caress #define.

I keep running into C libraries where something is #define'd that fucks up the STL if I try to use them in C++.

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