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
Notorious b.s.d.
Jan 25, 2003

by Reene

Shaggar posted:

you cant do sp calls in hibernate without serious pain.

it is a superset of mybatis statement mapping, which i thought you enjoyed

alternatively hibernate also lets you just call SPs directly with a single method call and not have any SP mapping poo poo at all, like jdbc, but get back a useful object (in this case a Cat)
Java code:
sess.createSQLQuery("CALL get_cats()").addEntity(Cat.class);
where is the serious pain?

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->

Notorious b.s.d. posted:

where is the serious pain?

shaggars brain hurts when it doesn't look like the code he would write

Shaggar
Apr 26, 2006

JewKiller 3000 posted:

2 posts between shaggar claim and shaggar backpedal, a new record?

I thought he was doing sql but hes not. of course sql server isn't gonna be able to do non sql stuff without added effort.


Notorious b.s.d. posted:

it is a superset of mybatis statement mapping, which i thought you enjoyed

alternatively hibernate also lets you just call SPs directly with a single method call and not have any SP mapping poo poo at all, like jdbc, but get back a useful object (in this case a Cat)
Java code:
sess.createSQLQuery("CALL get_cats()").addEntity(Cat.class);
where is the serious pain?

unless hibernate has changed recently it doesn't do statement mapping. mybatis is a completely separate project that was started specifically cause doing procs in hibernate sucked. like you cant do a proc that doesn't return a result set.

also doing sql in code is dumb

Nomnom Cookie
Aug 30, 2009



Ronald Raiden posted:

wait whats wrong with python scope?

its almost-but-not-really lexical scope and its rly annoying

Shaggar posted:

I thought he was doing sql but hes not. of course sql server isn't gonna be able to do non sql stuff without added effort.

ama i understanding you correctly that geospatial data is "not sql"

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Nomnom Cookie posted:

ama i understanding you correctly that geospatial data is "not sql"

idk you can run geospatial queries in postgres 'til the cows come home

if you've got a shitload of money to hire a license consultant and then figure out how many cores are in your servers and sockets and spend like six or seven figures on geospatial support in oracle too

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

yea its humorously thin as i expected

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Cocoa Crispies posted:

idk you can run geospatial queries in postgres 'til the cows come home

if you've got a shitload of money to hire a license consultant and then figure out how many cores are in your servers and sockets and spend like six or seven figures on geospatial support in oracle too

tjhrow it into mongodb

Star War Sex Parrot
Oct 2, 2003

hey rocketsauce we miss you in the cat thread

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

vapid cutlery posted:

tjhrow it into mongodb

why use mongo when rm is much easier to administer

tef
May 30, 2004

-> some l-system crap ->

Nomnom Cookie posted:

ama i understanding you correctly that geospatial data is "not sql"


[img crying-jim-gray]

Notorious b.s.d.
Jan 25, 2003

by Reene

Shaggar posted:

unless hibernate has changed recently it doesn't do statement mapping. mybatis is a completely separate project that was started specifically cause doing procs in hibernate sucked. like you cant do a proc that doesn't return a result set.

hibernate 3 came out nine years ago dude

Shaggar posted:

also doing sql in code is dumb

yes it is

Notorious b.s.d. fucked around with this message at 05:05 on Jul 26, 2013

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

Cocoa Crispies posted:

if you've got a shitload of money to hire a license consultant and then figure out how many cores are in your servers and sockets and spend like six or seven figures on geospatial support in oracle too

man this is what my company needs to do because every time we set up an oracle spatial database, the performance is terrible and it shits itself on a regular basis. can't do that though because we gotta meet this stupid schedule!!!!

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
anyone recommend a book on programming language design? like call by value vs reference, different kinds of typing, different kinds of dispatch, etc

basically all the stuff this thread keeps making me run to wikipedia for

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Star War Sex Parrot posted:

hey rocketsauce we miss you in the cat thread

like everything else in my life when it gets out of hand i just pretend it doesn't exist. i think i have like 4000 unread posts in there. sorry, i'll catch up

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

coffeetable posted:

anyone recommend a book on programming language design? like call by value vs reference, different kinds of typing, different kinds of dispatch, etc

basically all the stuff this thread keeps making me run to wikipedia for

I recommend the series Goosebumps by R.L. Stine

Star War Sex Parrot
Oct 2, 2003

vapid cutlery posted:

like everything else in my life when it gets out of hand i just pretend it doesn't exist. i think i have like 4000 unread posts in there. sorry, i'll catch up
you missed some serious poo poo

take it at your own pace

JewKiller 3000
Nov 28, 2006

by Lowtax

coffeetable posted:

anyone recommend a book on programming language design? like call by value vs reference, different kinds of typing, different kinds of dispatch, etc

basically all the stuff this thread keeps making me run to wikipedia for

http://www.cis.upenn.edu/~bcpierce/tapl/

zokie
Feb 13, 2006

Out of many, Sweden

Shaggar posted:

w/ checked exceptions, the compiler informs you about the possible errors and asks you to handle them
w/ option types, the compiler informs you that you should read the code or ask the developer about what is going on because it has no idea

Refactored some code and suddenly a new type of exception can be thrown, welp
I guess everyone that uses my library just got shaggared

Workaday Wizard
Oct 23, 2009

by Pragmatica

zokie posted:

Refactored some code and suddenly a new type of exception can be thrown, welp
I guess everyone that uses my library just got shaggared

exceptions are part of the interface

if you gently caress with the interface then the users are hosed regardless

zokie
Feb 13, 2006

Out of many, Sweden
And then I cant properly handle the exception when initially caught, so I have to break the interface for an arbitrary number of things just because checked exceptions.

Workaday Wizard
Oct 23, 2009

by Pragmatica
how will option types solve that?

the user still needs to change their code

the compiler might not complain about it (e.g. they match non-success with underscore) but if they don't change it they'll get undefined behavior

score one for exceptions

zokie
Feb 13, 2006

Out of many, Sweden
It lets them handle exceptions where they find it suitable, and let them decide on whatever they want to do. Instead of forcing them to jump through hoops to make stuff compile. I mean, it's not like they are enforced on the lower levels it's just an annoying gatekeeper. Java does not need them to function!

Zombywuf
Mar 29, 2008

Cocoa Crispies posted:

why use mongo when rm is much easier to administer

Workaday Wizard
Oct 23, 2009

by Pragmatica

zokie posted:

It lets them handle exceptions where they find it suitable, and let them decide on whatever they want to do. Instead of forcing them to jump through hoops to make stuff compile. I mean, it's not like they are enforced on the lower levels it's just an annoying gatekeeper. Java does not need them to function!

lesse the option type solution. we have two types of users:
1) users that match against all possible options:
these guys get a compile error (missing case) to modify their code in response to interface change. no improvement over exceptions
2) users that match against success and lump everything else in one case:
these guys don't even get a warning what the gently caress happened. if you throw your new error type in the library they have undefined behavior. (e.g. your library hosed with some stateful thing). worse than exceptions


principle of least astonishment etc etc

Shaggar
Apr 26, 2006

zokie posted:

It lets them handle exceptions where they find it suitable, and let them decide on whatever they want to do. Instead of forcing them to jump through hoops to make stuff compile. I mean, it's not like they are enforced on the lower levels it's just an annoying gatekeeper. Java does not need them to function!

if you change the api enough that its returning a new error and you don't do something that's gonna fail to compile, they're never going to know about your change and if it starts loving up return values (ex: returning nothing instead of a value) they're never going to know about it and now you've ruined their application.

although if you think making programmers aware of api error changes is "jumping through hoops" then you probably wont ever get it. having the compiler error cause of new checked exceptions is one of the best parts of checked exceptions.

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.
just version your apis and don't make breaking changes?

idk works on my machine

Shaggar
Apr 26, 2006
sure, but what's a programmer more likely to do when upgrading a library:
1) read the documentation carefully for changes
2) slam it in and mash compile w/out thinking

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

vapid cutlery posted:

tjhrow it into mongodb

no don't

Cocoa Crispies posted:

why use mongo when rm is much easier to administer

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
presented w/o comment http://www.leafpetersen.com/leaf/publications/hs2013/haskell-gap.pdf

Nomnom Cookie
Aug 30, 2009



Shinku ABOOKEN posted:

lesse the option type solution. we have two types of users:
1) users that match against all possible options:
these guys get a compile error (missing case) to modify their code in response to interface change. no improvement over exceptions
2) users that match against success and lump everything else in one case:
these guys don't even get a warning what the gently caress happened. if you throw your new error type in the library they have undefined behavior. (e.g. your library hosed with some stateful thing). worse than exceptions


principle of least astonishment etc etc

that sounds like a sum type. an option type looks like this:
code:
data Maybe a = Just a | Nothing
it's a nullable type if null wasn't a terrible hack

hobbesmaster
Jan 28, 2008

haskell faster than terrible c code

good c code faster than haskell

i'm shocked.

Nomnom Cookie
Aug 30, 2009



hobbesmaster posted:

haskell faster than terrible c code

good c code faster than haskell

i'm shocked.

for most of the benchmarks the cs 102 code is faster than the authors' haskell compiler. GHC is wandering around in p-lang territory

uG
Apr 23, 2003

by Ralp

Shaggar posted:

sure, but what's a programmer more likely to do when upgrading a library:
1) read the documentation carefully for changes
2) slam it in and mash compile w/out thinking

so bend over backwards for the idiots from #2 ok got it

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

uG posted:

so bend over backwards for the idiots from #2 ok got it

That's what programming is about, meditate on this knowledge and then kill yourself

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

uG posted:

so bend over backwards for the idiots from #2 ok got it

if you have the choice not to, you're far luckier than the rest of us

uG
Apr 23, 2003

by Ralp
if you arent going to read my documentation then i dont want you using my libraries in the first place. or, gasp, check the changelog!

Nomnom Cookie
Aug 30, 2009



i read the changelog after a major version bump. use semantic versioning, assholes

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

Shaggar posted:

sure, but what's a programmer more likely to do when upgrading a library:
1) read the documentation carefully for changes
2) slam it in and mash compile w/out thinking

Shaggar posted:

some programmers are bad so we should give up and not have good tools. let me tell you about my python library....

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

I'm the ninja C.

Adbot
ADBOT LOVES YOU

Posting Principle
Dec 10, 2011

by Ralp
i like the idea of haskell because i'm lazy and love making the compiler do all the work, but i can never get through the syntax because i'm a bad/shallow programmer. someone sell me on it. or don't. god bless

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