Questions tagged [literate-programming]

A literate program embeds source code in an essay documenting the program.

Literate programming was introduced by Donald Knuth as an alternative to the structured programming. Literate programming encourages programmers to structure their programs by the flow of their thoughts, i.e., in a way that makes it easy to present and document.

158 questions
0
votes
1 answer

Linking/importing externalized source code in org-mode

This paper inspired me to check out Emac's org-mode a bit and currently I try to assess what's more suitable for writing my documents: knitr/Sweave (I'm mainly using R to do my programming) or org-mode. What I really like about knitr is the option…
Rappster
  • 12,762
  • 7
  • 71
  • 120
0
votes
1 answer

MathJax scripts not being generated by knitr::spin

I'm generating an html report from a knitr::spin marked up document 1) It works doing the following > spin("document.R") Process the resulting .md file in Rstudio by clicking the "Preview HTML" button, and then the "view the webpage with the…
0
votes
2 answers

Is there a global flag that can be set to provide code alongside ROxygen documentation?

I have taught a class in which I have had students use a package I have written. Now that the class is ending, I'd like to provide them the code for each of those functions inline with the documentation for the functions. Is there a global flag I…
russellpierce
  • 4,583
  • 2
  • 32
  • 44
-1
votes
2 answers

Column List of Dictionaries Create Columns

I have a column, X, where the rows' values are a list of dictionaries. I.e. row 1 = [{category: **1**, outcome: 1444}, {category: **3**, outcome: 12}, {category: **3**, outcome: 11},... ] row 2 = [{category: 2, outcome: 1555}, {category: 5,…
purple_plop
  • 280
  • 1
  • 10
-1
votes
1 answer

Feature request for a text-editor with support for literate programming

This is a feature request for the writers of Visual Studio and any other programmer's editor. Consider a literate program as follows: /* File Name: LiterateProgram.h */ // \begin{comment} #pragma once #include "myHeader.h" /*…
vo1stv
  • 55
  • 2
  • 17
-1
votes
4 answers

C# IF/Else Array

I am trying to create a simple array example in C# that iterates through the array and only shows values that are greater or equal to 2, but less than 4. In the if statement I am not sure how best to formulate a two part statement within the…
JAS
  • 305
  • 3
  • 5
  • 12
-2
votes
1 answer

What has become of FunnelWeb?

I am a happy user of FunnelWeb, the Literate Programming tool advertised on http://ross.net/home/Cobwebs.html - apparently a minority, as that page says: Most programmers hate it, but the ones who love it really love it. But today I saw that the…
Heiko Theißen
  • 12,807
  • 2
  • 7
  • 31
-2
votes
1 answer

How do I iterate over string?

I have code that looks like this ''' phi = (QubitOperator('X0') + QubitOperator('Y0') + QubitOperator('Z0') + QubitOperator('X1') + QubitOperator('Y1') + QubitOperator('Z1') ) ''' where QubitOperator is a…
1 2 3
10
11