This one was last updated for clojure 1.3, so it may be a trifle
bit-rotted, but it demonstrates using a custom widget as part of a
gui:
https://github.com/martindemello/xw-clj
martin
On Thu, Oct 17, 2013 at 6:31 AM, Jonathon McKitrick
wrote:
> I'd be interested in seeing some client-side apps
Nice! I'd been vaguely thinking of redoing my nrepl client but I don't
really use clojure these days. Glad to see you're a fan of ocaml too
:)
martin
On Tue, Oct 8, 2013 at 7:49 PM, Phil Hagelberg wrote:
> When we've polled Leiningen users in the past[1], the #1 pain point
> people always report
It is often convenient to have an nrepl client in a non-jvm language -
so far I've written one in ocaml and Meikel Brandmeyer has one in
factor, that I know of. I'd like to get some ideas for a way to test
client compliance in a language agnostic manner - this will be
especially helpful when nrepl.
coming to nREPL
> shortly, outlined here so far:
>
> https://github.com/clojure/tools.nrepl/wiki/nREPL.Next
>
> Being a client implementor, your feedback in this endeavor is most welcome.
> Such discussions should probably head over to the clojure-dev list.
>
> Thanks,
&g
I'm helping develop a native nrepl client for jark, which mostly works
for jark, but doesn't adhere fully to the spec (e.g. multiple value
fields are not handled properly, status doesn't distinguish between
various types of error). I'd like to get it into full compliance so
that it can be useful fo
What's the cleanest way to run a piece of code if any branch of a cond
statement succeeded, without relying on the return value of the
individual clauses not to be nil?
For example, if I have the following piece of code that says I can
only move left or up
(cond
(= dir :left) (move-left)
(= d
On Sat, Mar 26, 2011 at 10:54 PM, ultranewb wrote:
>
> I guess the optimum solution I see for myself at this point is getting
> Clojure Box to talk to ClojureW (i.e. editing a source file with
> Clojure Box, then "running" that source inside some Emacs window by
> running clj). I'm guessing this
On Thu, Mar 17, 2011 at 8:35 PM, James Reeves wrote:
> On 17 March 2011 12:05, Lee Spector wrote:
>> FWIW the feature I describe (syntax-aware auto-indenting) is common in the
>> Lisp world, not only in emacs but also (to name just a few that are fresh in
>> my memory) in MCL, DrScheme and Lisp
On Mon, Mar 14, 2011 at 5:23 PM, Andreas Kostler
wrote:
> Something along those lines. The key would be to have low publication latency
> e.g. articles undergo a initial review in a matter of hours so it
> still has the blog vibe to it but undergo stricter quality control.
The Monad Reader [http
On Sat, Sep 4, 2010 at 11:23 PM, Abhishek Reddy wrote:
> More generally, the fragmented state of support -- too many separate and
> underused mailing lists, IRC channels, websites, each for small, composable
> components.
This is an endemic problem, though, not one confined to clojure. I've
seen
On Mon, Aug 16, 2010 at 3:37 PM, Nicolas Oury wrote:
> On Mon, Aug 16, 2010 at 10:51 AM, Martin DeMello
> wrote:
>> Sometimes there's simply no way around it. For instance, I recently
>> had some python code that (stripped to its simplest form) had two
>> classes, D
On Sun, Aug 15, 2010 at 8:13 PM, Brian Hurt wrote:
>
> Circular dependencies between modules is a major code smell. Code where
> everything depends upon everything, or even close to that, is
> unmaintainable.
Sometimes there's simply no way around it. For instance, I recently
had some python cod
On Fri, Aug 6, 2010 at 12:31 AM, Tim Daly wrote:
>
> Measure your OODA loop in all the languages you know.
> See which one cycles fastest. I'd bet that's your favorite language.
Excellent observation! Definitely explains why, for all its lack of
performance and minor quirks, ruby is still my favo
On Sat, Jul 31, 2010 at 5:41 AM, Gregg Williams wrote:
>
> I've begun work on a visual front-end to display such infocards, using
> Clojure and the Piccolo graphics library (http://piccolo2d.org/). If
> you (or anybody else reading this) find this larger project
> interesting, please contact me by
- Mark
>
> On Jul 14, 6:16 am, Martin DeMello wrote:
>> On Wed, Jul 14, 2010 at 6:45 PM, Martin DeMello
>> wrote:
>> > What are people using to build mixed clojure/java code? Currently just
>> > using lein {uber,}jar to build and distribute.
>>
&
On Wed, Jul 14, 2010 at 6:49 PM, Moritz Ulrich
wrote:
> There is lein-javac which integrates javac into the leiningen
> build-flow: http://github.com/antoniogarrote/lein-javac
Excellent, thanks :)
martin
--
You received this message because you are subscribed to the Google
Groups "Clojure" gro
On Wed, Jul 14, 2010 at 6:45 PM, Martin DeMello wrote:
> What are people using to build mixed clojure/java code? Currently just
> using lein {uber,}jar to build and distribute.
Hit send too soon - I meant to say, currently my project is just
clojure, and lein works very nicely to package
What are people using to build mixed clojure/java code? Currently just
using lein {uber,}jar to build and distribute.
martin
--
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
On Sat, Jul 10, 2010 at 2:56 PM, Mike Meyer
wrote:
>>As another suggestion how about clj.handle.library e.g
>>clj.mired.proclog
>>clj.weavejester.compojure
>>clj.acme-corp.dynamite
>
> Why should I prefer clj.mired, shared with gods knows who over org.mired,
> shared with nobody?
You wouldn't; s
On Sat, Jul 10, 2010 at 12:06 PM, Saul Hazledine wrote:
>
> As another suggestion how about clj.handle.library e.g
> clj.mired.proclog
> clj.weavejester.compojure
> clj.acme-corp.dynamite
+1
martin
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To
On Thu, Jul 1, 2010 at 7:19 PM, Nicolas Oury wrote:
>
> Random advices for speed or simplicity:
> 1. don't split the string but loop on the index of the string in the code
> that insert it in the trie
That's a nice idea. Will give it a go.
> 2. Use transients for the nodes of your tries
Never u
On Thu, Jul 1, 2010 at 6:42 PM, Martin DeMello wrote:
>
> I haven't benchmarked yet, but it's called frequently enough that it's
> probably worth making it efficient. (This is in code that converts a
> dictionary to a trie)
Actually, it just struck me that the main r
On Thu, Jul 1, 2010 at 6:06 PM, Laurent PETIT wrote:
> 2010/7/1 Martin DeMello :
>> Anything more efficient than (map str (seq string)) ?
>
> I cannot think of another hof-like version that may be more efficient.
>
> If you want to avoid at all cost the creation of inte
On Thu, Jul 1, 2010 at 6:11 PM, Chouser wrote:
> (next (.split #"(?=)" string))
>
> But why do you one-char strings instead of just a seq of chars?
Good question :) I was working with code that wanted one character
strings, but since I'm trying to squeeze cycles anyway, it might be
more worthwhil
Anything more efficient than (map str (seq string)) ?
martin
--
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
f
On Mon, Jun 28, 2010 at 11:56 PM, cageface wrote:
>
> However, as I also said in the thread, I think the *real* obstacles
> for a noobie are the concepts in the language itself. Clojure is very
> elegantly designed, but it builds on some very powerful and somewhat
> difficult concepts. Stuart's bo
On Fri, Jun 25, 2010 at 8:20 AM, Mark Engelberg
wrote:
> When exactly did people start expecting Clojure to be as fast as Java
> and/or Scala?
>
> I seem to recall in one of the original Clojure videos, Rich talked
> about the relationship between Clojure and Java. There's a long
> history of C p
On Thu, Jun 24, 2010 at 7:32 PM, Meikel Brandmeyer wrote:
> Hi,
>
> On Jun 24, 3:53 pm, Martin DeMello wrote:
> Both work for me. What's the error you get?
Looks like my mistake, I tried it now and it works. No idea what I did
wrong the last time (I got the N
This works:
(. JOptionPane showMessageDialog frame "Hello World")
This does not:
(. JOptionPane showMessageDialog frame "Hello World" "Title"
JOptionPane/PLAIN_MESSAGE)
Even though JOptionPane.showMessage supports both signatures. How do I
call the second one from clojure?
martin
--
You
On Wed, Jun 9, 2010 at 8:05 PM, Peter Thatcher wrote:
> Just recently, I had a little hobby project to make PDFs for printing
> little vocabulary books for kids. I used Clojure to output Latex,
> which then produced the PDFs. I might do a blog post about it to
> give you more details.
>
> Cloj
On Fri, May 28, 2010 at 7:29 PM, mmwaikar wrote:
>> QT Jambi
>> Pros: native widgets, huge widget selection, highly-regarded framework
>> Cons: requires platform-specific libs, writing custom widgets is
>> hairy, momentum and support seem to be lagging since Nokia dropped
>> official support.
I w
On Mon, Mar 22, 2010 at 6:05 PM, Andrzej wrote:
> On Mon, Mar 22, 2010 at 8:59 PM, Martin DeMello
> wrote:
>> A bit off topic, but I'm hoping someone here will know - is there a
>> vector canvas available for the jvm? I mean something like tk's
>> canvas, wher
A bit off topic, but I'm hoping someone here will know - is there a
vector canvas available for the jvm? I mean something like tk's
canvas, where you can draw vector objects that retain their own
identity, and can independently respond to mouse clicks.
martin
--
You received this message because
01 PM, Luc Préfontaine
wrote:
> Is my first impression right or wrong ?
>
> Is Clojure harder to setup from Windows for beginners ?
>
> Would an installer (.msi) help by hiding Java related details and providing
> some basic scripts to run it ?
>
> Luc P.
>
> On Mon
On Mon, Mar 22, 2010 at 2:19 PM, Joel Westerberg
wrote:
>
> Every time I've started up with a clojure project I've had to spend a few
> hours fiddling with the environment, not that I don't do that with other
> languages, but it would be nice with an officially sanctioned solution for
> setting up
C-Foam
martin
On Wed, Mar 17, 2010 at 12:38 PM, mac wrote:
> After just a little more test and polish I plan on calling clj-native
> 1.0. But clj-native is a *really* boring name so I want to change it
> before 1.0 and I don't have very good imagination when it comes to
> these things.
> So I ne
On Fri, Mar 5, 2010 at 12:34 PM, Meikel Brandmeyer wrote:
> Hi,
>
> On Mar 5, 7:47 am, Martin DeMello wrote:
>
>> One huge drawback I've found with clojure (which it doubtless
>> inherited from Java) is that you need an actual jarfile in your
>> classpath, no
On Thu, Mar 4, 2010 at 7:03 PM, Jan Rychter wrote:
>
> As a more general observation, I think that a large part of Perl's and
> Python's success was a unified way of dealing with libraries. There
> are certain directories where you can drop libraries and expect them to
> work (be found). There is
On Tue, Dec 22, 2009 at 4:18 PM, Gabi wrote:
> I need a simple command-line tool to indent Clojure source files.
> Any recommendation ?
If all else fails, vim has a batch mode.
$ echo "=G:wq" >> indent-script
$ vim -s indent-script
right now it asks me to hit enter when it's done indenting; no
plt scheme seconded. great language, great libraries, great community,
great documentation, and under active development.
martin
On Mon, Dec 21, 2009 at 2:13 AM, Mark Engelberg
wrote:
> http://plt-scheme.org/
> Use the textbook htdp.org and you will develop a very deep
> understanding of how to
A good comment from reddit:
http://www.reddit.com/r/programming/comments/aeixf/funding_clojure/c0h6uij
martin
--
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 memb
On Tue, Dec 15, 2009 at 6:40 AM, Mark P wrote:
>> This strikes me as a potentially disastrous idea; look at how much
>> mindshare going the proprietary route has cost Rebol, for instance.
>
> I don't know anything about Rebol except for some quick
> googling that I've just done on them. But the i
On Tue, Dec 15, 2009 at 6:00 AM, Mark P wrote:
>
> This approach seems to me to be a good compromise between
> open source and proprietary funding. It provides all the benefits of
> open source over time, yet provides a tangible reason for paying
> licence fees beyond just goodwill. It also mean
On Tue, Dec 1, 2009 at 4:09 AM, samppi wrote:
> The title says it all. Is there a nice, concise, Clojurey way to
> convert a vector [a b c d] into [[[a b] c] d]? It's fine if the
> vectors are sequences instead. I can't think of a way without a loop,
> but I suspect there's a much shorter way.
us
On Thu, Nov 26, 2009 at 12:31 AM, Jonathan Smith
wrote:
>
> I think a better way to do this is to not use a regex at all.
> Canonically I think this sort of thing is (would be?) implemented by
> constructing a 'sequence' of strings, (first filtered based on
> potential word length) and recursively
t;
> Try changing your "fast" version to:
>
> (def update-wlist #(let [w (doall (take 26 (words-with (current-
> word]
> (. words setListData wlistdata)))
>
> My guess is it's not going to be fast anymore.
>
>
> On Nov 25, 8:35
I'm writing a crossword editor that provides a list of suggestions to
fill in the current word. This is displayed in a listbox to the right
of the grid, and every time the cursor is moved, I update it via
(def update-wlist #(let [w (take 26 (words-with (current-word)))]
(. wor
On Mon, Nov 23, 2009 at 2:40 AM, John Harrop wrote:
> Is there an explanation of monads out there that doesn't require the reader
> to know Haskell to understand it? One that's generic to any FP-capable
> language?
Most of them use the concrete syntax of *some* language. But this is a
good non-ha
On Thu, Nov 19, 2009 at 10:52 AM, Phil Hagelberg wrote:
>
> I must confess I don't understand the "avoid the command-line" mindset
> at all, so I need a little extra explanation.
It's a matter of context switching. If I'm working in an IDE, I want
to compile the code without having to open a new
On May 4, 5:58 pm, Rich Hickey wrote:
> After a sustained period of API stability and minimal bugs reports,
> I'm happy to announce the release of Clojure 1.0!
>
> http://clojure.googlecode.com/files/clojure_1.0.0.zip
Congratulations!
martin
--~--~-~--~~~---~--~~
On Mar 2, 3:36 pm, Christophe Grand wrote:
>
> You can access the latest exception through the var *e.
> eg (.printStackTrace *e) will print the whole stack trace.
>
> Worth looking is also clojure.contrib.stacktrace that tries to make Java
> stack traces more readable.
Thanks, that looks very h
Playing with readFileToByteArray in the repl:
user=> (import '(org.apache.commons.io FileUtils))
nil
user=> (def dawg (FileUtils/readFileToByteArray "words.dawg"))
java.lang.ClassCastException (NO_SOURCE_FILE:10)
user=> (FileUtils/readFileToByteArray "words.dawg")
java.lang.ClassCastException:
On Feb 27, 8:02 am, Stuart Sierra wrote:
> On Feb 26, 3:04 pm, Martin DeMello wrote:
>
> > Is there a quick way to read a file into a java array of bytes?
>
> You want Apache Commons IO:http://commons.apache.org/io/
>
> Specifically,http://tinyurl.com/cytspt
Ah,
On Feb 27, 8:01 am, Chouser wrote:
>
> Seriously, what's with this API? I give up.
Yeah, I spent an hour or so sifting through nio before throwing up my
hands :) Also, (getBytes (slurp file)) sounded like it would work, but
it does charset encoding.
martin
--~--~-~--~~~
Is there a quick way to read a file into a java array of bytes?
martin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe fro
On Feb 17, 1:24 am, chris wrote:
> I believe you can create very good looking applications with swing,
> builder or otherwise as many people have done so (not that it is
> easy). I do believe a builder is a giant step forward but only if you
> have a design team that you would like to separate f
On Feb 16, 9:33 pm, levand wrote:
> I agree, Jambi is a better all-round product... but why the Swing
> hate? It's fine for what it is. Most of it's drawbacks (horrible L&F,
> poor performance) are things of the past, now.
If nothing else, the fonts aren't antialiased (at least on my linux
box),
On Dec 14, 6:06 am, Dan Larkin wrote:
> Yes, I'd like the feature because it's a pain in the neck to go
> through and escape strings when I know there's a better way.
For escaping strings, I prefer ruby's solution, which is to have
reader support for arbitrary delimiters, either matched pairs
On Dec 3, 11:59 pm, "Vijay Lakshminarayanan" <[EMAIL PROTECTED]>
wrote:
>
> This is far from complete and should be expanded but I got this from a
> few hours of hacking:
Good stuff, thanks!
martin
--~--~-~--~~~---~--~~
You received this message because you are su
On Dec 2, 9:22 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> For those of us that don't do Ruby - what does === do?
It's a supporting method for the case keyword
case object
when pred1: action1
when pred2: action2
..
end
translates to
if pred1 === object
action1
elsif pred2 === object
act
On Nov 28, 12:03 am, "Paul Drummond" <[EMAIL PROTECTED]> wrote:
> Hi Martin,
>
> Well, this is the sort of feature provided by IDEs rather than editors as
> you say, so it's not a "clojure" specific issue. It's whether your chosen
> IDE supports the feature you require.
No, I'd be perfectly happ
I've done a bit of Java programming, and one of the reasons I use an
IDE (netbeans) rather than plain vim is that I can write code without
having to bother about where every class I use comes from, then click
'fix imports' and have netbeans statically examine the code and add
import statements. I'
On Oct 28, 6:35 am, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> My thoughts are that there should only be fcase
PLT Scheme's pattern matching library might be a good source of
inspiration:
http://download.plt-scheme.org/doc/352/html/mzlib/mzlib-Z-H-31.html#node_chap_31
martin
--~--~-~--
On Oct 21, 5:41 am, mb <[EMAIL PROTECTED]> wrote:
>
> It allows the full support of doto via the dot notation of
> methods. And it supports on the other hand other functions
> not only methods. One example is the new miglayout
> interface in clojure-contrib.
Thanks! That's going to be really usef
On Oct 20, 10:43 am, Stuart Halloway <[EMAIL PROTECTED]>
wrote:
> Hi Steve,
>
> Thanks! I like quicksort-4. It all fixes a problem that bugged me in
> all the other examples, which is that "bigger" is a lie. The real
> semantic is "not smaller", which quicksort-4 captures perfectly.
>
> I will
On Oct 16, 5:13 pm, Timothy Pratley <[EMAIL PROTECTED]> wrote:
> Maybe something along these lines?
>
> (defn myreplace [str [a b]]
> (.replace str a b))
> (myreplace target search-replace)
> -> "heo world"
Same problem - it doesn't work within a doto block. This is where
JRuby-style reopening
On Oct 17, 2:27 am, "Rastislav Kassak" <[EMAIL PROTECTED]> wrote:
> Hello Clojurians,
>
> I think after 1st year of Clojure life it's good to check how far has
> Clojure spread all over the world.
>
> So wherever are you come from, be proud and say it.
India
martin
--~--~-~--~~--
On Oct 16, 1:45 pm, Stuart Halloway <[EMAIL PROTECTED]> wrote:
> Just to add to the confusion: I want compact to remove nil and
> false. :-)
They'll revoke your ruby license :)
irb(main):031:0> [1,2,3,4,false,nil,5,6].compact
=> [1, 2, 3, 4, false, 5, 6]
martin
--~--~-~--~~---
On Oct 15, 8:07 pm, Michel Salim <[EMAIL PROTECTED]> wrote:
>
> Ah, so to clarify, you need some way to say
>
> (. "hello" (replace \l \m))
>
> but if \l and \m are given in a list, rather than as two separate
> things? Sounds like you might need to write a function to do that.
Yes, apply works i
Is there any sort of "splat" operator that expands a list into an
inline sequence of arguments? Failing that, is there any way to use
apply within a doto block?
e..g
(def search-replace '("ll" "")
(def target "hello world")
(doto target
;(apply replace search-replace) <-- that, except somethi
On Oct 15, 5:49 pm, Martin DeMello <[EMAIL PROTECTED]> wrote:
> Is there any sort of "splat" operator that expands a list into an
> inline sequence of arguments? Failing that, is there any way to use
> apply within a doto block?
>
> e..g
>
> (def search-re
On Oct 13, 12:37 pm, JumpingJupiter <[EMAIL PROTECTED]>
wrote:
> pretty verbose even for simply windows. Some parts could be shortened
> with some extra macro - menu's in particular, but I'm starting to
> think UI code is going to look pretty ugly unless you drastically
> limit the options for cus
On Oct 10, 9:08 pm, "Michael Beauregard" <[EMAIL PROTECTED]>
wrote:
> I still don't really see why a multi-threaded UI framework is
> important. You can have a multiple threads use Swing's
> invokeLater(Runnable r) api to submit UI work. And since Clojure fns
> implement Runnable, you can just pos
On Oct 9, 12:29 pm, "Mark H." <[EMAIL PROTECTED]> wrote:
> a mapping. However, if you find yourself doing this a lot, you might
> want to think about a more Clojure-like idiom that doesn't require
> destructive updates and minimizes consing for local changes (e.g., a
> quadtree).
Interesting ide
On Oct 8, 8:06 am, "Mark H." <[EMAIL PROTECTED]> wrote:
>
> If you don't like vector-of-vectors or maps, you could write some
> syntactic sugar for mapping two-dimensional indexing onto a one-
> dimensionally-indexed vector, e.g., for an n x n array with Fortran-
> style indexing:
>
> (i, j) -> i
How do you make a two-dimensional array of a given size? (e.g. (make-
array '(i j)) in common lisp)
I want to do stuff like, e.g., representing a chessboard, where I can
index into cells and update them.
martin
--~--~-~--~~~---~--~~
You received this message beca
76 matches
Mail list logo