Fork me on GitHub
#off-topic
<
2018-02-01
>
Alex Miller (Clojure team)00:02:03

I actually spent quite a bit of time thinking about this a few years ago. data flow graphs are by far one of the most useful tools I’ve found for describing Clojure architectures. however, they completely suck when it comes to hof.

Alex Miller (Clojure team)00:02:25

Rich draws a lot of diagrams but they are usually more process/data oriented than trying to show detailed call graphs

Alex Miller (Clojure team)00:02:30

the slides he did for his euroclojure talk about core.async channels are the best public source I can point to show a variety of things he’s drawn about a particular piece of code http://cdn.cognitect.com/presentations/2014/insidechannels.pdf

noisesmith00:02:32

I have a theory that it might be interesting to do something like what we do for influencer graph analysis - we take all the connections, then look for the nodes that have the largest number of shortest paths going through - those are "significant" because they are the most vital bridges - the things that tend to be where others connect indirectly

noisesmith00:02:58

so you'd end up with the api defining functions

Alex Miller (Clojure team)00:02:04

most of the talks Rich does are much more conceptual - this one is pretty unique in being so tightly tied to a specific piece of available code

Alex Miller (Clojure team)00:02:00

I think you could definitely trace stuff like that

Alex Miller (Clojure team)00:02:32

I often do function flow graphs when trying to understand a chunk of code I am seeing cold

Alex Miller (Clojure team)00:02:43

there are some clojure tools that will make them for you

Alex Miller (Clojure team)00:02:52

I’m just googling, no idea on how good any of these are

bja01:02:54

that sinking feeling when you ask your repl what git sha it was built from and it responds with a git sha not in your master repository

bja01:02:28

I have never been more thankful for clojure source code being loaded as resources from the jar and not AOT-compiled by defualt in my life

gganley01:02:32

@alexmiller hof? that's a new one

noisesmith01:02:58

higher order function

gganley01:02:59

I haven't heard the phrase "higher-order functions" since my haskell days

marek2111:02:51

Hi everyone, We are an independent group of senior Clojure devs/freelancers. We are working on some A.I., blockchain, and ML projects now. Four of us are Ph.D.’s in Machine Learning and Mathematics. We are focused on Machine Learning - Pattern recognition, Algo trading, NLP, Artificial Intelligence in FinTech and HealthTech, Blockchain, and cryptocurrencies and chatbots. Our Stack: Clojure, ClojureScript, Python (TensorFlow), AWS, JS, Node.Js, PHP, Angular, C# (.NET Core), PostgreSQL, ReactJS, Scala, Presto, Docker, Linux and many others. Here are some projects we are working on: http://www.status.im http://www.foldapp.com http://www.evolta.fi http://www.trezor.io http://www.discomelee.com Stealth startup - Machine Learning platform for forex trading We have a free capacity now (6 devs). Ideally, we are looking for long-term cooperation or project, we don’t like to switch between projects too often. We are based in the Czech Republic and we work mostly with startups as co-developers. Also would like to get in touch with other Clojure or ML developers to share ideas and knowledge:) Here is our facebook page: https://www.facebook.com/FlexianaDevGroup/?ref=bookmarks Get in touch here or send a message or email - <mailto:[email protected]|[email protected]> Thank you:)

pablore15:02:03

Any docker experts here?

gonewest81815:02:08

What’s the question?

qqq16:02:17

I'm reading: https://github.com/allenai/allennlp/blob/master/LICENSE Is Apache basically MIT/BSD ? I.e. I can modify + distribute, without releasing the source code ?

qqq16:02:19

@rauh: is the code for Detroit / Panama avaialble anywhere?

rauh16:02:47

@qqq Idk, I haven't looked actually

qqq16:02:10

@bronsa: newb question: do I just apt-get install openjdk-9, and I get get panama ... or do I have to custom compile my own jdk from that source tree ?

bronsa16:02:26

the latter

qqq16:02:31

well, if it's updated 4 months ago, I robably have to compile from source

qqq16:02:33

got it; thanks;

martinklepsch16:02:41

Can anyone tell me how to get from

--> digitalocean: A snapshot was created: 'cljdoc-2018-02-01T15:03:20Z' (ID: 31405797) in regions ''
to
31405797
i.e. the number in (ID: XXXXXXX) using unix utilities? My unix fu is failing me 😔

qqq16:02:09

sed "s/.(ID: \([0-9]\)).*/\1/"

qqq16:02:28

there are .star there which have been turned into bold text: @martinklepsch

martinklepsch16:02:22

@qqq nice, that works

martinklepsch16:02:40

I’m super confused about the escaping of parens though 😄

martinklepsch16:02:49

but it’s fine — it works 👍 thanks 🙌

qqq16:02:05

iirc, \([0-9]*\) just says: capture the [0-9]* as a group, then we can refer to it later, where \0 is the entire matched string, and \1 is the 'first' \(...\)... or something like that

martinklepsch16:02:40

thanks for the explanation @qqq makes a bit more sense now 😅

mnzt16:02:27

@martinklepsch Here's a handy website w/ an example to break the regexp down https://regex101.com/r/yASXWa/1

martinklepsch16:02:16

@mnzt thanks! Although in this case the regex wasn’t really the issue, I just couldn’t figure out how to feed it to grep/sed/whatnot 😄

qqq16:02:12

The way I learned how to use sed is: 1. learn VIM 2. turns out sed uses the same regexps as far as I can tell 🙂

martinklepsch17:02:40

Do you do this in VIM: \( when you refer to a regex group? This is mainly what tripped me up

chris17:02:59

they both use ed style regex

chris17:02:09

which is what grep uses too

chris17:02:37

which is also basically the last time anyone agreed on a regex style

martinklepsch17:02:16

Hm, so now I need to write the matched result to a file but without a trailing newline

martinklepsch17:02:59

tr -d ‘\n’

chris17:02:16

sed s/\n$//g

martinklepsch17:02:20

actually this seems to work I just didn’t see the newline characters in my terminal

chris17:02:16

tr will delete every newline, sed will just delete the ones at the end

chris17:02:26

it just depends on what you want

martinklepsch17:02:17

@chris actually it seems that sed 's/\n$//g' does not delete the newline on my system (OS X)

martinklepsch17:02:53

@chris I tried it because using tr actually causes some weirdness when doing tr -d ‘\n’ > some-file

martinklepsch17:02:33

I ended up using tr -d '\n' | tee image-id

chris17:02:38

I don't really know why that doesn't match

chris17:02:53

I just tried it and it doesn't work on gnu sed either

chris17:02:02

oh, apparently you need -z in gnu sed

chris17:02:07

not sure about bsd sed

qqq18:02:24

Is there a way to use Chrome, in a 'command line manner', like one would with node.js? I.e. suppose I have a JS program -- but instead of running it on node.js, I want to run it on Chrome's engine, and have it dump the output to file. Is this possible? In particular, I want to write a JS file which: 1. reads some data from file on local file syste 2. runs some webasembly code 3. save the wasm output to a file on local filesystem Is there a way to use 'Chrome' instead of 'node.js' as my 'js interpreter' ?

justinlee18:02:30

@qqq Have you looked at: https://developers.google.com/web/updates/2017/04/headless-chrome ? Basically chrome --headless --repl seems pretty close to what you want. I don’t know how or if you can do I/O

qqq19:02:20

@justinlee: this is already useful, TIL I can do webpage -> pdf via `chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com/ `

bellis19:02:20

@qqq if you're okay using node, you can use node to command headless chrome: https://github.com/GoogleChrome/puppeteer

phronmophobic19:02:32

@qqq, what do you mean by "chrome" vs "nodejs"? in principle, I think they use more or less the same javascript engine. are you interested in the renderer from chrome? depending on which features and how much control you want, you can embed using chromium, https://www.chromium.org/developers

phronmophobic19:02:52

many of the headless browser tools for chrome wrap this

qqq19:02:08

@smith.adriane: I may be mis using some terms here, what I'm referring to is: I have a *.js file. I can run it via chrome; or I can run it via nodejs -- this what I mean by "chrome" vs "nodejs"

phronmophobic19:02:55

for many *.js files it wouldn't make a difference

phronmophobic19:02:49

since they share the same javascript engine

phronmophobic20:02:21

the environment/context when you run within chrome or within node are different

phronmophobic20:02:02

basically, using something like chromium embedded may be way overkill for your use case

phronmophobic20:02:13

but depending on what your use case is, it might be a good fit

qqq22:02:53

where can I find sample usage of: https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-2.html#jvms-2.11 trying to find sample code is surprisingly difficult