[Blog]: Clojurescript, Ionic framework, Helix & refx example

2023-03-16 Thread Marko Kocić
Hi everyone,

I wrote a third example application of Clojurescript using Ionic framework, 
Helix react library and refx as re-frame replacement

Blog post: https://marko.euptera.com/posts/ionic-clojure-helix.html
Source code: 
https://github.com/markokocic/ionic-clojurescript-todo/tree/blog-post-3

Cheers,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/f2d6475a-a1e1-4d84-8e6c-b2710773aa3fn%40googlegroups.com.


Blog post about using htmx with Kit Framework

2022-07-18 Thread Marko Kocić
Hi everyone,

I wrote a blog post explaining the usage of the new :kit/htmx module that 
can be used to get started with the development of the htmx 
 based applications with kit framework 
.

You can check it out here: https://marko.euptera.com/posts/htmx-kit.html

Cheers,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/225259b5-4bf6-48d6-9b8e-c9203762755fn%40googlegroups.com.


Re: Developing Ionic application using Clojurescript

2022-02-23 Thread Marko Kocić
Posted an update to the same blog post how to configure webpack to play 
together with shadow-cljs, since Ionic framework requires webpack packaging.

https://marko.euptera.com/posts/ionic-clojure-todo-example.html


Marko Kocić schrieb am Montag, 21. Februar 2022 um 16:00:37 UTC+1:

> I wrote an updated tutorial about developing Ionic application using 
> Clojurescript and shadow-cljs, this time completely ignoring Ionic tooling 
> and using trusted Clojurescript tools.
>
> https://marko.euptera.com/posts/ionic-clojure-todo-example.html
>
> Feedback wellcome.
>
> Cheers,
> Marko
>
> Marko Kocić schrieb am Montag, 14. Februar 2022 um 17:31:11 UTC+1:
>
>> I made a blog post with instructions how to use Clojure instead of 
>> Typescript or Javascript to develop an application using the latest version 
>> of the cross-platform Ionic Framework.
>>
>> https://marko.euptera.com/posts/ionic-clojure.html
>>
>> This should bring another option to develop mobile applications using 
>> Clojurescript, besides React Native, of course.
>>
>> Did anyone else also used Ionic with Clojure? What are your impressions.
>>
>> Best regards,
>> Marko
>>
>

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/69c9911c-6f16-4f07-9c81-8e73c71ac728n%40googlegroups.com.


Re: Developing Ionic application using Clojurescript

2022-02-21 Thread Marko Kocić
 I wrote an updated tutorial about developing Ionic application using 
Clojurescript and shadow-cljs, this time completely ignoring Ionic tooling 
and using trusted Clojurescript tools.

https://marko.euptera.com/posts/ionic-clojure-todo-example.html

Feedback wellcome.

Cheers,
Marko

Marko Kocić schrieb am Montag, 14. Februar 2022 um 17:31:11 UTC+1:

> I made a blog post with instructions how to use Clojure instead of 
> Typescript or Javascript to develop an application using the latest version 
> of the cross-platform Ionic Framework.
>
> https://marko.euptera.com/posts/ionic-clojure.html
>
> This should bring another option to develop mobile applications using 
> Clojurescript, besides React Native, of course.
>
> Did anyone else also used Ionic with Clojure? What are your impressions.
>
> Best regards,
> Marko
>

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/8a10adc5-88ac-4622-94c2-6e50aad7a183n%40googlegroups.com.


Developing Ionic application using Clojurescript

2022-02-14 Thread Marko Kocić
I made a blog post with instructions how to use Clojure instead of 
Typescript or Javascript to develop an application using the latest version 
of the cross-platform Ionic Framework.

https://marko.euptera.com/posts/ionic-clojure.html

This should bring another option to develop mobile applications using 
Clojurescript, besides React Native, of course.

Did anyone else also used Ionic with Clojure? What are your impressions.

Best regards,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/cfdaa9e6-b0e6-4cc8-8b19-3272f91e5acan%40googlegroups.com.


Re: Why clojure does not have pure lazy-evaluation like Haskell ?

2014-07-08 Thread Marko Kocić
Clojure doesn't have lazy evaluation because it is a few years younger 
and didn't want to repeat Haskell's mistake. Even Simon Payton Jones, the 
creator of Haskel, confessed that, if he would make Haskel again, he would 
make it strict, and not lazy, but that it's too late to change it.

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Does Pedestal have a future in the long run

2013-11-07 Thread Marko Kocić
Hi all,

I'd like to hear opinions about Pedestal from the people that have been 
playing more with it. Right now I started looking at it, and like some of 
the things, but not sure should I invest more time learning it. While I do 
like some concepts, I'm not sure is it going to became abandonware like 
Clojurescript One (does anyone reemembers it anymore).

So far, after initial splash, I haven't seen large community interest in 
it. The number of aproachable getting started guides and hands on tutorials 
is missing. That might change over time, but I'm afraid that next year this 
time we'll get another Clojurescript one page application framework not 
much related with Pedestal. How serious Cognitect/Relevance is about it?

Best regards,
Marko

-- 
-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Natively Compiled Clojure

2013-01-25 Thread Marko Kocić


On Friday, January 25, 2013 6:12:07 AM UTC+1, Mikera wrote:

 A natively compiled Clojure would be very very interesting (perhaps 
 targeting LLVM?)

 However it would also be very hard to implement. Clojure depends on a lot 
 of features provided by the JVM (JIT compilation, interop with Java 
 libraries, garbage collection being the most significant ones). It would be 
 very hard to reimplement all of these from the ground up. The JVM is 
 already a very good host platform, why fix something that isn't broken?


What about native ClojuresScript? It doesn't have to implement everything 
Clojure have already, and many people could consider it good enough 
alternative to Clojure. I could personally live without runtime macros and 
eval if it would gain me small and performant native executable. 
 

 Arguably the effort would be better spend improving the JVM with extra 
 features that would help Clojure (e.g. TCO). 

 On Tuesday, 22 January 2013 00:29:54 UTC+8, octopusgrabbus wrote:

 I use Clojure primarily as a very reliable tool to aid in data 
 transformations, that is taking data in one application's database and 
 transforming it into the format needed for another applications' database.

 So, my question is would a natively compiled Clojure make sense or turn 
 the language into something that was not intended? In almost all instances 
 I have not found a problem with Clojure's execution speed so my question is 
 not about pro or anti Java.

 Thanks.



-- 
-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Why is a non-transient `into` faster than the built-in one?

2012-11-04 Thread Marko Kocić
I get big fluctuation in results for bot naive-into and into, ranging from 
400ms to 1500ms.
This is probably because of the GC kicking in and influencing timings.

Changing timings to something like:
 (System/gc) (time (do (into #{} (range 1e6)) nil))
and
 (System/gc) (time (do (naive-into #{} (range 1e6)) nil))
gives much more consistent results with almost no variance, and on my box I 
get ~380 for into, and ~580 for naive-into

Cheers,
Marko

On Sunday, November 4, 2012 8:36:19 AM UTC+1, Satoru Logic wrote:

 Hi, I'm using Clojure1.4.0, Java1.6 on MacOS.


 user= (clojure-version)
 1.4.0

  

 ~ satoru$ java -version
 java version 1.6.0_35
 Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
 Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)


 On Sunday, November 4, 2012 2:18:15 PM UTC+8, Herwig Hochleitner wrote:

 On my repl into is consistently faster.
 What versions of clojure, java and the OS are you running?



-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Why is a non-transient `into` faster than the built-in one?

2012-11-04 Thread Marko Kocić


On Sunday, November 4, 2012 11:41:23 AM UTC+1, Satoru Logic wrote:



 On Sunday, November 4, 2012 6:20:37 PM UTC+8, Marko Kocić wrote:

 I get big fluctuation in results for bot naive-into and into, ranging 
 from 400ms to 1500ms.
 This is probably because of the GC kicking in and influencing timings.

 Changing timings to something like:
  (System/gc) (time (do (into #{} (range 1e6)) nil))
 and
  (System/gc) (time (do (naive-into #{} (range 1e6)) nil))
 gives much more consistent results with almost no variance, and on my box 
 I get ~380 for into, and ~580 for naive-into


 I still can't get consistent results with this.

 BTW, what does System/gc do, I can't use `doc` on it.
  

System/gc is a call to Java System.gc() which basically hints the JVM to 
run garbage collector. Whether it will actually run it depends on many 
factors, like your java version, various GC settings and memory settings. 
If you don't specify those settings on the cmdline, java decides on its own 
based on your system. It is quite possible that it just has to trigger 
garbage collector during execution of timing on your system, while it 
doesn't have to on my system. I'm running jdk 1.7 on 64bit linux, btw.

You can find more details of GC tuning here: 
http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html

Cheers,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Clojure on embedded java?

2012-09-11 Thread Marko Kocić
As you might know, Oracle recently released Embedded Java which purpose is to 
be used on memory and CPU constrained devices. I see that some people reported 
that Clojure works with it, and that performance is excellent, but the question 
is have someone tried using it for non trivial applications. One possible use 
case would be to use it with Heroku since Heroku dyno might be considered as 
embedded device. Custom built pack would be needed though.

Cheers,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ANN: ClojureScript revision 927 release

2012-01-23 Thread Marko Kocić
Nice.
All we need now is clojurescriptone release and lein plugin.

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ANN: clojure.java.jdbc 0.0.7

2011-10-13 Thread Marko Kocić
Looking at the log seems like MS Access doesn't support prepared statements.
It shouldn't have anything to do with jdbc.

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Deamons in Clojure (was Re: Clojure vs Scala - anecdote)

2011-09-07 Thread Marko Kocić
Thanks for the tip about jsvc. I'll give it a try. Do you have some script 
examples to share, since having Linux service is exactly what I need?

Thanks,
Marko 

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Distributing ClojureScript Libraries packaging/dependencies

2011-08-09 Thread Marko Kocić
If you mark your public functions with ^:export, even advanced optimization 
will keep those functions intact.
You can campile your library into js, and distribute that file.
You can use this compiled file just as any other Closure compatible 
javascript library.

Regards,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Are there potential licensing issues of doing a fully packaged ClojureScript zip for Windows ?

2011-08-04 Thread Marko Kocić
Well, even better would be able to have ClojureScript distribution as 
:dev-dependency in leiningen, and lein cljs plugin where you could specify 
what gets compiled where in project .xml file.

Regards,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Clojurescript - Javascript constructor and namespace with the same name problem

2011-07-28 Thread Marko Kocić
Hi all,

When dealing with ClojureScript and Closure library it happens pretty often 
that Closure namespace is in the same time constructor for some object.

Take a look for this example:

(ns notepad
  (:require 
 [goog.dom :as dom]
 [goog.ui.Zippy :as Zippy]))

First, require forces me to require goog.ui.Zippy as Zippy and later in the 
code I have to use fully qualified name instead of provided one.

This works
(goog.ui.Zippy. headerElement contentElement)

This doesn't work, since Zippy is namespace declaration
(Zippy. headerElement contentElement)

I know that we can't have both namespace and function with the same name, 
but this is pretty frequent situation in Closure library, and is a bit 
awkward.
One solution would be that namespace :as symbol is specialcased so that 
without namespace prefix Zippy and Zippy. works like a regular function, and 
when in place of namespace prefix, it works as a namespace prefix. That 
would be pretty in line with Closure library itselfi.

Then we would be able to use
(require [goog.ui.Zippy :as Zippy])
(def z (Zippy. ttt sss)) ;; same as calls goog.ui.Zippy.
(Zippy/someMethod x) ;; same as goog.ui.Zippy

What would be your proposal for this?

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

ClojureScript - why is javascript object array and not a map?

2011-07-27 Thread Marko Kocić
Note the following code that works:

(defn ^:export displayPlain [id]
  (let [h (.getElementById window/document id)
txt (aget h innerText)]
(window/alert (str plain  txt))
(aset h innerText here I am!)))
Here, javascript object h is treated as array, and I was able to get and 
set its value (since it is mutable).

Note that the following code doesn't work, since h is not a map, and thus we 
can't access its properties neither as keywords nor as names.

(defn ^:export displayPlain2 [id]
  (let [h (.getElementById window/document id)
;; txt (get h innerText)
txt (:innerText h)]
(window/alert (str plain  txt

This makes dealing with js objects a bit mor verbose than clojure maps. It 
would be good if Clojure maps and JS object would be interchangeable from 
ClojureScript code.

Would it make sense to open a bug/feature for this?

I know that this is doable using closure library, but it would be nice if it 
could be easily doable using plain objects.
(defn ^:export display [id]
  (let [h (dom/getElement id)
txt (dom/getTextContent h)]
(window/alert (str gdom  txt

Regards,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: [ANN] ClojureScript

2011-07-21 Thread Marko Kocić
Where is the bug tracker for ClojureScript?

For example I would like to report that windows scripts are missing.

Regards,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

FleetDB or other NoSQL store for Clojure?

2011-07-15 Thread Marko Kocić
Hi all,
I would like to try out some of those no-sql datastores for my next 
project, and need an advice which one, since I never used the one before.
It needs to fulfill at least some of those following criteria, in order of 
importance:

- is nicelly supported by Clojure (by this I mean idiomatic clojure 
driver, not java plain java wrapper)
- it should be schemaless
- it should support transactions
- it's good if it can be used as embedded db
- it doesn't have to support large datasets (in-memmory is ok)
- it has to run on both Windows and Linux

My first choice would be FleetDB, since it was written in Clojure and 
examples look nice, but I'm not sure if it is abandonware or not, and I 
havent heard that people are actually using it in production.

What are my other options?

Regards,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Multiple slime instances in Emacs

2011-07-09 Thread Marko Kocić

On Friday, July 8, 2011 2:56:42 PM UTC+2, Stefan Kamphausen wrote:

 I don't know of any way to have different SLIMEs in one Emacs.  In the past 
 I used to call Emacs with different init-files for that, but it's not nice.

That works, but requires one to restart Emacs every so often. Not so 
convenient if you are used to emacs --deamon.
 

 However, given the differences between Clojure and CL an 'official' fork of 
 SLIME ('JIME', 'SLJME'? ;-) for Clojure might be the way to go.  Can't tell.

I don't know if fork and rename is a good choice. Lisp community is already 
fragmented, no need for further fragmentation. Official Slime has multiple 
backends for each CL implementations, plus a couple of schemes. Maybe 
integrating swank-clojure/swank-clj into official Slime would be best.

Or just bringing it to be fully compatible with current Slime. Would that 
patch even be accepted in swank-clojure?

Regards,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Multiple slime instances in Emacs

2011-07-08 Thread Marko Kocić
Is there a way to have multiple instances of Slime installed in Emacs in the 
same time?

The problem I have is that there is official Slime git repository, and that 
slime is used by all Common Lisp implementation.

Then there is slime used by swank-clojure, which is more than a year old 
slime snapshot. Swank clojure is not fully compatible with official Slime. 
It appears to work, but has some annoyances. Swank-clojure explicitly stated 
that he has no time to chase changes in official slime git repo, and this is 
a valid choice.

There are also third slime, required by ritz (former swank-clj) which I 
didn't try (yet), but docs on ritz page says it is not compatible with the 
swank-clojure version.

The question is is there a way to separate those slime instances/installs 
somehow that I can use, for example SBCL with official slime and clojure 
with swank-clojure slime at the same time?

It is a bit annoying to have to restart emacs, mess with load-path and 
having to require correct slime version each time when switching between CL 
and Clojure/

Regards,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Clojure performance on shootout

2010-10-26 Thread Marko Kocić
Clojure has recently been added to http://shootout.alioth.debian.org/
benchmarks. I know there are a lot of objections and excuses about
this benchmark, but that is defacto go to place when talking about
language implementation performance.

The problems is that performance is not that great as it could /
should be. Yes, it is a couple times faster then Ruby or Python, but
everyone's faster then those.

It still lags far behind Java, it is usually ~4 times slower then
Java, although the code seems heavily optimized thus making it even
more verbose then Java code. When running the same benchmarks with
Clojure 1.3 snapshots I didn't notice fundamental speed difference.

Scala performance is on par with Java.

Now, the questions are:
- Could benchmarks themselves be better optimized to better represent
Clojure?
- Is there a fundamental reason why Clojure can't reach Scala speed,
except for maturity?
- What are the plans regarding performance optimizations in near and
distant future?

I have seen some microbenchmarks where Clojure reaches almost Java
speed, but in general it is still much slower. I know that performace
is not reason d'etre of Clojure, but it is still important.

Regards,
Marko

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure performance on shootout

2010-10-26 Thread Marko Kocić
It would be very good if 1.3 delivers on its goal, and it is nice to
see that performance is important to the core team.
Here's the quick test on binarytrees benchmark that I submitted to the
shootout. It is not optimized at all, besides eliminating reflection
warnings. On my box results for binarytrees 20 are:
clojure-1.2 - ~4min
clojure-1.3-current-snapshot - ~3min
java -server - 1min.

As one can see, althoug 1.3 is nice improvement over 1.2, it's still
far from java :(

As another point, it is good that you created project for benchmarks,
it even make sense to make those benchmarks official regression test
suite, but it is also important to contribute benchmarks to the
shootout itself, since that is the place one goes to see which
language is the fastest.

Regards,
Marko

On 26 окт, 13:17, Stuart Halloway stuart.hallo...@gmail.com wrote:
 The 1.3 release for Clojure aims for parity with Java performance, with less 
 explicit optimization and hinting than required in 1.2 (or in Java). It would 
 be great to have people in the community share the effort of writing and 
 testing benchmarks, and to facilitate this I have created a top-level 
 skeleton project for a benchmark and regression suite for clojure 
 (http://github.com/clojure/test.benchmark). Andy Fingerhut, who wrote most of 
 the current alioth benchmarks, has signed a CA and will be contributing his 
 code to this project.

 We will primarily be targeting benchmarks for 1.3. performance, but will keep 
 a separate 1.2 directory in the project for anyone who is interested.

 As an aside: You will not be able to just run benchmarks carefully tuned for 
 1.2 under 1.3 and get best performance, as some of the performance tricks are 
 now counter-indicated.

 Stu







  Clojure has recently been added tohttp://shootout.alioth.debian.org/
  benchmarks. I know there are a lot of objections and excuses about
  this benchmark, but that is defacto go to place when talking about
  language implementation performance.

  The problems is that performance is not that great as it could /
  should be. Yes, it is a couple times faster then Ruby or Python, but
  everyone's faster then those.

  It still lags far behind Java, it is usually ~4 times slower then
  Java, although the code seems heavily optimized thus making it even
  more verbose then Java code. When running the same benchmarks with
  Clojure 1.3 snapshots I didn't notice fundamental speed difference.

  Scala performance is on par with Java.

  Now, the questions are:
  - Could benchmarks themselves be better optimized to better represent
  Clojure?
  - Is there a fundamental reason why Clojure can't reach Scala speed,
  except for maturity?
  - What are the plans regarding performance optimizations in near and
  distant future?

  I have seen some microbenchmarks where Clojure reaches almost Java
  speed, but in general it is still much slower. I know that performace
  is not reason d'etre of Clojure, but it is still important.

  Regards,
  Marko

  --
  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 first post.
  To unsubscribe from this group, send email to
  clojure+unsubscr...@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 post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Aleph and Conjure

2010-07-21 Thread Marko Kocić
 Clojure, because of the JVM, doesn't tie your hands this way. If you want to
 do everything evented go ahead. Do everything with threads? Go ahead. Want
 to mix the two designs together like Aleph? Sure. All while not losing the
 elegant brevity of a Node.js app.

Something like ring-aleph-adapter, however trivial it might be to
implement, will help in seamlessly switching existing applications to
aleph/netty.

 I like JavaScript, and I like Node.js. But I think Clojure opens up some new
 avenues to explore when building web applications.

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Aleph and Conjure

2010-07-21 Thread Marko Kocić


On Jul 21, 4:38 pm, Janico Greifenberg j...@acm.org wrote:
 On Wed, Jul 21, 2010 at 4:11 PM, Marko Kocić marko.ko...@gmail.com wrote:
  Something like ring-aleph-adapter, however trivial it might be to
  implement, will help in seamlessly switching existing applications to
  aleph/netty.

 But why would that be useful? Maybe I'm missing something here, but I
 thought the idea behind aleph was to experiment with an asynchronous
 API. To get full ring compatibility, you would need to synchronize the
 response again.

Ring API seems to me minimalistic enough that everything could be made
to conform to it without sacrificing any functionality.

Having aleph-adapter would be useful in two ways. One is that it would
be
possible to use all  of the ring goodies and addons like compojure
routes
and stuff out of the box, while keeping being semi asynchronous.

While ring-netty-adapter and ring-jetty-adapter are blocking the
thread
during the whole execution of handler function, while the adapter will
allow
to do processing async and only require io! in the end, when actual
result
is returned. Something similar to previous example someone already
posted like:

(defn aleph-to-ring-handler [req]
  (respond! req (ring-handler req)))

ring-handler could take a long time to compute, but thread will not be
blocked until it is finished.

Of course, I would also like to see how it could be changed (api-wise)
to
allow sending chunks of data to the response stream when needed, and
not
only in the end of the handler.

Api for aleph and ring could look the same, while the only difference
wold be
async versus sync behaviour.

 If you want to use netty instead of jetty or tomcat etc., you could
 try the ring-netty-adapter
 (http://github.com/datskos/ring-netty-adapter).

I haven't looked at the details yet, but it seems (at a glance) like a
blocking
adapter?

 --http://jgre.org

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Databases for a Concurrent World

2010-07-11 Thread Marko Kocić
I'm not sure how relevant the benchmark is, since all it tests in
throughput of database insert operations. The combination of insert,
update, delete and selects with more even distribution of operations
will be much more helpful, but much harder to test.

 If the whole premise of the blog post turns out to be flawed at least we
 have a page documenting the basics of how to use Clojure with several dbs ;)

At least it shows how to quickly set up everything.

Thanks for the post.

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Solving memory problems with Clojure code

2009-06-22 Thread Marko Kocić

Have you tried (.close stream) in the end of let block?

On 22 јун, 16:10, BerlinBrown berlin.br...@gmail.com wrote:
 I want to make it clear, that it probably isn't Clojure's memory
 problem but something with my code.

 Anyway, I was trying to figure out my heap memory goes up so much on
 various operations in my application.  Sure, it could be anything but
 I know I am doing something wrong.

 Here is the application, a text editor in SWT.  When I open files, the
 heap memory goes up 10 times the size of the file.  So, if I open a
 3MB file, that is 30MB of heap memory used.

 http://code.google.com/p/lighttexteditor/
 

 There are also some bad designs I am using, still wouldn't explain a
 10 fold increase in memory.

 http://lighttexteditor.googlecode.com/svn/trunk/light_edit/src/clojur...

 So far, I have done a couple of things.

 1. Turned on warn on reflection and reduced some of the reflection
 calls by adding type hints.

 2. Tried to reduce the number of calls to deref and not use global?
 defines.

 Here is the code that I think is the worst offender.  Basically, a
 java oriented approach for opening a file.

 (defn open-file-util [file file-path]
   #^{:doc Use java oriented approach for loading a file into
 memory }
   ;; Java oriented approach for opening file
   (let [stream (new FileInputStream file-path)
         instr (new LineNumberReader (new InputStreamReader stream))
         ;; Use type hints to ensure a character type.
         readBuffer #^[C (make-array (. Character TYPE) 2048)
         buf (new StringBuffer)]
     (loop [n (. instr read readBuffer)]
       (when ( n 0)
         (. buf append readBuffer 0 n)
         (recur (. instr read readBuffer
     ;; File info data has been collected, set some of the file
 properties
     (set-file-info (. file getName)
                                    (. file getAbsolutePath)
                    (. file lastModified)
                                    (. instr getLineNumber)
                                    (. file getParent)
                    (. file canWrite)
                                    (. file exists)
                                    (. file length))
     (. instr close)
     (. buf toString)))

 http://lighttexteditor.googlecode.com/svn/trunk/light_edit/src/clojur...

 Here are some notes from my early analysis, also a google doc on the
 functions that are called.
 memory profiling 
 clojurehttp://groups.google.com/group/clojure/browse_thread/thread/b44e25f23...
--~--~-~--~~~---~--~~
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



SWT and Clojure through Scala

2009-05-13 Thread Marko Kocić

I was googling looking for the Clojure SWT examples when I found out
about some attempts to wrap SWT in Scala. The code seems pretty
functional (and functioning) and it seems we can borrow some ideas
from there to create some nice SWT DSL in Clojure.

Here are the links:
- http://johlrogge.wordpress.com/2009/01/06/making-swt-shine-with-scala/
- http://johlrogge.wordpress.com/2009/01/14/drying-up-widget-creation/
- http://johlrogge.wordpress.com/2009/02/26/more-scala-and-swt/

Regards,
Marko
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: The Path to 1.0

2009-04-28 Thread Marko Kocić

Shouldn't ant clean remove all generated files, including jars from
the source tree?
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Standard startup script?

2009-04-16 Thread Marko Kocić

I have seen various scripts to start clojure in the net. Everyone
seems to have its favourite, even contrib has one. Also, there are a
lot of questions what is the bestest way to invoke clojure, how to
start REPL, how to run script, compile file, should it be used with
server or client VM.

Do you think it would be benefitial to have such script included as
part of standard clojure?
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Clojure and swank on Android?

2009-03-27 Thread Marko Kocić

After some googling I found out that some people were able to run
Clojure on Android phones. Did anyone tried to port swank to Android?

It might seem like a good idea to start swank server on the phone,
connnect with slime, and have good old live programming environment.

Regards,
Marko Kocić

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: oo

2009-03-25 Thread Marko Kocić

Does anybody know of some minimal clos implementation that is easily
portable?

I suppose that it contain base functions that are implemented in CL,
and the rest of clos built on top of that.
It might be interesting to try to adapt such a library to clojure.

I remember people mentioning PCL and closette as clos implementations,
but actualy never looked at them.


Regards,
Marko Kocić
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Witch Emcas for Windows to use with Clojure

2009-03-11 Thread Marko Kocić

Or you can compile emacs from CVS for yourself. It's not that hard as
it used do be.
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: new Clojure article

2009-03-02 Thread Marko Kocić

Article is a great introduction and reference to clojure.
It could serve as _the_ documentation, maybe even distributed with
clojure itself.
I like the fact that it has right code to txt ratio.
The only things missing is better organization (chapters hierarchy)
and syntax highlight of code.

Thanks,
Marko Kocić
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: The Application Context Pattern

2009-02-27 Thread Marko Kocić

Interesting approach, nice explained.

Does anyone have similar example using one of the cells
implementations?
What would be pros/cons between this and cells approach?

Regards,
Marko Kocić

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Waterfront 148 (was: Waterfront - The Clojure-based editor for Clojure)

2009-02-27 Thread Marko Kocić

Nice work.

I have a couple of (mostly cosmetic but important suggestions):
- Set look and feel to NativeLookAndFeel
- Allow user to increase application fonts, not just editor fonts.

Regards,
Marko Kocić

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: The Application Context Pattern

2009-02-27 Thread Marko Kocić

  The cells implementations I've seen posted to this list (in fact pretty 
  much all
  cells reimplementations) haven't yet approached the sophistication of
  kenny-cells.

 Agreed.  And I wrote two of them.  They're just toy implementations so
 far.

I'm still not sure how it should look like given clojure immutablility.
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Clojure on CLR/DLR

2009-02-18 Thread Marko Kocić

If only there were C/C-- port of clojure which will keep all of
clojure ideas and instead of java use '.' for easy access to C/C++
libraries/functions. And it should also be able to compile to native
code and create native executables.

Just dreaming...

On 18 феб, 04:54, dmiller dmiller2...@gmail.com wrote:
 My thanks to Rich for the suggestion to go public and for agreeing to
 include this as part of the Clojure community.

 Thanks to all for the encouragement.

 -- David

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Clojure on CLR/DLR

2009-02-18 Thread Marko Kocić



On 18 феб, 15:13, dmiller dmiller2...@gmail.com wrote:
 When the rough edges are filed off, it should distributable as a set
 of DLLs (and a console EXE)  like any other .NET application.   It
 should be able to follow the DLR to Mono.


You mean DLR can create executables that don't need .NET runtime?
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Common Lisp format function is now fully* CL-compatible

2009-01-29 Thread Marko Kocić



Tom Faulhaber је написао:
 The cl-format library now implements the full* Common Lisp spec for
 format (* = with the exception of a couple of things used by the
 internals of the CL pretty printer).

Any plans to include it in clojre-contrib?
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---