Typedef-like functionality for Clojure records?

2013-09-25 Thread Vincent Chen
Hi,

I have in my hands an XML description of data structures that I want
to mechanically translate into Clojure. There are  and
 elements, with  being similar to structs in C (list
of fields) and  being similar to typedef in C (defining new
name for already defined s).

I model s using Clojure records, but I'm not sure how to refer
to them with a new name when it comes to s. Given the
following specification:


  
  




I would create records:

(defrecord foo [a b])
(defrecord bar [a b])

The problem is that struct foo and typedef bar lives in different
namespaces, i.e. I don't have foo's specification when I encounter
typedef bar. What I'd like to do is (def bar some-ns/foo), but what
about ->foo and map->foo?

So should I:
- (def bar some-ns/foo) (def ->bar some-ns/->foo) (def map->bar
some-ns/map->foo), while hoping that Clojure doesn't extend records
syntax/capabilities in the future?
- Use something else than records to model structs (suggestions welcome)?
- Other?

Thanks,

Vincent

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


Nightcode Clojure syntax highlighting

2013-09-25 Thread adrians
Zach,

I noticed that highlighting is broken on some Clojure files (the paredit 
widget ones, for example) and saw that the latest version (2.5.0) of 
RSyntaxTextArea might have addressed this according to the release notes. 
The project's github page already had an 
issuerequesting Maven 
repo updating and I added my two cents there. Maybe if you 
add your own voice it'll speed things up.


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


Nightcode questions

2013-09-25 Thread adrians
Hi Zach,

After trying various multi-key combinations in order to invoke some paredit 
commands, I ended up so that typing Ctrl+anything would insert odd, non 
alphanumeric characters into the edior (I'm using a US keyboard, btw). Even 
basics like ctrl-z, ctrl-s wouldn't do the right thing. Are you using the 
default encoding or setting it to anything specific in the text editor? 
Could you make this customizable? I had similar issues in Eclipse until I 
set the container encoding to UTF-8 so that new editors would use that. I'd 
also like to know what happens with existing files that have a specific 
encoding as far as any default conversion being applied. Can you give any 
details?

Another thing I'm not clear on, are all the shortcuts supposed to be 
working at this point? I see (by pressing ctrl) that the toggle for the 
paredit switch is shift-P, so I guess ctrl-shift-P should toggle that 
toolbar button, but it doesn't, for me. If I turn on paredit mode using the 
mouse, how do I invoke commands? Is this working yet?

Thanks for adding clarity to my fumbling around.

-- Adrian

-- 
-- 
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: [ANN] XCLJB v0.1.0: X protocol Clojure-language Binding

2013-09-25 Thread Vincent Chen
Hi,

Yes, I have looked at core.async. I'm assuming you mean sticking
events inside a channel and providing the channel for the user to use?
I decided against it for two reasons:

- core.async is still experimental, as far as I can tell.
- What I'm doing currently is similar: have a LinkedBlockingQueue of
events, with two access functions wait-event (blocking on empty queue)
and poll-event (non-blocking with timeout). This seems adequate and
simpler for what this library needs.

It might just be that I don't see what I'd have to gain from using
core.async. Feel free to convince me otherwise.

Thanks,
Vincent

On Wed, Sep 25, 2013 at 1:50 AM, Adam Clements  wrote:
> Have you looked at core.async for shuttling asynchronous events back and
> forth. This sounds to me like the sort of thing it was designed for
>
> On 10 Sep 2013 06:30, "Vincent Chen"  wrote:
>>
>> Hello everyone,
>>
>> XCLJB is a Clojure language binding for the X Window System, similar
>> to the XCB (the X protocol C-language Bindings). It allows programmers
>> to communicate with and write GUIs for an X server in Clojure, without
>> having to drop down into C.
>>
>> Source code, README, and examples: https://github.com/noodlewiz/xcljb
>>
>> Leiningen dependency information:
>>
>> [xcljb "0.1.0"]
>>
>> As the version number indicates, this is a developmental release. This
>> means
>>   - Things are usable, but not yet feature complete.
>>   - API not necessarily stable, though I won't break compatibility for
>> no reason.
>>   - Comments, suggestions welcome.
>>
>> Open problems looking for suggestions:
>>   - How should I signal errors? XCLJB, like XCB, is mostly
>> asynchronous. Currently sending a request will immediately return a
>> Clojure promise. The promise will be delivered with either a reply or
>> an error when they arrive, this allows multiple requests to be sent
>> without blocking (this is the asynchronous part). I'd like to raise an
>> exception when a user deref the promise and the promise is an error,
>> but there seems to be no way of doing so. Should I make my own promise
>> type by implementing clojure.lang.IDeref? Is there another way of
>> achieving what I had in mind?
>>
>>   - Is there an easier way to match against records? Events are
>> currently implemented as records, so event loops would have to look
>> like
>>
>> (ns ...
>>   (:import [xcljb.gen.xproto_types ExposeEvent KeyPressEvent]))
>> (while true
>>   (let [e (wait-event conn)]
>> (condp instance? e
>>   ExposeEvent
>>   ...
>>
>>   KeyPressEvent
>>   ...
>>
>>   nil)))
>>
>> I'd prefer not to make my user import the event types as if they
>> are Java classes. Is there a more Clojurey way of doing record type
>> matching? Is there a better way of implementing events?
>>
>> Regards,
>>
>> Vincent Chen
>>

-- 
-- 
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: [ANN] clara-rules 0.1.0 released -- rules as a control structure

2013-09-25 Thread zcaudate
Hi Ryan!

Great work. Can normal clojure maps can be used instead of records?

-- 
-- 
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: [ANN] clara-rules 0.1.0 released -- rules as a control structure

2013-09-25 Thread Ryan Brush
Sounds great, Alan! I hope the significant refactoring of the rule 
shredding and optimization I made last weekend didn't disrupt you too much. 

The good news is I think the APIs structure of the code should be 
reasonably stable now. I'm planning on attacking the accumulator logic next 
-- it's kind of a mess, has some confusing semantics when facts are 
retracted, and is pretty inefficient -- but that change should be pretty 
localized. 

I'm really curious to see how involved a ClojureScript port of this will 
be. The vast majority of it should be portable, but there are some things 
JVM-specific. These are somewhat unusual in most Clojure programs, such as 
inspecting a Clojure record or JavaBean to enumerate the pre-defined 
fields, making them visible on the left-hand side of the rule. Clara also 
makes more use of macros than I would expect from most code, necessitated 
by the fact that it essentially defines a new control structure for logic. 
But if we can solve those cleanly, I *think* it will translate to 
ClojureScript pretty well.

On a related note, I recently learned of a JavaScript-based Rete 
implementation called Nools. [1] We might be able to learn a thing or two 
from that; I certainly learned a lot from JVM-based rule engines before 
starting Clara.

In any case, I look forward to seeing what you're up to. I do want to get 
Clojurescript working with this once I get the JVM-based version a bit more 
solid and validate it against some problems I'm working on.

[1]
https://github.com/C2FO/nools

On Wednesday, September 25, 2013 10:03:16 PM UTC-5, Alan Moore wrote:
>
> +.010
>
> Thanks for the update! I'm still working on mods for ClojureScript... I'll 
> send a pull request when I'm done.
>
> Alan
>
>
> On Monday, September 23, 2013 7:16:12 PM UTC-7, Ryan Brush wrote:
>>
>> This is the first release of Clara, forward-chaining rules in Clojure. 
>>
>> Details on the github site:
>>
>> https://github.com/rbrush/clara-rules
>>
>> I've also posted the rationale for what I'm doing here:
>>
>> http://www.toomuchcode.org/2013/09/rules-as-control-structure.html
>>
>> The gist is that forward-chaining rules are a great tool for many 
>> problems and Clojure's strengths can address some weaknesses in existing 
>> production systems. Right now Clara supports most of the major features 
>> seen in production systems, embraces Clojure values like immutability, and 
>> is powerful enough for a number of use cases. It still needs to be profiled 
>> and subjected to more rigorous testing before I'd consider it production 
>> ready, but this release is for anyone interested in experimenting with 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/groups/opt_out.


Re: [ANN] Nightcode 0.1.0, a Clojure IDE

2013-09-25 Thread Zach Oakes
I messed with JavaFX and Clojure in the past. I found a neat little library 
called splendid on BitBucket that wrapped a few things, but nothing like 
seesaw. Also, I mainly was interested in it for its webkit-based WebView, 
but that turned out to be really crummy. I also didn't like that it wasn't 
in OpenJDK (thought I think that will change with Java 8).

I do remember being intrigued by the native packaging that JavaFX 
supposedly provides. Then I found a neat tool called JWrapper than seems to 
do the same thing, but for any Java application. Eventually I decided it 
may not be very secure to bundle a private JRE that I must worry about 
updating. Lastly, I'm not sold on installers at all; there's a nice 
simplicity to just running a jar file.

On Wednesday, September 25, 2013 10:06:31 PM UTC-4, adrians wrote:
>
>
> Zach, have you considered using JavaFX instead of Swing and having an 
> embedded JRE as a turnkey one file setup (see 
> http://docs.oracle.com/javafx/2/deployment/packaging.htm)? You'd probably 
> be able to build a UI with much more potential for the long run.
>
>
> On Wednesday, September 25, 2013 9:53:13 PM UTC-4, Zach Oakes wrote:
>>
>> It won't compile to the CLR, but you can certainly run the jar file on 
>> Windows. I assume you want to avoid installing Java, but that won't be 
>> possible because its UI is entirely Swing-based and it has JVM-specific 
>> stuff on the backend like the HotSwap feature.
>>
>> On Wednesday, September 25, 2013 7:48:11 PM UTC-4, Mike wrote:
>>>
>>> Probably a dumb question, but for those of us who would love to use 
>>> Clojure under Windows, is there a way to use this IDE in a Clojure-CLR 
>>> environment?
>>>
>>> In any case, thank you for your efforts.
>>>
>>> On Wednesday, September 25, 2013 8:33:47 AM UTC-5, Zach Oakes wrote:

 Nightcode is an IDE written in Clojure. I announced a very half-baked 
 0.0.1 nearly two months ago, and after tons of bug fixes and feature 
 additions, I'm happy to release a two-thirds-baked 0.1.0:

 https://nightcode.info/



-- 
-- 
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: [ANN] clara-rules 0.1.0 released -- rules as a control structure

2013-09-25 Thread Alan Moore
+.010

Thanks for the update! I'm still working on mods for ClojureScript... I'll 
send a pull request when I'm done.

Alan


On Monday, September 23, 2013 7:16:12 PM UTC-7, Ryan Brush wrote:
>
> This is the first release of Clara, forward-chaining rules in Clojure. 
>
> Details on the github site:
>
> https://github.com/rbrush/clara-rules
>
> I've also posted the rationale for what I'm doing here:
>
> http://www.toomuchcode.org/2013/09/rules-as-control-structure.html
>
> The gist is that forward-chaining rules are a great tool for many problems 
> and Clojure's strengths can address some weaknesses in existing production 
> systems. Right now Clara supports most of the major features seen in 
> production systems, embraces Clojure values like immutability, and is 
> powerful enough for a number of use cases. It still needs to be profiled 
> and subjected to more rigorous testing before I'd consider it production 
> ready, but this release is for anyone interested in experimenting with 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/groups/opt_out.


Video: Generating Beautiful (and Correct) Documentation from Unit Tests Files

2013-09-25 Thread zcaudate
I've put up a video of a new documentation plugin for leiningen

Project Page:
https://github.com/zcaudate/lein-midje-doc

Youtube Video:
http://www.youtube.com/watch?v=8FjvhDPIUWE&feature=youtu.be


Sample Generated Documentation:
http://z.caudate.me/lein-midje-doc/
http://z.caudate.me/ribol/
http://z.caudate.me/ova/


Any Comments or Feedback would be appreciated

-- 
-- 
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: [ANN] ribol "v0.2.1" - comprehensive document on conditional restart systems

2013-09-25 Thread zcaudate
Hi Dima,

You can now put 'finally' clause in v0.2.2, just loaded onto clojars. 

I haven't done an example on the readme yet

but the following should print a hello and return [1 2 :A]:

(manage  ;; L2
 [1 2 (manage;; L1
   (raise :A);; L0
   (on :A [] :A))]   ;; H1A
 (on :B [] :B) (finally (print "hello")))

Chris.



On Thursday, September 26, 2013 1:26:37 AM UTC+10, Dima Sabanin wrote:
>
> Hi Chris!
>
> Great library! I'm trying to apply this to a project I'm working on, but 
> I'm somewhat new to the conditional restarts theory. What would I use 
> instead of Clojure's finally block to properly free up the resources on 
> error escalation?
>
> -- 
> Thanks,
> Dima Sabanin
> http://twitter.com/dimasabanin
>
>
> On Wed, Sep 25, 2013 at 3:14 AM, zcaudate  >wrote:
>
>> I've done a pretty comprehensive guide on conditional restart systems in 
>> clojure with diagrams to show why it is much more flexible over try/catch 
>> mechanism
>>
>> Project:
>> https://github.com/zcaudate/ribol
>>
>> Generated Documentation:
>> http://z.caudate.me/ribol/
>>
>>
>>
>>  -- 
>> -- 
>> 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/groups/opt_out.
>>
>
>
>
> -- 
> Best regards,
> Dima Sabanin
> http://twitter.com/dimasabanin 
>

-- 
-- 
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: [ANN] ribol "v0.2.1" - comprehensive document on conditional restart systems

2013-09-25 Thread Dima Sabanin
Something as simple as (finally) block in (manage) would work for me, but
I'm not sure how it fits the philosophy. As I said, I've read about
conditional restarts in Common Lisp, but never actually used it in the real
project. I wonder how finally block is implemented there?


On Wed, Sep 25, 2013 at 7:18 PM, zcaudate  wrote:

> Hi Dima,
>
> That's actually a really good question. I don't think it possible
> currently :)
>
> I think I do need to support a finally clause But can you give a code
> example of how you might want to write such a thing?
>
> --
> --
> 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.
>



-- 
Best regards,
Dima Sabanin
http://twitter.com/dimasabanin

-- 
-- 
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: [ANN] Nightcode 0.1.0, a Clojure IDE

2013-09-25 Thread adrians

Zach, have you considered using JavaFX instead of Swing and having an 
embedded JRE as a turnkey one file setup (see 
http://docs.oracle.com/javafx/2/deployment/packaging.htm)? You'd probably 
be able to build a UI with much more potential for the long run.


On Wednesday, September 25, 2013 9:53:13 PM UTC-4, Zach Oakes wrote:
>
> It won't compile to the CLR, but you can certainly run the jar file on 
> Windows. I assume you want to avoid installing Java, but that won't be 
> possible because its UI is entirely Swing-based and it has JVM-specific 
> stuff on the backend like the HotSwap feature.
>
> On Wednesday, September 25, 2013 7:48:11 PM UTC-4, Mike wrote:
>>
>> Probably a dumb question, but for those of us who would love to use 
>> Clojure under Windows, is there a way to use this IDE in a Clojure-CLR 
>> environment?
>>
>> In any case, thank you for your efforts.
>>
>> On Wednesday, September 25, 2013 8:33:47 AM UTC-5, Zach Oakes wrote:
>>>
>>> Nightcode is an IDE written in Clojure. I announced a very half-baked 
>>> 0.0.1 nearly two months ago, and after tons of bug fixes and feature 
>>> additions, I'm happy to release a two-thirds-baked 0.1.0:
>>>
>>> https://nightcode.info/
>>>
>>>

-- 
-- 
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: [ANN] Nightcode 0.1.0, a Clojure IDE

2013-09-25 Thread Zach Oakes
It won't compile to the CLR, but you can certainly run the jar file on 
Windows. I assume you want to avoid installing Java, but that won't be 
possible because its UI is entirely Swing-based and it has JVM-specific 
stuff on the backend like the HotSwap feature.

On Wednesday, September 25, 2013 7:48:11 PM UTC-4, Mike wrote:
>
> Probably a dumb question, but for those of us who would love to use 
> Clojure under Windows, is there a way to use this IDE in a Clojure-CLR 
> environment?
>
> In any case, thank you for your efforts.
>
> On Wednesday, September 25, 2013 8:33:47 AM UTC-5, Zach Oakes wrote:
>>
>> Nightcode is an IDE written in Clojure. I announced a very half-baked 
>> 0.0.1 nearly two months ago, and after tons of bug fixes and feature 
>> additions, I'm happy to release a two-thirds-baked 0.1.0:
>>
>> https://nightcode.info/
>>
>>

-- 
-- 
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: [ANN] Nightcode 0.1.0, a Clojure IDE

2013-09-25 Thread Mike
Probably a dumb question, but for those of us who would love to use Clojure 
under Windows, is there a way to use this IDE in a Clojure-CLR environment?

In any case, thank you for your efforts.

On Wednesday, September 25, 2013 8:33:47 AM UTC-5, Zach Oakes wrote:
>
> Nightcode is an IDE written in Clojure. I announced a very half-baked 
> 0.0.1 nearly two months ago, and after tons of bug fixes and feature 
> additions, I'm happy to release a two-thirds-baked 0.1.0:
>
> https://nightcode.info/
>
>

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


Introspecting documentation information

2013-09-25 Thread Marek Kubica
Hi,

I was thinking of extracting the information that (doc) returns, but I
couldn't find an universal way to do it:

 - When I use (meta (var foo)) this works, but only for functions
 - I looked in the source code of clojure.repl/doc but it uses a lot of
   private functions, that I'd have to copy & paste

So, is there any universal way to get docs of special forms as well?

Thanks in advance!

regards,
Marek

-- 
-- 
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: [ANN] ribol "v0.2.1" - comprehensive document on conditional restart systems

2013-09-25 Thread zcaudate
Hi Dima,

That's actually a really good question. I don't think it possible currently :)

I think I do need to support a finally clause But can you give a code 
example of how you might want to write such a thing?

-- 
-- 
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: [ANN] ribol "v0.2.1" - comprehensive document on conditional restart systems

2013-09-25 Thread Dima Sabanin
Hi Chris!

Great library! I'm trying to apply this to a project I'm working on, but
I'm somewhat new to the conditional restarts theory. What would I use
instead of Clojure's finally block to properly free up the resources on
error escalation?

-- 
Thanks,
Dima Sabanin
http://twitter.com/dimasabanin


On Wed, Sep 25, 2013 at 3:14 AM, zcaudate  wrote:

> I've done a pretty comprehensive guide on conditional restart systems in
> clojure with diagrams to show why it is much more flexible over try/catch
> mechanism
>
> Project:
> https://github.com/zcaudate/ribol
>
> Generated Documentation:
> http://z.caudate.me/ribol/
>
>
>
>  --
> --
> 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.
>



-- 
Best regards,
Dima Sabanin
http://twitter.com/dimasabanin

-- 
-- 
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: [ANN] Nightcode 0.1.0, a Clojure IDE

2013-09-25 Thread Zach Oakes
The theme is currently hard-coded. BTW I submitted it to HN, in case anyone 
cares:

https://news.ycombinator.com/item?id=613

On Wednesday, September 25, 2013 9:54:23 AM UTC-4, Shantanu Kumar wrote:
>
> Thanks for the release! Is there a way to change the color theme, e.g. if 
> I want to set a light background?
>
> Shantanu
>
> On Wednesday, 25 September 2013 19:03:47 UTC+5:30, Zach Oakes wrote:
>>
>> Nightcode is an IDE written in Clojure. I announced a very half-baked 
>> 0.0.1 nearly two months ago, and after tons of bug fixes and feature 
>> additions, I'm happy to release a two-thirds-baked 0.1.0:
>>
>> https://nightcode.info/
>>
>> Here's what's changed since the first release:
>>
>> - When holding down the Ctrl/Cmd key, you will now see a list of 
>> currently-open files that you can switch between with the left/right arrows 
>> and close with 'W'. It's Nightcode's clutter-free answer to tabs.
>> - In Java projects, the "Reload" button will invoke the JVM's HotSwap 
>> feature to compile all modified Java files and inject them into the running 
>> process. In Clojure projects, "Reload" will eval all modified Clojure files 
>> into the running REPL.
>> - Paredit is now optional, and can be toggled by hitting the "Paredit" 
>> button above any open clj/cljs file.
>> - Code completion for clj/cljs files is now available by hitting Ctrl/Cmd 
>> + Space or just hitting the "Doc" button. This feature was made possible by 
>> the compliment library from Alex Yakushev.
>> - In ClojureScript projects, there is now an "Auto" button in the build 
>> pane. Hitting it will run a process equivalent to "lein cljsbuild auto", 
>> allowing your cljs files to be rebuilt every time you save them.
>> - In addition to the existing game template for Java, there is now one 
>> for Clojure. Both use LibGDX and can compile for desktop and Android.
>> - There is now a "Replace" box to complement the "Find" box.
>> - It now consumes less than 100% of your CPU.
>>
>

-- 
-- 
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: [ANN] Nightcode 0.1.0, a Clojure IDE

2013-09-25 Thread Shantanu Kumar
Thanks for the release! Is there a way to change the color theme, e.g. if I 
want to set a light background?

Shantanu

On Wednesday, 25 September 2013 19:03:47 UTC+5:30, Zach Oakes wrote:
>
> Nightcode is an IDE written in Clojure. I announced a very half-baked 
> 0.0.1 nearly two months ago, and after tons of bug fixes and feature 
> additions, I'm happy to release a two-thirds-baked 0.1.0:
>
> https://nightcode.info/
>
> Here's what's changed since the first release:
>
> - When holding down the Ctrl/Cmd key, you will now see a list of 
> currently-open files that you can switch between with the left/right arrows 
> and close with 'W'. It's Nightcode's clutter-free answer to tabs.
> - In Java projects, the "Reload" button will invoke the JVM's HotSwap 
> feature to compile all modified Java files and inject them into the running 
> process. In Clojure projects, "Reload" will eval all modified Clojure files 
> into the running REPL.
> - Paredit is now optional, and can be toggled by hitting the "Paredit" 
> button above any open clj/cljs file.
> - Code completion for clj/cljs files is now available by hitting Ctrl/Cmd 
> + Space or just hitting the "Doc" button. This feature was made possible by 
> the compliment library from Alex Yakushev.
> - In ClojureScript projects, there is now an "Auto" button in the build 
> pane. Hitting it will run a process equivalent to "lein cljsbuild auto", 
> allowing your cljs files to be rebuilt every time you save them.
> - In addition to the existing game template for Java, there is now one for 
> Clojure. Both use LibGDX and can compile for desktop and Android.
> - There is now a "Replace" box to complement the "Find" box.
> - It now consumes less than 100% of your CPU.
>

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


[ANN] Nightcode 0.1.0, a Clojure IDE

2013-09-25 Thread Zach Oakes
Nightcode is an IDE written in Clojure. I announced a very half-baked 0.0.1 
nearly two months ago, and after tons of bug fixes and feature additions, 
I'm happy to release a two-thirds-baked 0.1.0:

https://nightcode.info/

Here's what's changed since the first release:

- When holding down the Ctrl/Cmd key, you will now see a list of 
currently-open files that you can switch between with the left/right arrows 
and close with 'W'. It's Nightcode's clutter-free answer to tabs.
- In Java projects, the "Reload" button will invoke the JVM's HotSwap 
feature to compile all modified Java files and inject them into the running 
process. In Clojure projects, "Reload" will eval all modified Clojure files 
into the running REPL.
- Paredit is now optional, and can be toggled by hitting the "Paredit" 
button above any open clj/cljs file.
- Code completion for clj/cljs files is now available by hitting Ctrl/Cmd + 
Space or just hitting the "Doc" button. This feature was made possible by 
the compliment library from Alex Yakushev.
- In ClojureScript projects, there is now an "Auto" button in the build 
pane. Hitting it will run a process equivalent to "lein cljsbuild auto", 
allowing your cljs files to be rebuilt every time you save them.
- In addition to the existing game template for Java, there is now one for 
Clojure. Both use LibGDX and can compile for desktop and Android.
- There is now a "Replace" box to complement the "Find" box.
- It now consumes less than 100% of your CPU.

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


[ANN] modern-cljs - Tutorial 19: A survival guide for livin' on the edge

2013-09-25 Thread Giacomo Cosenza
Hi all,
I just published the 19th tutorial of the modern-cljs series

https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-19.md

It talks about a typical collaboration workflow on github when you want to work 
on someone else's library and then publish a snapshot release on clojars. 
As a fictional example I used few shoreleave libs. 

HIH

My best

Mimmo

p.s.: leiningen is the most powerful and the easiest to use project automating 
tool I have ever used. Thanks so much to Phil Hagelberg and all the others that 
collaborated with him for bringing it to us. 


-- 
-- 
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: [GSoC] core.typed

2013-09-25 Thread Ambrose Bonnaire-Sergeant
Oh, and a big thanks to David Nolen for mentoring me, now twice in a row! I
will certainly be mentoring next year.

Ambrose


On Wed, Sep 25, 2013 at 6:32 PM, Ambrose Bonnaire-Sergeant <
abonnaireserge...@gmail.com> wrote:

> Hi,
>
> Google Summer of Code has ended and it has been a particularly productive
> one for core.typed.
>
> In that time I:
>
> 1. released core.typed 
> 0.2
>  which
> I consider useful for production systems.
> 2. resolved 30 Jira 
> tickets
> 3. wrote a preliminary version of Typed 
> Clojurescript
> 4. added 
> manyenhancements
>  and bug fixes, some written by other contributors
> 5. generated complete API 
> documentation(also thanks Tom Faulhaber)
> 6. opened a mailing 
> listand IRC 
> channel #typed-clojure
> 7. started a blog  about Typed Clojure
> 8. wrote a leiningen plugin for core.typed: 
> lein-typed
> 9. wrote 3 core.typed 
> recipesfor 
> Clojure Cookbook
>
> One task I did *not* do was write significantly more user documentation.
>
> If you haven't been following core.typed recently, we're up to version
> 0.2.13. There have been no breaking changes since 0.2.0.
>
> Changelog 
> Dependency info 
>
> Some notable changes:
> - big 
> improvementsto
>  assoc/merge by cspencer
> - new 
> aliases
>  for
> common types
>
> I intend to continue work on core.typed, you will hear of my future plans
> in the next week.
>
> Thanks,
> Ambrose
>

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


[GSoC] core.typed

2013-09-25 Thread Ambrose Bonnaire-Sergeant
Hi,

Google Summer of Code has ended and it has been a particularly productive
one for core.typed.

In that time I:

1. released core.typed
0.2
which
I consider useful for production systems.
2. resolved 30 Jira
tickets
3. wrote a preliminary version of Typed
Clojurescript
4. added 
manyenhancements
and bug fixes, some written by other contributors
5. generated complete API
documentation(also thanks Tom
Faulhaber)
6. opened a mailing
listand
IRC channel #typed-clojure
7. started a blog  about Typed Clojure
8. wrote a leiningen plugin for core.typed:
lein-typed
9. wrote 3 core.typed
recipesfor
Clojure Cookbook

One task I did *not* do was write significantly more user documentation.

If you haven't been following core.typed recently, we're up to version
0.2.13. There have been no breaking changes since 0.2.0.

Changelog 
Dependency info 

Some notable changes:
- big 
improvementsto
assoc/merge by cspencer
- new 
aliases
for
common types

I intend to continue work on core.typed, you will hear of my future plans
in the next week.

Thanks,
Ambrose

-- 
-- 
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: [ANN] ribol "v0.2.1" - comprehensive document on conditional restart systems

2013-09-25 Thread Baishampayan Ghose
This is brilliant, thanks! ~BG

On Wed, Sep 25, 2013 at 12:44 PM, zcaudate  wrote:
> I've done a pretty comprehensive guide on conditional restart systems in
> clojure with diagrams to show why it is much more flexible over try/catch
> mechanism
>
> Project:
> https://github.com/zcaudate/ribol
>
> Generated Documentation:
> http://z.caudate.me/ribol/
>
>
>
> --
> --
> 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.



-- 
Baishampayan Ghose
b.ghose at gmail.com

-- 
-- 
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: [ANN] XCLJB v0.1.0: X protocol Clojure-language Binding

2013-09-25 Thread Adam Clements
Have you looked at core.async for shuttling asynchronous events back and
forth. This sounds to me like the sort of thing it was designed for
On 10 Sep 2013 06:30, "Vincent Chen"  wrote:

> Hello everyone,
>
> XCLJB is a Clojure language binding for the X Window System, similar
> to the XCB (the X protocol C-language Bindings). It allows programmers
> to communicate with and write GUIs for an X server in Clojure, without
> having to drop down into C.
>
> Source code, README, and examples: https://github.com/noodlewiz/xcljb
>
> Leiningen dependency information:
>
> [xcljb "0.1.0"]
>
> As the version number indicates, this is a developmental release. This
> means
>   - Things are usable, but not yet feature complete.
>   - API not necessarily stable, though I won't break compatibility for
> no reason.
>   - Comments, suggestions welcome.
>
> Open problems looking for suggestions:
>   - How should I signal errors? XCLJB, like XCB, is mostly
> asynchronous. Currently sending a request will immediately return a
> Clojure promise. The promise will be delivered with either a reply or
> an error when they arrive, this allows multiple requests to be sent
> without blocking (this is the asynchronous part). I'd like to raise an
> exception when a user deref the promise and the promise is an error,
> but there seems to be no way of doing so. Should I make my own promise
> type by implementing clojure.lang.IDeref? Is there another way of
> achieving what I had in mind?
>
>   - Is there an easier way to match against records? Events are
> currently implemented as records, so event loops would have to look
> like
>
> (ns ...
>   (:import [xcljb.gen.xproto_types ExposeEvent KeyPressEvent]))
> (while true
>   (let [e (wait-event conn)]
> (condp instance? e
>   ExposeEvent
>   ...
>
>   KeyPressEvent
>   ...
>
>   nil)))
>
> I'd prefer not to make my user import the event types as if they
> are Java classes. Is there a more Clojurey way of doing record type
> matching? Is there a better way of implementing events?
>
> Regards,
>
> Vincent Chen
>
> --
> --
> 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.
>

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


[ANN] ribol "v0.2.1" - comprehensive document on conditional restart systems

2013-09-25 Thread zcaudate
I've done a pretty comprehensive guide on conditional restart systems in 
clojure with diagrams to show why it is much more flexible over try/catch 
mechanism

Project:
https://github.com/zcaudate/ribol

Generated Documentation:
http://z.caudate.me/ribol/



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