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.
 
  • Locked thread
JawnV6
Jul 4, 2004

So hot ...
there was that article about 5 things the json spec leaves open like infinite streams, meaning there's at least 32 parsers that are valid and none agrrr

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

NihilCredo posted:

is there a conventional name or operator for this function:

mapAndKeepOriginal f = map (\x -> (x, f x))

i asked hoogle and im not sure what to make of some of these results https://www.haskell.org/hoogle/?hoogle=%28a+-%3E+b%29+-%3E+%5Ba%5D+-%3E+%5B%28a%2C+b%29%5D

Bloody
Mar 3, 2013

the best data interchange format involves protobufs

Bloody
Mar 3, 2013

xml is good too

JawnV6
Jul 4, 2004

So hot ...

Bloody posted:

involves

?

LordSaturn
Aug 12, 2007

sadly unfunny

moving from whitespace-delimited text parser to xml is the most incredible thing. I can take a subpart I want to process and pass it to a handler and not worry about the state of the parser if the subpart is malformed

in related news I recently learned that jsonp is a thing people regularly do, and nearly shat myself. what the gently caress, how is this our goddamned infrastructure

WINNINGHARD
Oct 4, 2014

anyone here ever used hessian binary protocol?

abraham linksys
Sep 6, 2010

:darksouls:
i've never used java before but i wanna wrap a web app in an android WebView and throw it on their app store so I decided to dig in using this guide for web dev babies like me and like literally the first thing I noticed is that they use hungarian notation for member variables. now regardless of whether or not this is a good idea, I was surprised to see it all over the API docs, so I looked at Google's official java style guide, and they specifically do not recommend it here. then i found a very strongly worded blog post about this here.

i'm glad i'm finding out all native app platforms have random confusing issues rooted in poor technical and cultural decisions, just like the web :allears:

(also I think I'm gonna use hungarian notation just for consistency with these docs because it's a tiny app and I'm a new Java baby who doesn't yet recognize the different syntax highlighting in this editor for member variables and regular variables. this is why I prefer explicit this/self referencing :()

abraham linksys fucked around with this message at 07:44 on Aug 31, 2016

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Mr Dog posted:

struct tm is the stupidest goddamn poo poo and so are the ansi c or posix or whatever the gently caress date/time apis

hmm yes let's count hours minutes and seconds from 0, days of month from 1



and months from 0, so August is month 7 :bravo:

most time apis do it that way because month is an enumerated field not a counter. hours and minutes can obv be 0 and day of month can't

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

abraham linksys posted:

this is why I prefer explicit this/self referencing :()

you are in fact allowed to use explicit this references in java

style guides in general recommend that you don't (the same way style guides in general say "don't use hungarian warts you idiot"), but it's entirely permissible.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Jabor posted:

you are in fact allowed to use explicit this references in java

style guides in general recommend that you don't (the same way style guides in general say "don't use hungarian warts you idiot"), but it's entirely permissible.

they only time i use explicit this is
public void setButt(Butt butt) {
this.butt = butt;
}

redleader
Aug 18, 2005

Engage according to operational parameters

hackbunny posted:

I check out the whole project at depth "immediates" (svn co --depth=immediates), this gets me trunk, tags and branches, all empty
then I go in branches and update it, changing depth from "empty" to "immediates" (svn up --set-depth=immediates). this fills the branches directory with (empty) subdirectories for the various branches
repeat with tags if you need the list of tags
when I need a branch or tag, I set its checkout depth to "infinity" (svn up --set-depth=infinity). when I'm done with it, I set it to "empty" and only the placeholder is left

this lets me do things like, branch trunk+bump app version in trunk as a single operation, instead of two. cherry-pick merging is easier too

this prompted me to learn what the hell svn was talking about when it referred to 'depth', thanks!

guess i'm the terrible version controller

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

redleader posted:

this prompted me to learn what the hell svn was talking about when it referred to 'depth', thanks!

guess i'm the terrible version controller

using a substandard tool is no excuse not to use it properly!

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
I'm surprised people are still discussing hungarian notation in 2016, does any of this poo poo ever die in programming?

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Symbolic Butt posted:

I'm surprised people are still discussing hungarian notation in 2016, does any of this poo poo ever die in programming?

when's the last time you saw bcpl code? :)

Shaggar
Apr 26, 2006

LordSaturn posted:

moving from whitespace-delimited text parser to xml is the most incredible thing. I can take a subpart I want to process and pass it to a handler and not worry about the state of the parser if the subpart is malformed

in related news I recently learned that jsonp is a thing people regularly do, and nearly shat myself. what the gently caress, how is this our goddamned infrastructure

Jsonp is a hack to get around cross domain request.problems. Web "development" is terrible.

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
nice title shag man

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

hackbunny posted:

nice title shag man

they should have given him a picture of maine's governor

Sapozhnik
Jan 2, 2005

Nap Ghost

LordSaturn posted:

moving from whitespace-delimited text parser to xml is the most incredible thing. I can take a subpart I want to process and pass it to a handler and not worry about the state of the parser if the subpart is malformed

in related news I recently learned that jsonp is a thing people regularly do, and nearly shat myself. what the gently caress, how is this our goddamned infrastructure

JSONP is obsolete for any browser that supports CORS, which these days is all of them (except IE8, of course)

Bloody
Mar 3, 2013

ie8 has been obsolete for a like a decade

Bloody
Mar 3, 2013

does netscape navigator support cors

LordSaturn
Aug 12, 2007

sadly unfunny

Bloody posted:

does netscape navigator support cors

no, but it has a feature called javacors

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

LordSaturn posted:

moving from whitespace-delimited text parser to xml is the most incredible thing. I can take a subpart I want to process and pass it to a handler and not worry about the state of the parser if the subpart is malformed

in related news I recently learned that jsonp is a thing people regularly do, and nearly shat myself. what the gently caress, how is this our goddamned infrastructure

seriously, if ppl think json or xml file formats are bad, they should stick their eyeballs on the ansi x12 spec sometime.


Symbolic Butt posted:

I'm surprised people are still discussing hungarian notation in 2016, does any of this poo poo ever die in programming?

nope i still have to use that bullshit in vb6 code erry day. at least it makes some sense there because the ide's intellisense sucks balls and telling you what types things are.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
like, i cant post the specs themselves because you have to pay money for them, but here's the header of a claim file:
code:
ISA*00*          *00*          *30*SENDER    *30*RECEIVER   *160613*1303*^*00501*000000091*0*T*>~
GS*HC*SENDER*RECEIVER*20160613*1303*1*X*005010X223A2~
ST*837*0001*005010X223A2~
BHT*0019*00*89*20160613*1303*CH~
NM1*41*2*SUBMITTER*****46*00~
PER*IC*TEST*TE*6082719000~
NM1*40*2*RECEIVER*****46*18~
not only is everything "*" delimited within a line, there's nothing actually indicating when one section begins or ends. the spec states which segments are valid within a given section, but doesn't give an explicit statement of how sections begin or end. the vendor information comes right after the line you see there and the only way you know that is because you get another name line and you wouldn't have a third one of those in the header.

but also many of the types of lines can appear repeatedly in a section and can be used in many types of sections in the same file, and as far as ive been able to tell its impossible to construct a grammar for these files that is fully left or right recursive, so youre basically hosed trying to write a parser for these things. o(n) is the best you can do, and probably a little worse than that because you have to backtrack sometimes because it can be 3 lines into a section before you have enough information to realize you started a new section 3 lines ago.

the specifications are created by an industry group, but they don't even make model implementations of them. they literally just poo poo these spec documents into the wind with nary a thought as to whether the format they've created is actually good for computers. of course, it's not particularly human-readable either so it's basically just bad for everyone.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
right now this poo poo is so painful to work with that a lot of health plans pay a third party to scrub these files for them and transform them into another format that can be loaded more easily. ive heard that these claim scrubbing services literally can't even automate a lot of it and they have warehouses full of indonesians hunched in front of computers cleaning up these files by hand.

brap
Aug 23, 2004

Grimey Drawer
that's loving dark

Luigi Thirty
Apr 30, 2006

Emergency confection port.

sounds like healthcare is ripe for disruption, op

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Luigi Thirty posted:

sounds like healthcare is ripe for disruption, op

hahahahahahaha good luck with that

have fun navigating the regulatory minefield

VikingofRock
Aug 24, 2008




Finster Dexter posted:

hahahahahahaha good luck with that

have fun navigating the regulatory minefield

Repeat after me: We don't provide healthcare, we just match patients with [unlicensed] doctors!

Mao Zedong Thot
Oct 16, 2008


milstrip is pretty bad too

80 chars (cause mainframes), variable field parsing depending on what the type and contents are

oh yeahhhhhhhhhhhhhhhhhh

Mao Zedong Thot
Oct 16, 2008


its almost cheating tho, like anybody using mainframes in tyool 2016..............

LordSaturn
Aug 12, 2007

sadly unfunny


a good and real post, which I commend

the fun thing about "simple" bespoke formats like whitespace-delimited tokens is that it leads to every domain writing their own parser, each of which has its own idiosyncratic behavior also two of the old-guard guys previously on my team wouldn't even talk to each other so lots of poo poo got done twice in differently-crazy ways

all implementations take "# comment" but only certain ones will take "#comment" or " #comment"

only one specific implementation has a concept of line endings, which helps tons with surviving malformed config data. the implementation that has this is confined to a very specific subdomain


etc etc

HoboMan
Nov 4, 2010

what the gently caress i got banned from stackoverflow?

hobbesmaster
Jan 28, 2008

lol what did you do, answer an off topic question or say php was bad?

cinci zoo sniper
Mar 15, 2013




HoboMan posted:

what the gently caress i got banned from stackoverflow?
time to switch fields

HoboMan
Nov 4, 2010

i got a message trying to post that basically said "stop being such a lovely poster"

e: my questions don't add enough "value" to the "community"

e2: this is hilarious, i'm basically hellbanned

HoboMan fucked around with this message at 17:44 on Aug 31, 2016

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
lol I want to see what your questions were, now. Post your profile (unless it will doxx you too much or something)

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

Finster Dexter posted:

lol I want to see what your questions were, now. Post your profile (unless it will doxx you too much or something)

hobbesmaster
Jan 28, 2008

HoboMan posted:

e: my questions don't add enough "value" to the "community"

give us a sample of questions... were they like "why are p-langs pieces of poo poo?"

Adbot
ADBOT LOVES YOU

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

hobbesmaster posted:

give us a sample of questions... were they like "why are p-langs pieces of poo poo?"

An example of premium value-add, imo

  • Locked thread