Fork me on GitHub
#clojure-uk
<
2018-05-30
>
thomas07:05:12

mogge 😼

3Jane07:05:21

Life is pretty good, yeah

3Jane07:05:41

Baked oat/raisin cookies :)

otfrom07:05:21

c is for 🍪 and that is good enough for me

otfrom07:05:48

🍪 🍪 🍪

otfrom07:05:49

starts with c

3Jane08:05:28

Already unit tested :d XD

yogidevbear08:05:38

You need more unit testers 😋

😂 4
3Jane09:05:20

There will be team integration tests after lunch 😉 if the product works out, it’ll be ready for a launch at clojurex XD

💯 4
guy08:05:47

morning!

agile_geek09:05:20

I am missing my Clojure ‘fix’. This Java stuff is OK but it’s not fun.

clojurian 8
guy09:05:38

Maybe you could start a side project?

guy09:05:02

Or just think about starting one and have all the fun of generating an idea 😄

korny10:05:26

Morning. Kid is napping so might get some clojure time!

👍 20
clj 12
otfrom12:05:04

baby goats can be very distracting when trying to get things done

otfrom12:05:11

they are soooooo adorable.

12
agile_geek12:05:55

I grew up around ‘kids’. I can do a brilliant goat impression too!

agile_geek12:05:05

@U0524B4UW of the impression…. or of me as a kid amongst the kids (cos video camera’s didn’t exist then!)

mccraigmccraig12:05:06

i was thinking of the goat impression, rather than impossible vidz

agile_geek12:05:54

I’ll save it for if I get a talk submission accepted in a conference and will send you a link to the video! 😉

3Jane12:05:02

little hellboys, basically?

thomas12:05:38

goats eat anything!

👍 8
agile_geek12:05:53

Our’s used to love thistles! But not as much as the Donkey we had when I was a kid.

3Jane12:05:36

Can not think of goat in web context without this

yogidevbear12:05:21

That's a cool project

3Jane12:05:12

I like it as a method of teaching

3Jane12:05:24

“find the problems”, which is very similar to what people actually do in day jobs a lot

Sam H13:05:42

anyone here use transit? Seems transit-java writes BigDecimals with an ~f https://github.com/cognitect/transit-java/blob/master/src/main/java/com/cognitect/transit/impl/WriteHandlerMap.java#L43 but transit-cljs doesn’t know what to do with ~f bit of a weird mismatch

mccraigmccraig13:05:00

@shan i switched a program from EDN to transit recently because it was easy to add custom read/write handlers to transit... if there's a read handler missing in cljs, then you should be able to add it easily enough

Sam H13:05:10

>(transit/write (transit/writer out :json) {:test 123.1M})
nil
> (.toString out)
["^ ","~:test","~f123.1"]
So I’d just need something with:
(def custom-transit-read-handlers
  {"f" (reify ReadHandler
           (fromRep [_ o]
             ;; some equivalent cljs conversion to bigdec?

mccraigmccraig13:05:14

something like that - assuming that the "f" tag isn't some special reserved thing

Sam H13:05:11

it’s a bit strange as the transit-clj lib will convert BigDecimals

["^ ","~:test","~f123.1"]
but currently the transit-cljs reader doesn’t know how to decode it so it’s outputting
[TaggedValue: f, 0.159]
I guess "f" isn’t reserved then

mccraigmccraig13:05:44

maybe there isn't a decent standard js structure to hold a BigDecimal without loss ?

mccraigmccraig13:05:30

there seem to be some npm packages which implement BigDecimals though, so you could do transit read/write handlers with one of those

Sam H13:05:28

true, interestingly if you do a BigDecimal in cljs it comes out as

> (cognitect.transit/write (cognitect.transit/writer :json {}) {:test 123.001M})
["^ ","~:test",123.001]

Sam H13:05:41

so it looks like you can just pull out the value: http://increasinglyfunctional.com/2015/11/12/transit-clojurescript-big-decimal/

>(cognitect.transit/bigdec "123.1")
#object[Transit$TaggedValue [TaggedValue: f, 123.1]]
> (.-rep (cognitect.transit/bigdec "123.1"))
123.1

Sam H14:05:20

FYI, I ended up doing this until we decide what BigDecimal implementation we use:

(ajax/transit-response-format
 {:handlers {"f" (fn [value]
                   (js/parseFloat value))}})

yogidevbear15:05:10

tfw you're trying to untether from an old laptop that you're about to stop using

maleghast15:05:48

Oh man, I know those feels @yogidevbear

maleghast15:05:52

When I sold on my first Retina MacBook Pro when I was out in The Philippines... I spent a day double-checking and triple-checking that I had imaged the drive before I finally wiped it and then I kept it with me all day, looking at the stickers and so on... Was a SAD day...

yogidevbear15:05:33

I've been going through all my code projects and making sure I've committed them to git repos somewhere on the interwebs

maleghast15:05:26

I delete code projects that I can't be bothered to commit to a git repo somewhere. It's very freeing.

👆 4
💯 4
yogidevbear15:05:01

Yup, been doing some of this too

dominicm16:05:11

I have an experiments repo where I put interesting snippets

dominicm16:05:30

another option is creating a verbose git repo and marking it as archived

agile_geek16:05:09

I just used rsync to copy my home dir to a new clean user on my new laptop…worked a treat.

dominicm18:05:56

https://severeoverfl0w.github.io/naga-editor/ I made a thing, it infers some family relationships. Delete the closing paren to see it in action.

👍 8
3Jane22:05:22

I played with adding more siblings

3Jane22:05:46

[:mary :sibling :anne] adds a property on :mary

3Jane22:05:13

[:anne :sibling :mary] adds a new box anne with relationship sibling

3Jane22:05:45

it’s fun 🙂 what’s this based on?

3Jane22:05:20

I’m not sure what the direction of the relationship is, [:anne :parent :mary] adds mary and george with a parent relationship

dominicm05:05:31

In that case it's saying that Anne's parent is mary. Because anne and george are siblings, if one has a parent, so does the other!

3Jane07:05:26

oh, nice! I’ve only seen https://github.com/cerner/clara-rules before

dominicm09:05:00

I'm liking naga a little more because of it's focus on keyword over records

3Jane10:05:05

it reads well too

korny19:05:22

I now put my whole mac world on DropBox - either directly, or via encrypted backup scripts:

ls -al ~ | grep ">"
lrwxr-xr-x    1 korny  staff          33  5 Oct  2017 .aws -> ManualBak/secure/data/config/.aws
lrwxr-xr-x    1 korny  staff          39 22 Feb  2017 .oh-my-zsh -> ManualBak/secure/data/config/.oh-my-zsh
lrwxr-xr-x    1 korny  staff          44 23 Feb 16:57 .password-store -> /Users/korny/Dropbox/macbook/.password-store
lrwxr-xr-x    1 korny  staff          33 21 Feb  2017 .ssh -> ManualBak/secure/data/config/.ssh
lrwxr-xr-x    1 korny  staff          35 19 May  2017 .zshrc -> ManualBak/secure/data/config/.zshrc
lrwxr-xr-x    1 korny  staff          20 26 Feb  2017 apps -> Dropbox/macbook/apps
lrwxr-xr-x    1 korny  staff          32 20 Feb  2017 bin -> /Users/korny/Dropbox/macbook/bin
lrwxr-xr-x    1 korny  staff          24 19 Feb  2017 prj -> /Users/korny/Dropbox/prj
lrwxr-xr-x    1 korny  staff          21 20 Feb  2017 sprj -> ManualBak/secure/sprj

korny19:05:47

Moving to a new mac, I generally have to reinstall OSX apps and homebrew apps manually, but I find that’s a good way to ensure the machine is relatively clean. Everything else is on DropBox (or work stuff on Google Drive)

korny19:05:12

(`ManualBak` is a bit of a legacy name - I used to time machine everything except ManualBak and a couple of others. Now I no longer bother, I’ve never restored from Time Machine, and DropBox is faster and more robust)