Fork me on GitHub
#clojure-europe
<
2021-08-31
>
RAMart06:08:30

👋 🥐☀️

otfrom07:08:44

Feeling autumnal in Dundee

pez07:08:40

Good morning!

thomas08:08:03

Morning, yesterday it looked like summer was over... but today it seems to be back

borkdude08:08:38

Indian Summer

otfrom08:08:16

I like literate programming, but I know it puts a lot of people off. Being able to do literate testing seems like a good way of creating some docs while running some tests (I do realise that other docs would be needed as well)

danielneal09:09:49

late to the convo here, but I think literate testing is a brilliant idea. I like the explanation to surround the usage of the code, as opposed to the implementation. I used to use a lib from zcaudate that would publish some docs, e.g. here https://riverford.github.io/compound/ but I’m not even sure if the lib is still available, and I’ve been keeping an eye out for alternatives

danielneal09:09:18

yeah looks like lucid.publish has been pulled from github

otfrom09:08:24

a more traditional OT: When grocery shopping/grocery delivery - have you noticed a lot of substitutions in deliveries or empty shelves? I'm trying to figure out if this is a Scotland thing, a UK thing, or wider. (Brexit or Covid or both, you decide)

reefersleep09:08:59

Nope, things seem fine (in that regard) here in Denmark 🙂

1
maleghast10:08:54

I have been plagued a little by unexpected empty shelves and things disappearing from stock here in Stirling - I grocery shop in person.

maleghast10:08:03

Not awful, but pronounced and noticeable nonetheless.

reefersleep09:08:23

A late good morning!

djm09:08:29

A while ago, we seemed to be getting a lot more substitutes, but now I think we are getting fewer than before. (In England).

otfrom10:08:19

(I love how my thing about testing and literate programming is getting no response in this channel 😉 )

borkdude10:08:54

@otfrom I'm pretty excited about what @mkvlr is doing with clerk at NextJournal

👍 1
maleghast10:08:45

@otfrom - I really don't know what "literate programming" means... I think that I might have a sense of what it might mean, but really I need to read up before I can feel ok about commenting on what you are saying here...

borkdude10:08:20

in the broad sense: a logical connection between docs and code so neither one of them goes stale and you can read it pretty much as a story

borkdude10:08:26

that's how I interpret it

borkdude10:08:30

I think that is especially good for API design and tests, I don't know if I would use it for all internal implementation

maleghast10:08:55

Thank you - will read...

reefersleep11:08:07

I’ve read about literate programming, but I’ve not seen examples or tried it myself. Ensuring that documentation does not go stale is an admirable goal. I feel unsure about the viability of structuring it as a story, but as I said, I haven’t seen examples

reefersleep12:08:20

Does your emacs then read the code in the .org file?

otfrom12:08:45

but people found it hard to get involved

lread12:08:03

@otfrom, I have given test-doc-blocks a try (wink wink). My main goal for this lib was to try to ensure that my code blocks in my docs would work for those who dared to try them. But the generated tests also serve as unit tests of sorts, which can be seen as a benefit. But perhaps someday notepads/journals might be a better way to share documentation that also act as tests and experimentation grounds? I found this https://youtu.be/Ufyqwzn1RDs interesting.

1
otfrom12:08:22

yeah, notespace looks interesting too. I think I liked the testing support built into the library above, and I'm not quite sure how to get that bit out of notespace or other notebook like things

otfrom12:08:40

(tho maybe I need to finally watch the fine video)

lread13:08:01

I think the live journal thing is very interesting. Since my lib docs are written in AsciiDoc and I present them on cljdoc, a solution like test-doc-blocks works for me (for now).

pez13:08:04

Perhaps related (at last I get to calibrate my understanding of literate programming), in early versions of Calva I made the REPL available in all files, not just in Clojure files. This made it easy to crate code blocks in markdown files and also to run them as a reader.

thomas13:08:39

I also quite like the idea of literate programming, just never got round to it (I also would like to use something like PSP and TSP).

thomas13:08:25

and one guy I used to work with used FunnelWeb for one of his projects, wrote 100k linces of C code in 1 year, 10 defects found in total during test and production.

thomas13:08:54

But I'm not convinced he was human

otfrom13:08:04

I've found emacs and org-mode to be the easiest for literate programming and my preferred notebook environment. Not everyone likes it as much as I do tho 😄

simongray13:08:35

Anybody here have any experience wrapping C++ code with Python and making it available on e.g. pypi (pip install)?

simongray13:08:44

I would like to wrap a colleague’s C++ library to make it available for students on the master’s programme we’re managing. Currently, the master branch doesn’t even compile on macOS (and probably somewhere between half to 2/3 of students use macs), so the first step was simply getting it do compile on that platform.

simongray13:08:51

Now with the Mac-specific changes out of the way, I need to wrap it and then produce some kind of package from it, preferably including the binaries for each platform. I have Python experience, but no experience wrapping C++ or creating python packages.

otfrom14:08:55

I bet @chris441 would know about that. He's usually easier to find on Clourians Zulip

simongray07:09:56

Right, I was even added to their data science channel at some point. Maybe it's okay to go a bit off-topic there. Thanks.

simongray07:09:43

I didn't know about wheels. Gonna check it out. From quickly glancing the page not quite sure what exactly it is.

djm08:09:47

I think wheels are python packages that contain prebuilt binaries (and they can be added to pypi), but IANAP

val_waeselynck21:08:51

Yay! I got it right on 1st sight!

val_waeselynck21:08:49

Then spent 5 minutes trying to figure out what I had got wrong, since my answer was not listed

pez22:08:06

Probably like some of the poor students. 😀 Me? I immediately saw the wrong answer. The same wrong answer as the test constructor saw. It took me quite a while to believe my eyes when he visually proved me wrong in the video. His explanation didn't chime with me either, so I was no wiser until I found a comment that explained it to me in a way I could immediately understand.

val_waeselynck15:09:52

It's still not clear to me why it works that way. The right answer came as a gut feeling to me (it's possible that this intuition was prepared by doing some basic complex analysis and astronomy) but I still can't claim to find it obvious.

pez19:09:04

My 11-year-old and I reasoned it through some. He’s a bit content with that the center of the orbiting circle travels 2*pi’(R+r), but none of us still can’t quite connect to what is actually going on.