Fork me on GitHub
#clojure-uk
<
2018-12-06
>
alexlynham07:12:05

that picture is great btw

jasonbell07:12:47

A great Skillsmatter photographer and the perfect face for radio 🙂

alexlynham08:12:08

it looks like you're about to bow to the cameraman

thomas08:12:27

back at work... yeah

jasonbell08:12:20

@alex.lynham I played to the camera, that was mid talk 🙂

jasonbell08:12:29

It was literally a split second though.

mccraigmccraig09:12:46

anyone got any pointers for using clj/deps.edn on a multi-module monorepo ? we currently use lein-modules with a top-level project.clj with common dependencies and module level project.cljs in sub-directories - i'd ideally like to be able to do something similar

rickmoynihan10:12:11

I’ve not actually done this yet @mccraigmccraig but :local/root is the answer you probably already know… More specifically it might be worth looking at juxt edge as I think @dominicm has been doing stuff in this area in that repo. Also ask in #tools-deps

mccraigmccraig12:12:07

hmm - not sure about :local/root - we currently use :source-paths in lein for something similar, but only in the :dev profile for easy cross-module c.t.n.repl refreshes - for test and release i would like strict inter-module dependency DAG enforcement. but #tools-deps seems like the place to go...

dominicm10:12:56

oh, yes, me

dominicm10:12:09

main has some examples of this

rickmoynihan10:12:57

@dominicm do you have any examples in that repo where a :local/root of main is also a published artifact?

dominicm10:12:28

also a published artifact? Nope. But there's no reason anything in there couldn't be.

rickmoynihan11:12:40

@dominicm: I see you’re also using integrant :thumbsup: One thing that has been on my mind for a while is how tools.deps and integrant interact, and how components are related to their dependencies. I’ve thought for a long time that integrant is close to the perfect clojure module system and all it’s missing is the connection to dependencies, which tools.deps brings. It feels like there’s a missing piece somewhere here, and how you’ve noticed this same thing too in the divisions within juxt. What are your thoughts on this? 🙂 And what are the criteria you use to lift something out into a tools.deps module? Is it just sharedness (or expected sharedness) with other apps in the repo or something more?

dominicm12:12:20

I remember someone having the brief idea to tie components to dependencies, and you could do it, but I think losing the static declaration might be a cost you don't want to pay. Although you could generate the deps.edn from the config.edn in edge, as we make the system more static. So there's that. Ultimately, it's no more tied than namespaces are to dependencies. I think you would solve those 2 problems together (as rich hinted at a couple years ago, with his "because Fred told you").

dominicm12:12:12

Splitting out a module? Well, I was hoping our previous discussion would drive some stronger thoughts on this. But currently it's about expected or real re-use.

rickmoynihan13:12:32

> I think losing the static declaration Which static declaration?

dominicm14:12:42

of deps.edn

thomas12:12:26

I am very pleased to announce my new Heckling-as-a-Service... also known as HAAS. @jasonbell will get a special discount.

jasonbell12:12:14

Discount! I was 50% of operating profits!

jasonbell12:12:36

If it wasn’t for my human dartboard you’d be nothing @thomas! 🙂

thomas12:12:00

@jasonbell what makes you think there even will be a profit?

jasonbell12:12:37

I live in hope.

😂 4
mccraigmccraig12:12:27

we use something not dissimilar to integrant if you squint askance (with async support for cljs) @rickmoynihan components are sometimes equivalent to modules (we have modules for largish things like cassandra, async, core-model, ui-core, api, stream, webui etc), but often much finer grained. things get lifted to modules generally when they exist as a "thing" which needs to be shared amongst multiple other modules. sometimes modules correspond 1-1 to components (cassandra does), sometimes they don't have any components (async) and sometimes they contain many components (core-model)

rickmoynihan12:12:48

@mccraigmccraig: That’s close to how I see it too… though I think there’s also a distinction between modules/components and libraries that’s worth decomplecting: - A component is typically a stateful thing, a process. It may have configuration and defaults. They either bring their own state, or depend on other stateful components. It may have library dependencies too. - A library is a reusable dependency that doesn’t bring any real state to the party. It has no coupling to components. - A module is a reusable component exposed as a dep/artifact Either libraries or modules could be :local/roots in tools.deps (as it doesn’t care)

mccraigmccraig13:12:04

we're similar - although some of our libs define components (generally as protocols with instances to be built by our app-context builder) and component constructor fns

dominicm14:12:17

deps.edn doesn't have pedantic abort, and it makes much less sense in deps.edn too. Because it always picks the newest version.

mccraigmccraig14:12:39

picking the latest version would have been way more sensible for lein... 99% of my resolutions are exclude the earlier version

dotemacs14:12:02

Hi, do any of you have any experience with MetaTrader ? It’s a trading platform: https://www.metatrader5.com/en I have a bunch of questions for you if you do. Thanks

dominicm14:12:10

I would totally think you were spamming me if I didn't know you @dotemacs 😄

dominicm14:12:35

Have you become a day trader? Can I, a single mom, make $3000/month at home?!

😂 4
dotemacs14:12:57

If you know how to code in mql5, then, yes, Dominic, you can 🙂

dominicm14:12:37

is mql5 a language?

dotemacs14:12:58

Yes, their own, the owners of MetaTrader.

dotemacs14:12:41

Basically MetaTrader is a platform that is a client and a server. All the API wrappers that I’ve seen for it need to mind meld with MetaTrader’s DLL to be able to tap into it.

dominicm14:12:49

I assumed Q would be query, but it isn't. It's Quote.

dotemacs14:12:11

There were some attempts around 8 years ago to get some sort of a wrapper in Clojure, but it hasn’t been touched since.

dominicm14:12:35

ah, I see 😄

dotemacs14:12:37

So I was hoping that there might be some Java API wrappers… and maybe somebody here who has used it. 🙂

dotemacs14:12:49

If you try to follow those links @folcon you’ll see they 404…

folcon14:12:58

@dotemacs having a quick read it looks like you can directly talk to the system as long as you have it running

folcon14:12:18

this is mql4, no idea about 5, haven’t found anything on it yet

dotemacs14:12:36

I found all those links via google myself @folcon.

dotemacs14:12:54

I was really hoping that somebody here had some experience with this already so that I could talk to them.

folcon14:12:07

Some example code in node (tiny) to push whatever’s sent to it into the running terminal: https://github.com/PenguinTraders/MT4-Node.js

folcon14:12:15

Ah, sorry then.

dotemacs14:12:38

No problem, thanks 🙂

folcon14:12:21

The github repo does look pretty readable though, so might be a good basis for experiments if you’ve already got yourself setup :)… Sorry I couldn’t help.

👍 4
Conor15:12:07

Day trading is a bad idea unless you work at a financial institution

Conor15:12:13

Buy and hold instead!

👀 4