Fork me on GitHub
#clojure-uk
<
2019-03-01
>
yogidevbear08:03:58

Guten morgen! \o

guy08:03:56

morning!

maleghast10:03:20

Joy to the World!

🎄 5
maleghast10:03:31

I am pleased to be able to say that today is officially going [vague-slack] "better than I expected" [/vague-slack]

👍 5
maleghast10:03:43

Dydd Gŵyl Dewi Hapus.

3Jane13:03:50

…I just confused myself horribly

3Jane13:03:17

in short, (second) is the same as (nth 1)

😆 5
guy13:03:11

thats cool but

guy13:03:14

ffirst is cooler

3Jane14:03:12

I can only think of one word that starts with ffffff right now, but I don’t want to spoil the festive mood 😛

3Jane14:03:27

(the above took me a non-trivial amount of time to debug)

3Jane14:03:20

(as someone said, there are only two hard things in programming: cache invalidation, naming things, and off by one errors)

😂 5
guy14:03:41

to be fair, i would never use (nth 1)

3Jane14:03:37

no, but I used (nth 3)

3Jane14:03:43

because I wanted to get the … third element.

guy14:03:54

what a gotya

3Jane14:03:58

not (first), not (second) … third.

guy14:03:07

thats a classic

rickmoynihan14:03:51

If only Djikstra were a UX designer! shakes fist

😂 10
otfrom14:03:42

not (car) not (caar) but (caaar)

10
👍 10
😂 15
danielneal14:03:50

(raarrrrgh) :lion_face:

alexlynham14:03:39

@otfrom is that the new zealand macro version?

alexlynham14:03:15

complement it with (cdr-bro)

3Jane14:03:08

(mia-caaaara)

thomas15:03:05

what are we talking about here???? Could this be about clj ?

3Jane15:03:53

’tis only a bad dream.

3Jane15:03:45

Did you know the life expectancy of an atlantic herring is 17 years?

3Jane15:03:57

:woman-running:

danielneal15:03:49

did you know seagulls can live to 49 uyears

rickmoynihan16:03:55

Same with Parrots:upside_down_parrot: confusedparrot parrot confusedparrot upside_down_parrot

3Jane15:03:13

I wonder what they think about global warming

3Jane15:03:18

maybe that’s why they migrated inland

3Jane15:03:38

“you’re just a hatchling so you have never seen the sea… but I remember. It was blue!”

😂 5
3Jane15:03:35

wow for real 🐦

otfrom16:03:59

@lady3janepl I think that needs someone to adopt it as the maintainer has moved on to other things

3Jane17:03:18

…can I just say how much I love intellij cursive integration

3Jane17:03:39

it remembers my library aliases and after I restart repl it auto-requires them for me when I need to use a function from an aliased namespace

rickmoynihan17:03:13

Cider does something similar with cljr-refactor… It infers it really well, and asks you to pick from a reduced set if it thinks there’s an ambiguity

alexlynham11:03:14

I think I might need to try clj-refactor then.

3Jane17:03:05

Hand rolled data matching accuracy XD

3Jane17:03:19

Original:

4 fresh tuna steaks of around 150 g each
4 spoons of extra virgin olive oil
2 spoons of balsamic vinegar
squeezed juice of 1 lime
fresh tarragon leaves
salt and pepper

3Jane17:03:31

Matched:

(#{"blue" "salmon" "fatty" "mackerel" "bluefish" "catfish" "mullet" "tuna" "fatty fish" "cat" "fish"}
 #{"olive" "vegetable" "oil" "oils"}
 #{"balsamic" "vinegar" "balsamic vinegar"}
 #{"juices" "apple" "fresh squeezed" "squeezed" "apple juice" "juice"}
 #{"fresh" "bone" "cook-before-eating" "bone-in" "whole" "ham"}
 #{"table" "plain" "salt" "iodized"})

3Jane17:03:20

…but hey, something works ;D

bronsa17:03:45

where are the extra terms coming from?

bronsa17:03:01

@U051H1KL1 were you not doing something like this too a while ago?

3Jane17:03:07

source dataset

3Jane17:03:24

for each food item it has fields like name, extended name, and a list of terms that can be used for matching

3Jane17:03:13

this is a handrolled experimental prototype, normally I’d research it more

3Jane17:03:51

right now I’m using intersection-of-words-with-terms size as match metric 🙂

3Jane18:03:11

if you were creating a lookup with a hash map, and everything you want to store has a unique int that can serve as a unique key, would you use it as-is or convert into a keyword?

mccraigmccraig18:03:54

i'd probably stick with the int, unless you need to do a tonne of repl-based manual lookups and typing (:100 m) rather than (get m 100) is going to save your fingers getting worn to stumps

mccraigmccraig18:03:14

oh, but you have (m 100) so it doesn't even help there

3Jane18:03:31

oh, hey, I forgot you can use the map as a function!

bronsa18:03:17

literal keywords starting with digits are not legal anyway

3Jane18:03:23

it’s not me, it’s cheshire (famous last words of Alice)

mccraigmccraig18:03:58

ha, i guess i've never actually tried to create a literal keyword starting with a digit

3Jane18:03:52

(I had string keys like "537", they turn into :537 if you use (parse-string s true) )

mccraigmccraig18:03:34

uh @bronsa my repl is letting me create :1

mccraigmccraig18:03:41

is it being naughty ?

3Jane18:03:46

(I know that’s what the flag is for, I needed it for string=>keywords elsewhere)

3Jane18:03:07

anyway gotta run, see you guys in like 2 days I think

bronsa18:03:26

@mccraigmccraig it allows you, it's still not legal

bronsa18:03:50

(keyword "123") returns a valid keyword

bronsa18:03:04

it's just the literal that's not valid clojure syntax, just like (symbol "a b c") returns a valid symbol but a literal symbol with spaces isn't, the difference is that :1 can be input and the reader doesn't complain about it while a b c can't

bronsa18:03:48

there was a release that restricted the reader to reject those literals, but the commit got reverted as people in the wild were doing it and it caused breakages

seancorfield19:03:46

It calls out java.jdbc there which may have had numeric literal keywords at some point in the distant past but does not now. A quick grep shows that such things have crept into our own codebase (mostly in one particular file where we have image sizes that are a mixture of symbolic names and numbers, so we rely on stuff like :1000 being valid ... oops! 🙂 )

seancorfield19:03:33

I remember it being common in several libraries we were using back in 2013 so it broke a lot of things when the reader was tightened up.

guy20:03:04

sup 👋

guy00:03:49

what a gross person

jonpither03:03:20

That is shocking

alexlynham11:03:29

Yeah that's disgraceful

seancorfield22:03:27

Most of the fintech companies I've had any exposure to have had serious attitude problems... and that was my experience back in the 90's too when the software QA company I worked at was pitching to financial organizations -- really "superior" attitudes to everyone else in the software industry.