Re: Design Composition and Performance

2013-09-04 Thread Sam Aaron

On 3 Sep 2013, at 18:39, Stan Dyck stan.d...@gmail.com wrote:

 (Not giving up on emacs-live tho. Can we wire on a theremin somehow in the 
 next release?)

I already have prototypes of wiring in MIDI controllers directly to values in 
arbitrary Emacs buffers. It wouldn't be hard to switch to using a Leap Motion 
controller which would have a similar effect as a theremin...

Sam

---
http://sam.aaron.name


-- 
-- 
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: Design Composition and Performance

2013-09-03 Thread Sam Aaron

On 3 Sep 2013, at 17:34, Tim Visher tim.vis...@gmail.com wrote:

 What talk was this?

http://www.infoq.com/presentations/Design-Composition-Performance

Sam

---
http://sam.aaron.name

-- 
-- 
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: IDE feature

2013-08-08 Thread Sam Aaron
Haha, I come back to this list after a good few months of not being able to 
keep up with the volume to find a rant about paredit - priceless!

Seriously though, these things are all personal and as such clearly get 
people's backs up. So for what it's worth, let me throw my thoughts in...

I wouldn't go so far as to say that not using paredit (or an equivalent) is 
the wrong way (although I probably would in the pub after a couple of pints). 
However, it *definitely* feels to me that using an editor that doesn't support 
paredit feels broken - and I always wind up writing broken code with missing 
parenthesis because my mind is used to not worrying about them. Also, moving 
forms around manually is pretty dreadful and syntax-error prone - paredit 
massively improves this.

The analogy I think about is touch typing. People might also make a claim that 
programmers that don't touch type are doing it the wrong way. I personally 
definitely find that touch typing improves my ability to program as it frees my 
mind from having to worry about my finger placement and looking at the 
keyboard. Also, I can do an awful lot with key combos which all serves to 
improve my bandwidth of communication to the computer. However, this isn't an 
experience you can explain to someone - you have to be a touch typer to 
appreciate these benefits. Similarly, you have to be fluent with paredit to 
appreciate the benefits. With both, you have to go through a pretty dreadful 
learning curve where your productivity is reduced.

Here's a challenge:
Find me a person who touch typed fluently that stopped and reverted back to 
single finger typing.
Find me a person who fluently used paredit that stopped and reverted back to 
manual parenthesis manipulation.

Sam

---
http://sam.aaron.name


On 8 Aug 2013, at 14:09, Stefan Kamphausen ska2...@gmail.com wrote:

 Just for the record:
 
 I've been coding in Lisp for close to 30 years 
 
 
 make that 20 years in my case and I agree with Lee. 
 
 Can't live without C-M-q, TAB, M-left/right, C-M-SPC but paredit is 
 interfering too much for /my/ taste.
 
 stefan
 
 -- 
 -- 
 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.


Making Music with Clojure: Meta-eX

2013-08-08 Thread Sam Aaron
Hey everyone,

I just thought I'd give you a heads up of what I'm currently doing with Clojure 
and Overtone within the music space. I gave a talk at a music tech conference 
in London a good few months ago and they just put the video online:

https://www.youtube.com/watch?v=zJqH5bNcIN0

It's a pretty good description of the kinds of things we do (as Meta-eX) and a 
demonstration of the power of Clojure for making and manipulating music live in 
front of an audience. We also put a different spin on the notion of performance 
testing of our software ;-)

The great thing about this video for me is that I can clearly see the huge 
improvements we've made since then. Clojure is such a joy to hack with and I 
feel wonderfully productive with it. Our system is a massively concurrent beast 
handling and coordinating many different streams of information (nREPL comms, 
MIDI devices, monomes, OSC messages, etc.) in addition to coordinating the 
synthesis engine with the GLSL shaders. Such fun stuff!

For more info, check us out here: http://meta-ex.com

Finally, for anyone in the London/Cambridge area - you might want to come to 
Wysing Arts Festival to see us play: 
http://www.wysingartscentre.org/whats_on/annual_music_festival

Sam

---
http://sam.aaron.name

-- 
-- 
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: IDE feature

2013-08-08 Thread Sam Aaron

On 8 Aug 2013, at 16:29, Tim Daly d...@axiom-developer.org wrote:

 Find me a person who fluently used paredit that stopped and reverted back to 
 manual parenthesis manipulation.
 
 /me raises my hand.
 
 Structural editing was useful in LispVM (on IBM mainframes) where the
 display was 12 lines by 40 characters. It might also be useful for the
 iPad lisping app. If your IDE uses 80% of your display for buttons,
 lines, and icons I can see where it would be useful, since most of the
 text area is gone.
 
 However, I've been programming in lisp for 42 years on everything from
 punched cards to mega-displays. I find that keeping structure and
 counting parens is like finishing a thought. It just happens.  I don't
 remember the last time I had a paren-balance bug. I've spent the last 13
 years rewriting and refactoring Axiom which is 1.2 million lines of lisp
 code so I have a fair sized sample as a test case.
 
 I find that programming occurs in my head and that the computer is
 only useful for recording the results. For me, smart editing and IDEs
 get in my way, like a helpful newbie in a metal shop.
 
 Then again I don't use IDEs. If it works for you, go for it.

Super interesting - thanks for sharing this. 

The fact that this list contains such a broad range of such interesting people 
is a real asset to the Clojure community.

Sam

---
http://sam.aaron.name

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




Meta-eX: Hacking Overtone on the Stubnitz - Thurs 16th May

2013-05-13 Thread Sam Aaron
Hey everyone,

You've heard of people live coding Clojure examples as part of their talks. 
Heck, you've probably even seen Stuart Halloway jam on Chris Ford's Bach 
composition in the new O'Reilly lecture series Clojure Inside Out. 

However, that's just warm-up material...

Come and jump aboard the M.S. Stubnitz and witness Meta-eX blow your mind with 
some seriously loud hand-hacked beats. Meta-eX is the only Clojure-powered band 
on Earth, and we hack live in Emacs using Overtone to weave immutable data 
structures into ephemeral sounds.

Our sound isn't hardcore, breakcore or speedcore - it's multi-core and fully 
hyper-threaded.

Meta-eX? http://meta-ex.com
Where? London
When? Thursday 16th of May
Stubnitz? http://ms.stubnitz.com/
Tickets? http://algorave.com/stubnitz2/

Happy Hacking,

Sam

---
http://sam.aaron.name




-- 
-- 
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: LambdaNext Clojure Workshop - London May 20-22 2013

2013-05-09 Thread Sam Aaron
Hey there,

just a quick reminder of the upcoming LambdaNext Clojure training workshop in 
London in a couple of weeks.

There are only a few spots left, so if you were thinking about joining, act 
quick to grab your place!

The LambdaNext Team - http://lambdanext.eu/

On 15 Apr 2013, at 11:24, Sam Aaron samaa...@gmail.com wrote:

 Are you interested in becoming a professional Clojure programmer? Want
 to jumpstart your knowledge or simply take things to the next level? The
 LambdaNext team is holding a Clojure workshop in London, May 20-22 2013.
 
 Come join us! 
 http://lambdanext.eu
 
 
 * An intensive learning experience
 
 The workshop is 3 days in total, the first two introduce the basics of
 the language and gear up to the last day which covers advanced concepts
 and techniques.  You can opt for any combination of the the 2 and 1 day
 workshops.  We'll be training from The Hub, Westminster
 (http://westminster.the-hub.net/) in Central London.  The workshop will
 have at most 20 attendees, to 4 trainers.
 
 
 * Our world-class Clojure team
 
 We are a team of 4 long time professional and deeply enthusiastic
 Clojurists.  We've deployed Clojure in a wide variety of interesting
 domains from atom splitting to live music making.  Check out
 www.lambdanext.com for links to our blogs, projects and other details.
 
 Between us, we've have more experience teaching Clojure in Europe than
 anybody. You'll know you're in expert hands.
 
 
 * Our proven teaching method
 
 Our teaching method involves carefully sowing and then nurturing the
 seeds of Clojure's core concepts in an iterative manner.
 
 Our sowing phase of each concept takes place through an unplugged
 session which will scaffold and demonstrate the concept through the use
 of a variety of illustrative props and audience participation. This
 allows us to collectively get direct into the core of each individual
 idea.
 
 We will then fertilise and nurture these new concepts through an
 increasingly sophisticated set of mini-projects where you write code in
 groups with our guidance. This allows the ideas to be tested in a real
 context with chance for rapid and continuous feedback to accelerate the
 learning process.
 
 This is a truly intensive format and so we have all four of our trainers in
 the room to help, unblock and encourage.  With a ratio of 20 attendees
 to 4 trainers you can guarantee you'll make rapid progress.
 
 
 * Caring for you
 
 We'll lay on a nutritious breakfast and lunch, and all the tea, coffee,
 juice and biscuits you can consume during the day.
 
 
 * Questions ?
 
 If you'd like to know more, or have any questions please drop us an
 email (i...@lambdanext.eu) or tweet (@LambdaNext).
 
 Sam, Edmund, Christophe and Meikel,
 The LambdaNext Team
 http://lambdanext.eu
 

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




LambdaNext Clojure Workshop - London May 20-22 2013

2013-04-15 Thread Sam Aaron
Are you interested in becoming a professional Clojure programmer? Want
to jumpstart your knowledge or simply take things to the next level? The
LambdaNext team is holding a Clojure workshop in London, May 20-22 2013.

Come join us! 
http://lambdanext.eu


* An intensive learning experience

The workshop is 3 days in total, the first two introduce the basics of
the language and gear up to the last day which covers advanced concepts
and techniques.  You can opt for any combination of the the 2 and 1 day
workshops.  We'll be training from The Hub, Westminster
(http://westminster.the-hub.net/) in Central London.  The workshop will
have at most 20 attendees, to 4 trainers.


* Our world-class Clojure team

We are a team of 4 long time professional and deeply enthusiastic
Clojurists.  We've deployed Clojure in a wide variety of interesting
domains from atom splitting to live music making.  Check out
www.lambdanext.com for links to our blogs, projects and other details.

Between us, we've have more experience teaching Clojure in Europe than
anybody. You'll know you're in expert hands.


* Our proven teaching method

Our teaching method involves carefully sowing and then nurturing the
seeds of Clojure's core concepts in an iterative manner.

Our sowing phase of each concept takes place through an unplugged
session which will scaffold and demonstrate the concept through the use
of a variety of illustrative props and audience participation. This
allows us to collectively get direct into the core of each individual
idea.

We will then fertilise and nurture these new concepts through an
increasingly sophisticated set of mini-projects where you write code in
groups with our guidance. This allows the ideas to be tested in a real
context with chance for rapid and continuous feedback to accelerate the
learning process.

This is a truly intensive format and so we have all four of our trainers in
the room to help, unblock and encourage.  With a ratio of 20 attendees
to 4 trainers you can guarantee you'll make rapid progress.


* Caring for you

We'll lay on a nutritious breakfast and lunch, and all the tea, coffee,
juice and biscuits you can consume during the day.


* Questions ?

If you'd like to know more, or have any questions please drop us an
email (i...@lambdanext.eu) or tweet (@LambdaNext).

Sam, Edmund, Christophe and Meikel,
The LambdaNext Team
http://lambdanext.eu

-- 
-- 
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] Overtone 0.8.0 - Performance Ready

2013-01-26 Thread Sam Aaron
Hi everyone,

In case you were wondering how you might raise your spirits now that Christmas 
is well and truly over - I have the answer! Overtone 0.8 is here and is ready 
to bring joy to you all!

We've been working hard for 7 long months on this release and things are really 
starting to shine. I've personally been using Overtone for a number of live 
performances in art galleries and conferences around Europe on my own and as 
part of my band Meta-eX and I can really vouch that this release is 
Performance Ready!

If you haven't dipped your toes into the exciting Overtone waters, now is the 
perfect time to get rocking. We've got a whole bunch of great examples in the 
overtone/examples directory to get started with as well as a plethora of 
fantastic new features.

Highlights include:

* New, all Clojure, in-memory scsynth interface using clj-native - now 
supporting Windows in addition to Linux and OS X
* New (optionally disabled) machinery to stop the control and modification of 
non-live nodes (controlling loading nodes blocks the current thread and 
controlling destroyed nodes throws an exception).
* New event handler `on-latest-event`  which serially handles incoming events 
with the lowest latency by dropping events it hasn't had time to handle, yet 
always handling the last event seen.
* Major progress has been made porting the metadata for the extra ugens not 
included by default in SuperCollider. See 
`overtone/sc/machinery/ugen/metadata/extras/README.md` for progress
* Complete overhaul of the default group structure. See `foundation-*` fns.
* Many new synths
* Many, many new ugens: major progress has been made porting the metadata for 
the extra ugens not included by default in SuperCollider. See 
`overtone/sc/machinery/ugen/metadata/extras/README.md` for progress.
* Clojure 1.5 compatibility

Full release notes: 
https://github.com/overtone/overtone/blob/release/0.8.0/CHANGELOG.md
Overtone Repo: https://github.com/overtone/overtone

As always, the Overtone Cheatsheet gives an overview of the full API: 

So give it a try. Add [overtone 0.8.0] to your lein 2+ project and evaluate 
(use 'overtone.live) in your REPL then come and share your musical/sonic/noise 
exploits over on the Overtone mailing list: 
http://groups.google.com/group/overtone


Sam 

---
http://sam.aaron.name




-- 
-- 
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] Overtone 0.8.0 - Performance Ready

2013-01-26 Thread Sam Aaron
Hey Craig,

sorry, that was a tiny glitch which is now resolved. I pulled out the GUI 
widgets from this release as I found a number of issues with them at the last 
minute and want them to be super stable and polished when we release them. 
Hopefully this will be for the next release.

Sam

---
http://sam.aaron.name

On 26 Jan 2013, at 19:55, Craig Pennington cpenn...@milo.org wrote:

 Hey Sam,
 
 Great! I've been fooling around with RC20 and been having lots of fun.
 
 I changed my project.clj to use the release  ran into a bit of trouble.
 
 cpennington:badbrains cpennington$ lein repl
 nREPL server started on port 64902
 REPL-y 0.1.9
 Clojure 1.4.0
 Exit: Control+D or (exit) or (quit)
 Commands: (user/help)
 Docs: (doc function-name-here)
   (find-doc part-of-name-here)
   Source: (source function-name-here)
   (user/sourcery function-name-here)
  Javadoc: (javadoc java-object-or-class-here)
 Examples from clojuredocs.org: [clojuredocs or cdoc]
   (user/clojuredocs name-here)
   (user/clojuredocs ns-here name-here)
 user= (use 'overtone.live)
 -- Loading Overtone...
 FileNotFoundException Could not locate overtone/gui/mixer__init.class or 
 overtone/gui/mixer.clj on classpath:   clojure.lang.RT.load (RT.java:432)
 
 user= Bye for now!
 
 So it's not finding the overtone/gui/mixer.clj
 
 cpennington:badbrains cpennington$ for i in  `grep overton /tmp/list`; do 
 echo $i; ( jar -tvf $i | grep mixer ); done
 /Users/cpennington/.m2/repository/overtone/byte-spec/0.3.1/byte-spec-0.3.1.jar
 /Users/cpennington/.m2/repository/overtone/at-at/1.1.1/at-at-1.1.1.jar
 /Users/cpennington/.m2/repository/overtone/scsynth-extras/3.5.7.0/scsynth-extras-3.5.7.0.jar
 /Users/cpennington/.m2/repository/overtone/scsynth/3.5.7.0/scsynth-3.5.7.0.jar
 /Users/cpennington/.m2/repository/overtone/overtone/0.8.0/overtone-0.8.0.jar
   9065 Fri Jan 18 22:40:54 EST 2013 overtone/studio/mixer.clj
 /Users/cpennington/.m2/repository/overtone/midi-clj/0.5.0/midi-clj-0.5.0.jar
 /Users/cpennington/.m2/repository/overtone/osc-clj/0.9.0/osc-clj-0.9.0.jar
 /Users/cpennington/.m2/repository/overtone/libs.handlers/0.2.0/libs.handlers-0.2.0.jar
 
 
 Only sees the studio one. Double checking RC20 gives:
 
 cpennington:badbrains cpennington$ for i in  `grep overton /tmp/list| sed 
 's/0.8.0/0.8.0-RC20/g'`; do echo $i; ( jar -tvf $i | grep mixer ); done
 /Users/cpennington/.m2/repository/overtone/byte-spec/0.3.1/byte-spec-0.3.1.jar
 /Users/cpennington/.m2/repository/overtone/at-at/1.1.1/at-at-1.1.1.jar
 /Users/cpennington/.m2/repository/overtone/scsynth-extras/3.5.7.0/scsynth-extras-3.5.7.0.jar
 /Users/cpennington/.m2/repository/overtone/scsynth/3.5.7.0/scsynth-3.5.7.0.jar
 /Users/cpennington/.m2/repository/overtone/overtone/0.8.0-RC20/overtone-0.8.0-RC20.jar
   2492 Thu Jun 28 15:32:38 EDT 2012 overtone/gui/mixer.clj
   9065 Fri Jan 18 23:40:54 EST 2013 overtone/studio/mixer.clj
 /Users/cpennington/.m2/repository/overtone/midi-clj/0.5.0/midi-clj-0.5.0.jar
 /Users/cpennington/.m2/repository/overtone/osc-clj/0.9.0/osc-clj-0.9.0.jar
 /Users/cpennington/.m2/repository/overtone/libs.handlers/0.2.0/libs.handlers-0.2.0.jar
 On Saturday, January 26, 2013 2:23:51 PM UTC-5, Sam Aaron wrote:
 
 So perhaps this wasn't included in the uploaded release?
 
 Thank you for a great tool, this weak player really appreciates it!
 
 Cheers,
   Craig
  
 Hi everyone, 
 
 In case you were wondering how you might raise your spirits now that 
 Christmas is well and truly over - I have the answer! Overtone 0.8 is here 
 and is ready to bring joy to you all! 
 
 We've been working hard for 7 long months on this release and things are 
 really starting to shine. I've personally been using Overtone for a number of 
 live performances in art galleries and conferences around Europe on my own 
 and as part of my band Meta-eX and I can really vouch that this release is 
 Performance Ready! 
 
 If you haven't dipped your toes into the exciting Overtone waters, now is the 
 perfect time to get rocking. We've got a whole bunch of great examples in the 
 overtone/examples directory to get started with as well as a plethora of 
 fantastic new features. 
 
 Highlights include: 
 
 * New, all Clojure, in-memory scsynth interface using clj-native - now 
 supporting Windows in addition to Linux and OS X 
 * New (optionally disabled) machinery to stop the control and modification of 
 non-live nodes (controlling loading nodes blocks the current thread and 
 controlling destroyed nodes throws an exception). 
 * New event handler `on-latest-event`  which serially handles incoming events 
 with the lowest latency by dropping events it hasn't had time to handle, yet 
 always handling the last event seen. 
 * Major progress has been made porting the metadata for the extra ugens not 
 included by default in SuperCollider. See 
 `overtone/sc/machinery/ugen/metadata/extras/README.md` for progress 
 * Complete overhaul of the default group structure. See

Re: [ANN] Overtone 0.8.0 - Performance Ready

2013-01-26 Thread Sam Aaron

On 26 Jan 2013, at 20:17, Sam Aaron samaa...@gmail.com wrote:

 I pulled out the GUI widgets from this release as I found a number of issues 
 with them at the last minute and want them to be super stable and polished 
 when we release them.

I should also say that these GUI widgets are currently in the MASTER branch on 
Github:

https://github.com/overtone/overtone/tree/master/src/overtone/gui

So if you want to play around with them and help polish and develop them 
further, then please do.

Sam

---
http://sam.aaron.name

-- 
-- 
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: Particle system with Quil

2012-08-26 Thread Sam Aaron
Truly outstanding work!

Things like this really make me feel warm and fuzzy inside and more than 
justify all the hard work that goes into libraries like Quil.

Please keep making beautiful things.

Sam

---
http://sam.aaron.name

On 26 Aug 2012, at 04:17, meteorfox ctorresk8guitar@gmail.com wrote:

 I've been working in a particle system using Quil for rendering, which I'm 
 calling Newtonian for now ;) , just to practice some of the concepts of 
 protocols and defrecords. The project is still WIP. Any feedback will be 
 appreciate it.
 
 github.com:
 https://github.com/meteorfox/newtonian
 
 Vimeo: (Warning: Looks choppy in the video, because the frame rate I used 
 when I recorded it) 
 https://vimeo.com/48222827 
 
 Thanks!
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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] Leiningen 2.0.0-preview9 released

2012-08-25 Thread Sam Aaron
I'm having a problem upgrading due to SSL certificate issues

(I'm running OS X 10.8.1):


λ lein upgrade  
   
The script at /Users/sam/bin/lein will be upgraded to the latest preview 
version.  
Do you want to continue [Y/n]?  
   

   
Upgrading...
   
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current 
   
 Dload  Upload   Total   SpentLeft  Speed   
   
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
   
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: 
   
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify 
failed  
More details here: http://curl.haxx.se/docs/sslcerts.html   
   

   
curl performs SSL certificate verification by default, using a bundle 
   
 of Certificate Authority (CA) public keys (CA certs). If the default   
   
 bundle file isn't adequate, you can specify an alternate file  
   
 using the --cacert option. 
   
If this HTTPS server uses a certificate signed by a CA represented in   
   
 the bundle, the certificate verification probably failed due to a  
   
 problem with the certificate (it might be expired, or the name might   
   
 not match the domain name in the URL). 
   
If you'd like to turn off curl's verification of the certificate, use   
   
 the -k (or --insecure) option.

Sam

---
http://sam.aaron.name

   


On 25 Aug 2012, at 01:34, Phil Hagelberg p...@hagelb.org wrote:

 
 I'm happy to announce the release of Leiningen version 2.0.0-preview9.
 
 This release fixes a serious bug where profiles wouldn't be applied
 correctly in the trampoline task as well making auto-loaded hooks and
 middleware more consistent. It also introduces an experimental new flag
 ($LEIN_FAST_TRAMPOLINE) allowing trampoline calls to cache their command
 so that repeated invocations can happen without launching Leiningen's JVM.
 
 ## 2.0.0-preview9 / 2012-08-24
 
 * Use :provided profile by default everywhere except uberjar. (Marshall 
 Vandegrift)
 * Unify format for auto-loading middleware and hooks. (Justin Balthrop)
 * Allow more declarative :nrepl-middleware settings. (Chas Emerick)
 * Fix :eval-in :classloader for native dependencies. (Justin Balthrop)
 * Support project and user leinrc file for shell-level customization. (Justin 
 Balthrop)
 * Cache trampoline commands for fast boot. Set $LEIN_FAST_TRAMPOLINE to 
 enable.
 * Support setting HTTPS proxies.
 * Improved resilience when self-install is interrupted. (Bruce Adams)
 * Fix a bug where profile dependencies weren't honored in trampoline task.
 
 As usual, `lein upgrade` will get you the latest version if you're
 already running a 2.x preview. Otherwise you can fetch it from
 https://raw.github.com/technomancy/leiningen/preview/bin/lein.
 Especially if you use the trampoline task, you should be sure to
 upgrade.
 
 Hope you find this useful. Please report any problems via GitHub issues
 or the mailing list.
 
 Thanks,
 Phil
 
 -- 
 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] Leiningen 2.0.0-preview9 released

2012-08-25 Thread Sam Aaron
Awesome, thanks.

On 25 Aug 2012, at 21:52, Phil Hagelberg p...@hagelb.org wrote:

 Phil Hagelberg p...@hagelb.org writes:
 
 Sam Aaron samaa...@gmail.com writes:
 
 I'm having a problem upgrading due to SSL certificate issues
 
 (I'm running OS X 10.8.1)
 
 Hmmm; you should be seeing a message from Leiningen about how to disable
 certificate checking by exporting HTTP_CLIENT. Is the message you
 included the complete output, or did you truncate it at all?
 
 Never mind; I see that message is only displayed during failed
 self-installs, not failed upgrades. Will fix.
 
 -Phil
 
 -- 
 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: Rich added set-agent-send(-off)-executor! and send-via functions

2012-08-17 Thread Sam Aaron

On 17 Aug 2012, at 18:35, mnicky markus.mas...@gmail.com wrote:

 I have some great news: 
 https://github.com/clojure/clojure/commit/f5f4faf95051f794c9bfa0315e4457b600c84cef
  :)

I can totally understand send-via, but set-agent-send-executor! and 
set-agent-send-off-executor! feel dangerous to me like Ruby used to in that if 
they're used by libraries that you include, then there's potential for 
non-deterministic behaviour - i.e. last-one-wins.

Can anyone explain to me why these two fns aren't dangerous and are actually 
useful?

Sam

---
http://sam.aaron.name

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


Overtone - Actual Music!

2012-08-15 Thread Sam Aaron
Hey everyone,

sorry, I couldn't resist posting this, but I'm getting real close to making 
decent music with Overtone now, and I just wanted to share with you where I'm 
at:

https://vimeo.com/47578617

I think the coolest thing about this is that what you see in the screencast is 
something you can clone from Github *now* and play with today. That music is an 
instrument that you can control - and trust me, it's more fun to play with than 
it is to listen to :-)

Let me know if you like it.

Sam

---
http://sam.aaron.name

-- 
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: Overtone - Live @ Arnolfini

2012-08-08 Thread Sam Aaron

On 7 Aug 2012, at 15:16, Roberto Mannai roberm...@gmail.com wrote:
 
 Interesting, I guess the monome is hooked by:
 (def m (poly/init /dev/tty.usbserial-m64-0790))
 And the incoming events by (poly/on-press... Etc
 

Yes, although in the future all the monome events will be sent directly to 
Overtone's event system. This is currently how MIDI devices are now handled and 
is the recommended approach to connecting external controls with Overtone. 
Using the event system allows you (and other band hackers connected to the JVM 
process) to bind handlers from arbitrary namespaces rather than having to have 
direct access to the `m` var in the ns you do poly/init.

 I even didn't suspect that Emacs would allow such graphical overlays, have 
 any link to doc? 

It's not actually graphical - I run Emacs in a terminal emulator ;-) Docs for 
overlays can be found here:

http://www.gnu.org/software/emacs/manual/html_node/elisp/Overlays.html#Overlays

 Coming to the very exciting topic about interprocess comunication between 
 Emacs and a Midi controller I'll look forward to your code - I hope you'd 
 like give us at least a general overview of the architecture :)

Keep pestering me and I'll get round to it. I've only just started to explore 
the possibilities of having such a close relationship between Emacs and Clojure 
- but what I've seen so far is really promising. There will most certainly be 
more to come...

Sam

---
http://sam.aaron.name

-- 
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: Overtone - Live @ Arnolfini

2012-08-08 Thread Sam Aaron
On 7 Aug 2012, at 15:16, Roberto Mannai roberm...@gmail.com wrote:
 
 Interesting, I guess the monome is hooked by:
 (def m (poly/init /dev/tty.usbserial-m64-0790))
 And the incoming events by (poly/on-press... Etc
 

Yes, although in the future all the monome events will be sent directly to 
Overtone's event system. This is currently how MIDI devices are now handled and 
is the recommended approach to connecting external controls with Overtone. 
Using the event system allows you (and other band hackers connected to the JVM 
process) to bind handlers from arbitrary namespaces rather than having to have 
direct access to the `m` var in the ns you do poly/init.

 I even didn't suspect that Emacs would allow such graphical overlays, have 
 any link to doc? 

It's not actually graphical - I run Emacs in a terminal emulator ;-) Docs for 
overlays can be found here:

http://www.gnu.org/software/emacs/manual/html_node/elisp/Overlays.html#Overlays

 Coming to the very exciting topic about interprocess comunication between 
 Emacs and a Midi controller I'll look forward to your code - I hope you'd 
 like give us at least a general overview of the architecture :)

Keep pestering me and I'll get round to it. I've only just started to explore 
the possibilities of having such a close relationship between Emacs and Clojure 
- but what I've seen so far is really promising. There will most certainly be 
more to come...

Sam

---
http://sam.aaron.name

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


Functional Composition (with Overtone)

2012-08-08 Thread Sam Aaron
Hey everyone,

Chris Ford gave a talk on functional composition with Overtone in London 
recently and it's now online:

http://skillsmatter.com/podcast/home/functional-composition

Chris really delivers a beautifully paced introduction to a huge range of 
fundamental musical concepts through the transmission vector of Clojure. It's 
truly fantastic to watch how seemingly magic and untouchable concepts such as 
classical music can be destructured piece by piece into understandable Clojure 
code.

Sam

---
http://sam.aaron.name

-- 
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: Overtone - Live @ Arnolfini

2012-08-07 Thread Sam Aaron

On 7 Aug 2012, at 08:21, Roberto Mannai roberm...@gmail.com wrote:

 +1. The piano composition is reminescent of some Gurdjieff/De Hartmann music.

The piano piece was composed by Erik Satie - I simply played my own 
interpretation of the timings on the monome. Sadly, you can't see that part on 
the video, but I was standing up and playing to the audience at that point. The 
source is part of the Overtone examples:

https://github.com/overtone/overtone/blob/master/src/overtone/examples/monome/satie.clj

 I liked too the live coding gestures, where I track down your Emacs key 
 bindings and your flowing among buffers. BTW, how did you update the values 
 of that blue numerical sliders? By mouse?

Aha! You're the first person to spot that! It's me essentially creating a new 
physical interface on-the-fly using my MIDI controller. Really, that's the part 
I'm most proud of - it involves quite an intimate relationship between Emacs 
Lisp and Clojure. It involves the following steps:

* Emacs creates an overlay for the new value to be controlled
* Emacs tells Clojure/Overtone to wait for the next MIDI control event, and to 
then continue to send new events for that specific controller back to Emacs
* On new controller events, Emacs finds the specific form that the controlled 
value resides in, gets updates the value with the new incoming value from 
Overtone, and then finds the surrounding form and sends it back to Overtone to 
be evaluated.
* Awesomeness ensues!

It'll soon be part of Emacs Live once I've ironed out the last few wrinkles so 
everyone can easily control Emacs/Clojure with a MIDI controller.

Sam

---
http://sam.aaron.name

-- 
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: The 2012 'State of Clojure' survey is open

2012-08-07 Thread Sam Aaron
Wow, great work Chas - this is hugely valuable.

From a personal perspective, I'm massively encouraged by the fact that Music 
and Graphics/Art were domains that people could specifically choose in this 
year's questionnaire and that they received 6 and 8% respectively.

I'm going to make it a personal challenge to bump these numbers up for next 
year :-)

Sam

---
http://sam.aaron.name

On 6 Aug 2012, at 15:21, Chas Emerick c...@cemerick.com wrote:

 FYI, the results from the 2012 State of Clojure survey are now
 available (with a kitten…seriously!):
 
 http://cemerick.com/2012/08/06/results-of-the-2012-state-of-clojure-survey/
 
 Thanks to everyone that participated,
 
 - Chas
 
 On Jul 25, 7:39 pm, Chas Emerick c...@cemerick.com wrote:
 Just a reminder: thesurveycloses tomorrow.  So, if you have not yet
 done so, make sure you get your 2¢ in!
 
 Cheers,
 
 - Chas
 
 On Jul 19, 10:21 am, Chas Emerick c...@cemerick.com wrote:
 
 
 
 
 
 
 
 Prior years' State of Clojure surveys have been such a success and 
 yielded such valuable data about the Clojure community that I had no choice 
 but to do it all again!
 
 The 2012 State of Clojuresurveyopened this morning, and will remain open 
 until Thursday, July 26th:
 
 http://cemerick.com/2012/07/19/2012-state-of-clojure-survey/
 
 Please participate if you are using Clojure in any capacity, and do what 
 you can to spread around the above URL so that as much data and feedback 
 can be collected as possible.  Taking the pulse of the community in this 
 way can help library developers and Clojure/core prioritize their efforts, 
 and may help provide ammunition for those working to gain acceptance of 
 Clojure in their workplaces, universities, and elsewhere.
 
 Cheers,
 
 - Chas
 
 --http://cemerick.com
 [Clojure Programming from O'Reilly](http://www.clojurebook.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 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: Overtone - Live @ Arnolfini

2012-08-05 Thread Sam Aaron

On 4 Aug 2012, at 17:23, Tom Maynard tom.w...@gmail.com wrote:

 Bravo!  Standing ovation.  Technical difficulties be d*mned, that was a 
 spectacular exhibition.  I was reminded of a live premiere performance by 
 Karlheinz Stockhausen that I attended at the NASA auditorium in Galveston, 
 Texas, USA mumble-mumble years ago: totally captivating, fully engaging, 
 and thrilling and motivating.  Hypnotic, it was.

Wow, thanks for the very generous words. Hopefully we'll start to see more 
people playing with and having fun with Overtone and Quil. 

Programming is not just for industry, but for expressing yourself too :-)

Exciting times!

Sam

---
http://sam.aaron.name

-- 
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: Overtone - Live @ Arnolfini

2012-08-04 Thread Sam Aaron
Hi Robert,

thank-you for your kind words. Andrew Sorensen has been a huge influence for 
me, so it's really rather humbling for you to describe my efforts as being 
comparable to his. BTW, you should check out his latest project Extempore - 
it's pretty remarkable.

Overtone doesn't really have direct support for graphics. The images were all 
generated with Quil. However, as both Overtone and Quil are both Clojure 
libraries, it's trivial to get them to talk to each other :-)

Looking forward to seeing the results of your efforts diving back into 
Overtone. 

Sam

---
http://sam.aaron.name

On 4 Aug 2012, at 00:52, Robert Pitts rbxbx...@gmail.com wrote:

 This is fantastic! I just watched several live-coding Impromptu demos 
 yesterday and this definitely takes the cake :)
 
 (Also I didn't realize that Overtone had support for graphics now. Good to 
 know!)
 
 Really need to dive back in to Overtone some time soon. Keep up the good work.
 
 Cheers,
 Robert
 
 On Friday, August 3, 2012 3:47:50 AM UTC-7, Sam Aaron wrote:
 Hi everyone, 
 
 for those interested, I just put up a screencast of a performance I did with 
 Overtone on Friday the 27th of July at the Arnolfini art gallery in Bristol, 
 UK: 
 
 https://vimeo.com/46867490 
 
 The screen resolution is a little odd as I mirrored my display to that of the 
 projector. Also, the sound starts cutting out for about 20s in the middle due 
 to some SuperCollider memory issues I managed to run into - it was a hairy 
 moment, but I managed to recover. 
 
 It was a lot of fun projecting Clojure code on a massive screen to an 
 audience of interesting art enthusiasts :-) 
 
 Also, the code I used to do the performance is here: 
 
 http://github.com/samaaron/arnold 
 
 Enjoy! 
 
 Sam 
 
 --- 
 http://sam.aaron.name 
 
 
 
 -- 
 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


Overtone - Live @ Arnolfini

2012-08-03 Thread Sam Aaron
Hi everyone,

for those interested, I just put up a screencast of a performance I did with 
Overtone on Friday the 27th of July at the Arnolfini art gallery in Bristol, UK:

https://vimeo.com/46867490

The screen resolution is a little odd as I mirrored my display to that of the 
projector. Also, the sound starts cutting out for about 20s in the middle due 
to some SuperCollider memory issues I managed to run into - it was a hairy 
moment, but I managed to recover. 

It was a lot of fun projecting Clojure code on a massive screen to an audience 
of interesting art enthusiasts :-)

Also, the code I used to do the performance is here:

http://github.com/samaaron/arnold

Enjoy!

Sam

---
http://sam.aaron.name


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


Overtone 0.7

2012-06-26 Thread Sam Aaron
Hi all, 

I just thought I'd give you a quick heads up that Overtone 0.7 has been 
released. It represents around 6 months worth of solid work (~500 commits) and 
we're really rather pleased with how far we've come. I'm especially pleased to 
welcome our new committers. Without these people (and also all the 
long-standing trench-dwelling committers) Overtone wouldn't be such an exciting 
and fun project to hack on:

* Damion Junk
* Jacob Lee
* Fabian Steeg
* Michael Bernstein
* Ian Davies



Now, I thought I'd run you through some of the aspects I'm most thrilled about:

## Tap into Quil

Overtone now ships with the tap cgen. This little gem packs way above its 
weight. It essentially gives you the ability to reach into any aspect of the 
SuperCollider synth engine and tap the values flowing through. These values are 
then magically swapped into an atom which you can then deref from Clojure-land 
and do what you will with the contents. This is awesome for hooking Overtone up 
with visualisation libraries such as Quil.

## Freesound trickery

Overtone core hacker Kevin Neaton has been working wonders with our Freesound 
support. For those not in the know, freesound.org is an open-source sound 
sample database full of creative-commons licensed sound snippets. Kevin has 
been working with these guys to improve their support for large sample bundles, 
and as a result the sampled-piano samples are now hosted on freesound.org. This 
should prove to be a lot more reliable than the previous solution. Also, he's 
added search capability right into the REPL - so no need to leave the comfort 
of your Clojure prompt in order to explore the huge world of free samples out 
there.

## MIDI event stream

On boot, Overtone now hooks up to any connected MIDI device and broadcasts all 
events onto the global event stream. This makes working with your MIDI keyboard 
and controllers easier than ever. We're really enjoying the event stream and 
feel there's a lot more potential to discover with it.

So, what are you waiting for? Create a new lein project, add overtone 0.7.0 
as a dependency, start a REPL, and start making sounds. As always, the 
cheatsheet is your honourable guide to the plethora of functionality at your 
disposal:

http://cloud.github.com/downloads/overtone/overtone/overtone-cheat-sheet.pdf

For those that like peering into the murky details, here's the more lengthy 
changelog:

https://github.com/overtone/overtone/blob/master/CHANGELOG.md

Happy Hacking!

Sam

---
http://sam.aaron.name




-- 
http://sam.aaron.name


-- 
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: reloading protocols causes problems

2012-06-19 Thread Sam Aaron
It seems that guarding the protocol declarations inside of a defonce does the 
job nicely, although it is a big fugly. It's not too bad a trade-off though, 
because we rarely, if ever, want to change a protocol definition live. My main 
concern is that it wasn't obvious what was breaking Overtone during reloads, 
and it took some real trial and error discovery to figure that it was the 
protocol declarations. Perhaps Phil is right, and they're not the best choice 
for the job - perhaps multimethods might be a better fit for our needs.

I think that at least the documentation could be improved to warn people that 
defprotocol and namespace reloading don't play well together. This thread will 
already act as a start in this area :-)

David, it's cool that ClojureScript doesn't suffer from this issue though!

Sam

---
http://sam.aaron.name


On 19 Jun 2012, at 16:35, David Nolen wrote:

 On Tue, Jun 19, 2012 at 10:49 AM, Phil Hagelberg p...@hagelb.org wrote:
 Protocols necessarily make some unfortunate dynamicity trade-offs in the name 
 of self-hosting. If you value interactive development over execution 
 efficiency perhaps they are not the right choice.
 
 -Phil
 
 Depending on what Clojure implementation you are using of course. 
 ClojureScript doesn't have this problem ;)
 
 Given my understanding of how protocols are currently implemented on Clojure 
 JVM (partially backed by very static Java interfaces), I don't think you can 
 achieve what you want. Perhaps JVM invokedynamic can help one day?
 
 David 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 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: Issues with installing clojure-mode on Mac in Emacs

2012-05-28 Thread Sam Aaron
Hey James, 

feedback like this is invaluable - thanks very much for taking the time to 
write it.

It is true - using Emacs is *not* a smooth experience. I've tried to bake in a 
good number of years experience getting Emacs to work smoothly into Emacs Live, 
and whilst I don't claim it to be 'smooth' I still think it's a lot better than 
the vanilla experience.

Let me address your points individually: 

 For one, it doesn't play very well with the OS windowing system. When
 I click on Emacs it doesn't always change the window focus from the
 previous app to Emacs.

I've never seen or heard of this before. Do you get this behaviour with a 
vanilla Emacs (i.e. not using the Emacs Live config)?
 
 
 Secondly, when I type several commands in succession quickly, a
 smallish white square keeps flashing in the middle of the Emacs
 screen, then disappears.

That smallish white square is the 'visual bell'. It comes up when Emacs wishes 
to communicate that something isn't quite right. 

As a temporary measure, try adding this to the end of ~/.emacs.d/init.el

(setq ring-bell-function 'ignore)

and let me know if that fixes things for you
 
 Thirdly, when I try M-x slime I get: Searching for program: no such
 file or directory, lisp. (I have installed Leiningen2).

This is because you need to start a separate swank server and connect to it 
with slime. See:

https://github.com/overtone/emacs-live#clojure-hacking
 
 
 Quite frustrating that an editor takes so much tinkering to just set
 up properly.



Just try to imagine the power you'll wield when you do get it working properly 
:-) I have found the experience definitely worthwhile.

Sam


-- 
http://sam.aaron.name






-- 
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: Issues with installing clojure-mode on Mac in Emacs

2012-05-28 Thread Sam Aaron
Hi John, 

first of all, you probably should create your own user pack for this stuff, 
rather than forking Emacs Live itself - that way you get to take advantage of 
updates with ease.

Secondly, terminals, options keys, meta, OS X, is a tricksy mix. I use command 
key happy https://github.com/aim-stuff/cmd-key-happy to allow the cmd key to be 
a meta key specifically for iTerm2.

Thirdly, you might find it easier to use the kbd macro when globally setting 
keys i.e.:

(define-key global-map (kbd C-+) 'text-scale-increase)

Finally, the M-[0-9] keys are used for jumping to the associated numbered 
buffer via the window-number mode 
(https://github.com/overtone/emacs-live/blob/master/packs/live/foundation-pack/lib/window-number.el)

You can turn off this behaviour with:

(window-number-meta-mode 0)

(You can still jump to windows with C-x C-j [0-9])

Your global bindings should now work:

(global-set-key (kbd M-5) '(lambda () (interactive) (insert [)))

I hope that this helps,

Sam 

-- 
http://sam.aaron.name


On Monday, 28 May 2012 at 11:08, john wrote:

 Hi Sam,
 I just tried Emacs live. I'm running MAC OSX and emacs in a Terminal with 
 the Option use option as Meta 
 I have a German Keyboard Layout so I added this to init.el:
 
 (global-set-key \M-4 '(lambda () (interactive) (insert \\)))
 (global-set-key \M-5 '(lambda () (interactive) (insert [)))
 (global-set-key \M-6 '(lambda () (interactive) (insert ])))
 (global-set-key \M-7 '(lambda () (interactive) (insert |)))
 (global-set-key \M-8 '(lambda () (interactive) (insert {)))
 (global-set-key \M-9 '(lambda () (interactive) (insert })))
 
 
 But after restarting emacs the above has no effect?
 Would you know why?
 
 
 Am Sonntag, 27. Mai 2012 17:09:18 UTC+2 schrieb James:
  Hi, I have GNU Emacs v 23.4 installed on Mac OS X 10.7.4. I've 
  followed the installation instructions for clojure-mode but get stuck 
  at the point where I have to issue the following in Emacs: 
  
  M-x eval-buffer 
  M-x package-refresh-contents 
  
  The second line gives me [No match]. 
  
  I have package.el under ~/.emacs.d/packages/. Under ~/.emacs.d/, I 
  have: 
  
  auto-save-list/ 
  clojure-test-mode.el 
  init.el 
  clojure-mode.el 
  clojurescript-mode.el 
  packages/ 
  
  Here's my init.el: 
  
  (add-to-list 'load-path ~/.emacs.d/) 
  (require 'clojure-mode) 
  
  (add-to-list 'load-path ~/.emacs.d/packages/) 
  
  (require 'package) 
  (add-to-list 'package-archives 
  '(marmalade . http://marmalade-repo.org/packages/;)) 
  (package-initialize) 
  
  What am I doing wrong? 
  
  Thanks beforehand, 
  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 
 (mailto: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 
 (mailto: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: Issues with installing clojure-mode on Mac in Emacs

2012-05-28 Thread Sam Aaron

On Monday, 28 May 2012 at 17:59, James wrote:


 Regarding Slime and Swank: I guess I don't yet understand the Clojure
 distinction between project and file. I've got an absolutely
 trivial file that I want to test out, but it looks like Swank expects
 there to be a project.clj. (I opened the file in Emacs, then went M-
 x clojure-jack-in, then got Could not start swank server: Couldn't
 find project.clj).

Slime is the Emacs client application. Swank is the server which the Slime 
client communicates with. In Clojure's case, the Swank server runs on the JVM 
and therefore needs the classpath to be set up correctly. Leiningen is a tool 
that will set up the classpath for you (amongst many other things). I believe 
that clojure-jack-in requires Leiningen to work. I have never used it, so can't 
be sure. I tend to use the swank jar directly from Leiningen:
 
 Also, I don't understand this:
 
 Simply start swank in a Clojure project with lein2 swank.
 
 Is lein2 swank a shell command issued from inside a Clojure project
 folder?


This is what I mean by using the swank jar directly from Leiningen. In this 
case I'm using Leiningen 2.x (hence lein2) and I'm asking it to run the swank 
task. I do this from the command line, outside of Emacs.

Sam  

-- 
http://sam.aaron.name


-- 
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: Issues with installing clojure-mode on Mac in Emacs

2012-05-28 Thread Sam Aaron
On Monday, 28 May 2012 at 22:05, john wrote:
 just wondering what does https://github.com/aim-stuff/cmd-key-happy buy you 
 since xterm2 allows you two switch cmd-key to alt-key?

cmd-key-happy allows you to redefine key behaviour for arbitrary apps, so you 
can swap keys for Terminal.app, Emacs.app in addition to iTerm.app. Also, it 
allows you to exclude certain key combinations, so you can keep combinations 
such as cmd-tab to switch apps.

Sam

-- 
http://sam.aaron.name 

-- 
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: Issues with installing clojure-mode on Mac in Emacs

2012-05-27 Thread Sam Aaron
Take a look at the guts of Emacs Live: 

http://github.com/overtone/emacs-live

in particular, check out the Clojure pack:

https://github.com/overtone/emacs-live/tree/master/packs/live/clojure-pack

It doesn't use the Emacs package manager either, opting to put external files 
in a lib directory. The config dir contains all the config files for the 
various associated Clojure goodies the Clojure pack pulls in.

Sam 

-- 
http://sam.aaron.name


On Sunday, 27 May 2012 at 17:17, Lars Nilsson wrote:

 On Sun, May 27, 2012 at 11:09 AM, James abbott...@gmail.com 
 (mailto:abbott...@gmail.com) wrote:
  Here's my init.el:
  
  (add-to-list 'load-path ~/.emacs.d/)
  (require 'clojure-mode)
  
  (add-to-list 'load-path ~/.emacs.d/packages/)
 
 Perhaps you could try the following?
 
 (add-to-list 'load-path (expand-file-name .emacs.d ~))
 (add-to-list 'load-path (expand-file-name .emacs.d/packages ~))
 
 Lars Nilsson
 
 -- 
 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 
 (mailto: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 
 (mailto: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: Issues with installing clojure-mode on Mac in Emacs

2012-05-27 Thread Sam Aaron

On Sunday, 27 May 2012 at 17:48, James wrote:

 Hi Sam, Emacs Live looks seriously cool,

wonderful! Thanks for the kind words
 
 however I have doubts about this:
 
 Emacs live has only been tested with a terminal hosted Emacs
 24.1.50.2 (pre-release). Issues and pull-requests for this and later
 versions will be happily accepted.
 
 This version isn't stable, should I go ahead and install it instead of
 the one I have (23.4)?

I only write that because that's the version I use and I've got no real drive 
to maintain Emacs Live for all versions of Emacs. However, it *should* work 
with Emacs 23, and I'll be happy to help out by answering questions if there 
are issues, but it's nothing I'm going to actively work on to ensure 
compatibility.



TL;DR My Emacs setup:

If you're interested, I happen to run a terminal hosted Emacs which I installed 
via homebrew:

brew install emacs --use-git-head --HEAD

Also, I run Emacs as a server and then connect to it via emacsclient. This 
allows me to use Emacs as a commit editor when I use the git command on the 
console. For example:

git commit -v

will open up Emacs as the editor to write the commit message and to also view 
the diff. If I wasn't running Emacs as a server, then this would have to load 
up a new Emacs instance which isn't the speediest thing in the world. With a 
server already running, it's as fast as vim to load up :-)

To run Emacs as a server you need to pass the daemon flag:

/usr/local/bin/emacs --daemon

I then alias emacsclient to emacs in my zsh profile:

alias emacs=/usr/local/bin/emacsclient -ct

Now, if you want to edit a specific file, you can type:

emacs foo.clj

and it will open up via emacsclient in an instant.

In order to use the emacsclient as a shell editor for tools like git, you need 
to bind emacsclient to the EDITOR variable:

export EDITOR='emacsclient -ct'

Hope this helps,

Sam


-- 
http://sam.aaron.name






-- 
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: how to get good at clojure?

2012-05-11 Thread Sam Aaron
In addition to following up on all the great suggestions above, I'd hack about 
with Quil; it's a lot of fun and you'll get instant feedback. You'll also very 
quickly run into the fun that is juggling pure fns, lazy sequences and 
orchestrating side effects (to sketch stuff). 

http://github.com/quil/quil 

-- 
http://sam.aaron.name


On Friday, 11 May 2012 at 18:26, Daniel Gagnon wrote:

 
 
 On Mon, May 7, 2012 at 8:48 PM, toan kidn...@gmail.com 
 (mailto:kidn...@gmail.com) wrote:
  Hi folks,
  
  I've been trying to learn clojure for a while. I've read the clojure
  section of seven languages... and currently trying to get through
  joy of clojure. I've been practicing with the prompt a bit and
  trying to learn emacs that came with clojurebox.
 
 
 The clojure part of seven languages isn't very idiomatic.
 
 Try Programming Clojure 2n Edition by Stuart Halloway, I think it's the best 
 learning book. 
 
 And clojurebox is quite outdated give a try to lein and the clooj editor.
 
  I have 2 questions, 1. does anyone have advice on getting somewhat
  competent for a newb? (alternatively, how did you get good?)
 
 
 Code until it clicks, then progress gets much faster.
 
  2. if i
  have no interest in java, should a learn at least some fundamentals?
  would that be helpful?
 
 
 Try reading some javadoc and see if it makes sense to you. Learning Java 
 isn't critical to start but eventually, you'll want to use Java libraries and 
 then it's best to have some basics. 
 
  --
  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 
  (mailto: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 
  (mailto:clojure%2bunsubscr...@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 
 (mailto: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 
 (mailto: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: Clojure-Specific Emacs Environment

2012-04-27 Thread Sam Aaron
Fantastic work Tim. I think this can be a really important part of the future 
for Clojure hacking with Emacs. Let us know how you get on.

Sam 

-- 
http://sam.aaron.name


On Thursday, 26 April 2012 at 15:27, Tim King wrote:

 I have been working on a fork of Phil's nrepl.el for the past few nights.
 So far I have gotten the basic bencode/bdecode transport working and am able 
 to send and receive to an nREPL server.
 Beyond that, it isn't really in anything close to a usable state yet, but I 
 plan to continue plugging away at it.
 
 http://www.github.com/kingtim/nrepl.el 
 
 Cheers,
 Tim not an emacs lisp hacker King
 
 On Mon, Apr 23, 2012 at 4:08 PM, Phil Hagelberg p...@hagelb.org 
 (mailto:p...@hagelb.org) wrote:
  On Thu, Mar 29, 2012 at 9:52 AM, Phil Hagelberg p...@hagelb.org 
  (mailto:p...@hagelb.org) wrote:
   Anyway, I'd be happy if someone went ahead with nrepl.el even so;
   don't let me discourage you.
  
  
  For what it's worth I sketched out a bare skeleton of what this could
  look like. Nothing works yet, but if someone were to want to hack on
  it, this might be a good place to start:
  
  https://github.com/technomancy/nrepl.el
  
  I don't have plans to finish it myself.
  
  -Phil
  
  --
  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 
  (mailto: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 
  (mailto:clojure%2bunsubscr...@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 
 (mailto: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 
 (mailto: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] Quil 1.0.0

2012-04-12 Thread Sam Aaron
We have a mailing list (which dates back to the clj-processing days):

https://groups.google.com/forum/?fromgroups#!forum/clj-processing

I also hang out in #quil on free node.

I'm always happy to help out in any way I can.

Sam

---
http://sam.aaron.name

On 11 April 2012 18:04, Changa Damany Imara cdim...@gmail.com wrote:
 Where's the best place to ask questions or get help using quill? I have a
 question about drawing stuff to the screen that I don't think is really a
 bug, just lack of knowledge on my part.

 On Saturday, April 7, 2012 10:17:06 AM UTC-7, Sam Aaron wrote:

 On 7 April 2012 16:20, Changa Damany Imara wrote:

  Very excited to see this. Thanks so much!

 No need to thank me - thank Roland Sadowski for writing clj-processing
 in the first place. I just did a spot of spring cleaning :-)

 Sam

 ---
 http://sam.aaron.name

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


[ANN] Quil 1.0.0

2012-04-07 Thread Sam Aaron
Hello there dear Clojure friends,

TL;DR - Rejoice, for Quil 1.0.0 has been released. https://github.com/quil/quil

I'm sure you all know this, but programming doesn't just have to be
for businesses to make money by optimising processes. Yeah, of course
you knew that already. Silly me for repeating it.

Programming is also a wonderful medium for helping you express
yourself and to communicate the beauty and meaning of the abstractions
within your mind to others. In the Clojure world, we already have
Overtone which lets you use Clojure to map your mental abstractions to
sound, now Quil lets you map your ideas to images and animations. How
lovely.

Take a moment to click on this link, and scroll down to see some of
the things that are now possible with only a few lines of your
favourite programming language:

https://github.com/quil/quil/tree/master/examples/gen_art

OK, so clearly you're sold. All you need to do is pop over and read
the file named README (whereby me means you not me in this context)
and get yourself going:

https://github.com/quil/quil

Now go forth and make glorious art. Just be sure to share it with the
rest of us so we can appreciate your handiwork and shout your names
with respect deep into the night...

Take care,

Sam

---
http://sam.aaron.name

-- 
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] Quil 1.0.0

2012-04-07 Thread Sam Aaron
On 7 April 2012 16:20, Changa Damany Imara cdim...@gmail.com wrote:
 Very excited to see this. Thanks so much!

No need to thank me - thank Roland Sadowski for writing clj-processing
in the first place. I just did a spot of spring cleaning :-)

Sam

---
http://sam.aaron.name

-- 
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: Seesaw 1.4.0

2012-03-06 Thread Sam Aaron
Awesome stuff! Great work...

Sam

---
http://sam.aaron.name

On 6 Mar 2012, at 03:05, Dave Ray wrote:

 Hi,
 
 Seesaw 1.4.0 is out now. The release notes [1] have highlights of all
 the changes since 1.3.0. Note there are two breaking changes in the
 API. I believe the impact of these changes should be minimal since
 they were in areas of the API even I was never able to use
 effectively.
 
 I'd also like to thank Sam and Jeff and everyone else working on
 Overtone. Its custom widget development really pushed the Seesaw API
 and exposed a number of issues I probably wouldn't have found
 otherwise.
 
 I'll see everybody at Clojure/West!
 
 Cheers,
 
 Dave
 
 [1] https://github.com/daveray/seesaw/wiki/Release-Notes
 
 -- 
 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: Clojure 1.4.0-beta1

2012-02-03 Thread Sam Aaron

On 3 Feb 2012, at 15:47, Stuart Sierra wrote:

 Also, if somebody wants to compile a list on the wiki of all the bug
 fixes and changes since 1.3, that would be very helpful. Thanks!

That would be wonderful (particularly if someone could post a link to that list 
on this mailing list). Not being too steeped in the ways and means of Clojure 
dev workflows and practices I always find it tremendously difficult to get an 
understanding of what's going on with the development. As such, I have 
absolutely no idea what's going into 1.4, what's left to be done and how the 
changes will impact my Clojure software.

I'm sure that as soon as I post this, someone will reply with a link to a page 
with some useful information. However, I'm personally unable to easily find 
anything using google and/or starting here: http://dev.clojure.org/

It would be great (perhaps this already exists?) if there was a page which was 
just a list of version numbers with a CHANGELOG associated with each.

Sam

---
http://sam.aaron.name


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


Re: ANN: Clojure 1.4.0-beta1

2012-02-03 Thread Sam Aaron

On 3 Feb 2012, at 19:26, Cedric Greevey wrote:

 On Fri, Feb 3, 2012 at 2:11 PM, Stuart Sierra
 the.stuart.sie...@gmail.com wrote:
 Starting with 1.3 there is a changes.md file in the Clojure source.
 
 I'm fairly sure the OP wants a human-readable, user-centric file he
 can view by clicking a link or pasting a URL into his browser, not a
 .md file (whatever THAT is) that he has to find, download, and unzip
 the source distribution to get at.

The md file (which stands for markdown[1]) is here:

https://github.com/clojure/clojure/blob/master/changes.md

However it only covers 1.3 and nothing w.r.t. 1.4 work

Sam

[1]:http://daringfireball.net/projects/markdown/

---
http://sam.aaron.name 

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


Re: ANN: Clojure 1.4.0-beta1

2012-02-03 Thread Sam Aaron

On 3 Feb 2012, at 20:00, Cedric Greevey wrote:
 
 FWIW, the file seems to act like perfectly readable HTML in the
 browser (surprisingly -- I was expecting something more like trying to
 read raw HTML, with tags cluttering up everything, and no working
 outbound links, since I didn't expect Firefox to speak .md)

That's because Github kicks ass :-) It automatically renders markdown files as 
html when you view them in the browser.

Markdown was invented to be readable as raw text and then easily convertible to 
html. 

Sam

---
http://sam.aaron.name

-- 
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: Literate programming in emacs - any experience?

2012-02-01 Thread Sam Aaron

On 30 Jan 2012, at 17:07, daly wrote:
 
 The key result was that I discovered what I call my personal
 irreducible error rate. If I do 100 things I will make 3 errors.
 This was independent of the task. So typing 100 characters has
 3 wrong letters which were mostly caught while typing. Writing
 100 lines of code had 3 errors somewhere. Composing email
 introduces 3 errors per 100 lines of code.

I wonder if that rate has changed since the time you measured it. 

Sam

---
http://sam.aaron.name

-- 
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: New Version of ClojureScript One

2012-01-26 Thread Sam Aaron

On 25 Jan 2012, at 22:27, Brenton wrote:

 ClojureScript will continue to change rapidly. We are already
 depending on a newer version than the one in Maven. Also, I don't
 think that Domina has a release yet.
 
 For times when we only need a source dependency and only at
 development time, I like this approach to dependencies. I plan to
 continue improving support for this in Leiningen and using it as much
 as i can.
 

Sounds extremely sensible. 

 For more of the rationale, see 
 https://github.com/brentonashworth/one/wiki/Dependencies.

Wow. Documentation like this makes me want to shout out with joy!

 You rock!

We all rock, and soon we'll all be rocking together at the Clojure/West 
Overtone unjam... I can't wait :-)

Sam

---
http://sam.aaron.name


-- 
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] New Version of ClojureScript One

2012-01-25 Thread Sam Aaron
Very nice :-) I've got some quality code reading ahead of me...

One quick question - why do you still rely on git checkouts of ClojureScript 
and Domina - especially now ClojureScript is available on maven?

Sam

---
http://sam.aaron.name

On 25 Jan 2012, at 20:40, Brenton wrote:

 We have released a new version of ClojureScript One.
 
 The most significant changes are:
 
 No more scripts! Everything now works through Leiningen. We have added
 support for retrieveing git dependencies via Leiningen.
 
 Allow connections to the REPL form remote machines.
 
 See the change log:
 
 https://github.com/brentonashworth/one/wiki/Change-Log
 
 -- 
 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


Overtone on FLOSS Weekly

2012-01-11 Thread Sam Aaron
Hi all,

you might be interested to know that I'm going to be talking about Overtone and 
Clojure on FLOSS Weekly on Weds the 11th of Jan.

The show will be starting early this week (8.30am Pacific time/4.30pm GMT) due 
to a clash with CES.

http://twit.tv/show/floss-weekly

Should be a lot of fun,

Sam

---
http://sam.aaron.name

-- 
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: Overtone on FLOSS Weekly

2012-01-11 Thread Sam Aaron
On 11 Jan 2012, at 09:22, Sam Aaron wrote:

 you might be interested to know that I'm going to be talking about Overtone 
 and Clojure on FLOSS Weekly on Weds the 11th of Jan.

The show is now available here: http://twit.tv/show/floss-weekly/197

Enjoy :-)

Sam

---
http://sma.aaron.name


-- 
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: Seesaw 1.3.0

2011-12-21 Thread Sam Aaron

On 21 Dec 2011, at 12:42, Laurent PETIT wrote:

 
 As a tool builder, I'd also be interested if what is printed in *out*
 by these functions could also be made available as pure data, so that
 e.g. at some point in time, CCW could provide a specialized tabular
 view to display (edit?) this information.
 
 What do you think about that ?

One approach to achieving that is to create a special type which represents the 
data and for which you also override the print-method.

I've been playing with this sort of thing in Overtone:

https://github.com/overtone/overtone/blob/master/src/overtone/repl/shell.clj

Sam

---
http://sam.aaron.name


-- 
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: Seesaw 1.3.0

2011-12-21 Thread Sam Aaron

On 21 Dec 2011, at 13:10, Meikel Brandmeyer wrote:

 Hi,
 
 Am 21.12.2011 um 13:56 schrieb Sam Aaron:
 
 One approach to achieving that is to create a special type which represents 
 the data and for which you also override the print-method.
 
 A simple approach is a get-option-info and a print-option-info. Toolsmiths 
 use get-option-info to get the data structure while REPL users use the 
 show-options which feeds the output of get-option-info into print-option-info.
 
 Seems less involved than a new type. ;)

That makes a lot of sense. I was just having fun - we can do things like:

;; print a list of all files which contain the string foo that are on the 
desktop:
(grep (ls ~/Desktop) foo) 

But if you're not passing this around and wanting it to be be both a useful 
datastructure and also something the nicely prints itself, having multiple fns 
as Meikel suggests is clearly a simpler an nicer approach :-)

Sam

---
http://sam.aaron.name

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


Overtone 0.6.0 - WIth auto-caching asset system

2011-12-19 Thread Sam Aaron
Hello everyone,

'tis the season to be jolly, therefore with the full festive spirit befitting 
of such an occasion, we bring you an early Christmas gift: Overtone 0.6.0. It's 
fresh on clojars[1] and also tagged on github[2] and, as always, we've updated 
the cheatsheet[3].

Now before we start, let me first open my arms and publicly hug the following 
wonderful people who join our committers list this release. Thank you all!

* Matthew Gilliard
* Dave Ray
* Harold Hausman
* Jennifer Smith

Rather than bog you with lots of internal futzy details (read the full 
changelog if you're that way inclined [4]), allow me to describe just four of 
the cool new features amongst the panoply of fixes and improvements:

1. Global Volume
2. Recording
3. Auto-caching Asset System
4. New sampled-piano Instrument


1. Global Volume


OK, so this might sound like a super basic feature, but it isn't as simple to 
implement as you might imagine. However, it's super simple to use:

(volume 0.5) ;= go to half volume
(volume 2)   ;= double volume

Be warned, if you increase your volume too high, you'll trigger the safety 
system and your beautiful dulcet tones will be replaced by pink-noise until the 
volume is at a safe level again.


2. Recording


It's now possible to stream a wav file recording all your musical activities. 
Again this is super simple:

;; to start recording
(recording-start ~/Desktop/my-wonderful-sounds.wav)

;; make some nose
(demo (sin-osc))

;; finish recording
(recording-stop)

Now there's no excuse not to share your awesome beats with all your friends.


3. Auto-caching Asset System


Now this is easily the most exciting feature. It is now possible to reference 
external resources such as wav files with a URL and Overtone will automatically 
download and cache the resource locally on your filesystem (in 
~/.overtone/assets). This means that it is now possible to reference wav files 
in gists and have your composition still work for everyone without having to 
package the asset with the source code. Not excited? You really should be, this 
is the start of the open source music revolution!

An excellent usecase of the asset system is our new freesound API which allows 
you to reference samples on http://freesound.org a huge free, creative-commons 
licensed sound sample resource. Search around freesound, find something you 
like such as these festive sleigh bells: 
http://www.freesound.org/people/benjaminflack/sounds/44293/ and then all you 
need is the id:

(freesound-path 44293) ;= returns a path on your local file system to a cached 
copy of the sound

You can then feed this directly to #'sample to create a playable version:

(def sleigh-bells (sample (freesound-path 44293)))
(sleigh-bells) ;= hear the bells straight from Overtone.

Now I can tell that you're excited - there is such a huge scope for cool stuff 
with this idea. We've kept things pretty bare-bones for this release in order 
to make sure we've got all the foundational stuff in good working order - so 
thoughts/issues/praises are thoroughly welcome.


4. New sampled-piano instrument
---

Another cool thing about the asset system is that it also deals with zip 
bundles. An example of this is the new sampled-piano instrument. Try this for 
size:

(use 'overtone.inst.sampled-piano) ;= wait for the download to complete (200MB)
(sampled-piano 60) ;= hear the beautiful tones of a recorded piano


OK, so that's it from us. I hope you all had a super 2011 and we're totally 
looking forward to what you get up to with this stuff in 2012. We think next 
year is going to be a really good time to be an Overtone hacker.

Sam, Jeff and all the Overtone hackers.

P.S. If you still struggling to get into a festive mood, check out this amazing 
version of Troika complete with synthesised bells by our new committer Jennifer 
Smith: https://github.com/overtone/overtone/blob/master/examples/bells.clj

[1]: http://clojars.org/overtone
[2]: https://github.com/overtone/overtone/tags
[3]: 
http://cloud.github.com/downloads/overtone/overtone/overtone-cheat-sheet.pdf
[4]: 
https://github.com/overtone/overtone/blob/58e7cc0256304494d14c6cb9357a481c4793154e/CHANGELOG.md

-- 
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: How to attach debugger on clojure's repl ?

2011-12-03 Thread Sam Aaron

On 3 Dec 2011, at 14:03, Chris Perkins wrote:

 On Friday, September 23, 2011 8:00:36 AM UTC-4, Sam Aaron wrote:
  
 I'd be very happy to write up a Getting Started tutorial on the ritz wiki 
 if I can get things working.
 
 Sam
 
  (two months later)
 
 Not to publicly shame you or anything, Sam, but... how's that tutorial coming 
 along?  :)))

I never did manage to get ritz working. I believe the issue was with ritz - 
cake (I still use cake for Overtone hacking). However, now that cake and lein 
are going to be united, we can just focus on lein support for the future.

Alternatively, George Jahad has updated CDT (The Clojure Debugging Toolkit) to 
work with Clojure 1.3 which I'm testing out at the moment. He gave me a demo at 
the conj and it was insanely cool and worked perfectly.

Sam

---
http://sam.aaron.name

-- 
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] Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron
Hi David,

I'm super excited by Avout. It seems *better* than magic in that it not only 
appears to make complicated things possible, but also in a conceptually 
transparent way. Crazy cool.

I'm about to look into this in detail, but I thought I'd just post an issue I'm 
having with the basic example just on the off-chance that I'm doing something 
obviously wrong.

I have zookeeper 3.3.3 installed running on port 2181 with a valid dataDir path 
with the appropriate permissions. I'm got avout 0.5.0 and in a REPL session I 
do the following:

; SLIME 2009-10-15  
 
user (use 'avout.core) 
  
nil 
  
user (def client (connect 127.0.0.1))
 
#'user/client   
  
user (def r0 (zk-ref client /r0 0))  
 
run-in-transaction exception:  #IllegalArgumentException 
java.lang.IllegalArgumentException: Path must not end with / character nil 
#'user/r0   
  
user r0
 
#DistributedReference@761b2f32: nil   
  
user @r0   
  
nil 
 

Sam

---
http://sam.aaron.name

 
On 29 Nov 2011, at 17:38, liebke wrote:

 Today we are releasing Avout, which brings Clojure's in-memory model
 of state to distributed application development by providing a
 distributed implementation of Clojure's Multiversion Concurrency
 Control (MVCC) STM along with distributable, durable, and extendable
 versions of Clojure's Atom and Ref concurrency primitives.
 
 Here's the post announcing the project: 
 http://clojure.com/blog/2011/11/29/avout.html
 
 And here's the project's website: http://avout.io
 
 
 David
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 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] Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron
(Method.java:597) 
   
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:92)   
   
at 
clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:30#'user/r0  

user= )
   
at avout.transaction$run_in_transaction.invoke(transaction.clj:354) 
   
at avout.core$zk_ref.doInvoke(core.clj:51)  
   
at clojure.lang.RestFn.invoke(RestFn.java:445)  
   
at clojure.lang.AFn.applyToHelper(AFn.java:167) 
   
at clojure.lang.RestFn.applyTo(RestFn.java:132) 
   
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3337)
   
at clojure.lang.Compiler$DefExpr.eval(Compiler.java:375)
   
at clojure.lang.Compiler.eval(Compiler.java:6470)   
   
at clojure.lang.Compiler.eval(Compiler.java:6431)   
   
at clojure.core$eval.invoke(core.clj:2795)  
   
at clojure.main$repl$read_eval_print__5967.invoke(main.clj:244) 
   
at clojure.main$repl$fn__5972.invoke(main.clj:265)  
   
at clojure.main$repl.doInvoke(main.clj:265) 
   
at clojure.lang.RestFn.invoke(RestFn.java:512)  
   
at user$eval27$acc__3869__auto30$fn__32.invoke(NO_SOURCE_FILE:1)
   
at clojure.lang.AFn.run(AFn.java:24)
   
at java.lang.Thread.run(Thread.java:680)
   

   
Sam

---
http://sam.aaron.name

On 1 Dec 2011, at 15:39, David Edgar Liebke wrote:

 Hi Sam,
 
 run-in-transaction exception:  #IllegalArgumentException 
 java.lang.IllegalArgumentException: Path must not end with / character nil 
 
 Very interesting, I wouldn't expect that particular exception unless you 
 named the zk-ref /r0/ instead of /r0, which you apparently didn't. 
 
 And even when I do call it /r0/ I get the Path must not end with / 
 character exception at a different point in the code, which is probably the 
 result of a patch I added to zookeeper-clj yesterday. 
 
 Can you try deleting the zookeeper-clj jar file from your dependencies, 
 blowing about your ~/.m2/repository/zookeeper-clj directory, reloading your 
 deps, and trying again?
 
 David
 
 
 On Dec 1, 2011, at 10:04 AM, Sam Aaron wrote:
 
 Hi David,
 
 I'm super excited by Avout. It seems *better* than magic in that it not only 
 appears to make complicated things possible, but also in a conceptually 
 transparent way. Crazy cool.
 
 I'm about to look into this in detail, but I thought I'd just post an issue 
 I'm having with the basic example just on the off-chance that I'm doing 
 something obviously wrong.
 
 I have zookeeper 3.3.3 installed running on port 2181 with a valid dataDir 
 path with the appropriate permissions. I'm got avout 0.5.0 and in a REPL 
 session I do the following:
 
 ; SLIME 2009-10-15   
 
 user (use 'avout.core)  
  
 nil  
  
 user (def client (connect 127.0.0.1)) 
 
 #'user/client

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron
)   


at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:30)   


at zookeeper$create.doInvoke(zookeeper.clj:158) 


at clojure.lang.RestFn.invoke(RestFn.java:521)  

 
at avout.transaction$next_point.invoke(transaction.clj:62)  

 
at avout.transaction$reincarnate_txn.invoke(transaction.clj:233)

 
at avout.transaction$stop$fn__1104.invoke(transaction.clj:243)  

 
at avout.transaction$stop.invoke(transaction.clj:238)   


at 
avout.transaction.LockingTransaction$fn__1117.invoke(transaction.clj:323)   

  
at 
avout.transaction.LockingTransaction.runInTransaction(transaction.clj:303)  

 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  

 
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)   

  
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

 
at java.lang.reflect.Method.invoke(Method.java:597) 


at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:92)   


at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:30)   


... 12 more  

Sam

---
http://sam.aaron.name

   
On 1 Dec 2011, at 17:04, David Edgar Liebke wrote:

 Thanks Sam and Edmund, 
 
 The stack traces were helpful, I think I understand what the immediate 
 problem is. It appears that the transaction ID in these cases is not getting 
 set, and then Avout is trying to write data to the ZooKeeper node 
 /stm/history/ instead of /stm/history/txid.
 
 Since I can't replicate the problem with my setup, I can't be certain of the 
 cause, but I've added a patch to make the STM more robust in the face of a 
 nil transaction ID, and have updated Avout to version 0.5.1.
 
 Can you guys give the version 0.5.1 a try and see if makes a difference?
 
 If you still see the problem, another diagnostic would be to create a ref 
 without an initial value, and see if that succeeds, then try setting the 
 value.
 
 (def r1 (zk-ref client /r1))
 (dosync!! client (ref-set!! r1 0))
 
 Thanks again,
 David
 
 
 
 On Dec 1, 2011, at 11:20 AM, Sam Aaron wrote:
 
 Hi David,
 
 I nuked all my zookeeper deps in my lib and ~/.m2 dirs, but similar to 
 Edmund experience it doesn't fix anything. My stacktrace is also identical:
 
 ∴ /Users/sam/tmp/avv 
   
 λ lein deps  
   
 Downloading: zookeeper-clj/zookeeper-clj/0.9.0/zookeeper-clj-0.9.0.pom from 
 repository clojars at http://clojars.org/repo/ 
 Transferring 2K from clojars 
   
 Downloading: zookeeper-clj/zookeeper-clj/0.9.0/zookeeper-clj-0.9.0.jar from 
 repository clojars at http://clojars.org/repo/ 
 Transferring 9K from clojars

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron

On 1 Dec 2011, at 17:21, David Edgar Liebke wrote:

 Did you initialize the STM?
 
 (init-stm client)

Works perfectly for me too. Perhaps it might help to add that to the example 
snippet to stop idiots like myself falling into that trap :-)

Sam

---
http://sam.aaron.name

-- 
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] Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron
Out of interest, why is #'init-stm a separate step to #'connect

I tried looking at the docstrings for each fn but they were both nil :-(

Sam

---
http://sam.aaron.name

On 1 Dec 2011, at 17:21, David Edgar Liebke wrote:

 Did you initialize the STM?
 
 (init-stm client)
 
 You only need to do it the first time, to set up the necessary zookeeper 
 nodes, it's described in the main tutorial but not the snippet on the top of 
 the avout site.
 
 David
 
 On Dec 1, 2011, at 12:15 PM, Sam Aaron wrote:
 
 Hi David,
 
 thanks for looking into this so promptly. Sadly 0.5.1 just throws a 
 different exception:
 
 user= (def client (connect 127.0.0.1))
  
 
 #'user/client
  
 
 user= (def r0 (zk-ref client /r0 0))  
  
 
 java.lang.RuntimeException: 
 org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = 
 NoNode for /stm/history/t-   
   
 run-in-transaction exception:  #RuntimeException 
 java.lang.RuntimeException: 
 org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = 
 NoNode for /stm/history/t- nil  
   at clojure.lang.Util.runtimeException(Util.java:165)   
  

   at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:35)  
  
   
   at avout.transaction$run_in_transaction.invoke(transaction.clj:356)
  
   
   at avout.core$zk_ref.doInvoke(core.clj:51) 
  

   at clojure.lang.RestFn.invoke(RestFn.java:445) 
  

   at clojure.lang.AFn.applyToHelper(AFn.java:167)
  
   
   at clojure.lang.RestFn.applyTo(RestFn.java:132)
  
   
   at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3337)   
  

   at clojure.lang.Compiler$DefExpr.eval(Compiler.java:375)   
  

   at clojure.lang.Compiler.eval(Compiler.java:6470)  
  
   
   at clojure.lang.Compiler.eval(Compiler.java:6431)  
  
   
   at clojure.core$eval.invoke(core.clj:2795) 
  

   at clojure.main$repl$read_eval_print__5967.invoke(main.clj:244)
  
   
   at clojure.main$repl$fn__5972.invoke(main.clj:265) 
  

   at clojure.main$repl.doInvoke(main.clj:265)
  
   
   at clojure.lang.RestFn.invoke(RestFn.java:512) 
  

   at user$eval27$acc__3869__auto30$fn__32.invoke(NO_SOURCE_FILE:1)   
  

   at clojure.lang.AFn.run(AFn.java:24

Re: Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron

On 1 Dec 2011, at 18:26, liebke wrote:

 Just released Avout 0.5.2, which now includes automatic STM
 initialization (no more pesky init-stm step).

Ha, throw down the gauntlet, then beat me to it ;-)

Great work,

Sam

---
http://sam.aaron.name

-- 
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: Forcing computation

2011-11-15 Thread Sam Aaron
If you're only interested in the side effects of the computation and not the 
result say:

(map #(println %) [1 2 3 4])

you can use dorun rather than doall as it doesn't retain the head (therefore 
requiring less memory).

(dorun (map #(println %) [1 2 3 4]))

Also, if you see yourself mapping over a sequence inside a dorun (as above) you 
should consider doseq:

(doseq [el [1 2 3 4]] (println el))

which requires even less allocation as it doesn't use map which creates a new 
seq.

Sam

---
http://sam.aaron.name

On 15 Nov 2011, at 16:52, labwor...@gmail.com wrote:

 I understand that lazy sequences are very useful but sometimes, I want to 
 compute everything, go away, and have it there when I come back. 
 How do I do that with a map? 
 (def x (map fn coll))
 
 -- 
 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


Access to unzipped assets within jars

2011-11-05 Thread Sam Aaron
Hi there,

consider there exists foo.jar on Clojars which contains a bunch of asset files 
i.e. png images. If I were to declare foo as one of my project's dependencies, 
is it possible to get access to those asset files? I essentially want a path to 
a non-zipped version of each asset.

Sam

---
http://sam.aaron.name

-- 
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: Access to unzipped assets within jars

2011-11-05 Thread Sam Aaron
Interesting - thanks for this. So is it fair to assume that the JVM is ok with 
reading URL resources that are zipped in a jar. I also assume to have an actual 
non-zipped version of the resource I need to copy the file from inside the 
zipped jar to an external path in my file system?

Sam

---
http://sam.aaron.name

On 5 Nov 2011, at 14:03, Ben Smith-Mannschott wrote:

 On Sat, Nov 5, 2011 at 14:42, Sam Aaron samaa...@gmail.com wrote:
 Hi there,
 
 consider there exists foo.jar on Clojars which contains a bunch of asset 
 files i.e. png images. If I were to declare foo as one of my project's 
 dependencies, is it possible to get access to those asset files? I 
 essentially want a path to a non-zipped version of each asset.
 
 These kinds of assets are known as resources in java parlance. A
 resource is named by a path relative to an entry in the classpath.
 Declaring foo as a dependency will place it in the classpath. The name
 of the resource will therefore be the path of the asset within
 foo.jar.
 
 Give clojure.java.io/resource [1] that name, and it will return a URL.
 
 Pass that URL to clojure.java.io/input-stream [2] to open the resource
 for reading.
 
 [1] 
 http://clojure.github.com/clojure/clojure.java.io-api.html#clojure.java.io/resource
 
 [2] 
 http://clojure.github.com/clojure/clojure.java.io-api.html#clojure.java.io/input-stream
 
 hth,
 Ben
 
 -- 
 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: Problem passing a function into a function

2011-11-03 Thread Sam Aaron
Hi Andy,

the issue you're having is that using the  for rest args captures the rest of 
the arguments as a seq. Therefore when you pass a fn as the final parameter to 
#'timed-agent, #'test-func is not bound to the fn you passed in but a seq 
containing that fn. You either need to pull out the fn using something like 
#'first or you can define #'timed-agent to deal with multiple arities:

(defn foo
  A simple function that will tell you whether you passed
   in 0, 1 or 2 args
  ([](println no args))
  ([a]   (println one arg))
  ([a b] (println two args!)))

Sam

---
http://sam.aaron.name

On 3 Nov 2011, at 21:57, AndyK wrote:

 I'm running into a strange problem that I can't see the bottom of.
 Wonder if someone can explain why I'm seeing the behavior I'm
 seeing...
 
 I have a function that uses a Java timer to run a function and can
 also check the results of that function by passing in an optional test
 function
 
 (defn timed-agent [limit timed-func  test-func]
  (let [a (agent 0)
;; test-func can be defined here
agent-func (fn [v] (let [result (timed-func v)]
 (when test-func (test-func result)) (inc
 v)))
t (java.util.Timer.)
tt (proxy [java.util.TimerTask] [] (run [] (send-off a agent-
 func)))]
(set-validator! a #( limit %))
(.scheduleAtFixedRate t tt 1000 1000)))
 
 This works if I don't pass in a test function
 (timed-agent 10 prn)
 You will see output of 0 1 2 3...9
 
 This does not work if I pass in a test function
 (timed-agent 10 prn prn)
 You will see output of 0 and nothing more
 
 This does work if I define test-func within the function (on the
 commented line) - ex, as prn
 You will see 0 nil 1 nil 2 nil...9 nil
 
 First question - why can't I pass in a test function and have the
 timer loop work as expected
 Second question - is there a better way for me to set an upper bound
 on a Java timer using 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 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: R.I.P. John McCarthy

2011-10-25 Thread Sam Aaron
For those in fresh need of having their minds blown, this is always a good 
detonator:

http://www.paulgraham.com/rootsoflisp.html

Sam

---
http://sam.aaron.name

On 25 Oct 2011, at 04:58, finbeu wrote:

 John McCarthy, the father of Lisp, died last night at the age of 84.
 
 -- 
 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


Save your ears - use Overtone 0.5.0

2011-10-18 Thread Sam Aaron
'tis that time again when we jump around in celebration of the new and the 
crazy:

Overtone 0.5.0 is out! Hip-hip-hooray!

So, what's new?

First up we have some fantastic new committers. Please give a warm welcome to:

* Nick Orton
* Kevin Neaton
* Jowl Gluth
* Chris Ford
* Philip Potter

In terms of features, the most exciting, life-saving thing is the integration 
of our new ANTI-EAR-BLEED (™) tech. Yes, that's right - no more 
tintinnabulation of the ear-drum after the triggering of a badly designed synth 
causes your headphones to scream louder than your little sister ever could. All 
sound is now limited and clipped with warning messages sent to stdout when your 
audio goes above a safe threshold. We've also got a bunch of nice fixes, extra 
utility functions and other goodies. The full changelog is here:

https://github.com/overtone/overtone/blob/master/CHANGELOG.md

Also, the CheatSheet has been updated for your enjoyment:

http://cloud.github.com/downloads/overtone/overtone/overtone-cheat-sheet.pdf

So what are you waiting for? Go grab a copy and make some crazy sounds from 
your Clojure REPL:

http://github.com/overtone/overtone
http://clojars.org/overtone

Sam

---
http://sam.aaron.name





-- 
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: Mailing List Decorum

2011-10-15 Thread Sam Aaron
While I understand and respect the importance of focussing discussions to the 
making of things, surely there is more to a community communication substrate 
than this sole category of topic. 

Do these guidelines, therefore, attempt preclude threads such as the discussion 
on the possible impact of new technologies (i.e. Dart), constructive 
discussions on development practices (i.e. REPL-driven-dev vs TDD), links to 
newly discovered external resources (i.e. new presentations/slidedecks) and 
general positive opinion Wow, that was cool! Thanks so much for making that 
:-)

Perhaps much of this discussion would be better moved to the comments of 
external blogs? Still, it feels to me that the ability to constructively 
express and communicate *positive* opinion is a powerful source of energy which 
can cultivate enthusiasm and a general positive attitude within any community. 
I feel that because we're a technical community means we should be spending 
more care and effort fostering these social elements rather than trying to 
suppress/eradicate them.

Sam

---
http://sam.aaron.name

On 15 Oct 2011, at 19:02, Rich Hickey wrote:

 This is just a reminder. While in general our communication here is very 
 good, occasionally it goes astray.
 
 These mailing lists are run by, and for, people who make things. Most 
 messages should have one of these forms:
 
 I made something - here is my contribution
 I am trying to use the thing someone made and am having trouble, please help.
 I can help you with that thing someone made.
 I am trying to make something and am having trouble, please help.
 I can help you make something.
 
 They are not the place for opinion pieces and diatribes.
 
 They are not the place for advocacy about what 'ought' to be made. If you 
 think something ought to be made, then make it. Otherwise, respect others 
 peoples' right to choose what they do with their time.
 
 Occasionally, there may be disagreements about how something has been, or 
 will be, made. These disagreements should take the form of technical 
 arguments. To make a technical argument that gets (and gives!) respect:
 
 Keep it short
 Stick to the facts
 Use logic
 Leave people out of it
 Avoid rhetorical devices:
   Superfluous or opinion-laden adjectives
   Claims to speak for the community, or that everyone agrees with you.
   Threats of what will happen unless things go your way
   Any flavor of 'the sky is falling'
 
 If you are not the one making something, you should restrict your input to 
 very short technical arguments supporting your position. If someone has 
 already made your point, just +1 it.
 
 Please keep your posts short.
 
 Ignoring these guidelines fails to respect the time and effort of people who 
 make things, which you should care about if you intend to be one.
 
 Thanks,
 
 Rich
 
 -- 
 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: Mailing List Decorum

2011-10-15 Thread Sam Aaron
Devlin,

I totally agree with you :-) I read the core of the post in a similar fashion 
and I respect and agree with the general notion. However, my perception of the 
tone of the message was that it felt slightly 'anti-opinion' whereas I believe 
that constructive positive opinion has an extremely important part to play in 
nurturing a progressive community. Hopefully I just misinterpreted it.

I believe that there's a big difference between not ruling out positive opinion 
by scoping the guidelines to most messages and explicitly encouraging it.

One of the main reasons why I've been hacking mad crazy on Overtone is not for 
any specific technical goal or even to make something that necessarily 
contributes to the making of other things. I'm also not in the business of only 
solving hard problems. The main reason I've been doing what I do is purely to 
make people other smile and feel good because they can do things that they 
perhaps couldn't before - namely be and feel musical. I therefore always want 
to hear the Clojure community's opinion on this because it energises me to 
continue.

Sam 

---
http://sam.aaron.name


On 15 Oct 2011, at 21:06, Devin Walters wrote:

 Aaron, I can't speak for Rich but I don't think I read the original post the 
 same way you did.
 
 I think the big point being made (and one I agree with) is that we should 
 try, to the best of our ability, to keep our focus on the constructive. 
 Diatribes and/or opinion pieces are less constructive, in general.
 
 I will also point out Rich wrote: *Most* messages should have one of these 
 forms: and This is just a reminder. I don't see this as any sort of 
 implicit threat to ban opposing sides.
 
 My reading: Let's keep things constructive, productive, thoughtful, and 
 objective. Let's try to avoid discussions about what ought to happen and 
 focus more on doing it.
 
 --
 Devin
 
 
 On Saturday, October 15, 2011 at 2:34 PM, Sam Aaron wrote:
 
 While I understand and respect the importance of focussing discussions to 
 the making of things, surely there is more to a community communication 
 substrate than this sole category of topic. 
 
 Do these guidelines, therefore, attempt preclude threads such as the 
 discussion on the possible impact of new technologies (i.e. Dart), 
 constructive discussions on development practices (i.e. REPL-driven-dev vs 
 TDD), links to newly discovered external resources (i.e. new 
 presentations/slidedecks) and general positive opinion Wow, that was cool! 
 Thanks so much for making that :-)
 
 Perhaps much of this discussion would be better moved to the comments of 
 external blogs? Still, it feels to me that the ability to constructively 
 express and communicate *positive* opinion is a powerful source of energy 
 which can cultivate enthusiasm and a general positive attitude within any 
 community. I feel that because we're a technical community means we should 
 be spending more care and effort fostering these social elements rather than 
 trying to suppress/eradicate them.
 
 Sam
 
 ---
 http://sam.aaron.name
 
 On 15 Oct 2011, at 19:02, Rich Hickey wrote:
 
 This is just a reminder. While in general our communication here is very 
 good, occasionally it goes astray.
 
 These mailing lists are run by, and for, people who make things. Most 
 messages should have one of these forms:
 
 I made something - here is my contribution
 I am trying to use the thing someone made and am having trouble, please 
 help.
 I can help you with that thing someone made.
 I am trying to make something and am having trouble, please help.
 I can help you make something.
 
 They are not the place for opinion pieces and diatribes.
 
 They are not the place for advocacy about what 'ought' to be made. If you 
 think something ought to be made, then make it. Otherwise, respect others 
 peoples' right to choose what they do with their time.
 
 Occasionally, there may be disagreements about how something has been, or 
 will be, made. These disagreements should take the form of technical 
 arguments. To make a technical argument that gets (and gives!) respect:
 
 Keep it short
 Stick to the facts
 Use logic
 Leave people out of it
 Avoid rhetorical devices:
 Superfluous or opinion-laden adjectives
 Claims to speak for the community, or that everyone agrees with you.
 Threats of what will happen unless things go your way
 Any flavor of 'the sky is falling'
 
 If you are not the one making something, you should restrict your input to 
 very short technical arguments supporting your position. If someone has 
 already made your point, just +1 it.
 
 Please keep your posts short.
 
 Ignoring these guidelines fails to respect the time and effort of people 
 who make things, which you should care about if you intend to be one.
 
 Thanks,
 
 Rich
 
 -- 
 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 
 (mailto:clojure

Re: Mailing List Decorum

2011-10-15 Thread Sam Aaron

On 15 Oct 2011, at 23:14, Rich Hickey wrote:

 Your last bit confuses me. You certainly are making something
 wonderful in, and for, Clojure with Overtone. I don't know where I
 said or implied anything about the discussions being only about making
 tools or solving hard problems.

My apologies - I wasn't advocating that you had said or implied that the 
discussions only be about making tools or solving hard problems. 



 In any case, there is no effort to suppress or eradicate underfoot. I
 am not going to enumerate what is ok and what is not, except insofar
 as to say respect and consideration are ok, and a lack of them is not.
 
 Rich
 
 
 On Oct 15, 4:57 pm, Sam Aaron samaa...@gmail.com wrote:
 Devlin,
 
 I totally agree with you :-) I read the core of the post in a similar 
 fashion and I respect and agree with the general notion. However, my 
 perception of the tone of the message was that it felt slightly 
 'anti-opinion' whereas I believe that constructive positive opinion has an 
 extremely important part to play in nurturing a progressive community. 
 Hopefully I just misinterpreted it.
 
 I believe that there's a big difference between not ruling out positive 
 opinion by scoping the guidelines to most messages and explicitly 
 encouraging it.
 
 One of the main reasons why I've been hacking mad crazy on Overtone is not 
 for any specific technical goal or even to make something that necessarily 
 contributes to the making of other things. I'm also not in the business of 
 only solving hard problems. The main reason I've been doing what I do is 
 purely to make people other smile and feel good because they can do things 
 that they perhaps couldn't before - namely be and feel musical. I therefore 
 always want to hear the Clojure community's opinion on this because it 
 energises me to continue.
 
 Sam
 
 ---http://sam.aaron.name
 
 On 15 Oct 2011, at 21:06, Devin Walters wrote:
 
 
 
 
 
 
 
 Aaron, I can't speak for Rich but I don't think I read the original post 
 the same way you did.
 
 I think the big point being made (and one I agree with) is that we should 
 try, to the best of our ability, to keep our focus on the constructive. 
 Diatribes and/or opinion pieces are less constructive, in general.
 
 I will also point out Rich wrote: *Most* messages should have one of these 
 forms: and This is just a reminder. I don't see this as any sort of 
 implicit threat to ban opposing sides.
 
 My reading: Let's keep things constructive, productive, thoughtful, and 
 objective. Let's try to avoid discussions about what ought to happen and 
 focus more on doing it.
 
 --
 Devin
 
 On Saturday, October 15, 2011 at 2:34 PM, Sam Aaron wrote:
 
 While I understand and respect the importance of focussing discussions to 
 the making of things, surely there is more to a community communication 
 substrate than this sole category of topic.
 
 Do these guidelines, therefore, attempt preclude threads such as the 
 discussion on the possible impact of new technologies (i.e. Dart), 
 constructive discussions on development practices (i.e. REPL-driven-dev vs 
 TDD), links to newly discovered external resources (i.e. new 
 presentations/slidedecks) and general positive opinion Wow, that was 
 cool! Thanks so much for making that :-)
 
 Perhaps much of this discussion would be better moved to the comments of 
 external blogs? Still, it feels to me that the ability to constructively 
 express and communicate *positive* opinion is a powerful source of energy 
 which can cultivate enthusiasm and a general positive attitude within any 
 community. I feel that because we're a technical community means we should 
 be spending more care and effort fostering these social elements rather 
 than trying to suppress/eradicate them.
 
 Sam
 
 ---
 http://sam.aaron.name
 
 On 15 Oct 2011, at 19:02, Rich Hickey wrote:
 
 This is just a reminder. While in general our communication here is very 
 good, occasionally it goes astray.
 
 These mailing lists are run by, and for, people who make things. Most 
 messages should have one of these forms:
 
 I made something - here is my contribution
 I am trying to use the thing someone made and am having trouble, please 
 help.
 I can help you with that thing someone made.
 I am trying to make something and am having trouble, please help.
 I can help you make something.
 
 They are not the place for opinion pieces and diatribes.
 
 They are not the place for advocacy about what 'ought' to be made. If you 
 think something ought to be made, then make it. Otherwise, respect others 
 peoples' right to choose what they do with their time.
 
 Occasionally, there may be disagreements about how something has been, or 
 will be, made. These disagreements should take the form of technical 
 arguments. To make a technical argument that gets (and gives!) respect:
 
 Keep it short
 Stick to the facts
 Use logic
 Leave people out of it
 Avoid rhetorical devices:
 Superfluous or opinion-laden

Re: Mailing List Decorum

2011-10-15 Thread Sam Aaron
Sorry, accidentally hit the send mail key combo! Here's the completed email...

On 15 Oct 2011, at 23:14, Rich Hickey wrote:
 
 Your last bit confuses me. You certainly are making something
 wonderful in, and for, Clojure with Overtone. I don't know where I
 said or implied anything about the discussions being only about making
 tools or solving hard problems.

My apologies - I wasn't advocating that you had said or implied that the 
discussions only be about making tools or solving hard problems. Rather that 
these are typical and laudable efforts by many of the Clojure community that 
would totally benefit from the kind of discussional focus as you indicated in 
your initial email. I was attempting to draw a distinction to work specifically 
targeting end users, such as Overtone, which totally benefits from such 
opinionated discussion. At least, those opinions can encourage and provide 
valuable feedback.

 In any case, there is no effort to suppress or eradicate underfoot. I
 am not going to enumerate what is ok and what is not, except insofar
 as to say respect and consideration are ok, and a lack of them is not.

I think this focus on respect and consideration is exactly what I had in mind - 
but I was clearly not able to express it such a succinct and lucid manner :-) 
Well put.

Sam

---
http://sam.aaron.name

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


Overtone 0.4.0 - Clojure 1.3 ready

2011-09-25 Thread Sam Aaron
Hi everyone,

given that Clojure 1.3 has recently gone GOLD 
(http://www.youtube.com/watch?v=n0pvFulUd98) I thought we should celebrate with 
a new version of Overtone with full Clojure 1.3 support.

Overtone 0.4.0 is now on Clojars and tagged on Github.

https://github.com/overtone/overtone/tree/0.4.0

In addition, all of Overtone's direct dependencies: osc-clj, at-at, midi-clc, 
byte-spec and indirect dependencies (if you have a monome) serial-port, 
monome-serial and polynome have all been updated to support Clojure 1.3.

Here's the changelog:

### New

* Support for Clojure 1.3
* Provide more separation between 'public' and 'private' APIs by moving 
non-public aspects of overtone.sc into overtone.sc.machinery
* Similarly pull out 'private' machinery from overtone.sc.server into 
overtone.sc.machinery.server - overtone.sc.server now contains only public fns.
* Create new helpers namespace for useful 'public' fns. overtone.util is now 
meant for internal/private util fns.
* Define and use default Overtone at-at pool
* Remove server dependence on studio.rig. Use #'boot-rig to boot and wait for 
rig to complete its initialisation
* Improve doc for sin-osc-fb ugen
* Improve doc for node-free
* Clean up implementation of cgen macro
* Rename boot to boot-server
* Rename quit to kill-server
* Make osc-validator check for actual types not the 'fuzzy' types Clojure uses
* Add information about resolving collider ugen fns to collider docstrings
* Teach resolve-degree about sharps and flats
* Stop users from attempting to receive osc messages from the server when it's 
not connected
* Various ugen metadata fixes
* Various docstring improvements

### Examples
* Add piano piece - Gnossienne No. 1 by Erik Satie

### Helpers
* Add some useful string manipulation fns
* Add some file helper fns
* Move splay-pan into helpers ns
* Move sc-lang converter here

### REPL
* Add odoc - Overtone version of doc which gives information about ugen 
colliders
* Add super rudimentary (but still pretty fun) shell fns ls and grep
* Make find-ug and find-ug-doc macros so you can pass unquoted symbols as args
* Allow ugen searches to also match the ugen name in addition to its full doc 
string
* Teach find-ug to print the full docstring of the match if only one is returned

### Deprecated
* Support for vijual representation of node tree

### Bugfixes

* Fix clear-ids in allocator
* Don't explicitly free node id when freeing node as this is already handled by 
a callback
* Fix resolve-gen-name
* Fix cgen bug in arglist generation
* Fix snare drum inst

Sam

---
http://sam.aaron.name

-- 
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: Overtone 0.4.0 - Clojure 1.3 ready

2011-09-25 Thread Sam Aaron

On 25 Sep 2011, at 17:55, Bruce Durling wrote:
 
 Is this the version you'll be covering at your talk at skillsmatter on
 3 October?

Of course and perhaps other bits and bobs I develop between now and then :-)

It should be a lot of fun.

Sam

---
http://sam.aaron.name

-- 
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: What happened to bignum support? (clojure 1.3.0)

2011-09-25 Thread Sam Aaron
Hi George,

On 25 Sep 2011, at 22:25, George Kangas wrote:
 
Previous versions would silently, automagically convert to bignums
 and
give me the answer I wanted.  Is clojure-1.3.0 too serious,
 enterprisy, and
Java-like for this sort of thing?  I found no clue in the list of
 changes.

In addition to Baishampayan's excellent answer, it might also be useful to 
point you to the relevant documentation.

The 1.3 changelist mentions Enhanced Primitive Support 
(https://github.com/clojure/clojure/blob/master/changes.txt#L75) which points 
to the following two pages:

http://dev.clojure.org/display/doc/Enhanced+Primitive+Support
http://dev.clojure.org/display/doc/Documentation+for+1.3+Numerics

which may be helpful for you.

Sam

---
http://sam.aaron.name

-- 
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: How to attach debugger on clojure's repl ?

2011-09-23 Thread Sam Aaron

On 23 Sep 2011, at 06:14, Glen Stampoultzis wrote:
 
 
 Ritz looks really nice the setup seems complicated.  I haven't had much luck 
 setting it up unfortunately. 

Me neither. Here's the steps I took so far:

* Cloned https://github.com/pallet/ritz to a tmp dir
* Copied the slime dir inside ritz into my .emacs.d dir
* Modified my global cake project.clj file to look as follows:

(defproject global 0.0.0
  :description Don't rename this project, but you can change the version if 
you want.
  :dependencies [[clojure 1.3.0-RC0]]
  :dev-dependencies [[ritz 0.1.8-SNAPSHOT]])

* Ran `cake deps --global`
* My .cake dir now looks as follows:

/Users/sam/.cake 
├── build
├── classes  
├── lib  
│   ├── clojure-1.3.0-RC0.jar
│   ├── deps.clj 
│   └── dev  
│   ├── ritz-0.1.8-20110809.143608-3.jar 
│   └── useful-0.4.0.jar 
├── pom.xml  
├── project.clj  
├── run  
└── templates
└── default  
├── LICENSE  
├── project.clj  
├── src  
│   └── +project+
│   └── core.clj 
└── test 
 
10 directories, 9 files  

* The ritz README talks about making sure tools.clj is in the classpath. 
However, it appears on OS X there is no tools.jar:

tools.jar does not exist. Classes usually located here are instead included in 
classes.jar. Scripts that rely on the existence of tools.jar need to be 
rewritten accordingly. (see 
http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Java14Development/02-JavaDevTools/JavaDevTools.html)

* I created a blank project with `cake new foo`
* cd into foo
* Ran `cake ritz` to get the error unknown task: ritz.

I'm unsure where to go from here. How do I teach cake about the ritz task? Am I 
missing any specific steps? Is not having tools.jar available on OS X an issue? 

I'd be very happy to write up a Getting Started tutorial on the ritz wiki if 
I can get things working.

Sam

---
http://sam.aaron.name


-- 
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: How to attach debugger on clojure's repl ?

2011-09-23 Thread Sam Aaron

On 23 Sep 2011, at 14:24, Hugo Duncan wrote:
 
 I've not actually tried running ritz from cake recently. Which version of 
 cake?

0.6.3

 
 I've also not tried running with 1.3.0-RC0.

I get the same issue (unknown task: ritz) with Clojure 1.2.0

 
 I imagine this is some issue preventing the cake task from loading.  I 
 believe cake logs its output somewhere - maybe you could check the cake logs 
 for ritz related messages?
 

Both the local .cake/cake.log and the global ~/.cake/.cake/cake.log logs don't 
report anything from ritz when attempting to run `cake ritz`.

 I'd be very happy to write up a Getting Started tutorial on the ritz wiki 
 if I can get things working.
 
 I'll gladly take you up on that :)

It would be a pleasure :-)

Sam

---
http://sam.aaron.name

-- 
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: Overtone 0.3 released

2011-09-14 Thread Sam Aaron
I should also mention that we have a cheat sheet too:

http://cloud.github.com/downloads/overtone/overtone/overtone-cheat-sheet.pdf

Thanks to Steve Tayon for such an excellent template.

Sam

---
http://sam.aaron.name

On 13 Sep 2011, at 00:03, Sam Aaron wrote:

 Hey everyone,
 
 I've just pushed out a shiny new Overtone release to Clojars. Although it's 
 only been a little over a month since the last release, there's been quite a 
 lot of work committed that it definitely warranted a new number and a little 
 release party! So update your music project dependencies to 0.3.0, sync your 
 deps and start playing with the new functionality. A great place to start is 
 the new algorithmic piano example:
 
 https://github.com/overtone/overtone/blob/master/test/example/extemp_piano.clj
 
 So, what's happened? Well, the key highlights are:
 
 * An example system
 * Binary/Unary UGen documentation
 * The unification of Binary/Unary UGen calling semantics with standard UGen 
 fns.
 * A selection of interesting new algo/music fns
 * Useful UGen documentation lookup fns: ug-doc, find-ug, find-ug-doc
 
 More detailed highlights are as follows:
 
 https://github.com/overtone/overtone/blob/master/CHANGELOG.md
 
 Enjoy!
 
 Sam
 
 ---
 http://sam.aaron.name

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


Overtone 0.3 released

2011-09-12 Thread Sam Aaron
Hey everyone,

I've just pushed out a shiny new Overtone release to Clojars. Although it's 
only been a little over a month since the last release, there's been quite a 
lot of work committed that it definitely warranted a new number and a little 
release party! So update your music project dependencies to 0.3.0, sync your 
deps and start playing with the new functionality. A great place to start is 
the new algorithmic piano example:

https://github.com/overtone/overtone/blob/master/test/example/extemp_piano.clj

So, what's happened? Well, the key highlights are:

* An example system
* Binary/Unary UGen documentation
* The unification of Binary/Unary UGen calling semantics with standard UGen fns.
* A selection of interesting new algo/music fns
* Useful UGen documentation lookup fns: ug-doc, find-ug, find-ug-doc

More detailed highlights are as follows:

https://github.com/overtone/overtone/blob/master/CHANGELOG.md

Enjoy!

Sam

---
http://sam.aaron.name

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


Re: Clojure in Emacs Seemingly Impossible

2011-09-11 Thread Sam Aaron
Hi Curran,

I made this video for hacking Overtone with Emacs:

http://vimeo.com/25190186

However, Overtone can just be viewed as an example project - it's really just a 
description of how to get a working Clojure/Emacs setup.

Sam

---
http://sam.aaron.name

On 10 Sep 2011, at 18:29, Curran wrote:

 Greetings,
 
 I would greatly appreciate any guidance on where to find a working and
 complete set of instructions for how to set up Emacs with swank-
 clojure. I am in Ubuntu.
 
 I have followed exactly every step of the instructions on this page
 http://dev.clojure.org/display/doc/Getting+Started+with+Emacs, and
 also (with a fresh install of Emacs) the version using Git in the
 comment on that page by Martin Blais. With both methods, when I
 execute M-x clojure-jack-in, the message Starting swank server
 appears and hangs. Swank never starts, the message never changes, and
 I don't see any error messages anywhere (not sure where to look, maybe
 I'm missing them?).
 
 I really would like to use Clojure for a significant project, but if I
 can't get the dev environment working I'm hosed.
 
 Also, if I can't get Emacs going, would anyone suggest an alternative
 development tool? (I know there are lots, but I don't know which to
 try first).
 
 Thank you very much.
 
 Best regards,
 Curran
 
 -- 
 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: Clojure in Emacs Seemingly Impossible

2011-09-11 Thread Sam Aaron

On 11 Sep 2011, at 16:37, kjeldahl wrote:

 I use Emacs for virtually everything, but have found that Emacs
 +Clojure is less than idea when working with multiple threads (like
 hosting and running a Jetty server). I believe this is mostly related
 to how Java and Emacs+Slime handles input/output redirection. I went
 crazy trying to figure out what output went where, and have settled
 with running Clojure outside of Emacs for the cases where I need to do
 server like / threading like things where I need to log to stdout/
 stderr. In my case, outside Emacs means a simple lein repl.


In Overtone we have threads coming out of our ears. However, I don't really 
have a problem with monitoring output. I use Emacs + cake, and all output for 
the current REPL process end up in the REPL within Emacs and the output for all 
other threads ends up in .cake/cake.log which I just simply tail in a separate 
(tiled) terminal. I'm pretty sure lein has a similarly sensible approach for 
dealing with output from the non-REPL threads.

Sam

---
http://sam.aaron.name

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


Re: Clojure in Emacs Seemingly Impossible

2011-09-11 Thread Sam Aaron

On 11 Sep 2011, at 22:42, kjeldahl wrote:
 
 I'm no expert, but if I had to choose between getting all output in a
 file, or some output in the repl buffer and some in *swank*, I would
 prefer the former (which is what I believe cake actually does).

Used from within Emacs, cake places all output from the REPL thread into the 
Slime REPL buffer and output from all other threads into .cake/cake.log

So perhaps this isn't exactly what you want…

Sam

---
http://sam.aaron.name

-- 
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: Swarming experiment at Conj?

2011-09-09 Thread Sam Aaron
Hi Brian,

This is something I'd be TOTALLY up for.

Also, your setup description sounds very similar to the setup Jeff Rose and I 
use to jam and hack Overtone together. In fact, we went one step further and 
allowed both Emacs and Vim instances to communicate with the same shared JVM. 
All we needed to do was to start up a swank server in addition to the server 
mechanism Jeff used to talk to Vim (I forget what it was called). It worked a 
real treat :-)

One thing we'd be missing compared to Smalltalk would be a way to view each 
other's code. Obviously, as you eval code, it gets compiled and you lose the 
textual representation. We'd need to consider specific strategies for the 
sharing of text code in addition to a method of combining all the source for 
the final product (unless you want to consider the modified JVM memory to be 
the final product). As there will also most likely be a difference between the 
evaluated code on the JVM and the combined text source (as old evaled code may 
still be sitting around in memory) we'd also need to consider how we might deal 
with that discrepancy. 

Sam

---
http://sam.aaron.name

On 8 Sep 2011, at 22:36, Brian Marick wrote:

 TL;DR: I have an idea for an after-hours coding experiment at the Conj. 
 Interested?
 
 
 I'm at ALE2011 in Berlin. Jason Ayers gave an interesting presentation. He 
 works for Cincom, a maker of Smalltalk. They wondered what would happen if 8 
 people programmed together on the same problem (instead of one or two). They 
 set up an experiment in which 8 people on 8 computers could each have their 
 own interface to the same Smalltalk image. (That meant that any change Person 
 X made to a method in the system would be instantly available to everyone 
 else once the compiler accepted it. It'd also be picked up by the continuous 
 testing system.)
 
 They gave the team a problem to solve and a set of steps to work through 
 (patterned after the way wolf packs hunt and kill prey).
 
 They've done multiple trials at different conferences (etc.). It sounds both 
 fun and interesting. And for those of us into pairing and tight 
 collaboration, it might be illuminating.
 
 As he presented, I found myself thinking that a similar thing should be 
 possible with 8 Emacs instances talking to one `lein swank` instance. It'd be 
 useful to have a sort of automatic-commit-and-push-on-file-save plus a 
 lightweight way of automatically picking up changes other people make. I 
 expect that'd be more annoying than the Smalltalk experiment -- there are 
 advantages to the Smalltalk/InterLisp one-image-to-rule-them-all model -- but 
 it might still be fun/interesting/illuminating.
 
 
 I'd be willing to do the implementation work to allow us to run this 
 experiment at the Conj during after-hours or other hacking time. I'd need to 
 know there were interested participants and someone from the Conj 
 organization to do logistics. (A table that's as round as possible, plus 
 power, should suffice.)
 
 What say you?
 
 -
 Brian Marick, Artisanal Labrador
 Contract programming in Ruby and Clojure
 Occasional consulting on Agile
 www.exampler.com, www.twitter.com/marick
 
 -- 
 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: Swarming experiment at Conj?

2011-09-09 Thread Sam Aaron

On 8 Sep 2011, at 23:54, Phil Hagelberg wrote:

 
 As he presented, I found myself thinking that a similar thing should be 
 possible with 8 Emacs instances talking to one `lein swank` instance.
 
 Nah, you should do it with a single Emacs instance with 8 emacsclients
 connected; that way you wouldn't have to worry about syncing separate
 filesystems.

This would be more like the setup for a Dojo. It would certainly be easier to 
do, but resembles more of a stop the world locking strategy rather than a 
messy concurrent hackfest. Considering STM like strategies at this level of 
coding would be a really interesting thought experiment.

Sam

---
http://sam.aaron.name

-- 
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: generic math, comparator and arithmetic libs

2011-09-06 Thread Sam Aaron

On 6 Sep 2011, at 11:33, Konrad Hinsen wrote:
 
 I must assume that nobody read that message, as there should have been loud 
 complaints. There is obviously no difference in performance between = and 
 not=, as the result of either one is known as soon as one can decide equality 
 OR non-equality.
 
 I have added a plain function not= to clojure.algo.generic.comparison as a 
 convenience, it is just the negation of generic =.
 

Would this still allow the overriding of not= to do somethign different to the 
negation of generic =. If not, how might I achieve this?

Sam

---
http://sam.aaron.name

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


fn with same name as ns

2011-09-05 Thread Sam Aaron
Hi there,

The docstring for one of the Overtone ugens fns isn't printing correctly - it's 
returning an empty docstring. I discovered that that particular ugen has the 
same name as one of the namespaces that is visible at that scope. The fn is 
called osc and the namespace for sending and receiving Open Sound Control 
messages is similarly called osc.

It turns out that the doc macro favours namespaces over functions:

user (macroexpand '(doc osc))
(clojure.core/print-namespace-doc #Namespace osc)

I'm wondering if it's considered bad practice to have functions and namespaces 
with the same name. Everything appears to function perfectly well - except for 
the doc macro.

I'm also assuming my only solutions are to rename the fn or the namespace of 
the osc library?

Sam

---
http://sam.aaron.name

-- 
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: generic math, comparator and arithmetic libs

2011-09-01 Thread Sam Aaron
Hi Konrad,

that's great news :-)

Thanks for such a useful set of libraries. Oh, and whilst we're on the subject, 
is there any reason why generic.comparison doesn't include !=

Sam

---
http://sam.aaron.name

On 1 Sep 2011, at 08:29, Konrad Hinsen wrote:

 On 31 août 11, at 17:04, Sam Aaron wrote:
 
 is anyone aware of any plans to move Konrad Hinsen's generic math, 
 comparator and arithmetic libraries to new separate 1.3 contrib libs?
 
 * 
 http://richhickey.github.com/clojure-contrib/generic.math-functions-api.html
 * http://richhickey.github.com/clojure-contrib/generic.arithmetic-api.html
 * http://richhickey.github.com/clojure-contrib/generic.comparison-api.html
 
 Yes, me :-)
 
 As so often, all I need is time. But since I plan to move all my code to 1.3 
 soon, I'll have to migrate those libraries soon as well. They will be under 
 algo.generic:
 
   http://github.com/clojure/algo.generic.git
 
 Konrad.
 
 -- 
 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: generic math, comparator and arithmetic libs

2011-09-01 Thread Sam Aaron
On 1 Sep 2011, at 09:35, Alan Malloy wrote:

 I don't see any reason for it to include !=, which can be implemented
 as (not (= a b)). Conversely, = could be implemented as (or ( a b)
 (= a b)), but if either of those is expensive operations he gives you
 a chance to do a more-optimized =. There's not much point in forcing
 people to implement not= for each data type, if it can be implemented
 once elsewhere.

Interesting - perhaps I misunderstand the usage of the library - so please 
correct me if I'm on the wrong track.

We currently use the library to overload many of the standard mathematical 
operations which have a double meaning in a signal processing context. From 
what I understand of the generic libs, they give you a way of overriding these 
operations using multimethods. I'm interested in overriding != in a similar way:

  (defmethod (symbol clojure.contrib.generic.comparison !=) 
[:overtone.sc.ugen.sc-ugen/sc-ugen :overtone.sc.ugen.sc-ugen/sc-ugen]
 [a b]
 (my-special-ugen-not-equal-impl a b))

How might this be achieved by overriding other operations?

Sam

---
http://sam.aaron.name

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


generic math, comparator and arithmetic libs

2011-08-31 Thread Sam Aaron
Hi there,

is anyone aware of any plans to move Konrad Hinsen's generic math, comparator 
and arithmetic libraries to new separate 1.3 contrib libs?

* http://richhickey.github.com/clojure-contrib/generic.math-functions-api.html
* http://richhickey.github.com/clojure-contrib/generic.arithmetic-api.html
* http://richhickey.github.com/clojure-contrib/generic.comparison-api.html

We use these in Overtone to overload symbols which are meaningful in both 
mathematical and signal processing senses such as + being both addition and 
signal mixing.

Sam

---
http://sam.aaron.name

-- 
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: Video Slides on Pattern Matching and Predicate Dispatch in Clojure

2011-08-19 Thread Sam Aaron
Awesome talk - thanks!

I particularly enjoyed the sign behind you that says Don't Panic! - it helped 
keep me calm during the hairily complex parts :-)

I really look forward to seeing where you go with this stuff…

Sam

---
http://sam.aaron.name

On 18 Aug 2011, at 21:10, David Nolen wrote:

 SlideShare link, http://www.slideshare.net/DavidNolen/patterns-8907600
 
 David
 
 On Thu, Aug 18, 2011 at 2:57 PM, Laurent PETIT laurent.pe...@gmail.com 
 wrote:
 Hello, 
 
 I don't have a Facebook account (and don't want to create one), neither have 
 or want to create a scribd account. Could it be possible to have the slides 
 available for download without having to authenticate (e.g. slideshare) ?
 
 2011/8/18 David Nolen dnolen.li...@gmail.com
 In case you didn't see this elsewhere:
 
 http://vimeo.com/27860102
 
 David
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 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
 
 
 -- 
 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: Another ClojureScript app in the wild

2011-08-18 Thread Sam Aaron
Very cool! Now the logic of pacman is in a form I can easily read :-)

Out of interest, do you know why it only works in Chrome? Doesn't the closure 
library do any work to shield you from from the browser differences, or is it 
simply a performance issue with the Chrome js engine the only one operating 
fast enough to smoothly render the game?

Sam

---
http://sam.aaron.name

On 17 Aug 2011, at 23:00, Matthew Gilliard wrote:

 I've been playing around writing a fun little ClojureScript project -
 it's a bit different, so I thought you might like to see it:
 
 http://mjg123.github.com/pacman/pacman.html
 
 As I was feeling my way quite blindly through ClojureScript and
 gClosure I have let the code get into a bit of a mess and I don't
 think I'll really work on it much more.  I have learned an awful lot
 though (which was the main objective) - my main lessons are:
 
 - ClojureScript is awesome.  The performance and stability of it are
 really astounding.  Really great work guys.
 - Debugging a ClojureScript app is hard.  I never figured out how to
 get js/console to work.  My best solution was to compile  run very
 often, so that errors were caught quickly.  Better yet would have been
 thorough testing ;)
 
 - it *is* possible to write a game with no mutable state (well, I use
 an atom to hold the most-recently-pressed key, but apart from that...
 The state-of-the-world datastructure is immutable)
 
 - Some functions missing from ClojureScript which surprised me: range, int
 - Some functions behave differently between Clojure and ClojureScript
 (due to underlying platform differences): mod
 
 - Testing is very important.  The gClosure jsunit stuff looks nice
 but I'd love a midje-like API for it.
 
 Browser-compatibility:  Chrome - OK, Firefox 6 - sometimes crashes
 with too much recursion, IE/Safari - Forget it.
 
 Happy to answer any questions, otherwise I'll be over here hacking
 some Clojure   :)
 
 Matthew
 
 -- 
 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


osc-clj 0.5.0 - Open Sound Control for Clojure

2011-08-16 Thread Sam Aaron
Hi there,

I just thought I'd announce quite a significant update to osc-clj. This is the 
first release that can claim to have full support for the OSC spec:

http://opensoundcontrol.org/spec-1_0

The major new features are as follows:

* Support for the timely dispatch of bundles scheduled for the future (using 
at-at)
* Full support for OSC pattern matching (allowing incoming messages to match 
against multiple handler 'methods'
* Support for zeroconf - when you create a server, you can pass a string as an 
optional param which will be automatically registered with zeroconf when you 
explicitly turn it on with (zero-conf-on).

So, if you're interested with working with new-school instruments/interfaces 
such as TouchOSC, grab a copy of osc-clj and happy hacking!

https://github.com/overtone/osc-clj/

Sam

---
http://sam.aaron.name

-- 
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: osc-clj 0.5.0 - Open Sound Control for Clojure

2011-08-16 Thread Sam Aaron
Hey Nick,

On 16 Aug 2011, at 13:57, cassiel wrote:

 
 Is this reachable via Lein/Maven?

Absolutely. The 0.5.0 release is on Clojars, so you just need to add:

[overtone/osc-clj 0.5.0]

to your project dependencies in project.clj for cake/lein.

To get started with the lib, first up, check out the README on github: 
https://github.com/overtone/osc-clj and then take a peek through the fns in the 
'public' osc ns: https://github.com/overtone/osc-clj/blob/master/src/osc.clj

Let me know if I can be of any further assistance. It's important to me that 
the library should be easy to get started with - so I'd like to hear about any 
places where this isn't the case - i.e. dodgy documentation/unexpected 
behaviour etc.

Sam

---
http://sam.aaron.name

-- 
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] Lacij v.0.4.0

2011-08-12 Thread Sam Aaron
Great stuff. I need something like this to visually render the internal design 
of synths in Overtone.

Keep up the great work,

Sam

---
http://sam.aaron.name

On 11 Aug 2011, at 14:02, Pierre Allix wrote:

 Hello,
 
 I'm pleased to announce the release of the version 0.4.0 of the Lacij
 graph visualization library.
 
 The release includes a new automatic layout called hierarchical
 layout. It is similar to a tree layout or family tree but works on any
 type of graph (tree or not). An example of this layout can be seen
 here http://minus.com/ll9M1g it is a PNG exported from the generated
 SVG. The release also extends the API and fixes a couple of bugs.
 
 The library is available on GitHub:
 https://github.com/pallix/lacij
 
 and Clojars:
 http://clojars.org/lacij
 
 
 Please get in touch if you want to help the Lacij project and
 implement additional layouts algorithms.
 
 From the README:
 Lacij is a graph visualization library written in Clojure. It allows
 the display and the dynamic modification of graphs as SVG documents
 that can be viewed with a Web browser or with a Swing component. Undo/
 redo is supported for the dynamic modification. Automatic layout is
 provided for the visualization.
 
 -- 
 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


at-at

2011-08-10 Thread Sam Aaron
Hi,

I just wanted to announce the arrival of the newly-born at-at library - freshly 
extracted from Overtone:

https://github.com/overtone/at-at

at-at is an ahead-of-time function scheduler which essentially provides a 
friendly wrapper around Java's ScheduledThreadPoolExecutor.

Enjoy!

Sam

---
http://sam.aaron.name

-- 
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: Optimized Pattern Matching Library for Clojure

2011-08-09 Thread Sam Aaron
Exciting stuff!

Do you happen to have any simple descriptions/examples of where and how we 
might use this stuff in our daily programming repertoires? I for one am sure 
I'm not educated enough as to the value and utility of pattern matching - at 
the moment I just think that looks cool rather than I'm definitely going to 
use that to do X and Y.

Sam

---
http://sam.aaron.name

On 9 Aug 2011, at 06:49, David Nolen wrote:

 Ambrose and I have been working on a high performance pattern matching 
 library for Clojure. There's much left to do but it's already in a place 
 where it's fun to play around with and we think some of you might even find 
 it useful even in this early form.
 
 Some highlights:
 
 * Literal patterns
 * Seq patterns with rest support
 * Map patterns, can constrain keys with only
 * Bindings can be introduced anywhere a wildcard might appear
 * No type constraints on columns
 * Lazy pattern matching semantics a la Haskell
 
 This library implements Maranget's fascinating description for compiling 
 pattern matching into good decision trees. Suffice to say, this library is 
 pretty darn fast. 
 
 We look forward to hearing your feedback. For code, more documentation, and 
 where we are heading you can look here:
 
 https://github.com/swannodette/match
 
 David
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 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: Optimized Pattern Matching Library for Clojure

2011-08-09 Thread Sam Aaron
Wonderful. Baishampayan and Ambrose thanks so much for your fantastically lucid 
examples.

I can totally see myself using this stuff. David and Ambrose, it's remarkable 
work - well done!

Sam

---
http://sam.aaron.name

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


Overtone 0.2 released

2011-08-04 Thread Sam Aaron
Hi there,

I just wanted to announce the release of Overtone 0.2. There's been a 
considerable amount of work behind this and we're rapidly moving towards having 
a super stable and robust musical platform that really pushes at the boundaries 
of what's possible with sound synthesis today.

The official announcement (including changelog) is here: 
https://groups.google.com/d/topic/overtone/ixWp6dzXmQA/discussion

And the source for this release can be found here: 
https://github.com/overtone/overtone/tree/0.2.1

Sam

---
http://sam.aaron.name

-- 
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: dynamically generated let bindings

2011-07-30 Thread Sam Aaron
Hi Ken,
On 29 Jul 2011, at 22:02, Ken Wesson wrote:

 P.S. Thanks everyone for your help so far. My brain is overheating but I am 
 learning a lot.
 
 You're welcome.
 
 To do what you're proposing you will probably need the emitted
 function to look like:
 
 (fn [ args]
  (let [foo (some logic goes here)
bar (some logic goes here)
...]
(body goes here)))
 
 where the first logic checks the args for containing the value for
 foo, if it does evaluates to that value, and if not evaluates to foo's
 default; the second does likewise for bar; and so on.

I just finished implementing a solution and it looks exactly like this. You're 
absolutely right - this is precisely the pattern I was looking for.

What I didn't do, and I think the biggest lesson I've learned from these early 
macro-fighting days, is to do exactly what you propose: sketch out what the 
macro should expand to *before* working on the macro itself.

Thanks everyone once again,

Sam

---
http://sam.aaron.name

-- 
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: dynamically generated let bindings

2011-07-29 Thread Sam Aaron

On 29 Jul 2011, at 07:22, Ken Wesson wrote:

 On Fri, Jul 29, 2011 at 12:49 AM, Jeff Rose ros...@gmail.com wrote:
 I don't think it's very typical to pass a form to a function, unless
 you plan on using eval at runtime.
 
 Or it's a function called by a macro to do some processing of forms.

Yep, this is precisely what I was considering. I should have explicitly made 
mk-dynamically-bound-fn a macro in my example - a miscommunication on my part.


On 29 Jul 2011, at 02:12, Alan Malloy wrote:

 
 It's not clear how much of this is relevant to your actual problem, vs
 the simple version you're posting here. 

Sorry, I was just trying to simplify things to try and get directly to the meat 
of the problem. 

 If you want something more general, that implicitly binds things for
 you based on some code somewhere else (ew ew ew), then you need a
 macro. This implementation is pretty gross; I suspect it could be
 better, but you're trying to do something that seems weird to me.
 
 (defn binding-vec []
  ['size '(count args)])
 
 (defmacro magic-fn
  [ forms]
  `(fn [ ~'args]
 (let ~(binding-vec)
   ~@forms)))
 
 
 user ((magic-fn (+ size 10)) 1 2)
 12

Very cool, although it's not quite what I'd like. I'd like binding-vec to be a 
function of the resulting magic-fn's args. 

I'm aiming for something like this, but can't get it to quite work:

(defn binding-vec [foos]
  '[size (count ~foos)])

(defmacro magic-fn
 [ forms]
 `(fn [ ~'args]
(let ~(binding-vec ~'args)
  ~@forms)))

((magic-fn (+ size 10)) 1 2) ;= BOOM

Sam

---
http://sam.aaron.name

-- 
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: dynamically generated let bindings

2011-07-29 Thread Sam Aaron

On 29 Jul 2011, at 00:46, Kent wrote:

 I'm not sure what you're trying to do with this and, based on that
 ignorance, I'm not sure I think it's a great idea. Maybe you are being
 a bit crazy, and maybe your a genius.  Who am I to say?
 
 Here is a function that does what you want.  The only difference is
 that my function also takes the binding-vec function as an argument.
 
 
 (defn mdbf [form binding-func]
  (fn [ args]
(eval `(let ~(binding-func args) ~form
 
 Here it is used in your example.
 
 (defn binding-vec
  [args]
   ['size (count args)]
 
 (def a (mdbf '(+ size 10) binding-vec))
 
 (a 1 2 3 4) = 14


Very nice, thanks for this. However, using eval feels a bit too scary even for 
a crazy guy like myself!

Perhaps I need to take a different angle to solving my problem…

Sam

---
http://sam.aaron.name

-- 
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: dynamically generated let bindings

2011-07-29 Thread Sam Aaron
Hi Alan,

On 29 Jul 2011, at 10:05, Alan Malloy wrote:
 
 Sorry, I was just trying to simplify things to try and get directly to the 
 meat of the problem.
 
 No apologies needed - reducing to a simple case is great. But here,
 the simplification was probably too severe.
 

Sorry, I'm English - apologies are just part of normal discourse ;-)

 
 (defn binding-vec [foos]
  ['size `(count ~foos)])
 
 (defmacro magic-fn
  [ forms]
  (let [args (gensym 'args)]
`(fn [ ~args]
   (let ~(binding-vec args)
 ~@forms
 
 ((magic-fn (+ size 10)) 1 2) ;= 12
 


Fantastic! I believe this is exactly what I'm looking for. Thank-you so much.

Out of interest, are you able to briefly describe (or able to direct me at some 
relevant literature that does) why your original solution used ~'args and why 
this version uses (gensym 'args). These subtle macro compile-time/runtime 
syntax tricks are something I'm clearly yet to master.

Sam

---
http://sam.aaron.name

-- 
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: dynamically generated let bindings

2011-07-29 Thread Sam Aaron
Hi there,

On 29 Jul 2011, at 10:05, Alan Malloy wrote:
 
 (defn binding-vec [foos]
  ['size `(count ~foos)])
 
 (defmacro magic-fn
  [ forms]
  (let [args (gensym 'args)]
`(fn [ ~args]
   (let ~(binding-vec args)
 ~@forms
 
 ((magic-fn (+ size 10)) 1 2) ;= 12

Actually, sadly, this still quite doesn't do what I want - and definitely 
highlights the perils of over-simplifying the question!

I'd like binding-vec to generate the binding vector entirely from foos, i.e. 
both the binding name and value. Imagine that there's a var names:

(def names ['size 'foo 'bar 'baz])

To continue in the context of the (over-simplified) question, I'd like 
binding-vec to dynamically generate me a vec of:

['size `(count ~foos)
 'foo  `(count ~foos)
 'bar  `(count ~foos)
 'baz  `(count ~foos)]

However, something like the following doesn't work:

(defn binding-vec [foos]
  `(vec (interleave ~names ~(take (count names) (repeat '`(count ~foos))

A, because the above code is probably incorrect (I just cobbled it together for 
the example) and more importantly:
B, because the code doesn't return a vec, it returns code that returns a vec. 

I really seem to be getting my brain in a knot over this. :-( Any illumination 
would be really appreciated


Sam

---
http://sam.aaron.name

-- 
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: dynamically generated let bindings

2011-07-29 Thread Sam Aaron

On 29 Jul 2011, at 12:11, Ken Wesson wrote:
 
 Why not just (vec (interleave names (take (count names) (repeat
 `(count ~foos)?
 

That seems to blow up:


(defn binding-vec [foos]
  (vec (interleave names (take (count names) (repeat `(count ~foos))

(defmacro magic-fn
 [ forms]
 (let [args (gensym 'args)]
   `(fn [ ~args]
  (let ~(binding-vec args)
~@forms

((magic-fn (+ size 10)) 1 2) ;= 12


 Of course I assume you eventually want something more complex than
 just (count foos) as the value for every variable, or why have more
 than one variable?

Yes, of course :-)

The actual end goal is to be able to define a macro (or whatever) passing in a 
body containing symbols which are yet to be defined. The macro will then return 
me function which has variable arity. When I call this function I'd like the 
values of the args be bound to a specified list of symbols (which happen to be 
the arg names) so that the original body can execute correctly. The interesting 
part is that I'd like to be able to specify defaults interleaved with the arg 
names. 

For example:

(def yo (with-arg-params [foo 0 bar 1 baz 2]
(+ foo bar baz)

a would now be bound to a fn which I could call:

(yo 1 2 3) ;= 6

I could also call it with fewer args than expected:

(yo 1 2) ;= 5

this works because bad has a default of 2.

There's a bunch of other neat tricks I can do here which would probably only 
serve to complicate this example, but this is the general gist of things.

I assume for this to work I have to dynamically create a let binding over the 
original form, so the first call would execute code like:

(let [foo 1 bar 2 baz 3] (+ foo bar baz))

and the second example would execute code like:

(let [foo 1 bar 2 baz 2] (+ foo bar baz)

this would therefore mean that this let statement's vec needs to be a function 
of the args passed to yo and the initial set of defaults.  Unfortunately I'm 
currently unable to figure out how to achieve this.

Sam

---
http://sam.aaron.name



-- 
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: dynamically generated let bindings

2011-07-29 Thread Sam Aaron

On 29 Jul 2011, at 12:56, Ken Wesson wrote:
 
 
 That seems to blow up
 
 How so?

(defn binding-vec [foos]
 (vec (interleave names (take (count names) (repeat `(count ~foos))

(defmacro magic-fn
[ forms]
(let [args (gensym 'args)]
  `(fn [ ~args]
 (let ~(binding-vec args)
   ~@forms

((magic-fn (+ size 10)) 1 2) ;= Unable to resolve symbol: size in this context

 
 (defmacro with-arg-params [bindings  body]
  (let [bindings (apply array-map bindings)]
`(fn
  ~@(for [i (range (inc (count bindings)))]
  `(~(vec (take i (keys bindings)))
 (let ~(vec (mapcat identity (drop i bindings)))
   ~@body))
 
 = (def x (with-arg-params [foo 1 bar 2 baz 3] (+ foo bar baz)))
 #'user/x
 = (x 4 5 6)
 15
 = (x 4 5)
 12
 = (x 4)
 9
 = (x)
 6

Ah, very neat :-)

However... (apologies, there always seems to be a however from me in this 
thread!)

This totally satisfies the general gist part of my description but doesn't 
allow for the bunch of other neat tricks I can do here part. The behaviour of 
with-arg-params needs to match the behaviour of other functions in my system 
for consistency. The other tricks are keyword args and even a combination of 
keyword args and normal args. I have the majority of code to implement all this 
behaviour - I can generate the correct vector of bindings given a list of 
supplied args and some defaults. However, it's the ability to dynamically 
create a let binding within a function for which the bindings themselves are a 
function of the actual function's args (and some constant(s)) which is evading 
me.

This seems the closest I can get to a solution:

(defn binding-vec [foos]
 (fn-which-returns-a-vec-of-alternating-symbols-and-vals foos)

(defmacro magic-fn
[ forms]
(let [args (gensym 'args)]
  `(fn [ ~args]
 (let ~(binding-vec args)
   ~@forms

((magic-fn (+ size 10)) 1 2)

I just don't have the magic skills to get it to actually work :-(

Sam

P.S. Thanks everyone for your help so far. My brain is overheating but I am 
learning a lot.

---
http://sam.aaron.name

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


dynamically generated let bindings

2011-07-28 Thread Sam Aaron
Hi there,

I'm trying to create a fn which does the following:

* returns a fn which takes an arbitrary number of args
* calls a helper fn, passing the incoming args returning a vector of 
alternating symbols and vals
* creates a let form using the vector of alternating symbols and vals returned 
by the helper fn as the bindings
* contains some inner form that makes use of the bindings

i.e. is it possible to implement something that allows the following to work:

(defn binding-vec 
  [args]
  ['size (count args)])

(defn mk-dynamically-bound-fn
  [form]
  ;; returns a fn with sign [ args] which
  ;; uses binding-vec to create a the vec for
  ;; which a let statement binds around form
  )

(def a (mk-dynamically-bound-fn '(+ size 10)))

(a 1 2 3 4) ;= 14 (the number of args + 10)


Please let me know if I'm being a bit crazy with the question. It's totally 
possible that I'm barking up the wrong tree with this line of enquiry.

Sam

---
http://sam.aaron.name

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


  1   2   >