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
Luigi Thirty
Apr 30, 2006

Emergency confection port.

pram posted:

*generates code in a useless language

please don't talk about elm like that

Adbot
ADBOT LOVES YOU

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

lancemantis posted:

idk plenty of ORMs will generate a bunch of (garbage) objects from schema descriptions

see: hibernate :barf:

jOOQ owns because it just generates types and it does it's best ot just map your stuff so that it can be used like a real (typesafe) query, instead of trying to make everything a loving object.

code:
create.select(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME, count())
      .from(AUTHOR)
      .join(BOOK).on(AUTHOR.ID.equal(BOOK.AUTHOR_ID))
      .where(BOOK.LANGUAGE.eq("DE"))
      .and(BOOK.PUBLISHED.gt(date("2008-01-01")))
      .groupBy(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
      .having(count().gt(5))
      .orderBy(AUTHOR.LAST_NAME.asc().nullsFirst())
      .limit(2)
      .offset(1)

Shaggar
Apr 26, 2006

NihilCredo posted:

big difference between generating types from tables and generating types from queries

orms can generate types from queries too.

mybatis does it better tho where it just maps statements to queries and input and output to types.

Sapozhnik
Jan 2, 2005

Nap Ghost
Jooq seems tempting but I have an aversion to cutesy chaining tricks like those

akadajet
Sep 14, 2003

Shaggar posted:

orms are the worst.

they are bad.

you know what else is bad? stored procedures.

JawnV6
Jul 4, 2004

So hot ...

Star War Sex Parrot posted:

I don’t know what any of this means

i don't either but they're all very happy about it!! :shobon:

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

Sapozhnik posted:

Jooq seems tempting but I have an aversion to cutesy chaining tricks like those

idk i use it at work and it owns. handles all the little things like using fully qualified names (for example "schema"."table" in postgres).

plus its nice to know what poo poo will break at compile time when your schema changes during development

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
also it lets you define bindings so columns that are "timestamp with time zone" automatically become ZonedDateTime and "timestamps" are exposed as LocalDateTime. you can define custom type bindings for anything, based on the type or even based on identifier regex.

cinci zoo sniper
Mar 15, 2013




akadajet posted:

they are bad.

you know what else is bad? stored procedures.

my friend's former job used psql procedures for etl

cinci zoo sniper
Mar 15, 2013




re: sql tool chat. dbeaver felt a bit fucky, so i switched to sql workbench (the lovely looking java thing), and i couldn't be happier (i mean, unless job would get me a datagrip licence)

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 use pgcli

necrotic
Aug 2, 2005
I owe my brother big time for this!
Pgcli is alright for basic poo poo. Hell if I'm writing a big query with that though

Sapozhnik
Jan 2, 2005

Nap Ghost
Right, that's when I break out vi

Arcteryx Anarchist
Sep 15, 2007

Fun Shoe

I'm the unhashed passwords :smaug:

cinci zoo sniper
Mar 15, 2013







Sapozhnik posted:

Right, that's when I break out vi

I'm younger than 40

Sapozhnik
Jan 2, 2005

Nap Ghost
Pls don't vishame

Luigi Thirty
Apr 30, 2006

Emergency confection port.

we did it
https://twitter.com/LuigiThirty/status/892499134447587337

Doom Mathematic
Sep 2, 2008

CRIP EATIN BREAD posted:

jOOQ owns because it just generates types and it does it's best ot just map your stuff so that it can be used like a real (typesafe) query, instead of trying to make everything a loving object.

code:
create.select(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME, count())
      .from(AUTHOR)
      .join(BOOK).on(AUTHOR.ID.equal(BOOK.AUTHOR_ID))
      .where(BOOK.LANGUAGE.eq("DE"))
      .and(BOOK.PUBLISHED.gt(date("2008-01-01")))
      .groupBy(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
      .having(count().gt(5))
      .orderBy(AUTHOR.LAST_NAME.asc().nullsFirst())
      .limit(2)
      .offset(1)

But how do I do SQL injections now??

Shaggar
Apr 26, 2006

akadajet posted:

they are bad.

you know what else is bad? stored procedures.

lol no. stored procs are the best. not using stored procs is another sign of a bad developer along with use of p-langs or love of javascript.

jony neuemonic
Nov 13, 2009

cinci zoo sniper posted:

I'm younger than 40

dunno about pgcli, but psql will happily use whatever is in $EDITOR (or $VISUAL i can't remember which) when you use \e. it's good.

cinci zoo sniper
Mar 15, 2013




http://www.sql-workbench.net/ sql workbench link now that im at computer btw

jony neuemonic posted:

dunno about pgcli, but psql will happily use whatever is in $EDITOR (or $VISUAL i can't remember which) when you use \e. it's good.
eh dbeaver worked fine yeah - what i like about sql workbench is that i can configure it to auto-rollback and just be the analyst ghost i was ever destined to be, without locking something up with just a select due to my abysmal knowledge of inner workings of psql

cinci zoo sniper
Mar 15, 2013




also whoever mentioned the r plugin for idea, holy gently caress it's absolute garbage and 100% does not work on windows, with any version

and the dev hasn't checked in for weeks, good loving job!!

NihilCredo
Jun 6, 2011

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

cinci zoo sniper posted:

http://www.sql-workbench.net/ sql workbench link now that im at computer btw
eh dbeaver worked fine yeah - what i like about sql workbench is that i can configure it to auto-rollback and just be the analyst ghost i was ever destined to be, without locking something up with just a select due to my abysmal knowledge of inner workings of psql

dbeaver is the best psql tool i've found so far, will be checking out sqlworkbench now, thanks :)

small annoyance: why do java apps do that dumb "please google and download jdbc database drivers on your own"? i've run into that behaviour a few times now. why can't they just include them with the app, they're like 1MB each or less.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
Imma guess licensing

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

NihilCredo posted:

small annoyance: why do java apps do that dumb "please google and download jdbc database drivers on your own"? i've run into that behaviour a few times now. why can't they just include them with the app, they're like 1MB each or less.

they're probably not 1mb each, the oracle connection adapters are like 600mb or some bullshit

Powerful Two-Hander
Mar 10, 2004

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


what is the actual proper way to force IE to load in edge mode? I keep seeing 'set the doctype to html' and yet IE still ignores it if the user has set the browser to put the entire intranet domain in compatibility mode for some stupid reason

there are docs that say "use x-ua-compatible" then others that say it's deprecated and to use doctype.



also stored procedures are good and Dapper is good

entity framework is garbage

MononcQc
May 29, 2007

MononcQc posted:

yeah the key to keeping it working you need to ensure a good overall distribution. Fully randomized treaps (as they are originally intended) don't guarantee O(log n) but mathematically come pretty close to it no matter what. The question would be if there is such a metric or metric modification that could keep good overall tree balance while being able to bubble entries up (say, +1% to the weight when being picked, but -0.01% when being on the path but not selected), but also whether it would be faster still than just maintaining 3 distinct data structures for each use case.

I'd need to play with it to see how it goes, but so far I haven't taken the time for it.

Trip report: modified my little treap structure to allow a priority to rise to the top, using 100,000 entries and all random values 0 > N > 1 for weights. I then updated random items to have a top priority (0.9999) without any jitter, giving higher chances for unbalancing in there. The following tests were run:

  • 100 high-priority items; 100 reads of high priority, 1000 reads of random: 200% faster overall for the priority treap than regular treap
  • 10 high-priority items; 10 reads of high priority, 1000 reads of random: 33% faster overall
  • 10 high-priority items, 10 reads of high priority, 10000 reads of random: 12% faster overall
  • 1000 high-priority items, 10 reads of high priority, 10000 reads of random: ±10% difference overall, had one worse case of 170% performance loss, though I'm not sure if that's GC stalling things

That stuff is pretty neat. I haven't done tests with dynamic updates (where I assume memory shuffling is likely to lose a bunch of perf), but if you have some form of statistical analysis on the frequency of access (say, words of the english language), you're likely gonna get something pretty close to an optimal tree.

MononcQc fucked around with this message at 14:51 on Aug 2, 2017

Shaggar
Apr 26, 2006

Powerful Two-Hander posted:

what is the actual proper way to force IE to load in edge mode? I keep seeing 'set the doctype to html' and yet IE still ignores it if the user has set the browser to put the entire intranet domain in compatibility mode for some stupid reason

there are docs that say "use x-ua-compatible" then others that say it's deprecated and to use doctype.



also stored procedures are good and Dapper is good

entity framework is garbage

intranet sites always load in compatibility mode by default. using the <meta http-equiv="X-UA-Compatible" content="IE=edge" /> tag should take care of that. you can also set it as an http header so you don't have to do it for every application on a web server. you can also probably change it via gpo if all of your intranet sites work fine in edge mode.

Powerful Two-Hander
Mar 10, 2004

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


Shaggar posted:

intranet sites always load in compatibility mode by default. using the <meta http-equiv="X-UA-Compatible" content="IE=edge" /> tag should take care of that. you can also set it as an http header so you don't have to do it for every application on a web server. you can also probably change it via gpo if all of your intranet sites work fine in edge mode.

yeah we used to have that auto injected into the headers but some fucker seems to have disabled it


in other news: gently caress css and gently caress bootstrap

necrotic
Aug 2, 2005
I owe my brother big time for this!

cinci zoo sniper posted:

what i like about sql workbench is that i can configure it to auto-rollback

dbeaver has this too and its almost always on for me. how is auto completion in sql workbench? thats one thing i really like in dbeaver

cinci zoo sniper
Mar 15, 2013




necrotic posted:

dbeaver has this too and its almost always on for me. how is auto completion in sql workbench? thats one thing i really like in dbeaver

dbeaver has auto commit, but i wasn't able to find auto rollback. nothing to complain about autocompletion in workbench

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

NihilCredo posted:

small annoyance: why do java apps do that dumb "please google and download jdbc database drivers on your own"? i've run into that behaviour a few times now. why can't they just include them with the app, they're like 1MB each or less.

im guessing its because there's always different versions of the connectors and sometimes you want to use a different one?

also different connectors work with different java/jdbc versions so there's that too.

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen
it lets you choose the jdbc bug ensemble that'll perfectly complement your project

JewKiller 3000
Nov 28, 2006

by Lowtax

cinci zoo sniper posted:

my friend's former job used psql procedures for etl

what's wrong with that?

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
psql is cool and there's poo poo you can do in it that makes things way faster than plain SQL so i dont see what the problem is.

Shaggar
Apr 26, 2006

Powerful Two-Hander posted:

yeah we used to have that auto injected into the headers but some fucker seems to have disabled it


in other news: gently caress css and gently caress bootstrap

bootstrap is fine, less/sass are terrible.

cinci zoo sniper
Mar 15, 2013




JewKiller 3000 posted:

what's wrong with that?

apparently there's some kind of ridiculously large overhead compare to using, say, pentaho. don't ask me the details tho

Shaggar
Apr 26, 2006
idk about psql but in tsql you can do bulk direct table operations that are more efficient for large etl jobs

motedek
Oct 9, 2012

cinci zoo sniper posted:

also whoever mentioned the r plugin for idea, holy gently caress it's absolute garbage and 100% does not work on windows, with any version

and the dev hasn't checked in for weeks, good loving job!!

rstudio stamping on a human face forever then. i don't understand why it crashes when the R process segfaults.

Adbot
ADBOT LOVES YOU

There Will Be Penalty
May 18, 2002

Makes a great pet!

Shaggar posted:

less/sass are terrible.

shaggar was

wrong?

  • Locked thread