Fork me on GitHub
#clojure-uk
<
2018-03-26
>
yogidevbear09:03:03

Morning ✨ ☕ ✨

guy09:03:26

morning 🙂

chrjs10:03:14

Morning all.

maleghast12:03:29

Hello All, good "morning" 😉

Rachel Westmacott13:03:05

rcfotd:

-------------------------
clojure.core/subs
([s start] [s start end])
  Returns the substring of s beginning at start inclusive, and ending
  at end (defaults to length of string), exclusive.

acron13:03:04

Why was subs not designed to work on sequences? What does one use to perform subs-like operations on a sequence?

tmulvaney13:03:13

there is subvec for vectors

acron14:03:37

didn't know about subvec, cheers @tmulvaney

Rachel Westmacott14:03:51

iirc there are caveats with subvec

Rachel Westmacott14:03:09

like it retains a reference to the underlying vector

tmulvaney14:03:03

yes that is correct it does hold a reference so its not memory efficient

acron14:03:24

subs calls down to Java string fns

reborg14:03:05

It does hold a reference (preventing garbage collection) but subvec it's O(1) space+time. The caveat is that if you are splitting a large vector v into tiny bits with subvec with the idea of never using v again, you probably want to (into [] (subvec i j v)) before moving forward.

davesnowdon14:03:45

Anyone here have any recent experience of using clojure on android? Have done some quick googling but all the links that turned were from circa 2015. I cam across this https://github.com/clojure-android but it seems to have been abandoned I know there is a #clojure-android channel but that doesn't look to have any recent activity

guy14:03:29

there was a london clojurians meet up where you got to do your own android app in clojure

guy14:03:38

i found it to be quite fun, but really slow to start

guy14:03:49

i think swiftkey might use it? i could well be wrong

guy14:03:24

that was years back however

Sam H14:03:36

I’ve seen a talk about using http://cljsrn.org/

davesnowdon14:03:39

lein-droid doesn't look like it's been touched for a year or so and builds are currently marked as failing so it doesn't give me a lot of confidence.

davesnowdon14:03:56

I was wondering whether people have lost interest and are using react-native instead

davesnowdon14:03:13

@shan thanks for the EuroClojure link - I'll take a look

davesnowdon14:03:59

In my case I was looking at using it on an embedded system (a robot) so react native isn't a good fit

thomas14:03:27

I think cljsrn is the way to go these days... and you get iOS as well to a certain extend

thomas14:03:34

hmm didn't read that last sentence... doh

thomas14:03:20

@davesnowdon is the robot running Andriod?

davesnowdon17:03:52

yes, the part of the robot developers have access to is running android at least