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
hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Absurd Alhazred posted:

Your future coding horror: making sure your Python code is Unicode 9.0-compatible.

U+1F926... U+1F923. U+1F937

e: ffs microsoft (google?) a kayak is not a canoe :argh:

hackbunny fucked around with this message at 09:12 on Jun 22, 2016

Adbot
ADBOT LOVES YOU

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
dont mutate variables

dont share memory

strength in purity

Coffee Mugshot
Jun 26, 2010

by Lowtax

Malcolm XML posted:

dont mutate variables

dont share memory

strength in purity

this is a weird way to endorse Rust

Munkeymon
Aug 14, 2003

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



hackbunny posted:

U+1F926... U+1F923. U+1F937

e: ffs microsoft (google?) a kayak is not a canoe :argh:

Google, I think

Skyl3lazer
Aug 27, 2007

[Dooting Stealthily]



1337JiveTurkey posted:

If I had a time machine, the second thing after killing Hitler would be telling the Postscript development team that the only people who want a Turing complete print format are hackers and the people who think it's cute to poo poo up the office printer for an hour while it dynamically computes an arbitrarily zoomed portion of the Mandelbrot set.

This is probably my favorite PDF related thing I've seen since realizing that no PDF libraries in C# had a way to calculate pixel density, leaving you to guesstimate using point -> pixel*inches converters.

Tad Naff
Jul 8, 2004

I told you you'd be sorry buying an emoticon, but no, you were hung over. Well look at you now. It's not catching on at all!
:backtowork:

1337JiveTurkey posted:

If I had a time machine, the second thing after killing Hitler would be telling the Postscript development team that the only people who want a Turing complete print format are hackers and the people who think it's cute to poo poo up the office printer for an hour while it dynamically computes an arbitrarily zoomed portion of the Mandelbrot set.

I took Topics in Geometry (late 90s) and no kidding we did all of our assignments and projects in raw PostScript.

Tad Naff fucked around with this message at 19:07 on Jun 22, 2016

ExcessBLarg!
Sep 1, 2001
PostScript made a lot of sense back when the office printer was the more powerful (faster and had more RAM) than desktop computers.

The practical problem with PostScript is that its Turing-completeness and global state meant that documents had to be interpreted sequentially, which is fine if you're going to print the entire document, but less fine if you're only going to print a few pages or need to view it on your computer.

PDF was created to addresses these challenges and make page description languges viable for screen viewing on early 90s PCs. Thus the format allows for random access of pages without having to load the entire document into memory, append-to-end modification of document contents, and other slow-PC-accommodating features. Then they added JavaScript and XML.

ExcessBLarg! fucked around with this message at 15:23 on Jun 23, 2016

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?
Why do people keep looking at things and thinking "you know what this needs? Javascript"

Joda
Apr 24, 2010

When I'm off, I just like to really let go and have fun, y'know?

Fun Shoe
Probably because every browser and their mum supports JavaScript, so it's the easiest way (at least shot-term) to reach the most consumers possible with your product.

tyrelhill
Jul 30, 2006
Cause its widely used

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
Cause it was the 90s and it was all about interactivity and multimedia and "the web" and embedding midi files in documents. A time before infosec was invented and people had any concept of permissions and arbitrary code execution. A more naive time. A better time.

boo_radley
Dec 30, 2005

Politeness costs nothing

YeOldeButchere posted:

Cause it was the 90s and it was all about interactivity and multimedia and "the web" and embedding midi files in documents. A time before infosec was invented and people had any concept of permissions and arbitrary code execution. A more naive time. A better time.

I'd rather use midi to manage my infrastructure than JavaScript.

Dr. Stab
Sep 12, 2010
👨🏻‍⚕️🩺🔪🙀😱🙀

Joda posted:

Probably because every browser and their mum supports JavaScript, so it's the easiest way (at least shot-term) to reach the most consumers possible with your product.

That still doesn't explain node.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

boo_radley posted:

I'd rather use midi to manage my infrastructure than JavaScript.

I legitimately don't know the use case for node or understand why anyone would want it or decide it was a good idea to create.

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

leper khan posted:

I legitimately don't know the use case for node or understand why anyone would want it or decide it was a good idea to create.

https://twitter.com/shit_hn_says/status/234856345579446272

xzzy
Mar 5, 2009

I've never used node but my impression is it was the result of someone figuring that since javascript is so drat awesome on the client side, surely it would be even more awesome to run it on a server.

In general I support the idea of not using php, but javascript is an even worse choice.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

Oh my god, how have I never known about this twitter account? This is amazing.

edit:
"Paul Graham has never once mentioned monads. If they're useful, you'd think one of the best hackers would have said something about it."

"Am I the only person that gets annoyed when I read "an order of magnitude" and the article doesn't mention whether it’s binary or decimal"

"Syntax highlighting is less common in the Go community since Rob Pike called syntax highlighting juvenile"

"Most of the time my phone is more important than the discardable conversation happening over a meal."

i'm dying

Bognar fucked around with this message at 22:20 on Jun 22, 2016

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

Skyl3lazer posted:

This is probably my favorite PDF related thing I've seen since realizing that no PDF libraries in C# had a way to calculate pixel density, leaving you to guesstimate using point -> pixel*inches converters.

My favorite PDF thing is that PDF also includes PostScript. Oh and it auto-executes JavaScript and has AJAX support. And until recently you could communicate arbitrarily with JS in the browser or across PDF documents. You can also define arbitrarily different representations for the screen and printer. Let's see... What else?

Acrobat will parse a PDF as long as it finds the header in the first 1k of the file. It gives no shits about making sure the object ToC actually matches up with the object delimiters in the file so you can slap all kinds of mangled poo poo into a PDF and it will parse. This is how you create ZIP files that are also valid PDFs. Stuff the PDF headers and JavaScript exploits in ZIP metadata and laugh as it all disappears on unzipping. Exploit file extension vs MIME types to confuse filters and scanners.

PDF is a dumpster fire.

Joda
Apr 24, 2010

When I'm off, I just like to really let go and have fun, y'know?

Fun Shoe
Who/What is HN?

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

Joda posted:

Who/What is HN?

https://news.ycombinator.com/

lord funk
Feb 16, 2004

Joda posted:

Who/What is HN?

Human Nutella

tyrelhill
Jul 30, 2006

Bognar posted:

Oh my god, how have I never known about this twitter account? This is amazing.

quote:

Ironically, I most likely wouldn't hire Kernighan or Ritchie because of their poor programming style.

gently caress yea

Evil_Greven
Feb 20, 2007

Whadda I got to,
whadda I got to do
to wake ya up?

To shake ya up,
to break the structure up!?

NihilCredo posted:

You're right. I fixed it.

code:
for(int i = 20 * !!x; i < 20; i++) {

}

It's beautiful.

Bongo Bill
Jan 17, 2012

Node was invented by someone who was looking for ideas for things to do with Javascript, and he misunderstood them when they told him to cram it in his backend.

canis minor
May 4, 2011

The payment gateway I'm implementing right now uses JS to generate payment tokens - as, user puts in their credit card on my site, payment JS library (that I include on my site) communicates with the payment gateway and gives me a token.

Their example doesn't work as well, so I guess it's going to be a day :allears:

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Bognar posted:

Oh my god, how have I never known about this twitter account? This is amazing.

edit:
"Paul Graham has never once mentioned monads. If they're useful, you'd think one of the best hackers would have said something about it."

"Am I the only person that gets annoyed when I read "an order of magnitude" and the article doesn't mention whether it’s binary or decimal"

"Syntax highlighting is less common in the Go community since Rob Pike called syntax highlighting juvenile"

"Most of the time my phone is more important than the discardable conversation happening over a meal."

i'm dying

I'm partial to "Correct code in C is actually easy since the language is very simple" and "I can't help but think that reference counting has pretty much killed garbage collection"

e: "If you are hiring for a job that requires the top 1% of intelligence, it is no surprise that you are going to have more men than women."

Hammerite fucked around with this message at 12:37 on Jun 23, 2016

Munkeymon
Aug 14, 2003

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



Ender.uNF posted:

Acrobat will parse a PDF as long as it finds the header in the first 1k of the file. It gives no shits about making sure the object ToC actually matches up with the object delimiters in the file so you can slap all kinds of mangled poo poo into a PDF and it will parse. This is how you create ZIP files that are also valid PDFs. Stuff the PDF headers and JavaScript exploits in ZIP metadata and laugh as it all disappears on unzipping. Exploit file extension vs MIME types to confuse filters and scanners.

Speaking of dumpster fires, IE did the same thing with text files and <html>. Or maybe just <? It's been a few years.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
A big IE security horror of the past has been autodetecting the character encoding. So what you thought was perfectly safe escaped ascii text rendered back into your HTML actually gets interpreted as UTF-7 and turns into an easy XSS.

hyphz
Aug 5, 2003

Number 1 Nerd Tear Farmer 2022.

Keep it up, champ.

Also you're a skeleton warrior now. Kree.
Unlockable Ben
A certain rather good PDF generator has a trial version which puts a logo in the corner of the page.

But it writes proper, vector, unencoded PDFs. Pop them open in a text editor, remove a block and bye bye logo.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Is this approach to dependency injection considered a horror?

code:
final Agent agent = new Agent.Iterative(
  new Array<Agent>(
    new Understands(
      this.github,
      new QnSince(
        49092213,
        new QnReferredTo(
          this.github.users().self().login(),
          new QnParametrized(
            new Question.FirstOf(
              new Array<Question>(
                new QnIfContains("config", new QnConfig(profile)),
                new QnIfContains("status", new QnStatus(talk)),
                new QnIfContains("version", new QnVersion()),
                new QnIfContains("hello", new QnHello()),
                new QnIfCollaborator(
                  new QnAlone(
                    talk, locks,
                    new Question.FirstOf(
                      new Array<Question>(
                        new QnIfContains(
                          "merge",
                          new QnAskedBy(
                            profile,
                            Agents.commanders("merge"),
                            new QnMerge()
                          )
                        ),
                        new QnIfContains(
                          "deploy",
                          new QnAskedBy(
                            profile,
                            Agents.commanders("deploy"),
                            new QnDeploy()
                          )
                        ),
                        new QnIfContains(
                          "release",
                          new QnAskedBy(
                            profile,
                            Agents.commanders("release"),
                            new QnRelease()
                          )
                        )
                      )
                    )
                  )
                )
              )
            )
          )
        )
      )
    ),
    new StartsRequest(profile),
    new RegistersShell(
      "b1.rultor.com", 22,
      "rultor",
      IOUtils.toString(
        this.getClass().getResourceAsStream("rultor.key"),
        CharEncoding.UTF_8
      )
    ),
    new StartsDaemon(profile),
    new KillsDaemon(TimeUnit.HOURS.toMinutes(2L)),
    new EndsDaemon(),
    new EndsRequest(),
    new Tweets(
      this.github,
      new OAuthTwitter(
        Manifests.read("Rultor-TwitterKey"),
        Manifests.read("Rultor-TwitterSecret"),
        Manifests.read("Rultor-TwitterToken"),
        Manifests.read("Rultor-TwitterTokenSecret")
      )
    ),
    new CommentsTag(this.github),
    new Reports(this.github),
    new RemovesShell(),
    new ArchivesDaemon(
      new ReRegion(
        new Region.Simple(
          Manifests.read("Rultor-S3Key"),
          Manifests.read("Rultor-S3Secret")
        )
      ).bucket(Manifests.read("Rultor-S3Bucket"))
    ),
    new Publishes(profile)
  )
);

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

Munkeymon posted:

Speaking of dumpster fires, IE did the same thing with text files and <html>. Or maybe just <? It's been a few years.

All browsers are pretty drat lenient with incorrect HTML syntax. They'll try their best to piece it together, even though it won't come out as it was probably intended to.

xzzy
Mar 5, 2009

Which is caused by the specification specifically allowing some block elements to not have a closing tag.

From a human perspective it makes sense that a second <p> tag implicitly closes the previous paragraph, but it's still stupid to permit it. What's the point of rules if you don't have to follow them. :colbert:

Klades
Sep 8, 2011

rt4 posted:

Is this approach to dependency injection considered a horror?

code:
loving christ

:dogbutton:

I wouldn't call "just pass the object it needs as a constructor argument" a horror.
I would definitely call that constructor a horror.

Munkeymon
Aug 14, 2003

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



fishmech posted:

All browsers are pretty drat lenient with incorrect HTML syntax. They'll try their best to piece it together, even though it won't come out as it was probably intended to.

I mean it decided to change the MIME type based on finding something that looked like HTML in a text/text file with a .txt extension.

Suspicious Dish
Sep 24, 2011

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

Ender.uNF posted:

My favorite PDF thing is that PDF also includes PostScript. Oh and it auto-executes JavaScript and has AJAX support. And until recently you could communicate arbitrarily with JS in the browser or across PDF documents. You can also define arbitrarily different representations for the screen and printer. Let's see... What else?

Acrobat will parse a PDF as long as it finds the header in the first 1k of the file. It gives no shits about making sure the object ToC actually matches up with the object delimiters in the file so you can slap all kinds of mangled poo poo into a PDF and it will parse. This is how you create ZIP files that are also valid PDFs. Stuff the PDF headers and JavaScript exploits in ZIP metadata and laugh as it all disappears on unzipping. Exploit file extension vs MIME types to confuse filters and scanners.

PDF is a dumpster fire.

Rosetta Flash is one of the best hacks I have ever seen.

https://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/

spiritual bypass
Feb 19, 2008

Grimey Drawer

Klades posted:

:dogbutton:

I wouldn't call "just pass the object it needs as a constructor argument" a horror.
I would definitely call that constructor a horror.

Same here. If that section of code was more readable, I'd say it's a good approach. Instantiating each object with a variable name instead of trying to be clever would do better to convince others to adopt the approach.

TheresaJayne
Jul 1, 2011
after my current piece of work i need to look at an aspx page that has a problem. It populates 2 tree lists, using Javascript and if you have more than 10 items in the main list - it can take up to 10 minutes per click on the page.

vb.net for one mark against it,
Logic in View layer (JS) and
apparently all the internal web services are full soap services rather than partial commits....

boo_radley
Dec 30, 2005

Politeness costs nothing

Klades posted:

:dogbutton:

I wouldn't call "just pass the object it needs as a constructor argument" a horror.
I would definitely call that constructor a horror.

A lot of that hot trash fuckfest looks like it could be mitigated by composing parameters rather than new-ing up a huge array in the middle of your constructor.

canis minor
May 4, 2011

hyphz posted:

A certain rather good PDF generator has a trial version which puts a logo in the corner of the page.

But it writes proper, vector, unencoded PDFs. Pop them open in a text editor, remove a block and bye bye logo.

I've had to do that recently (but in my case it was removing text from existing PDF files) - qpdf is a lifesaver when your PDF is compressed / malformed.

Suspicious Dish posted:

Rosetta Flash is one of the best hacks I have ever seen.

https://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/

This one is just... wow, quite imaginative.

canis minor fucked around with this message at 19:27 on Jun 23, 2016

Adbot
ADBOT LOVES YOU

raminasi
Jan 25, 2005

a last drink with no ice

The difference between "unintelligible Java" and "an undocumented DSL" is just a matter of perspective :v:

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