This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-11
Channels
- # beginners (109)
- # boot (61)
- # cider (8)
- # clara (3)
- # cljs-dev (67)
- # cljsrn (5)
- # clojure (96)
- # clojure-argentina (1)
- # clojure-brasil (2)
- # clojure-greece (10)
- # clojure-russia (114)
- # clojure-spec (51)
- # clojure-uk (45)
- # clojurebridge (2)
- # clojurescript (139)
- # cursive (18)
- # data-science (1)
- # datascript (2)
- # datomic (13)
- # dirac (2)
- # emacs (5)
- # events (1)
- # javascript (2)
- # jobs (1)
- # juxt (3)
- # off-topic (62)
- # om (10)
- # onyx (12)
- # perun (7)
- # ring-swagger (7)
- # specter (21)
- # test-check (5)
- # untangled (16)
- # utah-clojurians (1)
- # yada (2)
I’m trying to really nail the difference between cons and conj and this stackoverflow seems to cover it well enough but is there anything else that I should know [7:22] http://stackoverflow.com/questions/3008411/clojure-consseq-vs-conjlist
@roelofw Nice to see you are making progress. Don't lose heart. We all feel like this to start (or I certainly did!). It's not so much that Clojure is hard, it's that if you are used to object oriented programming (oop) and imperative programming you need to 'rewire' your brain to think functionally. This is like learning a musical instrument...it takes time and practice to make it 'muscle memory' and you find yourself taking two steps forward and one back. I went through the same kind of relearning moving from procedural programming to object oriented programming 20 years ago but I think the transition from imperative style to functional style is harder (or it just might be me being a lot older this time with a lot to unlearn!) Stick with it and this community will try and help. If you can find a Clojure user group near you it helps enormously to get help in person. I spent months learning in isolation but when I started contracting in London I went to the ldn clj user group dojo's and that helped accelerate my learning.
noobie question here. can spec
be used to force a map into a particular shape? specifically, i have a function that accepts a map as an argument and i want to drop all keys that aren't found in :req-un/:opt-un
@agile_geek thanks for the encourance words. I now trying the path of clojure koans and 4clojure after that.
Is this a good solution : "When things cannot be equal, they must be different" (not= :true true))
oke, so the 1 is rhe index . so it will be the second item in the list because the counting starts with zero
how to solve this one : (string/last-index-of "hello world, hello" "hello") CompilerException java.lang.RuntimeException: No such namespace: string, compiling:(C:\Users\rwobb\AppData\Local\Temp\form-init3402967420287402181.clj:1:1)
@roelofw look through that chapter again. hopefully you just missed how to reference the clojure string namespace. If not, open an issue and point out that you had an issue with it and hopefully it can be udpated
the less friction for newcomers the better, and I'm sure whoever runs the project would like the feedback
yep, but there is no mentioned how to reference to the string in the string exercise file
so as you fill out the koans and get them to pass, you should be evaluating the file
It is right that \n is not counting in a string. So this one is true `"Even if at first glance they aren't" (= true (string/blank? " \n \t ")) `
and if you're curious to figure out how to find out on your own, you can read the source
I google for clojure string, got the api documentation, which had a link to the source
dpsutton thanks if I want to be a good clojure developer I have to learn to do things on my own
i was just giving you an example of how i learned the answer to your question "on my own"
Some more good tips for learning on your own: in the REPL you can use these functions:
(apropos “blank”) ;; searches for functions in your loaded namespaces that have blank in the name or docstring
(doc string/blank?) ;; displays the docstring for a function
(source string/blank?) ;; displays the source code for a function
(javadoc Character) ;; returns true and opens your browser at the page for the Character class
So documentation and source code is directly accessible in your REPL.@seancorfield thanks
Can someone explain this one :
(first {:fname "Aaron" :lname "Bedra"})
-> [:lname "Bedra"]
not with the same map
seq order is guaranteed to be consistent for the same map at least within the same jvm
it’s definitely best to not worry about the order of keys in a map, and if you need some order to use a data structure designed with order in mind.
As a vim user, there is no way to put the koolaid down. Not having vim bindings just feels cruel.
I lasted ~1 year away, and 10 months of that was spent in Spacemacs. An emacs distro that uses vim keybindings.
parens are easy. after awhile they become obvious. vim keybindings make parens simple.
it is great I think if you’ve never used modal editing, but in general I like the flexibilty of just basic vim
so that command is: select text, go to the next paren and then jump to the closing paren
but honestly… anymore after a few years of clojure it doesn’t look any different than python or javascript
Clojure from the ground up is also a great resource. I’m using both clojure the brave and from the ground up
Hey any Javascript guys know what I’m doing wrong here:
function removeProperty(obj, prop) {
if ( obj.hasOwnProperty(prop) ){
delete obj.prop;
return true;
} else {
return false;
}}
justtrying to remove the prop if its there and return true otherwise false