I recently ran into this problem again.
The solution I came up with is:
(defn filter-printable [obj]
(cond
(or (symbol? obj) (number? obj) (string? obj) (keyword? obj)) obj
(vector? obj) (apply vector (map filter-printable obj))
(seq? obj) (map filter-printable obj)
(set? obj)
Shouldn't that be:
(defn filter-printable [obj]
(cond
(or (symbol? obj) (number? obj) (string? obj) (keyword? obj)) obj
(vector? obj) (apply vector (map filter-printable obj))
(seq? obj) (map filter-printable obj)
(set? obj) (into #{} (map filter-printable obj))
(map? obj) (into
## Context:
I'm doing some communication across cljs/clj with core.async
## Problem:
I want a certain function called whenever:
(a) the first time the channel is closed
(b) when the channel is gc-ed (if not previously closed)
(a) is rather easy: I define my own channel, wrapped
Hi folks, sorry I'm a bit late to the party, but Chord might be a good base for
what you want to do? It probably falls a bit short at the moment on your
disconnection semantics, but could be worth a shot.
https://github.com/james-henderson/chord
James
--
--
You received this message
(b) is easy if you're willing to drop down to Java, or use gen-class. You
can define a finalize method.
On the other hand, you might also want to look into WeakReference and
ReferenceQueue, which can be used from Clojure with interop. You can
discover when objects become eligible for GC with
Hi Mimmo
Thank you for this tutorial - I managed to follow along and experience the same
live coding with emacs/cider - really nice to see how all the components work
together and drive the browser from the browser-repl in emacs.
Kind regards
Rudi
On 26/01/2014, at 2:34 AM, Mimmo Cosenza
Thanks Rudy!
There is still room for improvements. At the moment I was not able make it to
run with :none optimisation which is amazingly fast, while :whitespace an all
the others are slow. But with an nrepl compliant editor/IDE you could enjoy the
live coding stuff by David without running
I added a better sample with a UINavigationController and a small uikit
framework(very very alpha).
https://github.com/galdolber/clojure-objc-sample/blob/master/src/clojure_objc_sample/core.clj
Feedback and improvements on the uikit framework are very much welcome.
On Sat, Jan 25, 2014 at
Awesome. Thanks Gal.
Can't wait to check it 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
Hi,
I have a config file that contains a Clojure map. If I slurp that file it
obviously returns a string.
Is it possible to return that read file as a map (its original data
structure) and not a string?
Thanks
Paul
--
--
You received this message because you are subscribed to the Google
Hello, all,
I have just started using core.async, and I was curious as to why
particular sequence functions where chosen to be implemented. For
example, there is take, but no take-while or drop. Is this a deliberate
design decision?
Thanks for the great library!
Sincerely,
Daniel
--
--
Hi,
I am requiring clojure.java.io as such
(ns sample-project.core
(:require [clojure.java.io :as io]))
However, the first expression creates a file object
(clojure.java.io/file test)
#File test
The second expression explodes with java.lang.RuntimeException: No such
namespace: io
(io/file
Hi Josh
Do you know of a tutorial or sample project that shows you how to do that and
what to watch out for?
Julio
On Jan 24, 2014, at 11:14 PM, Joshua Ballanco jball...@gmail.com wrote:
I just wanted to point out that if you’re looking to write small background
processes that are more
If you are sure that the file doesn't contain malicious code you can use:
(read-string (slurp file))
On Sunday, January 26, 2014 11:24:30 AM UTC-2, Paul Smith wrote:
Hi,
I have a config file that contains a Clojure map. If I slurp that file it
obviously returns a string.
Is it possible
Hi wuqi...@gmail.com,
You can just open the file. I got some blank pages when for some reason I
wasn't able to reach fb.me. Check your Network tab in the developer tools.
On Sunday, January 26, 2014 6:12:52 AM UTC-2, wuqi...@gmail.com wrote:
On Saturday, January 25, 2014 8:16:15 AM UTC+8,
And if you are not sure about that, just use edn-only reader:
(require '[clojure.tools.reader.edn :as edn])
(edn/read-string (slurp file))
Dňa nedeľa, 26. januára 2014 17:12:32 UTC+1 mynomoto napísal(-a):
If you are sure that the file doesn't contain malicious code you can use:
(read-string
Mailer [1] is a small Clojure library that makes email delivery
easy. It is inspired by Ruby's Action Mailer and combines Postal,
Moustache template rendering and testing utilities.
Release notes:
http://blog.clojurewerkz.org/blog/2014/01/26/mailer-1-dot-0-0-is-released/
1.
scrypt [1] is a tiny Clojure library for the scrypt key derivation function.
Release notes:
http://blog.clojurewerkz.org/blog/2014/01/26/scrypt-1-dot-1-0-is-released/
1. https://github.com/clojurewerkz/scrypt
--
MK
http://github.com/michaelklishin
http://twitter.com/michaelklishin
--
--
You
Hi Gal.
Just tried your code and got the following... Any ideas on what may be
failing?
*Clojure_objc_sampleuikit__init*
*2014-01-26 12:47:20.733 hithere[1646:70b] *** Terminating app due to
uncaught exception 'Type not found', reason:
'{CGRect={CGPoint=dd}{CGSize=dd}}'*
First throw
I got an error as posted in my 1:01 PM post below. I've uploaded my source
in case it helps. Basically it's your github sample code.
On Sunday, January 26, 2014 8:15:17 AM UTC-5, Gal Dolber wrote:
I added a better sample with a UINavigationController and a small uikit
framework(very very
I don’t have much practical experience with CLJS+Node myself, but the intro on
the ClojureScript wiki has been helpful with the couple experiments I’ve tried:
https://github.com/clojure/clojurescript/wiki/Quick-Start . Really, though, it
comes down to the fact that ClojureScript compiles down
I spent some time yesterday with node webkit and clojurescript. There's not
really much to it.
There's a :target :nodejs that you can hand off to leiningen, but I don't
really know what it's for (and no one else seems to either). Make sure that
when you inspect the resultant javascript source
Your code works fine for me in the REPL. Can you provide a bit more detail
about exactly how you are trying to execute your code?
Sean
On Jan 26, 2014, at 6:15 AM, Paul Smith paulaaronsmit...@gmail.com wrote:
I am requiring clojure.java.io as such
(ns sample-project.core
(:require
2014-01-25 Stuart Sierra the.stuart.sie...@gmail.com
Leiningen dependency:
[com.stuartsierra/frequencies 0.1.0-SNAPSHOT]
Please do a proper release. Non-snapshot projects cannot
depend on snapshot libraries:
https://github.com/technomancy/leiningen/wiki/Repeatability#snapshot-versions
--
You could clone and deploy it yourself into clojars. The only caveat is to give
it an org.clojars.youusername as group-id to make it clear it's not the
official one.
HIH
mimmo
On Jan 26, 2014, at 10:05 PM, Michael Klishin michael.s.klis...@gmail.com
wrote:
2014-01-25 Stuart Sierra
On Sun, Jan 26, 2014 at 10:10 PM, Mimmo Cosenza mimmo.cose...@gmail.com wrote:
You could clone and deploy it yourself into clojars. The only caveat is to
give it an org.clojars.youusername as group-id to make it clear it's not
the official one.
Please don't deploy a project to the public
That's a bug in the objc interop, the type detection is incomplete.
https://github.com/galdolber/clojure-objc/blob/master/src/jvm/clojure/lang/Selector.java?source=c#L87
The error you get is happening on arm64(iphone 5s or simulator 64bits), it
should work on i386, armv7 and armv7s.
On Sun,
2014-01-27 Mimmo Cosenza mimmo.cose...@gmail.com
You could clone and deploy it yourself into clojars. The only caveat is to
give it an org.clojars.youusername as group-id to make it clear it's not
the official one.
Sorry, that's just won't fly. It's library maintainer's responsibility to
sure, but it depends on who is going to use your project too. if it's only you,
lein install is ok.
On Jan 26, 2014, at 10:17 PM, Moritz Ulrich mor...@tarn-vedra.de wrote:
On Sun, Jan 26, 2014 at 10:10 PM, Mimmo Cosenza mimmo.cose...@gmail.com
wrote:
You could clone and deploy it yourself
Actually looks like Stuart ended up doing a non-SNAPSHOT release of
0.1.0 after the announcement based on the github README.
On Sun, Jan 26, 2014 at 1:19 PM, Michael Klishin
michael.s.klis...@gmail.com wrote:
2014-01-27 Mimmo Cosenza mimmo.cose...@gmail.com
You could clone and deploy it
I can't speak for the core.async implementers, of course, but I've been
working on a similar library for Javascript, and had to realised that not
all sequence operations make sense, or are even possible in the context of
channels.
The one you mentioned, take-while, is a good example. Once
I tried updating org alone, but I evidently caused a mishmash of old and
new elisp file versions that didn't work. So I built Emacs from the trunk
branch (emacs-version 24.3.50.1), and blended Org from the master branch to
get Cider. According to package-list-packages, I am using cider
This is so awesome. Thanks for writing this!
Here's my naive stab at integration with (the :iris dataset available in)
Incanter...
(:require [incanter.core :as i]
[incanter.datasets :as id]
[com.stuartsierra.frequencies :as freq])
(def d
From http://lambda-the-ultimate.org/node/4876:
Matt Pharr, Greg Humphreys, and Pat Hanrahan have recently been given an
Academy Award for Technical Achievement, for the book Physically Based
Rendering. This is the first time the award has been given to a book and
(more relevant to LtU) the first
That was a mistaken copy and paste.
The release is [com.stuartsierra/frequencies 0.1.0] and is available on
Clojars.
-S
On Sunday, January 26, 2014 4:05:24 PM UTC-5, Michael Klishin wrote:
2014-01-25 Stuart Sierra the.stua...@gmail.com javascript:
Leiningen dependency:
Hi Marcus,
Thanks for the offer of help. There's no mailing list yet. But I'll
certainly set that up, if need be.
Were you able to clone and start the system? The first thing I want to do
is make it easy to setup. So let me know what else you could use, in
addition to what's in the
I reimplemented the interop and its fully functional now.
Just download the last binary from https://github.com/galdolber/clojure-objc
On Sun, Jan 26, 2014 at 6:17 PM, Gal Dolber g...@dolber.com wrote:
That's a bug in the objc interop, the type detection is incomplete.
Glad to hear it. I recommend taking a look at the new section Higher Order
Components
http://github.com/swannodette/om/wiki/Tutorial#wiki-higher-order-components,
we're finally getting to the good stuff IMO :)
David
On Sun, Jan 26, 2014 at 9:59 PM, Jamie Orchard-Hays jamie...@gmail.comwrote:
Thank you for this David. It's really amazing.
On Monday, January 27, 2014 1:19:03 AM UTC-2, David Nolen wrote:
Glad to hear it. I recommend taking a look at the new section Higher Order
Components
http://github.com/swannodette/om/wiki/Tutorial#wiki-higher-order-components,
we're finally
Thanks for reporting. This was introduced in 0.5.4, and I've pushed a fixed
release as 0.5.6.
On Saturday, January 25, 2014 7:50:19 PM UTC-6, Jean Niklas L'orange wrote:
On Saturday, January 25, 2014 10:03:13 PM UTC+1, Michael Daines wrote:
I decided to play with simple-check for the first
ANyone have some examples reading a blob column from an oracle db.
We have a database with a blob column.
A entity can be split acroos multiple rows.
If there are multiple rows we need to read anc concatenate the rows into a
single buffer
There may be multiple rows that we need to read to
I use line-seq, split, and destructuring to parse large CSVs.
Here's how I'd approach what I think you're trying to do:
(with-open [rdr (io/reader (io/resource csv :encoding UTF-16))]
(let [extract-url-hash (fn [line]
(let [[_ _ _ url _] (str/split
42 matches
Mail list logo