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
Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Xarn posted:

Good thing you use CI and the commit never made it anywhere important.

when interviewing for a team, make sure "we use CI" doesn't have an asterix (e.g. "we use CI for the BUILD process itself, but we wrote our own bespoke installer for the product using thousands of lines of powershell which doesn't use CI because it takes TOO LONG to create the installer for it to use CI")

Adbot
ADBOT LOVES YOU

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

i'd prefer the government just put something in the water to make people too stupid to use this vulnerability properly rather than have another round of spectre "patches" which are really "let's just make current generation cpus perform worse to mitigate attacks that sound cool but haven't really exploited in the wild even to this day."

Munkeymon
Aug 14, 2003

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



Obfuscation posted:

I've always thought that git commit messages should be like mini-branches in themselves, so you could push changes to old commit messages if a need arises

There's no way that this could cause any kind of complications, imo


Varchar(MAX) is several gigabytes in mssql, I know this because of... reasons

Silly me for assuming all these years that max was just an alias for the largest number you can use in the column spec

Dylan16807
May 12, 2010

xtal posted:

It seems plainly intuitive that you can't have speculative execution that's worth anything without also leaking data on side channels
If you decide that your goal is to prevent side channel leaks between processes, the attack surface isn't insurmountably huge. Step one, don't speculate across user<->kernel transitions. This is easy to implement and doesn't impact performance much. Step two, don't leak data via caches. This is a hard problem, but it has at least one obvious solution of "don't write to the [normal] cache until the execution stops being speculative". Implementing a solution like that is a lot of work, especially if you're trying to compete with insecure chips, but it's definitely doable and will still have a huge performance advantage over a chip that doesn't speculate.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Are you that confident that nobody can build a timing oracle based on whether or not speculatively-executed code is competing for the memory bus at all?

Dylan16807
May 12, 2010

Jabor posted:

Are you that confident that nobody can build a timing oracle based on whether or not speculatively-executed code is competing for the memory bus at all?

The simplest answer is that you could block speculative code from touching memory at all, and it would still be much better than not speculating.

I briefly considered memory contention earlier but mostly categorized it as a problem that'll exist even without speculation. Maybe that was too hasty.

I could also see some timing trick with execution ports but having the right scheduling priorities can make each new speculation invisible to previous code.

repiv
Aug 13, 2009

The NASDAQ broke because Berkshire Hathaway stock got too expensive to fit in a 32 bit integer

https://markets.businessinsider.com/news/stocks/warren-buffett-berkshire-hathaway-stock-price-near-maximum-allowed-nasdaq-2021-5-1030397626

repiv fucked around with this message at 22:44 on May 6, 2021

qsvui
Aug 23, 2003
some crazy thing
:piss:

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

sorry warren, 2000 is what it says on the screen

I would blow Dane Cook
Dec 26, 2008
I remember reading stories about Warren Buffet never wanting to split the Berkshire Hathaway stock, I would never have guessed this is what he had in mind.

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

I would blow Dane Cook posted:

I remember reading stories about Warren Buffet never wanting to split the Berkshire Hathaway stock, I would never have guessed this is what he had in mind.

Some people just want to watch the world burn

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
I wonder how long before it happened the people at Nasdaq realised this was going to be a problem

Cause that article says it's about to happen. So it was clearly anticipated by some people before it actually happened. But if they'd anticipated it in good time they wouldn't actually be bumping up against the limit and crunching to get a fix out. I wonder who sent an email saying "uh, do you realise..." and when

I would blow Dane Cook
Dec 26, 2008
I have no idea what the NASDAQ runs on but I imagine it's bespoke, ancient and involves a mainframe of some kind. Probably a pain in the arse to fix this one.

repiv
Aug 13, 2009

I wonder if they're pleading with Buffet to just split the drat stock so they don't have to do a massive system overhaul just for the sake of his company

Ola
Jul 19, 2004

Buffet overflow.

Absurd Alhazred
Mar 27, 2010

by Athanatos

Ola posted:

Buffet overflow.

:pusheen:

nielsm
Jun 1, 2009



I would blow Dane Cook posted:

I have no idea what the NASDAQ runs on but I imagine it's bespoke, ancient and involves a mainframe of some kind. Probably a pain in the arse to fix this one.

It's also about the protocols used by all the connected trading systems, like the margin traders who optimize for CPU cycles to beat out competitors in buying and selling.

OddObserver
Apr 3, 2009

I would blow Dane Cook posted:

I have no idea what the NASDAQ runs on but I imagine it's bespoke, ancient and involves a mainframe of some kind. Probably a pain in the arse to fix this one.

They use 32-bit integers and not like 8-digit decimals or something so it can't be anything too strange?

more falafel please
Feb 26, 2005

forums poster

OddObserver posted:

They use 32-bit integers and not like 8-digit decimals or something so it can't be anything too strange?

That doesn't mean it would be easy to change. No telling how many places in that codebase just assume price is always a uint32.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
We also get to see who's still on a system that can't handle the 2k38 bug.

Kazinsal
Dec 13, 2011


They are *definitely* doing something horrible like packing stock ID, price, timestamp, and flags into four 32-bit words for maximum performance. All the data you "need" in sixteen bytes on the wire, which is conveniently also an even fraction of an x86 cache line.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Gotta go fast.

It'd be absolutely hilarious if this ends up wrecking high frequency traders, but given that NYSE isn't reported to have a similar issue, I'd be surprised if it does.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
Knocking 4 bytes off a 16 byte message that you’re going to transmit a few billion times a second is pretty good, actually.

The wire format should handle larger numbers gracefully, just like it presumably handles irregular messages like new/halted/removed listings, but it’s weird to act like this is some crazy optimization.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
even if the wire format is specced to handle larger numbers in some way, if this is the first time it's come up there's a good chance a lot of the actual implementations won't do it correctly

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


I think we're on our second "uh oh, gonna run out of ints in the database " problem at work, I can't remember if this time we're running out of negative ints because the "fix" the first time was to use those.

Xik
Mar 10, 2011

Dinosaur Gum
The real answer is that this hasn't been required in the past and technical debt isn't covered by any particular business unit/team so why would anyone have used their budget to bankroll it's development.

repiv
Aug 13, 2009

also it's only a problem because warren buffett is stubborn, as far as i can tell no other stock is even remotely close to the limit

maybe their plan was to hope buffett died before it became a problem

Foxfire_
Nov 8, 2010

It's entirely reasonable for NASDAQ to have a well defined minimum, maximum, and resolution for prices in their system. Requiring arbitrary precision math everywhere would probably not have made a more reliable system.

Making prices be a count of # of $0.0001 so that the expressible price range is $0 to $429,496.73 seems like a defensible choice for a practical system. If I were in charge of NASDAQ, I would be tempted to just say "We're not going to allow a contract on our exchange with a higher per-share price. Split to make your price cheaper or accept a price limit". Like they already don't allow a pricing things in $0.00005 increments.

redleader
Aug 18, 2005

Engage according to operational parameters

Foxfire_ posted:

If I were in charge of NASDAQ, I would be tempted to just say "We're not going to allow a contract on our exchange with a higher per-share price. Split to make your price cheaper or accept a price limit". Like they already don't allow a pricing things in $0.00005 increments.

but that would make one rich person feel bad

Carbon dioxide
Oct 9, 2012

rjmccall posted:

Knocking 4 bytes off a 16 byte message that you’re going to transmit a few billion times a second is pretty good, actually.

The wire format should handle larger numbers gracefully, just like it presumably handles irregular messages like new/halted/removed listings, but it’s weird to act like this is some crazy optimization.

So I learned something recently.

File attachments in e-mails are just base-64 encoded since e-mails were originally specced to just send texts, and can't deal with non-printable ASCII characters.

Apparently early pdf came up with a base-85 or something encoding for pdf attachments in mail. That works, there's plenty of printable ASCII characters to deal with that. Conversion is rather annoying because you got 6-and-a-fraction bits per character but you can make it work. And it reduces the final e-mail size.

Until it turned out that these additional ASCII characters got hosed up if the e-mail went through any EBCDIC system along the way and the entire pdf got corrupted. When that was realized, e-mail client coders decided to base-64 encode the base-85 encoded pdf which means you lose all benefits and worse.

That's when Adobe decided to get rid of the base-85 encoding scheme.

Dylan16807
May 12, 2010

Carbon dioxide posted:

So I learned something recently.

File attachments in e-mails are just base-64 encoded since e-mails were originally specced to just send texts, and can't deal with non-printable ASCII characters.

Apparently early pdf came up with a base-85 or something encoding for pdf attachments in mail. That works, there's plenty of printable ASCII characters to deal with that. Conversion is rather annoying because you got 6-and-a-fraction bits per character but you can make it work. And it reduces the final e-mail size.

Until it turned out that these additional ASCII characters got hosed up if the e-mail went through any EBCDIC system along the way and the entire pdf got corrupted. When that was realized, e-mail client coders decided to base-64 encode the base-85 encoded pdf which means you lose all benefits and worse.

That's when Adobe decided to get rid of the base-85 encoding scheme.

I guess it's a matter of perspective, because I'd say that base85 is easier to convert. It does 4 bytes at a time and uses a contiguous block of 85 characters. To me, that more than makes up for having to multiply and divide instead of shift left and right.

Carbon dioxide
Oct 9, 2012

Dylan16807 posted:

I guess it's a matter of perspective, because I'd say that base85 is easier to convert. It does 4 bytes at a time and uses a contiguous block of 85 characters. To me, that more than makes up for having to multiply and divide instead of shift left and right.

Ah yes, that works. I hadn't looked up those specifics.

Hammerite
Mar 9, 2007

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

redleader posted:

but that would make one rich person feel bad

If they extend the system to support prices higher than the current maximum but introduce a bug which fucks everything up, that could lead to many rich people feeling bad. So even if their sole objective is to keep the rich people happy, they might be better off telling Warren Buffet no.

Impotence
Nov 8, 2010
Lipstick Apathy
not allowed to link to third party files or upload a file? no problem!



:psyduck:

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Biowarfare posted:

not allowed to link to third party files or upload a file? no problem!



:psyduck:

That's brilliant.

And I even use the data scheme sometimes in the address bar to test some little html thing, so I have no excuse for not thinking of using it in a script element!

Absurd Alhazred
Mar 27, 2010

by Athanatos

Biowarfare posted:

not allowed to link to third party files or upload a file? no problem!



:psyduck:

Walk me through this like I'm a little baby (because I am in this context, I don't do web dev).

Space Gopher
Jul 31, 2006

BLITHERING IDIOT AND HARDCORE DURIAN APOLOGIST. LET ME TELL YOU WHY THIS SHIT DON'T STINK EVEN THOUGH WE ALL KNOW IT DOES BECAUSE I'M SUPER CULTURED.

Absurd Alhazred posted:

Walk me through this like I'm a little baby (because I am in this context, I don't do web dev).

Somebody needed to add a bit of javascript to a web page for click tracking or something.

The classic way to do this, dating back to Netscape Navigator, is to just throw some JS on the page wrapped up in script tags. But, that's frequently blacklisted with content security policies these days, because writing script tags to the page is the source of most cross-site scripting vulnerabilities.

So, normally, what you'd do there is just put in a script tag that refers to an external file hosted in a CDN somewhere, and whitelist your approved script sources in the content security policy*. But, the dev here is not allowed to modify the main source bundle for the page or upload any new files to the approved script-storage-place. They're just allowed to edit the HTML or whatever template generates it, I guess. So, no good way to add the script they need.

But! They can define a URL for whatever external source they want. And, there's a way to specify a URL with the "data" schema that basically tells the client "actually, this isn't a network resource, here's the data for the response right here." It's pretty common for things like loading up some 32x32 pixel PNG, where it's more performant to just include a base64-encoded version of the file than it is to run a whole new network request. And, although you'd normally see something like base64 in that data schema, you can totally also pass in a javascript file. So - put a script tag on the page, tell it that it's coming from an external source, but then have that "external source" be a URL that just wraps the embedded source you needed to use in the first place.

*something which was not done here - they just blacklisted on-page script tags, I think

Absurd Alhazred
Mar 27, 2010

by Athanatos

Space Gopher posted:

Somebody needed to add a bit of javascript to a web page for click tracking or something.

The classic way to do this, dating back to Netscape Navigator, is to just throw some JS on the page wrapped up in script tags. But, that's frequently blacklisted with content security policies these days, because writing script tags to the page is the source of most cross-site scripting vulnerabilities.

So, normally, what you'd do there is just put in a script tag that refers to an external file hosted in a CDN somewhere, and whitelist your approved script sources in the content security policy*. But, the dev here is not allowed to modify the main source bundle for the page or upload any new files to the approved script-storage-place. They're just allowed to edit the HTML or whatever template generates it, I guess. So, no good way to add the script they need.

But! They can define a URL for whatever external source they want. And, there's a way to specify a URL with the "data" schema that basically tells the client "actually, this isn't a network resource, here's the data for the response right here." It's pretty common for things like loading up some 32x32 pixel PNG, where it's more performant to just include a base64-encoded version of the file than it is to run a whole new network request. And, although you'd normally see something like base64 in that data schema, you can totally also pass in a javascript file. So - put a script tag on the page, tell it that it's coming from an external source, but then have that "external source" be a URL that just wraps the embedded source you needed to use in the first place.

*something which was not done here - they just blacklisted on-page script tags, I think

Oh, wow! That's interesting. Thanks!

Khorne
May 1, 2002

pokeyman posted:

That's brilliant.

And I even use the data scheme sometimes in the address bar to test some little html thing, so I have no excuse for not thinking of using it in a script element!
It's brilliant until a few weeks or years later when it gets blacklisted by chrome or fails an audit.

Adbot
ADBOT LOVES YOU

Nalin
Sep 29, 2007

Hair Elf
Why can't you just inline the script like normal?

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