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
Corla Plankun
May 8, 2007

improve the lives of everyone
more like holy temerity

Adbot
ADBOT LOVES YOU

ikanreed
Sep 25, 2009

I honestly I have no idea who cannibal[SIC] is and I do not know why I should know.

syq dude, just syq!

PIZZA.BAT posted:

welcome to hell, kid



This loving owns

MononcQc
May 29, 2007

KubeCon talk from Lyft, "safely deploying a 100k line envoy yaml configuration to production"

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
that rachel by the bay lady fuckin bounced from lyft didnt she? not surprised

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Corla Plankun posted:

today i learned that javascript (or maybe typescript? idk what any of this is) has null AND undefined and they DO NOT mean the same thing for some reason??? im sorry to all the webdevs out there, you deserve figgies like me, this is a nightmare
now go look up the reason that JS libraries use void(0) instead of undefined (it's not code size!)

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Gazpacho posted:

now go look up the reason that JS libraries use void(0) instead of undefined (it's not code size!)

bahahahaha

also void 0 is shorter

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
oh yeah i just assumed that bit of hilarity had been fixed in modern javascript. i guess not??? in any case, if you're not sure what we're talking about: undefined is not necessarily undefined. in fact, you can define undefined! because it is a variable!!! not a keyword!!!

JA VA SCRIPT!!!!!!!!!!

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
also you might wonder why it is written void(0) and not just void? it looks like a function call? well those are actually just unnecessary parentheses, really your expression reduces to "void 0". uh, what? you see, in the infinite wisdom of javascript, void is an operator that takes a single operand and ignores it and returns the undefined value.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
it was apparently fixed, and I remember doing javascript:void(0) on a hrefs all the time back in the day, I had just never looked it up before

Powerful Two-Hander
Mar 10, 2004

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


Corla Plankun posted:

more like holy temerity

holy temerity scream insanity all you ever gonna be's another JS library

break;

Powerful Two-Hander fucked around with this message at 12:30 on Nov 19, 2020

Arcsech
Aug 5, 2008

DELETE CASCADE posted:

oh yeah i just assumed that bit of hilarity had been fixed in modern javascript. i guess not???

lmao nothing ever gets “fixed” in javascript, that would break backwards compatibility

no no, you just paper new syntax over the problems until you don’t see them anymore. like fixing a hole in the drywall with wallpaper, because some people use that hole and we couldn’t possibly break their workflow

brap
Aug 23, 2004

Grimey Drawer
breaking back compat is a nuclear option in languages and the older the bad behavior is, the harder it is to do. strict mode and typescript do a lot to address the footguns, and we can do more to make it better.

it’s less like a hole in the drywall, maybe a little more like the Chernobyl power plant and the containment unit around it, but a little less expensive.

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
i agree that a disastrous nuclear meltdown is an excellent analogy for javascript

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Arcsech posted:

lmao nothing ever gets “fixed” in javascript, that would break backwards compatibility
they leave the continual breaking changes and rewrites to the library ecosystem*

*Ecosystem in the same way plastic trash fires in China are now considered an ecosystem

Carthag Tuek
Oct 15, 2005

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



welp i told my senior guy about his ugly merge commits and recommended git-fork.com so maybe this was the last one? *crosses fingers*

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
if i ever had to do any scripting on a web front end (god help me if i do), id just do it in kotlin

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


CRIP EATIN BREAD posted:

if i ever had to do any scripting on a web front end (god help me if i do), id just do it in kotlin

well yeah that sounds great pick your own tools

uhh here's what we have

ancient PHP + ORM framework + angularjs v.1

oh and we have to get it done quickly



e: to be fair I avoid webdev as much as possible, but that's the sort of thing I ended up getting dumped on me a few times, odd since I do embedded and systems programming but there you go

I never get why they don't just pay a webdev guy and end up with a much better result

Private Speech fucked around with this message at 23:06 on Nov 19, 2020

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
i get to pick my own tools and its cool.

Fortaleza
Feb 21, 2008

Weird name for your nostrils but you do you

PIZZA.BAT
Nov 12, 2016


:cheers:


DELETE CASCADE posted:

oh yeah i just assumed that bit of hilarity had been fixed in modern javascript. i guess not??? in any case, if you're not sure what we're talking about : undefined is not necessarily undefined. in fact, you can define undefined! because it is a variable!!! not a keyword!!!

JA VA SCRIPT!!!!!!!!!!

this is reminding me of the time one of my clients was running into a really weird bug where a percentage of their xml payloads were being handled by some systems just fine and others were accepting them but not parsing them correctly. looking at the payloads that were working vs. the ones that weren't i couldn't find any difference between the two and it drove me crazy for almost a week trying to find out wtf was going on

turns out one of the source systems was building their root namespace by defining it as literally xmlns. like xmlns:xmlns="http://www.yospos.org/bithc/poo poo"

cool av
Mar 2, 2013

it's always namespaces. nobody can understand those things. and even if you understand them, save everybody else the trouble please.

Shaggar
Apr 26, 2006
namespaces are ez and good

PIZZA.BAT
Nov 12, 2016


:cheers:


Shaggar posted:

namespaces are ez and good

drat right

xtal
Jan 9, 2011

by Fluffdaddy

Shaggar posted:

xmlns:namespaces xmlns:are xmlns:ez xmlns:and xmlns:good

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Shaggar posted:

namespaces are ez and good

redleader
Aug 18, 2005

Engage according to operational parameters

PIZZA.BAT posted:

turns out one of the source systems was building their root namespace by defining it as literally xmlns. like xmlns:xmlns="http://www.yospos.org/bithc/poo poo"

lmao, the things people come up with

PIZZA.BAT
Nov 12, 2016


:cheers:


redleader posted:

lmao, the things people come up with

they tried to argue that this was a bug with our system for not overloading protected keywords. rather than, you know, using an actual xml serializer which would have yelled at them for using a protected keyword instead of manually building the whole thing as a string

Carthag Tuek
Oct 15, 2005

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



print(f'<{tag}>{contents}</{tag}>') :ocelot:

ikanreed
Sep 25, 2009

I honestly I have no idea who cannibal[SIC] is and I do not know why I should know.

syq dude, just syq!
That's at least better than my MAJOR BANK NAME OMITTED experience of "Hey if we split on newline, we can parse xml with regular expressions just fine"

Carthag Tuek
Oct 15, 2005

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



when i got downsized at my old job, i didnt delete my local repos and its honestly pretty amazing to look back at the bizarre workarounds we had to make for the malformed xml we got from vendors

at my current job we use Cumulus for handling a bunch of files and their xml is generally ok (ie well-formed and consistent) except you have to map field names via a header. like, all entries will have a bunch of <field uuid="uuid">value</field> and then you have to look up <fields><entry uuid="uuid">name</entry></fields> in the header, something like that.

so if you want to convert to csv or get say "asset name" from all entries, you need to parse the <fields> header first. and it makes the file way larger, cause a uuid is a longer string than most field names if not all

i feel like that has to be an artifact of some serializer they used at some point, and now they're stuck with it cause the format is in use.

Carthag Tuek fucked around with this message at 18:09 on Nov 20, 2020

PIZZA.BAT
Nov 12, 2016


:cheers:


ikanreed posted:

That's at least better than my MAJOR BANK NAME OMITTED experience of "Hey if we split on newline, we can parse xml with regular expressions just fine"

ran into this in our own product at the last company i worked at. that was really fun standing in front of a room of a fortune 100's tech directors and explaining to them why the go-live was being delayed

cool av
Mar 2, 2013

Shaggar posted:

namespaces are ez and good

im glad your app can automatically parse and process XML from all kinds of different sources and understand the context and common data between them with no extra work thanks to the metadata included in the documents, but somehow mine still can't

Carthag Tuek
Oct 15, 2005

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



cool av posted:

im glad your app can automatically parse and process XML from all kinds of different sources and understand the context and common data between them with no extra work thanks to the metadata included in the documents, but somehow mine still can't

heres a parsing hint: the metadata as well as the data is garbage

PIZZA.BAT
Nov 12, 2016


:cheers:


cool av posted:

im glad your app can automatically parse and process XML from all kinds of different sources and understand the context and common data between them with no extra work thanks to the metadata included in the documents, but somehow mine still can't

you're blaming the tool for the shoddy work instead of the people who built it

Shaggar
Apr 26, 2006

cool av posted:

im glad your app can automatically parse and process XML from all kinds of different sources and understand the context and common data between them with no extra work thanks to the metadata included in the documents, but somehow mine still can't

use c#

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER


no thanks i'll stick to hand crafting xml

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
my xml generator emits ucs-2 code units one at a time just like everyone else

cool av
Mar 2, 2013

love to

quote:

XmlNamespaceManager.AddNamespace("woop", "http://some-dudes-awesome-namespace.com")
so i can query the elements out of some dude's awesome xml that he put his namespace in, presumably so he could participate in the amazing ecosystem of standardized namespaced XML elements out there



edit: even for something like XMLSchema-instance... i think an XSL parser could manage to figure out what a <xsl:template> is even if the element name was actually "xsl:template" and this namespace technology never existed

cool av fucked around with this message at 20:32 on Nov 20, 2020

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
in xbrl financial statements there are lots of xml namespaces. companies can even create their own namespace for custom tags that aren't covered by accounting standards. but most normal stuff will have a namespace prefix like us-gaap. but the rules change from year to year, so the namespace uri associated with the us-gaap prefix is not always the same across documents. this causes it to parse into our database as a separate namespace id, which makes comparing the same concept across documents annoying. our current solution: just throw the loving namespace away and compare only the local name :shrug:

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006

cool av posted:

love to

so i can query the elements out of some dude's awesome xml that he put his namespace in, presumably so he could participate in the amazing ecosystem of standardized namespaced XML elements out there



edit: even for something like XMLSchema-instance... i think an XSL parser could manage to figure out what a <xsl:template> is even if the element name was actually "xsl:template" and this namespace technology never existed

u just do

code:
	serializer.Serialize<CoolObjectTypeWithAnnotationsGeneratedFromXSD>(coolObjectInstance)
or something like that

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