Fork me on GitHub
#clojure-uk
<
2020-01-30
>
otfrom00:01:06

even Mike Godwin has weighed in

Wes Hall00:01:24

Does Godwin’s law still apply if I’m complaining about other people doing the comparison ;)

otfrom00:01:45

pretty sure you lost the argument, yeah. 😉

otfrom00:01:29

but if we're going to keep this up we should move it to #brexit

otfrom00:01:03

but I'm going to be anyway b/c I'm tired

Wes Hall00:01:41

@otfrom Seriously though, I just cringe a bit when people make these fictional shows and claim that they’re going to “take on” some real world political issue. They get to define the world in which those choices are made. I can make anything look like the right decision if I get to write the context and consequences in a script. It’s dumb. In an ideal world, everybody should recognize the dumb immediately. People just have a blind spot for this “trick”, when it suits their own personal politics. It’s better to engineer that world in a way that the decision is controversial, or had unexpected consequences that may have left the protagonist wishing they had done something else. I hope they’ll do this, because if it’s going to be 10 or whatever episodes of them hammering on about how obviously right certain things are, because the script says, then it’s playing tennis without the net. We’ll see... 🙂

Wes Hall00:01:57

...and night 🙂

seancorfield00:01:45

something something fictional show something 🙂

Wes Hall00:01:15

@seancorfield best to read all or none. “Some” is less effective;)

seancorfield00:01:42

(I'm always surprised at how animated people get about opinions expressed in fictional shows)

seancorfield00:01:55

(and, yeah, I read the entire scrollback)

Wes Hall00:01:24

@seancorfield Well, fair enough. I grew up on TNG so it’s my “thing”. That said, I do think there is a wider point about, Hollywood, celebrity and politics... but Ricky Gervais said it better at the golden globes :)

seancorfield00:01:18

For some definition of "better". Mr Gervais says a lot of things that upset various groups of people at various times.

Wes Hall00:01:15

@seancorfield Haha! Yeah. It’s great 😉

thomas08:01:09

I liked TNG as well. and Voyager as well.

dharrigan08:01:02

Good Morning!

dharrigan08:01:18

For me, the best scifi series was Babylon 5 🙂

❤️ 8
👶 4
dharrigan08:01:38

now, the effects etc., do not age well what so ever, but the storyline was fantastico!

thomas09:01:53

what I find funny/amusing/fascinating how Start Trek completely missed out on wireless... Cmd. Data would have a constant connection with the ships computer(s) and not use a console to interact with.

guy09:01:10

Morning! 👋

Wes Hall10:01:09

“Lt Cmdr Data is now in pairing mode”

3Jane10:01:45

oh gods someone write the fanfic quick

😂 8
otfrom10:01:22

and here is some commented code showing how I use core.async to turn some input into multiple outputs

(let [;; set up the input
        input-chan (a/chan 32)
        input-mult (a/mult input-chan)

        ;; set up the reduction end points
        plus-chan (a/reduce + 0 (a/tap input-mult (a/chan 32)))
        all-chan (a/into [] (a/tap input-mult (a/chan 32)))
        zero-chan (a/into [] (a/take 1 (a/tap input-mult (a/chan (a/dropping-buffer 1)))))]

    ;; pipe in the data
    (a/pipe (a/to-chan (range 34)) input-chan)

    ;; collect the results
    {:all (a/<!! all-chan)
     :plus (a/<!! plus-chan)
     :zero (a/<!! zero-chan)})

otfrom10:01:50

I'm sure it could use more sugar but that is the basic structure I think

Ben Hammond10:01:16

what does core-async get you in this case that plain old clojure doesn't?

Conor10:01:21

Plus-chan is kawaii

otfrom10:01:57

I just want to cuddle little, round zero-chan

Ben Hammond10:01:41

(for me it comes down to back-pressure-as-killer-feature)

otfrom10:01:20

modularity and using all the cores (esp when I use pipeline or pipeline blocking rather than a/pipe if I have expensive data generation, which I do atm)

👍 8
otfrom10:01:31

and not over-running the resources on the machine

otfrom10:01:42

which is partly the back-pressure

otfrom10:01:50

there are a few sharp edges on the chan interactions (the mults, chans, and dropping-buffers as I learned today) but I like that I'm still doing things essentially with map/filter/remove transducers and then into/reduce/transduce at the ends

otfrom10:01:13

so in a lot of ways it is very similar to my "plain old clojure" code. I just use a/ a lot more often. 🙂

reborg10:01:09

is that a parallel map-values?

otfrom10:01:18

I'm doing some work with a simulation model for Looked After Children atm and the simulation is reasonably expensive (calls out to R to do some work). It was really good to be able to make it so easily parallel with this

(a/pipeline 3
                   input-chan
                   (map #(projection/project-1 projection-seed model-seed max-date %))
                   (a/to-chan (-> (rand/seed seed)
                                  (rand/split-n n-runs))))

👍 4
otfrom10:01:59

@reborg some of the transforms might be trickier than just map-values, but in this case I think it is

otfrom10:01:11

you have a lot more experience of getting all the cores going than I do

reborg11:01:30

was just trying to understand the use case, I think I see now, it’s taking the same stream of data and doing 3 different computations with the same data, in parallel?

reborg11:01:23

thanks, not very proficient with core-async, always good to see how it used in the wild

otfrom11:01:26

for this example. In my actual code (this was me creating a small example for some stuff I didn't understand) there will be more than 3 different computations.

otfrom11:01:30

btw, I have no idea if I'm using core.async in a reasonable way or not. All the examples I see are about dealing with concurrency and use go blocks directly. I almost never use go blocks directly (unless I'm doing something with an atom or in cljs)

reborg11:01:40

more or less how many outputs?

otfrom11:01:00

couple dozen maybe. Some will go through a few steps of processing before getting to a point they get written out. I do lots where I want to output/capture intermediate calcs so that we can explain what the simulation is doing so I use a lot of mults on mults on mults

otfrom11:01:29

for my current work on LAC I at least need to show: - total LAC pop my week - total LAC pop by month - age break down of LAC by month/week - placement break down of LAC by month/week - age & placement break down of LAC by month week - number of care starters by month week (age/placement/age & placement breakdowns), do it again for care leavers - show people moving from one care type to another (age/placement etc)

otfrom11:01:00

results go into a spreadsheet (thank you docjure) and into a lot of charts

otfrom11:01:08

(thank you cljplot)

maleghast11:01:35

Man, this is way cool

otfrom11:01:36

we do the same for SEND, but I've not retrofitted this structure to that model. It is very similar tho

maleghast11:01:24

I totally have to get my head around this stuff - I can see a million ways I could use it.

otfrom11:01:22

this kind of splitting up data through the process is something I always wanted to be able to do in hadoop or spark but couldn't do

otfrom11:01:35

here are my real chicken scratchings if you want to see something real: https://github.com/MastodonC/witan.cic/pull/25/files#diff-44e7d3a1eaefad433d81ca89b652afcfR226

reborg11:01:57

@otfrom is the input all going to memory? I guess the dozen+ transforms are mostly reducing thing?

otfrom11:01:47

@reborg yeah, most of the transforms are reducing (turning counts across simulations into histograms)

otfrom11:01:19

so there shouldn't be too much data in flight at any time if back pressure, lazy seqs, and buffer sizes work

otfrom11:01:50

there are some things I want to write out to file directly as they might get a bit large. I'm still working on that bit.

Wes Hall11:01:38

@otfrom Super nice! Just goes to show, somebody can be wrong about trek but still a whizz with core.async 😛. Seriously though, appreciate the sharing. It's quite timely for me because I need to do a little API work today and tomorrow and need to be aware of rate limiting. Perhaps a pipeline with a timeout channel is a nicer way to do this than a "sleep".

otfrom11:01:06

@wesley.hall I didn't know you were a whiz w/core.async

Wes Hall11:01:25

😂 Touché

otfrom11:01:36

could have used your help earlier then. 😉

otfrom11:01:51

btw, the #core-async is super friendly and helpful

Wes Hall11:01:10

One of the few channels here I don't seem to be a member of 😉

Samuel11:01:29

Morning all!

Helen12:01:56

Morning Sam

👋 4
rhinocratic13:01:59

Just looking through job listings on StackOverflow. I find it interesting that companies appear to use the Clojure tag as a "lure" - then make no further mention of it in the body of the ad (or merely say "it would be great if you were interested in...").

3Jane13:01:24

filter for "passionate"

😂 4
3Jane13:01:48

I've seen Scala used for that, too

3Jane13:01:30

No, honestly, it's like asking for people with any degree: you're sure they can put enough sustained effort to get a degree. Most people learn Clojure after work, so in effect the job adverts are asking for people who self-train after hours. (And also are known to be somewhat-senior developers, and also functional programming is "known to be hard" so prestige, etc.)

3Jane13:01:12

(Maybe I'm too cynical and someone in the company wants to introduce Clojure and it's easier with other fans, but the lack of mention in the body of the ad is conspicuous)

3Jane13:01:19

(((I like brackets!!!)))

👍 4
rhinocratic13:01:12

I think you're correct - that was my interpretation, so maybe I'm a cynic too. I also have a fondness for brackets, and have no problem with nesting them in prose!

Wes Hall13:01:58

Agree with @lady3janepl here. Also outside possibility that they have some small Clojure deployment that just works, and a boat load of JS that is coming apart at the seams ;)

8
Wes Hall13:01:46

They’ll mention the techs in deployment but focus on the skills they most need to fix current mess.

maleghast13:01:41

Well, we have a position open and we are Clojure / Clojurescript top to bottom, real apps in Production and everything... 😉 (I mean we are not posting it on StackOverflow, but hey...) https://cervest.earth/jobs-platform-engineer/

👍 12
rhinocratic13:01:01

Hello @maleghast - I emailed Conan to ask about the vacancy, as it sounds really interesting (and very much "my sort of thing"). Unfortunately, the requirement to move to London scuppered it for me!

maleghast13:01:44

Sorry to hear that @U0HJFE43U - I am happy to offer some flexibility up to the same amount that I have; I am in the office every other week, pretty much all week and occasionally I do 2 weeks back to back. If you are prepared to do that much commuting it's an option. There is no doubt that the role can't be advertised as "remote" because we do want regular office-based time, month in month out, but we can talk about options.

👍 4
Wes Hall13:01:40

Hah! Nicely done :)

Gulli13:01:26

@maleghast Says there flexibilty with location, guessing it's not that flexible that you can be in another location in the UK?

maleghast13:01:48

@glfinn83 - It means that the role is London based, we are prepared to discuss some flexible working.

thomas13:01:54

@maleghast you should also post over in #jobs

maleghast13:01:04

@thomas - I have, twice...

jasonbell15:01:04

@maleghast - I see a second career in marketing for you! 😉

maleghast15:01:37

@jasonbell - Been there, done that, chose Software Engineering 😉

Wes Hall15:01:05

I should probably ask this in a specific channel, but just on the off chance. CIDER REPL "jacked-in" from a deps.edn project. How do you go about increasing heap space? Anybody know?

dominicm15:01:14

You create an alias with :jvm-opts

otfrom15:01:46

and then start your jack-in with a C-u C-c M-j so that you can tweak the command line

otfrom15:01:01

or at least that's how I was doing it

Wes Hall15:01:52

Ok, great thanks. I assume I can just put these opts at the root level in deps.edn too right? Don't really need the alias if I can do it without.

dominicm15:01:07

You need the alias

Wes Hall15:01:01

Oh, OK, fair enough, will add the profile. Seems a little odd that you can't do this globally. I was sure I could do that in lein.

otfrom15:01:00

can do in lein. can't do in deps.edn (at least that I've seen, you can always ask in #tools-deps )

Wes Hall15:01:03

Alias approach is not really a problem. Was just being curious. Just testing the setting with an alias now.

Wes Hall15:01:54

Works a charm. No more OOM. Thanks gentlemen.

cddr16:01:26

I found manifold easier to work with than core.async but that might just have been because using core.async had trained me how to break down problems in the way you need to for both of those libs. Suppose the big drawback to manifold is that it is clojure only whereas core.async works in clojurescript too.

dominicm16:01:33

I think core.async is a good primitive for expressing complex computations. I think manifold is good for "gimme async that works with all the fast java async things"

Wes Hall16:01:01

core.async working in clojurescript is still something that amazes me a fair bit. Stellar engineering effort there.

mccraigmccraig16:01:56

i don't think there's any reason why manifold couldn't work in js - node streams + promises are roughly the same as manifold streams + deferreds

mccraigmccraig16:01:25

although there's a bunch of difficulties with the manifold streams api that i'd want to correct in an ideal world

mccraigmccraig16:01:19

i've also found manifold (plus some stuff i'd also need to implement on top of core.async) very expressive for calculation mixed with i/o - it's all mostly map and reduce in the end, although an alts! equivalent would be nice

dominicm16:01:41

There's a manifold cljs fwiw, I think it just mimics the api though

mccraigmccraig16:01:35

oh, nice - i had no idea!

dominicm17:01:43

yeah, that's the one I'm thinking of

👍 8
mccraigmccraig17:01:38

it seems to have all the stream fns i care about too

marcus17:01:48

Hey guys, do know if there are many companies using Clojure in Scotland? Concretely Edinburgh.. :thinking_face:

dominicm17:01:25

I heard about a project in glasgow

marcus17:01:03

hmm ok, it may seem there are not so many 🙂 Thanks Dominic!

otfrom17:01:17

I know at least one clojure user in Dundee. 😉

otfrom17:01:22

and another in Perth

otfrom17:01:45

there has been a dojo in Glasgow and there was a clojure bridge in Edinburgh

otfrom17:01:51

I'm not sure what is going on there atm tho

otfrom18:01:33

what kind of Scottish clojure work are you looking for @marc.sabates.gelpi?

otfrom18:01:43

and don't forget #remote-jobs

marcus18:01:10

Yeah, remote work is a possibility but I imagine if the companies are near London and every now and then there a face to face meeting/activity the trip down to London would be.. hmm long? 🙂

otfrom18:01:34

4 hours from Edinburgh. Plenty of trains tho

marcus18:01:58

I would be looking for full blown Clojure developer.. (well, full stack, so CLJS too)

marcus18:01:22

Oh, wow, it looked like farther than that.. :thinking_face:

marcus18:01:10

You are the one in Dundee, right @otfrom?

marcus17:01:35

I've been checking Dundee.. It looks like the kind of place I'd like to live.. 🙂

otfrom19:01:44

I really like it. Used to live in London

marcus16:02:17

London is not my cup of tea.. I must confess I hate the commute and well, so many people.. I am now living in Cambridge, but there is something I miss a lot.. hills.. 😞 I lived in Somerset for 4 years and though there there are the Somerset levels.. one can always find some hills going to Dorset or even the Mendip hills.. Absolute nothing in the Silicon Fen.. 😞 And the main road exits are almost all with roadworks..

dominicm18:01:36

The job above from @maleghast is commuted from Scotland by him

marcus18:01:41

Cervest? heheh I know one of the lead devs there.. 🙂

maleghast20:01:04

Do you know Fedo, Conan or Michael, 'cos I don't know you (yet 😉 )

marcus17:01:52

Conan 🙂

marcus17:01:32

I worked with him in Entrepreneur First.. In fact he was the one who believed in me when I just started in the Clojure world..

maleghast09:02:28

Ah, cool - I'll remember you to him, and please do stay in touch if you think that you might be interested in the future as I hope / expect that we will have remote engineering team(s) before long...

marcus20:02:45

Great! 😄 And yes, definitely I'll stay in touch, thanks!

jasonbell18:01:59

Do we have to call @otfrom “the one” now, that’s so going to go to his head. 😉

otfrom23:01:04

whoa. I know core.async

jasonbell07:01:57

🙂 I was only messing and you full well know it.

maleghast20:01:13

@marc.sabates.gelpi - Also, Skyscanner in Glasgow are a Clojure(ish) shop IIRC

joetague22:01:50

Oh how I wish...sadly this is not the case

maleghast22:01:29

When did that change..?

joetague22:01:00

There used to be Clojure dojo’s run out of the Skyscanner office in Glasgow. There’s no Clojure in production.

marcus09:01:00

thanks guys. Everything Clojury I’ve seen so far in Scotland is a bit old.. The Skyscanner dojos is one and a one off Clojure Bridge in Edinburgh.. Thanks for the suggestions 🙂

maleghast20:01:31

I don't know about Edinburgh off the top of my head, sorry to say... 😞

joetague22:01:19

The only option I am aware of for Clojure in Glasgow was the Student Loans Company, however some contractors I knew that worked there stated Clojure was deemed too niche and teams were being directed to use straight up Java.

joetague22:01:41

@marc.sabates.gelpi http://devtechscot.slack.com for the Scotland specific tech scene. About 500ish members so could be a way to build up contacts. Invite link: http://links.devtech.scot/slack

marcus09:01:31

Thanks! I’ll take a look in the evening.. 🙂

maleghast22:01:15

Did Arnold Clark stop using Clojure as well, or is that still going on..? (Their head office is in Glasgow)