Clojure/flutter

1,942 views
Skip to first unread message

Gregg Reynolds

unread,
Apr 25, 2018, 5:42:23 PM4/25/18
to clo...@googlegroups.com
Flutter is looking pretty good to me.  Sure would be nice to have a clojure->flutter compiler. Anthing there, there?

Robert Levy

unread,
Apr 25, 2018, 6:01:49 PM4/25/18
to clo...@googlegroups.com
What would you say is the advantage of using Flutter instead of React Native?  Assuming you're not interested in Dart, what is the selling point?

On Wed, Apr 25, 2018 at 2:42 PM, Gregg Reynolds <d...@mobileink.com> wrote:
Flutter is looking pretty good to me.  Sure would be nice to have a clojure->flutter compiler. Anthing there, there?

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gregg Reynolds

unread,
Apr 26, 2018, 11:09:13 AM4/26/18
to clo...@googlegroups.com
On Wed, Apr 25, 2018 at 5:01 PM, Robert Levy <r.p....@gmail.com> wrote:
What would you say is the advantage of using Flutter instead of React Native?  Assuming you're not interested in Dart, what is the selling point?
 
I haven't used it yet but the interesting bits to me are efficiency (no Javascript bridge) and the user-space rendering pipeline. 


Gregg

Kees-Jochem Wehrmeijer

unread,
Apr 26, 2018, 2:06:49 PM4/26/18
to Clojure
Flutter definitely looks interesting, but I guess to make it work with Clojure would require writing a 'ClojureDart', i.e. a Clojure that compiles to Dart code. Given Dart sits somewhere between Java and Javascript, this is maybe not undoable, but would certainly be a lot of work. 

Gregg Reynolds

unread,
Apr 26, 2018, 3:11:42 PM4/26/18
to clo...@googlegroups.com


On Thu, Apr 26, 2018, 1:06 PM Kees-Jochem Wehrmeijer <hen...@gmail.com> wrote:
Flutter definitely looks interesting, but I guess to make it work with Clojure would require writing a 'ClojureDart', i.e. a Clojure that compiles to Dart code. Given Dart sits somewhere between Java and Javascript, this is maybe not undoable, but would certainly be a lot of work. 

Yeah. I wonder how much "a lot" is, given that we already have clojure, clojurescript, and the clojure .net compilers to steal from. Any idea how long it took to get to the first working clojurescript compiler?

Gregg Reynolds

unread,
Apr 26, 2018, 3:28:09 PM4/26/18
to clo...@googlegroups.com
Oh yeah, I forgot to mention: hot reloading! Have you heard of it? It's revolutionary! ;)

Gregg

Robert Levy

unread,
Apr 27, 2018, 2:35:46 PM4/27/18
to clo...@googlegroups.com
Oh yeah, I forgot to mention: hot reloading! Have you heard of it? It's revolutionary! ;)

Gregg

Yeah I've seen that somewhere before, I forget where... ;)

Robert Levy

unread,
Apr 27, 2018, 2:40:55 PM4/27/18
to clo...@googlegroups.com
dartjure?
darjure?
darture?
datura?

Well it's not just a question of how much effort it will take, but whether the interest in Dart as a target (pun intended?) would be high enough to sustain the project over time.

--

Gregg Reynolds

unread,
Apr 27, 2018, 3:02:01 PM4/27/18
to clo...@googlegroups.com


On Fri, Apr 27, 2018, 1:40 PM Robert Levy <r.p....@gmail.com> wrote:
dartjure?
darjure?
darture?
datura?



Well it's not just a question of how much effort it will take, but whether the interest in Dart as a target (pun intended?) would be high enough to sustain the project over time.

If it took 2 or 6 months to implement it would be worth it IMHO. 2 years? I dunno, a lot can happen in 2 years, like Google dumps it, or something even better comes along, or hw/SW improvements render the performance advantages of flutter moot.

Then there's the possibility of stealing flutter's thunder and writing clj->native compilers. Everybody wants that.

Gregg

Robert Levy

unread,
Apr 27, 2018, 3:06:14 PM4/27/18
to clo...@googlegroups.com

Then there's the possibility of stealing flutter's thunder and writing clj->native compilers. Everybody wants that.


That would be awesome!

Alan Moore

unread,
Apr 27, 2018, 8:22:16 PM4/27/18
to Clojure
Or maybe a WebAssembly or LLVM target. Lots of reach from those ;-)

Alan

Didier

unread,
Apr 28, 2018, 2:07:13 AM4/28/18
to Clojure
The thing about Clojure->native, is that Clojure needs a pretty powerful runtime.

So we'd need to piggy back on something native that similarly has a strong runtime. Common Lisp maybe, or Go.

I'd vote for Go.

Adam Tait

unread,
Apr 28, 2018, 6:40:03 PM4/28/18
to Clojure
I've been considering the same trade-offs recently. I looked at ClojureScript->RN but found the levels of indirection, the heavy number of libraries and lack of concurrency (important on mobile devices) make me unenthusiastic. I've also looked at Flutter (& DartLang) but coming from Clojure I wasn't excited about Dart, and Flutter also similarly lacked concurrency.

I landed on good ol' C++, bridged by Dropbox's djinni interface DSL + tooling (https://github.com/dropbox/djinni). Performance & compatibility were all there, plus it allows me more freedom to make trade-offs about what parts of my app are implemented in shared code - and what's implemented directly in native (ObjC/Swift or Java/Kotlin) or using libraries only available in those languages. Being C++, I should be able to use Scheme or Common Lisp though I haven't tried yet.

Estevo U. C. Castro

unread,
Apr 28, 2018, 9:00:19 PM4/28/18
to Clojure
Just in case you hadn't heard of this:

https://github.com/takeoutweight/clojure-scheme

Gregg Reynolds

unread,
Apr 28, 2018, 9:56:27 PM4/28/18
to clo...@googlegroups.com
On Sat, Apr 28, 2018 at 6:50 PM, Estevo U. C. Castro <eucc...@gmail.com> wrote:
Just in case you hadn't heard of this:

https://github.com/takeoutweight/clojure-scheme

Thanks. Alas, most recent update seems to be 5 years ago. :(

I know there have been some efforts along these lines but AFAIK they have all petered out.  Anybody have the latest dope? 

Estevo U. C. Castro

unread,
Apr 29, 2018, 4:50:22 PM4/29/18
to Clojure
This was apropos two points made in this thread:

- Clojure needing X from the runtime; my point here is that some Schemes may provide the things you'd demand from a native implementation: fast startup time, smallish binaries, etc., and even tail call optimization as a bonus, but also the drawbacks of a native implementation: mainly that you'd start with few libraries in comparison with the Java and JS implementations.

- A question about what would it take to make something like Clojurescript over again.  This implementation illustrates that you can reuse a lot of the work that was put into Clojurescript for new implementations.

IIRC this particular project petered out basically because the author didn't perceive much interest in this kind of thing from the Clojure community.  If that ever changes this project or something similar could be a good starting point for native-ish implementations.

Didier

unread,
Apr 29, 2018, 6:24:45 PM4/29/18
to Clojure
Honestly, I doubt any project will have more backing then Graal's native image.

So I think its the best shot at Clojure native we've ever had, and probably the ideal one at that, since it'll boast all existing libraries.

What could help is to then look at compiler options for Clojure that could help leverage native image, and lower the restrictions imposed by native image.

Gregg Reynolds

unread,
Apr 29, 2018, 6:36:45 PM4/29/18
to clo...@googlegroups.com


On Sun, Apr 29, 2018, 5:24 PM Didier <did...@gmail.com> wrote:
Honestly, I doubt any project will have more backing then Graal's native image.

Looking at Graal.  Indistinguishable from magic AFAIK.

So I think its the best shot at Clojure native we've ever had, and probably the ideal one at that, since it'll boast all existing libraries.

What could help is to then look at compiler options for Clojure that could help leverage native image, and lower the restrictions imposed by native image.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.

Robert Levy

unread,
May 30, 2018, 12:03:54 AM5/30/18
to clo...@googlegroups.com
A while ago David Kay wrote about clojure-clr + xamarin.  Does anyone have any success/horror stories going down that path? (It seems like Unity in Clojure is much more well-trodden, though not open source.)  CLR approaches may be a better option than React Native and the like, especially for using APIs like ARCore and ARKit that are not supported by React Native yet (and personally, AR is my motivation for getting into native app development to begin with.)

On Sun, Apr 29, 2018 at 3:36 PM, Gregg Reynolds <d...@mobileink.com> wrote:


On Sun, Apr 29, 2018, 5:24 PM Didier <did...@gmail.com> wrote:
Honestly, I doubt any project will have more backing then Graal's native image.

Looking at Graal.  Indistinguishable from magic AFAIK.

So I think its the best shot at Clojure native we've ever had, and probably the ideal one at that, since it'll boast all existing libraries.

What could help is to then look at compiler options for Clojure that could help leverage native image, and lower the restrictions imposed by native image.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.

Gregg Reynolds

unread,
Jun 25, 2018, 3:06:21 PM6/25/18
to clo...@googlegroups.com
On Thu, Apr 26, 2018, 10:08 AM Gregg Reynolds <d...@mobileink.com> wrote:


On Wed, Apr 25, 2018 at 5:01 PM, Robert Levy <r.p....@gmail.com> wrote:
What would you say is the advantage of using Flutter instead of React Native?  Assuming you're not interested in Dart, what is the selling point?
 
I haven't used it yet

Ok, I have now used Flutter. In mild anger: wrapped a c lib. That took a little doing. But the UI was a breeze. And it's fast. (Android only). I'm completely sold.

My guess is that it will quickly establish World Domination, or something very close to it. Technically it beats the snot out of the competition, imho.

Dart is not the worst language in the world, but it ain't clojure. My advice to the Clojure community: jump on this sucker now. Get in while the getting's hot.

There's not much I'd like better than writing a clojuredart engine, but I don't have the time or the chops, alas. But if it can be done for javascript why not dart?

G

vinurs zhang

unread,
Jun 27, 2018, 8:41:56 PM6/27/18
to Clojure
I'am also looking for the clojuredart so i can write flutter app with clojure

在 2018年4月26日星期四 UTC+8上午5:42:23,Gregg Reynolds写道:

Gal Dolber

unread,
Jun 27, 2018, 9:46:09 PM6/27/18
to clo...@googlegroups.com
I don't know much about dart. But most of the work on clojure-objc was to modify the clojure compiler to generate java instead of bytecode (and then convert the java source code to objc). The code is now outdated, but the same approach could be use here. 

I'm not sure if a java2dart converter exists, if so, it should be trivial to get clojure working on dart, otherwise the compiler could be modified to generate dart directly, but then you have to write the RT in dart.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Gal Dolber 
Reply all
Reply to author
Forward
0 new messages