other-languages

here be heresies and things we have to use for work
tjg 2016-05-08T10:50:38.000340Z

> 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.)

borkdude 2016-05-08T11:01:28.000343Z

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

borkdude 2016-05-08T11:01:47.000344Z

I 'll watch this fragment now

tjg 2016-05-08T11:02:39.000345Z

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

borkdude 2016-05-08T11:04:16.000346Z

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

borkdude 2016-05-08T11:04:47.000347Z

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).

borkdude 2016-05-08T11:05:39.000348Z

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.

borkdude 2016-05-08T11:06:08.000349Z

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

tjg 2016-05-08T11:11:19.000351Z

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

tjg 2016-05-08T11:14:20.000352Z

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

tjg 2016-05-08T11:14:24.000353Z

Not to mention interviewing Knuth.

tjg 2016-05-08T11:23:00.000354Z

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

borkdude 2016-05-08T11:24:39.000356Z

@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?

tjg 2016-05-08T11:25:14.000357Z

😛 A multimedia or intermedia production maybe?

borkdude 2016-05-08T11:25:25.000358Z

I prefer books still

borkdude 2016-05-08T11:25:46.000359Z

I love the simplicity of just plain text

tjg 2016-05-08T11:48:47.000360Z

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

tjg 2016-05-08T11:49:03.000361Z

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

tjg 2016-05-08T11:49:45.000362Z

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.

borkdude 2016-05-08T11:53:59.000363Z

I enjoyed the lecture very much!

borkdude 2016-05-08T11:54:59.000364Z

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 😉

borkdude 2016-05-08T11:55:50.000365Z

Does Tim Daly have other lectures on youtube?

tjg 2016-05-08T11:58:28.000366Z

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

borkdude 2016-05-08T11:59:26.000367Z

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

1
borkdude 2016-05-08T13:23:45.000369Z

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)?"

tjg 2016-05-08T13:39:17.000371Z

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?)

tjg 2016-05-08T13:39:18.000372Z

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

tjg 2016-05-08T13:39:20.000373Z

> “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”

borkdude 2016-05-08T14:01:33.000376Z

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

borkdude 2016-05-08T14:02:20.000377Z

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

borkdude 2016-05-08T14:05:29.000378Z

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

borkdude 2016-05-08T14:05:51.000379Z

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

borkdude 2016-05-08T14:07:28.000381Z

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

borkdude 2016-05-08T14:07:51.000382Z

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

borkdude 2016-05-08T14:10:20.000383Z

damn, it was just a syntax thing

borkdude 2016-05-08T14:10:30.000384Z

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

borkdude 2016-05-08T14:10:49.000385Z

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