Fork me on GitHub
#clojure-uk
<
2017-05-09
>
thomas07:05:32

morning ๐Ÿ˜ผ mogge

Rachel Westmacott07:05:20

rcfotd:

-------------------------
clojure.core/*'
([] [x] [x y] [x y & more])
  Returns the product of nums. (*') returns 1. Supports arbitrary precision.
  See also: *

thomas07:05:23

can we see an example please?

thomas07:05:37

how does it differ from *?

Rachel Westmacott07:05:04

arbitrary precision

reborg08:05:06

Good use cases for auto-promoting functions is cryptography

thomas10:05:20

thank you for the explanation

maleghast12:05:25

Anyone know what the hell is going on here..?

Cannot open load file: No such file or directory, tramp-cache
This is what I am getting when I try to connect Emacs / Cider to the Reply I already have running with M-x cider-connect

maleghast12:05:03

Google seems to be ignorant of this error...

mccraigmccraig13:05:09

@maleghast i would guess you are, maybe inadvertently, trying to use tramp to access a remote file ( https://www.emacswiki.org/emacs/TrampMode ) but tramp is somehow misconfigured ?

mccraigmccraig13:05:33

(accent on the guess there)

maleghast13:05:04

@mccraigmccraig - Thanks for that, I will investigate...

thomas13:05:26

a discussion we are having at work here... a POST request to a valid URL... but in the body there is an ID which isn't in the database. 400 or 404 as return code?

thomas13:05:50

I'd vote 400 as the problem is in the body, not in the URL

mccraigmccraig13:05:02

yes @thomas 400 or 404 ๐Ÿ˜‰

mccraigmccraig13:05:37

i'd probably got with 400 for the same reasons as you though

mccraigmccraig13:05:22

(i.e. the resource the POST was directed at exists, so 404 seems inappropriate)

maleghast13:05:42

@thomas - FWIW, I would vote with you and @mccraigmccraig - HTTP 400 feels like the appropriate response.

maleghast13:05:30

@mccraigmccraig - I decided to reset my Emacs environment, as I could not find anything about Tramp in my setup, but would admit that I use Emacs the way a lot of people use cars, i.e. without REALLY understanding the engine. Resetting everything made it work fine.

thomas13:05:02

my understanding was that 404 was related to the correctness of the URL...

thomas13:05:47

anything in the body that is wrong (ie. malformed JSON or invalid data in the JSON)

mccraigmccraig13:05:55

@maleghast i highly recommend http://spacemacs.org/ as a way of managing your emacs config - good default themes, good window management, excellent concept of layers (= collections of packages + config)

thomas13:05:02

and in the body you can say what was wrong.

maleghast13:05:03

@mccraigmccraig - A few people have suggested Spacemacs to me of late and I am interested by it, but I am in a quandry as I have a setup that I like and am comfortable with and I am leery of change.

maleghast13:05:44

Also, I don't like EvilMode any more and iirc Spacemacs defaults to it..?

mccraigmccraig13:05:10

@maleghast when you install you get to choose between evil keybindings and holy ... i went with holy

maleghast13:05:36

Oh ok, well that's not so bad then...

maleghast13:05:41

I will "get around to it"

maleghast13:05:05

At the moment I am trying__ to get my head around Conditional Probability Distributions in Bayesian Networks.

maleghast14:05:40

Anyone on here know anything about Bayesian Networks..? I am trying to make progress on an online course, but until I pass this one quiz I cannot access the second week content... ๐Ÿ˜ž

maleghast14:05:22

I have nailed apparently "harder" questions later on in the week1 content, but I can't seem to get my head around this particular issue.

thomas15:05:43

sorry @maleghast can't help you.

thomas15:05:57

everything I know comes from wikipedia

maleghast15:05:03

NP, thanks anyway, @thomas ๐Ÿ™‚

maleghast15:05:59

Yeah, I have plundered Wikipedia, the other course material that I can access and several PDFs I have found of papers that are freely available, but so far I can't find a way to calculate the number of independent parameters that are required to create the CPD for a given node.

maleghast15:05:09

It seems as though there should be a way to do this.

thomas15:05:31

is it just me or is Cucumber actually a rather crappy tool.... you just add another level of obfuscation to your test code and it isn't clear at all what the actual test does?

minimal15:05:28

not just you

glenjamin15:05:50

itโ€™s supposed to be a communication tool

glenjamin15:05:05

for developing the language of the domain in concert with your business/product people

glenjamin15:05:15

almost no-one actually uses it like this

thomas15:05:51

I find it very confusing. and most annoyingly you can't reuse cucumber statements (we use cucumber-jvm) in different tests (at least not easily)

glenjamin15:05:19

you canโ€™t?

maleghast15:05:26

@thomas - Yep, it's a great tool if used as intended, as a lightweight way for non-engineers to describe behaviour in such a way as to empower testing of that behaviour. We used it at the BBC to great effect, once people got over the urge to write Features for ABSOLUTELY EVERYTHING, and once people understood that they needed to be maintained, updated and when appropriate deleted.

thomas15:05:42

and haven written 600 lines of java in the last week or so I have been kindly remembered why I like Clojure.

thomas15:05:36

@glenjamin it seems that the cucumber statements are global.

maleghast15:05:37

@thomas - I'm sorry ๐Ÿ˜ž

glenjamin15:05:00

oh, i see what you mean

thomas15:05:08

so when doing some checking the context in which the check should happen is lost.

thomas15:05:24

(at least what I know)

glenjamin15:05:32

yeah, itโ€™s a domain language - if you wanted to the same sentence to do something else youโ€™d need it to be in a different bounded context

glenjamin15:05:41

which in cucumber terms would be a different app, i guess

thomas15:05:13

yes I guess so....

thomas15:05:27

anyway.. .time to go home....

maleghast17:05:30

For those keeping score, I figured out how to calculate the number of independent parameters required to formulate the CPD of a given node given its parents in a Bayesian Network, and I FEEL GOOD! (now) ๐Ÿ™‚

maleghast19:05:49

Only took me 4 days and 10 attempts - the course only allows you to attempt the required assignments once per hour and I had other stuff to do... ๐Ÿ˜‰

seancorfield19:05:19

LOL. We're just pushing back so I'm about to go dark and then sleep!! Lots to do when I hit England, organizing stuff around my father's funeral, his house, the will, and a bunch of other I've not had to deal with before.

seancorfield19:05:51

My mum is falling to pieces a bit so most of this will be "moral support" for her.

bronsa20:05:18

ow sorry to hear that

maleghast20:05:02

@seancorfield - Very sorry to hear of your loss, Sir. I realise that it may be a forlorn hope, but fwiw I hope that the next few days are as uncomplicated as possible for you, seeing as they won't be easy I expect.

seancorfield20:05:12

Ok. Better switch the phone off!