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
Arcteryx Anarchist
Sep 15, 2007

Fun Shoe

Powerful Two-Hander posted:

I'm completely serious. the application it's from is basically a form for requesting access to other apps but rather than have, idk, a generic data model in which to fit collections of possible app roles they have html stored in a database that the vomit onto the page per application and then barf the whole lot back at the backend on submit and do.... Something but mostly just seem to store the entire thing as text. I think that when you view a request it's actually just dumping that html blob back into the ui each time. this means there's zero consistency in the data that's actually stored for anything

it's insane










...............................................................................................what

Adbot
ADBOT LOVES YOU

Glorgnole
Oct 23, 2012

Star War Sex Parrot posted:

yeah it's a pos

tinkered with it a bit with turtlebots and hooboy

some of the undergrad engineering courses at my school use those. they've had them for a few years so every robot has all these little bespoke tweaks to account for hardware variations etc that also make code not necessarily portable between robots so lol/rip.

Bloody posted:

haven't used it myself but I know a lot of people who like it but idk it's an os so it's probably a pos

it's an enormous pos that incidentally has a bunch of very useful motion planning and robot perception stuff built to work with it

Powerful Two-Hander
Mar 10, 2004

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


lancemantis posted:

...............................................................................................what

if I remember I'll do some request sniffing and post the full horror but I am not making any of that up

edit: idk if this is better or worse than the "workflow platform" that stored javascript in the db and would just append it to the page and run it to provide the actual "flow"

Powerful Two-Hander fucked around with this message at 00:34 on Aug 25, 2017

cinci zoo sniper
Mar 15, 2013




Powerful Two-Hander posted:

if I remember I'll do some request sniffing and post the full horror but I am not making any of that up

edit: idk if this is better or worse than the "workflow platform" that stored javascript in the db and would just append it to the page and run it to provide the actual "flow"

... . . ....... . .. .. .... what

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
remember terraframe?

i was completely serious about it being excellent course material, because of the poo poo like that thing Powerful Two-Hander is talking about.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Powerful Two-Hander posted:

if I remember I'll do some request sniffing and post the full horror but I am not making any of that up

edit: idk if this is better or worse than the "workflow platform" that stored javascript in the db and would just append it to the page and run it to provide the actual "flow"

we had some poo poo like this at my first job

that job taught me more about how to program (by teaching my how not to program) than any other job i've had. imo everyone should spend some time fighting a garbage heap

Luigi Thirty
Apr 30, 2006

Emergency confection port.

the reporting system of lastjob’s product stored report templates as a TEXT field in the db containing a large piece of XML that the software decoded into an SQL query

every time we upgraded reports broke and we had to go manually fix the XML in customers’ databases when they reported it

Gul Banana
Nov 28, 2003

Luigi Thirty posted:

the reporting system of lastjob’s product stored report templates as a TEXT field in the db containing a large piece of XML that the software decoded into an SQL query

every time we upgraded reports broke and we had to go manually fix the XML in customers’ databases when they reported it

i wrote a reporting system that's worse than this
reports are stored for each app as compiled code. they're authored in microsoft word, saved as rtf files containing Razor markup, which is then run through a compiler-as-a-service. RUNNING a report is a relatively trivial affair because they've been typechecked and everything, it just spits out your templated RTF - but getting them to actually compile involves hand tweaking and constant breaks

it's in active use in multiple applications :( developers can't stand it but business users looooove the thing because they can use Word.

here's the parser from an open-sourceised subset someone actually asked me to release: https://github.com/gulbanana/gillette/blob/master/gillette/CSTemplateParser.cs

simble
May 11, 2004

Ciaphas posted:

Ok so say I've done ten checkins to my branch on TFS/TFVC, to accomplish one or two overall changes or action items or whatever you wanna call them

I merge from main to my branch to get any changes, fix conflicts, and do one more checkin, then I merge from my branch to main and checkin

is there any way for my checkin comment on that last merge to be anything other than "merge from dev-jrn"? like a trail to the changesets that contributed to the merge?

i don't know wtf i'm doing in this UI, too used to git log

nope. tfvc branching is poo poo but what can ya do.

in reality it doesn't really matter. just use a commit message that describes what it's implementing/fixing. most of the time the details of the individual change sets underneath simply don't matter.

Powerful Two-Hander
Mar 10, 2004

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


Luigi Thirty posted:

the reporting system of lastjob’s product stored report templates as a TEXT field in the db containing a large piece of XML that the software decoded into an SQL query

every time we upgraded reports broke and we had to go manually fix the XML in customers’ databases when they reported it

oh poo poo we have this. someone set it up as a reporting component years ago (at least 10) and we've left it in place because replacing it is too much effort to replace and all reporting solutions suck to some extent. it does actually work pretty well all thing a considered, though occasionally someone accidentally creates a humongous join and locks up all db resources.

FamDav
Mar 29, 2008

Arcsech posted:

whenever a tech thing has "simple" in the name you can assume it is a complex hair all of awfulness

exhibit a: swf
defense counter evidence: sqs

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
sqs owns

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

Gul Banana posted:

i wrote a reporting system that's worse than this
reports are stored for each app as compiled code. they're authored in microsoft word, saved as rtf files containing Razor markup, which is then run through a compiler-as-a-service. RUNNING a report is a relatively trivial affair because they've been typechecked and everything, it just spits out your templated RTF - but getting them to actually compile involves hand tweaking and constant breaks

it's in active use in multiple applications :( developers can't stand it but business users looooove the thing because they can use Word.

here's the parser from an open-sourceised subset someone actually asked me to release: https://github.com/gulbanana/gillette/blob/master/gillette/CSTemplateParser.cs

this is counter-revolutionary thought

Arcteryx Anarchist
Sep 15, 2007

Fun Shoe

Luigi Thirty posted:

the reporting system of lastjob’s product stored report templates as a TEXT field in the db containing a large piece of XML that the software decoded into an SQL query

every time we upgraded reports broke and we had to go manually fix the XML in customers’ databases when they reported it

this kind of relates back to an earlier quote: all enterprise systems evolve to become poorly implemented attempts at a DSL

"if we just make the [reporting|*] system ~flexible~ enough, we won't need to hire as many programmers" -- every manager ever

"poo poo thats hard, what if we just use a database anti-pattern and be done with it?" -- enterprise programmers

Arcteryx Anarchist
Sep 15, 2007

Fun Shoe
sounds like im going to be on the swagger train on a project

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
at my job we use scala but we use a lot of java stuff (jackson, java enums, etc). this is usually not a problem but right now it TOTALLY SUCKS because I can't find a postgres sql library that's setup to handle both java and scala poo poo.

so i'm using slick, which is the most highly rated sql library for scala. so far I've only had to write a jackson adapter for it but i've got a sinking feeling this is going to be a total mess.

atm I'm trying to get the following relatively simple jsonb query to work:

code:
SELECT *
	FROM "FOO" WHERE butt_json->>'id' IN ('92c68c51-2070-4884-b660-41a2d23b9682', '9b7c9371-5b20-4cb1-b667-3188b6afabc2');
but it doesnt work and I'm pretty sure it's a bug. so I crack open the slick library to see if I can fix it and welp:

code:
    def ~>>[P2, R](index: Rep[P2])(implicit om: o#arg[Int, P2]#to[String, R]) = {
        om.column(jsonLib.BiArrow, n, index.toNode)
   }
loving no idea what's going on these two lines of code. i hate reading scala libraries.

also slick doesn't really support any json stuff because scala has 6 json libraries and they decided supporting them would be too difficult. so i'm using some guys extensions. ugh.

really wish we were just using java atm

DONT THREAD ON ME fucked around with this message at 00:09 on Aug 26, 2017

Carthag Tuek
Oct 15, 2005

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



code:
$ awk -F"\t" '{print $6}' output.csv | sort | uniq | wc -l
     219
my god....

the yospos number... could it be the prophecy is true.....

Corla Plankun
May 8, 2007

improve the lives of everyone

MALE SHOEGAZE posted:

atm I'm trying to get the following relatively simple jsonb query to work

has anyone ever seen a json/jsonb column that didn't almost immediately become a nightmare to work with? it reeks of "our group is not done designing this system but we ran out of time" to me

CLASS 2 PERVERSION
Jan 19, 2010
i really dislike slick. i always find it takes ages to find out how to do all but the simplest poo poo.

CLASS 2 PERVERSION
Jan 19, 2010
and i got bit by this the other day: https://github.com/slick/slick/issues/966

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Corla Plankun posted:

has anyone ever seen a json/jsonb column that didn't almost immediately become a nightmare to work with? it reeks of "our group is not done designing this system but we ran out of time" to me

i'm migrating a mongo db to postgres, and as much as I'd love to fully normalize the schema, there's almost no way I can achieve that without breaking poo poo. so the idea is to use jsonb as an escape valve.

a very small horse posted:

i really dislike slick. i always find it takes ages to find out how to do all but the simplest poo poo.

yeah i'm really getting there. none of the other options looked better but I'm going to try them because slick isn't good so far.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
maybe i can just use mybatis and handle manually mapping all the postgres datatypes into our scala datatypes. uuugh. really not pleased with scala right now.

gonadic io
Feb 16, 2011

>>=

MALE SHOEGAZE posted:

i'm migrating a mongo db to postgres, and as much as I'd love to fully normalize the schema, there's almost no way I can achieve that without breaking poo poo. so the idea is to use jsonb as an escape valve.


yeah i'm really getting there. none of the other options looked better but I'm going to try them because slick isn't good so far.

i've used squeryl which is dog poo poo and scalike jdbc which was fine but needed a good bit of boilerplate because all the queries and mappings are string sql statements

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

gonadic io posted:

i've used squeryl which is dog poo poo and scalike jdbc which was fine but needed a good bit of boilerplate because all the queries and mappings are string sql statements
thanks, scalalike looks tolerable

JewKiller 3000
Nov 28, 2006

by Lowtax

MALE SHOEGAZE posted:

postgres scala stuff

can't you use jooq or hibernate (ugh) or even straight jdbc, just like you would in java? write your queries in sql and don't rely on someone's translation layer... they probably don't support the latest jsonb features, and you aren't gonna get much out of the object mapping parts when your data is in json

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

JewKiller 3000 posted:

can't you use jooq or hibernate (ugh) or even straight jdbc, just like you would in java? write your queries in sql and don't rely on someone's translation layer... they probably don't support the latest jsonb features, and you aren't gonna get much out of the object mapping parts when your data is in json

yeah, if I give up on this that's one route I'll look at. i was overestimating the difficulty of translating between the java library and scala case classes (which is really not a big deal).

Workaday Wizard
Oct 23, 2009

by Pragmatica
god help me i have a graph problem tailor made for prolog :gonk:

how do i get started with prolog in 2017?

Elysiume
Aug 13, 2009

Alone, she fights.

Shinku ABOOKEN posted:

god help me i have a graph problem tailor made for prolog :gonk:

how do i get started with prolog in 2017?
I used prolog in my proglang class in college and had it on babby's first resume until someone told me that I shouldn't put something on my resume unless I'd want to work with it, thought about the idea of using prolog in a work capacity, and promptly removed it

gonadic io
Feb 16, 2011

>>=

MALE SHOEGAZE posted:

yeah, if I give up on this that's one route I'll look at. i was overestimating the difficulty of translating between the java library and scala case classes (which is really not a big deal).

it's not at all, using java libraries from scala is trivial - case classes are just regular classes with a bunch of helper fields/methods defined for you.

using scala libraries from java is possible but not worth it imo - especially because scala libraries tend to be worse.

gonadic io
Feb 16, 2011

>>=

Elysiume posted:

I used prolog in my proglang class in college and had it on babby's first resume until someone told me that I shouldn't put something on my resume unless I'd want to work with it, thought about the idea of using prolog in a work capacity, and promptly removed it

same but fortran

Workaday Wizard
Oct 23, 2009

by Pragmatica
ok so prolog sucks but does datalog suck too or not?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Shinku ABOOKEN posted:

god help me i have a graph problem tailor made for prolog :gonk:

how do i get started with prolog in 2017?

maybe Amzi?

I only know about them because they made some of their system Open Source

there's also SWI Prolog which has builds for the Mac and Windows

eschaton fucked around with this message at 09:40 on Aug 27, 2017

gonadic io
Feb 16, 2011

>>=
tps:

im the `if (statusCode == StatusCodes.Created.intValue) { `

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
it's been so long since i wrote sql that i can't remember how to do joins good

also holy poo poo pgadmin 4's ui on osx is really bad.

Workaday Wizard
Oct 23, 2009

by Pragmatica

MALE SHOEGAZE posted:

it's been so long since i wrote sql that i can't remember how to do joins good

also holy poo poo pgadmin 4's ui on osx is really bad.

gonadic io
Feb 16, 2011

>>=
Also just "JOIN" with no other qualifier is an inner join.

MononcQc
May 29, 2007

been playing with tun/tap to write little software that bridges connections and injects failures, delays, netsplits (and asymmetric ones too) here and there and it's being really fun :toot:

Next step is to make it work with cross-VMs on a host (shouldn't be hard, rather than a physical proxy) and then it's gonna be deep packet inspection, thinking of either blocking unsafe protocols, or of spoofing NTP packets to cause clock drift and break systems for fun.

NihilCredo
Jun 6, 2011

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

MALE SHOEGAZE posted:

it's been so long since i wrote sql that i can't remember how to do joins good

also holy poo poo pgadmin 4's ui on osx is really bad.
install dbeaver or datagrip

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

MononcQc posted:

been playing with tun/tap to write little software that bridges connections and injects failures, delays, netsplits (and asymmetric ones too) here and there and it's being really fun :toot:

Next step is to make it work with cross-VMs on a host (shouldn't be hard, rather than a physical proxy) and then it's gonna be deep packet inspection, thinking of either blocking unsafe protocols, or of spoofing NTP packets to cause clock drift and break systems for fun.

last time I did that, after finding out there isn't an official client library for the tun/tap device, I literally copy-pasted the entirety of openvpn in my project and commented out code until it compiled and worked

Adbot
ADBOT LOVES YOU

MononcQc
May 29, 2007

hackbunny posted:

last time I did that, after finding out there isn't an official client library for the tun/tap device, I literally copy-pasted the entirety of openvpn in my project and commented out code until it compiled and worked

I'm using a little lib called tunctl that gives an interface to read packets at the ethernet level directly out of the tap device, and then a packet codec for most standard packet formats to operate on them. For the most part I don't need to decode much since a lot of filtering rules can be enabled at a high level, particularly those having to do with just simulating bad lines.

So I just open two of these and write the output of one into the other (after transformations applied) and it works pretty well.

  • Locked thread