Fork me on GitHub
#clojure-uk
<
2018-05-11
>
otfrom07:05:08

yay!

😂 4
otfrom07:05:26

(/◔ ◡ ◔)/

seancorfield07:05:22

My "yay!" is due entirely to finally being able to install WIndows 10 17666 after 36 hours of failures (and 17661 restarted Windows Explorer every two minutes so it was next to useless).

seancorfield07:05:37

(but it's bedtime here)

jasonbell07:05:42

morning you krazy katz

3Jane08:05:14

> måning y’all ! I solved a mystery

3Jane08:05:24

for too long has the English grammar (spelling rather) confused the issue

3Jane08:05:57

people don’t wish each other “good morning”. they say “good moaning”.

bronsa08:05:27

I thought they just looked at each other in disgust and grunted

3Jane08:05:27

(which is then followed by a conversation about weather, wrong kind of leaves, and other customary subjects)

3Jane08:05:44

you grunt when you don’t feel neighbourly

bronsa08:05:56

I still have a lot to learn about british culture it seems

3Jane08:05:13

(On a more serious note, have you read “Watching the English”? It’s fascinating.)

3Jane08:05:05

(My landlord recommended it to me after I moved to the UK and now after a couple of years it’s funny to point at things and say “oh yeah I read about that” XD )

bronsa08:05:18

ha, no sounds fun -- will queue thanks

3Jane08:05:00

It is fun 🙂

3Jane08:05:03

An anthropologist went “why do we only ever study ‘other people’?” and studied her own culture using the same tools. Personally, I found it most endearing when she described how she almost gave up on the idea because she dreaded purposefully bumping into people on the train and not apologising! (to see what they would do)

3Jane08:05:45

ahhh that graph looks appropriate XD

danielneal08:05:45

it's soo hard to even almost bump into someone and not say "oop. sorry"

rhinocratic08:05:51

Thing is, if you bump into a Brit on the train it's quite likely that they will apologise to you.:thinking_face:

danielneal08:05:18

I've definitely apologised to inanimate objects for almost bumping into them in the past

😂 4
danm08:05:30

I've done it absent mindedly, certainly. Because it didn't register until after I had apologised that it wasn't another person

3Jane09:05:35

I apologise when people walk into me -.- best way to train yourself out of it is to move to London though, people walk into you all the time XD

maleghast08:05:37

Morning 🙂

maleghast08:05:23

I felt as though this was an early start for me, but y'all have been up and at 'em far longer as far as I can tell!

mccraigmccraig08:05:27

@lady3janepl did my use of scandi å (å sounds like the aw in paw so is phonetically correct for "morning" sounded without rolled r) help solve the mystery ?

otfrom08:05:46

I like being really chipper in the morning - partly to convince myself that the world won't end given that I've not had enough coffee yet and partly because living in the UK has turned me into a complete wind up merchant

otfrom08:05:36

@mccraigmccraig I'm always disappointed you aren't more rhotic

mccraigmccraig08:05:23

@otfrom all those universes in which you don't have coffee end up rather badly

bronsa08:05:33

I've given up caffeine 3 years ago

bronsa08:05:59

no I lie, I've given up coffee 3 years ago and caffeine last year

mccraigmccraig08:05:41

i can do rhotic if it pleases you @otfrom

otfrom08:05:53

you can roll your r's?

mccraigmccraig08:05:11

i can't skarre very well though

danielneal08:05:55

but what about espressos

mccraigmccraig08:05:10

i keep giving up caffeine, but i keep falling off the wagon too. seems i just like the taste of coffee

otfrom08:05:45

I need to prevent Parkinson's

otfrom08:05:52

so keep giving me the coffee

bronsa08:05:01

yes it makes my heart cry everytime I smell that sweet coffee smell

jasonbell08:05:50

@bronsa 100%, I stopped drinking it four years ago, not by choice, when you walk past a love fresh pot it's just not fair

bronsa08:05:27

yeah I quit because of stomach pains + insomnia, it's so unjust

3Jane08:05:28

@mccraigmccraig yes, you’re the source of enlightenment:D

danielneal08:05:01

they need to invent a form of coffee where you inhale it it always smells better than it tastes

3Jane08:05:35

What’s the other thing called though

3Jane08:05:51

Have you ever found that working?

mccraigmccraig08:05:20

like caffeine but nastier 🙂

bronsa08:05:04

startup idea

rhinocratic08:05:10

I tried dandelion coffee. Once.

😂 4
3Jane08:05:59

You can get no caf grain coffee (try Polish or health shops), that’s good

3Jane08:05:18

But doesn’t smell like proper coffee :(

danielneal08:05:37

In the case of coffee, the taste is also hampered by the fact that 300 of the 631 chemicals that combine to form its complex aroma are wiped out by saliva, causing the flavour to change before we swallow it, Prof Smith added.

3Jane08:05:25

Mind blown... can we get a chemist to help with it?

danm09:05:52

Coffee's OK, but I generally prefer a good earl grey

danm09:05:02

Don't have it at work though, because we don't have a proper kettle

rhinocratic09:05:49

Those zip taps don't quite cut it for tea-making. One needs a kettle for a proper cup of brown joy.

danm09:05:29

Cup of brown joy? Are you a Prof. Elemental fan?

danm09:05:47

(I'm not, personally, but a number of my mates are)

rhinocratic09:05:34

I wouldn't count myself an ardent fan, but I'm aware of his works. 🙂

4
rhinocratic09:05:18

Has anyone here played with GraalVM yet?

bronsa09:05:37

there's a #graalvm channel

😱 4
bronsa09:05:42

a bunch of people have

👍 4
rhinocratic09:05:18

@bronsa Thanks - I'll take a look!

yogidevbear09:05:53

Good moaning

😄 4
👍 8
alexlynham10:05:47

I agree, ziptaps make tea taste a bit weird

3Jane10:05:41

but coffee isn’t? the ancestors are turning over in their graves so fast that they generate electricity

3Jane10:05:57

(…wait. did they bury or cremate them in here?)

danm10:05:04

Regular tea is meh, though my wife seems to live on it. Earl Grey is 👌:skin-tone-2:, but she's allergic to it 😞

danm10:05:16

Also I drink it with milk and sugar, which a lot of people seem to think is weird

mccraigmccraig10:05:45

i've resorted to earl grey with two bags and milk when i've run out of other caffeinated beverages. it's ok, not much better or worse than builder's tea, but a pale shadow of the magnificent flavour of that first double-creamed & lengthened double-espresso

mccraigmccraig10:05:33

@lady3janepl i suspect my dour ancestors have long since given up on me

jasonbell10:05:19

I live on builders tea

danm10:05:33

NATO standard. Milk + two

danm10:05:23

I do like chai lattes as well. One of these days I'll have to try a proper chai. We have one team member from India and another from Pakistan and both have espoused the joy of proper chai where milk + a lot of sugar is kept on a rolling simmer and the tea leaves are steeped in it for a long time

rhinocratic10:05:16

Usually Assam or Darjeeling for me, occasionally Oolong. Loose leaf. Milk first.

danm10:05:42

Milk first? Heathen! 😆

rhinocratic10:05:02

And proud of it! 🙂

3Jane10:05:17

how about chilli chocolate? I keep trying to convert people but the general populace remains sceptical 😞

danm10:05:37

There's a Tom Scott video about that - https://www.youtube.com/watch?v=nAsrsMPftOI

danm10:05:38

I have tried chilli chocolate, but am not generally a fan. In my experience it's generally dark choc that get chilli'd, and I'm not actually big on chocolate. It's just a really convenient cream+sugar delivery mechanism when it's milk choc or whatever

otfrom11:05:12

I like chilli chocolate

otfrom11:05:21

but I also like 85% and higher chocolate

3Jane11:05:11

> convenient cream+sugar delivery mechanism XD

3Jane11:05:23

how about, y’know, cheesecake

3Jane11:05:37

or buttercream

3Jane11:05:38

why bother with adding liquid at all?

yogidevbear11:05:19

Mmmm.... Cheeeeesecake 😋

yogidevbear11:05:27

Mmmm..... Chocolate 😋

mccraigmccraig11:05:29

i like chilli chocolate and cheesecake both

yogidevbear11:05:41

Mmmm..... Both 😋

danm11:05:10

Well I do sometimes just eat buttercream, or peppermint wafer mix (butter, icing sugar, bit of peppermint essence)

yogidevbear11:05:22

I may need to get in my car to sort out this sugar addiction soon

yogidevbear11:05:57

I'm guessing you'd like a good peppermint tart then Dan?

danm11:05:04

When I was a teen my lunch at the bakery I worked at on weekends was a Cornish Pasty and a 1kg block of regalice ready to roll white icing. I'm not sure how I didn't die (or become diabetic). I tried it about 10 years ago, when I was 23-24, and got a massive sugar hangover and felt crap for days

mccraigmccraig11:05:48

1kg of royal icing @carr0t - that's very impressive!

mccraigmccraig11:05:57

you must have the pancreas of thor

danm11:05:13

had, possibly. Like I said, can't do it any more 😉

3Jane11:05:59

they don’t make icing like they used to… (edible in large quantities)

3Jane11:05:22

_,,,_ O_O _,,,_

3Jane11:05:37

damn it, formatting

3Jane11:05:55

if I die of diabetes it’s on your head

👍 4
danm11:05:17

I think I've eaten what was left of a tub of that after a cake was iced, but never a full tub

3Jane11:05:34

(…also I’ll be baking carrot cake this Sunday and that requires buttercream, and I always make too much buttercream…)

3Jane11:05:29

in conclusion: how are we all still alive?!

danm11:05:50

When I was still living at home, since I was about 7 or 8, my favourite dessert was always syrup sponge. This is because it was dead easy to make in the microwave and only took about 10 mins, so I was allowed to do it myself. I always made a double batch of the mix and ate half

danm11:05:01

Also, yes, that, how are we still alive?

rhinocratic11:05:31

I used to enjoy a Sussex Pond Pudding. The sort of thing a wasp would turn down as "a bit on the sweet side for me". :face_with_rolling_eyes: Not much in it other than sugar, fat and a lemon.

3Jane11:05:11

side note: I’m trying to figure out an alternative convention for naming predicates in a language that doesn’t support ? in symbol names

3Jane11:05:57

turns out it does support Unicode characters, and there are Unicode question marks that are not question marks.

3Jane11:05:37

I’m not gonna use that in prod code because someone would kill me, but … fingers itching now I found out XD

rhinocratic11:05:51

The usual practice in Java was to prefix things with "is" or "has". Can't say that I was ever enamoured of that approach.

otfrom11:05:55

emacs style p ?

otfrom11:05:00

thisp thatp ?

danielneal11:05:05

hahah @otfrom I was gonna suggest the same

otfrom11:05:08

(which I understand is short for perhaps?)

otfrom11:05:18

I always thought it was for predicate

3Jane11:05:53

yeah, I’m gonna go for is/has, it’s the established convention

3Jane11:05:14

re: perhaps, isn’t Haskell’s Maybe a great name? Maybe Int. Who knows? ¯\(ツ)

otfrom11:05:58

IIUC Maybe is a type rather than a predicate

otfrom11:05:00

is is good

otfrom11:05:24

(others are haskellers. I'm just an outsider trying to follow along)

3Jane11:05:53

I know, but I still like the name 🙂 it makes function signatures read much better

3Jane11:05:07

(I’m halfway through a Haskell uni course, so I can’t claim any fluency either. just aesthetically nice.)

danm12:05:43

Isn't Maybe sort of like Java's Optional? Or do they did different things?

bronsa12:05:22

they are the same monad yes

bronsa12:05:40

some languages use Maybe:Nothing/Just, some use Option:None/Some

bronsa12:05:44

but it's different names for the same thing

bronsa12:05:59

I think C# calls it Nullable

danm12:05:46

Argh, wall of text

bronsa12:05:50

wikipedia is never the best learning resource IMO

mccraigmccraig12:05:14

@carr0t i know i shouldn't, but: a monad is a "container" type and a way of composing sequences of operations on the contained values, one neat thing is that the sequence composition can use properties of the type, so with e.g. Maybe you get short-circuiting behaviour when the contained value is Nothing

🤯 4
🙂 4
picard-facepalm 12
danm13:05:20

See, that's a simple explanation I can understand. I know the concept, I use them all the time, but every time I try to find anything explaining what a Monad actually is it gets into all sorts of mathsy terms I don't know either

minimal13:05:45

you probably shouldn’t jump from Maybe to monad

minimal13:05:22

Maybe is just a sum type of Nothing or Just <value>. It has various instances defined for it in haskell like Functor, Applicative, Monad that get more complicated to understand

danm13:05:40

Yup, 2 more words I don't know the meaning of 😉

rhinocratic13:05:48

My brain is essentially a forgetful functor. :face_with_rolling_eyes:

danm13:05:21

This is like how I still don't know the difference between a verb, noun, adjective etc. I know how to use them correctly, but I can't say which one a given word is or what the defining properties of one or the other is. People have explained it hundreds of times, and it just never stays in. As long as I can use them correctly my brain just discards the info as unimportant

bronsa13:05:00

as long as you don't become a writer :)

minimal13:05:06

Yeah listening to other people’s explanation doesn’t really make you learn these things. It’s much better to implement them yourself, starting with the simplest

3Jane13:05:19

“Let’s verbs those adjective nouns, adverbly!”

danm13:05:29

I don't think I'd need to know them to be a writer, tbh

danm13:05:01

As long as you can use them correctly, when is it important for a writer to know they type of each word in a sentence or similar?

bronsa13:05:57

oh I'm not saying you can't write (clearly you can, you're doing it right now), but I have a hard time believing that you can be a serious writer without any understanding of grammar. Sure there might be exceptions, after all there's plenty of musicians who can't read music or don't understand music theory, but having that knowledge allows gives you a broader bag of tricks to pick from, and to get excellent at your art form rather than just good

bronsa13:05:06

>when is it important for a writer to know they type of each word in a sentence or similar? the simple answer is: when you want to make sure you're writing correctly structured phrases

bronsa13:05:40

intuition/by feel will eventually fail you

bronsa13:05:14

and if being correct is necessary and not just something that would be nice to have (imagine writing formal documents), then knowing the theory is paramount

danielneal13:05:41

this is all setup for the hard sell of an app that will formally verify your sentences for you

bronsa13:05:57

you know me too well

danielneal13:05:56

if your sentence type checks, it must be correct!

danielneal13:05:27

what's that thing they say about haskell

danielneal13:05:29

something like that

danielneal13:05:11

my theory is that if something doesn't compile for long enough it forces you to look at it for hours and hours and you end up spotting loads of bugs you missed before

😂 4
3Jane13:05:30

this is why generative grammars failed as an irl linguistic approach though

danielneal13:05:50

what is a generative grammar

bronsa13:05:37

it's also an open problem whether or not natural languages can be formalised

3Jane13:05:46

Also if you heard of Noam Chomsky, that’s where the approach comes from. I was surprised to find that he’s more known in CS than linguistics 🙂

bronsa14:05:27

I find that there's a LOT of intersections between CS and linguistics

bronsa14:05:36

even in problem solving approaches

3Jane14:05:08

communication, information, data shapes: everything that language deals with.

3Jane14:05:27

Incidentally, have you seen Inform 7? I love how it reads like plain English. This is actual source code: http://inform7.com/learn/eg/bronze/source_1.html

3Jane14:05:07

One of these days I want to make an interpreter for it, just for practice.

bronsa13:05:53

that's an artificial language

bronsa13:05:06

not a natural one

bronsa13:05:34

yeah chomsky's work was fundamental for parsing theory

3Jane13:05:37

Esperanto is an interesting intersection: it’s a constructed language, but has native speakers and it has evolved

bronsa14:05:52

TIL esperanto is actually used

3Jane14:05:35

Sure. AFAICT it’s got a subculture that looks a bit like couch surfing, and the native speakers are bilingual, raised by parents who are Esperantists. (Although it has the same problem every bi- (or multi-) lingual kid encounters, in that if the language isn’t spoken by the rest of the kid’s environment like school, the kid forgets the language or refuses to use it)

3Jane14:05:19

also found it surprising that it’s relatively popular in the far east despite its eurocentric vocabulary and grammar

3Jane14:05:13

“world peace” turns out to be a dominant meme over “let’s think logically”

3Jane14:05:56

(or “let’s think emotionally”; see Láadan)

3Jane14:05:12

although maybe it’s just about language age? ¯\(ツ)

alexlynham15:05:58

I've been a paid writer for nearly a decade and I don't know shit about tenses

alexlynham15:05:05

pure intuition babyyyy

alexlynham15:05:32

that said, bc of learning french I know most of them in french, I just don't have to hand the english equivalents... because I'm, dumb, I guess?

alexlynham15:05:53

gosh that last sentence was like the somme in its punctuation usage

bronsa15:05:54

come to think of it, one other major reason for knowing grammar is better reading comprehension skills

3Jane15:05:50

I like grammar because it creates slots in my brain that then everything falls into. A classification system.

3Jane15:05:23

I can then read a sentence and the parts instantly becomes discernible even if I don’t know the vocabulary.

3Jane15:05:51

Granted, this (1) applies only when learning a foreign language and (2) apparently most people don’t learn language like that and find it strange 😄

3Jane15:05:42

But with any other concept, learning the pattern / regularity allows you to make sense of noise, and things that relate to what you already have in your head tend to be easier to understand and easier to remember.

4
yogidevbear16:05:48

Itching to do some more clojure

mccraigmccraig16:05:37

i've got so much of it i've forgotten i even wrote lots of it @yogidevbear - i keep coming across code and git-blame points the finger at me but i have no recollection

🙂 4
😆 4
mccraigmccraig18:05:52

is there a nice way to convert a keyword (maybe with a namespace) to a string such that it can be easily converted back to a keyword again ?

sundarj18:05:41

=> ((keyword (subs (str :foo/bar) 1)) {:foo/bar 2})
2
this seems to work

mccraigmccraig18:05:58

yeah, subs seems nicer than str/join

sundarj18:05:19

it does seem a bit odd that (keyword "foo/bar") generates a keyword with namespace and name, rather than just name

sundarj18:05:40

the docstring doesn't mention it

mccraigmccraig18:05:28

i'm liking that bit atm - i'm coercing btw json objects and clojure maps and i want the namespaced keywords to survive the journey to and fro

sundarj18:05:43

yeah, it's certainly convenient, if intentional

mccraigmccraig18:05:57

i think i've repeatedly forgotten about subs because it's not in clojure.string

sundarj18:05:51

haha, right

sundarj18:05:20

ah, keyword delegates to Symbol.intern in the java, which does an explicit check for /, so it is intentional: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Symbol.java#L58-L64

3Jane18:05:52

So… the subs call is making me think (rest ":keyword") which I’m sure is going to be painfully inefficient… What’s the purpose of treating strings like sequences of characters, and have you ever made use of it?

Rachel Westmacott19:05:12

I don’t think I’ve ever made use of it - it might be good in interviews if someone asked you to code up a palindrome detector or something. I feel like it was almost just showing off - “Look at all the things that can be united with the sequence abstraction!”

bronsa19:05:01

@lady3janepl clojure isn't treating strings like sequences

bronsa19:05:15

rest operates on seqables

bronsa19:05:44

clojure is automatically converting the string to a seq and then returning the rest of that seq

bronsa19:05:12

it seems like a trivial difference but it's quite fundamental

bronsa19:05:14

I think you'd agree that making a string a seqable makes sense, and that being able to take the rest of a sequable also makes sense

bronsa19:05:38

from that it follows that rest "working" on strings also makes sense

bronsa19:05:48

I think it's not controversial that if you can operate on strings directly rather than on sequences of chars, that's better

bronsa19:05:02

but that's the rationale

3Jane20:05:09

I’m not questioning that making a string a seqable makes sense, because it is a sequence of characters by definition; rather I thought there was a low-level usecase somewhere that I wasn’t aware of

3Jane20:05:55

@peterwestmacott yes, I’ve only used it in 4clojure before but it was definitely useful there 😄

3Jane20:05:05

also I’m stealing your tagline XD

Rachel Westmacott20:05:07

if I can steal your carrot cake recipe

3Jane20:05:21

(-> recipe (translate :sv :pl) (translate :pl :en))