This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-13
Channels
- # admin-announcements (1)
- # beginners (53)
- # boot (355)
- # braid-chat (4)
- # cider (15)
- # cljsjs (3)
- # clojure (88)
- # clojure-austin (1)
- # clojure-new-zealand (4)
- # clojure-russia (46)
- # clojure-uk (7)
- # clojurescript (61)
- # component (2)
- # cursive (3)
- # data-science (5)
- # datomic (6)
- # dirac (49)
- # editors (8)
- # emacs (15)
- # funcool (15)
- # jobs (1)
- # ldnclj (10)
- # melbourne (1)
- # off-topic (14)
- # om (61)
- # om-next (2)
- # onyx (32)
- # re-frame (28)
- # reagent (19)
- # test200 (1)
- # vim (3)
I have a key/value pair and I'm trying to see if the value is one of :foo :bar or :baz; does anyone know of a concise way of doing this, or will I need to use a bunch of condp/if statements?
@futuro: you have like (def baz {:foo 1 :bar 2})
and you want to see if value v
is equal to the value for either :foo
or :bar
?
@bwstearns: ah, contains is partially it
I have a function that gets passed in a map and I want to see if the map has a particular value at the same key
so it could be {:event :foo} or {:event :bar} or {:event :baz}, and I want to do something if the value for :event is either :foo or :bar
@bwstearns: exactly that!
If anyone can help me out I posted a question over in beginners https://clojurians.slack.com/archives/beginners/p1457840985000009
hey guys, just wondering - is new REPL server available in clojure 1.8 practically built-in equivalent for nREPL?
@stuartsierra How does one make sure it doesn't affect tests or get loaded in production?
Presumably lein uberjar
would be OK, if i specify the right :main namespace. Still struggling with getting lein test
to find my tests.
lein test
-> lein test user - 0 tests found, 0 tests run
danielstockton: Are you using .cljc tests with an older version of Lein?
Nope, plain .clj and lein should be the latest
And your test files are in the “test” directory? You haven’t changed the test-paths in Lein?
nope, where they got generated
only difference is adding /dev to source paths on the :dev profile and creating a user.clj user namespace
C c cZ
Hi, I am using joplin for database migrations (which relies on ragtime IIRC). Now I am trying to migrate a postgres table. My up.sql file also contains an additional INSERT statement for some base data. So far everything is working. But when I try to insert a statement into that table I get an error about a duplicate primary key. After some research I figured out that joplin somehow does not set the primary key counter after the insert statement for some reason. I am not sure about the internals, but when I execute: SELECT setval('answer_id_seq', 1);
on the table I can perfectly insert afterwards.
Now I wanted to execute SELECT setval('answer_id_seq', 1);
as part of the migration, but that is not working either, throwing another pgsqlException: Statement returned a result, but none was expected.
Any ideas how to fix that?
@talios: Yeah, I decided to learn ClojureScript because of all the awesome React-based frameworks (I ended up choosing Reagent+re-frame, with no regrets).
@talios: But, good to see you here finally! You should liven up #C0FCN8L1Y; it’s kind of quiet in there. 😛
@cky: well I heard people were talking about me in here so I thought I just HAD to grace my fans with a visit 😜
@bpicolo: There are lots of awesome books on Clojure. One of my favourites is the Joy of Clojure. Can’t say anything about how well it works for newbies.
@talios: I can’t remember now, but did you work at SMX? Do you still work there now? I guess you have many fingers in many pies.
(In theory, I could just Google that information, but I’m in my own way trying to test my memory skills.)
I had a short stint at Stack Overflow last year, but this year I’m deciding to do my own thing. I hope it works out. We’ll see.
But that’s quite scary - since I’ve only been in Auckland 20 years, so that’s almost half my Auckland life. here.
I’m working out my mid-life crisis being a rock concert photographer again tho - something I’ve done off and on over the last 15 odd years, but never to this level.
Oooh, life is definitely too short not to follow your dreams, so if you can do it in any way, now’s definitely a good time to do it.
Oh wow, that’s very awesome. So do you sell the pictures, or how do you commercialise your work? Or is this more of a hobby?
This was the closest I ever got to “shooting” at a concert: https://www.instagram.com/p/lxF923kEJO/
I'm not even sure anymore. Clojure is actually pretty difficult to get used to coming from a heavy python webdev background
Do blog about your current struggles. It will help other newcomers to functional programming and Clojure.
Decided to do the backend in python for now primarily because I wanted at least something in my stack to not feel like a blocker : P
I got into Scheme back in 2002, and have been hugely into FP since then. It was only more recently that I started playing around with Clojure and ClojureScript, though.
No, seriously, when I attended one of Cognitect (back then Relevance)’s talks on Datomic, I really, really loved it.
Still, I’m not trying to convert you. I can understand how the SQL options for Clojure could be more limited when you compare with the likes of SQLAlchemy (I have not used it, but I have heard about it; also have not played with SQL libraries for Clojure so can’t say how well they do or not).
The closest thing to SQLAlchemy I’ve played with is Sequel (for Ruby), and I don’t know how the two compare.
When working on semi-serious startupy things I try not to go toooo crazy with the stack, for obvious reasons haha
@cky: http://www.chaliceofblood.net/blog/2016/3/6/madonnas-rebel-heart-at-vector-arena - sadly no sales. and we don’t get paid either - do get free tickets to shows tho.
@talios: Nice, free tickets to Madonna is definitely worth it. (Me, as a Taylor Swift fan (as you might have seen in the scrollback), wouldn’t mind a free ticket to Taylor Swift either. ;-)) I hope your love of concern photography does become something you can do full-time and make a living from.
Hah. Sadly no free ticket. We escorted in for the allotted 3 song shoot then escorted back to the doors of Vector. Most shows we we get to stay for the whole thing but Vector don't often give comps
Thankfully coding funds the camera habbit (mostly) but no one really pays for music photos. Musicians are hip like sports people. Tho it does open me up to other possible shoots
Hehehe re “mostly”. Well, hopefully you’ll find some awesome mixture of coding and photography that pays well and fuels your passion. 😄
I’m in the process of creating a platform for doing coding tutoring. I love coding and I love teaching, so that’s my way of blending the two. 😛
http://libel.co.nz/blog_posts/8698-gbh_photos that was a fun gig last week, but GBH isn't Grevious Bodily Harm for no reason!