This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (19)
- # boot (11)
- # cider (59)
- # cljs-dev (292)
- # cljsrn (2)
- # clojure (121)
- # clojure-brasil (19)
- # clojure-canada (2)
- # clojure-france (2)
- # clojure-italy (57)
- # clojure-spec (54)
- # clojure-uk (20)
- # clojurescript (83)
- # core-async (20)
- # cursive (5)
- # datascript (2)
- # datomic (10)
- # duct (25)
- # editors (4)
- # emacs (2)
- # fulcro (5)
- # funcool (1)
- # graphql (2)
- # immutant (8)
- # java (1)
- # jobs (4)
- # jvm (1)
- # keechma (5)
- # luminus (10)
- # off-topic (113)
- # om (36)
- # onyx (11)
- # parinfer (55)
- # pedestal (7)
- # protorepl (28)
- # re-frame (25)
- # reagent (6)
- # ring-swagger (1)
- # shadow-cljs (113)
- # spacemacs (1)
- # specter (23)
- # unrepl (8)
- # yada (8)
i thought clojure interop with python would be really useful, I'm thinking something like clojurescript, but for python instead. anyone else think this is a good idea?
I forget how many versions of that he’s done - at least a few if I remember correctly
if you mean pixie - it uses rpython to make a vm, but doesn’t have access to python at runtime
one of clojure's strengths is really the interop. every few days someone asks on r/clojure about clojure and data science
i think these questions would go away if there was a clojure that could interop with python
mutable closures, reference counting, reference counting that defults to borrowing (everything holds onto the head)
python is also rather slow, so if you want something liek clojure-py you need part of it to be in c
what about a clojure vm that knew how to consume the python wrappers of c and fortran stuff? (I ask, knowing nothing about how python ffi works or whether that question even makes any sense)
perhaps the real killer app for python in data science isn’t the wrapped libraries from c/fortran but the higher level stuff in python that consistently works together and builds on that - if so competing is going to be a lot more work
The other thing that makes this really hard is that it's hard to define what Clojure is.
Stuff like multi-arity functions don't exist in Python. So do we need to implement something like IFn and pay the cost of two dynamic dispatches on every function call?
What is even the core protocols needed by Clojure? CLJS and CLJ are really different in the protocol area, and some of the CLJS stuff is pretty JS specific.
so the few times I've looked into it I got bogged down in trying to figure out how to map Clojure semantics to Python
For example in Clojure falsey is nil and false. In Python it's: None, False,  and 0.
would you be interested in working on this again if you had someone to help you? 😛
I bet you could get some traction with a docker image set up to run jvm clojure using blas and some good matrix and stats libs out of the box
@ackerleytng I'd be willing to give people pointers. But at this point if I'm going to write a language, there's other non-Clojure concepts I want to explore.
That's basically what core.matrix is. And neanderthal already wraps this stuff in a very strong robust API. Generally, things in the data science front are starting to settle and accelerate. #data-science is the 'de facto place' to hang out for this.
@tbaldridge ok first question! how did you even start? by reading the clj/cljs implementation first?
pretty much, the stuff in clojure.lang is pretty simple. A good way to start is by looking at clojure/core.clj and seeing what stuff like conj calls, then dig into clojure.lang.RT, and that then takes you into all the other code.
No Clojure implementation out there has first-class Vars and protocols on the bottom.
Python could have both, but that's a really nasty chicken-egg problem. To get vars you need hashmaps, and some other structures. To get that you need protocols. Protocols are stored in Vars....
I've played with fully self-hosted clojure a bunch of times and that's always been the biggest headache
@tbaldridge you don't actually need hashmaps tho, there's a few tricks you can play to defer hitting code paths where those would be needed, until they are defined
I found that a bigger headache than the circular dep between vars and protocol is the one between vars, namespaces and symbols
which makes me think -- I've heard RH say that if he was to redo the var/ns system he would make it significantly less reified
Well if it’s indistinguishable from magic then it must be sufficiently advanced
It's pretty much what you'd expect if you built Clojure on .NET and used OCaml as a base instead of lisp.
I like it but never liked the non windows environment for it although I hear it's better now
I love the contrapositive of Clark's third law: Any technology distinguishable from magic is insufficiently advanced.
F#'s tooling was pretty rough last I tried. It also ends up being pretty verbose at times.
have you used opam? it’s a little clunky but at least it does switchable version isolations