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
Beef
Jul 26, 2004
Clearly they should be using an unsigned int

Adbot
ADBOT LOVES YOU

Jazerus
May 24, 2011


Beef posted:

Clearly they should be using an unsigned int

but what if they had to represent a BC date???

BigPaddy
Jun 30, 2008

That night we performed the rite and opened the gate.
Halfway through, I went to fix us both a coke float.
By the time I got back, he'd gone insane.
Plus, he'd left the gate open and there was evil everywhere.


Of course it is anti virus :v:

Beef
Jul 26, 2004

Jazerus posted:

but what if they had to represent a BC date???

I tested it with today's date and it works, I don't see what the problem is. Can you point me to a specific customer that has that problem? Closing ticket.

Joda
Apr 24, 2010

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

Fun Shoe
What? We need a fully compatible solution. We should count picoseconds from the big bang and until the most optimistic estimate for how old the universe will be. Anything less and we'll live to regret it.

Ranzear
Jul 25, 2013

A 128bit unsigned int would store that pretty easily.

Foxfire_
Nov 8, 2010

Joda: picoseconds ought to be good enough for anyone
Particle and astrophysicists: *cries*

Dylan16807
May 12, 2010

Foxfire_ posted:

Joda: picoseconds ought to be good enough for anyone
Particle and astrophysicists: *cries*

Have fun calibrating an absolute timestamp to anything tighter.

Though if we follow timespec's lead we'd probably have a 64 bit seconds field, a nanoseconds field, and an attoseconds field.

eth0.n
Jun 1, 2012

Dylan16807 posted:

Have fun calibrating an absolute timestamp to anything tighter.

Though if we follow timespec's lead we'd probably have a 64 bit seconds field, a nanoseconds field, and an attoseconds field.

Planck time units or bust.

BigPaddy
Jun 30, 2008

That night we performed the rite and opened the gate.
Halfway through, I went to fix us both a coke float.
By the time I got back, he'd gone insane.
Plus, he'd left the gate open and there was evil everywhere.


Can’t wait for processors to be advertised by planck lengths.

1337JiveTurkey
Feb 17, 2005

At some point the distances relative to the amount of time measured just smear everything into a meaningless blur. Light travels about one foot in a nanosecond so at the datacenter scale, nanosecond level measurements if actually accurate turn into godawful physics homework problems.

Light travels about 186 miles in a millisecond so millisecond level measurements are getting blurry between datacenters or between a datacenter and a client even if both have "the same" clock as observed from a non-moving frame of reference exactly between them.

lifg
Dec 4, 2000
<this tag left blank>
Muldoon

1337JiveTurkey posted:

At some point the distances relative to the amount of time measured just smear everything into a meaningless blur. Light travels about one foot in a nanosecond so at the datacenter scale, nanosecond level measurements if actually accurate turn into godawful physics homework problems.

Light travels about 186 miles in a millisecond so millisecond level measurements are getting blurry between datacenters or between a datacenter and a client even if both have "the same" clock as observed from a non-moving frame of reference exactly between them.

You’re like half way to reinventing distributed systems with this post, and I say that with admiration. Specifically, “Time, Clocks and the Ordering of Events in a Distributed System,” which was inspired by special relativity.

BigPaddy
Jun 30, 2008

That night we performed the rite and opened the gate.
Halfway through, I went to fix us both a coke float.
By the time I got back, he'd gone insane.
Plus, he'd left the gate open and there was evil everywhere.


I had to write a basic distributed system at university and yeah it was frustrating to get stuff to execute in the order it happened across multiple physical machines, this was pre VM don’t guess my age. From memory I ended up with some super slow and bloated insanity that used one node in the distributed system as the primary and every other node had to ask it for sequence number for its transactions which each node would then wait until it got the number back before adding it to a queue for processing in order. If a number was missing in the sequence it would go and ask the primary to resend it. Think it was written in C and just forked processes off. It “worked” and I passed. At least it wasn’t the write a Java compiler in Java class that was taught over one week with a guest lecturer.

1337JiveTurkey
Feb 17, 2005

lifg posted:

You’re like half way to reinventing distributed systems with this post, and I say that with admiration. Specifically, “Time, Clocks and the Ordering of Events in a Distributed System,” which was inspired by special relativity.

That's probably because I've read some of the work that's built on that regarding partial ordering of events but never got around to that paper. (Available here for anyone curious) Intuitively having a distributed clock never seemed worth the trouble versus simply accepting the partially ordered nature of things but it looks worth a read. Thanks!

duck monster
Dec 15, 2004

1337JiveTurkey posted:

That's probably because I've read some of the work that's built on that regarding partial ordering of events but never got around to that paper. (Available here for anyone curious) Intuitively having a distributed clock never seemed worth the trouble versus simply accepting the partially ordered nature of things but it looks worth a read. Thanks!

Generally speaking it tends to be a "If you have this problem, you're probably doing it wrong". Parallelize what can be parallelized easily (Ie lots of pure tasks that dont have horizontal dependencies). And do serially everything else. Unless you absolutely have to, in which case , its good to have a prescription for anti anxiety drugs, or thorazine if you've been doing this poo poo too long and still keep falling into the same hole.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

lifg posted:

You’re like half way to reinventing distributed systems with this post, and I say that with admiration. Specifically, “Time, Clocks and the Ordering of Events in a Distributed System,” which was inspired by special relativity.

It's also halfway to reinventing GPS

Ranzear
Jul 25, 2013

duck monster posted:

Generally speaking it tends to be a "If you have this problem, you're probably doing it wrong".

Such a widely applicable statement. My favorite to throw it at would probably be: "We can't do X because it'll require too much live-ops work (read: manual data entry) every day."

I'm remembering that thing about how SQL Server or something will crash if it receives something timestamped from the future, so it just adds 1000ms to everything to account for clock differences.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Ranzear posted:

I'm remembering that thing about how SQL Server or something will crash if it receives something timestamped from the future, so it just adds 1000ms to everything to account for clock differences.

Ughh. Some of our application servers had trouble with NTP sync for a while, so we would see occasional 403s because the SSO server would produce JWTs that looked future-dated to the backend API.

Telling ASP.NET to skip validating the token date was an obvious no-no, but giving it just a small clock tolerance would have been tricky, so we simply had the front-end wait 1000ms and then retry in case it received a 403 from the initial API call. The NTP issue has since been fixed but I bet the workaround is still there.

OddObserver
Apr 3, 2009

NihilCredo posted:

Ughh. Some of our application servers had trouble with NTP sync for a while, so we would see occasional 403s because the SSO server would produce JWTs that looked future-dated to the backend API.

Telling ASP.NET to skip validating the token date was an obvious no-no, but giving it just a small clock tolerance would have been tricky, so we simply had the front-end wait 1000ms and then retry in case it received a 403 from the initial API call. The NTP issue has since been fixed but I bet the workaround is still there.

Hardly the worst thing... unless it can retry more than once.

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!
What is the reason for nbf anyways? Are there scenarios where auth servers issue future tokens on purpose?

YanniRotten
Apr 3, 2010

We're so pretty,
oh so pretty
If you get banned from the system it's to prevent working around it by traveling back in time.

bolind
Jun 19, 2005



Pillbug
Now, class, when having a simple utility written in bash, which takes one or more filenames as arguments, why is it a bad idea to have a built-in help that goes like this:

code:
if [[ $@ == **--help** || $@ == **-h** || "$#" -lt 1  ]]; then
It doesn't work if any of your file names have "-h" in them.

Edit: Yes, this mistake was copy-pasted to no poo poo literally 17 files. That I've found so far.

bolind fucked around with this message at 14:01 on Jan 12, 2022

ExcessBLarg!
Sep 1, 2001
You should be using underscores and not dashes in your filenames anyways.

nielsm
Jun 1, 2009



Dashes for separating major components, underscores for separating minor components.

CPColin
Sep 9, 2003

Big ol' smile.
self-help_book.rtf

nielsm
Jun 1, 2009



CPColin posted:

self-help_book.rtf

Someone has named a few AD groups with the opposite pattern (underscore separating major components, dash separating minor components) at work, contrary to everything else in the domain, and it murders my brain every time I see those names.


quote:

self



help book

.rtf

OddObserver
Apr 3, 2009
Is that a manual for the Self programming language?

redleader
Aug 18, 2005

Engage according to operational parameters

nielsm posted:

Dashes for separating major components, underscores for separating minor components.

this but the other way round

Absurd Alhazred
Mar 27, 2010

by Athanatos

nielsm posted:

💩 for separating major components, 🍑 for separating minor components.

ftfy

redleader
Aug 18, 2005

Engage according to operational parameters

and you're just gonna trust that everything handles emoji correctly? exceedingly brave

1337JiveTurkey
Feb 17, 2005

Spaces (ASCII 32) for separating words, unit separator (31) for separating minor components, record separator (30) for less minor components, group separator (29) for pretty major ones and file separator (28) for really major ones. It's not like we're using them for anything otherwise. :argh:

edit: My solution is even 7-bit legal. double :argh:

Absurd Alhazred
Mar 27, 2010

by Athanatos

redleader posted:

and you're just gonna trust that everything handles emoji correctly? exceedingly brave

Trust. AHAHAHA. TRUST! OHOHOHOHO! TRUST!

Xarn
Jun 26, 2015

ExcessBLarg! posted:

You should be using underscores and not dashes in your filenames anyways.

How long did you have to train until you managed to be so wrong? :v:

ToxicFrog
Apr 26, 2008


1337JiveTurkey posted:

Spaces (ASCII 32) for separating words, unit separator (31) for separating minor components, record separator (30) for less minor components, group separator (29) for pretty major ones and file separator (28) for really major ones. It's not like we're using them for anything otherwise. :argh:

Foxfire_
Nov 8, 2010

Unix filenames are a dumpsterfire anyway and essentially nothing handles them correctly. They are arbitrary binary blobs, not text.

Fun prank: put files on someone's system whose name has bytes that (if interpreted as text) have newlines, spaces, invalid unicode sequences, valid but not normalized unicode codepoints, and some invisible codepoints

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

redleader posted:

and you're just gonna trust that everything handles emoji correctly? exceedingly brave

No, the point of using emoji everywhere is to break all the things that don't handle it. The rise of emoji has been pretty effective at getting Americans who otherwise didn't give a gently caress about supporting other languages to at least try to support unicode.

FlapYoJacks
Feb 12, 2009

bolind posted:

Now, class, when having a simple utility written in bash, which takes one or more filenames as arguments, why is it a bad idea to have a built-in help that goes like this:

code:

if [[ $@ == **--help** || $@ == **-h** || "$#" -lt 1  ]]; then

It doesn't work if any of your file names have "-h" in them.

Edit: Yes, this mistake was copy-pasted to no poo poo literally 17 files. That I've found so far.

Bash has had argparse forever lmao.

Volmarias
Dec 31, 2002

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

1337JiveTurkey posted:

Spaces (ASCII 32) for separating words, unit separator (31) for separating minor components, record separator (30) for less minor components, group separator (29) for pretty major ones and file separator (28) for really major ones. It's not like we're using them for anything otherwise. :argh:

edit: My solution is even 7-bit legal. double :argh:

The smiley faces for denoting temp files

Ranzear
Jul 25, 2013

I believe the technical term is 'Urist'.

Adbot
ADBOT LOVES YOU

bolind
Jun 19, 2005



Pillbug

DoomTrainPhD posted:

Bash has had argparse forever lmao.

Absolutely, and same for Python.

A very good question to ask yourself before even typing a single character is: "Is this likely to be a solved problem?".

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