Re: Clojure and Python Flask

2021-01-09 Thread alexandr...@gmail.com
This shouldn't be a problem - you can send all Flask responses as JSON and it will work fine in CLJS. >From Flask, have a look at https://stackoverflow.com/questions/13081532/return-json-response-from-flask-view In Clojurescript, use for instance https://github.com/r0man/cljs-http to read

Clojure and Python Flask

2021-01-09 Thread Pascal Dutilleul
Does somebody has experience serving ClojureScript (Re-Frame) through Python Flask? Or even better integrating a Clojure app within an existing Flask app ? I need to add a new module to an existing Flask app and I’d like at least the frontend to be ClojureScript. What are the possibilities?

[ANN] Blog post about Clojure and Python Interop

2019-07-29 Thread Chris Nuernberger
We published a blog post about one specific but important tactic I used when writing libpython-clj in order to allow python to call clojure functions. I don't think this is necessary knowledge to use panthera or libpython-clj but it is a key piece to building a new binding to a C system elsewhere

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-12 Thread Daniel Gagnon
On Thu, Mar 8, 2012 at 10:53 AM, Timothy Baldridge tbaldri...@gmail.comwrote: What's the plan for ratios and characters? I assume they're still on the TODO list? (Maybe Issue 17 covers the ratios?) Yeah, I need to run a few more tests, but I'm thinking of somehow layering libgmp ontop of

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-12 Thread Timothy Baldridge
Why wouldn't Python fractions work as ratios? Actually Python fractions would work perfectly. And the decimal class in Python should be included as well. Thanks for pointing these libraries out to me! Timothy -- You received this message because you are subscribed to the Google Groups

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-12 Thread Daniel Gagnon
Actually Python fractions would work perfectly. And the decimal class in Python should be included as well. Thanks for pointing these libraries out to me! Timothy No problem. I really like how symbiotic with Python you are making this. -- You received this message because you are

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-12 Thread Daniel Gagnon
have translated over 235 functions from clojure.core. This is not a clojure interpreter in python; the Clojure-Py compiler compiles clojure code directly to python code. Clojure-py functions are python functions. Clojure-py types are python types, Clojure-py name spaces are python modules I'm

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-12 Thread Timothy Baldridge
but if it did use make RPython code, it'd be really awesome. Well that's the one part where Clojure and Python diverge. Clojure-py does not use Python's generators. This is because Python's generators are mutable. So that actually wont' be a problem. What is a problem though, is the way Clojure-py

[ANN] clojure-py 0.1.0 Clojure on Python

2012-03-08 Thread Konrad Hinsen
Timothy Baldridge writes: The Clojure-Py team is happy to announce the release of Clojure-Py 0.1.0. https://github.com/halgari/clojure-py This looks really nice already. Keep up the good work! For me, this could be the solution to the main problem I have with Clojure: the JVM. Most of my

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-08 Thread Timothy Baldridge
Congrat's on the release! I am getting the following error on my Macbook (running 64-bit Lion, Python 2.7.1) when trying to run sudo easy_install clojure-py: I've seen this once before, in Linux, I'll open a bug for it and see if we can get it ironed out. Timothy -- You received this message

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-08 Thread Daniel Janus
I'm seeing it on Arch Linux as well, using both pip2 and easy_install-2.7. Thanks, Daniel W dniu czwartek, 8 marca 2012, 12:00:24 UTC użytkownik tbc++ napisał: Congrat's on the release! I am getting the following error on my Macbook (running 64-bit Lion, Python 2.7.1) when trying to run sudo

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-08 Thread Timothy Baldridge
It seems to be a packaging issue. As an aside note, if you do a github checkout then run python setup.py install it seems to work just fine. But I'll look into this issue as well. Timothy 2012/3/8 Daniel Janus nath...@gmail.com: I'm seeing it on Arch Linux as well, using both pip2 and

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-08 Thread Laurent PETIT
/halgari/clojure-py Clojure-Py is an implementation of Clojure running atop the Python VM. As it currently stands, we have translated over 235 functions from clojure.core. This is not a clojure interpreter in python; the Clojure-Py compiler compiles clojure code directly to python code. Clojure-py

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-08 Thread Timothy Baldridge
in python; the Clojure-Py compiler compiles clojure code directly to python code. Clojure-py functions are python functions. Clojure-py types are python types, Clojure-py name spaces are python modules. Please feel free to browse the examples at https://github.com/halgari/clojure-py/tree/master

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-08 Thread Michael Wood
for ratios and characters? I assume they're still on the TODO list? (Maybe Issue 17 covers the ratios?) e.g.: $ python clojure.py clojure-py 0.1.0 user= \a Compiling \a Traceback (most recent call last): [...] CompilerException: Compiler Exception could not resolve '\a', '\a' not found in user

Re: [ANN] clojure-py 0.1.0 Clojure on Python

2012-03-08 Thread Timothy Baldridge
What's the plan for ratios and characters?  I assume they're still on the TODO list?  (Maybe Issue 17 covers the ratios?) Yeah, I need to run a few more tests, but I'm thinking of somehow layering libgmp ontop of Python in order to implement ratios. The lispreader needs to be fixed to handle

Re: clojure-py 0.1.0 Clojure on Python

2012-03-08 Thread Shantanu Kumar
On Mar 8, 7:22 pm, Timothy Baldridge tbaldri...@gmail.com wrote: Okay, the Python package should be fixed now. It took a few tries, but I was finally able to get it to include core.clj as part of the distro. Thanks, the install works for me now. However, when I run sudo clojurepy pressing

Re: clojure-py 0.1.0 Clojure on Python

2012-03-08 Thread Timothy Baldridge
It looks to be a bug with where the script is saving the history file. We have a bug report for it https://github.com/halgari/clojure-py/issues/41 and we'll look into it. Thanks! Timothy On Thu, Mar 8, 2012 at 1:11 PM, Shantanu Kumar kumar.shant...@gmail.com wrote: On Mar 8, 7:22 pm, Timothy

[ANN] clojure-py 0.1.0 Clojure on Python

2012-03-07 Thread Timothy Baldridge
interpreter in python; the Clojure-Py compiler compiles clojure code directly to python code. Clojure-py functions are python functions. Clojure-py types are python types, Clojure-py name spaces are python modules. Please feel free to browse the examples at https://github.com/halgari/clojure-py/tree/master

Re: clojure-py 0.1.0 Clojure on Python

2012-03-07 Thread Shantanu Kumar
is happy to announce the release of Clojure-Py 0.1.0. https://github.com/halgari/clojure-py Clojure-Py is an implementation of Clojure running atop the Python VM. As it currently stands, we have translated over 235 functions from clojure.core. This is not a clojure interpreter in python

Re: Clojure in Python

2012-03-02 Thread Daniel Gagnon
Well first of all, the real main drive, is that I don't know Java libs nearly as well as Python libs. Secondly, there's a lot of cruft (imo) in Clojure that doesn't need to exist in a dynamic VM. For instance, there's no reason to new up something with (Foo. 1 2). In python objects are

Re: Clojure in Python

2012-03-02 Thread Timothy Baldridge
On a similar note, are you using Python's approach to characters (they are simply a string of length 1)? Yes, that's exactly what we're doing. As an aside note, the fact that Python is so dynamic allows us to do some really interesting things with sequences:

Re: Clojure in Python

2012-03-01 Thread David Jagoe
Hi Timothy, Well first of all, the real main drive, is that I don't know Java libs nearly as well as Python libs. Yes please!!! I'd love to be able to use Python libs from a Clojure. Great work - I'll be following this with interest and would love to get involved. I've done a lot of advanced

Clojure in Python

2012-02-29 Thread Mark Rathwell
Not sure how many people have seen this, looks interesting though: https://github.com/halgari/clojure-py -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are

Re: Clojure in Python

2012-02-29 Thread Timothy Baldridge
we have about half of core.clj ported from JVM clojure to python clojure. Timothy (halgari) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated

Re: Clojure in Python

2012-02-29 Thread Sean Corfield
of core.clj ported from JVM clojure to python clojure. How is performance looking so far? I see some commits with notes about large relative improvements but I didn't see any benchmarks against JVM or other Clojure implementations... I would imagine startup time is pretty good? -- Sean A Corfield

Re: Clojure in Python

2012-02-29 Thread Mark Rathwell
Currently we have about half of core.clj ported from JVM clojure to python clojure. I know it's early, but have there been any thoughts/plans around interop and dependency management, possibly providing some sort of bridge between lein and pip/easy_install/virtualenv? And is performance

Re: Clojure in Python

2012-02-29 Thread Timothy Baldridge
for integrating clojure with python. So in a python program you can do this; import clojure import examples.factorial # where examples/factorial.clj exists somewhere in the search path Clojure-py functions are python functions, and deftypes are classes, so interop is actually really good so far

Re: Code introspection: Clojure vs Python

2009-12-14 Thread Dima Dogadaylo
Thanks, Konrad. clojure.lang.Compiler/LOCAL_ENV is what I need. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your

Code introspection: Clojure vs Python

2009-12-13 Thread Dima Dogadaylo
Is it possible to create a macros that knows from what function it was called and what variables (bindings) are defined in the caller function? For example following python code defines function print_env that prints name of function that called print_env() along with local variables of those

Re: Code introspection: Clojure vs Python

2009-12-13 Thread Konrad Hinsen
On 13 Dec 2009, at 11:18, Dima Dogadaylo wrote: Is it possible to create a macros that knows from what function it was called and what variables (bindings) are defined in the caller function? Yes. Look at the recent thread on debug REPLs: