Which ci environment? I'm a little surprised, as those I've used will let
you run arbitrary command lines. I've run leiningen from Jenkins, Bamboo,
and ThoughtWorks Go, all with no problems...
On 17 Sep 2014 21:22, Adam Markham adamjmark...@gmail.com wrote:
Unfortunately using Leiningen in this
Agreed - there are always tradeoffs. Another common example is that pretty
well any language that uses IEEE floating point is also breaking
referential transparency in the interest of pragmatism:
user= (= 0.3 (+ 0.1 0.2))
false
user= (= (bigdec 0.3) (+ (bigdec 0.1) (bigdec 0.2)))
true
-
or a map
in this case,
what you initially have is optimal.
On Fri, Feb 7, 2014 at 6:33 AM, Korny Sietsma ko...@sietsma.com
wrote:
I tend to agree, I think. I certainly can't think of a syntax that
would
make me happy. It just feels like a bit of a smell that I keep using
Wagner jozef.wag...@gmail.com wrote:
I agree with Colin, the cognitive load is greater than benefits of such
approach. BTW you can use comp to chain consecutive map transformation
functions. (map (comp pacify wrangle) things)
JW
On Thu, Feb 6, 2014 at 3:40 PM, Korny Sietsma ko...@sietsma.com
I've been doing something very similar, but using IntelliJ + Cursive
Clojure - run Midje autotest inside the IDE for running tests, and also for
manually evaluating snippets of code.
plug Cursive gives me a lot of what I had from Emacs - paredit editing,
tight repl integration (alt-enter mapped
Hi folks,
I seem to regularly find myself writing - threaded code that follows
similar patterns:
(- things
(map wrangle)
(map pacify)
(filter effable)
(map #(aggravate % :bees :sharks))
(reduce mapinate {})
i.e. all stages of the code actually operate on a collection rather
My 2c - on my last project it would have been handy to have some test
coverage tools, they can be useful to sanity check your testing.
However, it's worth noting that compared to a java project, we had far
fewer lines of code, so manually reviewing code for tests was a lot easier.
And there were
Parsing is easy - use either https://github.com/clojure/data.json or
https://github.com/dakrone/cheshire (Cheshire used to have some advantages
over data.json but I have the impression data.json has caught up).
For validation I've used Prismatic Schema -
https://github.com/prismatic/schema - it's
Hi - I've been playing with this and I'm a little confused.
I can understand how you use the library to pass around stateful
components, and to start/stop them and wire them up etc.
But I'm not sure I see how it should be used for more general dependency
injection.
I'll pick a concrete example
with a local in-memory version.
-S
On Sun, Jan 5, 2014 at 1:23 PM, Korny Sietsma ko...@sietsma.com wrote:
Hi - I've been playing with this and I'm a little confused.
I can understand how you use the library to pass around stateful
components, and to start/stop them and wire them up etc.
But I'm
This ties in nicely to my summary of how I feel about static typing: Static
typing is a premature optimisation. Like most optimisations, it has
genuine value, but if you apply it globally and too early, you end up
causing more pain than you gain.
sometime type discussions lead to lead to early
We had to tell Cheshire to always use bigdecimals - and I think there was
something else, can't remember. Not all that advanced, really.
On 4 Dec 2013 16:17, Brian Craft craft.br...@gmail.com wrote:
On Tuesday, December 3, 2013 8:48:34 PM UTC-8, Korny wrote:
* Compojure for routing, and
My 2c on this :
We are doing similar things at my current client - with less pain. I
suspect you've been unlucky in your choice of libraries, and maybe
expecting more than you get in clojure's ecosystem - ruby, python etc have
been around a lot longer, and with a lot more focus on database use.
Whereas the Joy of Clojure makes me think of a certain '70s book with
interesting illustrations, that I used to stealthily read in the back
shelves of the local library as a teen.
The Joy of Clojure is an awesome book. Though part of me wishes it had at
least one '70s style line drawing of Rich
any sufficiently poorly worded argument is indistinguishable from
trolling.
Is that original? I want to quote it. A lot.
- Korny
On 14 Nov 2013 01:42, Paul L. Snyder p...@pataprogramming.com wrote:
On Wed, 13 Nov 2013, Phillip Lord wrote:
Paul L. Snyder p...@pataprogramming.com writes:
Note you can do the same thing in midje :
https://github.com/marick/Midje/wiki/Auto test - it works quite nicely.
On 20 Oct 2013 21:04, Waldemar waldemar.sch...@googlemail.com wrote:
I noticed that some struggle finding a good TDD workflow, in
Clojurehttps://plus.google.com/s/%23Clojure,
with
Hi - is anyone maintaining any of these ldap libraries?
I ask because:
- neither has updates in 2 years
- the underlying umboundid library now supplies a
bindAndRevertAuthentication function that implements what was discussed
previously in this thread - you can bind without mutating the existing
Nice - this would have been handy this morning for clojure cup hacking!
(Though core.async support would have made it even better)
- Korny
On 28 September 2013 20:24, Jonas jonas.enl...@gmail.com wrote:
Hi
I’m working on a ClojureScript playground application (
http://cljsfiddle.net)
So, the background - there is a page about fuller xml support at
http://dev.clojure.org/display/DXML/Fuller+XML+support -
Currently none of the xml parsing options support this - the best I've
found is https://github.com/grammati/eksemel but it hasn't been touched in
2 years, and the last commit
You know you're a lisp programmer when you feel conflicted about balancing
parentheses around emoticons. (like this :)) (or like this :)
- Korny
On 13 Sep 2013 12:35, Cedric Greevey cgree...@gmail.com wrote:
On Thu, Sep 12, 2013 at 2:47 PM, Mimmo Cosenza mimmo.cose...@gmail.comwrote:
Hi All,
It'd be great if this got fixed - we met an ugly bug yesterday due to this
on our project.
(Our system validates that the sum of two monetary fields A and B equals
the sum of two monetary fields C and D. We parse the fields via Cheshire
with conversion to bigdecimal turned on - but any fields
I think it depends on what is important to you.
For me, the syntax is core to the language because it encourages a certain
mindset. The default for everything is (verb noun noun noun...) - this is
the kingdom of verbs, and functions are how you build things.
If you added an infix syntax, or some
Agree that :use should be deprecated, mostly as it's quite a barrier to
folks new to the language that you need to know 3 different parts of the ns
macro before you start.
However objectively bad is strong language indeed. :refer :all is vital
anywhere you want a DSL - if using something like
* jump-to-symbol-definition
- see my post on ST2 in the is intellij idea a good idea thread dated
July 25th.
I checked that post and couldn't see anything about jump to symbol - I'm
mobile though so may have missed something. Can ST2 or 3 do this?
- Korny
On 28 Jul 2013 04:45, Greg
Indeed - I was using a community-edition intellij setup the other day, and
only realised when I went to edit some JavaScript, and found some features
missing (like code indenting).
We use intellij (mostly) in our team at work, and I use emacs (mostly) at
home.
My current take on this endless
Nedelcu m...@alexn.org wrote:
On Sun, Jun 16, 2013 at 4:40 AM, Korny Sietsma ko...@sietsma.com wrote:
How are all the Linux users handling Java installation? Using an official
Oracle installer, or your package manager somehow, or something else? Or
using (gasp) openJDK?
I'm on Ubuntu and I
How are all the Linux users handling Java installation? Using an official
Oracle installer, or your package manager somehow, or something else? Or
using (gasp) openJDK?
I use Windows (client mandated) at work and OSX on my laptop. We use
Vagrant to run virtual Linux (Centos) boxen at work, with
We used drift for a while, but found it didn't add much over plain sql, and
was forcing us to write down migrations, which imho are a mistake.
We ended up moving to Flyway, a very straightforward Java migration
library, with a thin clojure wrapper. This has the advantages of using
plain sql
We're building a few clojure projects at IOOF (a large Australian
superannuation firm) - the biggest is a transformation and routing system
for communicating with other superannuation companies, written in clojure
for the back end, and angular.js for the UI.
(It's technically in production but
That looks very helpful, thanks. I've been bitten by this hard in the past
- I wanted to play with a few different Processing jars in Quil, none of
which had Maven versions; and even using lein-localrepo, it was excessively
complex to add these jars to my local maven repo just so I could play
My 2c - I use emacs, I love it. I don't inflict it on my team, and I
strongly disagree with it being easy. To learn the basics, yes, but full
fluency? If you have someone fluent in IntelliJ, with the major keystrokes
in their muscle memory, and an instinctive familiarity with all the gui
The trouble is, so much depends on the problem space. For example, my team
is building a real world clojure application - mostly data transformation
and routing - but in the real world the actual speed of clojure execution
is fairly insignificant compared to I/O.
You could extract just the data
wrote:
I feel silly for even suggesting but is pprint not good enough? do you
need colors? (unaware of what those do in emacs)
On Sat, May 18, 2013 at 6:42 AM, Korny Sietsma ko...@sietsma.com wrote:
Hi folks - I had to prepare some slides for a conference, and I struggled
to get nice looking
Hi folks - I had to prepare some slides for a conference, and I struggled
to get nice looking clojure code onto a slide. I eventually arrived at the
following, but it's awfully clunky:
* write code in emacs
* turn off rainbow delimiters as html-fontify doesn't like them
* M-x load-theme
Thanks - I'd missed that, looked at the Java method but not the Clojure
type signature :)
- Korny
On 13 May 2013 16:24, Meikel Brandmeyer (kotarak) m...@kotka.de wrote:
Hi,
Am Montag, 13. Mai 2013 02:25:03 UTC+2 schrieb Korny:
If I call (add-identity agent {:private-key-path foo
Hi folks - I met some strange behaviour today using the clj-ssh library -
but it looks like it might not be the library's fault as such.
If I call (add-identity agent {:private-key-path foo :passphrase bar})
the clj-ssh library (eventually) calls a java method:
(.addIdentity agent foo bar)
This
I would generally handle this sort of encapsulation at the namespace level.
Put (create-woobly) and (add-job) and all the other woobly-related
functions into a woobly namespace. Also add any functions that access info
from a woobly bag-o-state, or mutate a woobly to make a woobly-with-extras.
It's interesting to note that clojure.java.jdbc used to use our first
option - they had a dynamically bound var *db* that you assigned using the
(with-connection) macro.
As of version 0.0.3 this has been deprecated in favour of something like
your second option - now you pass an explicit db
Hi folks,
we have some code that needs to _not_ be lazy - the rough code we have is:
(defn parse-and-store [raw-data]
(try
(let [records (split-records raw-data)
results (map parse-record records)]
(do
(save-audit-data! raw-data)
(map (save-result!
...@mihaljov.info wrote:
On 04.05.2013 12:16, Korny Sietsma wrote:
What's the idiomatic way to avoid this? The options seem to be either
to use
(doall (map parse-record records))
or (mapv parse-record records)
Is either of these better? The latter is simpler, the former (to me
Sounds awesome.
For folks in (or near) Australia, we also have the Yow! Lambda Jam
conference in Brisbane in May:
http://www.yowconference.com.au/lambdajam/index.html
Not as stellar a lineup as the Chicago one, but should be a great
conference nonetheless.
- Korny
On 20 April 2013 16:21, Alex
I've been forgetting my car keys consistently for the last 20 years - but
now I'm in my mid 40s it's easy to blame it on ageing :-) I've been coding
for longer than I've been losing car keys, and I can't say I've noticed a
lot of decline.
As for the lack of grey beards at conferences (mentioned
I'd also love something to optimise the ns form - I'm regularly doing
tasks by hand that could in theory be automated; adding a new
not-yet-imported library can be quite tedious, it'd be great to be able to
type (defdb and be able to hit a key combo to add a new :require entry.
A generalised
PM, Korny Sietsma ko...@sietsma.com wrote:
I'd also love something to optimise the ns form - I'm regularly doing
tasks by hand that could in theory be automated; adding a new
not-yet-imported library can be quite tedious, it'd be great to be able to
type (defdb and be able to hit a key combo
As Jonathan Friberg says - lein.bat works fine.
As Windows seems to often go hand-in-hand with intrusive proxies, you might
also want to make sure you have environment variables HTTP_PROXY and
HTTPS_PROXY pointing to a working proxy, if necessary you can run your
own proxy using cntlm :
[reviving a slightly old thread]
Note that as of clojure 1.4 you can also do:
(:require foo.bar :refer :all)
in fact from comments I've seen elsewhere there is a general intention to
remove :use entirely?
It'd be good to have some clarity on this. The vast majority of code
samples use :use,
Isn't that always the way, though? Build your program in a powerful,
expressive language, then profile it, find the critical parts, and optimise
them - where possible in the same language, and where that's too
ugly/painful, drop down a layer to a lower level language.
I did lots of this in the
.
Korny Sietsma ko...@sietsma.com writes:
On 17 January 2013 17:26, Sean Corfield seancorfi...@gmail.com wrote:
Error: Symbol's function definition is void: make-local-hook
bump - anyone know a workaround for this - I was interested in
sr-speedbar,
especially for editing over an ssh
://www.emacswiki.org/emacs/sr-speedbar.el and installing it manually -
that seems to work fine (even without disabling make-local-hook). If/when
I find time to dig further, I'll try to work out what is going wrong for me
with the melpa install.
- Korny
On 2 February 2013 14:04, Korny Sietsma ko...@sietsma.com
On 17 January 2013 17:26, Sean Corfield seancorfi...@gmail.com wrote:
Error: Symbol's function definition is void: make-local-hook
bump - anyone know a workaround for this - I was interested in sr-speedbar,
especially for editing over an ssh session, but it doesn't seem to work
with emacs 24?
, at 23:15, Korny Sietsma wrote:
The flip side, of course, is that having documentation separate from
code often leads to the documentation becoming out of sync with thecode.
What happens when someone renames or moves some code, but doesn't also
move the docs? What happens if they change
The flip side, of course, is that having documentation separate from code
often leads to the documentation becoming out of sync with the code.
What happens when someone renames or moves some code, but doesn't also
move the docs? What happens if they change the implementation? Will people
I've been using projectile for project-level commands, and found it quite
good - it autodetects project root from things like .git directories, and
then gives you commands like open file in project, search in project
etc.
- Korny
--
Sent from my geek device... Spelling mistakes can be blamed on
You keep talking about performance. I'm a long way from being a clojure
expert, but one thing I *do* know is that premature optimization is the
root of many many evils.
May I suggest you first get your app working, in a clean understandable
fashion, ideally with some solid unit tests. Then, and
Yes emacs is very weird for newbies, but most clojurians use it.
I tend to think this is an unnecessary barrier for entry - yes, people
would be more productive in the long run using emacs, but it has it's own
big learning curve, and is definitely not necessary to get started in
clojure. It's
Just adding my +1 - as someone relatively new to clojure, leiningen is a
great way to get up and running, for a reasonably experienced developer.
(It's a big improvement on when I first tried clojure a couple of years
ago!)
There seem to be windows instructions at
is fundamentally any different or why there would be such a
large performance disparity. I must be missing something big.
On May 28, 2009, at 6:50 AM, Korny Sietsma wrote:
By the way, in response to whoever suggested pre-sorting files; I
sort-of do this (in the old ruby version) but actually
of get-quickhash and get-hash is delayed.
Eval
(nth (get-info a.txt) 1)
cause evaluation of get-quickhash,
but not get-hash.
2009/5/28 Timothy Pratley timothyprat...@gmail.com:
Sounds like a job for lazy-map to me!
http://kotka.de/projects/clojure/lazy-map.html
On May 28, 11:52 am, Korny
Cool stuff - I really should go to bed now, but I'll look at this
further in the morning.
By the way, in response to whoever suggested pre-sorting files; I
sort-of do this (in the old ruby version) but actually, mostly the
program is looking for duplicate *directories* of files - the goal is
to
Hi all,
I have some ruby code that I'm thinking of porting to clojure, but I'm
not sure how to translate this idiom to a functional world:
I have objects that are externally immutable, but have internal
mutable state they use for optimisation, specifically in this case to
defer un-needed
suppose you may use state-monads and trie.
But it will need a lot of lines of code, and too hard for me.
Regards,
-
Mikio Hokari
2009/5/28 Korny Sietsma ko...@sietsma.com:
Hi all,
I have some ruby code that I'm thinking of porting to clojure, but I'm
not sure how to translate
Hi - I noticed that while http://clojure.org/api#toc16 indicates:
*file*
The path of the file being evaluated, as a String.
Evaluates to nil when there is no file, eg. in the REPL.
It actually seems to evaluate to NO_SOURCE_FILE.
I'm trying to write a quick and dirty logger that logs to
Phillip Calçado (another Thoughtworker) has also done some playing with
this:
http://fragmental.tw/2009/04/08/clojure-on-google-app-engine/
- Korny
On Wed, Apr 8, 2009 at 3:10 PM, BerlinBrown berlin.br...@gmail.com wrote:
http://olabini.com/blog/tag/gae/
--
Kornelis Sietsma korny at my
to adapt it to multi-module clojure I would try that too. I think
Ties is probably closure to what I want though, if it were brought
up to date.
On Apr 2, 3:10 pm, Korny Sietsma ko...@sietsma.com wrote:
On Fri, Apr 3, 2009 at 4:39 AM, dysinger dysin...@gmail.com wrote:
The Java world
On Fri, Apr 3, 2009 at 4:39 AM, dysinger dysin...@gmail.com wrote:
The Java world for good or bad has rallied
around maven repos. There are 10s of thousands of libs up in there.
While there are lots of Java / Maven users, there are also a lot who *don't*
use it, and indeed many who actively
Hi - I'm struggling with what is probably a very basic STM problem... so
forgive me if I've missed something obvious.
I have a world that is a list of structures
The world itself will change occasionally - i.e. I'll add or remove
structures from the overall list, and I'll regularly be reading
sweet :)
- Korny
On Fri, Mar 27, 2009 at 4:34 AM, Victor Rodriguez vict...@gmail.com wrote:
On Tue, Mar 24, 2009 at 11:05 PM, Korny Sietsma ko...@sietsma.com wrote:
It'd be nice to have a macro that worked more like the first example -
spit is great for one-liners, but the fact
ooh - that's precisely why I was looking into duck-streams myself; thanks
for that!
Mind you, after a while in the Ruby world, I'd highly recommend looking at
YAML for config files - it's human readable and fairly easily writeable, and
lets you add arrays, nested structures, etc. fairly easily.
It'd be nice to have a macro that worked more like the first example -
spit is great for one-liners, but the fact that it opens and closes the
file each time you call it seems a bit painful for anything more complex.
Something that ends up working like:
(with-out-as test.txt
(println hello)
Hi folks - are there any frameworks out there for mocking?
Stubbing functions is pretty straightforward (and I see that fact comes with
a stubbing function built in), but I'd really like something that can do
mocking and mock expectations - something similar to stub, but with checking
that the
On Thu, Mar 12, 2009 at 11:26 AM, Jon Harrop j...@ffconsultancy.com wrote:
IME, the trouble can be well worth it. I once wasted two weeks trying to track
down bugs in a thousand lines of code using unit tests and never managed it.
When I finally caved in and tried to leverage the static type
I'm interested too - got some ruby stuff using rmagick I'd like to
rewrite - there's jmagick but it sounds like a pain to get it working
on osx, and there's a library that wraps imagemagick command-line, but
something native that supports:
- 48 bits-per-pixel images
- colour profiles
- digital
Agreed.
An interesting parallel is getting Java developers to use Javascript
well - sure, anyone can look at javascript code and probably work it
out - it's a much smaller jump to javascript syntax than clojure
syntax.
But even so, I know lots of Java coders who never really get
javascript stuff
Hi folks;
I have an intermittent problem that's driving me nuts.
I'm running the emacs-starter-kit setup for editing clojure, recently
updated from git, and when I first run M-x slime, I often get the
following messages:
user= user= java.lang.IllegalArgumentException: URI has an authority
Thanks - that seemed to fix it!
- Korny
On Wed, Mar 4, 2009 at 1:34 AM, Bradbev brad.beveri...@gmail.com wrote:
On Mar 3, 4:46 am, Korny Sietsma ko...@sietsma.com wrote:
Hi folks;
I have an intermittent problem that's driving me nuts.
I'm running the emacs-starter-kit setup for editing
Excellent - thanks for clarifying this!
- Korny
On Sun, Feb 8, 2009 at 12:27 AM, Rich Hickey richhic...@gmail.com wrote:
On Feb 7, 2009, at 3:43 AM, Korny Sietsma wrote:
Ah - I didn't realise that. I was trying to avoid the overhead, as I
understood it, of both converting the parameters
:14 pm, Korny Sietsma ko...@sietsma.com wrote:
Hi folks - I was trying the example posted below, and I discovered a
slight snag - unchecked-* methods don't exist for doubles or floats!
(and if you call (unchecked-multiply 1.2 3.4) you get No matching
method found... which caused some confusion
Fair enough - though my problem couldn't be fixed by caching, it could
be inlined without too much pain. I just wanted to check I hadn't
missed something - I'm still learning clojure bit by bit, and while
it's fabulously well documented for such a new language, it's still
easy to miss this sort
Hi folks,
Is there any way to make a function that takes primitive parameters?
It seems you can't, but I might be missing something.
I have the following code (a start to playing with mandelbrot sets):
(defn step [x0, y0, xn, yn]
(let [xm (+(-(* xn xn)(* yn yn)) x0)
ym (+(* 2 xn yn)
Hi folks;
Is there any way to get an updated dump of clojure.org as a pdf file?
I like to print out stuff and read it on the train, and the
clojure_manual.pdf available on the google groups site is a tad old,
good for an introduction, but I'd like to read the bleeding edge stuff
off-line.
-
I have had similar problems with enclojure. But having gone through
similar IDE pain working in Ruby on Rails, the Netbeans support ended
up being way ahead of most IDEs, so I have hopes that enclojure will
get there in time. (My biggest annoyance? The fact that you can't
open existing code as
On Fri, Jan 9, 2009 at 7:55 AM, Tom Ayerst tom.aye...@gmail.com wrote:
2009/1/8 Mark Volkmann r.mark.volkm...@gmail.com
On Thu, Jan 8, 2009 at 11:05 AM, Tom Ayerst tom.aye...@gmail.com wrote:
The point, for me, is that Mark Engelberg's construct allowed the system
to
work with no
As a complete clojure newbie (hi folks!) from a Ruby/Java background,
I kind-of don't like either - I'd pull out a named function like:
(def add-mix-and-beat [bowl, dry-ingredients wet-ingredients] ...
and then use your second example, but now it's:
(def make-cookies-2a [flower baking-soda salt
83 matches
Mail list logo