Hi
Interesting work as usual! One quick question: What is the difference between
(let [xs (om/observe owner (items))]
...)
as seen in the sub-view component versus the one in main-view which doesn't use
`om/observe`:
(let [xs (items)]
...)
/Jonas
On Saturday, October
On Fri, Jan 10, 2014 at 9:39 PM, Mark Engelberg wrote:
> Technically, all these solutions are flawed.
>
> With the input
> ["a" "a" "a_1"]
> you'll get back
> ["a" "a_1" "a_1"]
>
> To truly address this, you need to also add the newly formatted filename
> into the "seen" map, which none of the sug
On Thursday, February 7, 2013 7:11:35 PM UTC+2, David Nolen wrote:
> http://dev.clojure.org/jira/browse/CLJS-418
>
>
>
> Some of you may have encountered bizarre problems when trying to use browser
> REPL with the latest releases of ClojureScript. This ticket contains a patch
> that should res
On Sun, Jan 30, 2011 at 8:39 PM, Ken Wesson wrote:
> On Sun, Jan 30, 2011 at 1:35 PM, Jonas Enlund wrote:
>> On Sun, Jan 30, 2011 at 7:01 PM, Ken Wesson wrote:
>>> On Sun, Jan 30, 2011 at 9:26 AM, Jonas Enlund
>>> wrote:
>>>> Hi.
>>>> I'
On Sun, Jan 30, 2011 at 7:01 PM, Ken Wesson wrote:
> On Sun, Jan 30, 2011 at 9:26 AM, Jonas Enlund wrote:
>> Hi.
>> I'm trying to create a java.io.Writer proxy (which writes to a
>> JTextArea) but I can't get it to work.
>> Here is my cloj
Hi.
I'm trying to create a java.io.Writer proxy (which writes to a
JTextArea) but I can't get it to work.
Here is my clojure code so far:
(def text-area (javax.swing.JTextArea.))
(def frame
(let [f (javax.swing.JFrame.)]
(.. f getContentPane (add text-area))
(.setMinimumSize f
On Thu, Jun 10, 2010 at 1:01 AM, Daniel Werner
wrote:
> Jonas,
>
> Thanks for stepping forward and publishing your work. From the short
> glance I had at it already, your code seems very low-level (probably
> for performance), but sound. The only thing that, compared to other
> CSV libraries I've
On Wed, Jun 9, 2010 at 3:47 PM, Kyle R. Burton wrote:
>> When I say that it supports the RFC I mean that the library should be
>> able to read any file that follows that standard. It might (and it
>> does) read files that do not follow the standard. Here are some
>> examples:
>>
>> 1) quotes can a
t; not signal an error. I think I recognize the same behavior in cljcsv
> as well (though as I said I could not try it). It might be nice to at
> least have an option which allows an unterminated field to be
> recognized.
>
> Best Regards,
>
> Kyle
>
> [1] http://github.com/
I've added my work on the csv reader/writer library to github
(http://github.com/jonase/cljcsv). Please let me know If anyone finds
it useful.
Thanks,
Jonas
On Wed, May 26, 2010 at 6:40 AM, Jonas Enlund wrote:
> Hi there
>
> I built a simple csv parsing library[1] last weekend w
The function definition below fails with
"java.lang.IllegalArgumentException: Mismatched argument count to
recur, expected: 1 args, got: 2"
(defn countdown [& {:keys [from]
:or {from 10}}]
(println from)
(when (pos? from)
(recur :from (dec from
Is it not possible t
Hi there
I built a simple csv parsing library[1] last weekend which I want to
show you guys. It follows the RFC 4180[2] pretty closely but it allows
for any character as separator and quote mark. It would be great if
someone would take time and read the code. I would like to know:
a) Can performa
On Mon, Feb 15, 2010 at 7:25 AM, Аркадий Рост wrote:
> Hi!
> I was playing a bit with with-bindings* function, but I got error
> every time.
>
> I've tried:
>
> (def a 5)
>
> (with-bindings* {a 3} println a) ;; got java.lang.Integer cannot be
> cast to clojure.lang.Var
>
> (with-bindings* [{a 3}]
I think you simply need to get the syntax right. The following works
fine for me:
user=> (defprotocol p (foo [this]))
p
user=> (deftype a [f] p (foo []))
#'user/a
user=> (foo (a nil))
nil
user=> (deftype a [f] :as this p (foo [] [this]))
#'user/a
user=> (foo (a nil))
[#:a{:f nil}]
On Mon, Ja
Sorry, I think my reply got lost...
Inside deftype methods the symbol "Bar" is the name of the class. You
can use the constructor (Bar. (inc i)) instead. Again, note the "."
after Bar.
On Sat, Jan 2, 2010 at 1:23 PM, Konrad Hinsen
wrote:
> On 01.01.2010, at 23:56, Hugo Duncan wrote:
>
>>> I want
(note the .)
(deftype Bar
[i]
Foo
(foo [] (Bar. (inc i
/Jonas
--
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 patien
On Mon, Nov 16, 2009 at 6:27 PM, Stuart Sierra
wrote:
> On Nov 14, 8:28 am, Jonas Enlund wrote:
>> I have built a simple Matrix datatype with defprotocol and deftype.
>> You can take a look at it athttp://gist.github.com/234535
>> (constructive criticism welcome!).
>
Hi there!
I have built a simple Matrix datatype with defprotocol and deftype.
You can take a look at it at http://gist.github.com/234535
(constructive criticism welcome!). Some simple examples are provided
at the end of the file.
I have a few questions.
- Why must i write (matrix/Matrix ...) ins
Hi,
Thank's for pointing this out for me. I didn't realize how to use
these constructs correctly. Seeing the !-mark i just thought that
assoc! was to be used like set! set-car! set-cdr! in Scheme... my
mistake.
On Tue, Aug 4, 2009 at 8:49 PM, Jarkko Oranen wrote:
>
> On Aug 4, 11:08 am, Jonas w
On Tue, Aug 4, 2009 at 3:55 PM, Albert Cardona wrote:
>
> Jonas wrote:
>> Can you give any hints on how I can make the transient sort faster? I
>> would like to get as close as possible to the native Java speed.
>
>
> My guess is that you need primitive type hints. For example:
>
> (let [piv
I get ~8% performance boost by turning swap-index! into a macro:
(defmacro swap-index! [v i j]
`(let [tmp# (~v ~i)]
(assoc! ~v ~i (~v ~j))
(assoc! ~v ~j tmp#)))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Grou
> When you put the :while at the `x` clause you get the expected empty
> seq.
>
> user=> (for [x (range 1 10) :while (= x 2) y (range 1 10)] [x y])
> ()
Interesting, I didn't know that.
Still, the behavior of :while feels strange. I guess I'll get used to it.
In the following example :while and
2. http://gist.github.com/142939
On Wed, Jul 8, 2009 at 7:19 PM, Jonas Enlund wrote:
> 1. Ok, I'll consider that.
>
> 2. Yes, I'll post a link when I have uploaded the code somewhere.
>
> 3. It has not yet arrived
>
> 4. No. I have two sources of inspiration. Patte
1. Ok, I'll consider that.
2. Yes, I'll post a link when I have uploaded the code somewhere.
3. It has not yet arrived
4. No. I have two sources of inspiration. Pattern matching in PLT
Scheme and this link:
http://groups.csail.mit.edu/mac/users/gjs/6.945/psets/ps05/ps.txt
(which is almost SICP
24 matches
Mail list logo