Fork me on GitHub
#off-topic
<
2017-06-09
>
qqq05:06:11

Besides, "datomic is the greatest" does the Clojure community have a strong stange on MySQL vs Postgres? [Especially in the context of AWS / AuroraDB ]

seancorfield06:06:04

@qqq I'm a big fan of MySQL -- it's what we use in production, with Tungsten for replication, and many 10's of millions of rows of data. That said, a lot of Clojurians who do SQL stuff seem to love PostgreSQL. I don't get it: PostgreSQL seems so weirdly non-standard to me.

dominicm07:06:41

seancorfield: part of it is just basic things like not requiring a copy to alter a table

dominicm07:06:25

seancorfield: the non standard things seem very well considered. Every dialect is pretty non standard in its own way now

agile_geek08:06:55

Yeah, alter table in MySQL has stung me a few times.

juhoteperi08:06:08

I find it strange to say Postgres is non-standard as being standard compliant is the major feature of Postgres

donaldball14:06:23

I have also used mysql in production with tables with 100s of millions of rows per partition and would recommend postgresql over it in a heartbeat. Mysql has some undesirable default behavior around type coercion, and some unfortunate deadlock behavior with index gap locking that have bitten me plenty of times. Notably though, postgresql now has pretty efficient serializable transactions using SSI which imho should be the default isolation level full stop.

seancorfield15:06:08

The non-standard stuff I meant for PostgreSQL was their extensions. I know they have a compliant core. Last time I tried to do anything serious with PG it's just felt like I was back working with Oracle again...

seancorfield15:06:48

I suspect my DBA might have different thoughts tho' -- I'll ask him about PG today.

donaldball15:06:30

All people of good will and taste agree that Oracle is The Worst 🙂

dominicm15:06:40

I believe plenty of workarounds exist for mysql now, but they are that, workarounds.

seancorfield16:06:20

My DBA is definitely not a fan of MySQL’s “clustering” options (which is why we’re using Tungsten — which is a whole other set of problems in and of itself).

val_waeselynck20:06:42

Features like upserts and JSON values are valuable too, last time I checked it seemed to me PG was ahead on these

donaldball20:06:28

Mysql has had upserts via ON DUPLICATE KEY UPDATE (and INSERT IGNORE, but that’s a terrrrible idea) for quite a bit longer than Postgresql. You’re spot on with the JSON and other rich field types though, in particularly geo-data.

qqq06:06:12

@seancorfield : which library do you use? I'lve looked at jdbc (too low level, I don't want to deal with strings) korma (macro magic? not sure I want ORM) honeysql (loks like what I want -- mninimal dsl -> sql) what is your team using?

seancorfield19:06:10

qqq: Sorry, only just noticed this (since it’s in #off-topic rather than #sql or #clojure ) — we use java.jdbc for all the basic stuff and then HoneySQL for complex queries. We particularly like the composability it brings. Watch my former colleague talk about our use of HoneySQL in this Clojure/West 2015 talk https://www.youtube.com/watch?v=alkcjyhesjI

juhoteperi08:06:18

@qqq jdbc, honeysql and hugsql are good choices depending on the needs, I have apps where all three are used depending on the use case

juhoteperi08:06:50

I'm not huge fan of honeysql DSL but it is useful for dynamically built queries

gko08:06:16

Talking about DB... Is mysql OK for like 1 million entries ?

dominicm08:06:44

relational dbs are fine at millions of rows. Postgresql can crunch through a 25 million row table in 10s for analytical-style queries.

gko08:06:37

Thanks... Another problem: I need to connect to Oracle 8.1.7 and newer version (like 11.x) and the drivers come as different jar (classes12.zip and ojdbc6.jar) but the used class is the same: oracle/jdbc/driver/OracleDriver.class => how would you deal with this? Currently, I generate two uberjar...

gko08:06:43

Searching the web, there seems to be no simple solution, maybe playing with class loader, etc...

mike_ananev11:06:20

Odersky talk about Dotty. He mentioned Rich Hickey and Simple made Easy talk.

mike_ananev11:06:14

IMHO, all Odersky's arguments about Simplicity, Power, tiny core lang are right, but about Clojure. Need take one more step - throw OOP and vuala - reinvent Clojur

sophiago00:06:29

mike1452: Scala is the last thing that comes to mind when I think "simple" :face_with_rolling_eyes:

dpsutton18:06:57

ah set theory

mobileink18:06:45

@dpsutton what contradiction are you looking for? i was talking generally, about negation.

captainlexington18:06:07

If (every? P {}) = true and (every? ~P {}) = true were a contradiction, wouldn't (every? P {}) = false and (every? ~P {}) = false also be?

dpsutton18:06:50

you seemed to take issue with the notion of (every? P []) => true. and i was wondering what contradiction this imposed

dpsutton18:06:13

> you don't have to give an example of false, all you have to do is derive a contradiction. in classic truth-conditional logic, at least. in constructive logic you do have to give an example.

mobileink18:06:00

@captainlexington i don't think your example counts as a contradiction.

captainlexington18:06:56

@mobileink You're right. It wouldn't be a contradiction if there were real elements in the set, like it would be with the true example

mobileink18:06:16

@dpsutton i don't think it involves a contradiction by the rules of classic FOL. my point was that FOL involves very counter-intuitive claims. this is one.

dpsutton18:06:29

ah yeah sure

dpsutton18:06:47

same thing with a false hypothesis makes an implication true

dpsutton18:06:02

False => anything is a true implication

mobileink18:06:35

cray cray, but true - within the system.

mobileink18:06:51

given (every? foo? []), if we could show there exists some element of [] for which foo? is true, we would have a contradiction. but we can't so that.

mobileink18:06:48

some? entails existence, every? doesn't. that's why constructivist logic is the logic used by FP. 😉

mobileink19:06:59

constructive logic disallows the Law of Excluded Middle. If you assume P and derive a contradiction, you cannot then infer ~P.

dpsutton19:06:14

i have no experience with that math

mobileink19:06:36

you have to produce (construct) a "witness" in order to prove anything.

dpsutton19:06:37

a standard proof technique is to assume, reach a contradiction and therefore you prove the negation of what you assumed

dpsutton19:06:49

yeah not a big fan of that

dpsutton19:06:56

for instance, they reject infinite sets

mobileink19:06:04

yeah, that's classic truth-conditional logic.

mobileink19:06:12

constructive logic is not truth-conditional. you don't prove that propositions are "true" in virtue of denoting some fact, you produce evidence that they are "inhabited".

mobileink19:06:47

infinite sets are a whole 'nother hairball.

mobileink19:06:25

for constructivists, you have to have a method for actually producing them. on grounds that e.g. "completed infinity" is nonsensical. what you need is a method that can "keep going". which avoids metaphysical mysteries.

mobileink19:06:21

try the intro and first chapter of https://homotopytypetheory.org/book/ . not exactly a walk in the park, but really fascinating. and very cutting edge.

dpsutton19:06:51

not looking into constructivist that much. i'm a halmos set guy through and through

dpsutton19:06:12

how does homotopy fit into what we've been talking about

mobileink19:06:41

not so much the homotopy part, but the type theory part. which is constructivist, which means: computational. ymmv, but that stuff changed my life, showed me a completely, radically different (and better imho) way of thinking about math, logic, and computation.

qqq22:06:20

@seancorfield : big fan of clojure tech talks; thanks for the link!