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 $3,400 per month for bandwidth bills alone, and since we don't believe in shoving popup ads to our registered users, we try to make the money back through forum registrations.
«309 »
  • Post
  • Reply
Deformed Church
May 12, 2012

bear-headed geese



it's ascii encoding of a video of someone doing semaphore.

Adbot
ADBOT LOVES YOU

Tobermory
Mar 31, 2011



I once had to work with some hideous CSV format that used single comma as a delimiter and double comma as an escaped single comma. "String 1, with comma" followed by "String 2" was saved as "String 1,, with comma,String 2". It was surreally terrible to use.

Phosphine
May 30, 2011




Tobermory posted:

I once had to work with some hideous CSV format that used single comma as a delimiter and double comma as an escaped single comma. "String 1, with comma" followed by "String 2" was saved as "String 1,, with comma,String 2". It was surreally terrible to use.

Oh my god. How did this handle empty fields? Seeing as those are usually left empty, resulting in...a double comma.

Tobermory
Mar 31, 2011



Empty fields were filled with a single white space, which was then converted to empty during parsing. When there were three commas in a row, it was assumed to be an escaped comma followed by the end of cell. There was no way to store a value beginning with a comma.

Double Punctuation
Dec 30, 2009

Ships were made for sinking;
Whiskey made for drinking;
If we were made of cellophane
We'd all get stinking drunk much faster!


Don Gato posted:

In traditional Chinese characters. Written into a word doc and no punctuation

Traditional Chinese characters in a plain text file, except it’s one of those files that Notepad misdetects the encoding of and it shows up as something entirely different when you reopen it.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Tobermory posted:

Empty fields were filled with a single white space, which was then converted to empty during parsing. When there were three commas in a row, it was assumed to be an escaped comma followed by the end of cell. There was no way to store a value beginning with a comma.

Memento
Aug 25, 2009




Clapping Larry

Double Punctuation posted:

Traditional Chinese characters in a plain text file, except it’s one of those files that Notepad misdetects the encoding of and it shows up as something entirely different when you reopen it.

Like a JPG file you've opened in Notepad

Just a loving mess of ASCII

Platystemon
Feb 13, 2012



I am reminded of a classic Stackexchange query.

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!


all this is making me feel ok about getting cranky about part numbers the other day.

I have some companies that have product codes where the 6th or 7th slot on their product code might be omitted in some cases. For example, the 6th slot is lens style, and the 7th slot is lens finish. Style can be flat or grazer, but grazer has no finish. Fuckin' why? Just get rid of the finish code slot and put those options as the lens style.

Also a sin: codes of varying lengths in product numbers. Pick a set amount of characters and make it work. I want to see them alllll line up when I have them in my spreadsheet and am trying to sort out the differences.

Count Roland
Oct 6, 2013



Unperson_47 posted:

I wanna know the WORST way to store data in plaintext.

Related:

Carbon dioxide
Oct 9, 2012



Platystemon posted:

Parsing the FAA’s wind forecasts:

Wind direction and speed get a four‐digit block.

The first two are magnetic azimuth, in tens of degrees. The latter two are speed in knots.

Wind ten degrees west of south at ninety‐nine knots would be 1999.

But wait! What if the wind speed crosses a hundred knots?

I’m glad you asked.

In that case, you subtract a hundred from the wind speed and add fifty to wind direction.

Let’s say the wind direction is still the same, and now it’s a hundred and sixty‐nine knots. Now it’s denoted with 6969.

Wind data can also be encountered six‐digit groups. Surely this must be giving three digits to each component, right?

Wrong. The wind digits are unchanged. Temperature just got appended to it. 696969 is wind ten degrees west of south, blowing a hundred and sixty‐nine knots, with ambient air temperature of sixty‐nine degrees Celsius.

Sixty‐nine degrees Celsius is an unreasonably high temperature. You’d never see it in a real forecast. Except you might, because negative sixty‐nine degrees can be seen at altitude.

That raises the question “how are negative and positive temperatures differentiated?”

Oh. That’s easy. Negative temperatures have a minus sign in front of them. So that 696969 should really be 6969-69.

…except when it isn’t, because the preface to the forecast informed you that all temperatures above FL240 were below zero so they would be omitting all the signs.



What a sensible system.

If there were any positive temperatures, they have plus signs, as seen below in the chart for Colorado and nearby states.



At least Celsius temperatures are unlikely to get lower than -100 or higher than 100, on Earth.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Carbon dioxide posted:

At least Celsius temperatures are unlikely to get lower than -100 or higher than 100, on Earth.

they even usually stay within -50 – 50

lets make a new scale where
* the freezing point is 50
* 0 is the lowest measured temperature on earth
* 100 is the highest

then adjust it yearly based on new records

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



even better, adjust the endpoints on a running 10 year average

SubNat
Nov 27, 2008

I wish I was more Moomin-minded...


Carthag Tuek posted:

they even usually stay within -50 – 50

lets make a new scale where
* the freezing point is 50
* 0 is the lowest measured temperature on earth
* 100 is the highest

then adjust it yearly based on new records

Ah, a fun scale where 0-49.99... and 50-100 convert differently.
I think the current records are along the lines of -88C, 58C.
0-49.99... is 1Tuek = 1.76C, 50-100 is 1Tuek = 1.16C.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



SubNat posted:

Ah, a fun scale where 0-49.99... and 50-100 convert differently.
I think the current records are along the lines of -88C, 58C.
0-49.99... is 1Tuek = 1.76C, 50-100 is 1Tuek = 1.16C.

now were talking

(but you didnt adjust for a 10 year rolling average, make it so 1 degree in 1995 is different from 1 degree in 2020)

Kennel
May 1, 2008

BAWWW-UNH!


Platystemon posted:

Parsing the FAA’s wind forecasts:


What a sensible system.

A very good programming game Exapunks has somewhat similar challenges. The system is made very restricted on purpose, so you can't handle numbers that are larger than 9999 and there was one or two puzzles that require you to work around that.

gleebster
Dec 16, 2006

Only a howler

Pillbug

I just want to know if I need to take a jacket.

Absurd Alhazred
Mar 27, 2010

I'm the babyliberal, gotta love me!


gleebster posted:

I just want to know if I need to take a jacket.

Just take a jacket and an anti-jacket to be safe.

Karia
Mar 27, 2013

Self-portrait, Snake on a Plane
Oil painting, c. 1482-1484
Leonardo DaVinci (1452-1591)



College Slice

The problem with all of these methods is that they require knowledge of exactly what format is being used. I propose an unambiguous standard for temperature communication based based on relative comparison. Every temperature should be stored as a list of tuples (double, bool). The doubles form a range from the minimum to maximum temperatures with whatever resolution you want. The bool says whether the recorded temperature is less than that specific value. So to record -15 degrees C on a scale from -50 to 0 with a resolution of 10 degrees, you would write:
code:
(-50 false)
(-40 false)
(-30 false)
(-20 false)
(-10 true )
(  0 true )
However, it is not entirely clear if the temperature is being recorded in Celsius or Fahrenheit. This is easy to rectify: record both. For example, -15 C is 5 degrees F, so we could write:
code:
(-30 false false)
(-20 false false)
(-10 true  false)
(  0 true  false)
( 10 true  true )
From this encoding, the temperature and measurement scale can both be inferred with arbitrary resolution.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Carthag Tuek posted:

I would like it if this doxxed me. Alas.

i was looking for an old post, and hey it turns out i did get doxxed in that post!

Paper Tiger
Jun 17, 2007
but my teeth are atomic

Karia posted:

The problem with all of these methods is that they require knowledge of exactly what format is being used. I propose an unambiguous standard for temperature communication based based on relative comparison. Every temperature should be stored as a list of tuples (double, bool). The doubles form a range from the minimum to maximum temperatures with whatever resolution you want. The bool says whether the recorded temperature is less than that specific value. So to record -15 degrees C on a scale from -50 to 0 with a resolution of 10 degrees, you would write:
code:
(-50 false)
(-40 false)
(-30 false)
(-20 false)
(-10 true )
(  0 true )
However, it is not entirely clear if the temperature is being recorded in Celsius or Fahrenheit. This is easy to rectify: record both. For example, -15 C is 5 degrees F, so we could write:
code:
(-30 false false)
(-20 false false)
(-10 true  false)
(  0 true  false)
( 10 true  true )
From this encoding, the temperature and measurement scale can both be inferred with arbitrary resolution.

I like this, but I think we can add a little more information to the relative comparison.

Rather than mark every reference value as a binary true or false, we can describe each reference value with how close it is to the actual value. Since this is intended to communicate temperature, a temperature-based descriptor would be appropriate.

So, using -15 C/5 F on a scale of -50 to 50 as an example:

(-50 cold freezing!)
(-40 cold freezing!)
(-30 gettingwarmer cold)
(-20 hot! cold)
(-10 hot! gettingwarmer)
(0 gettingcolder hot!)
(10 cold hot!)
(20 cold gettingcolder)
(30 freezing! cold)
(40 freezing! cold)
(50 freezing! freezing!)

The exclamation points are important as those indicate that those are the strongest relative comparisons. Hopefully your system can handle special characters!

Qwertycoatl
Dec 31, 2008




https://wiki.c2.com/?ColorForth

quote:

ColorForth (written with "color" in red and "Forth" in green) is a dialect of ForthLanguage that uses color to replace punctuation and simplify the parser and compiler. It was designed by ChuckMoore, the original inventor of Forth.

mobby_6kl
Aug 9, 2009

"You are the best poster... do not let anyone say otherwise."


This still doesn't address the biggest problem, which is that these scales are linear. Does it really matter if the temperature of a furnace is 2450 degrees C or 2455? No, but 15 and 20 degrees is the difference between taking the jacket and not.

Since the distribution of temperatures we need on daily basis is more bell shaped, the resolution in this area should be much higher.



So something like this:



So for example, the old 19C is now 36© and 20C is 39© - much more precision where it's important.

The flatter spot is of course around the most common temperature, because it doesn't matter. What's it like outside today? Oh, the usual.

Another benefit is that the scale can be parametrized for fit different locations.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



gently caress yeah this is my jam

i wonder if we can somehow get gps in there cause you know its warmer in the sun than it is in the shade

Platystemon
Feb 13, 2012



Shammypants posted:

It's 8 o'clock at the end of a new day, you tell me.


Platystemon
Feb 13, 2012




“We want a V‐shaped recovery.”

The monkey’s paw curls.

ToxicFrog
Apr 26, 2008




Platystemon posted:

Parsing the FAA’s wind forecasts:

[screams in METAR]

I've started training for my pilot's license and part of that is learning to read METAR and it is the worst

Teriyaki Hairpiece
Dec 29, 2006

Ask me about my dream Frasier episode where Frasier and Bulldog oil their heads and then rub them together. It's definitely not a fetish of mine, I swear!

My dream is to come up with something that is METAR but for human emotions

Carbon dioxide
Oct 9, 2012



Platystemon posted:

“We want a V‐shaped recovery.”

The monkey’s paw curls.

There's this new tv show called Snowpiercer.

The first season hasn't fully aired yet but basically, humanity hosed up, the earth froze over, and the only people left alive are those in a big-rear end train (called Snowpiercer) that continuously circles the world. It's year 7 since the train started.

The train is divided into classes with the richest in first class and so on, there's also an agricultural section so they have food, and all the way in the back there's a group of people who started out as stowaways. They're mostly left alone, live in extreme poverty, get scraps of food from the train staff, and the only reason the staff seems to keep them alive is in case they ever need them for tasks.

The train operators will do literally anything to 1. keep the "balance" (amount of food produced, amount of people on board) and 2. to keep the train running, because the train runs on handwavium such that even a tiny reduction in speed causes power outages all over the train. If they go too slow they would stall and everyone would die of the cold.

And because I'm apparently blind to such things, it took me a friend to point it out before I realized this is the most obvious metaphor for modern capitalism ever.

Tashilicious
Jul 17, 2016

by Jeffrey of YOSPOS


Carbon dioxide posted:

There's this new tv show called Snowpiercer.

The first season hasn't fully aired yet but basically, humanity hosed up, the earth froze over, and the only people left alive are those in a big-rear end train (called Snowpiercer) that continuously circles the world. It's year 7 since the train started.

The train is divided into classes with the richest in first class and so on, there's also an agricultural section so they have food, and all the way in the back there's a group of people who started out as stowaways. They're mostly left alone, live in extreme poverty, get scraps of food from the train staff, and the only reason the staff seems to keep them alive is in case they ever need them for tasks.

The train operators will do literally anything to 1. keep the "balance" (amount of food produced, amount of people on board) and 2. to keep the train running, because the train runs on handwavium such that even a tiny reduction in speed causes power outages all over the train. If they go too slow they would stall and everyone would die of the cold.

And because I'm apparently blind to such things, it took me a friend to point it out before I realized this is the most obvious metaphor for modern capitalism ever.

watch the movie instead

dr_rat
Jun 4, 2001


Carthag Tuek posted:

they even usually stay within -50 – 50

lets make a new scale where
* the freezing point is 50
* 0 is the lowest measured temperature on earth
* 100 is the highest

then adjust it yearly based on new records

Oh you don't need to adjust the scale, just use a non-integer base -obviously starting at base 100 saving space as each value is only one digit!- and so you can just adjust the base (to base 99.83, or 101.23 or what not depending on wither you are reflecting an average warming or cooling) yearly, so we can keep a constancy in the numbers, but still reflect the needed change in value. The best of both worlds!

Elysiume
Aug 13, 2009

Alone, she fights.


Base ∞ is the optimal base because you can represent all real numbers with a single digit. Very efficient.

Doom Mathematic
Sep 1, 2008


Carthag Tuek posted:

they even usually stay within -50 – 50

lets make a new scale where
* the freezing point is 50
* 0 is the lowest measured temperature on earth
* 100 is the highest

then adjust it yearly based on new records

Hey, you ever heard of intelligence quotients?

SerialKilldeer
Apr 25, 2014



Tobermory
Mar 31, 2011




This is just so, so wrong in so many ways. Somehow they have managed to conflate Meteorology with On the Heavens, and misinterpreted them both.

BonHair
Apr 28, 2007

Welcome to the machine

North as up is completely arbitrary though. I remember being super confused about Upper and Lower Egypt as a child because they used south as up for obvious Nile-related reasons.

Tashilicious
Jul 17, 2016

by Jeffrey of YOSPOS


BonHair posted:

North as up is completely arbitrary though. I remember being super confused about Upper and Lower Egypt as a child because they used south as up for obvious Nile-related reasons.

same with upper and lower canada in my history class.

still not sure which is which

Elviscat
Jan 1, 2008

High Energy, Good Feeling!




Carthag Tuek posted:

gently caress yeah this is my jam

i wonder if we can somehow get gps in there cause you know its warmer in the sun than it is in the shade

If I ever have to calibrate thermometers on a logarithmic scale with a Prime Standard that changes daily based on a 10 year average, I'm coming for you.

Count Roland
Oct 6, 2013



Tashilicious posted:

same with upper and lower canada in my history class.

still not sure which is which

Like in the Egypt example, it means upriver and downriver. The river being the St Lawrence, in this case. Remember that and its easy.

Adbot
ADBOT LOVES YOU

Tobermory
Mar 31, 2011



BonHair posted:

North as up is completely arbitrary though. I remember being super confused about Upper and Lower Egypt as a child because they used south as up for obvious Nile-related reasons.

Sure, my objection is that they are jamming a bunch of different concepts together in ways that don't make sense. Aristotle's whole discussion of "upper" and "lower" poles mostly came in the context of which parts of the celestial spheres were "right" and "left", because this was very important to the Pythagoreans. For instance, in On the Heavens, Aristotle concluded that relative to the sphere of stars, north was down, but relative to the sphere of planets, north was up. In that context, the Earth doesn't have an up or down at all, nor is there an "upper" or "lower" celestial pole, because in Aristotelian physics the Earth doesn't move at all.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply
«309 »