Too over complicated

2016-06-18 Thread Olek
Hi!

I've back to Clojure env. after 3 years of absence.

I have started to code in my best language ever and was hit by some 
difficulties with the simplest things on earth
I remember when I first dived into language and started coding in it. After 
4 months of heavy doc/forum/irc usage I was able to quickly express myself 
in the Clojure. All for then was for me clear, natural and easy.

Now after some long brake I'm back and now I can make some critics on the 
language sine I know what Clojure can offer me and I know what from concise 
dynamic language with abstraction in mind I should expect.

Now lets talk about "difficulties" which I have found.
For example when we talk about removing element from collection.

Why there is no one operation which could behave the same for set, vector, 
list, string, and map? Let the community talk by 
themselves: 
http://stackoverflow.com/questions/28844647/why-are-disj-and-dissoc-distinct-functions-in-clojure

Why there is no one operation for checking if an element is in a 
collection/keys of map/string?
http://stackoverflow.com/questions/3249334/test-whether-a-list-contains-a-specific-value-in-clojure

There is no even simple method for saying that element is not a nil. This 
requires from me the (not (nil? %)) combo.

Now how suppose the world should pray to Clojure when they are unable to 
accomplish these simplest ops?

Just add these simple functions to the core lib so the new comers won't 
whine on Clojure and when they get mature and more comfortable with Clojure 
they will just use the "core & idiomatic" set of functions.

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


Learning Google's Map Reduce with Clojure

2016-06-29 Thread Olek
Hi!

I was refreshing my knowledge from Google's Map Reduce.
I've decided to code some examples in Clojure since it is my favorite 
language.
Here is the code from the learning process 
https://github.com/naleksander/mapreduce

I guess that it is time now to code it in Scala *wink*

Btw. if I were to implement it from ground in real scalable manner I would 
choose HDFS, some distributed reliable message queue and would work on 
serializing and distributing user defined functions between nodes. Also 
current API had to be changed a bit (for example instead of few arguments I 
would just pass the map being the map reduce job specification).

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


Re: Learning Google's Map Reduce with Clojure

2016-07-01 Thread Olek
In case you care. Here https://github.com/naleksander/scalduce are Scala 
examples, so you can easily compare the overhead.
For me Clojure is more enjoyable, however if I were to share my code (for 
example as an library) with others (for example beginner users or with 
weaker skills) than statically typed language is a win.

On Wednesday, 29 June 2016 22:20:57 UTC+2, Olek wrote:
>
> Hi!
>
> I was refreshing my knowledge from Google's Map Reduce.
> I've decided to code some examples in Clojure since it is my favorite 
> language.
> Here is the code from the learning process 
> https://github.com/naleksander/mapreduce
>
> I guess that it is time now to code it in Scala *wink*
>
> Btw. if I were to implement it from ground in real scalable manner I would 
> choose HDFS, some distributed reliable message queue and would work on 
> serializing and distributing user defined functions between nodes. Also 
> current API had to be changed a bit (for example instead of few arguments I 
> would just pass the map being the map reduce job specification).
>
> Viva 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
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.


Indexable structures for easier lookup and retrieve

2016-07-19 Thread Olek
Hi!

Often through the software development I bump into structures defining 
specification/manifest/configuration of some Unit 
(service/process/transformation/configuration).
>From my observation I've noticed the repeating pattern in software 
development for consuming above. We star with a 

structure > (then go to) slurp > (then) morph to indexed structures > (for 
final) retrieve (during algorithms executions)

What bothers me is the slurp and morph steps. These always seem to be big 
effort which is not particular functional from the algorithm use (these are 
internal steps not produced by Business Analytics and not consumed by 
Program Algorithms). It would be nice if there was a method to make slurp 
and morph as one step in declarative (because it is most natural way to 
express statement) manner.

Now lets dive to example and make some assumptions. Let assume that 
structure can be any tree structure. For example let say it will be XML 
which can have parent node, child nodes with attributes.


 
 
 
 
 
 
 
 


This can be for example specification of node which has declared group of 
events and group of transformations. So it can easily fit in memory and is 
read only once at startup.
Now it would be nice to make slurp of that structure (and it's pretty easy 
in clojure - the only true language in which you express the algorithms in 
terms of thoughts - only if there are built of lists ;-) ) and next get the 
structure of which we could make farther retrieves. For example we could 
ask for all incoming events or ask if we can expect the event of name "foo" 
in that spec. Or we can ask for transformation of name "transfoo". As you 
can see, to be able to ask such questions, I would have to index above 
structure for given predicates.
First I thought about indexing every data. For example I make inverted 
index of all terminal nodes. So I got indexes like: transformation, name, 
events, event, node, source, dest-event, from which I could just ask for 
(query example) #{transformation [ :name %1 ]} to get all transformation 
which match the %1 argument.
Latter I noticed that in fact, Datomic does that, but the indexing and 
query language would be not so easy.

Nevertheless do you know any piece of code/software/library which allow for 
such functionality?








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


Clojure, WEB and Enterprise development

2015-08-05 Thread Olek


Hi!

I was using Clojure for a long time. It has been used for private and 
commercial projects (sniffed by me and hated by others).

Now it has been abandoned. It's not giving me any money nor there is no 
agreement in peers to use it.

But...


I think that Clojure has a future. Datomic is ready for new Intel mass 
storage (which is 1000 times faster than current SSD). Clojure as lisp is a 
head of time for most today programing paradigms.

But


I'm disappointed by few things:


Problem: there is no a bind for the JEE servers - they should be treated as 
the SQL - you will never reach its maturity

Solution: so you should parasite it and make a wrapper around timed 
services, jms queues, web services, ejb, jpa (with changed semantic fitting 
to clojure style)

My try: I have already build some prototype for building web services in 
runtime (with build in http server in jdk)


Problem: there is still no true web layer - all what you can see is a wrap 
around Servlet and HTTP protocol concept or own semantic around WWW

Solution: you should try to build a layer around GWT or Java Prime Faces, I 
know that now it is not possible, but you should think what steps are 
needed to achive that

My try: I have build and framework which abstracts from the system domain 
in GUI and the server side conforms it's protocol (what contexts as tabs, 
CRUD, contextual operations, elastic permissions - tab context and data 
context, dialogs for CRUD, filters for listing, tables, dynamic forms 
modification, validation) all was made first in Clojure and the spec of DSL 
could produce Swing app, the same spec later could produce GWT app (for 
known reasons the engine had to be rewritten in Java but spec could be 
still Clojure data or XML)

The GUI engine is so abstract that Web Layer could switch between backend 
system and provide all the GUI functionality as needed - the limit is that 
it was ordinary a CRUD app (card management system; football cards 
management and bans system; CAR system with conjunction with EJBCA; user 
and persmission managment system; lottery systems - all there where 
registration system fits)


Let the big business promote you potential and left for yourself only the 
evangelism of the Clojure language...

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


Homoiconicity in Clojure - the broken promise

2015-08-27 Thread Olek
Hi!

Today I fall into:

 java.lang.RuntimeException: java.lang.ClassFormatError: Invalid method 
Code length 88118 in class file xxx$eval304 (xxx.clj:274) (xxx.clj:3)

problem.

The reason is that I tried to use data as code and just execute the slurped 
AST in order to produce another form of code (I'm converting the code from 
one language to another).
Is there any way to switch Clojure to interpreted mode instead of compiling 
the data structure form? The structure what causes the headache are arrays 
initializers.
I would like to keep the code simple since the language should solve the 
problem for me, not me for the case of stupid 64kb method limit.

Thanks in advance,
Olek

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


Re: Homoiconicity in Clojure - the broken promise

2015-08-27 Thread Olek
For the sake of simplicity. I've just define functions or macros which can 
appear in the data structure and simply call eval on that structure. The 
defined functions and macros has side effect which is println to the binded 
output stream.

The example structure looks like this:

(Stmt_If {
:cond (Expr_FuncCall {
:name (Name {
:parts [
"preg_match"
]})
:args [
(Arg {
:value (Scalar_String {
:value 
"%2F%5E%5B0-9a-fA-F%5D%7B6%7D%24%2F"})
:byRef false
:unpack false})
(Arg {
:value (Expr_Variable {
:name "col"})
:byRef false
:unpack false})
]})
:stmts [
(Stmt_Return {
:expr (Expr_Variable {
:name "col"})})
]
:elseifs [
]
:else nil})



On Thursday, 27 August 2015 16:16:17 UTC+2, James Reeves wrote:
>
> On 27 August 2015 at 10:31, Olek > 
> wrote:
>>
>> Today I fall into:
>>
>>  java.lang.RuntimeException: java.lang.ClassFormatError: Invalid method 
>> Code length 88118 in class file xxx$eval304 (xxx.clj:274) (xxx.clj:3)
>>
>> problem.
>>
>> The reason is that I tried to use data as code and just execute the 
>> slurped AST in order to produce another form of code (I'm converting the 
>> code from one language to another).
>> Is there any way to switch Clojure to interpreted mode instead of 
>> compiling the data structure form? The structure what causes the headache 
>> are arrays initializers.
>> I would like to keep the code simple since the language should solve the 
>> problem for me, not me for the case of stupid 64kb method limit.
>>
>
> No, Clojure doesn't have an "interpreted mode" that would get around the 
> 64kb method limit. But why do you need to eval in the first place if you're 
> just converting code from one language to another?
>
> - James
>

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


Stable clojure.xml/parse

2016-04-01 Thread Olek
Hi!

I need a stable clojure.xml/parse.
Unfortunately current implementation changes the order of child elements in 
a node.
I use xml as a form of language for DSL. Please don't suggest switching to 
clojure structures because non-clojure programmers (actually analysts) are 
editing it and also there are such business requirements.
Do you know how to achieve that (do I have write SAX parser?! ;-( )? It 
would be good if the outputting data structure was the same as for 
clojure.xml/parse (or I will just transform it to desired form).

Thanks in advance!
Olek

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


Re: Stable clojure.xml/parse

2016-04-02 Thread Olek
Probably you have right. I have isolated my code and with same input the 
result is ok.
I guess something else is changing the order of elements.

Thanks for help!

On Friday, 1 April 2016 18:41:44 UTC+2, Francis Avila wrote:
>
> Are you sure that it changes the child element order? It hasn't in my 
> experience. Example:
>
> (clojure.xml/parse (io/input-stream (.getBytes 
> "" "UTF-8")))
> =>
> {:tag :a,
>  :attrs nil,
>  :content [{:tag :b1, :attrs nil, :content nil}
>{:tag :a1, :attrs nil, :content nil}
>{:tag :a2, :attrs nil, :content nil}
>{:tag :a3, :attrs nil, :content nil}
>{:tag :a4, :attrs nil, :content nil}]}
>
>
> Do you have a counter-example? Or are you talking about attribute nodes 
> maybe?
>
> Also the only parser included with clojure.xml already uses SAX: it just 
> supplies a content handler that builds the clojure structures 
> clojure.xml/parse returns. 
>
>
>
> On Friday, April 1, 2016 at 10:39:10 AM UTC-5, Olek wrote:
>>
>> Hi!
>>
>> I need a stable clojure.xml/parse.
>> Unfortunately current implementation changes the order of child elements 
>> in a node.
>> I use xml as a form of language for DSL. Please don't suggest switching 
>> to clojure structures because non-clojure programmers (actually analysts) 
>> are editing it and also there are such business requirements.
>> Do you know how to achieve that (do I have write SAX parser?! ;-( )? It 
>> would be good if the outputting data structure was the same as for 
>> clojure.xml/parse (or I will just transform it to desired form).
>>
>> Thanks in advance!
>> Olek
>>
>

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


Lazy evaluation of arguments

2016-04-26 Thread Olek
Hi!

In short:

I have noticed that in most cases I use macros only for lazy arguments 
evaluation. Why not to make something to use only this feature? It would be 
light version of macro for clojurescript/clojure and easy to grasp for 
newcomers and still powerful in programming (with that you could implement 
binding/scopes/interpreter pattern). I love implicite use of macros where 
from call point of view the user can't distinguish what is function and 
what is macro. 

In long:

Generally the macros are used in compile phase to manipulate AST (or just 
data structures because Clojure is homoiconic) to produce code in order to 
be consumed in evaluation phase.
It is nice to include new language constructs with use of macros but as my 
experience points out for most time I use macros only for changing 
evaluation moment/order.
Maybe there should be some construct like "defnlazy" for which you write 
normal function but all input arguments are evaluated only when you 
explicitly evaluate them.
What we gain? We don't have to deal with # ` @ list eval and separate 
thoughts on read/eval phases, but we still must explicitly say ~ to deref 
passed block of construct as argument.

Also there are some problems to grasp:
- is it safe to implicite convert blocks of construct from statements to 
deref objects
- how it should behave when you pass not deref object to another discussed 
"defnlazy"
- maybe there shouldn't be any defnlazy but you should just implement it in 
arguments destruction so you can use constructs like:

(defn mycrazyif [ statement ~onsuccess ~onfailure ]
   (if statement   ; just evalutated with mycrazyif call
 @onsucess ; deref block in case of success 
  @onfailure)) ; deref block in case of failure


With regards,
Olek

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


Re: Lazy evaluation of arguments

2016-04-26 Thread Olek
Yes, the delay and force does the job. Now it would be nice to hide delay 
declaration in arguments destruction as already proposed:

 (den mycrazyif [ statement ~onsuccess ~onfailure ] ; nonsuccess and on 
failure becomes delay objects
   (if statement   ; just evalutated with mycrazyif call
 @onsucess ; deref block in case of success 
  @onfailure)) ; deref block in case of failure


On Tuesday, 26 April 2016 19:59:12 UTC+2, Michael Griffiths wrote:
>
> I'm not sure I fully understand your proposal, but when I really need lazy 
> evaluation (which is pretty rare) I reach for `delay` and `force`.
>
> On Tuesday, 26 April 2016 16:41:08 UTC+1, Olek wrote:
>>
>> Hi!
>>
>> In short:
>>
>> I have noticed that in most cases I use macros only for lazy arguments 
>> evaluation. Why not to make something to use only this feature? It would be 
>> light version of macro for clojurescript/clojure and easy to grasp for 
>> newcomers and still powerful in programming (with that you could implement 
>> binding/scopes/interpreter pattern). I love implicite use of macros where 
>> from call point of view the user can't distinguish what is function and 
>> what is macro. 
>>
>> In long:
>>
>> Generally the macros are used in compile phase to manipulate AST (or just 
>> data structures because Clojure is homoiconic) to produce code in order to 
>> be consumed in evaluation phase.
>> It is nice to include new language constructs with use of macros but as 
>> my experience points out for most time I use macros only for changing 
>> evaluation moment/order.
>> Maybe there should be some construct like "defnlazy" for which you write 
>> normal function but all input arguments are evaluated only when you 
>> explicitly evaluate them.
>> What we gain? We don't have to deal with # ` @ list eval and separate 
>> thoughts on read/eval phases, but we still must explicitly say ~ to deref 
>> passed block of construct as argument.
>>
>> Also there are some problems to grasp:
>> - is it safe to implicite convert blocks of construct from statements to 
>> deref objects
>> - how it should behave when you pass not deref object to another 
>> discussed "defnlazy"
>> - maybe there shouldn't be any defnlazy but you should just implement it 
>> in arguments destruction so you can use constructs like:
>>
>> (defn mycrazyif [ statement ~onsuccess ~onfailure ]
>>(if statement   ; just evalutated with mycrazyif call
>>  @onsucess ; deref block in case of success 
>>   @onfailure)) ; deref block in case of failure
>>
>>
>> With regards,
>> Olek
>>
>

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


Re: Lazy evaluation of arguments

2016-04-26 Thread Olek
Wow ;-) now I know that I'm talking about fexprs ;-) So my propose is to 
back them alive again. Let the new community consume them in new manner and 
judge theirs usefulness.


On Tuesday, 26 April 2016 23:04:09 UTC+2, tbc++ wrote:
>
> Congradulations! You've discovered Fexprs! An ancient technology from a 
> by-gone age: https://en.wikipedia.org/wiki/Fexpr
>
> On Tue, Apr 26, 2016 at 2:23 PM, Olek 
> > wrote:
>
>> Yes, the delay and force does the job. Now it would be nice to hide delay 
>> declaration in arguments destruction as already proposed:
>>
>>  (den mycrazyif [ statement ~onsuccess ~onfailure ] ; nonsuccess and on 
>> failure becomes delay objects
>>(if statement   ; just evalutated with mycrazyif call
>>  @onsucess ; deref block in case of success 
>>   @onfailure)) ; deref block in case of failure
>>
>>
>> On Tuesday, 26 April 2016 19:59:12 UTC+2, Michael Griffiths wrote:
>>>
>>> I'm not sure I fully understand your proposal, but when I really need 
>>> lazy evaluation (which is pretty rare) I reach for `delay` and `force`.
>>>
>>> On Tuesday, 26 April 2016 16:41:08 UTC+1, Olek wrote:
>>>>
>>>> Hi!
>>>>
>>>> In short:
>>>>
>>>> I have noticed that in most cases I use macros only for lazy arguments 
>>>> evaluation. Why not to make something to use only this feature? It would 
>>>> be 
>>>> light version of macro for clojurescript/clojure and easy to grasp for 
>>>> newcomers and still powerful in programming (with that you could implement 
>>>> binding/scopes/interpreter pattern). I love implicite use of macros where 
>>>> from call point of view the user can't distinguish what is function and 
>>>> what is macro. 
>>>>
>>>> In long:
>>>>
>>>> Generally the macros are used in compile phase to manipulate AST (or 
>>>> just data structures because Clojure is homoiconic) to produce code in 
>>>> order to be consumed in evaluation phase.
>>>> It is nice to include new language constructs with use of macros but as 
>>>> my experience points out for most time I use macros only for changing 
>>>> evaluation moment/order.
>>>> Maybe there should be some construct like "defnlazy" for which you 
>>>> write normal function but all input arguments are evaluated only when you 
>>>> explicitly evaluate them.
>>>> What we gain? We don't have to deal with # ` @ list eval and separate 
>>>> thoughts on read/eval phases, but we still must explicitly say ~ to deref 
>>>> passed block of construct as argument.
>>>>
>>>> Also there are some problems to grasp:
>>>> - is it safe to implicite convert blocks of construct from statements 
>>>> to deref objects
>>>> - how it should behave when you pass not deref object to another 
>>>> discussed "defnlazy"
>>>> - maybe there shouldn't be any defnlazy but you should just implement 
>>>> it in arguments destruction so you can use constructs like:
>>>>
>>>> (defn mycrazyif [ statement ~onsuccess ~onfailure ]
>>>>(if statement   ; just evalutated with mycrazyif call
>>>>  @onsucess ; deref block in case of success 
>>>>   @onfailure)) ; deref block in case of failure
>>>>
>>>>
>>>> With regards,
>>>> Olek
>>>>
>>> -- 
>> 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+u...@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+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> “One of the main causes of the fall of the Roman Empire was that–lacking 
> zero–they had no way to indicate successful termination of their C 
> programs.”
> (Robert Firth) 
>

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


Re: Lazy evaluation of arguments

2016-04-26 Thread Olek
Here is a nice discussion about fexprs: 
http://lambda-the-ultimate.org/node/3640



On Tuesday, 26 April 2016 23:04:09 UTC+2, tbc++ wrote:
>
> Congradulations! You've discovered Fexprs! An ancient technology from a 
> by-gone age: https://en.wikipedia.org/wiki/Fexpr
>
> On Tue, Apr 26, 2016 at 2:23 PM, Olek 
> > wrote:
>
>> Yes, the delay and force does the job. Now it would be nice to hide delay 
>> declaration in arguments destruction as already proposed:
>>
>>  (den mycrazyif [ statement ~onsuccess ~onfailure ] ; nonsuccess and on 
>> failure becomes delay objects
>>(if statement   ; just evalutated with mycrazyif call
>>  @onsucess ; deref block in case of success 
>>   @onfailure)) ; deref block in case of failure
>>
>>
>> On Tuesday, 26 April 2016 19:59:12 UTC+2, Michael Griffiths wrote:
>>>
>>> I'm not sure I fully understand your proposal, but when I really need 
>>> lazy evaluation (which is pretty rare) I reach for `delay` and `force`.
>>>
>>> On Tuesday, 26 April 2016 16:41:08 UTC+1, Olek wrote:
>>>>
>>>> Hi!
>>>>
>>>> In short:
>>>>
>>>> I have noticed that in most cases I use macros only for lazy arguments 
>>>> evaluation. Why not to make something to use only this feature? It would 
>>>> be 
>>>> light version of macro for clojurescript/clojure and easy to grasp for 
>>>> newcomers and still powerful in programming (with that you could implement 
>>>> binding/scopes/interpreter pattern). I love implicite use of macros where 
>>>> from call point of view the user can't distinguish what is function and 
>>>> what is macro. 
>>>>
>>>> In long:
>>>>
>>>> Generally the macros are used in compile phase to manipulate AST (or 
>>>> just data structures because Clojure is homoiconic) to produce code in 
>>>> order to be consumed in evaluation phase.
>>>> It is nice to include new language constructs with use of macros but as 
>>>> my experience points out for most time I use macros only for changing 
>>>> evaluation moment/order.
>>>> Maybe there should be some construct like "defnlazy" for which you 
>>>> write normal function but all input arguments are evaluated only when you 
>>>> explicitly evaluate them.
>>>> What we gain? We don't have to deal with # ` @ list eval and separate 
>>>> thoughts on read/eval phases, but we still must explicitly say ~ to deref 
>>>> passed block of construct as argument.
>>>>
>>>> Also there are some problems to grasp:
>>>> - is it safe to implicite convert blocks of construct from statements 
>>>> to deref objects
>>>> - how it should behave when you pass not deref object to another 
>>>> discussed "defnlazy"
>>>> - maybe there shouldn't be any defnlazy but you should just implement 
>>>> it in arguments destruction so you can use constructs like:
>>>>
>>>> (defn mycrazyif [ statement ~onsuccess ~onfailure ]
>>>>(if statement   ; just evalutated with mycrazyif call
>>>>  @onsucess ; deref block in case of success 
>>>>   @onfailure)) ; deref block in case of failure
>>>>
>>>>
>>>> With regards,
>>>> Olek
>>>>
>>> -- 
>> 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+u...@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+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> “One of the main causes of the fall of the Roman Empire was that–lacking 
> zero–they had no way to indicate successful termination of their C 
> programs.”
> (Robert Firth) 
>

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


Schemas for DSLs on top of Clojure

2016-04-29 Thread Olek
Hi!

Clojure data structures can express tree data structures, same as in XML 
what is ideal for DSL. Especially that thanks to macros you can also change 
the evaluation order and hide execution complexity and treat DSL in terms 
of declarations and not statements nor functions. What is more the grammar 
of such structure is simplified to what you can see in XML.
For example let take the XML example:






Now lets look at Clojure:

(books
  (book { :iban "31232" :title "some title" :author "some author" })
 (book { :ban "43232" :title "another title2" :author "another author 2" }) 
)

You can notice that when you build macros & functions for that you have 
simple structure of input arguments like:

(defmacro/defn books[ attrs & books-col ]
   (do some stuff))

(defn book[ attrs ]
  (do some stuff))

Now all you need is to slurp the specification made in terms of created 
DSL, call eval on it and as the result of execution you will spit the 
resulting data/mutate the state/do side effect.
Finally for XML you can create XSD to constraint possibilities of tags 
which can be put into DSL.
But as you can see, such possibility is missing for Clojure. Do you have 
any ready tool for that or do I have to create one?

Thanks in advance,
Olek



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


Re: Schemas for DSLs on top of Clojure

2016-04-30 Thread Olek
Ok. Thank you. Not quite what I was expecting but nice to see that tool too.


On Friday, 29 April 2016 20:45:27 UTC+2, Michael Willis wrote:
>
> The convention that I've seen among the Clojure community is to represent 
> these kinds of things as data structures, and define your contraints using 
> something like https://github.com/plumatic/schema
>
> On Friday, April 29, 2016 at 1:10:29 PM UTC-5, Olek wrote:
>>
>> Hi!
>>
>> Clojure data structures can express tree data structures, same as in XML 
>> what is ideal for DSL. Especially that thanks to macros you can also change 
>> the evaluation order and hide execution complexity and treat DSL in terms 
>> of declarations and not statements nor functions. What is more the grammar 
>> of such structure is simplified to what you can see in XML.
>> For example let take the XML example:
>>
>> 
>> 
>> 
>> 
>>
>> Now lets look at Clojure:
>>
>> (books
>>   (book { :iban "31232" :title "some title" :author "some author" })
>>  (book { :ban "43232" :title "another title2" :author "another author 2" 
>> }) )
>>
>> You can notice that when you build macros & functions for that you have 
>> simple structure of input arguments like:
>>
>> (defmacro/defn books[ attrs & books-col ]
>>(do some stuff))
>>
>> (defn book[ attrs ]
>>   (do some stuff))
>>
>> Now all you need is to slurp the specification made in terms of created 
>> DSL, call eval on it and as the result of execution you will spit the 
>> resulting data/mutate the state/do side effect.
>> Finally for XML you can create XSD to constraint possibilities of tags 
>> which can be put into DSL.
>> But as you can see, such possibility is missing for Clojure. Do you have 
>> any ready tool for that or do I have to create one?
>>
>> Thanks in advance,
>> Olek
>>
>>
>>
>>

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


Clojure in Scripting Engine JSR-223

2016-05-10 Thread Olek
Is Clojure compilant with scripting engine API (JSR-223)?
Last notes are from 2009.

Thanks in advance,
Olek

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


Re: ClojureScript Presentation - video

2011-07-26 Thread Olek
Agree, the same for ipod/ipad devs.
Youtube is defacto standard for contet publishing, due to wide support.

-- 
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: Is Clojure Simple?

2011-10-25 Thread Olek
Yes, Easy to track.
Nevertheless this definition passes Rich's list.

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


ANN: Textmash - another IDE for Clojure

2011-01-18 Thread Olek
Hi,

Here is a link: http://code.google.com/p/textmash/

Some time ago I have written it in order to help accomplish a task of
creating some paraller processing  system written entirely in Clojure
(it was the map reduce framework from Google).

It was also used with success in other tasks, like editing PHP pages,
Clojure learning, writing small programs in Clojure and some simple
text processing.

Feel free to contribute in bug fixing and improving or maybe even
rewriting it in Clojure (there are not too much lines of code).

The main idea is to take what is best in Eclipse, NetBeans and
ergonomy of Mac OS and put into light tool.
I hope you will enjoy it.

Bye!

-- 
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: clojurejs -- a Clojure (subset) to Javascript translator

2011-01-18 Thread Olek
Nice work,

maybe something like GWT but written in Clojure, will knock to ours
doors.

On 11 Sty, 06:09, Ram  Krishnan  wrote:
> Hi all,
>
> I've just released a stable version of `clojurejs' -- an
> unimaginatively named Clojure library for translating a Clojure subset
> language to Javascript.
>
> clojurejs is something I've been working on for a few weeks as part of
> a larger web app in Clojure. The code's a bit crufty (reflects my
> incremental discovery of the inconsistencies in Javascript), but
> functional and I wanted put something out there for people to check
> out. I welcome bug reports and feedback. It's been useful for my
> specific needs, and I'd be happy if it's even marginally useful to
> others.
>
> I realize there are a number of other efforts to compile/translate
> Clojure (or other Lisp subset) to Javascript, but nothing quite fit my
> requirements, which prompted me to build clojurejs. Some useful
> aspects of clojurejs are:
>
> * Consistent scoping in let and loop/recur forms
> * Macros
> * Implicit return
> * loop/recur translates to Javascript for loops
> * Translates Clojure vectors, strings, keywords, symbols and maps to
> Javascript equivalents
> * dot form access to methods and properties
> * Adds a couple of Clojure incompatible special forms for Javascript
> specific behavior
>
> If this seems interesting I've posted a more detailed entry on my blog
> (http://cynojure.posterous.com/clojurejs-a-clojure-subset-to-
> javascript-tran).
>
> Oh, and the github link:http://github.com/kriyative/clojurejs
>
> Look forward to feedback.
>
> Cheers,
>
> -ram

-- 
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: Textmash - another IDE for Clojure

2011-01-23 Thread Olek
I have added you to committers group, so you can commit your work.
Later I will switch to github since SVN with its "central repository"
scenario is not very useful in situation where I'm lack of time.

On 23 Sty, 00:28, Laurent PETIT  wrote:
> Hello again Olek,
>
> 2011/1/18 Olek 
>
> > Hi,
>
> > Here is a link:http://code.google.com/p/textmash/
>
> > Some time ago I have written it in order to help accomplish a task of
> > creating some paraller processing  system written entirely in Clojure
> > (it was the map reduce framework from Google).
>
> > It was also used with success in other tasks, like editing PHP pages,
> > Clojure learning, writing small programs in Clojure and some simple
> > text processing.
>
> > Feel free to contribute in bug fixing and improving or maybe even
> > rewriting it in Clojure (there are not too much lines of code).
>
> I'm using your project as a demonstration on how 'easy' it is to embed
> paredit.clj.
>
> How should I "contribute" ? I mean, it seems that you're using svn, so it's
> not clear to me how you would like to get contributions.
>
> My first idea was to clone your repo via git-svn, and then publish my fork
> on e.g. github ?
> Or ... ?
>
> Cheers,
>
> --
> Laurent
>
>
>
>
>
> > The main idea is to take what is best in Eclipse, NetBeans and
> > ergonomy of Mac OS and put into light tool.
> > I hope you will enjoy it.
>
> > Bye!
>
> > --
> > 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: ANN: Textmash - another IDE for Clojure

2011-01-23 Thread Olek
Pros:
1. Yes, it uses Swing. I have even stared writting it in Clojure, but
startup time was too long, not acceptable for lightweight text editor.
2. Yes, it is. I've carefully studied Mac's TextEdit, NetBeans and
Eclipse and merged theirs ideas.

Cons:
1. Yeah, I haven't implemented highligting yet. The cost (time and
work) of implementation would be higher than profits I would get. For
me more important were brackets matching and highlighting occurences
of selected word.
2. Yes, first it must be configured.
3. I think that low level configuration gives you much more
possiblities of running or integrating it in different scenarios
(folder layouts, libraries dependiences etc.)

I have no more time for improving the editor, that is why it has been
open sourced.
Thanks for trying it out and feedback!

On 19 Sty, 07:28, Shantanu Kumar  wrote:
> I downloaded the JAR and gave it a try. Here's my first impression:
>
> Pros:
> 1. Feels really fast (does it use Swing?)
> 2. Consistent U/I - seemingly nice defaults
>
> Cons:
> 1. Clojure files are not syntax highlighted by default
> 2. Clojure->"Open a REPL" doesn't work (at least not out of the box)
> 3. Clojure->"Configure" requires me to edit a text file
> 4. Doesn't detect that the Clojure JAR is already in classpath
> 5. View->"Syntax Highlight" submenu is disabled
>
> My suggestions:
> 1. Make it easy for first timers to use
> 2. Detect if the Clojure JAR is already in the classpath and use it
> accordingly
> 3. Don't make me go through the configuration text file
>
> Regards,
> Shantanu

-- 
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: Textmash - another IDE for Clojure

2011-01-23 Thread Olek
Yes, make a branch.
I seen many people are using "leiningened", so it is a good (main
stream) choice, especially that your parts of code are written in
Clojure.

The layout of menus is made in pl/olek/textmash/menu/
WorkspaceMenu.java.

I have also started TextMash2 which is going to be entirely written in
Clojure, it is going to be written - 20 minutes a day, mainly in
fundamental (proof of concept) parts so It will be easier to other to
add/fullfill project with new features.


On 23 Sty, 20:49, Laurent PETIT  wrote:
> 2011/1/23 Olek 
>
> > I have added you to committers group, so you can commit your work.
> > Later I will switch to github since SVN with its "central repository"
> > scenario is not very useful in situation where I'm lack of time.
>
> OK, thanks.
>
> What I've achieved is more a "proof of concept" right now. Maybe I should
> put it in a branch.
> I'll quickly describe what I'm talking about, so you can choose:
>
>   * I've "leiningened" the project. Maybe I could "mavenize" it instead.
> What are your guts here ?
>   * I've "leiningened" it to test the "mavenization", on my side, of
> paredit.clj.
>   * paredit.clj uses clojure and clojure contrib. So the feature currently
> shows a delay when it is first invoked. Since the point of my demo was not
> clojure integration but paredit.clj integration, I've not tried to make this
> happen in the background, etc. To the contrary, I've tried to compact the
> "proof of concept" code as much as possible in one place, so it can be
> easily spotted and reviewed.
>   * Currently, I've just demonstrated the "raise over sexpr" command I
> described in an earlier post in this same thread.
>
> What I've not been able to achieve (but I admit I haven't spent too much
> time right now on it) is how to make the command appear in the menu. I
> thought at first that it was derived from the "actions" map in the
> TextEditor class, but the layout of the menus must live somewhere else ...
> If you can help me spot the right place ?
>
> I also still have to finish proper bundling of paredit.clj in the first
> place, half done and should not last 'til the end of this week.
>
> Cheers,
>
> --
> Laurent
>
>
>

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


ANN: Sisyphus - mapreduce implemented in Clojure

2011-01-25 Thread Olek
Hi!

It is nice to announce that Sisyphus - the google's mapreduce
implemented in Clojure - has been released.
Here are the sources: https://github.com/njoanna/Sisyphus

Some comments are still in polish but they will be gradually replaced
with english version.

Right now there are 5 tasks (zadanie 1 - 5):

1. Count number of occurences of a particular word in a set of text
documents. The result is a pair of: searched word, its number of
occurences.

2. Look up for a sequence of chars in a set of text documents. The
result is a set of pairs of: name of a file, line where the sequence
has occured.

3. Sort words in a set of text documents. The results is a set of
sorted unique words.

4. Create an index of words which length is higher then given value.
The result is a sorted list of pairs of: words, list of files where
the word occures.

5. Create statistic of used words. The result is a sorted list of
pairs: word, numer of occurences.

Hope you enjoy that.

Bye!

-- 
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: Sisyphus - mapreduce implemented in Clojure

2011-01-26 Thread Olek
I do not know Hadoop too well, but I will try to point the
difference.

The main idea is to implement MapReduce in a dynamic language.
The aim is to use higher-order functions and abstract types.
Advantages and disadvantages of the dynamic over static language are
well known, so you can decide yourself if this implementation fits the
problem being solved.
In short it is:
- Abstract implementation of algorithms on the data types
- Much smaller volume of the source code
- Skiped the compilation step
- Expressiveness syntax

Sisyphus is a young project, so not really suitable for production
use, the more that it lacks of user-friendly interface. However, I
think that is excellent to learn MapReduce.

A small volume of the source code implies faster understanding of the
system and algorithms used in it, which encourages for repairing,
improving, and modifying the system.

Perhaps Sisyphus will even indicate areas in which Clojure could
support Sisyphus natively. For example, serialization and
deserialization of functions or moving several higher-order functions
to the core of Clojure (eg, merge-sort or a lazy-group-by).

What distinguishes the Sisyphus from MapReduce are:
- The requesting user process becomes a master
- System can not deal with errors on record-level (is skipping the
whole split for a worker)
- Lack of redundancy of tasks for faster processing
- Operating on abstract data, rather than strings
- System can not optimize performance basing on location of data and
the nodes
- Lack of a convenient interface for scheduling and viewing the status
of tasks being performed
- It operates in terms of number of records, rather than the volume of
data (eg, when determinig the size of split or the size of sorting
buffers)

For now, enough on this topic.
This is a good text on the WIKI, so thanks for your question.


On 26 Sty, 01:18, kovas boguta  wrote:
> Hi Olek,
>
> Could you explain how this differs from Hadoop in concept and in
> execution? Thanks.
>
>
>
>
>
>
>
> On Tue, Jan 25, 2011 at 2:26 PM, Olek  wrote:
> > Hi!
>
> > It is nice to announce that Sisyphus - the google's mapreduce
> > implemented in Clojure - has been released.
> > Here are the sources:https://github.com/njoanna/Sisyphus
>
> > Some comments are still in polish but they will be gradually replaced
> > with english version.
>
> > Right now there are 5 tasks (zadanie 1 - 5):
>
> > 1. Count number of occurences of a particular word in a set of text
> > documents. The result is a pair of: searched word, its number of
> > occurences.
>
> > 2. Look up for a sequence of chars in a set of text documents. The
> > result is a set of pairs of: name of a file, line where the sequence
> > has occured.
>
> > 3. Sort words in a set of text documents. The results is a set of
> > sorted unique words.
>
> > 4. Create an index of words which length is higher then given value.
> > The result is a sorted list of pairs of: words, list of files where
> > the word occures.
>
> > 5. Create statistic of used words. The result is a sorted list of
> > pairs: word, numer of occurences.
>
> > Hope you enjoy that.
>
> > Bye!
>
> > --
> > 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: ANN: Textmash - another IDE for Clojure

2011-02-07 Thread Olek
Hi,

Yes, I would like to replace Java version with Clojure. For the
shorter startup time, I will try to do some threading (for menu
building and configuration reading) and compile clj files of boostrap
module (not existing yet) to .class. If the problem would lay in
clojure itself then I hope that some smart people of Clojure would
help.

Try to hack Clojure branch, Java version is not suitable for
modifications (has been written fast with poor design in mind).

Now I will move project to github (search for textmash of naleksander
user).

I have checked leiningen, the performance is very poor, so I will
stick with traditional way of developing app (especially that textmash
won't depend on other jars than clojure and contrib), but feel free to
branch project and use leiningen.

I hope that with Clojure version of TextMash, it will be pleasure to
write extensions.

Cheers

On 7 Lut, 00:01, Laurent PETIT  wrote:
> Hi Olek,
>
> I haven't found time to work more on it lately, but checked the
> current status of the codebase today.
> It appears that all new work is going into Textmash2, a rewrite in
> Clojure, if I understand it correctly ?
>
> I have some questions:
>
> * Is your intent to replace eventually the java version with the
> clojure version ? If so, how do you deal with the concern of "quick
> startup time" ?
> * If I find time to try to add paredit.clj support for it, is it worth
> continuing what I've started on the java branch, or should I hack on
> the clojure branch ?
>
> Cheers,
>
> --
> Laurent
>
> 2011/1/23 Olek :
>
>
>
> > Yes, make a branch.
> > I seen many people are using "leiningened", so it is a good (main
> > stream) choice, especially that your parts of code are written in
> > Clojure.
>
> > The layout of menus is made in pl/olek/textmash/menu/
> > WorkspaceMenu.java.
>
> > I have also started TextMash2 which is going to be entirely written in
> > Clojure, it is going to be written - 20 minutes a day, mainly in
> > fundamental (proof of concept) parts so It will be easier to other to
> > add/fullfill project with new features.
>
> > On 23 Sty, 20:49, Laurent PETIT  wrote:
> >> 2011/1/23 Olek 
>
> >> > I have added you to committers group, so you can commit your work.
> >> > Later I will switch to github since SVN with its "central repository"
> >> > scenario is not very useful in situation where I'm lack of time.
>
> >> OK, thanks.
>
> >> What I've achieved is more a "proof of concept" right now. Maybe I should
> >> put it in a branch.
> >> I'll quickly describe what I'm talking about, so you can choose:
>
> >>   * I've "leiningened" the project. Maybe I could "mavenize" it instead.
> >> What are your guts here ?
> >>   * I've "leiningened" it to test the "mavenization", on my side, of
> >> paredit.clj.
> >>   * paredit.clj uses clojure and clojure contrib. So the feature currently
> >> shows a delay when it is first invoked. Since the point of my demo was not
> >> clojure integration but paredit.clj integration, I've not tried to make 
> >> this
> >> happen in the background, etc. To the contrary, I've tried to compact the
> >> "proof of concept" code as much as possible in one place, so it can be
> >> easily spotted and reviewed.
> >>   * Currently, I've just demonstrated the "raise over sexpr" command I
> >> described in an earlier post in this same thread.
>
> >> What I've not been able to achieve (but I admit I haven't spent too much
> >> time right now on it) is how to make the command appear in the menu. I
> >> thought at first that it was derived from the "actions" map in the
> >> TextEditor class, but the layout of the menus must live somewhere else ...
> >> If you can help me spot the right place ?
>
> >> I also still have to finish proper bundling of paredit.clj in the first
> >> place, half done and should not last 'til the end of this week.
>
> >> Cheers,
>
> >> --
> >> Laurent
>
> > --
> > 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: ANN: Textmash - another IDE for Clojure

2011-02-11 Thread Olek
Hi!

What is the status of paredit.clj in TextMash? Do you have any time
for integration?
I have moved project to lein in case anyone care.
Editor pane is pretty much advanced, but still missing: encoding
support, files managment, text transformations, multiple repl support
and evaluation, brackets and hover highlighting, windows mangment,
events support, common edit opertations supoort (undo/redo, find,
select).
Nevertheless the text pane is now suitable for hacking.

Bye!

On 7 Lut, 09:21, Laurent PETIT  wrote:
> 2011/2/7 Shantanu Kumar :
>
> >> * Is your intent to replace eventually the java version with the
> >> clojure version ? If so, how do you deal with the concern of "quick
> >> startup time" ?
>
> > An idea: jEdit optionally lets you start a background server during
> > system startup so that firing up jEdit can be fast later. Maybe
> > something similar can help?
>
> Yes, I thought about it concerning the java version. But for the full
> clojure version which is currently actively developed, having clojure
> started first is required.

-- 
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: Textmash - another IDE for Clojure

2011-02-13 Thread Olek
Hi,

Yes I can reproduce the bug on MacOS too. I have added :main
textmash.core to project.clj. Now after: lein run, the GUI starts and
all implemented functionalities work fine, but in console I get:

Exception in thread "main" java.lang.NullPointerException
(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eval(Compiler.java:5415)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$null_opt.invoke(main.clj:279)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:422)
at clojure.lang.Var.invoke(Var.java:369)
at clojure.lang.AFn.applyToHelper(AFn.java:165)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
Caused by: java.lang.NullPointerException
at user$eval5.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
... 12 more

Looks like a bug in Clojure, since when running textmash in REPL mode,
there are no execeptions.

And about other thoughts.
Yes, I will create seperate discussion group for Textmash.
I agree that extending textmash should be done via plugins.
I thing about communication between plugins and textmash via evetns,
so plugins can know when what happen with what arguments and
eventually can stop or override that event/arguments. Also there will
be core API for text manipulation, menu modification, REPL control,
window and files managment.

Some features posted in my previous e-mail could be done with that
plugins system (as for start text encoding?). So the plugins API would
solve real problems.

Regards,
Olek

On 12 Lut, 06:16, Shantanu Kumar  wrote:
> On Feb 12, 8:26 am, Olek  wrote:
>
> > Hi!
>
> > What is the status of paredit.clj in TextMash? Do you have any time
> > for integration?
> > I have moved project to lein in case anyone care.
>
> I ran TextMash on Windows 7 using Leiningen's (version 1.4) run task:
>
> D:\projects\checkout\textmash>lein run -m textmash.core
>
> It shows up the TextMash GUI window but throws exceptions at the
> terminal. Any pointers?
>
> > Editor pane is pretty much advanced, but still missing: encoding
> > support, files managment, text transformations, multiple repl support
> > and evaluation, brackets and hover highlighting, windows mangment,
> > events support, common edit opertations supoort (undo/redo, find,
> > select).
>
> Are you planning to add any plugin support - is there an interface I
> can look at? Things like files management can probably be implemented
> as plugins(?). Also, I think it perhaps makes sense to set up a
> discussion group for TextMash.
>
> Regards,
> Shantanu

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


Stream not closed when reading clojure-version

2011-02-15 Thread Olek
Hi,

In 1.2  (line core.clj:5466) and 1.3 (line core.clj:5911) versions of
Clojure, opened stream for reading clojure-version is not closed what
causes problems in JEE env.

Cheers,
Olek

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


Yield implementation

2011-02-22 Thread Olek
Hi,

I know that it is not a lispy way, but most of us come from imperative
Java world, and if there is anyone who needs python/ruby yield here it
is: http://bit.ly/ejQrLl

and the example usage is: http://bit.ly/ekBHr0

Cheers,
Olek

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


Matching balanced text?

2011-03-04 Thread Olek
Hi!

I would like to parse text like "some ${mpw${next}abc} tata" in order
to find all ${...} occurrences.
What is interesting that in that string there are nested ${ ... }
expressions.
Is there any way to easily reg-ex (or parse) such groups in Clojure?

I have checked perl reg-ex and here is the answer: 
http://perldoc.perl.org/perlfaq6.html

It would be nice if expression ${ ... } could be escaped so it would
be grabbed for example with \, like "ala \${some} nice"

Bye!

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