Found 167 results
Hello Clojurians, have a question. I have a button that when user clicks, the back-end mutation can take a long time to respond because it sends an email. Basically button fires up a mutation. Is there a utility in (defsc ...
by which I can know that the current (defsc...
is busy waiting on mutation?
Hello clojurians! :clojure-lsp: Released https://clojure-lsp.github.io/clojure-lsp/ with fixes and exciting new features, clojure-lsp is not a editor only tool anymore, it has its own API and CLI 🎉 It's possible now to run clojure-lsp via terminal telling to clean all ns forms of your project, removing unused vars, sorting required/refers/imports 🚀 For more information, check #lsp.
Hello Clojurians, looking for some advice. I love the (if-let ...
, but it only discriminates nil and non-nil. In the case where there are layers of (if-let ...
how can I pass back due to which (if-let...
something did not happen? For example, when trying to reset password, a token can be expired or email does not exist. Should I use throw catch
as part of the code to read off the reason for the error and show it back to the user? Or is there a better way of doing it?
hello Clojurians, at :xapix: we are looking for an experienced Clojurian to join our team in Berlin Tech stack: • Clojure, Ruby on Rails, Vue.js • AWS + Pulumi + Github Actions • Kafka More details here: https://www.xapix.io/career#job-627497 You can ping me or apply directly via the add I’ll be happy to hear from you!
Hello Clojurians, Im beginning to learn Clara Rules and wanted to execute them from Java. Im getting an error when trying to run the code,. ExceptionInInitializerError: Syntax error compiling at (example/shopping.clj:2:3). clara.rules.accumulators
I'm attaching the project source for your reference. Could you please help. Please install Maven. Go to your project root directory and to compile the project execute mvn -q compile
To run the code mvn -q exec:java -Dexec.mainClass=example.ClaraExampleMain
Hello Clojurians around the world Anyone here work with "smartphone based developer setup"? Something like a smartphone with 12Gb of RAM, an USB-C hub, mouse, keyboard, and a ~12" portable screen? Already seen some developers working from phones/tables using tools like github codespaces or remote machines But as a clojure dev I like to have an repl running on my local machine
Hello fellow Clojurians I am new to Clojure and next jdbc (so far loving both) and was hoping to get some help to understand how to use next jdbc. I am currently trying to take ids from one database and inserting them into another. I would like to do this in portions as the table contains potentially millions of ids. As far I have been able to read I should be able to use the option {:fetch-size portion} to take the data in smaller portions at a time. My issue is that I don't understand how I can perform the following on each portion: 1. Get a portion of ids from database-1 2. Pick out relevant columns and perform transformations 3. Put the transformed columns into database-2 4. Take the next portion and do step 1 through 3 again. 5. Keep doing step 4 until there are no more rows in table. Here is my (simplified) attempt:
(def db-1-spec
{:dbtype "sqlserver"
:read-only false
:auto-commit false
:sslmode "require"
:dbname "database"
:user "username"
:password "secret-password"
:host "host"})
(def db-2-spec
{:dbtype "postgres"
the rest is the same as above...})
(defonce db-1-ds (jdbc/get-datasource db-1-spec))
(defonce db-2-ds (jdbc/get-datasource db-2-spec))
(def ids (delay
(plan/select! db-1-ds [:id]
["SELECT * FROM table-ids"]
{:fetch-size 10000})))
(defn insert-ids
[ids]
(sql/insert-multi! db-2-ds :target-table
[:id :other-info]
(transform @ids)))
Won't ids
simply take everything in the table, instead of only fetching 10000 rows at the time? How can I be sure that it only fetches 10000 ids at a time and then inserts those 10000 ids into db-2?
Hope someone can help me understand this better and that you are having a lovely weekend.Hello Clojurians. What is the best way to hot reload my clojure files on change? I use deps.edn
. I am not able to use wrap-reload
because it wants a declared variable, but I use function
, because my system depends on re-frame
, so my subscribe
is nil
in the first run. Is there any other way, without having to use some restart
mechanism on the backend?
Hello Clojurians. I was trying to get back into Clojure and thought of just trying out reducers to get the average of a sequence of numbers. I saw online that the most elegant way to do so is:
(defn average [coll]
(/ (reduce + coll) (count coll)))
Hello Lambdas
Just a gentle heads up about clojurians-log
504-ing
Hello Clojure friends. It's your prodigal son who's spent some time wandering in statically typed functional land, especially OCaml as of late. Compared to Clojure, OCaml's experience for live editing is really subpar, and I want to improve it. There are 2 routes I'm considering: 1. Add better REPL support in my editor (similar to Calva/CIDER) 2. Don't do a REPL per se, but instead do something like https://quokkajs.com/. Whereas a REPL is stateful, Quokka just runs a file and prints results inline in the editor, discarding the context each time. What do you guys think? I'm guessing that experienced Clojurians probably think 1 is strictly better than 2. Could you explain why?
Hello everyone! Looking to hire a few Clojurians for our next wave of development in our AI eCom Analytics startup. If you’d like to become part of a dynamic remote working team that develops a highly demanding data platform (set to scale globally!) apply here and we’d love to meet you: https://apply.workable.com/dciai/j/EB78451874/
Hello everyone! Looking to hire a few Clojurians for our next wave of development in our AI eCom Analytics startup. If you’d like to become part of a dynamic remote working team that develops a highly demanding data platform (set to scale globally!) apply here and we’d love to meet you: https://apply.workable.com/dciai/j/EB78451874/
Hello everyone! Looking to hire a few Clojurians for our next wave of development in our AI eCom Analytics startup. If you’d like to become part of a dynamic remote working team that develops a highly demanding data platform (set to scale globally!) apply here and we’d love to meet you: https://apply.workable.com/dciai/j/EB78451874/
Hello Clojurians ! I hope that everyone is safe 🙂 I would appreciate some advices on how to find the perfect remote worker in Clojure. I am currently working at Multis, a fintech startup based in Paris. We want to hire a full stack engineer that is based in Europe and that has at least 4 years of experience in Clojure. We actually posted the offer on some Job Boards like brave Clojure Job, RemoteOk and WTTJ. But it seems like this is not enough. What would you recommend other than try to post our offer on Linkedin, Twitter…
Hello fellow VS Code Clojurians, here’s an experiment. Calva contains a lot of work and creativity towards making Clojure coding nice. And Clover seems super nice and reaches REPLs that Calva does not. What if Calva’s static features were easier to reach without the clashing of the REPL UIs? In this build of Calva there is a setting: calva.hideREPLUi
that will, exactly, hide most of Calva’s REPL UI elements. In theory it should then be a possible companion to Clover’s REPL services. I’d love some help testing if it works.
PR: https://github.com/BetterThanTomorrow/calva/pull/1009
Calva VSIX: https://10706-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.158-1005-hide-repl-option-52f9d35a.vsix
Hello clojurians
hello there, fellow clojurians. I’m trying to find a tracing library where I can provide a fn to customize the trace output.
More specifically I'd like to use tap>
Hello everyone,
Lets supose i have this var:
(def m {:username "sally"
:profile {:name "Sally Clojurian"
:address {:city "Austin" :state "TX"}}})
Why when i try to evaluate the following function doesn't return "TX"?
(:state (:adress (:profile m)))
=> nil
Thanks
Hello 🙂 Would this be the right place to ask about clj-gatling? I'm surprised that I'm not finding any mention when I search for gatling
on clojurians 😅 It makes me wonder if I'm going down a lonely road.
Hello fellow Clojurians! Sorry if this isn't channel appropriate, but I've got a "project" of sorts that I'm starting up this week. I'm embarking on a project called "12 startups in 12 months," which, as you may have gleaned from the title, is going to consist of building, promoting, and releasing a tech startup each month for a whole year. I've been really keen on getting into Clojure for a long time now, and I'm finally taking the plunge and will be building all of the apps in Clojure and ClojureScript. Given that I'm more or less a beginner, it may take a little bit for me to get up to speed, but I'm banking that the quick learning curve for the language and the awesome flexibility and rapid development possibilities it has will work out in my favor in the end. If you'd like to check out the stream, head over to my Twitch page: https://www.twitch.tv/a_fry_ . I'm streaming as we speak!
Hello everyone, I just recently joined the clojurian slack group
Hello Clojurians!
Hello clojurians Anyone here using Clojure + gRPC ? Curious about Which libs do you use?
Hello clojurians.. I have a question about some surprising behaviour in ataraxy, wondering if anyone’s seen it before and/or knows of a workaround. I have a route like
[:get "/path/" thing "/more/stuff"] ^:middleware [:handler/new ^coercer thing]
but both thing
and the string "stuff"
are being passed to my coercer
, which is causing problems.Hello Clojurians, I am trying to build subsequences from an original seq according to specific criteria (4Clojure p53, https://www.4clojure.com/problem/53#prob-title). I am trying to implement it via a recursive function, any suggestions for a higher level approach? Thanks in advance.
Hello fellow clojurians! The other day, I was trying to build an input field that doesn't have its state in a reagent atom but stored in the db. I thought that introducing a reagent atom would introduce state separate from the db. If we have separate state, then there are times when the db doesn't reflect the actual application state and I felt this would break the whole idea of the UI as a state machine. So, this worked for 99% of all use cases until I, being German, started entering umlauts on macOS using dead keys. Suddenly, dead-umlaut + a = ¨ä
instead of dead-umlaut + a = ä
which is what it's actually supposed to be. I then noticed that in several examples (react, redux, re-frame and re-frame realworld example), everyone introduced a separate state for input fields. Is it even possible to write fields the way I did without breaking dead keys? Is this because of the way React realizes the on-change event? (I noticed that the standard html on-change fires later than the one React implements on the input field.)
See an example of how I did this below.
Hello everyone 👋 It’s so wonderful to meet you all Clojurians!:party-corgi: My name is Mirae and I’m one of the Talent Acquisition Specialists at Kira Systems and I was invited by one of our wonderful developers and a friend, @UMAGAQP17. Kira System is hiring for both https://jobs.eu.lever.co/kirasystems/c5797c10-48d4-4831-a391-90a6ffce4f94 and https://jobs.eu.lever.co/kirasystems/dfd7f83e-fc2f-4ca1-8e78-b4f5ca7267c0. These positions are remote at this time but hopefully, eventually Toronto (Canada) Office :flag-ca: or remote near by. I’m in charge of the Software Developer role and I’m happy to answer any questions if you have any!
Hello everyone 🙂 I am a fellow Clojure dev thinking about a potential future Clojure project in the message queues space. I’d like to know more about the interests of Clojurians in this space - with the aim of building something to eventually meet those needs. I made a short survey if you have a few minutes (it’s really short) https://account606590.typeform.com/to/sirkUS13 EDIT: looking at the first results, it takes about 1:20min to complete on average
Hello admins 🙂 I have a question: would it be OK to post a questionnaire on this slack? Specifically this one: https://account606590.typeform.com/to/sirkUS13 It is a short survey about messaging/message queues and features of interest to Clojurians - with the aim of building something to eventually meet those needs.
Hello fellow clojurians... I've been working on an electron + re-frame + shadow-cljs app for the past few weeks and I've been running into an issue trying include an npm package called electron-store. If I understand the error logs correctly, it seems shadow-cljs doesn't like the javascript spread syntax that the electron-store library uses in a few places. Any idea why this is the case? All of my packages are fully up to date (at least as I'm aware) and I'm running on Node.js v14.13.0. Any thoughts around root cause would be much appreciated and let me know if there's more information I can provide to help clarify. Thanks! JS Error:
SHADOW import error <DIR>/.shadow-cljs/builds/main/dev/out/cljs-runtime/shadow.js.shim.module$electron_store.js
App threw an error during load
<DIR>/node_modules/electron-store/index.js:13
...options
^^^
SyntaxError: Unexpected token ...
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:528:28)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at <DIR>/.shadow-cljs/builds/main/dev/out/cljs-runtime/shadow.js.shim.module$electron_store.js:3:40
at global.SHADOW_IMPORT (<DIR>/resources/main.js:64:44)
shadow-cljs.edn:
;; shadow-cljs configuration
{:source-paths ["src"]
:dependencies [[reagent "0.10.0"]
[re-frame "1.1.1"]
[cider/cider-nrepl "0.21.0"]]
:dev-http {8080 "resources/public/"}
:builds {:main {:target :node-script
:output-to "resources/main.js"
:main app.main.core/main}
:renderer {:target :browser
:output-dir "resources/public/js"
:asset-path "js"
:modules {:renderer {:init-fn app.renderer.core/start!}}}}}
package.json
{
"name": "placeholder",
"version": "1.0.0",
"description": "placeholder",
"main": "resources/main.js",
"scripts": {
"dev": "./node_modules/.bin/shadow-cljs watch main renderer",
"build": "./node_modules/.bin/shadow-cljs compile main renderer",
"clean": "rm -rf resources/public/js/* && rm -rf target"
},
"keywords": [
"shadow-cljs",
"reagent",
"electron"
],
"author": "placeholder",
"devDependencies": {
"electron": "^10.1.3",
"shadow-cljs": "^2.11.5"
},
"dependencies": {
"@material-ui/core": "^4.11.0",
"create-react-class": "^15.6.3",
"electron-store": "^6.0.1",
"normalize.css": "^8.0.1",
"react": "^16.13.0",
"react-dom": "^16.13.0"
}
}
Hello Clojurians, I am trying to learn how to get data from server when the home page is loaded. I am following the https://github.com/metosin/reitit/tree/master/examples/frontend, but it does not seem to indicate on how to request the data from the server, for example from GET /mydata
route, which will return a json. Is there a function I should look up?
Hello Clojurians, I am a noob and trying to figure out how to develop a full stack app using shadows-cljs. The default index.html seems to kick off the JS code, but how do you run the back-end server? Should the backend run through shadow-cljs or should it run through a completely independent instance of REPL?
Hello Clojurians! We have an opening at JUXT for a mid to senior level developer. The initial project opening is for an investment banking client working on a successful front-office system, using GraphQL, JSON Schema, re-frame, Clojure and ClojureScript and more. The role is remote, although being able to meet the team in London and/or the JUXT Milton Keynes office would be beneficial. Please contact us at <mailto:careers@juxt.pro|careers@juxt.pro> if you would like to have an informal conversation to learn more, Regards, Jon
(println (str "Hello Clojurians!" " Feels great to know a language that makes you think more, and code less. :rich: "))
Good morning Clojurians, I am new to frontend and I am pulling my hair out trying to access a function. Following example on this https://clojurescript.org/guides/quick-start, and looking at this code:
(ns hello-world.core)
(println "Hello world!")
;; ADDED
(defn average [a b]
(/ (+ a b) 2.0))
Is it possible to render the output of the average
function to html? Firstly, I tried it like this:
<script src="out/main.js" type="text/javascript"></script>
<script type="text/javascript">hello_world.core.average(1,2);</script>
but it complains that it is not defined. I tried both hello-world
and hello_world
but it keeps complaining that it is not defined. Nevertheless, I can type in the google chrome console hello_world.core.average(1,2)
and it does return 1.5.Hello clojurians, I was wondering if this is a correct way to use a repl a running ring webserver:
(defn -main
"Blogo blog backend"
[]
(future ;; Pretty cool, it unblocks me from using the repl!!
(jetty/run-jetty app {:port 9091})))
It fixed my problem - when I run (-main) in the REPL I can still evaluate expressions in it, otherwise it somehow stops working correctly. I think this leaves me two threads - one for ring and one for me.Hello all just getting started with Clojurians.
Hello clojurians, I encountered the same problem as in https://stackoverflow.com/questions/34700857/how-to-extend-protocols-to-clojurescript-collections-generically for the past with the latest release of clojurescript. Am I supposed to duplicate implementations or is there a better way to do this ? thank you
Hello Clojurians, with lein, there is wrap-reload
for live-reloading during development, and there is a way to specify a development profile, is there a way to accomplish live reloading during development when only using deps.edn
and not lein or boot?
Hello Clojurians!
If I have a list of maps '({} {} {})
and I want to add something to the first map. What would be the idiomatic way of doing it?
I'm currently doing this:
=> (def mylist '({} {} {}))
=> (conj (rest mylist) (assoc (first mylist) :key "value"))
({:key "value"} {} {})
I have a question which is very much related to Clojure but since it is is fundamentally not strictly Clojure specific I decided to ask it here. I am currently trying to create development tooling for kubernetes based system with several pieces. Not everything is currently in kubernetes but some are still running in ECS but this would be the first step in putting those last few pieces into kubernetes world. This system works just fine in production but the development workflow is far from perfect. So, I want to enable the team to start the whole system locally easily. For this developers would use Docker Desktop with it's Kubernetes support or local minikube. All is nice and fine. This would enable us to run full system tests locally and so on which is nice. There's several tools available which make this kind of stuff easier to do such as Skaffold, Garden etc. However things get hairy when I would want to do some actual development work in such a way that rest of the system has been brought up by this tool but not the one service I'm currently developing. The way Skaffold and friends solve this is that they listen for code changes and trigger builds+deploy flow to the local kubernetes so that you get your changes there running quickly. However, this concept breaks completely when either the builds take quite long or if your fundamental workflow is just different to that (hello Clojure and REPL). So, I'm trying to find a solution which would allow me to control how stuff gets pushed into that local kubernetes. Meaning that I could say: "start everything in kube except service X". Even better if I could apply different configurations easily for these services so that they could possibly see the locally running service instance being developed. In our use case however we are transitioning towards queue based comms between services which would make this kind of stuff less relevant since all we would have to do is expose that queue (Kafka in our case) outside the local cube for localhost which is relatively simple to do. Then it doesn't matter where that service is when it is pushing it's messages into the queue. I have just discovered Skaffold and Garden and been looking into those for one working day now but it looks like none of the tools really support this use case. So my fellow clojurians, how have you solved this problem in your day to day work with kubernetes? :edit: Oh right, and we already have a service which needs kubernetes (it starts new pods dynamically) so forgetting kubernetes and using docker-compose (which does support this use case out-of-the-box) is kinda not an option
Hello Clojurians, do all of the :aliases
function calls in deps.clj
have to dispatch through -main
via :main-opts
, or is it possible to add a function in the namespace and call that function directly. I see that it is possible using lein
something like;
{:aliases {"migrate" ["run" "-m" "investtrack.scripts.migration/migrate"]
"rollback" ["run" "-m" "investtrack.scripts.migration/rollback"]}}
Can something like that be done in deps.clj
:aliases
map? Or you just have to live with dispatching via a -main
function?Hello clojurian, I m using shadow cljs in my journey to learn clojure/clojurescript. in development mode my server is running on port 3000 and shadow cljs server is at 8080. I m trying to proxy my api request to my server, here is what how i m trying to config proxy url. but it giving 404 error. Please help me with what im doing wrong?
:dev-http {8080 {
:root "target/"
:proxy-url "<http://localhost:3000>"}}
Hello, all you fine Clojurians... I’m new to the Clojure(Script) ecosystem and I’m trying to get my bearings. One thing I’ve noticed as I look around for current state-of-the-art is that it seems many otherwise useful and well-documented libs have their last commits many months or even years ago. Is this an indication of abandonment (as it would’ve be in other ecosystems) or a consequence of the stability of Clojure implementations...as in “it’s working and it will continue working, so no need to touch it”? Any guidance here is much appreciated!
Hello Clojurians, I have a quick question regarding Reagent/Hiccup syntax. I was working through a basic Reagent + Tailwindcss example (https://github.com/mrmcc3/tailwind-cljs-example/tree/master/shadow-cljs) and noticed in the app.cljs file the author used this notation to render a vector of classes without string notation: `[:div {:class '[max-w-3x mx-auto pt-12]}`. I messed around with it and found that it this notation (`'[max-w-3x mx-auto]` ) is equivalent to just writing the string: `"max-w-3x mx-auto"` . Is this standard Clojure syntactic sugar or some Hiccup magic? I can’t seem to find any documentation on this use of the single quote as the docs (https://clojuredocs.org/clojure.core/quote or https://clojure.org/guides/weird_characters#_quote) appear to be talking about delayed eval. Thanks for the help everyone 🙂
Hello Clojurians,
I have a quick question regarding Reagent/Hiccup syntax. I was working through a basic Reagent example (https://github.com/mrmcc3/tailwind-cljs-example/tree/master/shadow-cljs) and noticed in the app.cljs file the author used this notation to render a vector of classes without string notation: [:div {:class '[max-w-3x mx-auto pt-12]}
. I messed around with it and found that it this notation (`'[max-w-3x mx-auto]` ) is equivalent to just writing the string: max-w-3x mx-auto
. Is this standard Clojure syntactic sugar or some Hiccup magic? I can’t seem to find any documentation on this use of the single quote as the docs (https://clojuredocs.org/clojure.core/quote or https://clojure.org/guides/weird_characters#_quote) appear to be talking about delayed eval.
Thanks for the help everyone 🙂
Hello clojurians, how to store integrant system for later access in repl? I want to call my reitit routes from repl after initialing integrate system.
;initializing handler key like this
(defmethod ig/init-key :shop/handler [_ {:keys [db] }]
(router/create-app db))
; and initializing system
(defn -main []
(println "Running main!")
(ig/init system-config))
Hello Clojurians, I've tried to update the db in re-frame in this inelegant way
(re-frame/reg-event-db
:getTagValue
(fn [db [_ data]]
(assoc-in db [:tag-table :foo :current] (data "value"))
(assoc-in db [:tag-table :foo :unit] (data "unit"))
(update-in db [:tag-table :foo :history] conj (data "value"))))
But it doesn't seem to work.
Maybe the way to do it is using a function I pass to update-in instead of conj?
Like
(update-in db [:tag-table :foo] magic-function-that-updates-3-values-at-once data)
Hello dear Clojurians, I have a problem dealing with Leiningen and “Multi-Release JARs” (MRJARs). Specifically, I work with Java 11 and Log4J2, but get the following warning upon running or uberjar
ing:
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
https://issues.apache.org/jira/browse/LOG4J2-2537 reveals that log4j2 ships MRJARs, and you need to leverage those with setting Multi-Release: true
inside the manifest.
Thing is: I cannot figure out how to set this with Leiningen. Any hints?Hello Clojurians, I'm having a problems getting access to a zero-token through a POST so that I can use it in my buffer to perform an authentication request. Now the URL here's the link <https://jemez.auth0.com/oauth/token>; following along a video 'Microservices with CLojure'. I'm lost on how to use this site to create a way to well, access to a zero-token through a POST so that I can use it in my buffer to perform an authentication request. Here is the relevant functions that calls the outdated api: (defn auth0-token []
(let [ret
(client/post "<https://jemez.auth0.com/oauth/token>"
{:debug false
:content-type :json
:form-params {:client_id (System/getenv "AUTH0_CLIENT_ID")
:client_secret (System/getenv "AUTH0_SECRET")
:grant_type "client_credentials"}})]
(json/parse-string (ret :body))))
Can someone help me with this? Thank you in advance 🙂Hello Clojurians, I'm having a problems getting access to a zero-token through a POST so that I can use it in my buffer to perform an authentication request. Now the URL here's the link <https://jemez.auth0.com/oauth/token>; following along a video 'Microservices with CLojure'. I'm lost on how to use this site to create a way to well, access to a zero-token through a POST so that I can use it in my buffer to perform an authentication request. Here is the relevant functions that calls the outdated api: (defn auth0-token []
(let [ret
(client/post "<https://jemez.auth0.com/oauth/token>"
{:debug false
:content-type :json
:form-params {:client_id (System/getenv "AUTH0_CLIENT_ID")
:client_secret (System/getenv "AUTH0_SECRET")
:grant_type "client_credentials"}})]
(json/parse-string (ret :body))))
Hello clojurians! I'm using CLJ-HTTP to make some requests.
I'm receiving a string inside body response, and the header says
"Content-Type" = "application/csv;charset=ISO-8859-1"
And the string is ok but coming with lot's of interrogation marks and numbers (as if it couldn't understand some characters)
and there's no Content-Encoding
header on the response, so CLJ-HTTP isn't doing anything special i think.
furthermore, when i make the same request on the browser the server gives me a base64 encoded string, representing the csv, but with CLJ-HTTP i receive it deserialized.
Ideas?
Hello dear clojurians,
I just started using lacinia-pedestal
and was wondering how to configure the character encoding of data returned. I modified the example on https://github.com/walmartlabs/lacinia-pedestal and changed the schema to:
{:queries
{:hello
{:type 'String
:resolve (constantly "Motörhead")}}}
and using curl
to query the for hello
messes up the ö
.
HTTP/1.1 200 OK
Date: Thu, 23 Jan 2020 14:01:33 GMT
Content-Type: application/json
Transfer-Encoding: chunked
{"data":{"hello":"Mot?rhead"}}
Same thin with lacinia’s build in GraphiQL “IDE”.
Is this a bug or am I missing something?i have a general question about ‘pure functions’ — i’m not really sure where to put this just yet or if it belongs here or in offtopic or elsewhere as its kind of a loose functional programming philosophy question (lemme know if i should drop this elsewhere), but i’m curious about a Clojurist perspective:
GREETING = ->(name){ "hello #{name}" }
def greet(name)
GREETING.call(name)
end
greet("ryan") # => "hello ryan"
would you say in the above Ruby code that ‘greet’ is a pure function or not? i’m so used to encountering just ‘no side effects // referential transparency’ style definitions that this sort of thing i’ve never even thought about as if ‘pure’ or not — it seems some definitions take into account ‘execution context’ and would call for making GREETING a second argument of ‘greet’ in order to make this pure
according to : https://alvinalexander.com/scala/fp-book/definition-of-pure-function — or even the kinda terse first answer here: https://stackoverflow.com/questions/22268851/what-is-a-pure-function — this may not be a pure function: Its result can't depend on _reading_ any hidden value outside of the function scope, such as another field in the same class or global variables.
i guess this kinda shocked me as i feel within my clojure study this really hasnt come up as a thing as far as i can remember, and further more seems clojurians would constantly have ‘pure functions within each other’ and still call them pure…
again lemme know if i should remove this and drop it in another room 🙂 — thanks!Hello, clojurians, I need some help from gurus 😉 I have a question about state management in Clojure. As everybody does, to make learning fun I'm trying to build a small game. It's a card game and it has a lot of rules, units, spells, and all this stuff. And the biggest problem that I'm struggling with now is how to organize game state and make it simple to debug & maintain. I spent much time trying to google how people organize the state in web apps and libraries, but it still hard for me. The most confusing part is that I can't find any alternative to "map in a single atom" approach. So, the question is -- how to organize program state (runtime state) in Clojure without tears and is there any way to manage state in isolation
Hello everyone, I am a Clojurian from Taiwan, and I will be at London around 12/1~12/5. I planned to attend ClojureX, but it was cancelled. I would be like to meet some London Clojurians around 12/1~12/5. If anyone have free time to meet, feel free to contact me. My blog: https://humorless.github.io/ My twitter: https://twitter.com/humorless
Hello Clojurians! What is your favorite clojure library / framework to write microservices? A quick google search pointed me to luminus, but are there other options? I am fairly inexperience with any web programming, I have only used python's flask?
Hello Clojurians,
I need a bit of help regarding connecting the figwheel-main CLJS
repl working properly with Cursive
. I’ve followed the instructions and the dev
build completes, browser
opens up and I’m able to interact with pure CLJS
commands in the REPL.
However, anything related to js/
namespace or even *clojurescript-version*
doesn’t work.
Hello Clojurians, I’m trying to find a recursive solution for this problem but struggling to think correctly for this one. I think that a combination of reduce-kv
and recursion
should do the trick but not able to formulate it concretely
{[:a 1 :X] [[:e 1] [:f 1]]
[:e 1 :X] [:t 1]
[:f 1 :X] [:g 1]
[:g 1 :X] [:h 1]
[:h 1 :k] [:i 1] }
If the map key
has :X
in it then store it’s value and also check if that value also has a key with :X
as well and collect these.
For example, [:f 1 :X] -> [:g 1]
=> [:g 1 :X] -> [:h 1]
then I should be able to accumulate the [:f 1] and [:g 1]
in the function.
The base condition, is that the [:h 1 :X]
does not exist.
The expected output of this function is a vector
[[:a 1]
[:e 1]
[:f 1]
[:g 1]]
Would be great if someone could help me out with this one.Hello Clojurians,
I came across a somewhat odd behavior for apply
(if I’ve identified correctly) and the behavior of function encapsulated apply
seems to be a bit different then standalone
Below are the function definition and the state-map
(def mutation-env {:ref [:person/id 1]
:state (atom {:person/id {1
{:person/id 1 :person/name "Dad"}}})})
(defn update-caller!
[{:keys [state ref] :as mutation-env} & args]
(apply swap! state update-in ref args))
Here’s the different response wrt the string Mom
.
(update-caller! mutation-env
assoc :person/name "Mom")
;; => #:person{:id {1 #:person{:id 1, :name "Mom"}}}
(apply swap! (:state mutation-env) update-in (:ref mutation-env)
assoc :person/name "Mom")
;;=> #:person{:id {1 {:person/id 1, :person/name \M, \o \m}}}
Am I missing some detail here, please let me know 🙂Hello Clojurians, I am trying to set up a postgres database configuration for a luminus web app for toucan: https://github.com/metabase/toucan
Hello Clojurians, I’ve been trying to transform a map so that the new map doesn’t contain references to a specific value - but I’m really struggling with this for now. Any help or pointers are definitely appreciated.
(def people1 {:car/id {1 {:car/id 1, :car/model "T-150"},
2 {:car/id 2, :car/model "Ferrari"},
3 {:car/id 3, :car/model "Mercedez"}},
:person/id {1 {:person/id 1,
:person/name "Joe",
:person/spouse [:person/id 2],
:person/cars [[:car/id 1] [:car/id 2]]},
2 {:person/id 2,
:person/name "Dafny",
:person/spouse [:person/id 1],
:person/cars [[:car/id 3]]}},
:root/person [[:person/id 1] [:person/id 2]]})
The new map is completely free from [:person/id 1]
(def people2 {:car/id {1 {:car/id 1, :car/model "T-150"},
2 {:car/id 2, :car/model "Ferrari"},
3 {:car/id 3, :car/model "Mercedez"}},
:person/id {2 {:person/id 2,
:person/name "Dafny",
:person/spouse nil,
:person/cars [[:car/id 3]]}},
:root/person [[:person/id 2]]})
Hello Clojurians! Please note that I am currently looking for a Head of Engineering, Senior Product Designer & Full Stack Developer with a clojure centric fintech based in Old Street, London. Salary range is from £65K -£120K basic per annum. Please share or advise if you are interested and I am happy to disclose full details. Have a good evening!
Hello Clojurians, any ideas how to use Python Pickled model in Clojure web app?
Hello 🙂 French Clojure engineer here. I will spend some days in Iasi in September, any idea where I could hang out with some other Clojurians?
Your core.clj file contains a call to a function (hello-clojurians)
that will cause that function to be called every time that file is loaded. Occasionally you do want such side effects just from loading a file, but again, maybe best to comment out that call in most situations.
Hello Clojurians, I have a question, a topic is a bit unusual, but still, would like to hear your opinions. The government plans to build a road through my country-side valley, and it will be a 4 lane transit highway, mostly will be used for lorries, which cuts through my private lands and the road will be roughly 50-60 meters away from my house. I feel rather sceptical regarding the project due to number of reasons. What do you think? What’s an European experience regarding building such roads through the Alps? A video demonstration of the project - https://youtu.be/KyDEWCxnvrE?t=102 here at 1:42, the closest building to the right is my house, circled on a photo here.
ohmyclj v0.4 - generate/dev/test/run Clojure scripts.
https://gitlab.com/eval/ohmyclj/tree/master#ohmyclj
Quick Intro
Given the executable script hello_world.clj
:
#!/usr/bin/env ohmyclj
"DEPS='clj-time=0.15.1'"
(ns user
(:require [clj-time.core :as t]))
(defn -main [& args]
(println (str "Hello, " (nth args 0 "World") "! Time is now " (t/now))))
(ns test
(:require [clojure.test :refer [deftest is testing are]]
[user]))
(deftest main-test
(is (some? (user/-main "Foo")) "FIXME"))
ohmyclj allows you to:
- run it: ./hello_world.clj Clojurians
(e.g. Hello, Clojurians! Time is now 2019-04-15T14:47:27.235Z
)
- try it: ohmyclj repl hello_world.clj
(iterate quickly with helper-functions like (reload)
)
- test it: ohmyclj test hello_world.clj
Try it yourself: ohmyclj new > hello_word.clj
Hello clojurians, I’m looking for a tutorial project implementing simple CRUD API powered by Datomic (ideally with front end in cljs) to use for training purposes with some newcomers. I went through some awesome-clojure lists, with no luck. My next best option would be to write something on top of mbrainz.
Hello Clojurians! I want to learn Clojure by building projects or solving a problem or writing a compiler. Although I am familiar with basic syntax but I never got to building anything. I tend to appreciate a language and learn more by building. Can anyone please recommend any free online course(prefer videos) or beginner level Github repo which can be used as a reference.
Hello game-developing Clojurians. Our small group in Vancouver is attending Global Game Jam. We're looking at CLJ/CLJS libraries for games. What could you recommend, please? If you used Arcadia and Unity engine, have you developed on Linux? Do you know if https://forum.unity.com/threads/unity-on-linux-release-notes-and-known-issues.350256/page-2 works well?
Hello! What tools do clojurians prefer for static analysis (e.g. to catch arity exceptions in compile time)
👋 Hello fellow SF Clojurians. My company, Funding Circle, is hosting a Clojure meetup on Jan 31st and we are looking for some more speakers. Topics could include how-to’s, show and tell’s, library showcases, philosophies, etc. Anything under the Clojure umbrella. If you have a talk you’d like to practice, this is a great opportunity for that too! We typically have from 20-40 people who attend. You can message me here or email me at <mailto:katie.ballinger@fundingcircle.com|katie.ballinger@fundingcircle.com>. Please let me know if you’d like to speak or know anyone interested. Thanks! Here’s a link to the event: https://www.meetup.com/The-Bay-Area-Clojure-User-Group/events/255945018/
Hello Clojurians! CircleCI is hiring a Staff Backend Engineer (remote). Feel free to DM me with any questions or apply using the following link: https://grnh.se/f997295f2
Hello fellow Clojurians 👋 If the new year brings the question of a new job using Clojure then please do check us out: http://bit.ly/2F3zByf
Hello Clojurians! Anyone here interested in a fresh opportunity next year? We’ve nearly secured a place on an accelerator program and thus would like to add a developer to the team 🚀 When I say nearly I mean we’re amongst 20 startups being interviewed for 10 places 🤞 You must be able to live and work in Germany for a minimum of 6 months, starting mid Feb 🇩🇪 Some experience with Natural Language Processing would be an advantage. PM me for more details 😊
Looking for nREPL sessions...
Clojure 4 VS Code activated. Happy coding! ❤️
Please file any feature requests or bug reports here: <https://github.com/PEZ/clojure4vscode/issues>
I will also respond to any @pez mentions in the #editors shannel of the Clojurians Slack: <https://clojurians.slack.com/messages/editors/>
Note: Autolinting is now diabled by default. You need to enable "clojure4vscode.lintOnSave" in your editor settings to use it. But first install Joker: <https://github.com/candid82/joker>
-------------------------
Connected session: clj
clj session used for cljc
Evaluating:
(println "hello world")
----------------------------
nil
Hello! We (@U09LZR36F ,@U0CMVHBL2 and author) started something new: https://clojurians.zulipchat.com/ It’s an opensource chat-platform with searchable history that uses topics for focussed discussions. We think it can be a good addition to the ‘chat-toolbox’ alongside Slack. While Clojurians-Slack is really popular, we think that it’s not a good place to host smaller communities within the Clojure communities (eg local user groups and smaller open source projects)[^1]. Messages being deleted within a week, and hence, most smaller channels looking deserted is one of the main reasons we think. We’d like your feedback on this! And how you think we might get this subcommunities ‘back’ within the community. Please join us in discussing this further on https://clojurians.zulipchat.com/#narrow/stream/151155-community-development [^1] Some stats: of the 65 slack-channels that could be associated with local groups (`clojure-*` channels), there are only roughly a dozen that one could call active.
hello clojurians. where can I see the list of all available protocols?
(hello-clojurians " : ) ")
Hello Clojurians, we're looking for Clojure developers at Zervant, for a position in Espoo, Finland. We're a Finnish company focused on helping entrepreneurs get paid faster with our innovative invoicing solutions targeted at European markets. Clojure and AWS are some of the technologies you'd be working with. Check out our careers page, to get an idea of the working environment: https://www.zervant.com/en/careers/ And you can apply directly here: https://www.recright.com/careers/en/zervant/software-developer-5bb497dd4a376c0f87e572a5 Unfortunately we're not offering re-location or remote work possibilities at the moment. Don't hesitate to contact us if you want to find out more.
Hi fellow clojurians 👋 I’m feeling fed up with “modern” javascript development it’s become to much with a new tool/preset/framework every week to keep on top off so I started learning Elm about 18 months ago which I really enjoyed and was my first experience with FP. I’m now taking the leap into cljs and so far so good so I thought I would say hello as I’m pretty sure I’ll be here on a regular basis.
Hello Clojurians, I'm new to Clojure, can you please suggest or give ideas to work on a beginner project to enhance my knowlegdge.
Hello which is the channel for clojurians workshop tomorrow please?
Hello Clojurians 🙂 I’ve a very much off-topic question which I am unsure where to ask. Since this community is quite diverse I’m hoping to find an answer here. I would like to generate some diagrams in SVG with a “rough” texture. For example, with apple keynote/pages, it is possible to generate arrows looking like this: https://puu.sh/BBNVi/ad81bfe672.png. From what I can see it looks like they are using a unique texture for the line, which simply gets stretched to fill the length of the arrow. Do any of you know where I could find such textures free of rights?
Hello clojurians
(println "Hello Clojurians")
Hello Clojurians 😛 I got a shared container of rabbitmq. Bunch of my application uses the container and as a host the containers alias is used (in that case 'rabbitmq'). Of course when I change the host to 'localhost' the connection is successful. My question is how do you handle connecting to the shared container via the REPL? Is there some common strategy to that problem in Clojure world?
Hello Clojurians, I need some architectural advice. I need some tips for my "Que", people will visit my site, and they will que up and I will have to chunk each "player" into batches. Got any tips on where I can start (reading material)? I never built something like this from scratch. Was thinking about using rabbitMQ.. I will batch them in players/users of 2/10/50/100 depending on what they play.
Hello Clojurians, I’ve been playing with yada lately and decided to go “simple” route, build on my own instead of using edge. So, right now have a resource defined, route created and trying to fire-up aleph server, which I’m having tough time to achieve.
Hello Clojurians, I’m going through documentation and I’m having hard time grasping what is flash parameter here:
(defn home-page [{:keys [flash]}]
(layout/render
"home.html"
(merge {:messages (db/get-messages)}
(select-keys flash [:name :message :errors]))))
Hello Clojurians, I’ve read a few articles about Yada, also received a guidance and recommendations by Ray, but somehow I’m unable to follow Yada’s the manual. Details: 1 - cloned edge and ran boot dev (inside edge dir) and I receive the following error:
giga@ubuntu:~/edge/app$ boot dev
java.lang.Thread.run Thread.java: 748
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 624
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1149
java.util.concurrent.FutureTask.run FutureTask.java: 266
...
clojure.core/binding-conveyor-fn/fn core.clj: 2022
boot.core/boot/fn core.clj: 1032
...
boot.core/construct-tasks core.clj: 986
java.lang.IllegalArgumentException: No such task (dev)
clojure.lang.ExceptionInfo: No such task (dev)
line: 3
2 - boot.properties:
#<http://boot-clj.com>
#Sun Aug 19 02:23:39 PDT 2018
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_VERSION=2.7.2
BOOT_CLOJURE_VERSION=1.9.0
Tried on mac then then on Ubuntu in VM, result is all the same.Hello Clojurians, I’ve read a few articles about Yada, also received a guidance and recommendations by Ray, but somehow I’m unable to follow the manual.
Hello fellow Clojurians, CircleCI is hiring a Staff Backend Engineer. The person will program in Clojure and Go on a daily basis, working on a fully distributed engineering team. Role can be global remote. https://boards.greenhouse.io/circleci/jobs/4055655002 Regards, Brian CircleCI
Hello Clojurians, I work in the recruitment team at Trainline. We are Europe's biggest train booking platform and based in London and hiring for Clojure Data Engineers. We recently opted to use Clojure in our Data Engineering team, a huge part of our operations as we look to create more personalisation for our customers. We do Data Engineering within the Hadoop ecosystem (we use Spark) and stream processing with Kafka. We are always looking to utilise better personalisation solutions with Machine Learning and use the AWS infrastructure for cloud. Further info here or DM me https://jobs.lever.co/thetrainline/26ba37fa-5bc0-40f4-9891-576562a282d3
Hello fellow Clojurians, CircleCI is hiring a Staff Backend Engineer. The person will program in Clojure and Go on a daily basis, working on a fully distributed engineering team. Yes remote. Don’t sponsor Visas. https://boards.greenhouse.io/circleci/jobs/4055655002 Regards, Brian CircleCI
Hello all, I am looking for speakers for the London Clojurians meetup for September, October and November. Lightning talks, experience reports, live coding, remote presenters, tool use, anything related to Clojure and functional programming would be great to hear about. Personally I would love to hear about Clojure and Kafka experiences. We have 1,115 members now, so it would be great to have some regular talk nights up until the Conference in December. We also have some variety of locations, so it won't be just SkillsMatter. Send me a direct message on Slack if you are interested.
Hello fellow Clojurians, I try to get js routing with secretary working, but it just won’t do. Is someone available who may be able to help out? Don’t want to flood the channel with code samples.
Hello Clojurians! I’ve been googling for the whole day but without any result: how can I sort datoms/entitines by their tx date in descending order? For example, to show the last 100 messages on the dashboard.
Hello ! Taking the liberty to create a channel for https://github.com/gnl/ghostwheel for the following reasons:
- Even in alpha Ghostwheel is useful, I have an internal library targeting the exactly same goals and it serves us well
- Clojure does not enforce purity and spec can be tedious, Ghostwheel seems to be a good approach to making Clojure code safer, more documented, and easier to work with in a team, without relying on static type checking
- This is not the first time someone try to enhance defn
to provide documentation and assertions :
- standard :pre
and :post
,
- clojure.spec.alpha/fdef
with :args
, instrumenting only :args
,
- orchestra
, checking also :ret
and :fn
,
- clojure.core.typed/defn
adding type annotations
- defn-spec, etc …
so a lot of clojurians seems to need to make their functions safer.
Since Ghostwheel is in alpha and is missing some features (IMHO), I think we have a lot to talk about 🙂
Hello fellow Clojurians, I just wanted to put out a general question for the community. What is the benefit of writing css using garden compared to just writing plain old css in css files?
Hello Clojurians, Could someone help me with the spec registry? I store my specs in database and until now i've used a macro which s/def-ed them to the spec registry, but now i have to solve this without a macro, but can't figure out how on earth I could do that. I don't really like this registry stuff, strongly prefer stateless, functional solutions. How could I use my specs (often nested) without a registry or add them to the global registry dynamically via a function? Many thanks
Hello Clojurians, anyone here from Russia? Does any of you have any idea how much do developers charge in Moscow for migrating from Wordpress to Wix?
Hello fellow Clojurians, DoctorEvidence is looking to hire an additional developer for our remote team (EU timezones preferred)! Details can be found here https://gist.github.com/joelkuiper/230d3b317702f385cc9e821a8ba9f889 drop me a note at <mailto:jkuiper@doctorevidence.com|jkuiper@doctorevidence.com> if this sounds interesting to you 😀. Alternatively, we are also looking to hire an expert in machine learning & natural language processing, where Clojure experience is nice-to-have but not required.
Hello Clojurians. I am putting out a call for a new team member that can work along side two other high-quality team members/developers. Titled under, “Clojure Developer w/ Front-end and Back-end Experience” this channel is a good fit for the post but we all know the devil is in the details. https://www.flyerbee.com/jobs/clojure-developer-w-front-end-and-back-end-experience/
hello CPH Clojurians, would like to reboot this channel, anybody out there?
Hello Clojurians, I’m working through Clojure Applied and can someone please help me figure out this small snippet of code?
Hello Clojurians, I’m having hard time running emacs as a server. in .spacemacs server option is t and when I try to use emacsclient -t in terminal, it just open a gui. Any ideas?
Hello Clojurians! I have a very small problem with my production site, but still annoying enough! In my css I use 'url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2000' height='2000' viewBox='0 0 800 800''..., but after lein uberjar it looks like "url("data:image/svg+xml,%3Csvgxmlns='http://www.w3.org/2000/svg'width='2000'height='2000'viewBox='00800800'%3E%3Cgfill='none'%3E%3Cgstroke='%23ab8e1b'stroke-". So all spaces gets removed. What do you think causes that? I guess some cssminifying from lein uberjar, but I can't manage to find it.
Hello Clojurians, doesn’t Pragmatic Bookshelf has some awful print/paper quality or am I too pedantic? Frankly, it’s rather irritating…
Hello clojurians. ❤️ My new app is launching soon, and I'd like to invite you to get early access! Here’s what it’s all about: Asking “Does ANYONE ... ?” to wide audience doesn’t always get you much. Asking “Do YOU … ?” to the right person does. 💥 SELECT lets you share selectively, based on the context of your relationships, and start simultaneous personal conversations on the fly. We’re changing how people share. :thinking_face: No impersonal distractions. No exposure to outside eyes. Just powerful, personalized, private social sharing to the right people every time. I’d love to hear your feedback, and hope to see you on the wait-list: 👏:skin-tone-3: https://s.id/1mwr
Hello Clojurians, I’m playing with Clojurescript and when I use (:body response) it returns a plain string, thus I’m unable to parse it further using keywords.
Hello everybody! After writing some advent of code solutions and playing with some other Clojure code. I think it's time for me to learn by doing something "real". I write a small scrapper to check my "library borrowings". https://github.com/Charlynux/library-monkey At the moment, the code is pretty small (100 lines) and straightforward (no error-handling, no tests,...). It works, but I would appreciate some review of my code. All advices/critics are welcome. (A more experiment clojurian can probably point some "not the Clojure way here" or "too much code there".)
Hello fellow Clojurians... Quick search of camera returned nothing... I wonder if anyone used 'react-native-camera' component with re-natal ? I would appreciate if I can get any help regarding my issue
Hello clojurians! After a few years of permanent jobs, I'd like to go back into contracting. I'm close to 18 years experience in software engineering, the last 4 full-time on Clojure projects. I'm author of a Clojure book (work in progress), a screencast, a few articles, a couple of workshops and frequent speaker at conferences. I'm London based and can work on-site or remotely (which I did in the past, including US timezones). If you think I can help with your team or projects, please drop me a line (DM here or «reborg @ http://reborg.net»). Thanks!
Hello clojurians! After a few years of permanent jobs, I'd like to go back into contracting. I'm close to 18 years experience in software engineering, the last 4 full-time on Clojure projects. I'm author of a Clojure book (work in progress), a screencast, a few articles, a couple of workshops and frequent speaker at conferences. I'm London based and can work on-site or remotely (which I did in the past, including US timezones). If you think I can help with your team or projects, please drop me a line (DM here or «reborg @ http://reborg.net»). Thanks
Hello guys! This is the first time i tried making google closure externs and using them with :advanced compilation. My extern javascript file has a constructor called CrossStorageClient with some prototype functions. My ext.js looks like this: var CrossStorageClient = { "_generateUUID": function () {}, "_getOrigin": function () {}, }; CrossStorageClient.prototype = { "clear": function () {}, "close": function () {}, ... etc I achieved that now closure doesnt rename any functions in my extern js in advanced mode, I can def (def storage (new js/CrossStorageClient "http://...")) but then if i tries to call (.close storage) closure renames storage and .close too Sorry as i said im pretty noob to the closure compiler. What is the point here? any help is appreciated my fellow Clojurians!
Hello guys! This is the first time i tried making google closure externs and using them with :advanced compilation. My extern javascript file has a constructor called CrossStorageClient with some prototype functions. My ext.js looks like this: var CrossStorageClient = { "_generateUUID": function () {}, "_getOrigin": function () {}, }; CrossStorageClient.prototype = { "clear": function () {}, "close": function () {}, ... etc I achieved that now closure doesnt rename any functions in my extern js in advanced mode, I can def (def storage (new js/CrossStorageClient "http://...")) but then if i tries to call (.close storage) closure renames storage and .close too Sorry as i said im pretty noob to the closure compiler. What is the point here? any help is appreciated my fellow Clojurians!
Hello, I recently relocated to Calgary, Alberta just poking around to see if there are any Clojurians who may want to do a Meetup sometime?
Hello Clojurians 👋 I'm trying to play around with the following vector of maps. I have the definition for the vector example
and I'd like to use (map)
to add a calculated map to each map within example
(e.g. each map's :some-count
value divided by the max :some-count:
value from the entire vector of maps).
(def example [{:name "Foo" :some-count 18} {:name "Bar" :some-count 24}])
(def max-some-count (reduce (fn [result coll] (max result (:some-count coll))) 0 example))
(map
(fn [max-count coll] (conj (/ (:some-count coll) max-count) coll))
max-some-count
example)
My example above is currently complaining about an IllegalArgumentException Don't know how to create ISeq from: java.lang.long clojure.lang.RT.seqForm (RT.java:542)
Hello. Any volunteers to speak at the next London Clojurians talk night, Tuesday 3rd October at SkillsMatter. Thanks
Hello Clojurians! I am gearing up to organize a ClojureBridge MN “ClojureBridge aims to increase diversity within the Clojure community by offering free, beginner-friendly Clojure programming workshops for underrepresented groups in tech.” http://clojurebridgemn.org/ http://www.clojurebridge.org/ Who is interested in helping me organize the event? I am looking for a couple of board members to help out. I am guessing 3-4 hrs per month for maybe 3 months or so, then the event itself, which includes a Friday evening and a whole day Saturday. I don’t know dates yet. Let me know if you are interested or know someone who is. Thank you!
Hello! I have a seq of hash maps and I’m looking for the most Clojurian way of looping through every maps and adding a new key/value pair based on the map at the previous index… For example, I want to add a new :b
key which value would be the :a
key of the previous map. I initially have [{:a 2} {:a 7} {:a 1} ...]
and the output should be [{:a 2, :b 0} {:a 7, :b 2} {:a 1, :b 7} ...]
So we could say B(x_i) = A(x_i-1). Using a loop + recur is super easy, but implies a lot of boilerplate… Is there a cleaner way?Thanks!
hello all. I'm new to clojurians and wondering, do I need to pay money to see the full slack history or is that not even an option?
Hello fellow clojurians. Yet another question about ServletContext
and :init
I am trying to figure out how to get servlet-context-path
during :init
stage. I am aware that servlet-context-path
is available in the request map but I need to have it on earlier stage.
What I am trying to achieve is to dynamically initialize Logback and create log file with a name that reflects application context name i.e. service#v1##201708111212.log
:thinking_face:
Hello fellow Clojurians,
How can I get just the “raw HTML string” from an ajax GET request?
(I’m making a GET request to <http://www.wordreference.com/enit/welcome
>)
With Clojure, I can simply slurp the url (which I then parse and scrape with Hickory, etc.).
Clojurescript doesn’t have slurp
. So I’m instead making an AJAX GET request to welcome-url. (Or is there a simpler way?). When I console-log the response of the GET request, I see the HTML string I want to parse, but the response itself is a Javascript object Object. How can I simply get the “raw HTML string”?
(Apologies if this isn’t the right place for these kinds of questions?)
Hello fellow clojurians. I am eager to refactor part of my function that use destructuring but having some problem. Here is a code snippet that has sequence of files that are grouped based on hash, uploaded and flattened back.
(->>
items
(group-by :hash)
(pmap #(let
[[hash [{file :file}] :as group] %]
(if (upload hash file)
(second group))))
(flatten))))
Is there a better way to destructure group into key and values to avoid performing (second group)
?Hello clojurians, i am looking for Clojure opportunities! Have more than 5 years of production experience! I am super active, reliable and communicative. Contact information: http://alehatsman.com/ Feel free to contact me any time!
Hello, clojurians of San Francisco. I’m the CTO. of Topology Eyewear ( https://www.topologyeyewear.com ). I’m looking for a contractor who has some experience with (or a truly zealous enthusiasm for) clojure, datomic, and AWS. To describe the work briefly, this is for enhancements to a Clojure-based scalable task queue that manages compute jobs for our made-to-measure eyewear product. What does that mean? Basically We have an iOS app that takes a selfie video, then we use our own computer vision models to build a 3D model of your face, then we offer an augmented reality try-on of glasses, and finally we have custom manufacturing technology to build a pair of glasses based on the 3D model. Clojure runs our API server and job runner. The code is stable, fairly well documented, and I can describe it in detail since I wrote it. This contract would be a for a minimum of a couple weeks, with opportunity for a longer-term engagement or a full-time role. On-site full-time in San Francisco. You’d get to see our manufacturing robots! Please DM me if you’re curious.
hello fellow clojurians
Hello Clojurians, Here is the list of meetup topics that some of you are interested. If you think of any more, please reply with your ideas and I'll add it to my list. Speakers are always needed, it can be 15 or 30 mins talk on anything, so please volunteer to speak on a topic that you have interest in for our monthly Singapore Clojure Meetup https://www.meetup.com/Singapore-Clojure-Meetup/, this will benefit everyone in the meetup group. Om Om.next Re-frame /Reagent Rum Apply Clojure in project Hands on coding session Clojure.spec
hello fellow clojurians
Hello clojurians, I am looking for clojurescript freelance gigs. For the past 5 years I have been programming native apps for Android and iOS using Java / Kotlin and Objective-C / Swift My current focus is react, react-native, clojurescript, reagent, re-frame for web, iOS and Android. At the moment I am finishing up two Clojurescript / react-native apps: One app I created for an solar plant construction company in California which they use to track progress of build sites. Another app I created for an university in Norway which tracks behaviour and motivation of patients. My strength is that I am flexible, work autonomically, communicate progress well and I deliver early and often. Day rate is 300 euro which is based on 6 effective hours at 50 euro per hour. As a freelancer based in Germany I am able to invoice American companies without any issues. No agencies and recruiters ✋ I like to work for customers directly.
Hello Emacs Clojurians! I am quite new to programming, Clojure, and Emacs. So I have some embarrassing questions and problems. So here goes my first issue: When I execute cider on emacs it starts a REPL, but it doesn't generate a buffer for me to access the REPL, anyone has experienced this problem and maybe knows how to solve it? Feel free to suggest the simplest answers since, as I mentioned before, I'm incredibly new to this. Thank you all in advance!
Hello Clojurians! I’m kind of having a tough time on this brink of a new year :) I’m in Boston on F1 Visa, one that doesn’t allow me to work and I didn’t intend, and I didn’t have to, either - as I was concentrated on my classes this fall, but recently some unexpected events has happened and here is my proposal: I’m willing to write code part-time for the cost of a rent, on-site or remote doesn’t matter. My resume is attached below. Happy Holidays! 🙃
Hello Clojurians! I’m kind of having a tough time on this brink of a new year :) I’m in Boston on F1 Visa, one that doesn’t allow me to work and I didn’t intend, and I didn’t have to, either - as I was concentrated on my classes this fall, but recently some unexpected events has happened and here is my proposal: I’m willing to write code part-time for the cost of a rent, on-site or remote doesn’t matter. My resume is attached below. Happy Holidays! 🙃
hello clojurians, are clojurec ( https://github.com/schani/clojurec ) and clojure android dropped ? looking for some language to support both ios and android also functional but it seems like clojure tools are dropped
Hello clojurians! If any of you need additional help/support this holiday season feel free to shoot me a message, I am donating my time as a gift 🎁 https://medium.com/degree9/pre-clojureremote-17-year-end-cleanup-e829757a1f89?source=linkShare-a2d5aa46d2e3-1481424862
hello fellow clojurians, have one question
Hello Clojurians, does command line api has some “reserved” args? I’ve defined -m in cli args, but for example
lein run -m 11
> Option -m requires a valid namespace argument, not 11.
but if I change -m to -x in core.clj and then run:
lein run -x 11
it works…
I’m confused… :D
Hello, @U21FUPUAJ told me this is the best place to improve my Clojure! I'm looking forward to solve some AoC with some fellow Clojurians. I have lots to learn 😉
hello clojurians
Hello clojurians
hello Clojurians,
Despite lots of enthusiasm, I've been struggling for days in my very first steps with Clojure.
Problem is I've downloaded the lein script, chmoded it as executable, but when I run lein repl
I got an error
Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.12 from/to central (<https://repo1.maven.org/maven2/>): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Could not transfer artifact clojure-complete:clojure-complete:pom:0.2.4 from/to central (<https://repo1.maven.org/maven2/>): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Could not transfer artifact org.clojure:clojure:pom:1.8.0 from/to central (<https://repo1.maven.org/maven2/>): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Exception in thread "Thread-3" clojure.lang.ExceptionInfo: Could not resolve dependencies {:suppress-msg true, :exit-code 1}
When I visit https://repo1.maven.org/maven2 with my browser (Chrome), All is fine. So I can access the repo from my laptop, but that lein can't, for whatever reason.
I've researched solutions online, tried completely purging java from my system, I've also tried different java implementations without success.
I'm under Ubuntu 15.04.
I'd really appreciate help and suggestions with this.
Thanks !!hello fellow clojurians
Hello Clojurians! I was wondering if there is something similar to http://locust.io/ in Clojure for benchmarking requests per second, does anyone know?
@U0DBDNPL6 I believe the lambda pred is always invoked with a vector, i. e. [:string "Hello Clojurians"]
hello clojurians
Hello Clojurians, I wonder how relevant “Clojure Programming” is right now as 4 years have passed after the publication, and perhaps so much has changed in Clojure
Hello Clojurians, I’m following to Chas’s Clojure and I’d like to hear the clarification of the idea of “code as data”… On the surface we all “know” but in fact it’s not clear for me… Ok I get the structure of code respects AST(Abstract Syntax Tree) in all meanings, but the example of reader is a bit confusing, or rather not clear enough.
The extract from the book: the operation of the reader is completely defined by a single function - read - which reads text content from a character stream and returns the next data structure encoded in the steam’s content”
- what is this “data structure" and how is it encoded?
Hello Clojurians
Hello Clojurians :simple_smile: I’m struggling with IntelliJ and Cursive… I don’t get how to evaluate function from editor to the REPL interactively.
Hello clojurians!
Hello clojurians. I'm doing clojure koans at the moment. Can someone tell me what is wrong here:
(defn recursive-reverse [coll]
(if (empty? coll)
coll
(conj (recursive-reverse (rest coll)) (first coll))))
(recursive-reverse `(1 2 3)) # => (1 2 3)
Hello everyone, do you or someone you know live in Louisville, Kentucky and would be interested in starting a Louisville Clojurians meetup? If so, please get in touch!
Hello fellow Euro-clojurians. During a recent panel, I had the chance to ask Alex Miller from Cognitect regarding this year's edition of our beloved conference. His response was that they are still looking for venues, hope to announce something soonish and the conference will posibbly be "more towards the Fall". So there's that :simple_smile:
Hello Clojurians, I am looking for two software engineers with Cloure(script), Python and Java expertise. Location flexible in the USA with some travel.. Message me for details..
Hello, Clojurians. :simple_smile: I’m new to clojure and want to set up a simple web project to start learning clojure’s web ecosystem. My preliminary research tells me to look at Ring + Compojure + Hiccup. Am I in the ballpark?
hello fellow Clojurians. I wrote up a post mortem on a production bug in our Clojure service. Just thought I would share it: http://techblog.roomkey.com/posts/too-many-files.html
hello clojurians
Hello London Clojurians - how’s ‘Ole Blighty today..?
hello clojurians :simple_smile:
Hello Singapore Clojurians! Reminder: This Wednesday is our next meetup. Details here: http://www.meetup.com/Singapore-Clojure-Meetup/events/222759034/
hello fellow remote clojurians
Hello, I am a Clojurian in Kansai, and organizing Kyoto Clojure Users Group. https://e6a302c89833f490f111a94ebc.doorkeeper.jp/ We are looking forward to meeting you at our meetups. Thanks!
Hello Clojurians!