|
more like holy temerity
|
# ? Nov 18, 2020 04:37 |
|
|
# ? Apr 25, 2024 16:27 |
|
PIZZA.BAT posted:welcome to hell, kid This loving owns
|
# ? Nov 18, 2020 04:38 |
|
KubeCon talk from Lyft, "safely deploying a 100k line envoy yaml configuration to production"
|
# ? Nov 18, 2020 18:33 |
|
that rachel by the bay lady fuckin bounced from lyft didnt she? not surprised
|
# ? Nov 18, 2020 18:37 |
|
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
|
# ? Nov 19, 2020 04:31 |
|
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
|
# ? Nov 19, 2020 04:40 |
|
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!!!!!!!!!!
|
# ? Nov 19, 2020 07:31 |
|
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.
|
# ? Nov 19, 2020 07:35 |
|
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
|
# ? Nov 19, 2020 07:38 |
|
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 |
# ? Nov 19, 2020 11:52 |
|
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 dont see them anymore. like fixing a hole in the drywall with wallpaper, because some people use that hole and we couldnt possibly break their workflow
|
# ? Nov 19, 2020 16:25 |
|
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. its 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.
|
# ? Nov 19, 2020 18:06 |
|
i agree that a disastrous nuclear meltdown is an excellent analogy for javascript
|
# ? Nov 19, 2020 18:39 |
|
Arcsech posted:lmao nothing ever gets “fixed” in javascript, that would break backwards compatibility *Ecosystem in the same way plastic trash fires in China are now considered an ecosystem
|
# ? Nov 19, 2020 18:41 |
|
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*
|
# ? Nov 19, 2020 19:53 |
|
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
|
# ? Nov 19, 2020 22:43 |
|
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 |
# ? Nov 19, 2020 22:57 |
|
i get to pick my own tools and its cool.
|
# ? Nov 19, 2020 23:53 |
|
Weird name for your nostrils but you do you
|
# ? Nov 20, 2020 00:26 |
|
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!!! 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"
|
# ? Nov 20, 2020 04:38 |
|
it's always namespaces. nobody can understand those things. and even if you understand them, save everybody else the trouble please.
|
# ? Nov 20, 2020 04:53 |
|
namespaces are ez and good
|
# ? Nov 20, 2020 05:04 |
|
Shaggar posted:namespaces are ez and good drat right
|
# ? Nov 20, 2020 05:08 |
|
Shaggar posted:xmlns:namespaces xmlns:are xmlns:ez xmlns:and xmlns:good
|
# ? Nov 20, 2020 05:18 |
|
Shaggar posted:namespaces are ez and good
|
# ? Nov 20, 2020 05:37 |
|
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
|
# ? Nov 20, 2020 08:39 |
|
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
|
# ? Nov 20, 2020 16:02 |
|
print(f'<{tag}>{contents}</{tag}>')
|
# ? Nov 20, 2020 16:15 |
|
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"
|
# ? Nov 20, 2020 17:55 |
|
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 |
# ? Nov 20, 2020 18:07 |
|
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
|
# ? Nov 20, 2020 18:20 |
|
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
|
# ? Nov 20, 2020 18:28 |
|
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
|
# ? Nov 20, 2020 18:34 |
|
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
|
# ? Nov 20, 2020 18:49 |
|
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#
|
# ? Nov 20, 2020 19:57 |
|
Shaggar posted:use c# no thanks i'll stick to hand crafting xml
|
# ? Nov 20, 2020 19:59 |
|
my xml generator emits ucs-2 code units one at a time just like everyone else
|
# ? Nov 20, 2020 20:08 |
|
love toquote:XmlNamespaceManager.AddNamespace("woop", "http://some-dudes-awesome-namespace.com") 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 |
# ? Nov 20, 2020 20:27 |
|
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
|
# ? Nov 20, 2020 20:43 |
|
|
# ? Apr 25, 2024 16:27 |
|
cool av posted:love to u just do code:
|
# ? Nov 20, 2020 21:27 |