clojure-uk

A place for people in the UK, near the UK, visiting the UK, planning to visit the UK or just vaguely interested to randomly chat about things (often vi and emacs, occasionally clojure). More general the #ldnclj
dharrigan 2020-11-09T06:29:30.398300Z

Good Morning!

yogidevbear 2020-11-09T07:22:18.398500Z

o/

jiriknesl 2020-11-09T07:52:03.398700Z

Morning

djm 2020-11-09T08:01:03.398900Z

đź‘‹

alexlynham 2020-11-09T08:18:26.399Z

morning

2020-11-09T08:38:16.399200Z

Morning

rlj 2020-11-09T09:30:59.399500Z

Mornin

2020-11-09T10:04:03.399700Z

Morning

mccraigmccraig 2020-11-09T10:39:25.400Z

mĂĄnmĂĄn

dharrigan 2020-11-09T13:58:25.400300Z

Is reify perferred over proxy nowadays?

mccraigmccraig 2020-11-09T14:15:06.402700Z

they have slightly different capabilities iirc - proxy lets you extend an abstract class, reify is interface only. i tend to use reify more, but that's probably because i'm more often implementing a protocol than extending an abstract class. i've no idea if one is "better" than the other for just implementing java interfaces

Conor 2020-11-09T14:57:39.403Z

Reify has better performance than proxy

dharrigan 2020-11-09T15:12:10.403500Z

Right, cool, so it's interfaces I'm extending. Rigthyho

dharrigan 2020-11-09T15:12:13.403700Z

ta

dharrigan 2020-11-09T15:13:09.404800Z

Here's another question, say you have an interface with, say 5 methods, with reify, do you have to provide implementations for both, or can you implement one and ignore the rest?

Conor 2020-11-09T15:20:17.404900Z

Is 20% of a bird a bird?

Conor 2020-11-09T15:20:53.405Z

AFAIK you need to implement them all. You could probably give them no-op implementations, though

dharrigan 2020-11-09T15:28:02.405400Z

That’s a profound question. Is 20% of a bird a bird? Depends on the use-case I suppose 🙂

dharrigan 2020-11-09T15:28:09.405700Z

I mean, at the DNA level, I suppose yes, it’s still a bird.

dharrigan 2020-11-09T15:28:55.406400Z

I had roast chicken last night. Perhaps about 20% of that chicken was consumed 🙂

2020-11-09T15:36:08.408400Z

<delurk> I take the view that an interface is a contract. “Implement these methods and then your reified class satisfies the contract (and is a bird or whatever).” If you don’t implement all of them then you don’t comply

mccraigmccraig 2020-11-09T15:42:38.409200Z

anyone here using clojurescript with react-native atm ? what's the best toolchain now ?

bronsa 2020-11-09T15:50:45.410Z

user=&gt; (definterface i (f []) (g []))
user.i
user=&gt; (.f (reify i (f [_] 1)))
1
user=&gt; (.g (reify i (f [_] 1)))
Execution error (AbstractMethodError) at user/eval157 (REPL:1).
user$eval157$reify__158.g()Ljava/lang/Object;

dharrigan 2020-11-09T16:01:16.410600Z

oooh

dharrigan 2020-11-09T16:01:44.410800Z

that's good to know.

dharrigan 2020-11-09T16:01:47.411Z

thank you! 🙂

alexlynham 2020-11-09T16:44:50.411200Z

@mccraigmccraig cordova finally crossed you for the last time?

mccraigmccraig 2020-11-09T16:51:48.412300Z

@alex.lynham pretty much. insufficient community energy behind it, too few plugins with too low quality

alexlynham 2020-11-09T17:02:46.412400Z

the question is how long before react becomes the rails of the JS world

mccraigmccraig 2020-11-09T20:07:20.414800Z

would that be a good thing? i liked rails - wasn't so fond of ruby tho

mccraigmccraig 2020-11-10T09:43:38.417300Z

maybe i stopped using rails before obsolescence set it... ruby's awful scoping and bad-magic metaprogramming facilities really did my head in though

alexlynham 2020-11-10T11:28:31.418Z

yeah the metaprogramming got p wild and unmaintainable p fast

dharrigan 2020-11-09T21:50:08.415Z

Someone pointed me to this today: https://devdocs.io/

dharrigan 2020-11-09T21:50:13.415300Z

has clojure too