Re: spec error output in web context

2019-06-09 Thread 'Sven Richter' via Clojure
Am Sonntag, 9. Juni 2019 16:15:38 UTC+2 schrieb Alex Miller: > > > > On Sun, Jun 9, 2019 at 8:43 AM 'Sven Richter' via Clojure < > clo...@googlegroups.com > wrote: > >> >> I also tried to catch the exception and *(-> ex Throwable->map &g

Re: spec error output in web context

2019-06-09 Thread &#x27;Sven Richter' via Clojure
June 8, 2019 at 1:41:59 AM UTC-5, Sven Richter wrote: >> >> >> >> Am Freitag, 7. Juni 2019 15:35:41 UTC+2 schrieb Alex Miller: >>> >>> How do you start the web server? >>> >> I use component to startup immutant web, I also tried with http-kit

Re: spec error output in web context

2019-06-07 Thread &#x27;Sven Richter' via Clojure
Am Freitag, 7. Juni 2019 15:35:41 UTC+2 schrieb Alex Miller: > > How do you start the web server? > I use component to startup immutant web, I also tried with http-kit, but that didnt make a difference. Who is printing the error? > I think thats the key point here, right now I dont know as I ne

spec error output in web context

2019-06-07 Thread &#x27;Sven Richter' via Clojure
Hi, I just recently found out that the spec error reporting is different in different environments. I have the following functions: (defn search-page [{:keys [off-url off-user off-password]} search] (let [products (off/search-products search) products-with-nutriments (mapv #(off/add-n

Poll and opinions about Clojurescript UI / html templates

2018-04-08 Thread &#x27;Sven Richter' via Clojure
Hi, I am the author of closp (https://github.com/sveri/closp), a leiningen template for web development. As always over the years I am changing stuff while working on my private stuff and I wonder what the opinions about the UI is. Currently every template that comes with closp is server side

Re: spec - s/gen validation error

2016-05-30 Thread &#x27;Sven Richter' via Clojure
, Sven Am Montag, 30. Mai 2016 07:38:19 UTC+2 schrieb Sven Richter: > > Hi, > > So I looked at generating specs for tests and I hit an error I just dont > understand / neither can fix it. This is my code: > > (s/def ::column-types #{:int :varchar :bool

spec - s/gen validation error

2016-05-29 Thread &#x27;Sven Richter' via Clojure
Hi, So I looked at generating specs for tests and I hit an error I just dont understand / neither can fix it. This is my code: (s/def ::column-types #{:int :varchar :boolean :text :time :date :char :binary :smallint :bigint :decimal :float :double

Re: clojure spec fdef

2016-05-26 Thread &#x27;Sven Richter' via Clojure
On Thursday, May 26, 2016 at 7:08:44 AM UTC-5, Sven Richter wrote: >> >> Ah thanks, that worked, not quite as I expected. Up until this point it >> was pretty straightforward for me, thats been my fist bummer. >> >> Do you have an example for this in the guide? I did

Re: clojure spec fdef

2016-05-26 Thread &#x27;Sven Richter' via Clojure
an s/cat in ::columns, those will be combined into the same regex > so that's basically the same thing as ::columns. You need to force a new > level of regex context and the s/spec will do that. > > On Thursday, May 26, 2016 at 4:32:52 AM UTC-5, Sven Richter wrote: >> >>

clojure spec fdef

2016-05-26 Thread &#x27;Sven Richter' via Clojure
Hi, I already asked this in the spec channel on slack, but got no response yet. I have this simple spec definition: (s/def ::foo string?) ​ (s/def ::column (s/keys :req-un [::foo])) ​ (s/def ::columns (s/cat :col (s/* (s/spec ::column ;(s/def ::columns (s/cat :col (s/* ::column))) ​ (

Re: leiningen dependency management

2016-04-09 Thread &#x27;Sven Richter' via Clojure
should work. > 2. modify the dependency vector in B's profile.clj so that it's something > like [A "0.1.0" :exclusions [schema]]. See > https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L48 > for an example. > > I hope this helps you

leiningen dependency management

2016-04-08 Thread &#x27;Sven Richter' via Clojure
Hi, I have a library A that I use in project B. Now, library A makes use of plumatics schema, as well as project B. I wonder what the best practice is here. Include schema in library A's dependencies? Or only declare a dev-dependency on schema in library A? If I declare a dev-dependency I req

Re: Jolin / ragtime seeding a postgres database

2016-03-14 Thread &#x27;Sven Richter' via Clojure
#x27;Java') Then everything works as expected. Coming from mysql, H2 this is a bit suprising, I feel almost like 10 years ago when trying to fit CSS styles into different browsers. Sven. Am Montag, 14. März 2016 10:53:38 UTC+1 schrieb Sven Richter: > > Hi, > > I am using jopl

Re: Jolin / ragtime seeding a postgres database

2016-03-14 Thread &#x27;Sven Richter' via Clojure
f like > > CREATE TABLE ghost_channel (id UUID PRIMARY KEY DEFAULT > uuid_generate_v4(), name text > Which seems to generate keys for me. > > Maybe you could do something like that with your sequence as well? > > Erik. > > On 14. mar. 2016, at 10.53

Jolin / ragtime seeding a postgres database

2016-03-14 Thread &#x27;Sven Richter' via Clojure
Hi, I am using joplin (which depends on ragtime) migrate and seed my postgresql database. One of my migration files looks like this: CREATE TABLE tags ( id SERIAL PRIMARY KEY, name VARCHAR(150)) --;; INSERT INTO tags ("name", "id") VALUES ('Java', '1') Running a migration creates the table and

Re: [ANN] Graclj 0.1.0 -- New Gradle Plugin for Clojure

2016-02-16 Thread &#x27;Sven Richter' via Clojure
I wanted to thank you for stepping up on this. As gradle is getting more and more used in a lot of environments a working clojure plugin for gradle would be awesome. Best Regards, Sven Am Montag, 15. Februar 2016 03:11:00 UTC+1 schrieb Andrew Oberstar: > > I just released the first version of G

Re: [ClojureScript] Re: [ANN] modern-cljs - 17th tutorial - REPLing with Enlive

2015-12-26 Thread Sven Richter
e leaks) fixed in 1.8, so you might want > to give it a try using 1.8 Release Candidate. > > Cheers……..Yuri > > > *From: *'Sven Richter' via ClojureScript > *Sent: *Friday, December 25, 2015 1:08 PM > *To: *Clojure > *Cc: *clojur...@googlegroups.com >

Re: [ClojureScript] Re: [ANN] modern-cljs - 17th tutorial - REPLing with Enlive

2015-12-25 Thread Sven Richter
. Dezember 2015 18:02:28 UTC+1 schrieb Sean Corfield: > > Sven Richter wrote on Wednesday, December 23, 2015 at 11:33 PM: > > While I appreciate everyones work and also like boots approach to building > clojure libs I want to remind you that boot still does not work on windows. > > &

Re: [ANN] modern-cljs - 17th tutorial - REPLing with Enlive

2015-12-24 Thread Sven Richter
Also I just added a new doc issue: https://github.com/boot-clj/boot/issues/368 Am Donnerstag, 24. Dezember 2015 09:12:16 UTC+1 schrieb Sven Richter: > > Hi Mimmo, > > No problem, I was afraid that you are not aware of it. I guess a lot of > people are not. In fact there have been

Re: [ANN] modern-cljs - 17th tutorial - REPLing with Enlive

2015-12-24 Thread Sven Richter
ainers (e.g. docker). > > To me the OS is just a commodity, as it is the JVM too. I just don't care > about them until they create me a problem. > > Have great holidays! > > mimmo > > On Thursday, December 24, 2015 at 8:33:50 AM UTC+1, Sven Richter wrote: >

Re: [ANN] modern-cljs - 17th tutorial - REPLing with Enlive

2015-12-23 Thread Sven Richter
Hi, While I appreciate everyones work and also like boots approach to building clojure libs I want to remind you that boot still does not work on windows. Therefore you are excluding every windows user from your tutorial. I am not sure if I was into clojure as I am today if some of the tutorials

Re: Streamlining dev environment startup

2015-12-03 Thread Sven Richter
bility between Luminus and > Reloaded. I look forward to taking a closer look at your work! > > On Wednesday, December 2, 2015 at 1:49:20 AM UTC-7, Sven Richter wrote: >> >> Hi, >> >> I based a template on luminus myself and added some stuff. It also >> contai

Re: Streamlining dev environment startup

2015-12-02 Thread Sven Richter
Hi, I based a template on luminus myself and added some stuff. It also contains predefined components so you don't have to add it yourself. You can look how its done here: https://github.com/sveri/closp/tree/master/resources/leiningen/new/closp/clj/components Best Regards, Sven Am Dienstag, 1.

Re: [ANN] ring-transit-middleware 0.1.1

2015-10-31 Thread Sven Richter
Hi Atamert, Thanks for your work. I am curious. What is the difference to ring-transit (https://github.com/jalehman/ring-transit). Both libraries seem to have the same goal. Best Regards, Sven Am Samstag, 31. Oktober 2015 14:30:21 UTC+1 schrieb Atamert Ölçgen: > > Hi, > > I've just released ri

Re: Clojure Dev Environment

2015-10-07 Thread Sven Richter
Hi Erlis, Not considering myself a seasoned developer, still I stream from time to time on: https://www.livecoding.tv/sveri/ I am always happy to talk about things and explain everything to my best knowledge. Best Regards, Sven Am Dienstag, 6. Oktober 2015 16:18:00 UTC+2 schrieb Erlis Vidal:

Re: Clojure Dev Environment

2015-10-07 Thread Sven Richter
Hi Miguel, When I started clojure and web development I faced the same questions for some long time. Also it took me a lot to figure out how to have the best developer experience (regarding web stuff). All my findings boil down into this leiningen template: https://github.com/sveri/closp It de

Re: map over a Map with conditional conj

2015-08-25 Thread Sven Richter
estion_id q-id :user_id user-id :answer_id id-correct})) > )) > [] (range 1 11)) > > Take care, > Moe > > On Tue, Aug 25, 2015 at 9:42 AM, Sven Richter > wrote: > >> Hi, >> >> I find myself repeating a certain pattern from time to time. >> >&g

map over a Map with conditional conj

2015-08-25 Thread Sven Richter
Hi, I find myself repeating a certain pattern from time to time. I have a map like this: {:answer_correct_1 2 :answer_correct_3 4 :foo "bar"} There is a hidden index answer_correct_idx which might range from 1 to x. So, what I want is to "iterate" over the map and produce a vec of maps given s

Re: Code Review

2015-05-15 Thread Sven Richter
gt; > (defn lpad [n xs] (vec (concat (repeat (- n (count xs)) 0) xs))) > > So your main function would look something like: > > (defn process [xs] (let [n (count (first xs))] (vec (map (partial lpad > n) (transpose (filter wanted? (transpose xs))) > > On 15 May 2015 a

Code Review

2015-05-15 Thread Sven Richter
HI, I just posted a question to stackoverflows code review page:http://codereview.stackexchange.com/questions/90809/remove-lines-from-a-2d-vec-in-clojure As there is not much traffic regarding clojure I also double post to this list in the hope to get some good answers. You might respond here o

Re: Clojure needs a web framework with more momentum

2015-05-06 Thread Sven Richter
akes closp unique. > --Sven > > On Tuesday, May 5, 2015 at 1:27:21 AM UTC-4, Sven Richter wrote: >> >> Hi Dmitri, >> >> When I was building closp I was taking luminus as the base for it with >> some minor adoptions. I just had a look at the website of luminus and sa

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread Sven Richter
Hi Dmitri, When I was building closp I was taking luminus as the base for it with some minor adoptions. I just had a look at the website of luminus and saw the massive amount of work you put into the documentation again. If that sounds reasonable for you I'd like to try to move closp and closp-

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread Sven Richter
While I totally agree with you on the topic of composing things to solve a problem at hand I think you are talking about a different audience here than the audience such a "framework" is aiming for. You are talking about experienced developers that know how to solve problems, that know advantage

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread Sven Richter
Am Montag, 4. Mai 2015 14:09:35 UTC+2 schrieb Sean Johnson: > > > > On Monday, May 4, 2015 at 4:41:02 AM UTC-4, Sven Richter wrote: > > All in all this is basically the direction I want to go with closp and >> closp-crud. The intention is not to have a webframework, but

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread Sven Richter
uzzler: > > On Sat, May 2, 2015 at 11:12 PM, Sven Richter > wrote: > >> Reading through all the discussion I don't get which features you are >> actually missing. I love luminus and did a lot with it, however, for me it >> was missing some standard stuff

Re: Clojure needs a web framework with more momentum

2015-05-03 Thread Sven Richter
Hi, Am Sonntag, 3. Mai 2015 11:38:14 UTC+2 schrieb g vim: > > On 03/05/2015 05:24, Sean Corfield wrote: > > On Sat, May 2, 2015 at 8:18 PM, Mark Engelberg > > > wrote: > > > > Clojure is great for creating new, disruptive web models, but what's > > the

Re: Clojure needs a web framework with more momentum

2015-05-03 Thread Sven Richter
Hi Colin, Regarding payment I'd choose something like stripe or whatever fits your needs and look for a clojure api or wrapper around a java api. Implementing payment stuff yourself might get you in a lot of legal trouble anyhwere in the world. However, I'd agree that there may be the need for

Re: Clojure needs a web framework with more momentum

2015-05-02 Thread Sven Richter
Hi, Reading through all the discussion I don't get which features you are actually missing. I love luminus and did a lot with it, however, for me it was missing some standard stuff, that's why I put together closp, which is just another leiningen template providing some more features out of the

[ANN] closp 0.1.11 and closp-crud 0.1.0

2015-04-24 Thread Sven Richter
Yesterday I release a new version of closp which includes closp-crud. You can find the change list of closp at the bottom of the readme: https://github.com/sveri/closp I also released closp-crud, which is a leiningen CRUD plugin generating SQL files, HTML templates and clojure database and rou

Re: Generating .clj files with content

2015-04-22 Thread Sven Richter
gt; >> You can use >> https://clojure.github.io/clojure/clojure.pprint-api.html#clojure.pprint/with-pprint-dispatch >> >> with >> https://clojure.github.io/clojure/clojure.pprint-api.html#clojure.pprint/code-dispatch >> >> to achieve that. >> >>

Re: core.typed question (maybe a bug?)

2015-04-17 Thread Sven Richter
for making such a noise, maybe a simple repl restart would have fixed this. Thanks, Sven Am Donnerstag, 16. April 2015 22:43:41 UTC+2 schrieb Sven Richter: > > Hi, > > I tried both destructuring and the nth form instead of second and first. > None of which worked. >

Re: core.typed question (maybe a bug?)

2015-04-16 Thread Sven Richter
a Bar. > > (deftype UImp [] > Foo > (foo [this])) > > (->UImp) is of type Foo, and (U Foo Bar). > > Assuming we assign (->UImp) the type (U Foo Bar), the same operations now > must cast at runtime. > > (let [i :- (U Foo Bar), (->UImp)] > (if (instance?

Re: core.typed question (maybe a bug?)

2015-04-16 Thread Sven Richter
> Foo > (foo [this])) > > (->UImp) is of type Foo, and (U Foo Bar). > > Assuming we assign (->UImp) the type (U Foo Bar), the same operations now > must cast at runtime. > > (let [i :- (U Foo Bar), (->UImp)] > (if (instance? Foo) > (.foo i) > (

Re: core.typed question (maybe a bug?)

2015-04-16 Thread Sven Richter
rose > > On Thu, Apr 16, 2015 at 4:43 PM, Sven Richter > wrote: > >> Hi, >> >> I tried both destructuring and the nth form instead of second and first. >> None of which worked. >> >> However, if I change the Union to Intersection in >&g

Re: core.typed question (maybe a bug?)

2015-04-16 Thread Sven Richter
; (if (vector? s) (first s) s)) > > or > > (if (vector? (nth v 1)) (first (nth v 1)) s) > > Thanks, > Ambrose > > On Thu, Apr 16, 2015 at 3:39 PM, Sven Richter > wrote: > >> Hi, >> >> I have this code: >> >> (defalias html-label (t/HVec [K

core.typed question (maybe a bug?)

2015-04-16 Thread Sven Richter
Hi, I have this code: (defalias html-label (t/HVec [Keyword (t/HMap :mandatory {:for String}) String])) (defalias html-form (t/HVec [Keyword (t/HMap :mandatory {:id String}) t/Any *])) (defalias html-form-group (t/HVec [html-label html-form])) (t/ann dt->hiccup [(HVec [Keyword (U Keyword (HVe

Re: Generating .clj files with content

2015-04-08 Thread Sven Richter
. Thanks everyone for your suggestions, Sven Am Mittwoch, 8. April 2015 19:25:23 UTC+2 schrieb James Reeves: > > On 8 April 2015 at 14:20, Sven Richter > wrote: >> >> I want to create clojure source files with some code and a namespace and >> everything else what is useful fo

Re: Generating .clj files with content

2015-04-08 Thread Sven Richter
ever, what I need is this: (ns;only ns here foons ; a symbol (:require [foo.bar :as bar])) ; only bar It seems like these are basics, still I struggle to get it right. Any help is appreciated, thanks, Sven Am Mittwoch, 8. April 2015 15:50:13 UTC+2 schrieb Ta

Generating .clj files with content

2015-04-08 Thread Sven Richter
Hi, I want to create clojure source files with some code and a namespace and everything else what is useful for some source code. What I am looking for is a templating language for clojure code, is there something like this already? What would be the most idiomatic way to do that besides just w

Re: Use reduce or something appropriate instead of loop / recur

2015-03-24 Thread Sven Richter
lows folder paths. This is a single "step" >> of the reduction. >> >> (defn via-folderpath [items foldername] >> >> (->> items >>(filter #(and (= (:type %) :folder) >> (= (:name %) foldername))) >> (first) >

Use reduce or something appropriate instead of loop / recur

2015-03-24 Thread Sven Richter
Hi, I wrote a function to trackdown a path in a vector containing nested maps: (defn get-files-from-folder-path [ffs folder-path] (filter #(= :file (:type %)) (loop [tree-path-position 0 acc [] fof ffs] (let [folder (first (filter #(and

Re: Is Caribou Dormant ?

2015-02-28 Thread Sven Richter
I am glad you like it. It is still pretty young, so like I said, just open issues if you need more. Best Regards, Sven Am Samstag, 28. Februar 2015 16:22:41 UTC+1 schrieb g vim: > > On 27/02/2015 07:26, Sven Richter wrote: > > Hi, > > > > Please have a look at: https:

Re: Is Caribou Dormant ?

2015-02-26 Thread Sven Richter
Hi, Please have a look at: https://github.com/sveri/closp/ and tell me what you are missing. You might as well open feature / pull requests and I will consider adding them. Best Regards, Sven Am Donnerstag, 26. Februar 2015 05:22:57 UTC+1 schrieb g vim: > > Caribou was Clojure's Rails so I'm s

Re: [ANN] Buddy 0.4.0: Security library for clojure.

2015-02-24 Thread Sven Richter
Hi, What I like about buddy is that I can define access rules like this: https://funcool.github.io/buddy-auth/latest/#access-rules It gives me the ability to have the rules in one place and adjust them with patterns as I wish, it reminds me of shiro and I really like that approach. Best Regards

Re: No such var during runtime

2015-02-21 Thread Sven Richter
from time to time. Thanks, Sven Am Samstag, 21. Februar 2015 08:07:26 UTC+1 schrieb Sean Corfield: > > Could it perhaps be this bug at work? > > http://dev.clojure.org/jira/browse/CLJ-1604 > > Sean > > On Feb 20, 2015, at 1:31 PM, Sven Richter > wrote: > > A us

No such var during runtime

2015-02-20 Thread Sven Richter
Hi, A user reported an error for closp which I cannot make sense of: java.lang.RuntimeException: No such var: t-cli/parse-opts, compiling:(leiningen/new/closp.clj:102:52) This is the issue: https://github.com/sveri/closp/issues/1 The code is here: https://github.com/sveri/closp/blob/master/src/

Injecting html code into selmer

2015-02-19 Thread Sven Richter
Hi, I wonder if this is even possible. I have a string :foo-string "foo" and I pass this string to selmer: (render "templ.html" {foo-string "foo"}) Now in the templ.html I do this: {{foo-string|safe}} which injects this into the html: "foo" But what I need is plain html like this inside the tem

Re: [ANN] closp - leiningen template combining luminus and chestnut + some more features

2015-02-12 Thread Sven Richter
Hi alan, Luminus provides a bit more options regarding server / database and cljs. However, this is something I explicitely do not want. What I want is to have one path that fulfills a given featureset. I know this does not fit everyones flavour, but I think the overhead of having multiple diff

Re: [ANN] closp - leiningen template combining luminus and chestnut + some more features

2015-02-12 Thread Sven Richter
Thanks for adding the link, some day I will even forget my head. Am Donnerstag, 12. Februar 2015 00:41:42 UTC+1 schrieb martin_clausen: > > Link: https://github.com/sveri/closp > > On Wednesday, February 11, 2015 at 11:59:20 AM UTC+1, Sven Richter wrote: >> >> Hi, >&

[ANN] closp - leiningen template combining luminus and chestnut + some more features

2015-02-11 Thread Sven Richter
Hi, I took some time to put together a leiningen template which combines the awesome proecjts luminus and chestnut and adds some more features to start development sideprojects for the web without much hassle. The rationale behind this is that I found myself adding these features again and agai

Re: Combining reloaded workflow in web dev with dynamic var approach

2015-02-10 Thread Sven Richter
stem-map >:web (new-web-server (env :http-port) (fn [] (fn [req] ((app) req) > > (defn prod-system [] > (component/system-map >:web (new-web-server (env :http-port) (app))) > > > > > > > > On Sunday, February 8, 2015 at 1:37:40 PM UTC-5, Sven R

Re: ANN: Clojure-Miniprofiler, a web application profiling tool

2015-02-08 Thread Sven Richter
s everywhere. > > Does that help? > > Tom > > On Sunday, 8 February 2015 08:57:12 UTC, Sven Richter wrote: >> >> Hi Tom, >> >> I am not arguing about the performance impact here, however, it's nice to >> know there hardly is one. My only concern is

Combining reloaded workflow in web dev with dynamic var approach

2015-02-08 Thread Sven Richter
Hi, This is something that I am struggling for some time and I still don't know how to solve it. For dynamic reloading in web development there is this common pattern: (def app (app-handler [home-routes user-routes base-routes] :middleware (load-middleware) :ring

Re: ANN: Clojure-Miniprofiler, a web application profiling tool

2015-02-08 Thread Sven Richter
done since July. > > Pushing the profiling information as low in the stack as possible, and > leaving it on in production is a powerful combination - typically you never > think about profiling or tracing whilst writing your code, but it's always > there, even in production w

Re: ANN: Clojure-Miniprofiler, a web application profiling tool

2015-02-07 Thread Sven Richter
Hi, I just tried it and it looks really useful if one wants to track down speed bumps in web apps. I wonder if I understand the usege correctly, right now I did something like this: (defn admin-page [params] (let [users (cjmp/trace "all users" (db/get-all-users (get params :filter)))] (l

Re: Multi purpose webframework deciding between serverside generated templates and cljs SPA approach

2015-02-02 Thread Sven Richter
> Thanks for publishing, whatever way you choose. > > 2015-01-30 11:11 GMT+01:00 Sven Richter >: > >> Hi, >> >> I am working on taking luminus and chestnut templates some steps further >> by additionally providing authentication and user management + some c

Multi purpose webframework deciding between serverside generated templates and cljs SPA approach

2015-01-30 Thread Sven Richter
Hi, I am working on taking luminus and chestnut templates some steps further by additionally providing authentication and user management + some crud generation for entities plus whatever comes to my mind. Now, I am a bit undecided, I am working on a view that lists available users plus some e

Re: Copy binary files in leiningen template

2015-01-26 Thread Sven Richter
simpler way to do this? Thanks, Sven Am Sonntag, 25. Januar 2015 23:34:27 UTC+1 schrieb Sven Richter: > > Hm, I don't understand this, it seems like everyone is doing it like this: > > https://github.com/stammi/slides2-lein-template/blob/97c2df63b3fbddf0b09e8b501efce75ef4cb233e/

Re: Copy binary files in leiningen template

2015-01-25 Thread Sven Richter
annot open it. It is not recognized as a gif file. Any Ideas what might be wrong here? You can find the complete source here: https://github.com/sveri/closp/blob/master/src/leiningen/new/closp.clj Thanks, Sven Am Sonntag, 25. Januar 2015 18:18:10 UTC+1 schrieb Sven Richter: > > Hi, > &

Copy binary files in leiningen template

2015-01-25 Thread Sven Richter
Hi, I am creating a new leiningen template. Now I do have a binary file (gif) which I want to copy. I tried several things like: ["resources/public/img/browser_carousel_small.jpg" (io/resource "loading.gif")] for instance, but none of it worked. Sometimes I got it copied, but it was not readab

Re: Dynamically creating defrecord

2015-01-19 Thread Sven Richter
Thank you all for your answers and insights. As it often turns out, I don't need them. Clara rules also exposes other ways to pass data into rules. Best Regards, Sven On Sunday, January 18, 2015 at 3:34:17 AM UTC+1, Sean Corfield wrote: > > On Jan 17, 2015, at 3:04 PM, Matching Socks > wrote:

Dynamically creating defrecord

2015-01-17 Thread Sven Richter
Hi, I am trying to create record definitions dynamically during runtime. What I would like to do is something like this: (defn mk-rec [record-name namespace arg-list] (eval '(do (ns namespace) (defrecord record-name arg-list And then call it like this: (mk-rec "A" "ns" [a b c])

Re: Newbie's confusion

2014-12-05 Thread Sven Richter
Hi, Developing with cursive for almost half a year now, I still do use Lighttable (http://lighttable.com/) a lot. I find it especially useful for learning clojure as it delivers the most instant feedback I can think of by giving back results directly in the editor. So go and give it a shot, as

Re: [ClojureScript] Re: [ANN] freactive - high performance, pure Clojurescript, declarative DOM library

2014-12-01 Thread Sven Richter
work properly with > setAttribute - please submit an issue on github). Looking at your code, > maybe the issue is the event handler names - I believe the DOM events are > called dragstart, dragend, etc. without a hyphen. > > On Mon, Dec 1, 2014 at 10:39 AM, Sven Richter > wrot

Re: [ANN] freactive - high performance, pure Clojurescript, declarative DOM library

2014-12-01 Thread Sven Richter
Hi, I am currently trying to make drag and drop work with freactive, but fail so far. This is my code: [:thead [:tr (for [col (first (:content struct))] [:td [:div {:draggable true :on-drag-start (fn [e] (println "dragged"))

[ANN] FFDC - A template for chestnut / friend / friendui / datomic and reactive

2014-11-27 Thread Sven Richter
Hi: This is the github repo: https://github.com/sveri/ffdc >From the Readme: This is a template (not a leiningen) combining several projects to get started with. Included are: - friend with friendui - datomic pro (should be easily replacable by datomic free edition) - chestnut templa

Re: [ANN] freactive - high performance, pure Clojurescript, declarative DOM library

2014-11-20 Thread Sven Richter
Hi, I have been playing around and like it so far. I experience some behavior here where I wonder if it is intended or if I am doing something wrong. I have a main-page which I mount like this: (dom/mount! root (main-page)) and which looks like this: (defn main-page [] [... [:div#content

Re: clojure.test.check with fixtures

2014-11-06 Thread Sven Richter
uns. So I use fixtures :once to do any > global setup, and then farm out to a setup function for anything that needs > to be done before each test run. > > --Ashton > > Sent from my iPhone > > On Nov 5, 2014, at 3:27 PM, Sven Richter > wrote: > > Hi, > > Is

clojure.test.check with fixtures

2014-11-05 Thread Sven Richter
Hi, Is there a way to use clojure.test.check's defspec with fixtures? Like (use-fixtures :each (partial wrap-setup setup teardown)) in clojures test library? How do other people execute setup and teardowns with clojure.test.check? Best Regards, Sven -- You received this message because you ar

Re: where do I think the wrong way

2014-10-29 Thread Sven Richter
Hi Roelof, Just a general advice, for figuring out how small things like these work and why they don't work I find Lighttable (http://lighttable.com/) an awesome IDE. This is the best thing available to learn clojure (combined with a good book or online resource of course) and I would have to h

Re: Starting a project the right way - tips?

2014-10-27 Thread Sven Richter
Hi Ashton, After some discussion in the datomic and clojure irc channel I decided to go the route to pass in the datomic connection or datomic value to every function. This way it is really easy to do integration tests of these functions by setting up an in memory datomic database for every sin

Re: multimethod, record, type, and protocol pitfalls?

2014-10-27 Thread Sven Richter
Hi Daniel, When running through tutorials and blog posts it did not occur to me that the functions of a defprotocol are namespaced to where they are defined. Meaning, calling these functions I have to use their original namespace. It is obvious when one reads the official documentation, but one

Re: Demoralising experience trying to install on Win 7

2014-10-25 Thread Sven Richter
Hi, Just as Jony said and I tried to make clear, there is an relativ easy way to get started (I did this a few hours ago on a new W7 installation) 1. set JAVA_HOME path 2. Download: leiningen-win-installer-1.0 from http://leiningen-win-installer.djpowell.net/ 3. Download wget from http://gnuwin3

Re: Demoralising experience trying to install on Win 7

2014-10-24 Thread Sven Richter
Hi, I experience one problem too with leining 2.5.0 (not sure if it happened before already). The upgrade to leiningen 2.5.0 from 2.4.x was broken. The same happened yesterday when I tried to install leiningen in a new environment on windows 7. Not sure what the exact output of leiningen during

Re: Invalidating a session for a given user

2014-10-23 Thread Sven Richter
he > entry that's associated with a particular user. > > - James > > On 23 October 2014 14:45, Sven Richter > wrote: > >> Hi, >> >> I wonder if it's possible to invalidate a ring session for a given >> arbitrary user (not the logged in one

Invalidating a session for a given user

2014-10-23 Thread Sven Richter
Hi, I wonder if it's possible to invalidate a ring session for a given arbitrary user (not the logged in one)? Sometimes, when applying administrative tasks regarding user management in a web application it might be useful to have the user to relog. Another posiibility might be to be able to u

Re: Testing existing java code with clojure tests from ant / gradle

2014-10-16 Thread Sven Richter
se integration etc. for free, and it can > integrate nicely with any build tools that have JUnit support. > > On Wednesday, 15 October 2014 20:17:05 UTC+8, Sven Richter wrote: >> >> Hi, >> >> I have the opportunity to start some clojure here in our office, we are

Testing existing java code with clojure tests from ant / gradle

2014-10-15 Thread Sven Richter
Hi, I have the opportunity to start some clojure here in our office, we are a pure java team right now and as I am the only working on this currently I would like to run some tests in clojure. Of course, these tests will have to test existing java code. So ideally, what I would like to do is to

Re: jetty restart failing

2014-09-15 Thread Sven Richter
lp. > > --- > Wilker Lúcio > http://about.me/wilkerlucio/bio > Woboinc Consultant > +55 81 82556600 > > On Sun, Sep 14, 2014 at 6:29 PM, Sven Richter > wrote: > >> Hi Wilker, >> >> I have been going the same way and never really found out why this >>

Re: jetty restart failing

2014-09-14 Thread Sven Richter
Hi Wilker, I have been going the same way and never really found out why this happens (I am using http-kit instead of jetty). However, one thing that I did not knew was that a refresh will delete references of vars. So if you keep your stop function somewhere and call refresh before the stop fu

Re: using Stuarts component library correctly

2014-08-11 Thread Sven Richter
21:11:12 UTC+2 schrieb Matt Mitchell: > > Here's some relevant info about tools.namespace and protocols: > https://github.com/clojure/tools.namespace#warnings-for-protocols > > - Matt > > On Saturday, August 9, 2014 6:04:03 PM UTC-4, Sven Richter wrote: >> >>

Re: using Stuarts component library correctly

2014-08-10 Thread Sven Richter
t an exception too, which leads to a needed repl restart. And I just wonder if there is some way to get around that. Best Regards, Sven Am Sonntag, 10. August 2014 04:30:57 UTC+2 schrieb Alan Moore: > > > > On Saturday, August 9, 2014 3:04:03 PM UTC-7, Sven Richter wrote: >> >&

Re: using Stuarts component library correctly

2014-08-09 Thread Sven Richter
would be solved by the component library, so once more, every hint you have for me will be valuable about what I can do and what not. Best Regards, Sven Am Freitag, 8. August 2014 13:16:49 UTC+2 schrieb Sven Richter: > > Hi, > > I am trying to integrate Stuarts component library in

using Stuarts component library correctly

2014-08-08 Thread Sven Richter
Hi, I am trying to integrate Stuarts component library into my application. I am not sure if I use it correctly or do something else wrong or just have a wrong mindset. So I will explain how I am currently using it and the problem I see with it. I have three components: database, a scheduler a

[ANN] friendui 0.3.3

2014-07-23 Thread Sven Richter
Hi, I just released friendui 0.3.3. I added two callback functions where one can add additional logic after a successful signup|activation. It's fairly easy to add more, so, if the need for this exists, just add an issue to github. I also added two more projects: https://github.com/sveri/frien

Re: reloading enlive templates

2014-07-05 Thread Sven Richter
dev, of course) > > https://github.com/citizenparker/ring-middleware-force-reload > > > Hope that helps, > > Curtis > > On Wednesday, July 2, 2014 3:14:16 PM UTC-5, Sven Richter wrote: >> >> Hi, >> >> I am trying to reload my enlive templates with a wa

reloading enlive templates

2014-07-02 Thread Sven Richter
Hi, I am trying to reload my enlive templates with a watcher, how it was suggested in this issue: https://github.com/cgrand/enlive/issues/6 I am calling this function of start of my application: (watcher/watcher ["resources/"] (watcher/rate 50) ; poll every 50ms

Re: [ANN] friendui 0.3.0

2014-06-28 Thread Sven Richter
quirement. > Isn't there a way to add a remote SMTP? (Like with the postal library?) > > On Wednesday, June 25, 2014 4:05:38 PM UTC-4, Sven Richter wrote: >> >> Hi, >> >> I just wanted to announce friendui 0.3.0. >> https://github.com/sveri/friend-ui/ >

[ANN] friendui 0.3.0

2014-06-25 Thread Sven Richter
Hi, I just wanted to announce friendui 0.3.0. https://github.com/sveri/friend-ui/ I did a major rework and removed the dependency to datomic. Instead one can implement a storage protocal with whatever storage one prefers. Feedback is welcome. Best Regards, Sven -- You received this message be

Integrating clojurescript and clojure in one library

2014-06-05 Thread Sven Richter
Hi, While working on the admin interface of friend-ui (https://groups.google.com/forum/#!searchin/clojure/friend-ui/clojure/QoJHPFXjDuc/IbBsHmOLNdIJ) I got the idea to add some cljs (om / kioo) to my library and then provide both, the compiled js and the compiled java code in one jar. Now, it

  1   2   >