Hi,
Thank you for all answers, as I did my homework (reading overview sent by
Jeff and applying Luca's suggestions), things have improved quite a bit.
Yet there are still some things I'm not fully grasping, so I have more
questions :)
First one is about object created by (om/build ...) - in
If you're using cider (https://github.com/clojure-emacs/cider), there's a
convenience function for controlling the value of *print-length*, including
giving it a default value for new nrepl instances:
https://github.com/clojure-emacs/cider#limiting-printed-output-in-the-repl
/Ragnar
On
Hi Kovas,
On Wed, Apr 2, 2014 at 3:26 AM, kovas boguta kovas.bog...@gmail.com wrote:
Looking through the source for parsley paredit.clj, I'm halfway
convinced that maybe its not so hard to port these to clojurescript.
Anyone have input in either direction?
We (Laurent and me) are planning
Andy mentioned files, but yes, in a pipe this is true. Still, it's not
true on the REPL; I can't think of an obvious use case there, and if
there is one then having the programmer work around something like
*interactive-print-length* would be reasonable.
Note that we are talking about an
kovas boguta kovas.bog...@gmail.com writes:
Chalk this up as another cautionary tale about global singletons.
It's dynamic, so it can be bound for a repl thread!
What we need is a parameterizable write-edn function, mirroring the
already extant read-edn. The function should guarantee it will
Maik Schünemann maikschuenem...@gmail.com writes:
There is real no sensible default value rather than the current.
I would say that there is no sensible default value *including* the
current. Certainly at REPL usage, the current value is probably the
least sensible.
My sensible default is
Hi,
I see there are a lot of functions strings, but nothing that allows me to
create a new string with a character replaced at a given index? Am I meant
to use subs and join to do this? It seems a bit long-winded? I wonder why
there isnt a helper function out of the box to do this (or is
There are many ways to do this, these 2 come to mind:
(doto (StringBuilder. abc) (.setCharAt 2 \d))
(apply str (assoc (vec abc) 2 d))
The former is probably a lot faster (uglier too)...
On Wednesday, April 2, 2014 12:10:48 PM UTC+2, Andy Smith wrote:
Hi,
I see there are a lot of
the first isnt pure clojure wo I would probably try to avoid this... e.g.
what if I want to port to clojureCLR?
The second 'looks' quite a roundabout way of simply manipulating a string?
How would the following compare for performance?
(defn replace-substring [s r start len] (str (subs s 0
about 1. if that's meant to be portable, yes, not the best indeed, but if
you look at c.c.string/* or even c.c/str, most of the functions use
stringbuilder I think.
about 2. probably slower than subs, these are just alternatives to what you
suggested
On Wednesday, April 2, 2014 1:06:40 PM
On Wed 2 Apr 2014 at 04:06:40AM -0700, Andy Smith wrote:
If there is nothing better then I wonder why there isn't something
like this in the clojure standard libraries (must be a good reason I
suppose)? Its a fairly standard function for a string library isnt it?
It would be a terrible
Hello everybody,
Given an enormous network of inter-referenced, mutable objects which have
to change in-place driven by events (= the OO system).
Which strategy would you recommend to plug into such a system with Clojure,
building an island of immutable functional programming saneness? How to
On Wed, Apr 2, 2014 at 3:42 AM, rlewczuk rafal.lewc...@gmail.com wrote:
First one is about object created by (om/build ...) - in all tutorials
these objects are always created on the fly in (render ...) functions. So
if some component disappears from view for some time, it loses its state.
Greetings,
The nuance below took a long time to identify and reduce from a test
failure. Should it be considered a bug?
$ lein repl
nREPL server started on port 52758 on host 127.0.0.1
REPL-y 0.3.0
Clojure 1.6.0
snipped
user= (defrecord Fields0 []) ; record with 0 fields
user.Fields0
I guess my point is that if the java function is so good, then why doesnt
the clojure library thinly wrap it, so that your code remains portable
clojure?
On Wednesday, 2 April 2014 12:50:00 UTC+1, guns wrote:
On Wed 2 Apr 2014 at 04:06:40AM -0700, Andy Smith wrote:
If there is nothing
I'd like to introduce stch.ns. What is stch.ns? In short, it's a
namespace utility for reloading modified files that's designed to be used
in a REPL. Now you may be thinking we already have tools.namespace, so
what's the big deal. Here are some differences:
1. Aliased namespaces are
Using subs (no need for join) is the way I would go, just define
(defn replace-at [s n c] (str (subs s 0 n) c (subs s (inc n
(replace-at hello 1 a) ;= hallo
and carry on.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to
BTW, I'm currently looking for work as a Clojure developer. If you like
what you see, please hit me up.
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
No. IMO this is not a common operation and should not be in core. If you
need do it a lot, you should not use java string in the first place.
What should be included in core is a transient string, with support for
assoc!.
Jozef
On Wed, Apr 2, 2014 at 7:49 PM, Andy Smith
Validateur [1] is a small validation library for Clojure and ClojureScript.
Release notes:
http://blog.clojurewerkz.org/blog/2014/04/02/validateur-2-dot-0-0-is-released/
1. http://clojurevalidations.info
--
MK
http://github.com/michaelklishin
http://twitter.com/michaelklishin
--
You received
Propertied [1] is a tiny library for working with property files
and java.util.Properties.
Release notes:
http://blog.clojurewerkz.org/blog/2014/04/02/propertied-1-dot-2-0-is-released/
1. https://github.com/michaelklishin/propertied
--
MK
http://github.com/michaelklishin
ClojureScript, the Clojure compiler that emits JavaScript source code.
README and source code: https://github.com/clojure/clojurescript
New release version: 0.0-2202
Leiningen dependency information:
[org.clojure/clojurescript 0.0-2202]
This release is similar to 0.0-2199, it just
Langohr [1] is a small, feature complete Clojure RabbitMQ client.
Release notes:
http://blog.clojurewerkz.org/blog/2014/04/02/langohr-2-dot-8-1-is-released/
1. http://clojurerabbitmq.info
--
MK
http://github.com/michaelklishin
http://twitter.com/michaelklishin
--
You received this message
Is there some like remove, but only removing the first item found?
Not exactly an incredibly hard problem, but with all this clojure
stuff about collections and sequences, I'm not quite sure what the
appropriate way is to implement it.
--
You received this message because you are subscribed to
I don't know of anything built-in, but this should do the trick:
(defn remove-first [f [head tail]]
(if (f head)
tail
(cons head (lazy-seq (remove-first f tail)
Timothy
On Wed, Apr 2, 2014 at 1:44 PM, Christopher Howard cmhowa...@alaska.eduwrote:
Is there some like remove,
Howdy there Clojuristaritorians!
For those of you that enjoy seeing applications of code in none-business
contexts, you might be excited to see Clojure being mentioned in Imperica - a
Digital Arts Culture Magazine:
http://www.imperica.com/en/in-conversation-with/meta-ex-the-music-of-code
On Wed, 2 Apr 2014 14:07:47 -0600
Timothy Baldridge tbaldri...@gmail.com wrote:
I don't know of anything built-in, but this should do the trick:
(defn remove-first [f [head tail]]
(if (f head)
tail
(cons head (lazy-seq (remove-first f tail)
Timothy
Thanks. This
lein-repack
Repack your project for deployment and distribution
https://github.com/zcaudate/lein-repack#motivationMotivation
lein-repack was written to solve a problem I had with utilities and general
purpose libraries. In my experience, clojure libraries are much better when
they are
On Wednesday, April 2, 2014 3:39:47 PM UTC-5, Christopher Howard wrote:
On Wed, 2 Apr 2014 14:07:47 -0600
Timothy Baldridge tbald...@gmail.com javascript: wrote:
I don't know of anything built-in, but this should do the trick:
(defn remove-first [f [head tail]]
(if (f head)
I hate REPLs. I also hate large compile times.
For me the hardest part of the ~5s compile time is not waiting, it's the
watching of the progress of the auto build and waiting until exactly that
moment
before pressing reload in the browser.
That being said, I find run this currently selected
Wouldn't just calling rest on your collection do what you want?
On Wed, Apr 2, 2014 at 1:07 PM, Timothy Baldridge tbaldri...@gmail.comwrote:
I don't know of anything built-in, but this should do the trick:
(defn remove-first [f [head tail]]
(if (f head)
tail
(cons head
On Wed, Apr 2, 2014 at 1:36 PM, Chris Lappe chris.la...@gmail.com wrote:
Wouldn't just calling rest on your collection do what you want?
(remove-first #(= % 3) [1 2 3 4 3 5]) should return [1 2 4 3 5].
--
Ben Wolfson
Human kind has used its intelligence to vary the flavour of drinks, which
On Apr 2, 2014, at 4:49 AM, Jakub Holy jakub.h...@iterate.no wrote:
The problem is that the stack trace contains no indication that it is
clj-ns-browser that is causing the problem. I would like to know if there are
any tricks to troubleshoot these problems other than binary search through
(remove pred coll)
removes all of the items in coll satisfying pred. rest just removes
the first element of coll, not the first satisfying pred.
Alan
On 2 April 2014 21:36, Chris Lappe chris.la...@gmail.com wrote:
Wouldn't just calling rest on your collection do what you want?
On Wed, Apr
Better is subjective, but you could use macrolet from
https://github.com/clojure/tools.macro .
On Wed, Apr 2, 2014 at 9:14 PM, Gal Dolber g...@dolber.com wrote:
Is there a better way to achieve this?
https://gist.github.com/galdolber/9946533
Thanks!
--
You received this message because
35 matches
Mail list logo