This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-07
Channels
- # beginners (41)
- # boot (38)
- # cider (17)
- # cljs-dev (52)
- # cljsjs (3)
- # clojure (200)
- # clojure-italy (8)
- # clojure-russia (50)
- # clojure-spec (28)
- # clojure-uk (45)
- # clojurescript (28)
- # core-async (9)
- # core-matrix (2)
- # cursive (16)
- # datascript (15)
- # datomic (50)
- # dirac (5)
- # emacs (20)
- # figwheel (8)
- # flambo (2)
- # hoplon (10)
- # incanter (1)
- # jobs (1)
- # leiningen (2)
- # lumo (26)
- # mount (171)
- # off-topic (22)
- # om (54)
- # onyx (2)
- # pedestal (27)
- # re-frame (10)
- # reagent (12)
- # ring (27)
- # ring-swagger (3)
- # rum (2)
- # slack-help (1)
- # spacemacs (134)
- # specter (6)
- # sql (15)
- # testing (20)
- # uncomplicate (5)
- # unrepl (49)
- # untangled (9)
- # yada (29)
Mogge šø
@malcolmsparks handy,but only for the specific example I was giving - actually I'm throwing together a script to collect git info, looking for ways to go from a list of remotes to a map of data about each remote. It seemed a common task, I was surprised there wasn't a function for it.
morning
given the meaning of the word āmapā it seems particularly surprising to me
non-random core function of the day:
clojure.core/partition
([n coll] [n step coll] [n step pad coll])
Returns a lazy sequence of lists of n items each, at offsets step
apart. If step is not supplied, defaults to n, i.e. the partitions
do not overlap. If a pad collection is supplied, use its elements as
necessary to complete last partition upto n items. In case there are
not enough padding elements, return a partition with less than n items.
Bore da
@peterwestmacott nice, but I find myself using partition-all
more often as I'm breaking a sequence into 'chunks' but don't want to drop the last items on the floor.
yes, partition has some useful variants
you can also partition-all
with transducers, which you canāt with partition
my random discovery: clojure.set/map-invert
- inverts a map, swapping keys with values. No idea why itās in clojure.set
Hmm - on the emoji - I should probably remove it and let some of the folks upload their own logo or something š
I think there has to be a balance between having a core function for everything and a small composeable core lib. @reborg will tell you the core library isn't small any more...
yeah, itās not a function Iād use a lot! Really, that should be like group-by
and return {1 [:foo :bar]}
but it doesnāt.
(group-by second {:foo 1 :bar 1})
gets you about half way thereā¦
Slightly off-topic, but is there anyone on here who might be able to provide an early, early start-up technologist, say like me, a corner of an office in London Mon-Thurs next week..? Cheeky, I know, but we are not yet possessed of an office and while I will be meeting with my new colleagues for some of the time, for the rest I am going to need somewhere to actually get some work done...
There may be a chance we can pay you, but I am not expecting that will be simple... We will__ be prepared to pay it forward in the future, however...
And now a Clojure question... Does anyone have any ideas on where to start if looking for tools / libraries in Clojure for manipulating .shp (Shape) files?
I may well do... I am also considering putting the shape files in question into PostgreSQL under postGIS and then talking to a DB, but I am keeping my options open, and was hoping__ for a library... Still if I have to build my own that will be a fun and educational experience...
@otfrom - I am reading around the subject, but this looks as though it might be helpful as well... https://github.com/factual/geo
@maleghast: weāve used http://www.geotools.org/ in the pastā¦ specifically the org.geotools/gt-shapefile
package. I didnāt write the code on that project though, so not sure why it was chosen in preference to anything elseā¦ though geotools should be pretty comprehensive.
Thanks @rickmoynihan I will take a look.
@maleghast import that .shp into PostGIS and thereafter play with GeoJSON etcā¦ iāve done a tonne of geospatial stuff and PostGIS was always a most excellent starting point for import and normalization
@mccraigmccraig - Thanks... I was starting to feel that was going to be what I wanted, after an afternoon's research. Good to get some validation on that though, š
unless you are lucky you are going to have to change the projection of at least some of your datasets - PostGIS makes that a bunch of SQL and is rock solid
I am going to see if I can get postGIS installed on here with homebrew, or even Docker, perhaps...
i havenāt worked with postgresql/postgis for a while, but the homebrew install used to be fine
...although the tools to convert the shapefile into SQL need to be available to me. Hmmmm
@maleghast shp2psql hereās an example invocation i used for importing NUTS boundaries https://gist.github.com/40b1675f6eb01cd3fcd0cf41bf9cf168
oh, but i see what you mean - you will need to invoke shp2psql
I have imported a shape file and am now using brew cask to install Qgis so I can test the DB quickly