This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-23
Channels
- # bangalore-clj (1)
- # beginners (23)
- # boot (90)
- # cljs-dev (133)
- # cljsrn (5)
- # clojure (104)
- # clojure-austin (1)
- # clojure-belgium (2)
- # clojure-dev (12)
- # clojure-gamedev (4)
- # clojure-italy (2)
- # clojure-russia (6)
- # clojure-spec (30)
- # clojure-uk (117)
- # clojurescript (197)
- # core-async (25)
- # cursive (9)
- # datomic (95)
- # devops (1)
- # dirac (49)
- # emacs (1)
- # hoplon (3)
- # immutant (10)
- # lein-figwheel (2)
- # luminus (5)
- # off-topic (43)
- # pedestal (1)
- # protorepl (1)
- # re-frame (13)
- # sql (5)
- # untangled (1)
Bore da
it would be cool if we could create an app/thing that would let us take the temperatures around us in our respective offices, then show them on a map.
https://www.forecast.co.uk/temperature/ like this but less blocked off?
I'm surprised something better doesn't already exist. I guess it's more of a toy than practical? Not gonna change as you go across the country really.
Yeah could be, maybe its a dumb idea. But having a more granular look at offices around the
If it's around the office there's https://www.wunderground.com/ where you can send your data.
https://www.wunderground.com/maps/eu/uk/Temperature.html nevermind, they're on it
@guy nice idea. Texas Instruments do a nice little IOT device with a load of sensors and that sends the data direct to IBM Bluemix platform, all the visuals are done for you. Not sure if you can mix others information coming in though.
as far as I remember (this was 4-5 years ago) I think they have an api. The problem a long time ago is that it was missing data point in the UK and we wanted data in the world too.
Not overly hard, Alasdair Allen did some good write ups on the Ardruino. Just gotta be careful with the 3v line. Readings were easy, it’s just case of where/how you’re going to send the data.
@rickmoynihan always good to see the open data crowd. 🙂
Morning all
Needs to work, but wants to Clojure. What a conundrum!
are you london based @yogidevbear ?
Nope, I live in Horsham (West Sussex)
About a 55min train journey from London Victoria
Do you live in London too?
brixton, which is about a 40 min door to door for me (though I have a 10/15 min walk to the station on brixton end)
That's nice in the summer months
Context switching between Python and Clojure is not as hard as I expected it to be...
last year I accidentally wrote (func arg1 arg2)
in pycharm and it didn't complain about the syntax.... so it confused me for quite a while.
http://norvig.com/lispy2.html follow this, and then just write lisp again
But when I want to write Lisp I use Clojure and that can interop with Java, so I am going to assume it can interop with Jython as well..?
I'm having a really weird issue with a csv, I can pull all the values out using get-in
, apart from the date which is a date string, even if I copy a row out from the repl into the editor and def it, it still return nil. I tried not using keywords, and even renamed the field, but it still won't play ball
this is the def
I know, I changed it to bob
sorry, it was one of the straws I was grasping at 🙂
@geek-draven that def works for me on http://tryclj.com
weird, it's not in my editor, even 'find' is returning nil. Thanks. I'll try running it in lein rather than proto repl and see if that makes a difference
nope, lein is returning nil too
@geek-draven try (keys test-data)
and (vals test-data)
.
@dominicm this is what I get for (keys test-data)
also getting nil in http://tryclj.com too
@geek-draven how are you getting the key out?
no, just the value
sorry
(get-in test-data ["bob"])
I did (get test-data "bob")
which worked. Didn't try get-in. Though wouldn't expect differing behaviour.
still get nil with that in tryclj
> (get test-data "bob")
"06-05-2017"
> (get-in test-data ["bob"])
nil
> (get test-data "bob")
nil
woah, wtfhave I broken Clojure 😞
> (keys test-data)
java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Var$Unbound
Give me some Clojure:
> (def test-data
'{"store_name" "Leather Lane",
"net_sales" "2231.87",
"gross_sales" "2782.90",
"check_count" "321",
"bob" "06-05-2017",
"promos" "36.50",
"comps" "88.65",
"tax" "0.00",
"guest_count" "328.00",
"payment" "2657.75"})
#'sandbox18953/test-data
> test-data
{"promos" "36.50", "comps" "88.65", "payment" "2657.75", "guest_count" "328.00", "store_name" "Leather Lane", "net_sales" "2231.87", "tax" "0.00", "gross_sales" "2782.90", "bob" "06-05-2017", "check_count" "321"}
> (keys test-data)
java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Var$Unbound
I removed the quote from my def after @glenjamin mentioned it
yep, I'm getting the error now
Mine is 19031
I can values and keys from my local repl, but the get
and get-in
are both returning nil
I've spent the week parsing emails, pdfs and xlsx files, so thought a csv would be an easy Friday afternoon task 😄
Thank you, that works!
yes, might ignore the header row and write my own
looks like it is weird characters, if I copy the key from the def and manually type 'bob' I get false
Thanks for both your help