This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-18
Channels
- # adventofcode (1)
- # bangalore-clj (1)
- # beginners (118)
- # boot (39)
- # cljs-dev (6)
- # cljsrn (1)
- # clojure (62)
- # clojure-mke (1)
- # clojure-nl (6)
- # clojure-russia (51)
- # clojure-spec (8)
- # clojure-uk (9)
- # clojurescript (101)
- # code-reviews (1)
- # cursive (2)
- # datascript (9)
- # datomic (80)
- # emacs (4)
- # hoplon (27)
- # jobs-discuss (1)
- # off-topic (1)
- # om (1)
- # onyx (18)
- # protorepl (2)
- # re-frame (13)
- # reagent (13)
- # rum (9)
- # test-check (23)
They have been banned.
Twice in the last couple of months. Can't remember it happening before then. Maybe just once or twice in total previously?
There was some time ago someone has shown a list of project a beginner can make as projects for his/her resume.
@roelofw https://purelyfunctional.tv/functional-programming-career-guide/10-side-projects-resume/
How does the Oracle enforcement of the Java SE license affect the use of Clojure for enterprise projects? I'm going to get this question at work soon. I'm assuming we will need a Java license from Oracle for each install.
@genec: i think it will pretty much be the same as any java project. you can also choose to use openjdk
using postgresl and clojure jdbc and honeysql I tried this below stuff but got the error "You might need to add explicit type cast” as guid column is of data type uuid
(defn get-my-value [db-spec guid]
(jdbc/query db-spec (sql/format
(sql/build :select [:mycolum]
:from :mytable
:where [:= :guid guid]
:limit 1))))
I googled and found that i need to somehow generate this kind of query, any thoughts on how to do this in clojure
select mycolum from mytable where guid = CAST (‘abc-def’ as uuid) ;
@kevinbheda Try passing guid
as a java.util.UUID
That should obviate the type cast
Why do I see here a non resolved error :
(testing "list : conj"
(is (= (list-conj) (conj '(2 3 4) 1)))
(is (= (list-conj) (conj '(3 4) 2 1))))
where the function does exist :
(defn list-conj
"When operating on a list, the conj function will return a new list with one or more items \"added\" to the front."
[]
(identity '(1 2 3 4)))
Hi, I am trying to create Luminus project with additional profile hints, as described at http://www.luminusweb.net/docs/profiles.md, but leiningen complains that some of profile hints are not recognized: `--> lein new luminus new_luminus_application +postgres +re-frame +auth Unrecognized options: +auth, +re-frame Supported options are: +site, +h2, +dailycred, +cljs, +static, +http-kit, +cucumber, +mongodb, +postgres, +mysql But both auth and re-frame are in available list. What am I doing wrong?
haven’t used luminus, but my first guess would be to check whether my leiningen was up to date
is it possible to create a proxy namespace ? for example I want namespace B to contain functions of namespace A
@lxsameer that ztellman library can do that
potemkin
@jrheard thanks, but my lein is of latest version. Probably, clojars repository has old luminus template
find ~/.m2 | grep luminus
should suggest which version you're using
@gfredericks , I deleted ~.m2/repository/luminus and tried to create the project again: `--> lein new luminus new_luminus_application +auth +postgres +re-frame Retrieving luminus/lein-template/1.16.7/lein-template-1.16.7.pom from clojars Retrieving luminus/lein-template/1.16.7/lein-template-1.16.7.jar from clojars Unrecognized options: +auth, +re-frame Supported options are: +site, +h2, +dailycred, +cljs, +static, +http-kit, +cucumber, +mongodb, +postgres, +mysql It downloaded the latest template from clojars and it still did not know about +auth and +re-frame
I dunno anything about luminus, just had a suggestion for devining the version
@fevral13, the latest Luminus template is 2.9.11.18.
Just in case if anybody faces similar issue: my lein was downloading VERY outdated luminus template: 1.16.7 instead of 2.9.11.18. This was due to hardcoded value in ~/.lein/profiles.clj {:user {:plugins [[luminus/lein-template "1.16.7"]]}}, that could be left from my previous experiments with following clojure web development book. Deleting that file ~/.lein/profiles.clj solved my problem, lein downloaded the latest luminus template and all profile hints 🙂
yes, @henriklundahl thank you, I was just finishing typing that 🙂
Could someone help me understand what I'm doing wrong with Java interop? I'm trying to translate this:
PDFont font = PDTrueTypeFont.loadTTF(document, "Arial.ttf");
Into clojure...
(.loadTTF PDTrueTypeFont document "Arial.ttf")
But I'm getting the following error
java.lang.IllegalArgumentException: No matching method found: loadTTF for class java.lang.Class
Do I need to cast the result to a PDFont?http://pdfbox.apache.org/docs/2.0.2/javadocs/org/apache/pdfbox/pdmodel/font/PDTrueTypeFont.html
hmmm, that didn't seem to work
Caused by: java.lang.IllegalArgumentException: No matching method: loadTTF
@rodeorockstar Looks like you need to provide a File
, not a string filename, as the second argument there.
Hmm, even if it does take a File, I can't seem to access the static method in the first place
okay, so i figured it out, and you were right @joshmiller. thanks! i rarely touch java so this might not be 100% true, but loadTTF
is an overloaded static method, and i think clojure couldn't find a method with a signature of document + string
slightly confusing error message because the method exists, just one that accepts a document object and a File
(and it didn't help that PDFBox's own example passes the file name as a string when clearly the javadocs state otherwise ;))
Okay, tell me if this sounds crazy: I've got a seq of maps. I need to process them on an API, which can take up to 100 items or 32K at a time. I need to put the result of input a
back into the spot it came from. Is this a case for pmap
? And do I want to have an arrangement where the function that sends them off to the API worker receives the input and a channel to return the result on, to ensure that sender gets back the result it wants?
question - I have a vector of maps, i.e. [{:name "Matt" :emails [{:value "<mailto:[email protected]|[email protected]>"} {:value "<mailto:[email protected]|[email protected]>"}]}] and I want to iterate over it and produce another vector of maps that creates additonal maps for each atomic email, i.e. the above would become -> [{:name "Matt" :email "<mailto:[email protected]|[email protected]>"} {:name "Matt" :email "mattsfrey@gmail"}] what is the best way to accomplish this?
(mapcat (fn [{:keys [name emails]}]
(map #(-> {:name name :email (:value %)})
emails))
input)
anyone here use ztellman/automat? I have a problem which I think relates to AOT — which I don’t fully understand — where an X11 process gets started from a namespace I don’t use in my app. If anyone could offer general or specific guidance I’d appreciate it.
So I hit a second issue - how to deduplicate the resulting set based on :email ? Any suggestions?
basically would like to have a dedupe or distinct that takes a predicate or some such
a key-fn
plumatic/plumbing has a distinct-by
you could use that or paste it
@gfredericks that is perfect, awesome tip! thanks!