Fork me on GitHub

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


@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.


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


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


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


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


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.


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...


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


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


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


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).


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


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.


@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?


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


@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


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


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


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


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 ( 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...


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


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


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


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


ah set theory


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


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


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


> 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.


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


@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


@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.


ah yeah sure


same thing with a false hypothesis makes an implication true


False => anything is a true implication


cray cray, but true - within the system.


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.


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


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


i have no experience with that math


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


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


yeah not a big fan of that


for instance, they reject infinite sets


yeah, that's classic truth-conditional logic.


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".


infinite sets are a whole 'nother hairball.


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.


try the intro and first chapter of . not exactly a walk in the park, but really fascinating. and very cutting edge.


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


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


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.


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