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
LOOK I AM A TURTLE
May 22, 2003

"I'm actually a tortoise."
Grimey Drawer

Absurd Alhazred posted:

Trust. AHAHAHA. TRUST! OHOHOHOHO! TRUST!

Reflections on 🤞-ing 🤞.

Adbot
ADBOT LOVES YOU

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Debugging through some old C++ Win32 code that creates a PDF, using some kind of PDF driver and drawing stuff to a device context. If you stop the debugger at the wrong time, it just completely locks the machine up - freezes everything even down to the mouse pointer. I've had to restart my dev machine twice today already.

(This work is with the aim of replacing the C++ code with something better written in .NET)

Volmarias
Dec 31, 2002

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

bolind posted:

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?".

This is true of nearly every problem in computing though, and it was usually solved in the 70s

bolind
Jun 19, 2005



Pillbug
Ask me about the codebase I once worked on (initiated in the late 90s) that had no less than three different, in-house implementations of a doubly linked list.

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.


bolind posted:

Ask me about the codebase I once worked on (initiated in the late 90s) that had no less than three different, in-house implementations of a doubly linked list.

All of them with their own unique memory leaks.

Absurd Alhazred
Mar 27, 2010

by Athanatos

Volmarias posted:

This is true of nearly every problem in computing though, and it was usually solved in the 70s

... in FORTRAN, and everybody's too scared to mess with it so it's only accessed through a library.

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

bolind posted:

Ask me about the codebase I once worked on (initiated in the late 90s) that had no less than three different, in-house implementations of a doubly linked list.

Any old enough codebase will have several different implementations of basic containers.

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

Zopotantor posted:

Any old enough codebase will have several different implementations of basic containers.

My favorite was the threading collections one of my old jobs had. Naturally they weren't thread safe.

This didn't cause issues in production because all of its uses were accidentally bound to the main thread.

Foxfire_
Nov 8, 2010

bolind posted:

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?".
I'm like 90% sure argparse on python doesn't technically work on POSIX in general because it assumes arguments are unicode strings instead of arbitrary binary.

Fun fact: Python's unicode string type does not actually hold necessarily valid unicode. There's a hack added in python 3.1 where it maps bytes that aren't valid UTF-8 into recognizably broken surrogate pairs that let it reverse it back to the original bytes as long as you just hand the value back to one of its system outputs.

Tei
Feb 19, 2011

I like JSON because "use UTF-8 or else gently caress you" is a good call.

Foxfire_ posted:

I'm like 90% sure argparse on python doesn't technically work on POSIX in general because it assumes arguments are unicode strings instead of arbitrary binary.

Fun fact: Python's unicode string type does not actually hold necessarily valid unicode. There's a hack added in python 3.1 where it maps bytes that aren't valid UTF-8 into recognizably broken surrogate pairs that let it reverse it back to the original bytes as long as you just hand the value back to one of its system outputs.

respect_for_python --;

seems a feature that should not exist.

if somebody really wanted or needed to read binary has input data, then have a mechanism where python receive the path of a file, and read from that file.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Tei posted:

I like JSON because "use UTF-8 or else gently caress you" is a good call.

respect_for_python --;

seems a feature that should not exist.

if somebody really wanted or needed to read binary has input data, then have a mechanism where python receive the path of a file, and read from that file.

You misunderstand. This is for file paths, not data. It exists because otherwise it would be impossible to represent arbitrary POSIX paths as Python strings.

Tei
Feb 19, 2011

Soricidus posted:

You misunderstand. This is for file paths, not data. It exists because otherwise it would be impossible to represent arbitrary POSIX paths as Python strings.

No, no,... my suggestion was to standarize over maybe UTF-8, and serialize text not compatible with UTF-8 has UTF-8.

Like in JSON where you can have a text in Latin1, but is escaped so when is unescaped you get the original bits.


Maybe is more complicated than that, and I am wrong.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Tei posted:

No, no,... my suggestion was to standarize over maybe UTF-8, and serialize text not compatible with UTF-8 has UTF-8.

Like in JSON where you can have a text in Latin1, but is escaped so when is unescaped you get the original bits.


Maybe is more complicated than that, and I am wrong.

So you have a valid unicode string, but you pass that to fopen() and it silently operates on some different text to what you passed? That seems like an even bigger footgun to me.

The current scheme has the advantage that valid unicode doesn't get touched either way by the escaping.

ExcessBLarg!
Sep 1, 2001
Does Python not track encoding on a per-string basis and provide means to convert as appropriate? Ruby does that.

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies

ExcessBLarg! posted:

Does Python not track encoding on a per-string basis and provide means to convert as appropriate? Ruby does that.
Everything in python3 is either a Unicode string or a byte object. You can use the latter if you want to keep stuff in a specific encoding, but you need to track that info yourself.

redleader
Aug 18, 2005

Engage according to operational parameters
recognize that unix paths are a land of insanity. respect those who want to make their own lives difficult by refusing to support dumb file names

duck monster
Dec 15, 2004

Foxfire_ posted:

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

Oh its worse than that. Back when I first learned Unix (pre linux) I worked out you could put VT-100 control sequences into file names. And the VT-100 control sequences where borderline turing complete. You could remap keys, tell the terminal to send out arbitary commands back to the mainframe, the whole lot. And all your victim needed to do was type "ls".

I had a *lot* of fun screwing around with that in the computer lab at uni. I dont think Linux , or modern terminals, are quite that bad, but you can still do stupid poo poo with file names. Though the optional case insensitivity in macos can cause *very stupid* poo poo to occur.

Soricidus
Oct 21, 2010
freedom-hating statist shill
You can still put control sequences in filenames, but common things like ls will escape them, and most modern terminal emulators refuse to implement control sequences they consider security risks, or at least disable them by default

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.


Just has the mythical “can’t you just put everything in one table?” question from a client. The everything is 800+ fields for a “dynamic” form builder.

NihilCredo
Jun 6, 2011

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

BigPaddy posted:

Just has the mythical “can’t you just put everything in one table?” question from a client. The everything is 800+ fields for a “dynamic” form builder.

Well if they're all atomic, independent, and linked only to the same primary key... it can technically still be up to fifth normal firm with just one table. Although if there's a case that screams for sixth form it's this one.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

BigPaddy posted:

Just has the mythical “can’t you just put everything in one table?” question from a client. The everything is 800+ fields for a “dynamic” form builder.

No problem boss! *adds json column*

D34THROW
Jan 29, 2012

RETAIL RETAIL LISTEN TO ME BITCH ABOUT RETAIL
:rant:

pokeyman posted:

No problem boss! *adds json column*

No lie, this is exactly what im doing for something instead of some fuckery with table inheritances in SQLAlchemy and Flask. I figure given that all reports will share the same basic header fields, all of the data (most of which is crunched behind the scenes) goes in a single TEXT field as JSON.

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.


That is what is happening and now it is all :sludgepal: reporting!

Ok well take the JSON and put it in your BI tool of choice and do all the reporting :sludgepal: but I want it all in the same place as the app!

We can show the reports made in the BI system in the app :sludgepal: but I want this to be self serve without any developers needed to maintain it.

:frogout:

Absurd Alhazred
Mar 27, 2010

by Athanatos
https://twitter.com/mjg59/status/1486462124897361922

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
if you click on a tweet now, and you are not logged in to a twitter account, if you scroll down a little bit to see replies you get a giant loving plaque that appears over the screen asking you to sign up or log in. and it does not have a close button



twitter is cancer

redleader
Aug 18, 2005

Engage according to operational parameters

Hammerite posted:

twitter is cancer

yes, but we knew that well before they started their persistent login popups

ExcessBLarg!
Sep 1, 2001

@mjg59 posted:

1) It links the email address in a commit to a github user with that address no matter who committed it
I never liked that Git prioritizes showing the Author of a commit over the Committer (except in --format=fuller). Both are really just advisory but the former even more so.

@mjg59 posted:

2) If a commit is pushed to a fork, it's visible in every fork (including the original)
Now this is amazing and not expected.

OddObserver
Apr 3, 2009

ExcessBLarg! posted:

I never liked that Git prioritizes showing the Author of a commit over the Committer (except in --format=fuller). Both are really just advisory but the former even more so.


... Wouldn't the only committer in original Linux use of Git have been Linus, or would it be the first person to have accepted the patch into their tree that then got merged into Linus's?

Anyway, either way it sort of makes sense for Linux-like set up.

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

Hammerite posted:

if you click on a tweet now, and you are not logged in to a twitter account, if you scroll down a little bit to see replies you get a giant loving plaque that appears over the screen asking you to sign up or log in. and it does not have a close button



twitter is cancer

Hasn't this been a thing for a few years?

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

Hammerite posted:

if you click on a tweet now, and you are not logged in to a twitter account, if you scroll down a little bit to see replies you get a giant loving plaque that appears over the screen asking you to sign up or log in. and it does not have a close button



twitter is cancer

If you clear your website data for twitter it goes away (for awhile)

Or just stop reading twitter, probably the better answer

Hammerite
Mar 9, 2007

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

HappyHippo posted:

Or just stop reading twitter, probably the better answer

I probably would if people would stop posting tweets on this website, but that cat is out of the bag

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
If you block all twitter cookies entirely it stops showing up, if they're evercookieing you regardless then they've decided not to make that obvious.

Absurd Alhazred
Mar 27, 2010

by Athanatos

Hammerite posted:

I probably would if people would stop posting tweets on this website, but that cat is out of the bag

I'll try and screencap/copy-paste text for tweets properly in future, sorry!

Hammerite
Mar 9, 2007

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

Absurd Alhazred posted:

I'll try and screencap/copy-paste text for tweets properly in future, sorry!

I was not criticising you for posting tweets. People post embedded tweets all over the forums, I hate it personally but there is nothing to be done about it, it's a done deal. The embedded tweet showed up just fine, I visited Twitter to see more context but got blocked by that stupid log in prompt.

F4rt5
May 20, 2006

Hammerite posted:

if you click on a tweet now, and you are not logged in to a twitter account, if you scroll down a little bit to see replies you get a giant loving plaque that appears over the screen asking you to sign up or log in. and it does not have a close button



twitter is cancer

Instagram started requiring login for viewing linked insta posts a good while ago

makes some newspaper stories dumb to read

Instagram, meet Ernst Germ (69)

Absurd Alhazred
Mar 27, 2010

by Athanatos

Hammerite posted:

I was not criticising you for posting tweets. People post embedded tweets all over the forums, I hate it personally but there is nothing to be done about it, it's a done deal. The embedded tweet showed up just fine, I visited Twitter to see more context but got blocked by that stupid log in prompt.

In the past I would often post screencaps at least because I would post controversial tweets that I would worry would get deleted; I hadn't realized Twitter has gotten even worse on follow-through (they're bad enough for active users!). Seems like good practice to not have people be forced to depend on either embeds or follow-through for content and context. :shobon:

NihilCredo
Jun 6, 2011

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

Hammerite posted:

if you click on a tweet now, and you are not logged in to a twitter account, if you scroll down a little bit to see replies you get a giant loving plaque that appears over the screen asking you to sign up or log in. and it does not have a close button



twitter is cancer

Nitter.

ToxicFrog
Apr 26, 2008


Absurd Alhazred posted:

In the past I would often post screencaps at least because I would post controversial tweets that I would worry would get deleted; I hadn't realized Twitter has gotten even worse on follow-through (they're bad enough for active users!). Seems like good practice to not have people be forced to depend on either embeds or follow-through for content and context. :shobon:

There's always twitter proxies that strip all that stuff like Nitter, but that doesn't embed in the forums.

Bongo Bill
Jan 17, 2012

Nitter, plus a browser extension that redirects Twitter links to Nitter.

Adbot
ADBOT LOVES YOU

Macichne Leainig
Jul 26, 2012

by VG
Passwords and whatnot changed for obvious reasons.

Found this gem in an application provided by my company's offshore resources:



That's two sets of hardcoded credentials. In clientside Javascript. :smithicide:

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