Fork me on GitHub
#other-languages
<
2016-05-08
>
tjg10:05:38

> And doesn't literate programming suffer from the same problem as other documentation, that it isn't checked and therefore is incorrect a lot of the time? @borkdude Currently re-watching Tim Daly’s presentation “Literate Programming in the Large,” on his over 1M LoC Common Lisp codebase, which he views as over 1M LoC literate LaTeX : https://youtu.be/Av0PQDVTP4A?t=20m30s Basically claims you need someone enforcing the paradigm of writing a book, willing to reject people’s pull requests. (At 20:30 mins the video.)

borkdude11:05:28

@tjg I assume literate programming is more a documentation/after the fact effort?

borkdude11:05:47

I 'll watch this fragment now

tjg11:05:39

@borkdude: As I understand, it's seeing yourself as producing a book, first & foremost.

borkdude11:05:16

In 'Coders at work' it appeared to me that Seibel asked every programmer: do you ever use literate programming?

borkdude11:05:47

But a lot just said: no, not really. Maybe at the time of writing the book it was something Seibel considered himself a lot (he has also written a book on Common Lisp).

borkdude11:05:39

But yes, it would make a lot of sense to do it that way, it preserves all the information you would ever need about the code. But it also requires a lot more effort, so you have to estimate the lifespan of that software and see if it's worth it.

borkdude11:05:08

For core software that is critical to a company I think it's a good practice

tjg11:05:19

Thanks! Re-reading those parts of Coders at Work now; I totally forgot that Seibel frequently asked about it.

tjg11:05:20

One part of Seibel's interest may be that he majored in English and did some work in journalism http://www.gigamonkeys.com/resume/

tjg11:05:24

Not to mention interviewing Knuth.

tjg11:05:00

I suspect the idea of literate programming should maybe be updated for modern tech (video's more feasible, etc).

borkdude11:05:39

@tjg: Daly says the goal of your company is to write a book (not just some code). Are you saying the goal should be to make a movie?

tjg11:05:14

😛 A multimedia or intermedia production maybe?

borkdude11:05:25

I prefer books still

borkdude11:05:46

I love the simplicity of just plain text

tjg11:05:47

Yeah definitely, though I think the problem with text is, part of today’s programming is visiting websites.

tjg11:05:03

(For example: “Visit this webpage for auth; click this, that & the other thing...” Those webpages change, which a video can make apparent.)

tjg11:05:45

Also, it’s good when a programmer walks me through the code and it fails on my machine, so when you’re watching the video, you see us googling & troubleshooting with some annoyance.

borkdude11:05:59

I enjoyed the lecture very much!

borkdude11:05:59

yes, video could capture things that you don't see in text, like: "well, we just guestimated the amount of memory needed here, change it if it doesn't work" kind of vibes 😉

borkdude11:05:50

Does Tim Daly have other lectures on youtube?

tjg11:05:28

I quickly checked yesterday & didn't see anything.. complicated because an actor shares the name. simple_smile

borkdude11:05:26

Well, I'm going to relisten a Rich Hickey talk while vacuum cleaning then... 😉

borkdude13:05:45

Thought: "do you want to treat your program as a living organism or like a text that is subject to mathematical analysis (with all the distractions of the mathematical analyser)?"

tjg13:05:17

Interesting! Maybe at first a living organism; then play the analyzer and attack my past self’s work. (Eventually hardening the code with layers of constraint like type annotations?)

tjg13:05:18

My initial buggy vagueness is often frustrating, but I should embrace it:

tjg13:05:20

> “Bugs” have what he called a “virtuous” character. > > Describing the basis for his theory of “problem solving by debugging almost-right plans,” Sussman asked, “How much time has each of us spent tracking down some bug in a computer program, and electronic device, or a mathematical proof? At times it may seem that a bug is at best a nuisance, or at worst a disaster. Has it ever occurred to you that bugs are manifestations of powerful strategies of creative thinking? That, perhaps, creating and removing bugs are necessary steps in the normal process of solving a problem? Recent research at the MIT AI Laboratory indicates that his is precisely the case.” -- Peterson, “Newton's Clock: Chaos In The Solar System”

borkdude14:05:33

I'm at a coffee bar and had this humorous thought: type driven development is like writing all the names on the coffee cups at Starbucks before all the customers come

borkdude14:05:20

obviously it's very biased and non-true, just a joke

borkdude14:05:29

I'm trying a bit of Haskell now, but I notice I'm still not a type driven person

borkdude14:05:51

writing something with foldl is still easier for me in Clojure than in Haskell, despite the errors and type messages

borkdude14:05:28

Example:

*Main Data.String Data.List> let reduced = foldl (\(acc,name) -> acc + length name) 0 filtered

<interactive>:52:43:
    Couldn't match expected type ‘[Char] -> (t, [a])’
                with actual type ‘Int’
    Relevant bindings include
      name :: [a] (bound at <interactive>:52:28)
      acc :: t (bound at <interactive>:52:24)
      reduced :: (t, [a]) (bound at <interactive>:52:5)
    Possible cause: ‘length’ is applied to too many arguments
    In the second argument of ‘(+)’, namely ‘length name’
    In the expression: acc + length name

borkdude14:05:51

I tend to get overwhelmed with this kind of output instead of helped by seeing an example fail horribly

borkdude14:05:20

damn, it was just a syntax thing

borkdude14:05:30

let reduced = foldl (\acc name -> acc + length name) 0 filtered

borkdude14:05:49

(screw Scala with its horrible lambda notation setting me on the wrong foot ;))